/* INCREATE FINANCE — glass UI in the increate.ca style: black, warm orange glow, Helvetica, pill buttons. */
:root {
  --bg: #070708;
  --ink: #f5f3f0;
  --ink-2: rgba(245, 243, 240, .66);
  --ink-3: rgba(245, 243, 240, .42);
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .18);
  --glass: rgba(255, 255, 255, .055);
  --glass-2: rgba(255, 255, 255, .09);
  --glass-hi: rgba(255, 255, 255, .14);
  --orange: #ff7a1a;
  --orange-2: #ff9a4d;
  --orange-deep: #b8460b;
  --pos: #5fd39a;
  --neg: #ff6b5e;
  --warn: #ffc15e;
  --radius: 22px;
  --radius-s: 14px;
  --font: "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bg);
  min-height: 100vh; -webkit-font-smoothing: antialiased;
}
/* warm glow like the site hero */
body::before {
  content: ""; position: fixed; inset: -20vh -10vw auto -10vw; height: 120vh; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 40vh at 75% 0%, rgba(255, 122, 26, .30), transparent 70%),
    radial-gradient(50vw 50vh at 10% 30%, rgba(184, 70, 11, .22), transparent 70%),
    radial-gradient(80vw 50vh at 50% 110%, rgba(255, 140, 60, .14), transparent 70%);
  filter: saturate(120%);
}
body::after { /* film grain */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
a.link { color: var(--orange-2); }
a.link:hover { text-decoration: underline; }
h1, h2, h3 { font-weight: 400; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 34px; text-transform: uppercase; }
h2 { font-size: 20px; text-transform: uppercase; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.pos { color: var(--pos); } .neg { color: var(--neg); } .warn { color: var(--warn); }

/* ---------- glass ---------- */
.glass {
  background: linear-gradient(180deg, var(--glass-2), var(--glass));
  border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(28px) saturate(170%); -webkit-backdrop-filter: blur(28px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 20px 50px -25px rgba(0, 0, 0, .8);
}
.panel { padding: 22px; }
.panel + .panel, .stack > * + * { margin-top: 18px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 12px; z-index: 50; margin: 12px 16px 0; padding: 10px 12px 10px 22px;
  display: flex; align-items: center; gap: 14px; border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand svg, .brand img { height: 13px; width: auto; }
.brand small { font-size: 10px; letter-spacing: .2em; color: var(--orange-2); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav a {
  font-size: 12px; text-transform: uppercase; letter-spacing: .04em; padding: 9px 12px; border-radius: 999px;
  color: var(--ink-2); white-space: nowrap; transition: background .2s, color .2s;
}
.nav a:hover { color: var(--ink); background: var(--glass); }
.nav a.active { color: #111; background: var(--ink); }
.user { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }

main { max-width: 1480px; margin: 0 auto; padding: 28px 24px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--orange-2); margin-bottom: 6px; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 12px; text-transform: uppercase;
  letter-spacing: .04em; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-2);
  background: var(--glass); color: var(--ink); cursor: pointer; transition: transform .15s, background .2s;
}
.btn:hover { background: var(--glass-hi); }
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--ink); color: #111; border-color: transparent; }
.btn.primary:hover { background: #fff; }
.btn.accent { background: linear-gradient(180deg, var(--orange-2), var(--orange)); color: #160800; border-color: transparent; }
.btn.danger { border-color: rgba(255, 107, 94, .5); color: var(--neg); }
.btn.small { padding: 6px 12px; font-size: 11px; }
.btn[disabled] { opacity: .4; pointer-events: none; }

input, select, textarea {
  font: inherit; color: var(--ink); background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2);
  border-radius: 12px; padding: 9px 12px; width: 100%; outline: none; transition: border .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
select option { background: #1a1a1c; }
textarea { min-height: 84px; resize: vertical; }
label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.field { margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.error { color: var(--neg); font-size: 12px; margin-top: 4px; }

/* ---------- segmented tabs ---------- */
.seg { display: inline-flex; padding: 4px; gap: 2px; border-radius: 999px; background: rgba(0, 0, 0, .35); border: 1px solid var(--line); flex-wrap: wrap; }
.seg a { padding: 7px 14px; border-radius: 999px; font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.seg a:hover { color: var(--ink); }
.seg a.active { background: var(--glass-hi); color: var(--ink); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .15); }
.seg .count { color: var(--ink-3); margin-left: 4px; font-size: 11px; }
.months { display: flex; gap: 4px; flex-wrap: wrap; }
.months a { padding: 8px 12px; border-radius: 12px; font-size: 12px; text-transform: uppercase; color: var(--ink-2); border: 1px solid transparent; }
.months a:hover { background: var(--glass); }
.months a.active { border-color: var(--orange); color: var(--ink); background: rgba(255, 122, 26, .12); }

/* ---------- KPI tiles ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.kpi { padding: 18px 20px; display: block; }
.kpi .label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.kpi .value { font-size: 24px; margin-top: 8px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .sub { font-size: 12px; color: var(--ink-2); margin-top: 4px; }
a.kpi:hover { border-color: var(--line-2); }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border-radius: var(--radius-s); max-height: 70vh; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th {
  position: sticky; top: 0; z-index: 2; text-align: left; font-weight: 400; font-size: 11px; text-transform: uppercase;
  letter-spacing: .05em; color: var(--ink-3); padding: 10px 12px; background: rgba(18, 16, 15, .92);
  backdrop-filter: blur(12px); border-bottom: 1px solid var(--line);
}
td { padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .05); vertical-align: top; }
tr:hover td { background: rgba(255, 255, 255, .025); }
tr.clickable { cursor: pointer; }
tfoot td { font-weight: 600; border-top: 1px solid var(--line-2); }
td.desc { max-width: 520px; }

.badge {
  display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; padding: 3px 8px;
  border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap;
}
.badge.posted { border-color: rgba(95, 211, 154, .4); color: var(--pos); }
.badge.review, .badge.draft, .badge.unconfirmed { border-color: rgba(255, 193, 94, .45); color: var(--warn); }
.badge.reversed, .badge.cancelled, .badge.unknown { border-color: rgba(255, 107, 94, .4); color: var(--neg); }
.badge.accent { border-color: rgba(255, 122, 26, .5); color: var(--orange-2); }

.notice { padding: 14px 18px; border-radius: var(--radius-s); border: 1px solid rgba(255, 193, 94, .3); background: rgba(255, 193, 94, .07); color: #ffe2b3; font-size: 13px; }
.notice.info { border-color: rgba(255, 255, 255, .15); background: var(--glass); color: var(--ink-2); }
.flash { margin-bottom: 18px; padding: 12px 18px; border-radius: 999px; background: rgba(95, 211, 154, .12); border: 1px solid rgba(95, 211, 154, .35); color: #c9f5de; }

dl.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--ink-3); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; padding-top: 2px; }
dl.kv dd { margin: 0; }
.empty { color: var(--ink-3); font-style: italic; }

/* bars for charts */
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 10px; align-items: end; height: 220px; padding-top: 10px; }
.bar-col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; position: relative; }
.bars { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.bar { width: 42%; border-radius: 6px 6px 2px 2px; min-height: 2px; }
.bar.plan { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .2); }
.bar.fact { background: linear-gradient(180deg, var(--orange-2), var(--orange-deep)); box-shadow: 0 0 20px rgba(255, 122, 26, .35); }
.bar.future { opacity: .35; }
.bar-col .m { font-size: 10px; text-transform: uppercase; color: var(--ink-3); }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* login */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.auth .card { width: 100%; max-width: 400px; padding: 36px; }

@media (max-width: 1280px) { .user .who { display: none; } }
@media (max-width: 900px) {
  .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .topbar { flex-wrap: wrap; border-radius: 24px; }
  .nav { order: 3; width: 100%; flex: none; }
  main { padding: 20px 16px 60px; }
  h1 { font-size: 26px; }
  dl.kv { grid-template-columns: 1fr; }
}

/* =====================================================================
   v2 · Liquid glass — stronger glass, Apple-style app bar, footer, auth
   ===================================================================== */
:root {
  --glass: rgba(255, 255, 255, .045);
  --glass-2: rgba(255, 255, 255, .085);
  --glass-hi: rgba(255, 255, 255, .16);
  --glass-blur: blur(44px) saturate(190%) brightness(1.08);
  --rim: rgba(255, 255, 255, .16);
}

/* richer moving light behind the glass so the refraction is visible */
.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; mix-blend-mode: screen; animation: drift 28s ease-in-out infinite alternate; }
.ambient i:nth-child(1) { width: 46vw; height: 46vw; left: 52%; top: -16vw; background: radial-gradient(circle, #ff7a1a, transparent 65%); }
.ambient i:nth-child(2) { width: 38vw; height: 38vw; left: -10vw; top: 22vh; background: radial-gradient(circle, #b8460b, transparent 65%); animation-duration: 34s; }
.ambient i:nth-child(3) { width: 30vw; height: 30vw; right: -8vw; bottom: -10vw; background: radial-gradient(circle, #ffb36b, transparent 65%); opacity: .35; animation-duration: 40s; }
.ambient i:nth-child(4) { width: 22vw; height: 22vw; left: 30%; bottom: 10vh; background: radial-gradient(circle, #7a3cff, transparent 65%); opacity: .14; animation-duration: 46s; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vw, 5vh, 0) scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .ambient i { animation: none; } }

.glass {
  position: relative; isolation: isolate;
  background: linear-gradient(155deg, rgba(255,255,255,.11) 0%, rgba(255,255,255,.04) 38%, rgba(255,255,255,.025) 100%);
  border: 1px solid transparent; border-radius: var(--radius);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),      /* top specular edge */
    inset 0 -1px 0 rgba(255,255,255,.04),
    inset 0 0 0 1px rgba(255,255,255,.07),
    0 30px 60px -30px rgba(0,0,0,.85),
    0 2px 8px -2px rgba(0,0,0,.4);
}
/* gradient rim */
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; z-index: -1;
  background: linear-gradient(140deg, rgba(255,255,255,.38), rgba(255,255,255,.06) 30%, rgba(255,255,255,.02) 60%, rgba(255,170,100,.28));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
/* soft sheen */
.glass::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: -1;
  background: radial-gradient(120% 60% at 15% -10%, rgba(255,255,255,.10), transparent 55%);
}
.kpi.glass { transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .25s; }
a.kpi.glass:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.28), inset 0 0 0 1px rgba(255,255,255,.1), 0 34px 70px -30px rgba(255,122,26,.35); }
th { background: rgba(20,17,15,.72); backdrop-filter: blur(20px) saturate(160%); -webkit-backdrop-filter: blur(20px) saturate(160%); }
input, select, textarea { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.14); backdrop-filter: blur(10px); }
.btn { backdrop-filter: blur(20px) saturate(170%); -webkit-backdrop-filter: blur(20px) saturate(170%); box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }

/* ---------- Apple-style app bar ---------- */
.appbar {
  position: sticky; top: 0; z-index: 70; height: 56px;
  background: rgba(14, 12, 11, .52); backdrop-filter: saturate(180%) blur(30px); -webkit-backdrop-filter: saturate(180%) blur(30px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.appbar .inner { max-width: 1480px; height: 100%; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.appbar .brand { justify-self: start; }
.appbar .brand svg { height: 12px; }
.appbar .tabs {
  position: relative; display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(255,255,255,.06); box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.07);
}
.appbar .tabs a {
  position: relative; z-index: 1; font-size: 13px; letter-spacing: -.01em; padding: 7px 16px; border-radius: 999px;
  color: rgba(245,243,240,.72); white-space: nowrap; transition: color .2s;
}
.appbar .tabs a:hover { color: #fff; }
.appbar .tabs a.active { color: #111; }
.appbar .tabs .pill {
  position: absolute; z-index: 0; top: 4px; bottom: 4px; border-radius: 999px; background: linear-gradient(180deg, #fff, #ece9e4);
  box-shadow: 0 4px 14px -4px rgba(0,0,0,.6), inset 0 -1px 0 rgba(0,0,0,.08); transition: left .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1);
}
.appbar .actions { justify-self: end; display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; color: rgba(245,243,240,.8);
  background: transparent; transition: background .2s; position: relative;
}
.icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.icon-btn svg { width: 17px; height: 17px; }
.icon-btn .dot-badge { position: absolute; top: 6px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px rgba(14,12,11,.9); }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: #1a0b00;
  background: linear-gradient(135deg, #ffb36b, #ff7a1a); box-shadow: inset 0 1px 0 rgba(255,255,255,.5); cursor: pointer; border: 0; }
.menu { position: absolute; right: 0; top: 46px; min-width: 240px; padding: 8px; z-index: 80; border-radius: 18px; }
.menu a, .menu button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font: inherit; font-size: 13px; color: var(--ink); background: none; border: 0; cursor: pointer; text-align: left; }
.menu a:hover, .menu button:hover { background: rgba(255,255,255,.08); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu .head { padding: 10px 12px 8px; }
.menu .head small { display: block; color: var(--ink-3); font-size: 11px; }
@media (max-width: 1000px) {
  .appbar { height: auto; }
  .appbar .inner { grid-template-columns: 1fr auto; padding: 10px 16px; }
  .appbar .tabs { grid-column: 1 / -1; order: 3; overflow-x: auto; scrollbar-width: none; }
}

/* ---------- footer ---------- */
.footer { max-width: 1480px; margin: 0 auto; padding: 0 24px 28px; }
.footer .bar { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 18px 24px; border-radius: 22px; font-size: 12px; color: var(--ink-3); }
.footer .brand svg { height: 10px; color: var(--ink-2); }
.footer .links { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.footer .links a:hover { color: var(--ink); }
.footer .sec { display: flex; gap: 14px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.footer .ok { color: var(--pos); }
.footer .ok::before { content: "●"; margin-right: 6px; font-size: 8px; vertical-align: 2px; }
@media (max-width: 900px) { .footer .bar { grid-template-columns: 1fr; text-align: center; } .footer .sec { justify-content: center; } }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 38px 36px 30px; border-radius: 30px; }
.auth-card .brand { margin-bottom: 30px; }
.auth-card h2 { font-size: 24px; text-transform: none; letter-spacing: -.02em; margin-bottom: 6px; }
.auth-card .lead { color: var(--ink-2); margin: 0 0 24px; }
.auth-card input { height: 46px; font-size: 15px; border-radius: 14px; }
.auth-card .btn.primary { width: 100%; justify-content: center; height: 46px; font-size: 13px; margin-top: 6px; }
.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 8px 0 16px; }
.otp input { text-align: center; font-size: 22px; font-family: var(--mono); padding: 0; height: 56px; }
.auth-meta { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 22px; color: var(--ink-3); font-size: 11px; text-align: center; }
.auth-meta svg { width: 12px; height: 12px; }
.lock-note { font-size: 12px; color: var(--warn); margin-top: 10px; min-height: 16px; }
details.acct { position: relative; }
details.acct > summary { list-style: none; }
details.acct > summary::-webkit-details-marker { display: none; }
details.acct .menu { position: absolute; right: 0; top: 42px; }
.recovery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; font-family: var(--mono); font-size: 14px; }
.recovery span { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.06); text-align: center; }
.qr { display: grid; place-items: center; padding: 14px; border-radius: 18px; background: #fff; width: 228px; margin: 6px auto 14px; }

/* =====================================================================
   v3 · polish: alignment, readable overlays, consistent controls
   ===================================================================== */
/* spacing: stacked panels get a gap only in normal flow, never inside grids */
.panel + .panel { margin-top: 0; }
main > .panel + .panel, main > .glass + .glass, .stack > * + * { margin-top: 18px; }
.grid, .kpis, .split { align-items: stretch; }
.grid > *, .kpis > *, .split > * { margin: 0 !important; }

/* controls: one height, one look (no native Safari select chrome) */
input, select, textarea { height: 40px; line-height: 1.2; font-size: 14px; }
textarea { height: auto; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f5f3f0' stroke-opacity='.6' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-color: rgba(255,255,255,.04);
}
input[type=checkbox], input[type=file] { height: auto; }
label { height: 14px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn { height: 40px; }
.btn.small { height: 30px; }

/* overlays must be readable: menus, drawers, sticky headers are near-opaque */
.menu, details.acct .menu {
  background: rgba(24, 21, 19, .94) !important; z-index: 200;
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  box-shadow: 0 30px 80px -20px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.12), inset 0 0 0 1px rgba(255,255,255,.08) !important;
}
.menu .head strong { display: block; font-size: 14px; }
.menu a, .menu button { min-height: 36px; }
th {
  background: rgb(26, 22, 20) !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.08); z-index: 3;
}
.table-wrap { position: relative; isolation: isolate; }

/* small text should never run into the line before it */
.flag { display: block; }
.badge { line-height: 1.3; }

/* footer: one clean row */
.footer { display: block; width: 100%; max-width: 1480px; margin: 12px auto 0; padding: 0 24px 28px; }
.footer .bar { display: flex !important; width: 100%; align-items: center; gap: 24px; padding: 16px 22px; flex-wrap: wrap; }
.footer .bar > .brand { flex: 0 0 auto; gap: 10px; white-space: nowrap; }
.footer .bar > .brand span { color: var(--ink-3); font-size: 12px; }
.footer .links { flex: 1 1 auto; display: flex; flex-direction: row; gap: 20px; justify-content: center; white-space: nowrap; }
.footer .sec { flex: 0 0 auto; display: flex; gap: 8px; white-space: nowrap; }
.footer .sec > span { padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
@media (max-width: 1100px) { .footer .bar { flex-direction: column; text-align: center; } .footer .links { flex-wrap: wrap; } .footer .sec { flex-wrap: wrap; justify-content: center; } }

.demo-chip { font-size: 9px; letter-spacing: .14em; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255,154,77,.45); color: var(--orange-2); margin-left: 10px; }
input, select, textarea { background-color: rgba(10, 8, 7, .45); }
input::placeholder, textarea::placeholder { color: rgba(245,243,240,.38); }
main { padding-bottom: 40px; }
.footer .links { justify-content: flex-end; }
.footer .sec { flex-basis: 100%; justify-content: flex-start; }
@media (max-width: 1100px) { .footer .links, .footer .sec { justify-content: center; } }
/* Plan · quarters */
.quarters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.qcard { display: block; padding: 18px 20px 16px; cursor: pointer; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.qcard:hover { transform: translateY(-3px); }
.qcard.future { opacity: .55; }
.qcard.current { box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 0 0 1px rgba(255,154,77,.35), 0 30px 60px -30px rgba(255,122,26,.45); }
.qlabel { font-size: 30px; letter-spacing: -.02em; line-height: 1; }
.qbody { display: grid; grid-template-columns: 84px 1fr; gap: 16px; align-items: center; margin: 16px 0 12px; }
.ring { width: 84px; height: 84px; transform: rotate(-90deg); }
.ring text { transform: rotate(90deg); transform-origin: 42px 42px; fill: var(--ink); }
.ring .pct { font-size: 17px; font-family: var(--mono); }
.ring .sub { font-size: 8px; fill: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; }
.ring circle { fill: none; stroke-width: 7; }
.ring .track { stroke: rgba(255,255,255,.08); }
.ring .val { stroke: url(#none); stroke: var(--orange); stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255,122,26,.55)); transition: stroke-dashoffset .8s cubic-bezier(.2,.8,.2,1); }
.ring .val.ok { stroke: var(--pos); filter: drop-shadow(0 0 6px rgba(95,211,154,.5)); }
.qnums { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: 13px; }
.qnums span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.qnums strong { font-size: 16px; font-weight: 500; }
.qnums b { font-weight: 400; }
.qmonths { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.qmonths > div { text-align: center; font-size: 10px; text-transform: uppercase; color: var(--ink-3); }
.qbar { position: relative; height: 34px; display: flex; justify-content: center; align-items: flex-end; gap: 3px; margin-bottom: 4px; }
.qbar i { width: 9px; border-radius: 3px 3px 1px 1px; min-height: 2px; }
.qbar .p { background: rgba(255,255,255,.18); }
.qbar .f { background: linear-gradient(180deg, var(--orange-2), var(--orange-deep)); }
.plan-table tbody + tbody .qhead td { border-top: 10px solid transparent; }
.plan-table .qhead td { background: rgba(255,154,77,.07); font-weight: 600; border-bottom: 1px solid rgba(255,154,77,.18); }
.plan-table .qhead td:first-child { border-radius: 12px 0 0 12px; font-size: 14px; }
.plan-table .qhead td:last-child { border-radius: 0 12px 12px 0; }
.plan-table .mrow td:first-child { padding-left: 26px; }
.plan-table tbody.flash-q td { animation: qflash 1.4s ease; }
@keyframes qflash { 0%, 40% { background: rgba(255,122,26,.16); } 100% { background: transparent; } }
@media (max-width: 1100px) { .quarters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .quarters { grid-template-columns: 1fr; } }

/* ---- shared from mockup: drawer, filters, chips, timeline ---- */
/* Mockup-only additions on top of app.css */

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.flow-in { color: var(--pos); } .flow-out { color: var(--ink); }
.amount-in::before { content: "+"; } .amount-out::before { content: "−"; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 12px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(0,0,0,.25); color: var(--ink-2); cursor: pointer; }
.chip.on { background: var(--ink); color: #111; border-color: transparent; }
.chip .x { margin-left: 6px; opacity: .6; }

.filters { display: grid; grid-template-columns: 2fr repeat(5, minmax(0, 1fr)) auto; gap: 10px; align-items: end; }
.filters > div { min-width: 0; }
.filters label { margin-bottom: 4px; }

.flag { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--warn); margin-top: 3px; }
.rowsel { background: rgba(255, 122, 26, .08) !important; }
td .sub { color: var(--ink-3); font-size: 11px; margin-top: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* Drawer (transaction card, forms) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.45); backdrop-filter: blur(3px); z-index: 80; }
.drawer {
  position: fixed; top: 12px; right: 12px; bottom: 12px; width: min(720px, calc(100vw - 24px)); z-index: 90;
  overflow-y: auto; padding: 26px 28px; border-radius: 28px; background: linear-gradient(160deg, rgba(48,40,34,.72), rgba(16,14,13,.82));
  backdrop-filter: blur(50px) saturate(190%); -webkit-backdrop-filter: blur(50px) saturate(190%);
  animation: slidein .22s ease-out;
}
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer .close { position: absolute; top: 18px; right: 18px; }
.drawer h2 { font-size: 22px; }
.drawer .section { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.drawer dl.kv { grid-template-columns: 170px 1fr; }
.tabs-inline { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 18px 0 0; }
.tabs-inline a { padding: 10px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; }
.tabs-inline a.on { color: var(--ink); border-bottom-color: var(--orange); }

.type-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 16px 0; }
.type-picker button { font: inherit; color: var(--ink-2); background: rgba(0,0,0,.3); border: 1px solid var(--line-2); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; }
.type-picker button.on { border-color: var(--orange); color: var(--ink); background: rgba(255,122,26,.12); }
.type-picker small { display: block; color: var(--ink-3); font-size: 11px; margin-top: 3px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100; padding: 12px 20px; border-radius: 999px; background: rgba(95,211,154,.15); border: 1px solid rgba(95,211,154,.4); color: #d5f7e6; backdrop-filter: blur(16px); }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 0 0 14px 18px; border-left: 1px solid var(--line-2); position: relative; font-size: 13px; }
.timeline li::before { content: ""; position: absolute; left: -4px; top: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--orange); }
.timeline .when { color: var(--ink-3); font-size: 11px; }

.file { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 6px; }
.file .ico { width: 30px; height: 36px; border-radius: 6px; background: rgba(255,122,26,.18); display: grid; place-items: center; font-size: 9px; color: var(--orange-2); }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--orange-deep), var(--orange-2)); border-radius: 99px; }

.svgchart { width: 100%; height: 260px; }
.svgchart text { fill: var(--ink-3); font-size: 10px; font-family: var(--font); }

@media (max-width: 1100px) { .filters { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .type-picker { grid-template-columns: 1fr 1fr; } }


.flag.soft { color: var(--ink-3); }
.monthstrip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
.monthstrip a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 8px 4px; }
.mbars { height: 28px; display: flex; align-items: flex-end; justify-content: center; gap: 2px; }
.mbars i { width: 6px; border-radius: 2px; min-height: 1px; }
.mbars .in { background: var(--orange); }
.mbars .out { background: rgba(255,255,255,.35); }
.recon-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px 18px; }
.recon-grid span { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 4px; }
.recon-grid strong { font-size: 16px; font-weight: 500; }
.recon-grid em { display: block; font-style: normal; font-size: 12px; margin-top: 2px; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable::after { content: attr(data-dir); margin-left: 4px; color: var(--orange-2); }
@media (max-width: 1100px) { .recon-grid { grid-template-columns: repeat(2, 1fr); } .monthstrip { grid-template-columns: repeat(6, 1fr); } }
.drawer-form .page-head h1 { font-size: 22px; }
.drawer-form .glass { background: rgba(255,255,255,.03); box-shadow: none; }
.drawer .g4, .drawer .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* P&L detailed */
.pnl td, .pnl th, .payroll td, .payroll th { padding: 8px 10px; }
.pnl .lcol, .payroll .lcol { position: sticky; left: 0; z-index: 2; background: rgb(24, 20, 18); min-width: 300px; }
.pnl thead .lcol, .payroll thead .lcol { z-index: 4; }
.pnl .sec-head td { background: rgba(255,154,77,.08); font-weight: 600; border-top: 8px solid transparent; }
.pnl .sec-head td.lcol { background: rgb(44, 30, 22); }
.pnl tbody.collapsed tr.line { display: none; }
.pnl .line td.lcol { padding-left: 34px; color: var(--ink-2); }
.pnl .line.warnline td.lcol { color: var(--warn); }
.pnl td.cell { cursor: pointer; }
.pnl td.cell:hover { background: rgba(255,122,26,.14); color: #fff; }
.pnl .result td { font-weight: 600; background: rgba(255,255,255,.05); border-top: 1px solid var(--line-2); }
.pnl .result td.lcol { background: rgb(34, 30, 28); }
.pnl .margin td { color: var(--ink-3); font-size: 11px; }
.pnl .tog, .payroll .tog { background: none; border: 0; color: var(--ink-3); cursor: pointer; width: 22px; font-size: 11px; height: auto; }
.stackbar { display: flex; height: 22px; border-radius: 999px; overflow: hidden; gap: 2px; background: rgba(255,255,255,.05); }
.stackbar i, .legend i.sb-0, .legend i.sb-1, .legend i.sb-2, .legend i.sb-3, .legend i.sb-4, .legend i.sb-profit { display: inline-block; }
.sb-0 { background: #b8460b; } .sb-1 { background: #ff7a1a; } .sb-2 { background: #ffb36b; } .sb-3 { background: #8a6c5a; } .sb-4 { background: rgba(255,255,255,.25); } .sb-profit { background: var(--pos); }
.payroll .prow td { border-top: 1px solid rgba(255,255,255,.06); }
.payroll .prow.open td { background: rgba(255,154,77,.07); }
.payroll .pdetail > td { padding: 0 0 12px 34px; background: rgba(0,0,0,.18); }
.payroll table.inner { font-size: 12px; }
.payroll table.inner th { position: static; background: transparent !important; }
.bulkbar { position: sticky; top: 64px; z-index: 6; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px 12px; margin-bottom: 10px; border-radius: 16px; }
.bulkbar select, .bulkbar input { width: auto; min-width: 150px; height: 34px; }
.selcell { width: 34px; }
.selcell input, #selAll { width: 16px; height: 16px; accent-color: var(--orange); }
[hidden] { display: none !important; }
@keyframes rowflash { 0% { background: rgba(255,122,26,.28); } 100% { background: transparent; } }
tr.flashrow td { animation: rowflash 1.6s ease-out; }
