/* JNH Masonry Pro Desk — chrome matched to the DMV Processing desk layout language.
   Palette and type only. JNH name, logo, and menu stay here. */
:root {
  --bg: #eef2f6;
  --bg-elev: #ffffff;
  --bg-card: #f9fbfd;
  --bg-input: #ffffff;
  --border: #d5dee8;
  --border-strong: #c5ccd8;
  --border-gold: #c5d0e0;
  --gold: #1f5fae;
  --gold-soft: #174a7a;
  --gold-dim: #124e78;
  --gold-light: #e8eef6;
  --navy: #0b1f3a;
  --navy-mid: #1f3b64;
  --text: #243447;
  --text-muted: #4b5563;
  --danger: #b3261e;
  --ok: #1e7b3a;
  --warn: #b45309;
  --accent: #1f5fae;
  --accent-hover: #174a7a;
  --accent-wash: #e8eef6;
  --slate: #475569;
  --slate-hover: #334155;
  --shadow: none;
  --radius: 8px;
  --font: system-ui, Arial, sans-serif;
  --header: #0b1f3a;
  --focus: #f59e0b;
}

* { box-sizing: border-box; }
html { color-scheme: light; font-size: 14px; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font); }
body { min-height: 100vh; font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: var(--text); }
a { color: #124e78; text-decoration-thickness: .08em; text-underline-offset: 2px; }
a:hover { color: #0b3555; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .tab:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
h1, h2, h3 { color: #1f3b64; line-height: 1.28; font-weight: 700; }
h2 { font-size: 17px; }
h3 { font-size: 15px; }
code { background: #f0f3f8; color: var(--text); padding: .08em .35em; border-radius: 8px; font-size: .92em; border: 1px solid var(--border); }
::placeholder { color: #64748b; opacity: 1; }

#app { max-width: 1300px; margin: 0 auto; padding: 14px 18px 2.5rem; }

.topbar {
  display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; justify-content: space-between;
  padding: 8px 16px; margin: -14px -18px 14px;
  position: sticky; top: 0; z-index: 20;
  background: var(--header);
  color: #fff;
  border-bottom: 0;
  box-shadow: none;
}
.brand { display: flex; gap: .55rem; align-items: center; flex-shrink: 0; max-width: min(440px, 46%); }
.brand-logo {
  width: clamp(132px, 18vw, 168px);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(255,255,255,.35);
  filter: none;
  flex-shrink: 0;
}
.brand-mark {
  width: 44px; height: 44px; border-radius: 8px;
  background: #f9fbfd;
  border: 1px solid var(--border); color: var(--accent);
  display: none; place-items: center; font-weight: 700; letter-spacing: .04em;
  box-shadow: none;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong {
  font-family: var(--font);
  font-size: 14px; font-weight: 700;
  color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0;
}
.brand-text span { font-size: 12px; color: #f5e6a8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.tabs { display: flex; flex-wrap: wrap; gap: 4px 8px; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }
.tab {
  background: transparent; border: 0; color: #fff;
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  font-size: 13px; line-height: 1.2; font-weight: 600;
}
.tab:hover { color: #fff; background: rgba(255,255,255,.12); }
.tab.active {
  color: #fff; background: rgba(255,255,255,.18);
  font-weight: 700;
  box-shadow: inset 0 -2px 0 #f5e6a8;
}

@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; align-items: flex-start; gap: .45rem; }
  .brand { max-width: 100%; }
  .brand-logo { width: 144px; }
  .topbar-right { width: 100%; justify-content: flex-start; }
  .tabs { justify-content: flex-start; }
}

.view { display: none; }
.view.active { display: block; }

.panel-head {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; align-items: flex-start;
  margin-bottom: 1rem;
}
.panel-head h1 { margin: 4px 0 0; font-size: 17px; letter-spacing: 0; font-weight: 700; color: #1f3b64; }
.hub-greeting { margin: 0 0 2px; color: #243447; font-size: 15px; line-height: 1.3; font-weight: 700; letter-spacing: 0; }
.muted { color: #4b5563; font-size: 12px; line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .75rem; }
.row-between h2 { margin: 0; }

.btn {
  background: #1f5fae; color: #fff; border: 0; border-radius: 5px;
  padding: 7px 12px; cursor: pointer; font-size: 14px; font-weight: 600; line-height: 1.3;
  text-decoration: none; display: inline-block;
}
.btn:hover { background: #174a7a; color: #fff; }
.btn.primary { background: #1f5fae; color: #fff; border: 0; font-weight: 600; }
.btn.primary:hover { background: #174a7a; color: #fff; }
.btn.ghost { background: #475569; color: #fff; border: 0; }
.btn.ghost:hover { background: #334155; color: #fff; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn.danger { background: #b3261e; color: #fff; border: 0; }
.btn.danger:hover { background: #8f1d17; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.topbar .btn, .topbar .btn.ghost, .topbar .btn.primary {
  background: transparent; color: #fff; border: 0; font-weight: 600;
  padding: 5px 10px; border-radius: 5px;
}
.topbar .btn:hover, .topbar .btn.ghost:hover, .topbar .btn.primary:hover {
  background: rgba(255,255,255,.12); color: #fff;
}

.card {
  background: #f9fbfd; border: 1px solid #d5dee8; border-radius: 8px;
  padding: 12px 14px; margin-bottom: 14px; box-shadow: none;
}
.card h2 { margin: 4px 0 10px; font-size: 17px; color: #1f3b64; font-weight: 700; }

.stack { display: flex; flex-direction: column; gap: .75rem; }
.stack.tight { gap: .5rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
@media (max-width: 720px) { .grid-2 { grid-template-columns: 1fr; } }
.span-2 { grid-column: 1 / -1; }

label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #4a5568; font-weight: 400; }
label.inline { flex-direction: row; align-items: center; gap: .5rem; }
label.check { flex-direction: row; align-items: center; gap: 6px; color: #1d2330; margin-top: .5rem; font-size: 14px; font-weight: 400; }

input, select, textarea {
  background: #fff; border: 1px solid #c5ccd8; border-radius: 4px;
  padding: 5px; color: var(--text); width: 100%;
  font-weight: 400; font-size: 14px; line-height: 1.4;
}
input:focus, select:focus, textarea:focus {
  outline: 3px solid #f59e0b; outline-offset: 1px; border-color: #c5ccd8; box-shadow: none;
}
select, select option, select optgroup {
  background-color: #ffffff;
  color: #243447;
}
select option:checked { background-color: #e8eef6; color: #0b1f3a; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.data-table th {
  text-align: left; color: #243447; font-weight: 600; font-size: 14px;
  text-transform: none; letter-spacing: 0; padding: 5px 6px;
  border-bottom: 1px solid #e5e8ee; background: #f0f3f8;
}
.data-table td { padding: .55rem .4rem; border-bottom: 1px solid #e5e8ee; vertical-align: middle; }
.data-table input, .data-table select { padding: .35rem .45rem; min-width: 0; }
.data-table tfoot td { border-top: 1px solid var(--border-gold); padding-top: .75rem; }

.totals-box {
  margin-top: 1rem; display: grid; gap: .4rem; max-width: 360px; margin-left: auto;
  padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 8px;
  background: #ffffff;
}
.totals-box > div { display: flex; justify-content: space-between; gap: 1rem; }
.totals-box .grand { margin-top: .35rem; padding-top: .45rem; border-top: 1px solid var(--border-gold); font-size: 1.2rem; color: var(--navy); font-weight: 800; }

.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.est-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem; cursor: pointer; transition: .15s;
}
.est-card:hover { border-color: var(--accent); }
.est-card h3 { margin: 0 0 .35rem; color: var(--navy); font-size: 1.12rem; }
.est-card .meta { font-size: .85rem; color: var(--text-muted); }
.est-card .price { margin-top: .75rem; font-size: 1.2rem; font-weight: 700; }
.est-card .card-actions { margin-top: .75rem; display: flex; gap: .4rem; }

.scope-block {
  border: 1px solid var(--border); border-radius: 8px; padding: .75rem; background: var(--bg-elev);
}
.scope-block .scope-head { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.scope-block .scope-head input { flex: 1; }
.scope-block textarea { min-height: 90px; resize: vertical; }

.disclosures ul { margin: 0; padding-left: 1.2rem; color: var(--text-muted); line-height: 1.5; }
.disclosures li { margin-bottom: .4rem; }

.empty-state {
  text-align: center; padding: 2rem 1rem; color: var(--text-muted);
  border: 1px dashed var(--border); border-radius: var(--radius);
}
.hidden { display: none !important; }

.dropzone {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 120px; border: 2px dashed var(--border); border-radius: 8px;
  background: var(--bg-elev); cursor: pointer; padding: 1rem; position: relative;
}
.dropzone:hover { border-color: var(--gold-dim); }
.dropzone input[type=file] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.receipt-capture { display: grid; gap: .75rem; }
.receipt-preview {
  border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #000;
  max-height: 220px; display: flex; align-items: center; justify-content: center;
}
.receipt-preview img, .receipt-preview embed { max-width: 100%; max-height: 220px; object-fit: contain; }

.ocr-banner {
  display: flex; flex-wrap: wrap; gap: .65rem; align-items: center;
  padding: .65rem .85rem; border-radius: 8px; border: 1px solid #d5dee8;
  background: #eef2f6; font-size: .9rem;
}
.badge {
  background: #e2e8f0; color: #243447; font-weight: 600; font-size: 12px;
  padding: 2px 8px; border-radius: 12px; letter-spacing: 0;
}

.receipt-list { display: grid; gap: .75rem; }
.receipt-item {
  display: grid; grid-template-columns: 72px 1fr auto; gap: .85rem; align-items: center;
  padding: .65rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev);
}
.receipt-item .thumb {
  width: 72px; height: 72px; border-radius: 8px; object-fit: cover; background: #000; border: 1px solid var(--border);
}
.receipt-item .thumb.placeholder {
  display: grid; place-items: center; color: var(--text-muted); font-size: .7rem; text-align: center;
}
.receipt-item h4 { margin: 0 0 .2rem; color: var(--gold-soft); }
.receipt-item .meta { font-size: .82rem; color: var(--text-muted); }

.app-footer {
  margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between;
  font-size: .95rem; color: var(--text-muted);
}

/* Print estimate */
.print-only { display: none; }
@media print {
  body * { visibility: hidden; }
  #print-root, #print-root * { visibility: visible; }
  #print-root {
    display: block !important; position: absolute; left: 0; top: 0; width: 100%;
    background: #fff; color: #111; padding: 0.5in;
  }
  .no-print { display: none !important; }
}

.print-doc { font-family: Georgia, "Times New Roman", serif; font-size: 11pt; line-height: 1.45; color: #111; }
.print-doc .ph {
  text-align: center; border-bottom: 2px solid #1a1408; padding-bottom: 10px; margin-bottom: 16px;
}
.print-doc .ph .co { font-size: 18pt; font-weight: 700; letter-spacing: .04em; }
.print-doc .ph .contact { font-size: 10pt; color: #333; }
.print-doc .title { text-align: center; font-size: 16pt; font-weight: 700; margin: 12px 0; letter-spacing: .12em; }
.print-doc .meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-bottom: 16px; }
.print-doc h3 { margin: 16px 0 6px; font-size: 12pt; border-bottom: 1px solid #ccc; padding-bottom: 3px; }
.print-doc ol.scope { padding-left: 1.2rem; }
.print-doc ol.scope li { margin-bottom: 8px; }
.print-doc .scope-body { white-space: pre-wrap; margin: 4px 0 0; }
.print-doc table.lines { width: 100%; border-collapse: collapse; margin: 8px 0; }
.print-doc table.lines th, .print-doc table.lines td { border: 1px solid #ccc; padding: 5px 6px; text-align: left; font-size: 10pt; }
.print-doc table.lines th { background: #f3f0e6; }
.print-doc .totals { text-align: right; margin-top: 10px; }
.print-doc .totals .big { font-size: 13pt; font-weight: 700; }
.print-doc .disc { font-size: 9pt; color: #444; margin-top: 18px; }
.print-doc .sign { margin-top: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.print-doc .sign .line { border-top: 1px solid #333; margin-top: 36px; padding-top: 4px; font-size: 9pt; }
.print-doc.payroll { font-family: var(--font); }

/* Jobs board */

/* Payments */
.pay-pill {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0;
  padding: 2px 8px; border-radius: 12px; border: 0;
  background: #e2e8f0; color: #243447;
}
.pay-pill.pay-unpaid { border-color: #b3261e; color: #7f1d1d; background: #fde8e7; }
.pay-pill.pay-deposit-paid { border-color: var(--accent); color: var(--accent); }
.pay-pill.pay-paid-in-full { border-color: #1e7b3a; color: var(--ok); }
.pay-pill.pay-partial { border-color: var(--warn); color: var(--warn); background: #fff7ed; }

/* Reviews */

/* Print extras */
.print-only .print-review {
  display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  margin-top: 1.25rem; padding: .75rem; border: 1px solid #ccc; border-radius: 8px;
}
.print-only .print-qr { width: 120px; height: 120px; }

/* ===== Project Hub ===== */
.hub-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.15rem;
}
.hub-kpi {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.hub-kpi::before {
  content: "";
  position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--accent);
}
.hub-kpi .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.hub-kpi .value { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin-top: .2rem; line-height: 1.1; }
.hub-kpi .sub { font-size: .88rem; color: var(--text-muted); margin-top: .25rem; }
.hub-kpi.clickable { cursor: pointer; transition: .15s; }
.hub-kpi.clickable:hover { border-color: var(--accent); }

.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .hub-grid{ grid-template-columns: 1fr; }
}
.hub-panel h2 { margin: 0; }

.hub-list { display: grid; gap: .45rem; margin-top: .65rem; }
.hub-list-row {
  display: flex; justify-content: space-between; gap: .75rem; align-items: center;
  padding: .5rem .6rem; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-elev);
  font-size: .85rem; cursor: pointer;
}
.hub-list-row:hover { border-color: var(--gold-dim); }
.hub-list-row .amt { color: var(--gold); font-weight: 700; white-space: nowrap; }

/* Appointments admin calendar */

/* Gate / login */
.gate {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(165deg,#eef2f7 0%,#f4f6f9 45%,#e8f0f4 100%);
}
.gate-card {
  width: min(420px, 100%); background: #f9fbfd; border: 1px solid #c5d0e0;
  border-radius: 8px; padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: 0 4px 20px rgba(31,59,100,.08); text-align: center;
}
.gate-logo { width: min(72vw, 160px); height: auto; aspect-ratio: 1; object-fit: contain; margin: 0 auto .75rem;
  border: 0; border-radius: 4px; filter: drop-shadow(0 2px 8px rgba(31,59,100,.12)); display: block; }
.gate-card h1 { margin: 0 0 4px; color: #1f3b64; font-size: clamp(20px,4vw,26px); font-weight: 700; letter-spacing: .01em; }
.gate-card .btn.primary {
  width: 100%; margin-top: 6px; padding: 10px 14px; font-size: 15px; font-weight: 600;
  background: linear-gradient(180deg,#2563a8,#1f3b64); border-radius: 6px;
}
.gate-card .btn.primary:hover { filter: brightness(1.06); background: linear-gradient(180deg,#2563a8,#1f3b64); }
.gate-card .stack { text-align: left; margin-top: 1rem; }
.gate-error { color: var(--danger); font-size: .88rem; margin: 0; }
.gate-foot { margin-top: 1rem; font-size: .78rem; }
.app-locked { display: none !important; }
.topbar-right { display: flex; flex-wrap: nowrap; gap: .4rem; align-items: center; justify-content: flex-end; flex: 1 1 auto; min-width: 0; }

.disc-legal-note { font-size: .82rem; margin: 0 0 .75rem; }

/* Insurance */

/* Client flow / Gantt */

/* Weather planning */

/* Rolodex */

/* Project Hub — cross-department pipeline monitoring */

/* Estimates fullscreen workspace */
body.estimates-fullscreen .topbar {
  display: none !important;
}
body.estimates-fullscreen #app {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 4.25rem 1rem 2.5rem;
  min-height: 100vh;
}
.estimates-toolbar {
  display: none;
  position: fixed;
  top: .65rem;
  left: .85rem;
  z-index: 41;
  max-width: calc(100% - 12rem);
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .35rem;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}
body.estimates-fullscreen .estimates-toolbar { display: flex; }
.estimates-toolbar .btn { white-space: nowrap; }
.estimates-toolbar .btn:disabled { cursor: not-allowed; }
body.estimates-fullscreen main {
  min-height: calc(100vh - 1.5rem);
}
body.estimates-fullscreen #view-estimates.active,
body.estimates-fullscreen #view-editor.active {
  min-height: calc(100vh - 2rem);
}
.btn-back-pro-desk {
  position: fixed;
  top: 0.65rem;
  right: 0.85rem;
  z-index: 40;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  padding: 0.5rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
  display: none;
}
body.estimates-fullscreen .btn-back-pro-desk {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.btn-back-pro-desk:hover {
  border-color: var(--accent-hover);
  color: #fff;
  background: var(--accent-hover);
}
@media (max-width: 720px) {
  .btn-back-pro-desk {
    top: 0.45rem;
    right: 0.5rem;
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
  }
  .estimates-toolbar {
    top: 3.05rem;
    left: .5rem;
    right: .5rem;
    max-width: none;
  }
  body.estimates-fullscreen #app {
    padding: 6.35rem 0.75rem 2rem; /* room for toolbar and fixed Back button */
  }
}

/* Labor pricing (settings + estimate editor) */
.labor-pricing-card .labor-pricing-grid {
  display: grid;
  grid-template-columns: minmax(10rem, 1fr) 1fr 1fr;
  gap: .85rem 1rem;
  align-items: end;
  margin-bottom: .65rem;
}
.labor-standard-pill {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  padding: .7rem .85rem;
  border: 1px solid #d5dee8;
  border-radius: 8px;
  background: #eef2f6;
}
.labor-standard-pill strong {
  font-size: 1.15rem;
  color: var(--gold);
}
.labor-pricing-card #est-labor-effective-note {
  margin: 0;
  font-size: .9rem;
}
.labor-pricing-card #est-labor-effective-note.is-override {
  color: var(--gold-soft);
}
body.estimates-fullscreen .labor-pricing-card {
  border-color: var(--border-gold);
}
@media (max-width: 820px) {
  .labor-pricing-card .labor-pricing-grid {
    grid-template-columns: 1fr;
  }
}

/* Chat Advisor — left sliding panel (JNH only) */
.hub-chat-card {
  border-color: #d5dee8;
  background: #ffffff;
  margin: 0 0 1rem;
}
.hub-chat-head { align-items: flex-start; gap: 1rem; }
.hub-chat-actions { flex-shrink: 0; }
.hub-chat-hint { margin: .65rem 0 0; font-size: .82rem; }

.advisor-backdrop {
  position: fixed; inset: 0; background: rgba(6,10,16,.45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
  z-index: 80;
}
.advisor-backdrop.open { opacity: 1; pointer-events: auto; }

.advisor-panel {
  position: fixed; top: 0; left: 0; height: 100vh; width: min(420px, 92vw);
  background: #ffffff; border-right: 1px solid #d5dee8;
  box-shadow: none; z-index: 90;
  transform: translateX(-105%); transition: transform .22s ease;
  display: flex; flex-direction: column; padding: .85rem .9rem 1rem;
}
.advisor-panel.open { transform: translateX(0); }
.advisor-header { display: flex; justify-content: space-between; align-items: flex-start; gap: .5rem; }
.advisor-header h2 { margin: 0; font-size: 1.2rem; color: var(--navy); }
.advisor-mode-badge {
  display: inline-block; margin-top: .3rem; font-size: .68rem; font-weight: 700;
  letter-spacing: .03em; padding: .12rem .45rem; border-radius: 5px;
  border: 1px solid var(--border);
}
.advisor-mode-badge.mock { color: var(--warn); border-color: var(--warn); background: #fff7ed; }
.advisor-mode-badge.live { color: var(--ok); border-color: #1e7b3a; }

.advisor-chips { display: flex; flex-wrap: wrap; gap: .35rem; margin: .65rem 0; }
.advisor-chip {
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 5px;
  padding: .25rem .65rem; cursor: pointer; font-size: .78rem;
}
.advisor-chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-wash); }

.advisor-messages {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: .55rem;
  padding: .35rem .15rem; min-height: 0;
}
.advisor-msg { display: flex; }
.advisor-msg.user { justify-content: flex-end; }
.advisor-bubble {
  max-width: 92%; padding: .55rem .7rem; border-radius: 8px; font-size: .88rem; line-height: 1.4;
  background: var(--bg-card); border: 1px solid var(--border);
}
.advisor-msg.user .advisor-bubble { background: var(--accent-wash); border-color: #c5d0e0; }
.advisor-meta { font-size: .68rem; color: var(--text-muted); margin-top: .15rem; width: 100%; text-align: right; }
.advisor-msg.assistant .advisor-meta { text-align: left; }

.advisor-suggest-box {
  border: 1px solid #c5d0e0; border-radius: 8px; padding: .55rem .65rem;
  background: #e8eef6; margin: .35rem 0;
}
.advisor-suggest-box .muted { margin: 0 0 .45rem; font-size: .8rem; }
.advisor-suggest-box.hidden { display: none; }

.advisor-compose { display: flex; gap: .4rem; align-items: flex-end; }
.advisor-compose textarea {
  flex: 1; resize: vertical; min-height: 48px; max-height: 140px;
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .55rem;
}
.advisor-status { margin: .4rem 0 0; font-size: .72rem; color: var(--text-muted); }
.advisor-status.ok { color: var(--ok); }
.advisor-status.mock { color: var(--warn); }
.advisor-status.busy { color: var(--gold); }

body.advisor-open { overflow: hidden; }
@media (max-width: 720px) {
  .hub-chat-head { flex-direction: column; }
  .advisor-panel { width: min(100vw, 440px); }
}
