/* DuoDues — together theme. Presentation only; ledger and PDF logic stay in app.js. */
:root {
  --bg: #0e1518;
  --surface: #151f23;
  --surface-2: #1a272c;
  --surface-3: #24343a;
  --line: rgba(189, 218, 220, .10);
  --line-2: rgba(189, 218, 220, .23);
  --text: #edf3ef;
  --muted: #a4b6b7;
  --faint: #8b9fa2;
  --a: #8bdfc5;
  --a-dim: rgba(139, 223, 197, .10);
  --a-line: rgba(139, 223, 197, .35);
  --b: #f2b29c;
  --b-dim: rgba(242, 178, 156, .10);
  --b-line: rgba(242, 178, 156, .35);
  --r: 20px;
}

body { background: radial-gradient(ellipse at 85% 0%, #192c30 0, transparent 48%), var(--bg); }
::selection { background: #8bdfc540; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 4px; }
button, input { -webkit-tap-highlight-color: transparent; }
button { touch-action: manipulation; }
.eyebrow { display: block; color: var(--a); font-size: 10px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }

/* A welcoming entry point with a quiet, graphic expression of the equal split. */
.auth-screen { grid-template-columns: 1.1fr 1fr; background: var(--bg); }
.auth-brand { position: relative; padding: 48px clamp(30px, 5.5vw, 88px) 38px; gap: 34px; background: radial-gradient(ellipse at 0% 65%, #21433f70, transparent 65%), #132126; }
.auth-brand > div { width: 100%; max-width: 570px; }
.auth-wordmark { font-size: 30px; letter-spacing: -.06em; }
.auth-tagline { font-family: var(--font-body); font-size: 9px; letter-spacing: .16em; margin-top: 8px; }
.auth-intro { margin-top: clamp(48px, 8vh, 96px); }
.auth-intro h1 { margin-top: 18px; font-family: var(--font-display); font-weight: 700; font-size: clamp(36px, 4.1vw, 62px); line-height: 1.12; letter-spacing: -.055em; }
.auth-intro h1 > span { color: var(--a); }
.auth-intro p { max-width: 400px; margin-top: 22px; color: var(--muted); font-size: 14px; line-height: 1.8; }
.together-art { margin-top: 36px; padding: 22px 26px; border: 1px solid #8bdfc523; border-radius: 18px; background: linear-gradient(120deg, #8bdfc509, #f2b29c05); box-shadow: 0 20px 60px #0000000d; }
.art-caption { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; }
.art-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--a); }
.art-split { display: flex; align-items: center; gap: 12px; margin: 28px 0; }
.art-person { width: 48px; height: 48px; display: grid; place-items: center; flex: none; border: 1px solid; border-radius: 16px; font-size: 20px; font-weight: 500; transform: rotate(-8deg); }
.art-person-a { color: var(--a); background: var(--a-dim); border-color: var(--a-line); }
.art-person-b { color: var(--b); background: var(--b-dim); border-color: var(--b-line); transform: rotate(8deg); }
.art-connection { height: 1px; background: var(--line-2); flex: 1; }
.art-ratio { font-family: var(--font-mono); font-size: 21px; white-space: nowrap; }
.art-ratio span { color: var(--faint); font-weight: 400; }
.art-bottom { display: flex; justify-content: space-between; color: var(--faint); font-size: 10px; }
.auth-beam { display: none; }
.auth-features { max-width: 570px; gap: 17px; }
.auth-features li { gap: 13px; }
.auth-features svg { width: 17px; height: 17px; margin-top: 4px; }
.auth-features b { font-size: 12px; font-weight: 500; }
.auth-features span { display: block; font-size: 11px; line-height: 1.6; margin-top: 2px; }
.auth-panel { padding: 48px clamp(24px, 5vw, 80px); background: radial-gradient(ellipse at 100% 0%, #20333750, transparent 65%), var(--bg); }
.auth-card { width: min(410px, 100%); }
.auth-welcome { margin-bottom: 32px; }
.auth-welcome h2 { margin: 14px 0; font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); line-height: 1.2; letter-spacing: -.045em; }
.auth-welcome p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-switch { padding: 5px; border-radius: 12px; background: var(--surface); margin-bottom: 24px; }
.auth-tab { min-height: 42px; border-radius: 8px; font-size: 13px; }
.auth-tab.is-active { background: var(--surface-3); color: var(--text); box-shadow: 0 2px 8px #0002; }
.auth-form { gap: 14px; }
.auth-field { min-height: 54px; padding: 14px 16px; border-radius: 11px; }
.auth-field input { min-width: 0; font-size: 14px; }
.field-ico { margin-right: 12px; }
.auth-submit { min-height: 50px; margin-top: 8px; }
.auth-foot { display: flex; gap: 10px; border-top: 1px solid var(--line); padding-top: 22px; margin-top: 26px; font-size: 11px; line-height: 1.7; }
.auth-foot svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.seat-option { min-height: 76px; border-radius: 11px; }
.gate-card { padding: 32px; border-radius: 22px; box-shadow: 0 24px 90px #0003; }

/* The working ledger uses the same visual language, with stronger hierarchy. */
.topbar { background: #0e1518e8; backdrop-filter: blur(18px); }
.topbar-inner { max-width: 1280px; min-height: 80px; gap: 16px; }
.brand .wordmark { font-size: 26px; letter-spacing: -.055em; }
.brand { gap: 18px; }
.tagline { max-width: 100px; font-family: var(--font-body); font-size: 9px; line-height: 1.6; letter-spacing: .1em; }
.month-nav { border-radius: 11px; background: var(--surface); }
.icon-btn { width: 34px; height: 34px; }
.tabs { background: transparent; border-color: transparent; gap: 3px; border-radius: 11px; }
.tab { border-radius: 8px; padding: 9px 15px; }
.tab.is-active { background: var(--a-dim); color: var(--a); }
.user-btn { min-height: 42px; padding-right: 12px; }
.avatar { width: 31px; height: 31px; }
.sync-chip { font-size: 9px; letter-spacing: .08em; }
.app { max-width: 1280px; padding-top: 38px; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 32px; }
.workspace-heading h1 { font-family: var(--font-display); font-size: clamp(27px, 3.4vw, 40px); letter-spacing: -.055em; line-height: 1.2; margin: 10px 0 8px; }
.workspace-heading h1 span { color: var(--a); }
.workspace-heading p { color: var(--muted); font-size: 13px; }
.workspace-badge { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--muted); }
.workspace-badge svg { width: 17px; height: 17px; color: var(--a); }
.history-heading, body[data-view="history"] .ledger-heading { display: none; }
body[data-view="history"] .history-heading { display: block; }
.app-grid { grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; }
.col-main, .col-side { min-width: 0; }
.col-side { top: 104px; }
.panel { box-shadow: 0 8px 32px #00000012; }
.panel-title { font-size: 12px; letter-spacing: .05em; color: var(--text); text-transform: none; }
.panel-sub, .panel-count { font-size: 10px; }
.composer { padding: 24px; margin-bottom: 24px; }
.composer .panel-head { margin-bottom: 20px; }
.composer-row + .composer-row { margin-top: 16px; }
.field { background: #0e15186b; border-color: var(--line-2); }
.field:focus-within { border-color: var(--a); box-shadow: 0 0 0 3px var(--a-dim); }
.field.is-invalid { border-color: var(--b); }
.field-amount, .field-note { min-height: 56px; }
.amount-input { width: 104px; }
.date-input { background: var(--surface-2); font-size: 11px; min-height: 42px; }
.payer-static { padding: 10px 12px; font-size: 11px; }
.payer-btn { padding: 8px 11px; font-size: 11px; }
.btn-primary { background: var(--a); color: #102821; border-radius: 10px; box-shadow: 0 3px 0 #0002; font-size: 13px; min-height: 44px; }
.btn-primary:hover { background: #adedd8; }
.btn-primary:disabled { opacity: .45; }
.btn-add { white-space: nowrap; padding-inline: 14px; }
.feed-panel .panel-head, .history-view .panel-head { padding: 24px 24px 8px; }
.day-head { padding: 20px 24px 8px; }
.day-title { font-size: 9px; letter-spacing: .1em; }
.entry { padding: 17px 18px 17px 26px; gap: 12px; }
.entry::before { left: 12px; top: 19px; bottom: 19px; }
.entry-note { font-size: 14px; }
.entry-sub { margin-top: 5px; }
.entry-amount { font-size: 14px; }
.entry-del { opacity: .5; }
.entry:focus-within .entry-del, .entry-del:focus-visible { opacity: 1; }
.empty { padding: 64px 24px; }
.empty svg { color: var(--a); opacity: 1; width: 30px; height: 30px; }
.balance-panel { padding: 26px; background: linear-gradient(145deg, #1d3133, var(--surface) 55%); border-color: #8bdfc528; }
.balance-panel .panel-head { margin-bottom: 28px; }
.owes-label { font-family: var(--font-body); font-size: 11px; letter-spacing: .06em; }
.owes-amount { font-size: clamp(32px, 3.5vw, 43px); margin-top: 12px; overflow-wrap: anywhere; }
.owes-note { font-family: var(--font-body); font-size: 10px; line-height: 1.7; letter-spacing: .02em; text-transform: none; }
.beam { margin-top: 28px; }
.beam-bar { height: 8px; }
.beam-center { top: -4px; height: 16px; }
.divider { margin: 24px 0 20px; }
.stats { gap: 14px; }
.stat { gap: 10px; }
.stat dt { font-size: 12px; flex-wrap: wrap; gap: 5px; }
.stat dd { font-size: 13px; overflow-wrap: anywhere; min-width: 0; }
.auto-timeline { margin-top: 24px; padding: 14px 12px; background: #0e151850; }
.auto-title { font-family: var(--font-body); font-size: 10px; letter-spacing: .03em; text-transform: none; }
.auto-date { font-size: 11px; }
.auto-days { font-size: 9px; }
.auto-fill { background: var(--a-line); }
.btn-export { margin-top: 20px; font-size: 12px; min-height: 46px; }
.settle-note, .export-note { font-size: 10px; line-height: 1.8; }
.hist-head { padding: 20px 8px 20px 24px; }
.hist-body { margin-bottom: 20px; }
.toast { box-shadow: 0 12px 40px #0004; }

@media (max-width: 1150px) {
  .tagline { display: none; }
  .composer-row--meta { flex-wrap: wrap; }
  .btn-add { flex: 1; }
}
@media (max-width: 1020px) {
  .app-grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { position: static; order: 0; }
  .balance-panel { max-width: none; }
  .topbar-inner { gap: 10px; }
  .topbar-right { gap: 8px; }
}
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px; gap: 28px; }
  .auth-brand > div, .auth-features { max-width: none; }
  .auth-intro { margin-top: 36px; }
  .auth-intro h1 { font-size: 44px; }
  .auth-intro p { max-width: 480px; }
  .together-art { display: none; }
  .auth-features { display: none; }
  .auth-panel { padding: 40px 24px 48px; }
  .auth-card { width: min(480px, 100%); }
  .workspace-badge { display: none; }
}
@media (max-width: 680px) {
  .auth-brand { padding: 26px 24px 32px; }
  .auth-wordmark { font-size: 27px; }
  .auth-intro { margin-top: 30px; }
  .auth-intro h1 { font-size: clamp(32px, 8.5vw, 44px); }
  .auth-intro p { font-size: 13px; margin-top: 16px; }
  .auth-welcome h2 { font-size: 28px; }
  .auth-welcome h2 br { display: none; }
  .auth-panel { padding-top: 32px; }
  .auth-welcome { margin-bottom: 24px; }
  .topbar-inner { padding: 12px 16px; gap: 10px; }
  .brand .wordmark { font-size: 23px; }
  .topbar-spacer { display: none; }
  .month-nav { margin-left: auto; }
  .month-label { font-size: 12px; min-width: 100px; }
  .topbar-right { width: 100%; justify-content: space-between; }
  .tabs { padding-left: 0; }
  .tab { min-height: 40px; }
  .app { padding-top: 28px; padding-bottom: 48px; }
  .workspace-heading { margin-bottom: 24px; }
  .workspace-heading h1 { font-size: 29px; }
  .eyebrow { font-size: 9px; }
  .composer, .balance-panel { padding: 20px; }
  .composer-row--meta { gap: 12px 8px; }
  .date-input { padding-inline: 8px; }
  .payer-static { padding-inline: 8px; }
  .payer-area { min-width: 0; }
  .payer-toggle { justify-content: center; }
  .payer-btn { padding-inline: 8px; }
  .btn-add { flex-basis: 100%; }
  .feed-panel .panel-head, .history-view .panel-head { padding: 20px 20px 6px; }
  .entry { gap: 8px; padding-right: 12px; }
  .entry-del { width: 32px; height: 40px; opacity: .7; }
  .entry-amount { font-size: 12px; }
  .hist-head { padding-left: 18px; gap: 9px; }
  .hist-net { white-space: normal; }
  .hist-total { font-size: 12px; }
  .hist-body { margin-left: 12px; }
}
@media (hover: none) { .entry-del { opacity: .7; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
