/* Jarvis dashboard: a dark command console (with a light mode). No build step. */
:root {
  --bg: #070b14; --bg-2: #0b1220;
  --panel: rgba(17, 25, 42, .72); --panel-solid: #111a2b; --panel-2: rgba(255, 255, 255, .03);
  --text: #e7eefb; --muted: #8b98b0; --faint: #5d6a82;
  --line: rgba(148, 178, 222, .14); --line-strong: rgba(148, 178, 222, .26);
  --accent: #5ee7ff; --accent-2: #8b7bff; --accent-ink: #04121a; --primary-end: #7dd3fc;
  --glow: 0 0 0 1px rgba(94, 231, 255, .25), 0 8px 30px -8px rgba(94, 231, 255, .35);
  --ok: #4ade80; --warn: #fbbf24; --danger: #fb7185;
  --chip: rgba(148, 178, 222, .1);
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .04) inset, 0 10px 30px -12px rgba(0, 0, 0, .6);
  --grid-line: rgba(94, 231, 255, .035);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef2f8; --bg-2: #e6ebf4;
    --panel: rgba(255, 255, 255, .82); --panel-solid: #ffffff; --panel-2: rgba(15, 30, 60, .025);
    --text: #0f1729; --muted: #5a6780; --faint: #8a95aa;
    --line: rgba(15, 40, 80, .1); --line-strong: rgba(15, 40, 80, .18);
    --accent: #0891b2; --accent-2: #6d5dfc; --accent-ink: #ffffff; --primary-end: #0e7490;
    --glow: 0 0 0 1px rgba(8, 145, 178, .25), 0 8px 24px -10px rgba(8, 145, 178, .45);
    --ok: #16a34a; --warn: #b45309; --danger: #e11d48;
    --chip: rgba(15, 40, 80, .06);
    --shadow: 0 1px 2px rgba(15, 30, 60, .05), 0 8px 24px -16px rgba(15, 30, 60, .25);
    --grid-line: rgba(15, 40, 80, .035);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--text); background-color: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(139, 123, 255, .16), transparent 60%),
    radial-gradient(800px 500px at -10% 10%, rgba(94, 231, 255, .12), transparent 60%),
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
  background-attachment: fixed;
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code { font: 12.5px var(--mono); color: var(--accent); }
::selection { background: rgba(94, 231, 255, .3); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* --- Shell: sidebar + main ---------------------------------------------------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10, 16, 30, .85), rgba(7, 11, 20, .6));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
@media (prefers-color-scheme: light) { .side { background: rgba(255, 255, 255, .7); } }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.wordmark { font-weight: 700; letter-spacing: .32em; font-size: 14px; }
.orb {
  position: relative; width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 50% 42%, #f0fdff 0 8%, var(--accent) 30%, rgba(94, 231, 255, .15) 62%, transparent 70%);
  box-shadow: 0 0 18px rgba(94, 231, 255, .55), inset 0 0 0 1px rgba(94, 231, 255, .35);
  animation: breathe 4s ease-in-out infinite;
}
.orb::after {
  content: ""; position: absolute; inset: -5px; border-radius: 50%;
  border: 1px solid rgba(94, 231, 255, .35); border-top-color: transparent; border-left-color: transparent;
  animation: spin 9s linear infinite;
}
.orb-lg { width: 56px; height: 56px; }
.orb-lg::after { inset: -8px; }
@keyframes breathe { 50% { box-shadow: 0 0 28px rgba(94, 231, 255, .8), inset 0 0 0 1px rgba(94, 231, 255, .5); } }
@keyframes spin { to { transform: rotate(360deg); } }

.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.navlink {
  display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--muted); font-weight: 500; position: relative; transition: background .15s, color .15s;
}
.navlink:hover { background: var(--chip); color: var(--text); text-decoration: none; }
.navlink.on { color: var(--text); background: linear-gradient(90deg, rgba(94, 231, 255, .14), rgba(94, 231, 255, .02)); }
.navlink.on::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 12px var(--accent);
}
.navlink.on .ico { color: var(--accent); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.side-foot { display: flex; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.side-foot form { margin: 0; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-weight: 700; color: var(--accent-ink); background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.me-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-role { font-size: 12px; color: var(--muted); text-transform: capitalize; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }

.main { padding: 28px 32px 48px; max-width: 1280px; width: 100%; min-width: 0; }
.bare { min-height: 100vh; padding: 16px; }

/* --- Type ---------------------------------------------------------------------- */
h1 { font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; margin: 2px 0 18px; }
h2 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }
h3 { font-size: 13px; font-weight: 600; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--accent); font-weight: 600; }
.empty { color: var(--faint); font-size: 14px; margin: 4px 0; }

/* --- Overview ------------------------------------------------------------------ */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.hero-title {
  font-size: clamp(26px, 3.4vw, 38px); margin: 6px 0 0; letter-spacing: -.02em;
  background: linear-gradient(90deg, var(--text) 30%, var(--accent) 120%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.live-tag { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted);
            border: 1px solid var(--line); border-radius: 99px; padding: 5px 12px; background: var(--panel); white-space: nowrap; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(74, 222, 128, .6);
         animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
.status-line { display: flex; align-items: baseline; gap: 10px; color: var(--muted); margin: 8px 0 18px; }
.status-line > span:nth-child(2) { flex: 1; min-width: 0; }
.status-line .dot { position: relative; top: -1px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 16px 18px;
  border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); color: var(--text);
  box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  transition: border-color .2s, transform .2s;
}
.stat::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .5; }
.stat:hover { text-decoration: none; border-color: var(--line-strong); transform: translateY(-1px); }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat-value { font: 600 30px/1.15 var(--mono); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 16px; color: var(--muted); }
.stat-sub { font-size: 12px; color: var(--faint); }
.stat.hot { border-color: rgba(251, 191, 36, .45); }
.stat.hot::after { background: linear-gradient(90deg, var(--warn), transparent); opacity: .9; }
.stat.hot .stat-value { color: var(--warn); }
.stat.alarm { border-color: rgba(251, 113, 133, .45); }
.stat.alarm::after { background: linear-gradient(90deg, var(--danger), transparent); opacity: .9; }
.stat.alarm .stat-value { color: var(--danger); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0;
               border-top: 1px solid var(--line); font-size: 14px; }
.timeline li:first-child { border-top: 0; }
.timeline .t { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.timeline .who { color: var(--faint); font-size: 12px; }
.agents-mini li { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; }
.agents-mini .name { font-weight: 600; }
.agents-mini .what { min-width: 0; text-align: right; }

/* --- Cards and building blocks ------------------------------------------------- */
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  box-shadow: var(--shadow); min-width: 0; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.card > h2:first-child, .card-head { margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; }
.card-head h2 { margin: 0; }
.card-head > :last-child:not(h2) { margin-left: auto; }
.card-hot { border-color: rgba(251, 191, 36, .4); box-shadow: var(--shadow), 0 0 0 1px rgba(251, 191, 36, .12), 0 10px 40px -20px rgba(251, 191, 36, .5); }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }
.stack > * + * { margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 99px; background: var(--chip);
        font-size: 12px; color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.chip.ok { color: var(--ok); border-color: rgba(74, 222, 128, .25); background: rgba(74, 222, 128, .08); }
.chip.warn { color: var(--warn); border-color: rgba(251, 191, 36, .3); background: rgba(251, 191, 36, .08); }
.chip.danger { color: var(--danger); border-color: rgba(251, 113, 133, .3); background: rgba(251, 113, 133, .08); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.dot.warn { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.dot.danger { background: var(--danger); box-shadow: 0 0 10px var(--danger); }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 10px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; padding-top: 2px; }
pre, .pre { white-space: pre-wrap; word-break: break-word; font: 12.5px/1.55 var(--mono); color: var(--text);
            background: var(--panel-2); border: 1px solid var(--line); padding: 10px 12px; border-radius: var(--radius-sm);
            margin: 8px 0 0; max-height: 360px; overflow: auto; }
.flash { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 10px 14px;
         border-radius: var(--radius-sm); margin-bottom: 14px; white-space: pre-wrap; box-shadow: var(--shadow); }
.flash.bad { border-left-color: var(--danger); }
.alert { border-left: 2px solid var(--warn); padding-left: 12px !important; }
.alert.danger { border-left-color: var(--danger); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.scroll { overflow-x: auto; }
.center { text-align: center; }
details > summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details > summary:hover { color: var(--text); }
details[open] > summary { margin-bottom: 6px; }
.meter { height: 6px; background: var(--chip); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 10px rgba(94, 231, 255, .5); }
.meter.warn > span { background: var(--warn); box-shadow: none; } .meter.danger > span { background: var(--danger); box-shadow: none; }
canvas { max-width: 100%; }

/* --- Controls ------------------------------------------------------------------ */
button, .btn {
  font: inherit; font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--panel-2); color: var(--text); display: inline-flex; align-items: center;
  gap: 6px; transition: border-color .15s, background .15s, box-shadow .15s, transform .05s;
}
button:hover, .btn:hover { border-color: var(--accent); text-decoration: none; }
button:active { transform: translateY(1px); }
button.primary { background: linear-gradient(135deg, var(--accent), var(--primary-end)); border-color: transparent; color: var(--accent-ink);
                 font-weight: 600; box-shadow: var(--glow); }
button.primary:hover { filter: brightness(1.08); }
button.danger { color: var(--danger); }
button.danger:hover { border-color: var(--danger); background: rgba(251, 113, 133, .08); }
button.small, .small > button { padding: 4px 10px; font-size: 13px; min-height: 30px; }
.small > input, .small > select { padding: 4px 8px; font-size: 13px; min-height: 30px; }
button:disabled { opacity: .45; cursor: not-allowed; }
input, select, textarea {
  font: inherit; font-size: 14px; padding: 7px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--panel-2); color: var(--text); max-width: 100%;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 231, 255, .15); }
select option { background: var(--panel-solid); }
textarea { width: 100%; min-height: 80px; }
form.inline { display: inline-flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 0; }
button.link { background: none; border: 0; color: var(--accent); padding: 8px; margin-top: 10px; box-shadow: none; }

/* --- Tables --------------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
th.num { font-family: inherit; }
th { color: var(--faint); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; border-top: 0; }
tr:hover td { background: var(--panel-2); }

/* --- Tasks board ---------------------------------------------------------------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; }
.board .col { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; }
.task { display: block; color: inherit; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
        background: var(--panel); margin-bottom: 10px; transition: border-color .15s, transform .15s; }
.task:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-1px); }

/* --- Content calendar ------------------------------------------------------------ */
.cal { display: grid; grid-template-columns: 90px repeat(3, minmax(180px, 1fr)); gap: 8px; min-width: 640px; }
.cal .head { font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.cal .day { font: 13px var(--mono); color: var(--faint); padding-top: 6px; }
.cal .day.today { color: var(--accent); font-weight: 700; }
.piece { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; background: var(--panel); font-size: 13px; }
.piece.planned { border-left: 3px solid var(--faint); } .piece.drafted { border-left: 3px solid var(--warn); }
.piece.approved { border-left: 3px solid var(--accent); } .piece.published { border-left: 3px solid var(--ok); }

/* --- Sign-in -------------------------------------------------------------------- */
.auth { max-width: 420px; margin: 9vh auto 24px; }
.auth-card { padding: 32px 28px; position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px;
                     background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .7; }
.auth-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 26px; }
.auth-brand .wordmark { font-size: 16px; }
.auth-card h1 { font-size: 22px; margin: 0 0 4px; }
.auth-card p { margin: 0 0 18px; }
.btn.wide, button.wide { display: flex; width: 100%; justify-content: center; gap: 10px; padding: 12px 14px; font-weight: 600; min-height: 48px; }
.btn.google { background: var(--panel-solid); color: var(--text); border-color: var(--line-strong); }
.btn.google:hover { border-color: var(--accent); box-shadow: var(--glow); }
.or { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 20px 0; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.field { display: block; }
.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .06em; }
.field > input { width: 100%; padding: 11px 12px; min-height: 46px; font-size: 16px; }
input.code { width: 100%; text-align: center; font: 600 28px/1.2 var(--mono); letter-spacing: .32em; padding: 12px; min-height: 58px; }
.qr { display: block; margin: 8px auto 14px; background: #fff; padding: 10px; border-radius: 12px; width: 200px; height: 200px;
      box-shadow: var(--glow); }
.key { display: block; word-break: break-all; background: var(--panel-2); border: 1px solid var(--line); padding: 8px 10px; border-radius: 8px; margin-top: 6px; }

/* --- Talk and routine ------------------------------------------------------------- */
.talk { max-width: 860px; }
.thread-wrap { margin-top: 12px; }
.thread { display: flex; flex-direction: column; gap: 10px; max-height: 58vh; overflow-y: auto; padding: 4px 2px 8px; }
.thread-divider { display: flex; align-items: center; gap: 10px; color: var(--faint); font-size: 11px; text-transform: uppercase;
                  letter-spacing: .1em; margin: 8px 0 2px; }
.thread-divider::before, .thread-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel);
          backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); word-break: break-word; }
.bubble-text { white-space: pre-wrap; }
.bubble.jarvis { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble.me { align-self: flex-end; border-bottom-right-radius: 4px; background: linear-gradient(135deg, rgba(94, 231, 255, .18), rgba(139, 123, 255, .14));
             border-color: rgba(94, 231, 255, .3); }
.bubble.ask { border-color: rgba(94, 231, 255, .45); box-shadow: 0 0 0 1px rgba(94, 231, 255, .12), 0 8px 26px -14px rgba(94, 231, 255, .6); }
.bubble-meta { font: 11px var(--mono); color: var(--faint); margin-top: 4px; }
.bubble .proof { display: block; max-width: 240px; border-radius: 10px; margin-bottom: 6px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 4px; }
.composer { margin-top: 12px; padding: 12px; position: sticky; bottom: 12px; }
.compose-row { display: flex; gap: 8px; }
.compose-row input { flex: 1; min-height: 44px; font-size: 15px; }
.compose-tools { margin-top: 10px; }
.ptt { gap: 10px; min-height: 40px; user-select: none; -webkit-user-select: none; touch-action: none; }
.ptt-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.ptt.rec { border-color: var(--danger); color: var(--danger); background: rgba(251, 113, 133, .1); }
.ptt.rec .ptt-dot { background: var(--danger); box-shadow: 0 0 0 0 rgba(251, 113, 133, .6); animation: ping 1.2s infinite; }
.card-ask { border-color: rgba(94, 231, 255, .45); box-shadow: var(--shadow), 0 0 0 1px rgba(94, 231, 255, .1), 0 14px 40px -22px rgba(94, 231, 255, .7); }
.ask-text { font-size: 18px; font-weight: 600; margin: 0 0 14px; }
.orb-sm { width: 16px; height: 16px; }
.orb-sm::after { inset: -3px; }
.streak { display: inline-flex; align-items: baseline; gap: 6px; padding: 5px 12px; border-radius: 99px; color: var(--ok);
          border: 1px solid rgba(74, 222, 128, .3); background: rgba(74, 222, 128, .08); white-space: nowrap; }
.streak strong { font-family: var(--mono); font-size: 1.15em; }
.item-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; color: var(--text); }
.item-row .t { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.item-form { margin: 12px 0 8px; }
.fields { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 10px; }
.fields .field > input, .fields .field > select { width: 100%; min-height: 38px; font-size: 14px; padding: 7px 10px; }
.wide-field { grid-column: span 2; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 10px; }

/* --- Wireframe layouts ------------------------------------------------------------- */
.talk-btn { gap: 8px; padding: 11px 20px; border-radius: 99px; font-weight: 600; color: var(--accent-ink);
            background: linear-gradient(135deg, var(--accent), var(--primary-end)); border-color: transparent; box-shadow: var(--glow); }
.talk-btn:hover { text-decoration: none; filter: brightness(1.08); }
.split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.split > .col-main, .split > .col-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.split > .card.col-main, .split > .card.col-side { display: block; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 52px 20px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14px; }
.checklist.plain li { grid-template-columns: 20px 1fr; }
.checklist .t { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.checklist .mark { text-align: center; color: var(--faint); font-weight: 700; }
.checklist .mark.done, .checklist .mark.late { color: var(--ok); }
.checklist .mark.missed { color: var(--danger); }
.checklist li.now { font-weight: 600; }
.checklist li.now .mark { color: var(--accent); }
.checklist .mark.untracked { color: var(--faint); }
.tag { display: inline-block; min-width: 64px; font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--warn); }
.tag.danger { color: var(--danger); }
.list.alerts li { display: flex; gap: 10px; align-items: baseline; }
.approvals { display: flex; flex-direction: column; gap: 10px; }
.approval { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 14px;
            border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--panel-2); }
.approval-body { min-width: 0; }
.approval-title { font-weight: 500; }
.approval-actions { display: flex; gap: 8px; flex: none; }
.eyebrow-sm { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 2px; }
button.ok-btn { background: rgba(74, 222, 128, .15); border-color: rgba(74, 222, 128, .45); color: var(--ok); font-weight: 600; }
button.ok-btn:hover { background: rgba(74, 222, 128, .25); border-color: var(--ok); }
.warn-text { color: var(--warn); }
.chip-btn { display: inline-flex; align-items: center; padding: 6px 14px; border-radius: 99px; border: 1px solid var(--line-strong);
            background: var(--panel-2); color: var(--text); font-size: 14px; }
.chip-btn:hover { border-color: var(--accent); text-decoration: none; }
.chip-btn.on { border-color: var(--accent); color: var(--accent); background: rgba(94, 231, 255, .1); }
.modes { margin-top: 10px; }

.talk-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
.talk-panel { padding: 0; overflow: hidden; }
.talk-head { padding: 18px 20px 16px; border-bottom: 1px solid var(--line); }
.talk-head h1 { margin: 0 0 2px; font-size: 22px; }
.talk-head p { margin: 0; }
.talk-panel .thread-wrap { margin: 0; padding: 16px 20px; }
.talk-side { display: flex; flex-direction: column; gap: 16px; }
.bubble-label { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; opacity: .75; margin-bottom: 2px; }
.composer { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr); grid-template-areas: "mic hint input" "cam . ."; gap: 10px 14px;
            align-items: center; padding: 16px 20px; border-top: 1px solid var(--line); margin: 0; position: static; }
.composer .mic { grid-area: mic; }
.composer .mic-hint { grid-area: hint; display: flex; flex-direction: column; gap: 2px; }
.composer .compose-row { grid-area: input; }
.composer .cam { grid-area: cam; }
.mic { width: 64px; height: 64px; border-radius: 50%; padding: 0; justify-content: center; border: 2px solid var(--accent);
       background: rgba(94, 231, 255, .08); color: var(--accent); box-shadow: 0 0 24px -6px rgba(94, 231, 255, .6);
       user-select: none; -webkit-user-select: none; touch-action: none; }
.mic .ico { width: 26px; height: 26px; }
.mic.rec { border-color: var(--danger); color: var(--danger); background: rgba(251, 113, 133, .12); animation: ping 1.2s infinite; }
.phone-only { display: none; }
.focus-card { display: none; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.quad form { margin: 0; }
.quad button, .quad .btn { width: 100%; justify-content: center; min-height: 52px; font-size: 16px; }

.tabs { gap: 6px; }
.routine-table td { vertical-align: middle; }
.status-done, .status-late { color: var(--ok); font-weight: 600; }
.status-missed { color: var(--danger); font-weight: 600; }
.status-skipped { color: var(--muted); font-weight: 600; }
.status-asking { color: var(--accent); font-weight: 600; }
table.week th { text-align: center; }
table.week th.today { color: var(--accent); }
table.week td { padding: 4px; border-top: 0; }
table.week tr:hover td { background: none; }
.cell { display: inline-block; width: 100%; min-width: 26px; height: 26px; border-radius: 6px; background: var(--chip); vertical-align: middle; }
.legend .cell { width: 14px; min-width: 14px; height: 14px; border-radius: 4px; }
.legend { gap: 14px; margin-top: 10px; color: var(--muted); }
.cell.done, .cell.late { background: rgba(74, 222, 128, .45); }
.cell.missed { background: rgba(251, 113, 133, .5); }
.cell.pending { background: rgba(94, 231, 255, .45); }
.cell.skipped { background: rgba(148, 178, 222, .3); }
.cell.off { background: transparent; border: 1px dashed var(--line); }
.cell.none { background: rgba(148, 178, 222, .12); }
table.settings td { padding: 7px 4px; }
table.settings td:last-child { text-align: right; }

.agent-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.agent-name { font-size: 17px; margin: 0; text-transform: none; letter-spacing: 0; color: var(--text); }
.agent-line { margin: 8px 0 14px; min-height: 2.9em; }
.state { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.state.running { color: var(--accent); } .state.waiting { color: var(--warn); } .state.paused, .state.blocked { color: var(--danger); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pair form, .pair details { margin: 0; }
.pair button, .pair summary.btn { width: 100%; justify-content: center; min-height: 40px; }
.menu { position: relative; }
.menu > summary { list-style: none; } .menu > summary::-webkit-details-marker { display: none; }
.menu-list { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; min-width: 220px; padding: 6px; display: flex; flex-direction: column; gap: 4px;
             background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
.menu-list form { margin: 0; } .menu-list button { width: 100%; justify-content: flex-start; }
.more-menu, .tabbar { display: none; }

@media (max-width: 1100px) {
  .talk-layout { grid-template-columns: 1fr; }
  .agent-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .side nav { display: none; }
  .more-menu { display: block; position: relative; order: 2; }
  .more-menu > summary { list-style: none; } .more-menu > summary::-webkit-details-marker { display: none; }
  .more-list { position: absolute; right: 0; top: calc(100% + 8px); z-index: 40; min-width: 180px; padding: 6px; display: flex; flex-direction: column;
               background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow); }
  .more-list a { padding: 9px 12px; border-radius: 8px; color: var(--text); }
  .more-list a.on { color: var(--accent); background: rgba(94, 231, 255, .1); }
  .side { padding-bottom: 10px; }
  .side-foot { order: 3; }
  .main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; position: fixed; z-index: 30; left: 10px; right: 10px;
            bottom: calc(10px + env(safe-area-inset-bottom)); padding: 6px; border-radius: 18px; border: 1px solid var(--line-strong);
            background: rgba(11, 18, 32, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; color: var(--muted); font-size: 12px; }
  .tabbar a.on { color: var(--accent); background: rgba(94, 231, 255, .12); }
  .tabbar a:hover { text-decoration: none; }
  .focus-card { display: block; padding: 18px 16px; border-bottom: 1px solid var(--line); }
  .focus-card .bubble { max-width: 100%; margin-top: 12px; font-size: 18px; }
  .talk-panel .quick { display: none; }
  .talk-side { display: none; }
  .composer { grid-template-columns: 1fr auto; grid-template-areas: "mic mic" "hint hint" "input cam"; justify-items: center; text-align: center; }
  .composer .mic { width: 92px; height: 92px; }
  .composer .mic .ico { width: 34px; height: 34px; }
  .composer .compose-row { width: 100%; }
  .desk-only { display: none; } .phone-only { display: inline; }
}
@media (prefers-color-scheme: light) { @media (max-width: 900px) { .tabbar { background: rgba(255, 255, 255, .94); } } }
@media (max-width: 600px) { .talk-btn { display: none; } .agent-grid { grid-template-columns: 1fr; } .approval { flex-direction: column; align-items: stretch; } }

/* --- Phones and small screens ---------------------------------------------------- */
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .shell { display: block; }
  .side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
          gap: 8px; padding: 10px 16px 0; padding-top: max(10px, env(safe-area-inset-top));
          border-right: 0; border-bottom: 1px solid var(--line); background: rgba(7, 11, 20, .88); }
  @media (prefers-color-scheme: light) { .side { background: rgba(255, 255, 255, .9); } }
  .brand { padding: 0; flex: 1; }
  .orb { width: 24px; height: 24px; }
  .side-foot { border: 0; padding: 0; }
  .me-text { display: none; }
  .avatar { width: 30px; height: 30px; font-size: 13px; }
  .side nav { order: 3; flex-basis: 100%; flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 4px;
              margin: 0 -16px; padding: 4px 16px 10px; }
  .side nav::-webkit-scrollbar { display: none; }
  .navlink { padding: 7px 12px; white-space: nowrap; border-radius: 99px; font-size: 14px; }
  .navlink.on { background: rgba(94, 231, 255, .14); }
  .navlink.on::before { display: none; }
  .navlink .ico { width: 16px; height: 16px; }
  .main { padding: 18px 16px 40px; }
}
@media (max-width: 600px) {
  .grid { grid-template-columns: 1fr; }
  .stats { gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat-value { font-size: 24px; }
  .hide-sm { display: none; }
  h1 { font-size: 22px; }
  .hero { align-items: flex-start; }
  .auth { margin-top: 4vh; }
  .auth-card { padding: 24px 18px; }
  .bubble { max-width: 90%; }
  .wide-field { grid-column: auto; }
  .thread { max-height: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
