/* ===========================================================================
   ledger-core.css — the ledger.chat application's design system.
   ---------------------------------------------------------------------------
   EXTRACTED VERBATIM from chat-ui/index.html, the app's single-file UI, so the
   marketing site and the product are built from one set of tokens and one set
   of component primitives.

   Source of truth : /Users/johnpellew/agentic-accounting-v3/chat-ui/index.html
   Re-extract with  : tools/extract-core-css.py
   Do not hand-edit: edit the app and re-extract, or the two surfaces drift.
   =========================================================================== */

:root {
    --bg: #070708;
    --topbar-bg: #0a0b0c;
    --surface: #0f1114;
    --surface2: #101215;
    --surface3: #101216;
    --surface4: #14161a;
    --surface5: #16181c;
    --border: #1d1f23;
    --border2: #1d2024;
    --border3: #23262b;
    --border4: #25282e;
    --border5: #2a2d33;
    --text: #ececed;
    --text2: #cfd2d6;
    --text3: #dfe1e4;
    --text4: #d7d9dd;
    --text-dim: #9ea3aa;
    --text-dim2: #80858d;
    --text-dim3: #7e828a;
    --text-dim4: #6b6f76;
    --accent: #5eead4;
    --accent-dark: #06231e;
    --accent-tint: #0d1614;
    --accent-tint2: #0e1b18;
    --accent-border: #1c3a35;
    --accent-border2: #15302b;
    --green: #6ee7a8;
    --amber: #f0b86e;
    --blue: #7fb4ff;
    --red: #f44747;
    --radius-sm: 5px;
    --radius: 8px;
    --radius-lg: 11px;
    --radius-xl: 13px;
    --radius-2xl: 15px;
    --radius-3xl: 16px;
    --font: 'Geist', system-ui, -apple-system, sans-serif;
    --mono: 'Geist Mono', 'SF Mono', 'JetBrains Mono', monospace;
  }

* { margin:0; padding:0; box-sizing:border-box; }

html, body { height:100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
  }

::selection { background: var(--accent); color: #06201c; }

.sb::-webkit-scrollbar { width:9px; height:9px; }

.sb::-webkit-scrollbar-thumb { background:#2c2e33; border-radius:8px; }

.sb::-webkit-scrollbar-thumb:hover { background:#3a3d44; }

.sb::-webkit-scrollbar-track { background:transparent; }

.topbar {
    height:62px; flex:none; border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:18px; padding:0 22px;
    background:var(--topbar-bg);
  }

.topbar-brand { display:flex; align-items:baseline; gap:8px; }

.topbar-brand .logo { font-size:17px; font-weight:700; letter-spacing:-.02em; color:#f4f4f5; }

.topbar-brand .logo-accent { color:var(--accent); }

.topbar-brand .tagline { font-size:12px; color:var(--text-dim4); }

.topbar-spacer { flex:1; }

.pane-header {
    flex:none; padding:15px 20px; border-bottom:1px solid var(--border);
    display:flex; align-items:center; gap:11px;
  }

.pane-avatar {
    width:30px; height:30px; border-radius:9px;
    background:linear-gradient(135deg,var(--accent),#2dd4bf);
    display:flex; align-items:center; justify-content:center; font-size:15px;
  }

.pane-header-title { font-size:13.5px; font-weight:600; }

.pane-header-sub { font-size:11px; color:var(--text-dim3); }

.chat-input-bar {
    flex:none; padding:14px 18px 18px; border-top:1px solid var(--border);
  }

.chat-input-row { display:flex; gap:10px; align-items:flex-end; }

.chat-input {
    flex:1; background:var(--surface3); border:1px solid var(--border5);
    border-radius:var(--radius-lg); padding:12px 14px;
    color:var(--text); font-family:inherit; font-size:13.5px; outline:none;
    transition:border-color .15s;
  }

.chat-input:focus { border-color:var(--accent); }

.chat-input::placeholder { color:var(--text-dim4); }

.chat-input:disabled { opacity:.4; }

.chat-send-btn {
    background:var(--accent); color:var(--accent-dark); border:none;
    border-radius:var(--radius-lg); padding:12px 18px;
    font-size:13.5px; font-weight:600; cursor:pointer; font-family:inherit;
    transition:all .15s; white-space:nowrap;
  }

.chat-send-btn:hover { filter:brightness(1.1); }

.chat-send-btn:disabled { opacity:.4; cursor:not-allowed; }

.chat-attach-btn {
    flex:none; width:44px; height:44px; padding:0; line-height:1;
    background:var(--surface3); color:var(--text-dim3);
    border:1px solid var(--border5); border-radius:var(--radius-lg);
    font-size:17px; cursor:pointer; font-family:inherit; transition:all .15s;
  }

.chat-attach-btn:hover:not(:disabled) { border-color:var(--accent); color:var(--text); }

.chat-attach-btn:disabled { opacity:.4; cursor:not-allowed; }

.msg { display:flex; flex-direction:column; max-width:90%; animation:rise .25s ease; }

.msg-bubble strong { color:#fff; }

.msg-bubble code {
    font-family:var(--mono); font-size:12px;
    background:rgba(255,255,255,.06); padding:2px 6px; border-radius:3px;
  }

.msg-bubble pre {
    background:rgba(0,0,0,.3); border-radius:6px; padding:12px;
    overflow-x:auto; margin:8px 0; font-family:var(--mono);
    font-size:12px; line-height:1.5;
  }

.skill-badge {
    display:inline-block; background:var(--accent-tint2); border:1px solid var(--accent-border);
    color:var(--accent); border-radius:6px; padding:3px 9px; font-size:11px; font-weight:700;
    font-family:var(--mono); margin-right:8px; text-transform:uppercase; letter-spacing:.04em;
  }

.orch-skill-label { font-size:11px; color:var(--text-dim3); }

.legs-table { width:100%; border-collapse:collapse; font-size:11.5px; }

.legs-table th {
    text-align:left; color:var(--text-dim4); font-weight:600; padding:4px 6px;
    border-bottom:1px solid var(--border4); font-size:10px;
    text-transform:uppercase; letter-spacing:.05em;
  }

.legs-table th.num, .legs-table td.num { text-align:right; }

.legs-table td { padding:5px 6px; border-bottom:1px solid var(--border2); vertical-align:top; }

.leg-code { font-family:var(--mono); color:var(--blue); font-size:11px; white-space:nowrap; }

.leg-name { display:block; font-weight:600; }

.leg-desc { display:block; font-size:10.5px; color:var(--text-dim3); }

.leg-class { color:var(--text-dim3); font-size:11px; }

.leg-amt { font-family:var(--mono); font-size:11px; white-space:nowrap; }

.orch-total {
    display:flex; align-items:center; justify-content:space-between;
    border-top:2px solid var(--border4); padding-top:9px; margin-top:2px;
  }

.orch-btn {
    flex:1; border:none; border-radius:8px; padding:9px 0; font-size:12.5px; font-weight:700;
    cursor:pointer; font-family:inherit; transition:all .15s;
  }

.section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:11px; }

.section-title { font-size:13px; font-weight:600; color:var(--text2); }

.section-sub { font-size:11px; color:var(--text-dim4); }

.pending-item {
    display:flex; flex-direction:column; gap:2px; text-align:left;
    background:var(--surface2); border:1px solid var(--border4); border-radius:8px;
    padding:8px 10px; cursor:pointer; color:var(--text); font-family:inherit;
    transition:all .15s;
  }

.pending-item:hover { border-color:#34a795; }

.report-select {
    width:100%; background:var(--surface2); color:var(--text);
    border:1px solid var(--border4); border-radius:8px;
    padding:8px 10px; font-family:inherit; font-size:12.5px; outline:none;
  }

.report-date {
    flex:1; min-width:0; background:var(--surface2); color:var(--text);
    border:1px solid var(--border4); border-radius:8px; padding:7px 8px;
    font-family:inherit; font-size:11.5px; outline:none;
  }

.report-fetch-btn {
    border:none; border-radius:8px; padding:9px 0; font-size:12.5px; font-weight:700;
    cursor:pointer; font-family:inherit; background:var(--accent); color:var(--accent-dark);
    transition:filter .15s;
  }

.report-fetch-btn:hover { filter:brightness(1.1); }

.cc-ok { color:var(--green); font-weight:600; }

.cc-note { color:var(--text-dim3); }

.cc-bad { color:var(--red); font-weight:600; margin-bottom:4px; }

.cc-diff { font-family:var(--mono); font-size:10.5px; color:var(--red); }

.topbar-pill {
    display:flex; align-items:center; gap:7px; font-size:12px;
    color:var(--text2); background:#1c2027; border:1px solid var(--border5);
    border-radius:9px; padding:7px 11px; white-space:nowrap;
    cursor:pointer; font-family:inherit;
    transition:background .15s, color .15s, border-color .15s;
  }

.topbar-pill:hover {
    background:#252a33; color:var(--accent); border-color:var(--accent-border);
  }

.modal-overlay {
    display:none; position:fixed; inset:0;
    background:rgba(4,5,6,.72); backdrop-filter:blur(4px);
    z-index:100; align-items:center; justify-content:center; padding:40px;
  }

.modal-panel {
    background:#0e0f12; border:1px solid var(--border5);
    border-radius:var(--radius-3xl);
    box-shadow:0 40px 90px -30px rgba(0,0,0,.9);
    animation:fadeIn .2s ease; max-height:88vh; overflow-y:auto;
  }

.modal-header {
    position:sticky; top:0; background:#0e0f12;
    border-bottom:1px solid #1f2227; padding:18px 22px;
    display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
    z-index:2;
  }

.modal-close {
    background:var(--surface5); border:1px solid var(--border5);
    color:var(--text2); width:30px; height:30px; border-radius:8px;
    cursor:pointer; font-size:15px; flex:none; display:flex;
    align-items:center; justify-content:center;
  }

.modal-close:hover { background:#1f2228; }

.modal-body { padding:8px 22px 20px; }

.modal-btn-row { display:flex; gap:9px; margin-top:14px; }

.modal-btn-primary {
    flex:1; background:var(--accent); color:var(--accent-dark);
    border:none; border-radius:9px; padding:10px; font-size:12.5px;
    font-weight:600; cursor:pointer; font-family:inherit;
  }

.modal-btn-primary:hover { filter:brightness(1.1); }

.modal-btn-secondary {
    flex:1; background:var(--surface5); color:var(--text3);
    border:1px solid var(--border5); border-radius:9px; padding:10px;
    font-size:12.5px; font-weight:500; cursor:pointer; font-family:inherit;
  }

.modal-btn-secondary:hover { background:#1f2228; }

.saved-msg {
    text-align:center; color:var(--green); font-size:13px;
    margin-top:10px; display:none;
  }

.status-dot {
    width:7px; height:7px; border-radius:50%;
    background:var(--green); box-shadow:0 0 6px rgba(110,231,168,.4);
    flex:none;
  }

.admin-input, .admin-select {
    width:100%; background:var(--bg); border:1px solid var(--border4);
    border-radius:var(--radius); padding:8px 10px; color:var(--text);
    font-size:12.5px; font-family:inherit; outline:none;
    transition:border-color .15s;
  }

.admin-input:focus, .admin-select:focus { border-color:var(--accent); }

.admin-form { display:flex; flex-direction:column; gap:11px; }

.admin-form label {
    font-size:11px; color:var(--text-dim3); display:block;
    margin-bottom:4px; text-transform:uppercase; letter-spacing:.5px;
  }

.admin-row { display:flex; gap:9px; align-items:flex-end; }

.admin-row > div { flex:1; min-width:0; }
