:root {
  color-scheme: light;
  --bg: #fcf8f1;
  --paper: #fff;
  --ink: #291c3c;
  --muted: #685e74;
  --line: #e6dcec;
  --accent: #bfc3ff;
  --green: #514581;
  --deep: #291c3c;
  --radius: 22px;
  --shadow: 0 14px 40px #291c3c0d;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--bg);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 290px; }
.finance-tools { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 19px; }
.finance-tools a { background: #f0eafa; border-radius: 9px; color: var(--green); font-size: .82rem; font-weight: 700; padding: 8px 12px; text-decoration: none; }
.finance-tools a:hover { background: #e4dcf7; }
.finance-tools a[aria-current="page"] { background: var(--deep); color: var(--paper); }
.emergency-history { margin-top: 18px; }
.emergency-log { padding-inline-start: 1.3rem; color: var(--muted); font-size: .88rem; }
.emergency-history .dialog-form { max-width: 440px; }
.emergency-history .button { justify-self: start; }
.dialog-form { display: grid; gap: 12px; }
.dialog-form .dialog-label { display: grid; gap: 5px; font-weight: 650; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .64; }
:focus-visible { outline: 3px solid #6958b5; outline-offset: 3px; }
[hidden] { display: none !important; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.55; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { padding: 12px 16px; color: var(--paper); background: var(--deep); position: fixed; top: 8px; left: 8px; transform: translateY(-150%); z-index: 100; }
.skip-link:focus { transform: none; }
.startup { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 24px; text-align: center; }
.brand { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; font-size: 1.36rem; font-weight: 820; white-space: nowrap; width: max-content; letter-spacing: -.07em; }
.brand-mark { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--deep); color: var(--accent); font-size: 24px; line-height: 1; font-weight: 650; letter-spacing: 0; }
.brand-mark.small { width: 28px; height: 28px; border-radius: 8px; font-size: 18px; }
.brand-period { color: #7867b8; }
.shell-icon { display: inline-flex; width: 18px; height: 18px; flex: 0 0 18px; vertical-align: middle; }
.shell-icon svg { display: block; width: 100%; height: 100%; stroke: currentColor; stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; border-radius: 12px; min-height: 43px; padding: 10px 16px; border: 1px solid transparent; font-weight: 730; font-size: .89rem; line-height: 1.25; text-decoration: none; text-align: center; transition: background .15s ease, border-color .15s ease; }
.button-primary { background: var(--deep); color: var(--paper); border-color: var(--deep); }
.button-primary:hover { background: #46335e; border-color: #46335e; }
.button-outline { color: var(--ink); border-color: #dcd0e7; background: var(--paper); }
.button-outline:hover { background: #f0eafa; border-color: #a394bc; }
.button-compact { min-height: 34px; padding: 6px 10px; font-size: .77rem; }
.text-button { min-height: 36px; padding: 0; display: inline-flex; align-items: center; color: var(--green); border: 0; background: none; text-decoration: underline; text-underline-offset: 4px; font-weight: 700; font-size: .87rem; line-height: 1.3; }
.text-button:hover { color: var(--ink); }
.field { display: inline-block; min-height: 43px; padding: 9px 12px; color: var(--ink); border: 1px solid #cfc1da; border-radius: 9px; background: var(--paper); max-width: 100%; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); width: 17px; height: 17px; margin: 0; flex: 0 0 17px; vertical-align: middle; }
.pill { display: inline-flex; align-items: center; background: #eee8f8; color: var(--green); width: fit-content; font-size: .76rem; line-height: 1.2; padding: 6px 10px; border-radius: 99px; font-weight: 740; }
.pill-pending { background: #fff0d1; color: #724607; }
.pill-approved { background: #dbf1dd; color: #245136; }
.pill-rejected { background: #fde6df; color: #8b3126; }
.kicker { margin-bottom: 12px; color: var(--green); font-size: .76rem; font-weight: 800; letter-spacing: .105em; }
.marketing { max-width: 1440px; margin-inline: auto; padding-inline: clamp(18px, 5vw, 74px); }
.marketing-header { height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.marketing-header nav { display: flex; gap: 26px; align-items: center; }
.nav-link { color: var(--muted); font-weight: 650; font-size: .9rem; text-decoration: none; }
.nav-link:hover { color: var(--green); text-decoration: underline; text-underline-offset: 4px; }
.hero { display: grid; grid-template-columns: 1.07fr 1fr; background: #efe9fc; border-radius: 30px; overflow: hidden; min-height: 470px; }
.hero-copy { padding: clamp(28px, 5vw, 72px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.hero-copy h1 { max-width: 780px; font-size: clamp(2.6rem, 5vw, 5.4rem); line-height: .98; letter-spacing: -.088em; margin: 5px 0 22px; }
.hero-copy h1 em { display: block; color: var(--green); font-style: normal; }
.hero-copy > p:not(.kicker) { max-width: 38ch; color: #584963; font-size: clamp(.99rem, 1.2vw, 1.16rem); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 27px; }
.hero-actions > span { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--green); font-weight: 720; }
.hero-actions > span .shell-icon { width: 15px; height: 15px; flex-basis: 15px; }
.hero-illustration { background: radial-gradient(ellipse at 35% 65%, #54447b, var(--deep) 76%); position: relative; min-height: 360px; display: grid; place-items: center; isolation: isolate; overflow: hidden; padding: 48px 30px; }
.illustration-orbit { position: absolute; width: min(37vw, 490px); aspect-ratio: 1; border-radius: 50%; border: 1px solid #bfc3ff55; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: -1; }
.illustration-orbit::after, .illustration-orbit::before { content: ''; position: absolute; inset: 23px; border: 1px solid #bfc3ff43; border-radius: 50%; }
.illustration-orbit::after { inset: 46px; border-color: #bfc3ff2d; }
.sample-card { padding: clamp(18px, 2.7vw, 35px); width: min(100%, 420px); border-radius: 23px; background: #fcf8f1; box-shadow: 0 18px 50px #160f29b5; transform: rotate(-4deg); }
.sample-top { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.sample-top > span:last-child { margin-left: auto; font-size: .66rem; color: var(--muted); padding-left: 4px; }
.sample-balance { margin-top: 23px; display: flex; flex-direction: column; gap: 6px; }
.sample-balance > span { color: var(--muted); font-size: .77rem; }
.sample-balance > strong { font-size: clamp(1.85rem, 3.25vw, 2.75rem); line-height: 1; letter-spacing: -.07em; }
.sample-chart { height: 116px; display: grid; gap: 6px; grid-template-columns: repeat(8, 1fr); align-items: end; margin: 15px 0; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(to bottom, transparent 0 26px, #e9e2f1 27px 28px); }
.sample-chart i { display: block; background: #bfc3ff; height: var(--h); border-radius: 6px 6px 0 0; }
.sample-chart i:nth-child(2n) { background: #d6d4fb; }
.sample-chart i:last-child { background: #7566b4; }
.sample-bottom { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sample-bottom span { display: flex; flex-direction: column; font-size: .73rem; color: var(--muted); }
.sample-bottom strong { font-size: .91rem; color: var(--ink); margin-top: 4px; }
.marketing-modes, .marketing-plans { padding-top: clamp(36px, 6vw, 74px); }
.section-title { margin-bottom: 18px; }
.section-title h2 { font-size: clamp(1.4rem, 2.5vw, 2.25rem); letter-spacing: -.052em; line-height: 1.14; }
.section-title p { margin-top: 7px; color: var(--muted); font-size: .93rem; }
.mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.mode-card { padding: clamp(20px, 3vw, 30px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.mode-card .shell-icon { display: grid; place-items: center; width: 36px; height: 36px; color: var(--green); background: #ede5fd; padding: 8px; border-radius: 11px; }
.mode-card h3, .mode-card strong { margin-top: 14px; color: var(--ink); font-size: 1.15rem; letter-spacing: -.04em; }
.mode-card p, .mode-card > span:not(.shell-icon) { margin-top: 7px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: clamp(16px, 2vw, 23px); border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.plan-featured { background: #ece9ff; border-color: #b8acee; }
.plan-card h3 { font-size: 1.04rem; font-weight: 790; letter-spacing: -.025em; min-height: 2.2em; display: flex; align-items: center; }
.plan-price { line-height: 1.05; font-weight: 810; letter-spacing: -.065em; font-size: clamp(1.45rem, 2.4vw, 2.1rem); }
.plan-price small, .dialog-price small { color: var(--muted); font-size: .7rem; letter-spacing: 0; font-weight: 740; }
.plan-copy { color: var(--muted); font-size: .84rem; min-height: 4.3em; }
.plan-card .button { width: 100%; margin-top: auto; justify-content: space-between; text-align: left; }
.marketing-footer { margin-top: 44px; border-top: 1px solid var(--line); padding: 23px 0 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 20px; }
.marketing-footer .brand { margin-right: auto; }
.preview-note { display: block; color: #58492a; background: #f7efd9; border: 1px solid #e3d3a5; border-radius: 12px; padding: 11px 14px; margin-bottom: 18px; font-size: .82rem; line-height: 1.4; }
.sign-in-error { margin-bottom: 18px; }
.application { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 234px minmax(0,1fr); }
.sidebar { background: #f1ebf6; padding: 28px 18px; border-right: 1px solid var(--line); height: 100vh; height: 100dvh; position: sticky; top: 0; display: flex; flex-direction: column; gap: 34px; overflow: auto; }
.sidebar .brand { margin-left: 6px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 9px; padding: 10px; min-height: 41px; border-radius: 9px; text-decoration: none; color: var(--muted); font-size: .87rem; font-weight: 710; }
.sidebar nav a:hover { background: #eee5f6; color: var(--green); }
.sidebar nav a[aria-current="page"] { background: #e2daf8; color: var(--deep); }
.sidebar-account { border-top: 1px solid #dfd5eb; padding: 16px 6px 0; margin-top: auto; display: flex; flex-direction: column; min-width: 0; gap: 6px; }
.sidebar-account .pill { background: #eee7fa; }
.sidebar-support { display: grid; justify-items: start; gap: 1px; margin-bottom: 11px; padding-bottom: 8px; border-bottom: 1px solid #dfd5eb; }
.sidebar-support .text-button { min-height: 29px; }
.account-name { font-size: .86rem; font-weight: 790; overflow-wrap: anywhere; }
.account-email { font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
.app-content { width: 100%; max-width: 1550px; margin-inline: auto; padding: clamp(18px, 3vw, 42px); display: flex; flex-direction: column; align-items: stretch; }
.app-footer { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; min-height: 57px; margin-top: auto; padding-top: 25px; }
.app-footer > a { margin-right: auto; color: var(--muted); text-decoration: none; font-weight: 730; font-size: .82rem; }
.app-footer > button { display: none; }
.trial-note { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-radius: 10px; border: 1px solid #d7c8ef; background: #efe9fa; color: var(--green); margin-bottom: 20px; font-size: .82rem; }
.trial-note strong { font-variant-numeric: tabular-nums; margin-left: 5px; }
.trial-note a { margin-left: auto; font-weight: 800; text-underline-offset: 3px; }
.page-heading { margin-bottom: 23px; }
.page-heading h1 { font-size: clamp(1.85rem, 3.4vw, 3.2rem); letter-spacing: -.063em; line-height: 1.05; }
.page-heading p:not(.kicker) { margin-top: 9px; color: var(--muted); }
.onboarding { max-width: 850px; }
.onboarding > .button { margin-top: 18px; }
.mode-choice { display: flex; flex-direction: column; align-items: flex-start; position: relative; cursor: pointer; }
.mode-choice:has(input:checked) { border-color: #8573bf; background: #f8f4fe; box-shadow: 0 0 0 1px #8573bf; }
.mode-choice input { position: absolute; top: 20px; right: 20px; }
.notice { background: #f0eafa; border: 1px solid #e0d5ee; border-radius: 10px; padding: 12px 13px; color: var(--green); font-size: .87rem; line-height: 1.5; }
.admin-heading, .admin-section-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.stats-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; margin-bottom: 12px; }
.stat-card { padding: 18px 20px; border: 1px solid var(--line); border-radius: 15px; background: var(--paper); display: flex; flex-direction: column; align-items: flex-start; gap: 9px; }
.stat-card span { font-size: .82rem; color: var(--muted); font-weight: 650; }
.stat-card strong { font-size: 2.1rem; line-height: 1; letter-spacing: -.07em; }
.admin-section, .orders-section { margin: 17px 0; border: 1px solid var(--line); padding: clamp(16px,2vw,25px); border-radius: var(--radius); background: var(--paper); }
.admin-section .section-title h2, .orders-section h2 { font-size: 1.36rem; letter-spacing: -.04em; }
.orders-section h2 { margin-bottom: 14px; }
.orders-section p { color: var(--muted); font-size: .9rem; }
.admin-section .section-title p { font-size: .85rem; }
.empty-box { color: var(--muted); background: var(--bg); border-radius: 9px; padding: 18px 12px; font-size: .88rem; }
.table-scroller { width: 100%; overflow-x: auto; }
.shell-table { width: 100%; border-collapse: collapse; text-align: left; font-size: .82rem; }
.shell-table thead { color: var(--muted); background: #f6f1fa; }
.shell-table td, .shell-table th { padding: 11px 10px; vertical-align: top; text-align: left; border-bottom: 1px solid #eee7f3; }
.shell-table small { display: block; margin-top: 4px; color: var(--muted); font-size: .74rem; }
.row-actions { display: flex; gap: 5px; flex-wrap: wrap; }
.muted-value { color: var(--muted); }
.support-cell { min-width: 132px; }
.support-actions { margin-top: 7px; }
.feature-options { display: grid; gap: 7px; min-width: 110px; }
.feature-options label { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.feature-options input { width: 15px; height: 15px; flex: 0 0 15px; }
.online-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #8d9c91; }
.online-dot.is-online { background: #307a43; }
dialog { width: min(calc(100% - 32px), 510px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 21px; background: var(--paper); color: var(--ink); padding: 24px; box-shadow: 0 20px 60px #1f153567; }
dialog::backdrop { background: #221632aa; }
dialog.support-data-dialog { width: min(calc(100% - 32px), 700px); }
.support-data-dialog section + section { margin-top: 17px; }
.support-data-dialog h3 { margin-bottom: 9px; }
.support-amount { white-space: nowrap; }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog-header h2 { font-size: 1.55rem; line-height: 1.08; letter-spacing: -.05em; margin-bottom: 14px; }
.dialog-close { display: inline-grid; place-items: center; font-size: 1.4rem; background: #f0eaf7; border: 0; width: 32px; min-width: 32px; height: 32px; border-radius: 50%; color: var(--ink); line-height: 1; }
.dialog-close:hover { background: #e8ddf4; }
#shell-dialog p:not(.form-error) { color: var(--muted); margin: 4px 0 13px; font-size: .92rem; }
#shell-dialog p.dialog-price { color: var(--ink); font-size: 1.78rem; letter-spacing: -.05em; font-weight: 810; line-height: 1.1; }
.shell-form { margin-top: 13px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.shell-form label { font-weight: 720; font-size: .85rem; }
.shell-form .field { width: 100%; }
.form-error { color: #9c332b; font-size: .88rem; margin: 8px 0 0; }
.payment-rails { display: grid; gap: 8px; }
.payment-box { display: grid; gap: 7px; padding: 13px; background: #f1eafb; border-radius: 10px; font-size: .86rem; }
.payment-alias { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px; }
.payment-alias code { font-size: .87rem; background: #ffffffad; border-radius: 5px; padding: 4px; overflow-wrap: anywhere; }
#toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; width: max-content; max-width: calc(100vw - 40px); line-height: 1.4; background: var(--deep); padding: 12px 15px; border-radius: 10px; color: var(--paper); font-size: .9rem; box-shadow: var(--shadow); }
#toast[data-kind="error"] { background: #812e2b; }
@media (max-width: 1060px) {
  .plan-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 790px) {
  .application { display: block; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin-left: 0; margin-right: auto; }
  .sidebar nav { display: flex; flex-wrap: wrap; gap: 4px; order: 3; width: 100%; }
  .sidebar nav a { padding: 7px 9px; min-height: 36px; font-size: .79rem; }
  .sidebar-account { margin-top: 0; padding: 0; border: 0; text-align: right; display: block; }
  .sidebar-account .pill, .sidebar-account .account-email, .sidebar-support { display: none; }
  .sidebar-account .account-name { display: block; max-width: 155px; }
  .sidebar-account .text-button { min-height: 25px; }
  .app-footer > button { display: inline-flex; }
  .hero { grid-template-columns: 1fr; }
  .hero-illustration { min-height: 315px; }
  .illustration-orbit { width: min(56vw, 360px); }
  .hero-copy { padding: 32px; }
  .hero-copy h1 { max-width: 12ch; }
}
@media (max-width: 510px) {
  .marketing-header { height: 64px; }
  .marketing-header nav { display: none; }
  .marketing-header .button { min-height: 39px; padding: 8px 10px; }
  .marketing .brand { font-size: 1.23rem; }
  .brand-mark { width: 32px; height: 32px; border-radius: 9px; font-size: 20px; }
  .hero { border-radius: 20px; }
  .hero-copy { padding: 25px 21px 29px; }
  .hero-illustration { padding: 33px 22px; min-height: 270px; }
  .sample-chart { height: 92px; }
  .mode-grid, .plan-grid { grid-template-columns: 1fr; }
  .plan-card h3, .plan-copy { min-height: auto; }
  .admin-heading, .admin-section-title { align-items: flex-start; flex-wrap: wrap; }
  .stats-grid { gap: 6px; }
  .stat-card { padding: 11px 8px; }
  .stat-card span { font-size: .74rem; }
  .stat-card strong { font-size: 1.58rem; }
  .app-footer, .marketing-footer { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; }
}
