:root {
  --ink: #172b28;
  --muted: #65736f;
  --paper: #f5f3ed;
  --surface: #fffefa;
  --line: #e5e4dc;
  --green: #173e36;
  --green-2: #2c5b4e;
  --lime: #d9f078;
  --coral: #df6b4f;
  --soft-green: #e8f1e8;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Aptos", "Segoe UI", sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--paper); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 252px minmax(0, 1fr); }
.sidebar { background: var(--green); color: #f5f4e9; padding: 28px 18px 20px; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 11px; align-items: center; padding: 3px 8px 35px; }
.brand-mark { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 12px 12px 12px 3px; background: var(--lime); color: var(--green); font-size: 12px; font-weight: 850; letter-spacing: -.08em; }
.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: -.02em; font-size: 15px; }
.brand small { margin-top: 3px; color: #bacbc2; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.sidebar-label, .eyebrow { font-size: 10px; letter-spacing: .16em; font-weight: 800; color: #7c8983; }
.sidebar-label { padding: 0 12px; margin: 2px 0 11px; color: #98b2a7; }
.nav-links { display: grid; gap: 4px; margin-bottom: 30px; }
.nav-links a { color: #d8e0db; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 8px; font-size: 13px; transition: background .18s, color .18s; }
.nav-links a:hover { background: #ffffff12; color: white; }
.nav-links a.active { background: #ffffff17; color: white; box-shadow: inset 3px 0 var(--lime); }
.nav-icon { width: 17px; text-align: center; font-size: 17px; color: #bbd0c4; }
.sidebar-foot { margin-top: auto; border-top: 1px solid #ffffff20; padding: 17px 8px 0; font-size: 11px; color: #b8cbc0; }
.status-dot, .connection-state i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b8df71; margin-right: 7px; }
.main-area { min-width: 0; padding: 0 42px 18px; }
.topbar { height: 78px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.breadcrumb { color: #76817b; font-size: 12px; }
.profile-chip { display: flex; align-items: center; gap: 10px; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #e6e9dc; color: var(--green); font-weight: 750; }
.profile-name { font-size: 12px; font-weight: 700; }
.profile-name small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; font-weight: 500; }
.profile-chip form { margin-left: 14px; }
.text-button, .text-link { border: 0; padding: 0; background: transparent; color: var(--green-2); cursor: pointer; font-size: 12px; font-weight: 700; }
.text-button:hover, .text-link:hover { color: var(--coral); }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 39px 0 24px; }
.page-heading h1 { margin: 8px 0 6px; font: 500 clamp(32px, 4vw, 43px)/1.05 var(--serif); letter-spacing: -.04em; }
.heading-dot { color: var(--coral); }
.page-heading p { color: var(--muted); font-size: 13px; margin: 0; }
.heading-date { display: flex; align-items: center; gap: 10px; background: #ecebe3; padding: 11px 14px; border-radius: 9px; margin-bottom: 4px; }
.date-mark { color: var(--green-2); font-size: 18px; }
.heading-date small, .heading-date strong { display: block; }
.heading-date small { font-size: 9px; color: var(--muted); letter-spacing: .14em; }
.heading-date strong { margin-top: 3px; font-size: 12px; }
.metric-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 13px; margin-bottom: 16px; }
.metric-card { min-height: 132px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); padding: 17px 19px; }
.metric-main { background: var(--green); border-color: var(--green); color: white; }
.metric-top { display: flex; justify-content: space-between; color: #82918a; font-size: 9px; letter-spacing: .14em; font-weight: 800; }
.metric-main .metric-top { color: #bed0c3; }
.metric-symbol { font-size: 18px; line-height: .7; color: var(--coral); }
.metric-main .metric-symbol { color: var(--lime); }
.metric-number { display: block; margin-top: 10px; font: 500 34px/1 var(--serif); }
.metric-text { display: block; margin-top: 17px; font: 500 21px/1 var(--serif); }
.metric-caption { display: block; margin-top: 8px; color: #809089; font-size: 11px; }
.metric-main .metric-caption { color: #c4d2c8; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .85fr); gap: 15px; align-items: stretch; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; }
.accounts-panel, .guidance-panel { padding: 21px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.panel-heading h2 { margin: 5px 0 0; font: 500 23px/1.15 var(--serif); letter-spacing: -.02em; }
.count-pill { display: inline-grid; min-width: 28px; height: 24px; place-items: center; border-radius: 100px; padding: 0 7px; background: #edf0e6; color: var(--green); font-size: 11px; font-weight: 750; }
.account-list { border-top: 1px solid var(--line); margin-bottom: 16px; }
.account-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
.mail-icon { width: 35px; height: 35px; border-radius: 9px; display: grid; place-items: center; background: #eef2e9; color: var(--green-2); }
.account-copy { min-width: 0; flex: 1; }
.account-copy strong, .account-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-copy strong { font-size: 12px; }
.account-copy small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.connection-state { color: #79837e; font-size: 10px; white-space: nowrap; }
.connection-state i { width: 6px; height: 6px; background: #b9c1b9; margin-right: 5px; }
.connection-state.good { color: #39714d; }
.connection-state.good i { background: #5d9c66; }
.connection-state.bad { color: #a44534; }
.connection-state.bad i { background: var(--coral); }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 15px; border: 0; border-radius: 7px; padding: 11px 15px; cursor: pointer; font-weight: 750; font-size: 12px; transition: transform .15s, background .15s; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--green); color: white; }
.button-primary:hover { background: var(--green-2); }
.inline-form { display: inline; margin-left: 12px; }
.session-timer { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; white-space: nowrap; }
.session-timer strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.session-timer button { border: 0; background: transparent; color: var(--green-2); font: inherit; font-weight: 750; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.session-timer button:disabled { opacity: .6; cursor: wait; }
.session-feedback { color: #39714d; }
.danger-link { border: 0; background: transparent; color: #9d392f; cursor: pointer; font: inherit; padding: 0; }
.danger-link:hover { text-decoration: underline; }
.button-wide { width: 100%; margin-top: 9px; }
.guidance-panel { background: #e8eee6; border-color: #e0e8de; position: relative; overflow: hidden; }
.guide-kicker { display: flex; align-items: center; gap: 8px; color: #5d7567; font-size: 9px; letter-spacing: .13em; font-weight: 800; }
.guide-icon { display: grid; place-items: center; width: 24px; height: 24px; background: var(--lime); color: var(--green); border-radius: 7px; font-size: 15px; }
.guidance-panel h2 { margin: 17px 0; font: 500 27px/1.08 var(--serif); }
.steps { display: grid; }
.step { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid #d2ded2; }
.step > span { color: #7a927e; font: 500 12px var(--serif); }
.step strong, .step small { display: block; }
.step strong { font-size: 11px; }
.step small { color: #748079; margin-top: 3px; font-size: 10px; }
.guide-foot { border-left: 2px solid var(--coral); padding-left: 10px; margin: 13px 0 0; color: #586760; font-size: 10px; line-height: 1.5; }
.recent-panel { margin-top: 15px; padding: 20px 21px 2px; }
.recent-panel .panel-heading { margin-bottom: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 560px; }
th { text-align: left; padding: 10px 9px; color: #859089; font-size: 9px; letter-spacing: .11em; font-weight: 800; border-bottom: 1px solid var(--line); }
td { padding: 12px 9px; font-size: 11px; border-bottom: 1px solid #eeede7; color: #59655f; }
td strong, td small { display: block; }
td strong { color: var(--ink); font-size: 11px; }
td small { color: var(--muted); margin-top: 4px; max-width: 350px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty-state { padding: 22px 10px 26px; text-align: center; }
.empty-art { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: #eaf0e6; color: var(--green-2); font: 24px var(--serif); }
.empty-state h3 { margin: 10px 0 4px; font: 500 19px var(--serif); }
.empty-state p, .empty-inline { color: var(--muted); font-size: 11px; line-height: 1.55; }
.empty-inline { padding: 18px 4px 21px; }
.page-footer { display: flex; justify-content: space-between; padding: 20px 1px 0; color: #939b95; font-size: 9px; letter-spacing: .06em; }
.messages { padding-top: 12px; }
.message, .form-error { padding: 10px 12px; border-radius: 7px; background: #fff0eb; border: 1px solid #f0c9ba; color: #923c2e; font-size: 12px; margin-bottom: 12px; }
.auth-messages { position: absolute; top: 18px; right: 18px; max-width: 440px; z-index: 3; }
.auth-screen { min-height: 100vh; display: grid; grid-template-columns: minmax(330px, .85fr) minmax(400px, 1.15fr); background: var(--surface); }
.auth-aside { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 30px 42px; background: var(--green); color: white; overflow: hidden; }
.brand-light { position: relative; z-index: 1; padding: 0; }
.auth-message { position: relative; z-index: 1; max-width: 430px; padding: 45px 0; }
.auth-message .eyebrow { color: #b1c8b8; }
.auth-message h1 { margin: 14px 0; font: 500 clamp(46px, 6vw, 72px)/.98 var(--serif); letter-spacing: -.06em; }
.auth-message h1 em { color: var(--lime); font-weight: 400; }
.auth-message p { color: #c5d3c9; max-width: 360px; font-size: 14px; line-height: 1.7; }
.auth-stamp { display: inline-flex; align-items: center; gap: 9px; margin-top: 24px; border: 1px solid #ffffff2c; border-radius: 100px; padding: 9px 13px; color: #d6e1d9; font-size: 11px; }
.auth-stamp span { color: var(--lime); }
.auth-aside-foot { position: relative; z-index: 1; color: #9fb8a8; font-size: 9px; letter-spacing: .15em; }
.auth-main { position: relative; display: grid; place-items: center; padding: 44px 32px; }
.auth-form-wrap { width: min(100%, 360px); }
.auth-form-wrap h2 { margin: 9px 0 6px; font: 500 34px var(--serif); letter-spacing: -.04em; }
.muted { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 0 0 23px; }
.stack-form { display: grid; gap: 9px; }
.stack-form label { margin-top: 8px; font-size: 11px; font-weight: 750; }
.stack-form input { width: 100%; border: 1px solid #d9ddd4; outline: none; border-radius: 7px; background: #fff; padding: 12px 13px; font-size: 13px; transition: border .15s, box-shadow .15s; }
.stack-form input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px #2c5b4e18; }
.auth-note { display: flex; gap: 11px; align-items: center; border-top: 1px solid var(--line); margin-top: 26px; padding-top: 18px; color: var(--green-2); font-size: 11px; font-weight: 700; }
.auth-note small { display: block; margin-top: 3px; color: var(--muted); font-weight: 400; }
.lock-icon { display: grid; place-items: center; width: 31px; height: 31px; background: #edf1e8; border-radius: 8px; font-size: 20px; }
.auth-version { position: absolute; right: 32px; bottom: 21px; color: #9aa49d; font-size: 8px; letter-spacing: .14em; }
.auth-version span { color: var(--coral); padding: 0 4px; }
.secret-box { display: grid; gap: 7px; padding: 14px; margin: 18px 0; border-radius: 8px; border: 1px solid var(--line); background: #f7f6f0; }
.secret-box small { color: #7a8880; font-size: 9px; letter-spacing: .1em; }
.secret-box strong { font-size: 12px; margin-bottom: 6px; }
.secret-box code { padding: 9px; border-radius: 5px; background: #e9ecdf; color: var(--green); letter-spacing: .08em; overflow-wrap: anywhere; font-size: 13px; }
.mfa-qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 9px; margin: 17px auto; padding: 14px; width: fit-content; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.mfa-qr { display: block; width: 220px; height: 220px; image-rendering: pixelated; }
.mfa-qr-wrap span { color: #7a8880; font-size: 9px; letter-spacing: .12em; }
.small-note { color: #838e87; font-size: 10px; line-height: 1.5; margin-top: 16px; }
.signout-form { margin-top: 18px; text-align: center; }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 218px minmax(0,1fr); }
  .main-area { padding: 0 24px 16px; }
  .content-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .app-shell { display: block; }
  .sidebar { position: relative; height: auto; min-height: 0; padding: 14px 14px 9px; }
  .sidebar .brand { padding: 0 3px 13px; }
  .sidebar-label, .sidebar-foot { display: none; }
  .nav-links { display: flex; gap: 5px; overflow-x: auto; margin: 0; }
  .nav-links a { white-space: nowrap; padding: 8px 10px; font-size: 11px; }
  .main-area { padding: 0 16px 16px; }
  .topbar { height: 60px; }
  .breadcrumb { display: none; }
  .profile-name { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar { height: auto; min-height: 60px; flex-wrap: wrap; gap: 8px; padding: 9px 0; }
  .session-timer { width: 100%; justify-content: flex-end; order: 3; font-size: 9px; }
  .session-timer button { font-size: 10px; }
  .profile-chip form { margin-left: 2px; }
  .page-heading { padding: 27px 0 17px; align-items: flex-start; }
  .heading-date { display: none; }
  .metric-grid { gap: 8px; grid-template-columns: 1fr 1fr; }
  .metric-card { min-height: 112px; padding: 13px; }
  .metric-main { grid-column: 1 / -1; }
  .metric-text { font-size: 18px; margin-top: 14px; }
  .metric-caption { font-size: 9px; }
  .accounts-panel, .guidance-panel, .recent-panel { padding: 15px; }
  .connection-state { display: none; }
  .page-footer { gap: 12px; font-size: 8px; }
  .auth-screen { grid-template-columns: 1fr; }
  .auth-aside { min-height: 195px; padding: 22px 24px; }
  .auth-message { padding: 25px 0 15px; }
  .auth-message h1 { font-size: 43px; }
  .auth-message p, .auth-stamp, .auth-aside-foot { display: none; }
  .auth-main { padding: 35px 24px 55px; }
  .auth-version { right: 24px; bottom: 16px; }
}
