:root {
  color-scheme: light;
  --bg: #F5F2EB; --surface: #FFFDF9; --soft: #F5F1E8;
  --ink: #0B0B0C; --copy: #53535A; --muted: #716D64;
  --gold: #8C6B2F; --gold-light: #E8C988; --rule: #D6CCB5;
  --green: #2F7D5C; --amber: #876012; --red: #9A2B2B;
  --serif: "Cormorant Garamond", Georgia, serif; --sans: Inter, Arial, sans-serif;
  font-family: var(--sans); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 13px; line-height: 1.5; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -100px; left: 24px; z-index: 100; background: var(--ink); color: white; padding: 12px 20px; }
.skip:focus { top: 12px; }
.app-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh; padding: 30px 12px 24px; display: flex; flex-direction: column; color: #FFF8E8; background: linear-gradient(110deg, #E8C988 0%, #C29A4A 55%, #8C6B2F 100%); border-right: 1px solid rgba(255,248,224,.42); box-shadow: inset -1px 0 rgba(255,255,255,.15), 8px 0 26px rgba(140,107,47,.08); }
.wordmark { font: 500 40px/1 var(--serif); letter-spacing: -.5px; padding: 0 10px 27px; border-bottom: 1px solid rgba(255,248,224,.2); text-shadow: 0 1px 1px #5d411638; }
.wordmark span { font-size: .6em; color: #FFF3CB; }
.workspace-label { display: flex; align-items: center; gap: 10px; padding: 24px 10px 30px; font-size: 9px; font-weight: 600; letter-spacing: .08em; }
.presence { width: 6px; height: 6px; border-radius: 50%; background: #FFF8E8; box-shadow: 0 0 0 3px #fff8e82b; }
nav { display: grid; gap: 5px; }
nav button { border: 1px solid transparent; background: none; color: #FFF8E8; display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; min-height: 52px; padding: 13px 14px; border-radius: 8px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
nav button > span:first-child { width: 20px; font-size: 21px; font-weight: 400; text-align: center; line-height: 1; }
nav button:hover { background: #5d41161f; }
nav button[aria-current] { background: #e8c98826; border-color: #fff3cb40; box-shadow: inset 3px 0 #E8C988, 0 8px 22px #5d411621; color: #FFF; }
nav button:focus-visible, .sidebar a:focus-visible { outline-color: #FFF8E8; }
.nav-count { font-size: 10px; margin-left: auto; padding: 0 3px; }
.sidebar-bottom { margin-top: auto; padding: 36px 10px 0; }
.eyebrow { font-size: 9px; letter-spacing: .16em; font-weight: 600; color: var(--gold); }
.sidebar-bottom .eyebrow { color: #FFF3CB; font-size: 8px; }
.sidebar-bottom a { font-size: 10px; display: flex; align-items: center; justify-content: space-between; min-height: 44px; border-top: 1px solid #fff3cb40; margin-top: 12px; }
.workspace { min-width: 0; padding: 24px 36px 0; }
.topbar { max-width: 1080px; margin: 0 auto; min-height: 58px; padding: 10px 16px; border: 1px solid #e3dbcaa6; border-radius: 14px; display: flex; justify-content: space-between; align-items: center; gap: 16px; background: #fffdf9cc; box-shadow: 0 12px 30px #8c6b2f0a; }
.breadcrumb > span { font-size: 8px; font-weight: 700; letter-spacing: .16em; color: var(--gold); }
.breadcrumb h1 { font-size: 12px; font-weight: 400; color: var(--copy); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 14px; }
.workspace-status { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.workspace-status i { width: 5px; height: 5px; background: var(--muted); border-radius: 50%; }
.workspace-status[data-state=online] i { background: var(--green); }
.workspace-status[data-state=error] i { background: var(--amber); }
.icon-button { background: transparent; border: 1px solid #d6ccb5b3; width: 38px; height: 38px; border-radius: 6px; font-size: 22px; line-height: 1; color: var(--gold); }
.icon-button:hover { background: var(--soft); }
main { max-width: 1080px; margin: auto; padding-top: 26px; }
.hero { position: relative; overflow: hidden; border: 1px solid var(--rule); border-radius: 10px; padding: 28px 32px; display: grid; grid-template-columns: 1fr 205px; align-items: center; gap: 28px; background: linear-gradient(105deg,#FFFDF9,#F1E8D4); box-shadow: 0 18px 48px #8c6b2f10; }
.hero-glow { pointer-events: none; position: absolute; inset: 0; background: radial-gradient(ellipse at 75% 30%,#e8c98844,transparent 65%); }
.hero-copy, .hero-insight { position: relative; }
.hero-copy h2 { font: 500 clamp(32px,3.4vw,44px)/1.05 var(--serif); margin: 13px 0 10px; letter-spacing: -.6px; }
.hero-copy > p:not(.eyebrow) { font-size: 11px; color: var(--copy); max-width: 380px; line-height: 1.7; margin-bottom: 22px; }
.button { border: 1px solid var(--rule); border-radius: 7px; min-height: 42px; padding: 0 16px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; font-size: 10px; font-weight: 600; letter-spacing: .035em; transition: background .15s, border-color .15s; }
.button.primary { background: linear-gradient(110deg,#E8C988,#C29A4A 55%,#8C6B2F); color: #241b0d; border-color: #c29a4a; box-shadow: 0 8px 18px #8c6b2f24; }
.button.primary:hover { background: linear-gradient(110deg,#eed5a1,#d5af64 55%,#b58b43); }
.button.secondary { background: #fffdf9; color: var(--copy); }
.button.secondary:hover { background: #F2E9D7; border-color: var(--gold); }
.button.danger { background: var(--red); border-color: var(--red); color: white; }
.hero-insight { padding: 20px 0 20px 25px; border-left: 1px solid var(--rule); }
.insight-label { display: flex; align-items: center; gap: 7px; font-size: 8px; font-weight: 600; letter-spacing: .1em; color: var(--gold); }
.pulse-dot { width: 4px; height: 4px; background: var(--gold); border-radius: 50%; }
.insight-count { font: 500 56px/1 var(--serif); margin: 14px 0 12px; }
.insight-count span { display: block; margin-top: 4px; font: 10px var(--sans); color: var(--copy); }
.hero-insight > p { font-size: 10px; color: var(--muted); }
.insight-footer { border-top: 1px solid var(--rule); margin-top: 15px; padding-top: 12px; display: flex; justify-content: space-between; font-size: 8px; color: var(--muted); }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 25px 0 30px; border: 1px solid #d6ccb5a6; border-radius: 9px; background: #fffdf970; padding: 18px 0; }
.metric { padding: 0 20px; border-right: 1px solid var(--rule); }
.metric:last-child { border: 0; }
.metric > span { color: var(--copy); font-size: 10px; display: block; }
.metric strong { font: 500 34px/1 var(--serif); display: block; margin: 8px 0; }
.metric small { font-size: 8px; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.section-heading h2 { font: 500 32px/1.1 var(--serif); margin: 6px 0; }
.section-heading p:not(.eyebrow) { color: var(--muted); font-size: 11px; }
.panel { margin: 0 0 26px; }
.account-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.account { border: 1px solid var(--rule); background: var(--surface); border-radius: 10px; padding: 23px; display: flex; flex-direction: column; gap: 18px; box-shadow: 0 14px 35px #8c6b2f0d; }
.account-main { display: flex; align-items: center; gap: 13px; min-width: 0; }
.account-avatar { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 9px; border: 1px solid #d6ccb5; background: linear-gradient(135deg,#F8EBD0,#EAD7AE); color: #795719; font: 500 27px var(--serif); }
.account-title { font: 600 24px/1.1 var(--serif); overflow-wrap: anywhere; }
.account-phone { font-size: 12px; color: var(--copy); margin-top: 5px; }
.account-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 9px; color: var(--muted); margin-top: 10px; }
.account-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; border: 1px solid #ded4bf; border-radius: 8px; background: #F5F1E8; margin-top: auto; }
.badge { display: inline-flex; gap: 6px; align-items: center; font-size: 9px; padding: 4px 8px; border-radius: 20px; white-space: nowrap; border: 1px solid var(--rule); color: var(--copy); }
.badge:before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.badge.good { color: #28694c; background: #e5f2e9; border-color: #b6d6c1; }
.badge.warn { color: #805908; background: #fcf0d2; border-color: #e4ce9f; }
.badge.bad { color: var(--red); background: #f9e4e0; border-color: #e7bdb4; }
.account-actions .button { min-height: 34px; font-size: 9px; padding: 0 13px; }
.text-button { border: 0; background: none; color: var(--gold); padding: 10px 0; font-size: 10px; min-height: 40px; }
.text-button:hover { text-decoration: underline; }
.account details { border-top: 1px solid #e7dfd0; padding-top: 12px; color: var(--muted); font-size: 10px; }
.account summary { cursor: pointer; width: max-content; padding: 4px 0; color: var(--gold); }
.details-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; margin-top: 16px; }
.details-grid b { display: block; font-weight: 500; color: var(--copy); overflow-wrap: anywhere; margin-top: 4px; }
.empty-state { grid-column: 1/-1; border: 1px dashed var(--rule); border-radius: 10px; text-align: center; padding: 34px 24px; background: #fffdf980; }
.empty-state h3 { font: 500 28px var(--serif); margin: 8px 0; }
.empty-state p { font-size: 11px; color: var(--muted); max-width: 450px; margin: 0 auto 20px; }
.empty-symbol { font: 32px var(--serif); color: var(--gold); }
.help-strip { border-top: 1px solid var(--rule); padding: 23px 0 8px; display: flex; align-items: center; gap: 14px; margin-top: 28px; }
.help-symbol { width: 25px; height: 25px; flex-shrink: 0; display: grid; place-items: center; border: 1px solid var(--rule); border-radius: 50%; color: var(--gold); font: 19px var(--serif); }
.help-strip h3 { font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.help-strip p { font-size: 10px; color: var(--muted); max-width: 600px; line-height: 1.6; }
.help-strip a { font-size: 10px; white-space: nowrap; color: var(--gold); margin-left: auto; min-height: 44px; display: flex; align-items: center; gap: 10px; }
footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 25px 0; color: var(--muted); font-size: 9px; }
footer div { display: flex; gap: 20px; }
.footer-dot { margin: 0 8px; color: var(--gold); }
footer a:hover { color: var(--ink); }
.notice { padding: 14px 17px; border: 1px solid #d9c28e; border-radius: 8px; margin-bottom: 22px; background: #fff3d7; color: #72551b; font-size: 11px; }
.notice button { margin-left: 12px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; background: var(--surface); }
.setup-item { padding: 24px; border-bottom: 1px solid var(--rule); }
.setup-item:nth-child(odd) { border-right: 1px solid var(--rule); }
.setup-item > span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 8px; }
.setup-item strong { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.setup-item p { font-size: 11px; color: var(--muted); margin-top: 8px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 20px 0; border-bottom: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 20px; }
.timeline strong { font-size: 12px; font-weight: 500; }
.timeline p, .timeline time { font-size: 10px; color: var(--muted); margin-top: 5px; }
.skeleton { height: 196px; border-radius: 10px; border: 1px solid #e5dccb; background: linear-gradient(100deg,#efe9de 30%,#faf6ee 50%,#efe9de 70%); background-size: 200% 100%; animation: shimmer 1.5s ease-in-out infinite; }
.skeleton:after { content: ""; display: block; width: 150px; height: 12px; background: #dfd4bf; margin: 28px 24px; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
dialog { color: var(--ink); background: var(--surface); border: 1px solid var(--gold); border-radius: 12px; max-width: 480px; padding: 30px; }
dialog::backdrop { background: #17120b80; backdrop-filter: blur(3px); }
dialog h2 { font: 500 32px/1.1 var(--serif); margin: 10px 0 15px; }
dialog p:not(.eyebrow) { font-size: 12px; color: var(--copy); }
.dialog-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 25px; }
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); max-width: calc(100vw - 32px); background: #1e231d; color: #f8f4ea; border: 1px solid #4d604c; border-radius: 8px; padding: 13px 22px; box-shadow: 0 12px 35px #0003; font-size: 12px; z-index: 90; }
#toast[data-error=true] { background: #692e27; border-color: #b9857b; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 200px minmax(0,1fr); }
  .sidebar { padding: 26px 10px 20px; }
  .workspace { padding: 22px 26px 0; }
  .hero { padding: 25px; grid-template-columns: 1fr 175px; gap: 20px; }
  .hero-insight { padding-left: 20px; }
  .account { padding: 18px; }
  .account-title { font-size: 22px; }
  .account-avatar { width: 36px; height: 36px; }
  .metric { padding: 0 15px; }
}
@media (max-width: 800px) {
  .app-shell { display: block; }
  .sidebar { height: auto; position: relative; padding: 20px 16px 10px; display: block; border-right: 0; }
  .wordmark { font-size: 34px; border: 0; padding: 0 6px; display: inline-block; }
  .workspace-label { position: absolute; right: 20px; top: 24px; padding: 0; font-size: 8px; }
  .sidebar-bottom { display: none; }
  nav { display: flex; gap: 4px; margin-top: 20px; }
  nav button { flex: 1; min-width: 0; justify-content: center; padding: 8px 6px; gap: 7px; min-height: 44px; font-size: 9px; letter-spacing: .055em; }
  nav button > span:first-child { font-size: 18px; width: 18px; }
  .nav-count { margin-left: 0; }
  .workspace { padding: 20px 22px 0; }
  .hero-copy h2 { font-size: 37px; }
}
@media (max-width: 560px) {
  .workspace { padding: 16px 16px 0; }
  .topbar { padding: 10px 12px; border-radius: 10px; }
  .topbar-actions { gap: 10px; }
  .workspace-status { font-size: 9px; }
  .icon-button { width: 36px; height: 36px; }
  .nav-count { display: none; }
  main { padding-top: 18px; }
  .hero { display: block; padding: 25px 22px; }
  .hero-copy h2 { font-size: 34px; max-width: 270px; }
  .hero-copy > p:not(.eyebrow) { font-size: 11px; }
  .hero-insight { display: none; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); padding: 0; margin: 20px 0 27px; }
  .metric { padding: 16px 18px; border-bottom: 1px solid var(--rule); }
  .metric:nth-child(even) { border-right: 0; }
  .metric:nth-last-child(-n+2) { border-bottom: 0; }
  .metric strong { font-size: 32px; }
  .metric small { font-size: 8px; }
  .section-heading { align-items: flex-start; gap: 12px; margin-bottom: 17px; }
  .section-heading h2 { font-size: 29px; }
  .section-heading p:not(.eyebrow) { font-size: 10px; max-width: 210px; }
  .section-heading .button { font-size: 9px; gap: 5px; padding: 0 11px; flex-shrink: 0; margin-top: 11px; }
  .eyebrow { font-size: 8px; }
  .account-list { grid-template-columns: 1fr; gap: 13px; }
  .account { padding: 20px; gap: 16px; }
  .account-title { font-size: 25px; }
  .account-avatar { width: 42px; height: 42px; }
  .account-actions .button { min-height: 44px; }
  .account summary { padding: 8px 0; }
  .help-strip { align-items: flex-start; gap: 11px; flex-wrap: wrap; margin-top: 25px; padding: 20px 0 4px; }
  .help-strip > div { flex: 1; }
  .help-strip a { margin: 0 0 0 36px; min-height: 34px; }
  footer { font-size: 8px; flex-wrap: wrap; padding: 22px 0; gap: 13px; }
  .setup-grid { grid-template-columns: 1fr; }
  .setup-item:nth-child(odd) { border-right: 0; }
  .timeline li { display: block; }
  .timeline time { display: block; }
  .dialog-actions { flex-direction: column-reverse; }
  dialog { max-width: calc(100vw - 30px); padding: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *:before, *:after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.readiness-panel { padding: 20px 24px; margin-bottom: 20px; border: 1px solid #dad8d0; border-radius: 14px; background: #f7f6f1; }
.readiness-panel h2 { font-size: 17px; margin: 0 0 6px; }
.readiness-panel p { margin: 0; line-height: 1.6; color: #575950; }
.readiness-panel[data-tone="good"] { border-color: #b5c9bc; background: #f0f6f2; }
#registerDialog label { display: block; margin: 14px 0 6px; font-weight: 600; }
#registerDialog input { display: block; box-sizing: border-box; width: 100%; padding: 12px; border: 1px solid #bbbdb6; border-radius: 8px; font: inherit; letter-spacing: .3em; }
.pin-note { font-size: 13px; }
