/* ===========================================================================
   TEN X Hub theme — loaded after app.css by the staff layout and the login page.
   Dark sidebar, light working area, Archivo, mint accent (digitaltenx.qa palette).

   Scope: .app (every staff page) and .auth-wrap (sign-in pages). The public QR
   verification pages (.verify-wrap) and the PDFs do not load or match this file,
   so they look exactly as before. Remove the <link> to this file to roll back.
   =========================================================================== */

:root {
  --hub-ink: #080D0D;
  --hub-ink-2: #3F4A48;
  --hub-ink-3: #5A6664;
  --hub-ink-4: #66716F;
  --hub-bg: #F3F5F4;
  --hub-card: #FFFFFF;
  --hub-line: #E1E6E4;
  --hub-line-2: #C5CECB;
  --hub-row: #F6F8F7;
  --hub-mint: #00D68F;
  --hub-mint-hover: #00C281;
  --hub-mint-ink: #00734E;
  --hub-mint-soft: #DDF7EC;
  --hub-deep: #0F3D2B;
  --hub-amber: #B45309;
  --hub-amber-soft: #FFF4E5;
  --hub-red: #B91C1C;
  --hub-red-soft: #FDECEC;
  --hub-side: #080D0D;
  --hub-side-active: #182020;
  --hub-side-text: #B3BDBA;
  --hub-side-label: #8D9996;
  --hub-sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* The light working area: remap the old dark tokens inside the staff shell + sign-in. */
.app, .auth-wrap {
  --ink: var(--hub-bg);
  --panel: var(--hub-row);
  --panel2: var(--hub-card);
  --line: var(--hub-line);
  --line2: var(--hub-line-2);
  --fg: var(--hub-ink);
  --muted: var(--hub-ink-3);
  --dim: var(--hub-ink-4);
  --accent: var(--hub-mint-ink);   /* accent TEXT on light backgrounds (mint itself fails contrast) */
  --accent2: var(--hub-mint-hover);
  --gold: var(--hub-amber);
  --danger: var(--hub-red);
  --sans: var(--hub-sans);
  --serif: var(--hub-sans);
  color-scheme: light;
  color: var(--hub-ink);
  font-family: var(--hub-sans);
}
html:has(.app), html:has(.auth-wrap) { color-scheme: light; }
body:has(.app), body:has(.auth-wrap) { background: var(--hub-bg); color: var(--hub-ink); font-family: var(--hub-sans); font-size: 14px; }
.app ::selection { background: var(--hub-mint); color: var(--hub-ink); }
.app :focus-visible, .auth-wrap :focus-visible { outline: 2px solid var(--hub-mint-ink); outline-offset: 2px; }
.app h1, .app h2, .app h3 { font-weight: 600; letter-spacing: -0.01em; }

/* --- Sidebar: stays dark ---------------------------------------------------- */
.app .sidebar {
  background: var(--hub-side); border-right: 0; padding: 18px 12px; gap: 2px;
  --line: #182020; --panel: var(--hub-side-active); --fg: #FFFFFF; --muted: var(--hub-side-text); --dim: var(--hub-side-label);
}
.app .sidebar .brand { padding: 4px 10px 18px; }
.app .sidebar .brand img { height: 28px; }
.app .nav-group { font-family: var(--hub-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.06em; color: var(--hub-side-label); padding: 16px 10px 6px; }
.app .nav-link { gap: 10px; padding: 0 10px; min-height: 38px; border-radius: 8px; color: var(--hub-side-text); font-weight: 500; font-size: 14px; }
.app .nav-link svg { width: 16px; height: 16px; stroke-width: 1.8; }
.app .nav-link:hover { color: #FFFFFF; background: var(--hub-side-active); }
.app .nav-link.is-active { color: #FFFFFF; background: var(--hub-side-active); }
.app .nav-link.is-active svg { stroke: var(--hub-mint); }
.app .nav-count { background: #232B2A; border: 0; color: #F4F6F5; font-family: var(--hub-sans); font-size: 12px; font-variant-numeric: tabular-nums; padding: 1px 8px; }
.app .nav-count.bad { background: #3A1414; color: #FCA5A5; }
.app .sidebar .signout { border-top: 1px solid #182020; padding-top: 10px; }

/* --- Top bar ------------------------------------------------------------------ */
.app .topbar { background: var(--hub-card); backdrop-filter: none; border-bottom: 1px solid var(--hub-line); padding: 14px 32px; }
.app .topbar h1 { font-size: 16px; font-weight: 600; }
.app .topbar .who { font-family: var(--hub-sans); font-size: 12px; color: var(--hub-ink-3); }
.app .topbar .who b { color: var(--hub-ink); font-weight: 600; }
.app a.who:hover { background: var(--hub-row); }
.app .lang-switch { border-color: var(--hub-line); }
.app .lang-switch a { font-family: var(--hub-sans); color: var(--hub-ink-3); }
.app .lang-switch a.is-active { background: var(--hub-ink); color: #FFFFFF; }
.app .nav-burger { color: var(--hub-ink); }
.app .content { padding: 24px 32px 48px; max-width: 1240px; }

/* --- Type that used the mono "label" style becomes quiet sans ----------------- */
.app .eyebrow, .app .label-mono, .app .form-section, .app .field > label, .app .stat .k,
.app table.data th, .app table.fin-lines th, .app .pager-info, .app .lhe-eyebrow, .app .lhe-applies span,
.app .lhe-preview-sub, .app .v-row .k, .auth-wrap .field > label, .auth-wrap .auth-foot, .auth-wrap .eyebrow {
  font-family: var(--hub-sans); letter-spacing: 0; text-transform: none;
}
.app .eyebrow, .app .lhe-eyebrow, .auth-wrap .eyebrow { font-size: 12px; font-weight: 600; color: var(--hub-mint-ink); }
.app .field > label, .auth-wrap .field > label { font-size: 13px; font-weight: 500; color: var(--hub-ink-2); margin-bottom: 6px; }
.app .form-section { font-size: 14px; font-weight: 600; color: var(--hub-ink); border-bottom-color: var(--hub-line); }
.app em.accent, .app .accent-em, .auth-wrap em.accent, .auth-wrap .accent-em { font-family: var(--hub-sans); font-style: normal; font-weight: 700; color: var(--hub-mint-ink); }

/* --- Cards & stats ------------------------------------------------------------- */
.app .card { background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 14px; }
.app .card:hover { border-color: var(--hub-line); }
.app .card-head { border-bottom-color: var(--hub-line); }
.app .card-head h2 { font-size: 15px; font-weight: 600; }
.app .stat { background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 14px; padding: 18px; }
.app .stat .v { font-family: var(--hub-sans); font-style: normal; font-variation-settings: normal; font-weight: 700; color: var(--hub-ink); font-size: 30px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.app .stat .k { font-size: 13px; color: var(--hub-ink-3); margin-top: 6px; }
.app a.stat-link:hover { border-color: var(--hub-line-2); }

/* --- Buttons ------------------------------------------------------------------- */
.app .btn, .auth-wrap .btn { font-family: var(--hub-sans); font-weight: 600; border-radius: 9px; padding: 9px 16px; }
.app .btn-primary, .auth-wrap .btn-primary { background: var(--hub-mint); color: var(--hub-ink); }
.app .btn-primary:hover, .auth-wrap .btn-primary:hover { background: var(--hub-mint-hover); box-shadow: none; }
.app .btn-secondary { background: var(--hub-card); color: var(--hub-ink); border-color: var(--hub-line); }
.app .btn-secondary:hover { border-color: var(--hub-line-2); color: var(--hub-ink); background: var(--hub-row); }
.app .btn-ghost { color: var(--hub-ink-3); }
.app .btn-ghost:hover { color: var(--hub-ink); background: var(--hub-row); }
.app .btn-danger { color: var(--hub-red); border-color: #F5C2C2; background: var(--hub-card); }
.app .btn-danger:hover { background: var(--hub-red-soft); }

/* --- Forms --------------------------------------------------------------------- */
.app .input, .app .select, .app textarea.input, .auth-wrap .input {
  background-color: var(--hub-card); border-color: var(--hub-line-2); border-radius: 9px; color: var(--hub-ink);
}
.app .input:hover, .app .select:hover { border-color: #9AA6A3; }
.app .input:focus, .app .select:focus, .app textarea.input:focus, .auth-wrap .input:focus {
  border-color: var(--hub-mint-ink); box-shadow: 0 0 0 3px rgba(0, 214, 143, 0.18);
}
.app .select option, .app .lhe-applies select option { background: var(--hub-card); color: var(--hub-ink); }
.app .field .hint { color: var(--hub-ink-4); }
.app input[type="radio"], .app input[type="checkbox"], .auth-wrap input[type="checkbox"] { background: var(--hub-card); border-color: var(--hub-line-2); }
.app input[type="radio"]:checked, .app input[type="checkbox"]:checked { background: var(--hub-mint); border-color: var(--hub-mint); }
.app input[type="radio"]:checked::before { background: var(--hub-ink); }
.app label.card:has(input:checked) { border-color: var(--hub-mint); background: #EEFBF5; }

/* --- Tables -------------------------------------------------------------------- */
.app table.data th { font-size: 12px; font-weight: 500; color: var(--hub-ink-4); }
.app table.data td { border-bottom-color: var(--hub-line); }
.app table.data tbody tr:hover { background: var(--hub-row); }
.app table.data .mono, .app td.mono { font-variant-numeric: tabular-nums; }

/* --- Badges, flashes, tabs ------------------------------------------------------ */
.app .badge { font-family: var(--hub-sans); font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: none; padding: 2px 9px; border: 0; background: #EAEEEC; color: var(--hub-ink-2); }
.app .badge.ok { background: var(--hub-mint-soft); color: var(--hub-mint-ink); }
.app .badge.bad { background: var(--hub-red-soft); color: #991B1B; }
.app .badge.warn { background: var(--hub-amber-soft); color: #92400E; }
.app .flash.success { background: #EEFBF5; border-color: #B8EBD5; color: var(--hub-deep); }
.app .flash.error { background: var(--hub-red-soft); border-color: #F5C2C2; color: #991B1B; }
.app .pill-tabs { background: #EAEEEC; border: 0; }
.app .pill-tabs a { font-family: var(--hub-sans); font-size: 13px; letter-spacing: 0; color: var(--hub-ink-2); }
.app .pill-tabs a.is-active { background: var(--hub-card); color: var(--hub-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(8, 13, 13, 0.08); }
.app .fin-tabs a { font-family: var(--hub-sans); font-size: 13px; letter-spacing: 0; color: var(--hub-ink-2); background: var(--hub-card); border-color: var(--hub-line); }
.app .fin-tabs a.is-active { background: var(--hub-ink); color: #FFFFFF; border-color: var(--hub-ink); }
.app .set-tabs { border-bottom-color: var(--hub-line); }
.app .set-tabs a.is-active { color: var(--hub-ink); font-weight: 600; border-bottom-color: var(--hub-mint); }
.app .empty h3 { font-family: var(--hub-sans); font-weight: 600; }

/* --- Pieces that hard-coded the old dark colours -------------------------------- */
.app .fin-totals { background: var(--hub-card); border-color: var(--hub-line); }
.app .ft-total .mono { color: var(--hub-ink); }
.app .tfa-code-grid span { background: var(--hub-row); }
.app .lhe-card { background: var(--hub-card); }
.app .lhe-knob::after { background: #FFFFFF; }
.app .lhe-tog input:checked + .lhe-knob::after { background: #FFFFFF; }
.app .lhe-seg label { background: var(--hub-card); }
.app .lhe-seg input:checked + label { background: var(--hub-mint); color: var(--hub-ink); }
.app .lhe-applies select { background: var(--hub-card); }
.app .lhe-note { background: #EEFBF5; border-color: #B8EBD5; }
.app .eme-chip, .app .lhe-card .field code, .app .field .hint code, .app .set-code code { color: var(--hub-mint-ink); }
.app .attn:hover { background: var(--hub-row); }

/* --- Sign-in pages ----------------------------------------------------------------- */
.auth-wrap { background: var(--hub-bg); }
.auth-wrap .auth-box { background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 18px; box-shadow: 0 12px 40px -18px rgba(8, 13, 13, 0.18); }
.auth-wrap .auth-box h1 { font-weight: 700; font-size: 22px; }
.auth-wrap .auth-box h1 em { font-family: var(--hub-sans); font-style: normal; color: var(--hub-mint-ink); }
.auth-wrap .auth-box .sub { color: var(--hub-ink-3); }
.auth-wrap .auth-foot { font-size: 12px; color: var(--hub-ink-4); }
.auth-wrap .auth-brand { background: var(--hub-side); border-radius: 14px; padding: 14px 18px; width: max-content; margin: 0 auto 24px; }
.auth-wrap .auth-brand img { height: 30px; }

/* --- Phones ---------------------------------------------------------------------------- */
@media (max-width: 920px) {
  .app .topbar { padding: 12px 16px; }
  .app .content { padding: 16px; }
  .app .sidebar { background: var(--hub-side); }
}

/* ===========================================================================
   TEN X Hub pages (projects, board, tasks, homes, access, reminders)
   =========================================================================== */
.app .hub-grid { display: grid; gap: 16px; }
.app .hub-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.app .hub-split > .main-col { flex: 3 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.app .hub-split > .side-col { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.app .hub-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.app .hub-kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 14px; color: var(--hub-ink); }
.app .hub-kpi .k { font-size: 13px; color: var(--hub-ink-3); }
.app .hub-kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.app .hub-kpi .s { font-size: 12.5px; color: var(--hub-ink-3); }
.app .hub-kpi.dark { background: var(--hub-side); border-color: var(--hub-side); color: #F4F6F5; }
.app .hub-kpi.dark .k { color: var(--hub-side-text); }
.app .hub-kpi.dark .v { color: var(--hub-mint); }
.app .hub-kpi.warn { border-color: #F5C2C2; }
.app .hub-kpi.warn .s { color: var(--hub-red); }
.app .hub-kpi.private { background: #FFFBF3; border-color: #F3D9A9; }
.app .hub-kpi.private .k, .app .hub-kpi.private .s { color: #92400E; }

.app .av { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 28px; height: 28px; border-radius: 999px; color: #FFFFFF; font-size: 11px; font-weight: 700; }
.app .av.sm { width: 22px; height: 22px; font-size: 10px; }
.app .av.lg { width: 44px; height: 44px; font-size: 15px; }
.app .chip { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: #EAEEEC; color: var(--hub-ink-2); white-space: nowrap; }
.app .chip.mint { background: var(--hub-mint-soft); color: var(--hub-mint-ink); }
.app .chip.amber { background: var(--hub-amber-soft); color: #92400E; }
.app .chip.red { background: var(--hub-red-soft); color: #991B1B; }
.app .chip.blue { background: #E8F0FE; color: #1E40AF; }
.app .chip.rev { background: #FFF7ED; color: #9A3412; }
.app .dot:not(.badge) { display: inline-block; width: 9px; height: 9px; border-radius: 3px; flex: none; }   /* the portal also has "badge dot" status labels */
.app .due-late { color: var(--hub-red); font-weight: 600; }
.app .due-soon { color: var(--hub-amber); font-weight: 600; }
.app .muted-s { font-size: 12.5px; color: var(--hub-ink-3); }
.app .private-band { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: #92400E; background: var(--hub-amber-soft); padding: 3px 10px; border-radius: 999px; }

.app .list-row { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--hub-line); color: var(--hub-ink); }
.app .list-row:last-child { border-bottom: 0; }
.app a.list-row:hover { background: var(--hub-row); }
.app .list-row .grow { flex: 1; min-width: 0; }
.app .list-row .t { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .bar { height: 6px; border-radius: 999px; background: #EAEEEC; overflow: hidden; }
.app .bar > span { display: block; height: 6px; border-radius: 999px; background: var(--hub-mint); }

/* Board */
.app .kb-wrap { overflow-x: auto; padding-bottom: 8px; }
.app .kb { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; min-width: 1030px; align-items: start; }
.app .kb-col { background: #EAEEEC; border-radius: 14px; padding: 10px; }
.app .kb-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 13px; font-weight: 600; }
.app .kb-head .kb-count { font-weight: 400; color: var(--hub-ink-4); font-variant-numeric: tabular-nums; }
.app .kb-drop { display: flex; flex-direction: column; gap: 10px; min-height: 60px; border-radius: 10px; transition: background .15s; }
.app .kb-drop.over { background: rgba(0, 214, 143, 0.10); }
.app .kb-card { display: flex; flex-direction: column; gap: 9px; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 12px; padding: 12px; color: var(--hub-ink); box-shadow: 0 1px 2px rgba(8, 13, 13, 0.04); cursor: pointer; }
.app .kb-card[draggable="true"] { cursor: grab; }
.app .kb-card.dragging { opacity: .45; }
.app .kb-card:hover { border-color: var(--hub-line-2); }
.app .kb-card .ttl { font-weight: 500; line-height: 1.4; }
.app .kb-card .meta { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--hub-ink-4); }
.app .kb-add summary { list-style: none; cursor: pointer; font-size: 13px; color: var(--hub-ink-3); padding: 6px 8px; border-radius: 8px; }
.app .kb-add summary::-webkit-details-marker { display: none; }
.app .kb-add summary:hover { background: rgba(255,255,255,.6); color: var(--hub-ink); }
.app .kb-add form { display: flex; flex-direction: column; gap: 8px; background: var(--hub-card); padding: 10px; border-radius: 10px; border: 1px solid var(--hub-line); }

/* Task detail */
.app .task-props { display: grid; grid-template-columns: 110px 1fr; }
.app .task-props > div { padding: 11px 0; border-bottom: 1px solid var(--hub-line); }
.app .task-props > div:nth-last-child(-n+2) { border-bottom: 0; }
.app .task-props .k { color: var(--hub-ink-4); font-size: 13px; }
.app .comment { display: flex; gap: 10px; }
.app .comment .bubble { flex: 1; min-width: 0; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 12px; padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }
.app .comment .who-line { font-size: 12px; color: var(--hub-ink-4); margin-bottom: 2px; }
.app .act-line { font-size: 12.5px; color: var(--hub-ink-3); padding: 4px 0; }
.app .check-row { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.app .check-row.done span { color: var(--hub-ink-4); text-decoration: line-through; }
.app .inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.app .inline-form .input { flex: 1 1 220px; width: auto; }

/* Users & access */
.app .acc-people button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 12px 16px; border: 0; border-bottom: 1px solid var(--hub-line); background: var(--hub-card); font: inherit; text-align: left; color: var(--hub-ink); cursor: pointer; }
.app .acc-people a { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--hub-line); color: var(--hub-ink); }
.app .acc-people a.is-sel { background: #EEFBF5; box-shadow: inset 3px 0 0 var(--hub-mint); }
.app .acc-people a:hover { background: var(--hub-row); }
.app .acc-row { display: flex; gap: 14px; align-items: center; padding: 11px 20px; border-bottom: 1px solid var(--hub-line); }
.app .acc-row:last-child { border-bottom: 0; }
.app .acc-row .lbl { flex: 1; min-width: 0; }
.app .acc-row .lbl b { display: block; font-weight: 500; }
.app .acc-row .lbl span { font-size: 12px; color: var(--hub-ink-4); }
.app .acc-row .changed { display: none; font-size: 11px; font-weight: 600; color: #92400E; background: var(--hub-amber-soft); padding: 2px 8px; border-radius: 999px; }
.app .acc-row.is-changed .changed { display: inline-block; }
.app .hub-switch { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--hub-line-2); transition: background .15s; }
.app .hub-switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.app .hub-switch[aria-checked="true"] { background: var(--hub-mint); }
.app .hub-switch[aria-checked="true"]::after { transform: translateX(18px); }
.app .lock-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }

.hub-toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: #080D0D; color: #FFFFFF; font: 600 13px/1 'Archivo', system-ui, sans-serif; padding: 11px 16px; border-radius: 10px; z-index: 100; transition: opacity .4s; box-shadow: 0 8px 24px rgba(8,13,13,.25); }
.hub-toast.bad { background: #991B1B; }
.hub-toast.out { opacity: 0; }

@media (max-width: 920px) {
  .app .kb { grid-template-columns: repeat(4, minmax(240px, 1fr)); }
}

/* ===========================================================================
   Polish pass (Phase 1 review): disclosures, spacing, files, phone layout
   =========================================================================== */
/* Card headers: one height and padding everywhere; content lines up with them. */
.app .card-head { padding: 14px 20px; min-height: 52px; box-sizing: border-box; }
.app .card-head h2 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.app .card-body { padding: 14px 20px; }
.app .card-body.tight { padding: 8px 20px 14px; }
.app .empty-line { padding: 14px 20px; font-size: 13px; color: var(--hub-ink-3); }

/* Expandable sections: no browser triangle — a clean row with a rotating chevron. */
.app details > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; font-weight: 600; user-select: none; }
.app details > summary::-webkit-details-marker { display: none; }
.app details > summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 2px solid var(--hub-ink-4); border-bottom: 2px solid var(--hub-ink-4); transform: rotate(45deg); transition: transform .15s; flex: none; }
.app details[open] > summary::after { transform: rotate(-135deg); }
.app details.card > summary { margin: -2px 0; }
.app details > summary .plus { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 7px; background: var(--hub-mint-soft); color: var(--hub-mint-ink); font-weight: 700; }
.app details.kb-add > summary::after, .app details.note > summary::after { display: none; }
.app details.note > summary { display: block; font-weight: 400; }

/* File picker */
.app input[type="file"].input { padding: 6px; }
.app input[type="file"]::file-selector-button { font: 600 13px var(--hub-sans); color: var(--hub-ink); background: var(--hub-row); border: 1px solid var(--hub-line-2); border-radius: 7px; padding: 6px 12px; margin-right: 10px; cursor: pointer; }
.app input[type="file"]::file-selector-button:hover { background: #EAEEEC; }

/* Segmented tabs (Active / All) */
.app .seg { display: inline-flex; background: #EAEEEC; padding: 3px; border-radius: 10px; }
.app .seg a { padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--hub-ink-2); }
.app .seg a.is-on { background: var(--hub-card); color: var(--hub-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(8,13,13,.08); }

/* Page heads align their actions with the title, not the subtitle. */
.app .page-head { align-items: center; }

/* Phones */
@media (max-width: 640px) {
  .app .hub-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .app .hub-kpi { padding: 12px 14px; }
  .app .hub-kpi .v { font-size: 22px; }
  .app .hide-sm { display: none !important; }
  .app .topbar .who { display: none; }
  .app .topbar h1 { font-size: 15px; }
  .app .page-head h1 { font-size: 22px !important; }
  .app .list-row { padding: 12px 16px; }
  .app .card-head, .app .card-body, .app .empty-line { padding-left: 16px; padding-right: 16px; }
  .app .acc-row { padding: 11px 16px; }
}

/* Board on a phone: one column at a time, snapping as you swipe */
@media (max-width: 640px) {
  .app .kb-wrap { margin: 0 -16px; padding: 0 16px 8px; scroll-snap-type: x mandatory; scroll-padding: 0 16px; }
  .app .kb { grid-template-columns: repeat(4, 84vw); min-width: 0; width: max-content; gap: 12px; }
  .app .kb-col { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .app .hub-grid > div > .input, .app .hub-grid > div > .select { flex: 1 1 40%; }
}

/* ===== Phase 2 · Inbox, approvals, AI rules, connections ===== */
.app .hub-alert { margin-bottom: 14px; padding: 12px 16px; border-color: #F5C2C2; background: #FEF6F6; color: #7F1D1D; font-size: 13.5px; }
.app .hub-alert.amber { border-color: #F3D9A9; background: #FFFBF3; color: #78350F; }
.app .hub-alert a { color: inherit; font-weight: 600; text-decoration: underline; }

.app .ibx { display: grid; grid-template-columns: minmax(280px, 340px) minmax(0, 1fr) minmax(300px, 370px); gap: 16px; align-items: start; }
.app .ibx:not(.has-sel) { grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); }
.app .ibx-list { position: sticky; top: 16px; display: flex; flex-direction: column; max-height: calc(100vh - 120px); overflow: hidden; }
.app .ibx-tools { padding: 12px; border-bottom: 1px solid var(--hub-line); display: flex; flex-direction: column; gap: 10px; }
.app .ibx-tools .seg { align-self: flex-start; flex-wrap: wrap; }
.app .ibx-boxes { display: flex; gap: 6px; flex-wrap: wrap; }
.app .ibx-boxes a { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--hub-row); color: var(--hub-ink-2); border: 1px solid var(--hub-line); }
.app .ibx-boxes a.is-on { background: var(--hub-ink); color: #FFFFFF; border-color: var(--hub-ink); }
.app .ibx-boxes a span { font-weight: 700; margin-left: 2px; }
.app .ibx-rows { overflow-y: auto; flex: 1; }
.app .ibx-row { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-bottom: 1px solid var(--hub-line); color: var(--hub-ink); border-left: 3px solid transparent; }
.app .ibx-row:hover { background: var(--hub-row); }
.app .ibx-row.is-sel { background: #F0FBF6; border-left-color: var(--hub-mint); }
.app .ibx-row .ibx-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.app .ibx-row .ibx-top b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .ibx-row.unread .ibx-top b, .app .ibx-row.unread .ibx-subj { font-weight: 700; }
.app .ibx-row.unread .ibx-top b::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 99px; background: var(--hub-mint); margin-right: 6px; vertical-align: middle; }
.app .ibx-subj { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .ibx-prev { font-size: 12.5px; color: var(--hub-ink-4); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .ibx-meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 4px; }
.app .ibx-empty { min-height: 320px; display: flex; align-items: center; justify-content: center; }
.app .ibx-conv { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.app .ibx-back { display: none; font-weight: 600; color: var(--hub-mint-ink); }
.app .ibx-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; }
.app .ibx-title { font-size: 19px; font-weight: 700; margin: 6px 0 4px; line-height: 1.3; word-break: break-word; }
.app .ibx-status { display: flex; gap: 6px; flex-wrap: wrap; }
.app .ibx-link { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; border-color: #B8EBD5; background: #F7FDFA; }
.app .ibx-link > span { flex: 1 1 100%; }
.app .ibx-link .select { flex: 1 1 180px; width: auto; }
.app .ibx-msgs { display: flex; flex-direction: column; gap: 12px; }
.app .msg { background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 14px; padding: 14px 16px; max-width: 92%; }
.app .msg.out { align-self: flex-end; background: #F0FBF6; border-color: #CDEFE0; }
.app .msg-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.app .msg-body { line-height: 1.55; word-break: break-word; }
.app .msg-quote { margin-top: 10px; font-size: 12.5px; color: var(--hub-ink-4); }
.app .msg-quote summary { cursor: pointer; font-weight: 500; }
.app .msg-quote > div { margin-top: 8px; padding-left: 10px; border-left: 2px solid var(--hub-line); max-height: 320px; overflow: auto; }
.app .msg-files { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.app .msg-files a { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--hub-line); background: var(--hub-row); color: var(--hub-ink); }
.app .msg-files a::before { content: '📎'; font-size: 12px; }
.app .ibx-reply textarea { font-family: inherit; line-height: 1.5; }
.app .ibx-reply-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.app .ibx-how { flex: 0 1 220px; width: auto; padding: 7px 10px; font-size: 13px; }
.app .ibx-ai { position: sticky; top: 16px; min-width: 0; }

.app .prop { display: flex; flex-direction: column; gap: 12px; }
.app .prop-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.app .prop-sum { margin: 0; font-size: 13.5px; color: var(--hub-ink-2); line-height: 1.5; }
.app .prop-form { display: flex; flex-direction: column; gap: 4px; }
.app .prop-form .field { margin-bottom: 10px; }
.app .prop-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.app .prop-grid .field:first-child, .app .prop-grid .field:nth-child(2) { grid-column: span 2; }
.app .prop-files { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.app .prop-files label { display: flex; gap: 8px; align-items: center; }
.app .prop-hidden { background: var(--hub-amber-soft); border: 1px solid #F3D9A9; color: #78350F; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.app .prop-hidden b, .app .prop-flag b { display: block; margin-bottom: 4px; }
.app .prop-flag { background: #FEF6F6; border: 1px solid #F5C2C2; color: #7F1D1D; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.app .prop-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.app .prop-done { font-size: 13.5px; padding: 10px 12px; border-radius: 12px; background: var(--hub-row); }
.app .prop-done a { color: var(--hub-mint-ink); font-weight: 600; }

.app .appr-list { display: flex; flex-direction: column; gap: 16px; }
.app .appr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); overflow: hidden; }
.app .appr-orig { background: #FFFBF3; border-right: 1px solid #F3E3C4; padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.app .appr-from { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.app .appr-subj { font-weight: 600; }
.app .appr-text { font-size: 13.5px; line-height: 1.55; color: var(--hub-ink-2); max-height: 260px; overflow: auto; }
.app .appr-open { margin-top: auto; font-weight: 600; color: var(--hub-mint-ink); font-size: 13.5px; }
.app .appr-prop { padding: 18px 20px; }

.app .tgl-row { cursor: pointer; }
.app input.tgl { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 24px; border-radius: 999px; background: #C5CECB; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.app input.tgl::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.app input.tgl:checked { background: var(--hub-mint); }
.app input.tgl:checked::after { transform: translateX(16px); }
.app input.tgl:focus-visible { outline: 2px solid var(--hub-mint-ink); outline-offset: 2px; }
.app .route-row { display: grid; grid-template-columns: minmax(170px, 230px) 1fr; gap: 12px; align-items: center; }
.app .route-who { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app .route-who .muted-s { flex-basis: 100%; padding-left: 30px; margin-top: -4px; }
.app .model-opt { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--hub-line); border-radius: 12px; cursor: pointer; }
.app .model-opt > span { display: flex; flex-direction: column; }
.app .model-opt:has(input:checked) { border-color: var(--hub-mint); background: #F0FBF6; }
.app .spend { margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--hub-line); }
.app .test-out { border-top: 1px solid var(--hub-line); }
.app .test-task { margin-top: 8px; padding: 12px; border-radius: 12px; border: 1px solid #CDEFE0; background: #F7FDFA; font-size: 13.5px; margin-bottom: 10px; }
.app .test-reply { margin-top: 6px; padding: 12px; border-radius: 12px; background: var(--hub-row); font-size: 13.5px; line-height: 1.5; }

.app .conn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.app .conn-wide { grid-column: span 2; }
.app .steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.app .steps a, .app .conn-note a { color: var(--hub-mint-ink); font-weight: 600; }
.app .conn-note { margin-top: 4px; font-size: 13px; line-height: 1.55; color: var(--hub-ink-2); background: var(--hub-row); border-radius: 12px; padding: 12px 14px; }
.app .mb-row { display: flex; gap: 8px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--hub-line); flex-wrap: wrap; }
.app .mb-row .grow { flex: 1 1 220px; min-width: 0; }
.app .mb-more { position: relative; }
.app .mb-more > summary { list-style: none; }
.app .mb-more > summary::-webkit-details-marker { display: none; }
.app .mb-more > summary::after { display: none !important; }
.app .mb-menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; background: var(--hub-card); border: 1px solid var(--hub-line); border-radius: 12px; box-shadow: 0 8px 24px rgba(8,13,13,.12); padding: 12px; display: flex; flex-direction: column; gap: 8px; width: 300px; }

@media (max-width: 1180px) {
  .app .ibx.has-sel { grid-template-columns: minmax(260px, 320px) minmax(0, 1fr); }
  .app .ibx.has-sel .ibx-ai { grid-column: 2; position: static; }
}
@media (max-width: 860px) {
  .app .ibx, .app .ibx.has-sel, .app .ibx:not(.has-sel) { grid-template-columns: minmax(0, 1fr); }
  .app .ibx.has-sel .ibx-list { display: none; }
  .app .ibx.has-sel .ibx-ai { grid-column: auto; }
  .app .ibx-list { position: static; max-height: none; }
  .app .ibx-back { display: inline-block; }
  .app .msg { max-width: 100%; }
  .app .appr { grid-template-columns: minmax(0, 1fr); }
  .app .appr-orig { border-right: 0; border-bottom: 1px solid #F3E3C4; }
  .app .conn-grid { grid-template-columns: minmax(0, 1fr); }
  .app .conn-wide { grid-column: auto; }
  .app .route-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .app .ibx-how { flex: 1 1 100%; }
  .app .mb-menu { width: min(300px, calc(100vw - 48px)); }
}
.app input.tgl, .app input.tgl:checked { background-image: none; border: 0; }
.app input.tgl:checked::before { display: none; }
.app input.tgl { border-radius: 999px; }

/* ===== Inbox v2: two panes; Claude's panel sits beside the thread only when there is room ===== */
.app .ibx, .app .ibx.has-sel { grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); }
.app .ibx:not(.has-sel) { grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); }
.app .ibx-detail { min-width: 0; display: flex; flex-direction: column; gap: 14px; container-type: inline-size; }
.app .ibx-head { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; padding: 18px 20px; }
.app .ibx-head-main { min-width: 0; flex: 1 1 320px; }
.app .ibx-title { font-size: 20px; font-weight: 700; margin: 0 0 10px; line-height: 1.3; word-break: break-word; }
.app .ibx-people { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.app .ibx-body { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-areas: "msgs" "ai" "reply"; gap: 14px; align-items: start; }
.app .ibx-msgs { grid-area: msgs; }
.app .ibx-ai { grid-area: ai; position: static; }
.app .ibx-reply { grid-area: reply; }
@container (min-width: 980px) {
  .app .ibx-body { grid-template-columns: minmax(0, 1fr) 360px; grid-template-rows: auto 1fr; grid-template-areas: "msgs ai" "reply ai"; }
  .app .ibx-ai { position: sticky; top: 16px; }
}
@container (max-width: 979px) {
  /* Stacked: give the proposal's fields room to sit side by side. */
  .app .ibx-ai .prop-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .app .ibx-ai .prop-grid .field:first-child, .app .ibx-ai .prop-grid .field:nth-child(2) { grid-column: span 2; }
}
@container (max-width: 560px) {
  .app .ibx-ai .prop-grid { grid-template-columns: 1fr 1fr; }
}
.app .msg { max-width: none; padding: 16px 18px; }
.app .msg.out { margin-left: 32px; }
.app .msg-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.app .msg-who { flex: 1; min-width: 0; line-height: 1.35; }
.app .msg-who .muted-s { word-break: break-all; }
.app .msg-cc { display: block; }
.app .msg-date { white-space: nowrap; }
.app .msg-body { font-size: 14.5px; line-height: 1.6; color: var(--hub-ink); }
.app .msg-quote summary { font-size: 12.5px; color: var(--hub-ink-4); }
.app .ibx-to { display: flex; flex-direction: column; gap: 3px; font-size: 13px; margin-bottom: 10px; }
.app .ibx-to .muted-s { display: inline-block; min-width: 38px; }
.app .ibx-rewrite { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hub-line); }
.app .ibx-rewrite .input { flex: 1; padding: 7px 10px; font-size: 13px; }
.app .ibx-row .ibx-meta .chip:first-child { background: transparent; border: 1px solid var(--hub-line); }
@media (max-width: 860px) {
  .app .ibx, .app .ibx.has-sel, .app .ibx:not(.has-sel) { grid-template-columns: minmax(0, 1fr); }
  .app .msg.out { margin-left: 0; }
  .app .msg-who > .muted-s:not(.msg-cc) { display: block; }
  .app .msg-head { flex-wrap: wrap; }
}

/* ===== All tasks ===== */
.app .load-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.app .load-card { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px; border-radius: 14px; background: var(--hub-card); border: 1px solid var(--hub-line); color: var(--hub-ink); transition: border-color .15s, box-shadow .15s; }
.app .load-card:hover { border-color: var(--hub-line-2); }
.app .load-card.is-on { border-color: var(--hub-mint); box-shadow: 0 0 0 3px rgba(0, 214, 143, .15); }
.app .load-who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.app .load-who b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .load-nums { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: 13px; }
.app .load-nums b { font-size: 18px; font-weight: 700; }
.app .load-bar { height: 4px; border-radius: 99px; background: #EAEEEC; overflow: hidden; }
.app .load-bar > span { display: block; height: 100%; border-radius: 99px; }
.app .task-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--hub-line); }
.app .task-filters .seg { flex-wrap: wrap; }
.app .task-filters .select { width: auto; flex: 0 1 200px; }
.app .task-filters .input { width: auto; flex: 1 1 180px; }
.app .tt-row { display: grid; grid-template-columns: minmax(0, 1fr) 190px 140px 110px; gap: 14px; align-items: center; padding: 12px 20px; border-bottom: 1px solid var(--hub-line); color: var(--hub-ink); }
.app .tt-row:last-child { border-bottom: 0; }
.app a.tt-row:hover { background: var(--hub-row); }
.app .tt-headrow { font-size: 12px; font-weight: 600; color: var(--hub-ink-4); text-transform: uppercase; letter-spacing: .04em; padding-top: 10px; padding-bottom: 10px; background: var(--hub-row); }
.app .tt-task { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.app .tt-task b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .tt-task .muted-s { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.app .tt-who { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
@media (max-width: 860px) {
  .app .tt-row { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; }
  .app .tt-task { grid-column: 1 / -1; }
  .app .tt-task b { white-space: normal; }
  .app .tt-status { justify-self: start; }
  .app .tt-due { grid-column: 2; grid-row: 2; justify-self: end; }
  .app .tt-who { grid-column: 1; }
  .app .load-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.app .content.is-wide { max-width: 1680px; }

/* =====================================================================================
   GLASS THEME (Oct 2026) — frosted panels over a soft mint "liquid" light.
   Reading surfaces (inputs, emails, tables, task cards) stay solid white.
   Only .app / .auth-wrap: verify pages, PDFs and emails are untouched.
   ===================================================================================== */
.app, .auth-wrap {
  --g-surface: rgba(255, 255, 255, 0.70);
  --g-surface-strong: rgba(255, 255, 255, 0.86);
  --g-edge: rgba(255, 255, 255, 0.78);
  --g-hair: rgba(8, 13, 13, 0.06);
  --g-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(8, 13, 13, 0.035), 0 12px 32px -14px rgba(8, 40, 30, 0.16);
  --g-shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(8, 13, 13, 0.05), 0 18px 40px -16px rgba(8, 40, 30, 0.24);
  --g-radius: 18px;
}
body:has(.app), body:has(.auth-wrap) {
  background:
    radial-gradient(1100px 700px at 100% -10%, rgba(0, 214, 143, 0.20), transparent 60%),
    radial-gradient(900px 650px at -10% 110%, rgba(15, 118, 110, 0.16), transparent 60%),
    radial-gradient(700px 500px at 55% 45%, rgba(0, 214, 143, 0.06), transparent 70%),
    linear-gradient(180deg, #F1F6F4 0%, #EAF1EE 100%);
  background-attachment: fixed;
}
/* Slow-moving light, like water under glass. */
body:has(.app)::before, body:has(.auth-wrap)::before {
  content: ''; position: fixed; inset: -20%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40% 35% at 30% 30%, rgba(0, 214, 143, 0.13), transparent 70%),
    radial-gradient(35% 30% at 75% 70%, rgba(45, 212, 191, 0.10), transparent 70%);
  filter: blur(30px);
  animation: hub-drift 38s ease-in-out infinite alternate;
}
@keyframes hub-drift {
  0%   { transform: translate3d(-4%, -2%, 0) rotate(0deg) scale(1); }
  50%  { transform: translate3d(3%, 4%, 0) rotate(8deg) scale(1.08); }
  100% { transform: translate3d(5%, -3%, 0) rotate(-6deg) scale(1.03); }
}

/* Menu: smoky dark glass with a mint glow. */
.app .sidebar {
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(0, 214, 143, 0.16), transparent 70%),
    radial-gradient(300px 300px at 100% 100%, rgba(15, 118, 110, 0.18), transparent 70%),
    linear-gradient(180deg, rgba(10, 20, 18, 0.97) 0%, rgba(6, 11, 10, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 1px 0 0 rgba(0, 214, 143, 0.06), 12px 0 40px -20px rgba(0, 0, 0, 0.5);
}
.app .nav-scroll { display: flex; flex-direction: column; gap: 2px; }
.app .nav-link { border-radius: 11px; border: 1px solid transparent; transition: background .18s, color .18s, border-color .18s; }
.app .nav-link:hover { background: rgba(255, 255, 255, 0.06); }
.app .nav-link.is-active {
  background: linear-gradient(180deg, rgba(0, 214, 143, 0.20), rgba(0, 214, 143, 0.08));
  border-color: rgba(0, 214, 143, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10), 0 6px 18px -10px rgba(0, 214, 143, 0.55);
}
.app .nav-count { background: rgba(255, 255, 255, 0.10); color: #E6FFF6; border-radius: 99px; }
.app details.nav-sec { margin-top: 6px; }
.app details.nav-sec > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; border-radius: 9px; user-select: none; }
.app details.nav-sec > summary::-webkit-details-marker { display: none; }
.app details.nav-sec > summary::after { display: none !important; }
.app details.nav-sec > summary:hover { color: #E9EFED; }
.app details.nav-sec > summary span:first-child { flex: 1; }
.app .nav-chev { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; opacity: .7; }
.app details.nav-sec[open] > summary .nav-chev { transform: rotate(90deg); }
.app .nav-sec-count { font-size: 10.5px; font-weight: 700; color: #052016; background: var(--hub-mint); border-radius: 99px; padding: 1px 7px; letter-spacing: 0; }
.app details.nav-sec[open] > summary .nav-sec-count { display: none; }
.app .nav-sec-body { display: flex; flex-direction: column; gap: 2px; padding-bottom: 4px; }

/* Top bar: frosted. */
.app .topbar {
  background: rgba(255, 255, 255, 0.58); backdrop-filter: blur(18px) saturate(180%); -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 1px 0 rgba(8, 13, 13, 0.05);
}
.app .topbar-r { display: flex; align-items: center; gap: 10px; }
.app .bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 12px; color: var(--hub-ink-2);
  background: var(--g-surface); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); }
.app .bell svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.app .bell:hover, .app .bell.is-active { color: var(--hub-mint-ink); }
.app .bell-dot { position: absolute; top: -5px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #E11D48; color: #FFFFFF;
  font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #FFFFFF; }
.app details.who-menu { position: relative; }
.app details.who-menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 14px;
  background: var(--g-surface); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); }
.app details.who-menu > summary::-webkit-details-marker { display: none; }
.app details.who-menu > summary::after { display: none !important; }
.app .who-av { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 700; color: #052016;
  background: linear-gradient(160deg, #5CF0BE, #00C281); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.app .who-txt { display: flex; flex-direction: column; line-height: 1.25; font-size: 12px; color: var(--hub-ink-3); text-align: left; }
.app .who-txt b { color: var(--hub-ink); font-weight: 600; font-size: 13px; }
.app .who-pop { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 230px; padding: 6px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.82); backdrop-filter: blur(22px) saturate(180%); -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid var(--g-edge); box-shadow: var(--g-shadow-lift); display: flex; flex-direction: column; }
.app .who-pop a, .app .who-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 10px; color: var(--hub-ink); font: inherit; font-size: 13.5px; background: none; border: 0; cursor: pointer; }
.app .who-pop a:hover, .app .who-pop button:hover { background: rgba(0, 214, 143, 0.10); }
.app .who-pop form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--g-hair); }

/* Panels: frosted cards. */
.app .card, .app .hub-kpi, .app .load-card {
  background: var(--g-surface); border: 1px solid var(--g-edge); border-radius: var(--g-radius); box-shadow: var(--g-shadow);
}
.app .card-head { border-bottom-color: var(--g-hair); }
.app .hub-kpi, .app .load-card, .app a.card { transition: transform .2s ease, box-shadow .2s ease; }
.app a.hub-kpi:hover, .app .load-card:hover { transform: translateY(-2px); box-shadow: var(--g-shadow-lift); }
.app .hub-kpi.dark {
  background: radial-gradient(260px 160px at 100% 0%, rgba(0, 214, 143, 0.28), transparent 70%), linear-gradient(160deg, #0E1F1A, #070D0C);
  border-color: rgba(0, 214, 143, 0.22); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 34px -16px rgba(0, 60, 40, 0.6);
}
.app .hub-kpi.private, .app .card[style*="FFFBF3"] { background: rgba(255, 249, 238, 0.78) !important; border-color: rgba(243, 217, 169, 0.9) !important; }
.app .load-card.is-on { border-color: rgba(0, 214, 143, 0.55); box-shadow: 0 0 0 3px rgba(0, 214, 143, 0.14), var(--g-shadow-lift); }

/* Reading surfaces stay solid. */
.app .input, .app .select, .app textarea.input { background-color: #FFFFFF; border-color: rgba(8, 13, 13, 0.12); border-radius: 12px; }
.app .input:focus, .app .select:focus, .app textarea.input:focus { border-color: var(--hub-mint); box-shadow: 0 0 0 4px rgba(0, 214, 143, 0.16); }
.app .msg { background: var(--g-surface-strong); border-color: var(--g-edge); border-radius: 16px; box-shadow: var(--g-shadow); }
.app .msg.out { background: rgba(236, 251, 244, 0.9); border-color: rgba(205, 239, 224, 0.95); }
.app .kb-card { border-radius: 14px; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset, 0 0 0 1px rgba(8, 13, 13, 0.04), 0 6px 16px -10px rgba(8, 40, 30, 0.2); border-color: rgba(8, 13, 13, 0.05); }
.app .kb-card:hover { box-shadow: 0 0 0 1px rgba(0, 214, 143, 0.35), 0 12px 24px -12px rgba(8, 40, 30, 0.28); }
.app .kb-col { background: rgba(255, 255, 255, 0.42); border: 1px solid rgba(255, 255, 255, 0.65); border-radius: 18px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7); }
.app table.data tbody tr:hover, .app .tt-row:hover, .app .ibx-row:hover { background: rgba(255, 255, 255, 0.55); }
.app .tt-headrow { background: rgba(255, 255, 255, 0.45); }
.app .ibx-row.is-sel { background: linear-gradient(90deg, rgba(0, 214, 143, 0.12), rgba(0, 214, 143, 0.02)); }

/* Buttons: a soft glossy shine. */
.app .btn { border-radius: 12px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.app .btn-primary, .auth-wrap .btn-primary {
  background: linear-gradient(180deg, #3BE8AE 0%, #00D68F 52%, #00C483 100%); color: #04150F; border: 1px solid rgba(0, 150, 100, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -1px 0 rgba(0, 90, 60, 0.15), 0 8px 18px -8px rgba(0, 170, 115, 0.6);
}
.app .btn-primary:hover, .auth-wrap .btn-primary:hover { background: linear-gradient(180deg, #4CF0B8 0%, #00DD94 52%, #00C987 100%); transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 12px 22px -10px rgba(0, 170, 115, 0.7); }
.app .btn-primary:active { transform: translateY(0); }
.app .btn-secondary { background: rgba(255, 255, 255, 0.78); border: 1px solid rgba(8, 13, 13, 0.09); box-shadow: inset 0 1px 0 #FFFFFF, 0 4px 12px -8px rgba(8, 40, 30, 0.25); }
.app .btn-secondary:hover { background: #FFFFFF; border-color: rgba(8, 13, 13, 0.14); transform: translateY(-1px); }
.app .seg { background: rgba(8, 13, 13, 0.05); border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 12px; box-shadow: inset 0 1px 2px rgba(8, 13, 13, 0.05); }
.app .seg a.is-on { background: #FFFFFF; border-radius: 9px; box-shadow: 0 1px 0 #FFFFFF inset, 0 2px 8px -2px rgba(8, 40, 30, 0.18); }
.app .chip { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }
.app .people-tabs { margin: -6px 0 18px; }
.app .flash { border-radius: 14px; backdrop-filter: blur(10px); }

/* Comments as a conversation. */
.app .thread { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.app .cmt { display: flex; gap: 10px; align-items: flex-start; }
.app .cmt-main { flex: 1; min-width: 0; background: rgba(255, 255, 255, 0.85); border: 1px solid var(--g-edge); border-radius: 4px 16px 16px 16px; padding: 10px 14px; box-shadow: 0 4px 14px -10px rgba(8, 40, 30, 0.2); }
.app .cmt.mine .cmt-main { background: rgba(236, 251, 244, 0.92); border-color: rgba(205, 239, 224, 0.95); }
.app .cmt-meta { font-size: 12.5px; margin-bottom: 3px; }
.app .cmt-meta b { font-weight: 600; }
.app .cmt-body { line-height: 1.55; word-break: break-word; }
.app .rich { line-height: 1.55; word-break: break-word; }
.app .rich p { margin: 0 0 8px; }
.app .rich ul, .app .rich ol { margin: 0 0 8px; padding-left: 22px; }
.app .rich li { margin: 2px 0; }
.app .rich > :last-child { margin-bottom: 0; }
.app .rich a { color: inherit; text-decoration: underline; }
.app .cmt-main .ftiles { margin-top: 8px; }
.app .composer { border: 1px solid rgba(8, 13, 13, 0.1); border-radius: 16px; background: #FFFFFF; padding: 10px; transition: border-color .15s, box-shadow .15s; }
.app .composer:focus-within { border-color: var(--hub-mint); box-shadow: 0 0 0 4px rgba(0, 214, 143, 0.14); }
.app .composer.drop { border-style: dashed; border-color: var(--hub-mint); background: #F3FDF8; }
.app .composer textarea.input { border: 0; box-shadow: none !important; padding: 4px 6px; resize: vertical; min-height: 44px; }
.app .composer-bar { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.app .composer-attach { cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.app .composer-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 4px 2px; }
.app .cfile { display: inline-flex; align-items: center; gap: 6px; max-width: 240px; padding: 4px 4px 4px 6px; border-radius: 10px; background: var(--hub-row); border: 1px solid var(--hub-line); font-size: 12.5px; }
.app .cfile img { width: 32px; height: 32px; object-fit: cover; border-radius: 6px; }
.app .cfile span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .cfile button { border: 0; background: none; cursor: pointer; font-size: 16px; color: var(--hub-ink-4); padding: 0 4px; }
.app .act-log { margin-top: 14px; font-size: 12.5px; }
.app .act-log summary { cursor: pointer; color: var(--hub-ink-4); }

/* File tiles: screenshots as thumbnails, documents as cards. */
.app .ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.app .ftile { display: flex; flex-direction: column; gap: 4px; border-radius: 14px; overflow: hidden; color: var(--hub-ink); border: 1px solid rgba(8, 13, 13, 0.07); background: #FFFFFF;
  transition: transform .18s ease, box-shadow .18s ease; }
.app .ftile:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -14px rgba(8, 40, 30, 0.35); }
.app .ftile.img { aspect-ratio: 4 / 3; }
.app .ftile.img img { width: 100%; height: 100%; object-fit: contain; display: block; background: linear-gradient(135deg, #F1F5F3, #E6EEEA); }
.app .ftile.doc { padding: 12px; min-height: 96px; }
.app .ftile-ext { align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; padding: 3px 7px; border-radius: 7px; background: var(--hub-mint-soft); color: var(--hub-mint-ink); }
.app .ftile-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }

/* In-page viewer. */
.lb { position: fixed; inset: 0; z-index: 100; display: grid; grid-template-columns: 64px 1fr 64px; grid-template-rows: auto 1fr; background: rgba(4, 10, 8, 0.78);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%); animation: lb-in .18s ease; font-family: var(--hub-sans, system-ui); }
@keyframes lb-in { from { opacity: 0; } to { opacity: 1; } }
.lb-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 14px 18px; color: #E8F1EE; font-size: 14px; }
.lb-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-dl { color: #052016; background: #00D68F; padding: 7px 14px; border-radius: 10px; font-weight: 600; text-decoration: none; }
.lb-x, .lb-prev, .lb-next { background: rgba(255, 255, 255, 0.10); color: #FFFFFF; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 12px; cursor: pointer; font-size: 22px; line-height: 1; }
.lb-x { width: 38px; height: 38px; }
.lb-prev, .lb-next { align-self: center; justify-self: center; width: 44px; height: 64px; }
.lb-stage { display: flex; align-items: center; justify-content: center; padding: 8px 0 24px; min-width: 0; min-height: 0; }
.lb-stage img { max-width: 100%; max-height: calc(100vh - 110px); border-radius: 12px; box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.6); background: #FFFFFF; }
.lb-stage iframe { width: min(1000px, 100%); height: calc(100vh - 110px); border: 0; border-radius: 12px; background: #FFFFFF; }

/* Team members page. */
.app details.person-row { border-bottom: 1px solid var(--g-hair); }
.app details.person-row:last-child { border-bottom: 0; }
.app details.person-row > summary { display: flex; align-items: center; gap: 12px; padding: 12px 20px; cursor: pointer; list-style: none; }
.app details.person-row > summary::-webkit-details-marker { display: none; }
.app details.person-row > summary .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app details.person-row > summary b { font-weight: 600; }
.app .person-body { padding: 4px 20px 16px; }
.app .person-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 12px; }
.app .client-contact { margin-top: 6px; }

/* Sign-in pages share the light. */
.auth-wrap { background: transparent; }
.auth-wrap .auth-card, .auth-wrap .card { background: rgba(255, 255, 255, 0.74); backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.8); border-radius: 22px; box-shadow: 0 1px 0 #FFFFFF inset, 0 30px 60px -30px rgba(8, 40, 30, 0.35); }

/* Real frost (blur) on larger screens, where it is cheap; phones get the tint only. */
@media (min-width: 1024px) {
  .app .card, .app .hub-kpi, .app .load-card { backdrop-filter: blur(14px) saturate(160%); -webkit-backdrop-filter: blur(14px) saturate(160%); }
}
@media (max-width: 860px) {
  .app .sidebar { background: linear-gradient(180deg, #0B1714 0%, #060B0A 100%); }
  .app .who-txt { display: none; }
  .app details.who-menu > summary { padding: 4px; }
  .app .ftiles { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .lb { grid-template-columns: 0 1fr 0; }
  .lb-prev, .lb-next { position: fixed; bottom: 18px; width: 54px; height: 44px; }
  .lb-prev { left: 18px; } .lb-next { right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  body:has(.app)::before, body:has(.auth-wrap)::before { animation: none; }
  .app .btn, .app .hub-kpi, .app .load-card, .app .ftile { transition: none; }
}
@media (prefers-reduced-transparency: reduce) {
  .app .card, .app .hub-kpi, .app .load-card, .app .topbar, .app .who-pop, .app .msg, .app .kb-col { background: #FFFFFF !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  body:has(.app)::before { display: none; }
}

/* ===== Phase 3 · Asana ===== */
.app .chip.asana { background: #FDECEC; color: #B4233C; }
.app .asana-map { margin-top: 6px; border: 1px solid var(--g-hair); border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, 0.6); }
.app .asana-map-head, .app .asana-map-row { display: grid; grid-template-columns: 54px minmax(0, 1fr) minmax(180px, 280px); gap: 12px; align-items: center; padding: 10px 14px; }
.app .asana-map-head { font-size: 12px; font-weight: 600; color: var(--hub-ink-4); text-transform: uppercase; letter-spacing: .04em; background: rgba(255, 255, 255, 0.5); }
.app .asana-map-row { border-top: 1px solid var(--g-hair); cursor: pointer; }
.app .asana-pname { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .prop-mode { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 214, 143, 0.07); border: 1px solid rgba(0, 214, 143, 0.22); margin-bottom: 12px; font-size: 13.5px; }
.app .prop-mode label { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.app .asana-card .muted-s a { color: var(--hub-mint-ink); font-weight: 600; }
.app .kb-card .chip.asana { font-size: 10.5px; }
@media (max-width: 860px) {
  .app .asana-map-head { display: none; }
  .app .asana-map-row { grid-template-columns: 30px minmax(0, 1fr); }
  .app .asana-map-row .select { grid-column: 1 / -1; }
}

.app .wa-alerts { margin-top: 16px; padding: 14px 16px; border-radius: 14px; background: rgba(22, 163, 74, 0.06); border: 1px solid rgba(22, 163, 74, 0.18); }
.app .chip.wa { background: #DCFCE7; color: #166534; }

/* ===== Phase 6 · Ask Hub ===== */
.app .ask { display: grid; grid-template-columns: 260px minmax(0, 1fr) 280px; gap: 18px; align-items: start; }
.app .ask-chats { position: sticky; top: 86px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; overflow: hidden; }
.app .ask-chat-list { overflow-y: auto; }
.app .ask-chat-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px; border-bottom: 1px solid var(--g-hair); color: var(--hub-ink); }
.app .ask-chat-list a .t { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app .ask-chat-list a:hover { background: rgba(255, 255, 255, 0.5); }
.app .ask-chat-list a.is-sel { background: linear-gradient(90deg, rgba(0, 214, 143, 0.14), rgba(0, 214, 143, 0.02)); }
.app .ask-main { min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.app .ask-thread { display: flex; flex-direction: column; gap: 14px; }
.app .ask-hello { text-align: center; padding: 34px 24px; }
.app .ask-hello h2 { font-size: 22px; font-weight: 700; margin: 14px 0 6px; }
.app .ask-orb { width: 64px; height: 64px; margin: 0 auto; border-radius: 22px; background: radial-gradient(circle at 30% 30%, #8BF5D0, #00D68F 45%, #0F766E 100%);
  box-shadow: inset 0 2px 6px rgba(255, 255, 255, 0.6), 0 14px 34px -10px rgba(0, 180, 120, 0.6); animation: ask-breathe 5s ease-in-out infinite; }
@keyframes ask-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06) rotate(4deg); } }
.app .ask-suggest { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.app .ask-chip { font: inherit; font-size: 13px; text-align: left; padding: 9px 13px; border-radius: 14px; cursor: pointer; color: var(--hub-ink);
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); max-width: 100%; }
.app .ask-chip:hover { border-color: rgba(0, 214, 143, 0.5); }
.app .ask-q { align-self: flex-end; max-width: 80%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; color: #052016; line-height: 1.5;
  background: linear-gradient(160deg, #B9F7DF, #7DEBC3); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 10px 24px -14px rgba(0, 150, 100, 0.6); }
.app .ask-a { align-self: flex-start; max-width: 92%; padding: 16px 18px; border-radius: 4px 18px 18px 18px; background: var(--g-surface-strong); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow); }
.app .ask-a-body { line-height: 1.6; }
.app .ask-a-body p { margin: 0 0 10px; }
.app .ask-a-body p:last-child { margin-bottom: 0; }
.app .ask-a-body ul { margin: 6px 0 10px; padding-left: 20px; }
.app .ask-a-body li { margin: 3px 0; }
.app .ask-a-body a { color: var(--hub-mint-ink); font-weight: 600; }
.app .ask-src { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--hub-ink-4); }
.app .ask-plan { margin-top: 14px; border-radius: 16px; border: 1px solid rgba(0, 214, 143, 0.35); background: rgba(240, 251, 246, 0.85); overflow: hidden; }
.app .ask-plan.is-cancelled, .app .ask-plan.is-failed { border-color: var(--g-hair); background: rgba(255, 255, 255, 0.6); opacity: .8; }
.app .ask-step { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid rgba(0, 214, 143, 0.15); }
.app .ask-step .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .ask-step b { font-weight: 600; }
.app .ask-n { flex: none; width: 26px; height: 26px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; font-size: 12.5px; font-weight: 700;
  background: #FFFFFF; border: 1px solid rgba(0, 214, 143, 0.4); color: var(--hub-mint-ink); }
.app .ask-plan.is-done .ask-n { background: var(--hub-mint); color: #04150F; border-color: var(--hub-mint); }
.app .ask-plan-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 14px; }
.app .ask-plan-note { padding: 10px 14px; font-size: 13px; color: var(--hub-ink-3); }
.app .ask-compose { position: sticky; bottom: 12px; display: flex; gap: 10px; align-items: flex-end; padding: 10px; border-radius: 20px;
  background: rgba(255, 255, 255, 0.8); backdrop-filter: blur(18px) saturate(170%); -webkit-backdrop-filter: blur(18px) saturate(170%); border: 1px solid var(--g-edge); box-shadow: var(--g-shadow-lift); }
.app .ask-compose textarea { flex: 1; border: 0; box-shadow: none !important; resize: none; min-height: 44px; max-height: 220px; background: transparent; }
.app .ask-voice { display: flex; gap: 6px; align-items: center; flex: none; }
.app .ask-voice[hidden] { display: none; }
.app .ask-mic, .app .ask-lang { display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgba(8, 13, 13, 0.12); background: #FFFFFF; color: var(--hub-ink-2); cursor: pointer;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: none; transition: background .15s, color .15s, box-shadow .15s; }
.app .ask-mic { width: 44px; height: 44px; border-radius: 50%; }
.app .ask-lang { height: 30px; min-width: 34px; padding: 0 8px; border-radius: 10px; font-size: 12.5px; font-weight: 700; }
.app .ask-mic:hover, .app .ask-lang:hover { color: var(--hub-mint-ink); border-color: rgba(0, 214, 143, 0.5); }
.app .ask-mic:focus-visible, .app .ask-lang:focus-visible { outline: 2px solid var(--hub-mint); outline-offset: 2px; }
.app .ask-mic.is-on { background: var(--hub-mint); border-color: var(--hub-mint); color: #04150F; animation: ask-listen 1.4s ease-out infinite; }
@keyframes ask-listen { 0% { box-shadow: 0 0 0 0 rgba(0, 214, 143, 0.55); } 100% { box-shadow: 0 0 0 14px rgba(0, 214, 143, 0); } }
@media (prefers-reduced-motion: reduce) { .app .ask-mic.is-on { animation: none; box-shadow: 0 0 0 4px rgba(0, 214, 143, 0.3); } }
.app .ask-voice-msg { position: absolute; left: 14px; bottom: calc(100% + 8px); padding: 6px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  background: rgba(4, 21, 15, 0.86); color: #FFFFFF; box-shadow: var(--g-shadow-lift); pointer-events: none; max-width: calc(100% - 28px); }
.app .ask-voice-msg[hidden] { display: none; }
.app .ask-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 86px; }
@media (max-width: 1280px) { .app .ask { grid-template-columns: 240px minmax(0, 1fr); } .app .ask-side { display: none; } }
@media (max-width: 860px) { .app .ask { grid-template-columns: minmax(0, 1fr); } .app .ask-q, .app .ask-a { max-width: 100%; } .app .ask-compose { bottom: 8px; } }

/* Status labels and chips never wrap or get squeezed in tight rows. */
.app .badge, .app .chip { white-space: nowrap; flex-shrink: 0; }
.app .badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; line-height: 1.5; }

/* ===== Ops round · reply extras, money cards, alerts page, templates ===== */
.app .ibx-extras { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-top: 10px; font-size: 13px; }
.app .ibx-check { display: inline-flex; gap: 8px; align-items: center; color: var(--hub-ink-2); }
.app .ibx-check .select { width: auto; padding: 5px 30px 5px 10px; font-size: 13px; }
.app .ibx-follow { display: flex; align-items: center; gap: 4px; }
.app form[data-attach-zone].drop { outline: 2px dashed var(--hub-mint); outline-offset: 4px; border-radius: 14px; }
.app .money-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--g-hair); }
.app .money-row:last-child { border-bottom: 0; }
.app .money-row .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .money-row .t { font-weight: 500; }
.app .tpl-lines { width: 100%; font-family: var(--hub-mono, ui-monospace, Menlo, monospace); font-size: 13px; line-height: 1.6; }
.app .alert-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
@media (max-width: 860px) { .app .alert-grid { grid-template-columns: minmax(0, 1fr); } }

/* Ask Hub: what the team will read, shown before confirming */
.app .ask-team-sees { display: block; margin-top: 6px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.7); border: 1px dashed rgba(0, 214, 143, 0.4); font-size: 12.5px; color: var(--hub-ink-2); white-space: normal; }
.app .ask-team-sees em { font-style: normal; font-weight: 600; color: var(--hub-mint-ink); }

/* Sales: kickoff, billing plan on a project, leads on Today */
.app .seg label { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--hub-ink-2); cursor: pointer; }
.app .seg label input { position: absolute; opacity: 0; pointer-events: none; }
.app .seg label:has(input:checked) { background: var(--hub-card); color: var(--hub-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(8, 13, 13, .08); }
.app .seg label:has(input:focus-visible) { outline: 2px solid var(--hub-mint); outline-offset: 1px; }
.app form.kickoff { display: flex; flex-direction: column; gap: 16px; }
.app form.kickoff .seg { align-self: flex-start; }
.app .quote-plan { margin-bottom: 16px; background: #FFFBF3; border-color: #F3D9A9; }
.app .quote-plan > summary { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 20px; cursor: pointer; list-style: none; font-size: 14px; color: #78350F; }
.app .quote-plan > summary::-webkit-details-marker { display: none; }
.app .quote-plan[open] > summary { border-bottom: 1px solid #F3E3C4; }
.app .quote-plan .money-row { border-bottom-color: #F3E3C4; }
.app .lead-row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--g-hair); flex-wrap: wrap; }
.app .lead-row:last-child { border-bottom: 0; }
.app .lead-row .grow { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .lead-row .t { font-weight: 600; }
.app .lead-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.app .money-row form, .app .lead-actions form { margin: 0; }

/* Time log on a task */
.app .time-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--g-hair); }
.app .time-form input[name=note] { grid-column: 1 / -1; }
.app .time-form .btn { justify-self: start; }

/* Profit & sources */
.app .profit-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
@media (max-width: 860px) { .app .profit-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.app table.data td.num, .app table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.app .margin-good { color: var(--hub-mint-ink); font-weight: 600; }
.app .margin-bad { color: #B91C1C; font-weight: 600; }
.app .rate-form { display: inline-flex; gap: 6px; align-items: center; }
.app .rate-form .input { width: 96px; padding: 6px 8px; }

/* Board on a phone: the card being dragged follows the finger */
.kb-ghost { position: fixed; left: 0; top: 0; z-index: 9999; pointer-events: none; opacity: 0.94; box-shadow: 0 18px 40px -12px rgba(8, 40, 30, 0.45); border-radius: 14px; }
.app .kb-card { -webkit-touch-callout: none; }

/* Search: box in the top bar, and the results page */
.app .tb-search { position: relative; display: flex; align-items: center; }
.app .tb-search svg { position: absolute; left: 11px; color: var(--hub-ink-3); pointer-events: none; }
.app .tb-search input { width: 220px; height: 36px; padding: 0 30px 0 32px; border-radius: 12px; border: 1px solid rgba(8, 13, 13, 0.1); background: rgba(255, 255, 255, 0.8); font: 14px var(--hub-sans); color: var(--hub-ink); transition: width .2s; }
.app .tb-search input:focus { width: 300px; outline: 2px solid var(--hub-mint); outline-offset: 1px; border-color: transparent; }
.app .tb-search kbd { position: absolute; right: 9px; font: 11px var(--hub-sans); color: var(--hub-ink-3); border: 1px solid rgba(8, 13, 13, 0.12); border-radius: 5px; padding: 0 5px; pointer-events: none; }
.app .tb-search input:focus + kbd { display: none; }
@media (max-width: 860px) { .app .tb-search input { width: 36px; padding: 0 0 0 30px; color: transparent; } .app .tb-search input:focus { width: 180px; color: var(--hub-ink); padding-right: 8px; } .app .tb-search kbd { display: none; } }
.app .search-page { display: flex; gap: 10px; margin-bottom: 16px; }
.app .search-page .input { flex: 1; }

/* Agreement signing steps on the quotation page */
.app .ag-steps { display: grid; gap: 10px; margin-top: 14px; }
.app .ag-step { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--g-hair); background: rgba(255, 255, 255, 0.7); font-size: 14px; }
.app .ag-step.now { border-color: rgba(0, 214, 143, 0.55); background: #F0FBF6; }
.app .ag-step.ok b::before { content: "✓ "; color: var(--hub-mint-ink); }

/* Project page: tabs, overview, files, discussion */
.app .proj-tabs { margin: 0 0 18px; flex-wrap: wrap; }
.app .proj-tabs a { padding: 7px 16px; font-size: 13.5px; }
.app .chip.waiting { background: var(--hub-amber-soft); color: #92400E; }
.app .chip.client { background: #FFF1E6; color: #9A3412; }
.app .chip.health { font-size: 12px; padding: 3px 11px; }
.app .proj-brief p { margin: 0 0 10px; line-height: 1.6; }
.app .proj-brief ul { margin: 0 0 10px; padding-left: 20px; line-height: 1.6; }
.app .proj-brief > :last-child { margin-bottom: 0; }
.app .proj-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.app .proj-links .chip { font-weight: 500; padding: 4px 11px; }
.app .proj-meter { display: grid; grid-template-columns: 74px 1fr 40px; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.app .proj-meter b { text-align: right; font-size: 13px; }
.app .proj-reasons { margin: 10px 0 0; padding-left: 18px; font-size: 13px; color: #92400E; line-height: 1.5; }
.app .plan-list { display: grid; gap: 4px; margin-top: 8px; max-height: 260px; overflow: auto; font-size: 12.5px; }
.app .plan-list > div { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--hub-line); padding: 3px 0; }
.app .file-row .file-ext { flex: none; width: 42px; height: 42px; border-radius: 10px; background: #EEF3F1; color: var(--hub-ink-2); display: inline-flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; }
.app .file-row .t { color: var(--hub-ink); font-weight: 500; overflow-wrap: anywhere; }
.app .file-row .grow { display: flex; flex-direction: column; min-width: 0; }
.app .file-vis .select { width: auto; padding: 6px 30px 6px 10px; font-size: 12.5px; }
.app .cmt.decision .cmt-body { border-left: 3px solid var(--hub-mint); padding-left: 10px; }
@media (max-width: 720px) {
  .app .file-row { flex-wrap: wrap; }
  .app .file-vis { order: 3; }
}
.app .more-rows > summary { cursor: pointer; list-style: none; }
.app .more-rows > summary::-webkit-details-marker { display: none; }
.app .more-rows[open] > summary { display: none; }
.app .danger-zone { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--hub-line); }
.app .danger-zone h3 { font-size: 14px; margin: 0 0 4px; color: #991B1B; }
.app .danger-zone p { margin: 0 0 10px; }
.app .agency-banner { border-color: #F5C6CF; background: #FFF6F7; }
.app .agency-card .card-head { flex-wrap: wrap; gap: 8px; }
.app .agency-thread { max-height: 520px; overflow: auto; }
.app .agency-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.app .agency-attach { margin: 8px 0 4px; }
.app .agency-attach label { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 6px; }
.app .file-move { display: inline-flex; flex-direction: column; gap: 0; }
.app .file-move .btn { padding: 0 8px; line-height: 1.2; min-height: 0; font-size: 13px; }
.app .file-move .btn[disabled] { opacity: .25; }
.app .file-row .file-ext.is-link { background: #E7F7F0; color: var(--hub-mint-ink); font-size: 9.5px; }
.app .file-row .file-ext.link-figma { background: #F3E8FF; color: #6B21A8; }
.app .file-row .file-ext.link-drive { background: #E8F0FE; color: #1E40AF; }
.app .file-row .file-ext.link-canva { background: #E0F7FA; color: #00838F; }
.app .file-add .inline-form { flex-wrap: wrap; }
.app .cmt.from-agency .cmt-body { border-left: 3px solid #F5C6CF; padding-left: 10px; }
.app .agency-send { display: flex; align-items: center; gap: 8px; font-size: 13px; margin: 8px 0 0; color: var(--hub-ink-2); }
