/* "Bay Street" look (design proposal, 2026-11-29, round 2).
   Loaded after app.css and only overrides it, so turning this file off brings
   the previous look back exactly. Firm navy with muted champagne gold, a
   restrained set of jewel-tone accents, Cormorant Garamond headings, and a
   proper phone layout. */

@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-display: swap; src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 700; font-display: swap; src: url("../fonts/cormorant-garamond-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); }

:root {
  --ink: #0d264c;          /* the firm's logo navy is the main colour */
  --ink-deep: #0a1e3d;
  --navy: #0d264c;
  --navy-2: #1d3a66;
  --gold: #a7834b;
  --gold-light: #cfae74;
  --gold-soft: #f6efe2;
  --champagne: #e9dcc3;
  --text: #121826;
  --muted: #5b6170;
  --line: #e6e1d6;
  --line-strong: #d6cfbf;
  --page: #f5f3ee;
  --bg-soft: #f2efe8;
  --accent-soft: #eceff4;
  --ok: #2b6a4c; --ok-soft: #eaf3ee;
  --warn: #85601c; --warn-soft: #f8f0df;
  --danger: #8e2a2a; --danger-soft: #f8eaea;
  /* Jewel tones, muted: used for accents, icons, charts and badges, never for body text */
  --sapphire: #2f5fa8; --sapphire-soft: #e9eff8;
  --emerald: #2e7d5b;  --emerald-soft: #e7f3ec;
  --burgundy: #8c2f45; --burgundy-soft: #f7e9ed;
  --teal: #1f7a7a;     --teal-soft: #e3f1f0;
  --violet: #5b4f96;   --violet-soft: #eeecf7;
  --coral: var(--burgundy); --coral-soft: var(--burgundy-soft);
  --sky: var(--sapphire); --sky-soft: var(--sapphire-soft);
  --s1: var(--navy); --s2: var(--gold); --s3: var(--teal);
  --radius: 6px;
  --shadow: 0 1px 0 rgba(11, 21, 38, .03);
  --sidebar-bg: var(--ink);
  --serif: "Cormorant Garamond", "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
}
/* Each part of the app keeps a muted accent of its own */
.app.section-core, .app.section-accounts { --section: var(--gold); }
.app.section-matters { --section: var(--sapphire); }
.app.section-contacts, .app.section-corporate { --section: var(--teal); }
.app.section-timekeeping { --section: var(--emerald); }
.app.section-billing, .app.section-fees { --section: var(--gold); }
.app.section-trust { --section: var(--burgundy); }
.app.section-reports, .app.section-tasks { --section: var(--violet); }

body { background: var(--page); background-image: none; color: var(--text); text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01"; -moz-osx-font-smoothing: grayscale; }
a { color: var(--sapphire); }
h1, h2 { font-family: var(--serif); color: var(--ink); font-weight: 600; letter-spacing: 0; font-variant-numeric: lining-nums; }
h1 { font-size: 2.45rem; line-height: 1.08; }
h2 { font-size: 1.7rem; }
h3 { color: var(--ink); }

/* ---------- Sidebar ---------- */
.app { background: linear-gradient(to right, var(--ink) 0, var(--ink) var(--nav-w, 248px), transparent var(--nav-w, 248px)); }
.sidebar { background: var(--ink); box-shadow: none; border-right: 1px solid #0a1e3d; }
.sidebar .brand { border-bottom: 1px solid rgba(207, 174, 116, .22); padding-bottom: 1rem; }
.sidebar .brand-logo { border-radius: 4px; box-shadow: none; padding: .5rem .65rem; }
.sidebar .brand small { color: var(--gold-light); letter-spacing: .22em; font-size: .62rem; font-weight: 500; }
.sidebar nav a, .sidebar .collapse-btn { color: #c9d2e3; font-size: .92rem; font-weight: 400; border-radius: 4px; padding: .5rem .8rem; }
/* Icons keep a soft jewel tint per section */
.nav-core, .nav-billing, .nav-fees, .nav-help { --nav-tint: #e2c58f; }
.nav-calendar, .nav-matters { --nav-tint: #9dbcef; }
.nav-contacts, .nav-corporate { --nav-tint: #86cfc8; }
.nav-timekeeping { --nav-tint: #93d4ae; }
.nav-trust { --nav-tint: #e8a7b8; }
.nav-reports, .nav-tasks { --nav-tint: #bbb2ea; }
.nav-settings { --nav-tint: #b5bfd1; }
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active svg { color: var(--nav-tint) !important; }
.sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 2px 0 0 var(--gold-light); font-weight: 500; }
.nav-count { background: var(--gold); color: var(--ink); }
.sidebar .bottom { border-top-color: rgba(255,255,255,.07); }
.sidebar .me { background: transparent; border: 1px solid rgba(255,255,255,.08); border-radius: 6px; }
.sidebar .avatar { background: var(--champagne); color: var(--ink); }
html.nav-collapsed .sidebar .brand-mark { border-radius: 4px; font-family: var(--serif); }

/* ---------- Top bar ---------- */
.topbar { background: rgba(255,255,255,.96); box-shadow: none; border-bottom: 1px solid var(--line); }
.topbar form.search input { background-color: var(--bg-soft); border-radius: 999px; }
.help-btn { border-color: var(--line); color: var(--ink); font-family: var(--serif); font-size: 1.05rem; }
.timer { border-radius: 999px; }

/* ---------- Buttons ---------- */
.btn, button { border-radius: 4px; border-color: var(--line-strong); }
.btn-primary, button.btn-primary { background: var(--ink); border-color: var(--ink); letter-spacing: .01em; }
.btn-primary:hover, button.btn-primary:hover { background: var(--navy); }
.btn-gold, button.btn-gold { background: var(--gold); border-color: var(--gold); color: #fff; box-shadow: none; font-weight: 500; letter-spacing: .01em; }
.btn-gold:hover, button.btn-gold:hover { background: #8f6f3d; }
.btn-ghost { background: transparent; border-color: rgba(233, 220, 195, .45); color: var(--champagne); }
.btn-ghost:hover { background: rgba(233, 220, 195, .1); }

/* ---------- Page heads, tabs ---------- */
.page-head > div:first-child { padding-left: 0; }
.page-head > div:first-child::before { display: none; }
.page-head h1 { position: relative; padding-bottom: .55rem; margin-bottom: .45rem; }
.page-head h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.6rem; height: 2px; background: var(--section, var(--gold)); }
.tabs { border-bottom-color: var(--line); gap: 1.4rem; }
.tabs a { padding: .55rem 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 500; }
.tabs a.active { color: var(--ink); border-bottom-color: var(--gold); font-weight: 600; }
.tabs .count { background: transparent; color: var(--gold); padding: 0; font-weight: 600; }

/* ---------- Surfaces ---------- */
.card, .panel, .table-wrap, .today-card, .tile, .task-list, ul.link-list, .help-toc { border-radius: 6px; box-shadow: var(--shadow); border-color: var(--line); }
.card { border-top: 1px solid var(--line); position: relative; }
.card h3, .tile-label, th, .ring-facts dt { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; color: var(--muted); }
.card .figure { font-size: 1.55rem; font-weight: 500; letter-spacing: -.01em; color: var(--ink); font-variant-numeric: lining-nums tabular-nums; }
.card .figure .cur, .tile-money i { font-family: "Inter", sans-serif; font-size: .68rem; letter-spacing: .12em; color: var(--gold); font-weight: 600; }
.plain-words, .overview-link { border-left: 2px solid var(--gold); }

/* ---------- Tables ---------- */
th { background: transparent; border-bottom: 1px solid var(--line-strong); padding-top: .75rem; }
th, td { padding-left: .85rem; padding-right: .85rem; }
td { border-bottom-color: #efebe3; }
tbody tr:hover { background: #faf8f3; }
tfoot td { background: #faf8f3; border-top: 1px solid var(--line-strong); }

/* ---------- Badges: squared, quiet ---------- */
.badge { border-radius: 3px; font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; font-weight: 600; padding: .1rem .45rem; }
.badge-cad { background: var(--sapphire-soft); border-color: #cbd9ef; color: var(--navy); }
.badge-usd { background: var(--gold-soft); border-color: #e8d7b6; color: #7a5a26; }
.chip { border-radius: 3px; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; }

/* ---------- Dashboard ---------- */
.hero { border-radius: 6px; background: var(--ink);
  background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.025) 0 1px, transparent 1px 22px),
    radial-gradient(600px 260px at 88% 0%, rgba(47, 95, 168, .45), transparent 70%),
    linear-gradient(120deg, #0a1e3d 0%, #0d264c 55%, #173a70 100%);
  box-shadow: none; border-bottom: 2px solid var(--gold); padding: 1.8rem 2rem; }
.hero h1 { font-weight: 600; font-size: 2.8rem; }
.hero-date { color: var(--gold-light); letter-spacing: .2em; font-weight: 500; font-size: .72rem; }
.hero-chip { border-radius: 3px; background: transparent; border-color: rgba(233, 220, 195, .3); color: #dfe4ec; font-size: .84rem; }
.hero-chip { white-space: nowrap; }
.hero-chip b { color: var(--gold-light); font-weight: 600; }
.hero-chip.warn b { color: #f0b49f; }
.hero-art .ha1, .hero-art .ha2 { fill: none; }
.hero-art .ha3 { stroke: rgba(207, 174, 116, .8); stroke-width: 1.5; }
.hero-art .ha4 { stroke: rgba(207, 174, 116, .25); stroke-width: 1; stroke-dasharray: none; }
.hero-art .ha5 circle { fill: var(--gold-light); }
.today-card::before { height: 0; }
.today-count { border-radius: 4px; background: var(--today-soft); color: var(--today-ink); font-weight: 600; }
.today-card::before { height: 2px !important; background: var(--today-ink) !important; }
.tasks-card { --today-ink: var(--violet); --today-soft: var(--violet-soft); }
.cal-card { --today-ink: var(--sapphire); --today-soft: var(--sapphire-soft); }
.round-add { background: transparent; color: var(--gold); border: 1px solid var(--line-strong); font-weight: 400; }
.round-add:hover { transform: none; background: var(--gold-soft); }
.today-label { color: var(--ink); }
.ev-time { color: var(--navy-2); }
.key-dates > span, .key-dates a b { color: var(--gold); }
.tiles { gap: 0; background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.tile { border: 0; border-right: 1px solid var(--line); border-radius: 0; box-shadow: none; padding: 1.1rem 1.15rem 2.1rem; }
.tile:last-child { border-right: 0; }
.tile::after { height: 2px; background: var(--tile-ink); opacity: .9; left: 1.15rem; right: auto; width: 1.6rem; bottom: auto; top: 0; }
.tile:hover { transform: none; box-shadow: none; background: #fbf9f5; }
.tile-draft { --tile-ink: var(--sapphire); --tile-soft: var(--sapphire-soft); } .tile-unpaid { --tile-ink: var(--gold); --tile-soft: var(--gold-soft); } .tile-overdue { --tile-ink: var(--burgundy); --tile-soft: var(--burgundy-soft); }
.tile-icon { display: none; }
.tile-figure { font-weight: 400; font-size: 2.3rem; color: var(--ink); letter-spacing: -.02em; }
.tile-figure { color: var(--tile-ink); }
.tile-draft .tile-figure { color: var(--ink); }
.tile-overdue .tile-money { color: var(--burgundy); }
.tile-money { font-weight: 500; font-size: 1.12rem; color: var(--ink); }
.tile-view { color: var(--gold); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.target-row .panel { border-radius: 6px; }
.ring-panel { background: #fff; }
.cur-cad .ring-a { stop-color: var(--sapphire); } .cur-cad .ring-b { stop-color: var(--navy); }
.cur-usd .ring-a { stop-color: #cfae74; } .cur-usd .ring-b { stop-color: #a7834b; }
svg.ring.over .ring-a, svg.ring.over .ring-b { stop-color: var(--ok); }
.ring-track { stroke: #efebe3; }
.ring-pct { font: 500 30px "Inter", sans-serif; letter-spacing: -.02em; fill: var(--ink); }
.chart .t-inv, .key.t-inv { fill: var(--navy); background: var(--navy); }
.chart .t-col, .key.t-col { fill: var(--gold); background: var(--gold); }
.chart .t-exp, .key.t-exp { fill: var(--champagne); background: var(--champagne); }
.chart .t-tgt, .key.t-tgt { fill: var(--teal); background: var(--teal); }
svg.chart .grid { stroke: #f0ece4; }
.tick:hover, .task.done .tick { border-color: var(--ok); }
.task.done .tick { background: var(--ok); }

/* ---------- Forms ---------- */
input[type=text], input[type=email], input[type=number], input[type=date], input[type=url],
input[type=password], input[type=search], select, textarea { border-radius: 4px; border-color: var(--line-strong); }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(167, 131, 75, .16); border-color: var(--gold); }

/* ---------- Sign in ---------- */
body.plain { background: var(--ink); background-image: repeating-linear-gradient(90deg, rgba(255,255,255,.022) 0 1px, transparent 1px 22px),
  radial-gradient(900px 500px at 50% 0%, #1d4580, transparent 70%); min-height: 100vh; }
.login { border-radius: 6px; border: 0; border-top: 0; box-shadow: 0 30px 60px rgba(0,0,0,.35); padding: 2.4rem 2.3rem 2.2rem; }
.login-firm { border-bottom: 1px solid var(--line); }
.login-logo img { max-width: 220px; }
.login h1 { font-size: 2rem; }
.login .btn-primary { width: 100%; justify-content: center; padding: .7rem; }

.demo-banner { border-radius: 4px; }

/* ---------- Phone bar and drawer (hidden on desktop) ---------- */
.phone-bar, .tabbar, .scrim { display: none; }

@media (max-width: 860px) {
  :root { font-size: 16px; }
  /* Menu becomes a slide-out drawer */
  .app, html.nav-collapsed .app { display: block; background: none; padding-bottom: 72px; }
  .sidebar, html.nav-collapsed .sidebar { position: fixed; inset: 0 auto 0 0; width: 82vw; max-width: 320px; height: 100%; z-index: 40;
    flex-direction: column; flex-wrap: nowrap; padding: 1rem 0 calc(1rem + env(safe-area-inset-bottom));
    transform: translateX(-102%); transition: transform .22s ease; overflow-y: auto; }
  html.nav-open .sidebar { transform: none; box-shadow: 12px 0 40px rgba(0,0,0,.3); }
  html.nav-collapsed .sidebar nav a span, html.nav-collapsed .sidebar .me-text, html.nav-collapsed .sidebar .brand-logo { display: revert; }
  .sidebar .brand { width: auto; padding: 0 1rem 1rem; }
  .sidebar .brand-logo { display: block; } .sidebar .brand-mark { display: none !important; }
  .sidebar nav { display: block; }
  .sidebar nav a { padding: .7rem .9rem; margin: .1rem .6rem; font-size: 1rem; }
  .sidebar .bottom { margin-top: auto; }
  .sidebar .me-text { display: block; }
  .scrim { display: block; position: fixed; inset: 0; background: rgba(11, 21, 38, .45); z-index: 35; opacity: 0; pointer-events: none; transition: opacity .2s; }
  html.nav-open .scrim { opacity: 1; pointer-events: auto; }

  /* Compact top bar: menu, firm mark, search, create */
  .topbar { padding: .5rem .75rem; gap: .5rem; flex-wrap: nowrap; padding-top: calc(.5rem + env(safe-area-inset-top)); }
  .phone-bar { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; flex: none; border: 0; background: none; padding: 0; color: var(--ink); }
  .phone-bar svg { width: 22px; height: 22px; }
  .topbar form.search { order: 0; flex: 1; flex-basis: auto; }
  .topbar form.search input { font-size: 16px; padding-top: .5rem; padding-bottom: .5rem; }
  .topbar .kbd, .topbar .spacer, .topbar .help-btn, .topbar #timer { display: none; }
  .topbar details.menu summary { padding: 0; width: 2.4rem; height: 2.4rem; justify-content: center; border-radius: 50%; font-size: 0; }
  .topbar details.menu summary b { font-size: 1.5rem; font-weight: 300; }
  details.menu .menu-items { position: fixed; left: .75rem; right: .75rem; top: auto; bottom: 84px; border-radius: 8px; padding: .4rem 0; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
  details.menu .menu-items a { padding: .8rem 1.1rem; font-size: 1rem; border-bottom: 1px solid #f1ede5; }

  /* Bottom tab bar, reachable by thumb */
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: rgba(255,255,255,.97); backdrop-filter: blur(8px);
    border-top: 1px solid var(--line); padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .15rem; color: var(--muted); font-size: .66rem;
    letter-spacing: .04em; border: 0; background: none; padding: .3rem 0; border-radius: 0; font-weight: 500; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .tabbar .on { color: var(--ink); }
  .tabbar .on svg { stroke: var(--gold); }
  .tabbar .rec span.dot { width: 2.9rem; height: 2.9rem; margin-top: -1.35rem; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--gold-light);
    box-shadow: 0 6px 16px rgba(11,21,38,.3); border: 3px solid #fff; }
  .tabbar .rec { color: var(--ink); }

  .content { padding: 1rem .9rem 2rem; }
  h1 { font-size: 1.75rem; }
  .page-head { margin-bottom: .9rem; }
  .page-head .actions { width: 100%; }
  .page-head .actions .btn { flex: 1; justify-content: center; }
  .demo-banner { font-size: .82rem; padding: .5rem .7rem; }
  .hero { padding: 1.3rem 1.2rem; }
  .hero h1 { font-size: 1.9rem; }
  .hero-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .hero-actions { width: 100%; } .hero-actions .btn { flex: 1; justify-content: center; padding: .65rem; }
  .tiles { grid-template-columns: 1fr 1fr !important; }
  .tile { border-bottom: 1px solid var(--line); }
  .tile:nth-child(2n) { border-right: 0; }
  .tile-figure { font-size: 2rem; }
  .cards { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .card { padding: .8rem .85rem; }
  .card .figure { font-size: 1.35rem; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 1.1rem; }
  .tabs a { white-space: nowrap; }
  .filters .field { min-width: 0; flex: 1 1 100%; }
  .filters input, .filters select { width: 100%; font-size: 16px; }
  input, select, textarea { font-size: 16px; }
  .form-actions { flex-wrap: wrap; }
  .form-actions .btn, .form-actions button { flex: 1 1 auto; justify-content: center; padding: .7rem; }
  .form-actions > :first-child { flex-basis: 100%; }

  /* Tables turn into stacked rows: the first cell is the title, the rest are label: value */
  .table-wrap.stack { border: 0; background: none; box-shadow: none; overflow: visible; }
  .table-wrap.stack table, .table-wrap.stack tbody { display: block; }
  .table-wrap.stack thead { display: none; }
  .table-wrap.stack tr { display: grid; grid-template-columns: 1fr auto; gap: .1rem .8rem; background: #fff; border: 1px solid var(--line);
    border-radius: 6px; padding: .8rem .9rem; margin-bottom: .55rem; }
  .table-wrap.stack td { display: flex; justify-content: space-between; gap: .8rem; border: 0; padding: .12rem 0; grid-column: 1 / -1; text-align: right; max-width: none; }
  .table-wrap.stack td::before { content: attr(data-label); color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; text-align: left; padding-top: .15rem; }
  .table-wrap.stack td:first-child { grid-column: 1; font-weight: 600; font-size: 1rem; text-align: left; padding-bottom: .3rem; display: block; }
  .table-wrap.stack td:first-child::before { display: none; }
  .table-wrap.stack td.lead-num { grid-column: 2; grid-row: 1; font-weight: 600; font-size: 1rem; padding-bottom: .3rem; }
  .table-wrap.stack td.lead-num::before { display: none; }
  .table-wrap.stack td:empty, .table-wrap.stack td.blank { display: none; }
  .table-wrap.stack td input[type=checkbox] { order: -1; }
  .table-wrap.stack tfoot { display: block; } .table-wrap.stack tfoot tr { background: var(--bg-soft); }
  .table-wrap.stack td.narrative { white-space: normal; }
}

/* Chart series: navy and champagne gold, with slate as a third */
.chart .s1, .key.s1, .bar-fill.s1 { fill: var(--navy); background: var(--navy); }
.chart .s2, .key.s2, .bar-fill.s2 { fill: var(--gold); background: var(--gold); }
.chart .s3, .key.s3, .bar-fill.s3 { fill: var(--teal); background: var(--teal); }
.card::before { height: 0; }
.card::after { content: ""; position: absolute; left: 1.1rem; top: 0; width: 1.6rem; height: 2px; background: var(--card-accent, var(--section, var(--gold))); }
.card.accent-time { --card-accent: var(--emerald); } .card.accent-matters { --card-accent: var(--sapphire); }
.card.accent-billing { --card-accent: var(--gold); } .card.accent-trust { --card-accent: var(--burgundy); }
.card.accent-danger { --card-accent: var(--burgundy); }
