:root {
  color-scheme: light;
  --ink: #111827;
  --muted: #667085;
  --line: #e7e9ee;
  --surface: #ffffff;
  --canvas: #f5f6f8;
  --accent: #20a87b;
  --accent-deep: #167a5b;
  --nav: #111827;
  --nav-muted: #9aa4b5;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(17, 24, 39, .08);
  font-family: Inter, "Hiragino Sans", "Yu Gothic UI", "Yu Gothic", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; color: var(--ink); background: var(--canvas); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.app-loading { min-height: 100vh; display: grid; place-items: center; }
.boot-panel { display: grid; justify-items: center; gap: 14px; color: var(--muted); }
.boot-panel p { margin: 0; font-size: 14px; }
.spinner { width: 24px; height: 24px; border: 2px solid #d9dde5; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand > span:last-child { display: grid; line-height: 1.05; }
.brand strong { font-size: 15px; letter-spacing: -.01em; }
.brand small { margin-top: 4px; color: var(--nav-muted); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.brand-mark { position: relative; display: grid; width: 38px; height: 38px; place-items: center; overflow: hidden; border-radius: 11px; background: var(--ink); color: white; font-size: 13px; font-weight: 800; letter-spacing: -.05em; }
.brand-mark::after { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: #46d3a5; content: ""; }
.brand-light .brand-mark { background: white; color: var(--ink); }
.brand-light strong { color: white; }
.brand-light small { color: #8390a5; }

.auth-page { display: grid; min-height: 100vh; grid-template-columns: minmax(400px, .9fr) minmax(520px, 1.1fr); background: white; }
.auth-story { position: relative; display: flex; min-height: 100vh; padding: 45px 9%; flex-direction: column; overflow: hidden; background: #111827; color: white; }
.story-copy { position: relative; z-index: 2; margin: auto 0; max-width: 560px; }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.story-copy h1 { margin: 0; font-size: clamp(44px, 5vw, 72px); font-weight: 650; line-height: 1.08; letter-spacing: -.055em; }
.story-copy > p:last-child { max-width: 460px; margin: 28px 0 0; color: #aeb7c6; font-size: 15px; line-height: 1.9; }
.story-foot { position: relative; z-index: 2; margin: 0; color: #69758a; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.story-orbit { position: absolute; inset: 0; opacity: .72; }
.orbit { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.orbit-one { right: -220px; bottom: -80px; width: 690px; height: 690px; }
.orbit-two { right: -110px; bottom: 30px; width: 470px; height: 470px; }
.orbit-dot { position: absolute; border-radius: 50%; background: var(--accent); box-shadow: 0 0 42px rgba(70, 211, 165, .65); }
.dot-one { right: 285px; bottom: 400px; width: 12px; height: 12px; }
.dot-two { right: 130px; bottom: 150px; width: 7px; height: 7px; background: #fff; }

.auth-main { display: grid; min-height: 100vh; padding: 60px 8%; place-items: center; }
.auth-card { width: min(430px, 100%); }
.mobile-brand { display: none; }
.auth-heading { margin-bottom: 32px; }
.auth-heading h2 { margin: 0; font-size: 32px; font-weight: 680; letter-spacing: -.04em; }
.auth-heading > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.form-stack { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; color: #344054; font-size: 13px; font-weight: 650; }
.field input { width: 100%; height: 51px; padding: 0 15px; border: 1px solid #d8dce4; border-radius: 11px; outline: none; background: white; color: var(--ink); font-size: 15px; font-weight: 450; transition: border-color .2s, box-shadow .2s; }
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(32,168,123,.11); }
.field input:disabled { background: #f5f6f8; color: #8a93a3; }
.field small { color: #98a0ad; font-size: 11px; font-weight: 450; }
.field-error { color: #c9364d; font-size: 12px; font-weight: 600; }
.button { display: inline-flex; min-height: 48px; padding: 0 18px; align-items: center; justify-content: center; gap: 9px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-size: 13px; font-weight: 750; transition: transform .15s, background .15s, border-color .15s; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-full { width: 100%; }
.button-primary { background: var(--ink); color: white; }
.button-primary:hover:not(:disabled) { background: #263244; }
.button-secondary { border-color: #dfe2e8; background: white; color: var(--ink); }
.button-secondary:hover:not(:disabled) { border-color: #bfc5cf; background: #fafafa; }
.button-light { background: white; color: var(--ink); }
.button-spinner { width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.35); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.text-button { padding: 0; border: 0; background: none; cursor: pointer; }
.forgot-link { margin: -6px 0 0 auto; color: var(--accent-deep); font-size: 12px; font-weight: 650; }
.auth-divider { display: flex; margin: 22px 0; align-items: center; gap: 14px; color: #a2a9b4; font-size: 11px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.auth-switch { margin: 26px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.auth-switch button { padding: 0; border: 0; background: none; color: var(--accent-deep); cursor: pointer; font-weight: 750; }
.environment-note { display: flex; margin: 42px 0 0; align-items: center; justify-content: center; gap: 8px; color: #98a0ad; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.environment-note span { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.success-icon { display: grid; width: 46px; height: 46px; margin-bottom: 24px; place-items: center; border-radius: 50%; background: #e2f7ef; color: var(--accent-deep); font-size: 22px; }
.dev-box { margin: 26px 0; padding: 20px; border: 1px solid #bfe7d9; border-radius: 14px; background: #f1fbf7; }
.dev-box strong { font-size: 12px; color: var(--accent-deep); }
.dev-box p { margin: 8px 0 18px; color: #4d695f; font-size: 12px; line-height: 1.65; }
.back-button { width: 39px; height: 39px; margin-bottom: 25px; border: 1px solid var(--line); border-radius: 10px; background: white; cursor: pointer; }

.account-app { display: grid; min-height: 100vh; grid-template-columns: 250px minmax(0, 1fr); background: var(--canvas); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; padding: 30px 20px 22px; flex-direction: column; background: var(--nav); color: white; }
.sidebar > .brand { padding: 0 10px; }
.sidebar .brand-mark { background: white; color: var(--nav); }
.main-nav { display: grid; margin-top: 45px; gap: 5px; }
.nav-label { margin: 24px 12px 7px; color: #5f6a7e; font-size: 9px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.nav-item { display: flex; height: 45px; padding: 0 12px; align-items: center; gap: 13px; border-radius: 10px; color: var(--nav-muted); font-size: 13px; font-weight: 580; transition: background .15s, color .15s; }
.nav-item:hover { color: white; background: rgba(255,255,255,.045); }
.nav-item.active { background: rgba(255,255,255,.09); color: white; }
.nav-item.active svg { color: #4ed7aa; }
.sidebar-user { display: grid; margin-top: auto; padding: 17px 8px 0; grid-template-columns: 34px minmax(0,1fr) 28px; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.08); }
.avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: #273244; color: #dbe2ec; font-size: 11px; font-weight: 800; }
.sidebar-user > span:nth-child(2) { display: grid; min-width: 0; }
.sidebar-user strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user small { overflow: hidden; margin-top: 4px; color: #758095; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user button { width: 28px; height: 28px; border: 0; background: transparent; color: #788398; cursor: pointer; }

.workspace { min-width: 0; }
.topbar { display: flex; height: 73px; padding: 0 clamp(24px, 4vw, 58px); align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.86); backdrop-filter: blur(14px); }
.breadcrumb { margin: 0; color: #9aa1ae; font-size: 11px; }
.breadcrumb span { color: #4c5565; font-weight: 650; }
.topbar-actions { display: flex; align-items: center; gap: 8px; color: #7e8796; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(32,168,123,.1); }
.menu-button { display: none; }
.view { max-width: 1320px; margin: 0 auto; padding: 48px clamp(24px, 4vw, 58px) 70px; }
.welcome-row, .page-heading { display: flex; margin-bottom: 30px; align-items: flex-end; justify-content: space-between; gap: 22px; }
.welcome-row h1, .page-heading h1 { margin: 0; font-size: clamp(28px, 3vw, 39px); font-weight: 670; letter-spacing: -.045em; }
.welcome-row > div > p:last-child, .page-heading > div > p:last-child { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.plan-hero { position: relative; display: flex; min-height: 215px; padding: 37px 40px; align-items: flex-end; justify-content: space-between; gap: 25px; overflow: hidden; border-radius: 20px; background: #151e2d; color: white; box-shadow: 0 22px 50px rgba(17,24,39,.16); }
.plan-hero > div:first-child { position: relative; z-index: 2; }
.pill { display: inline-block; margin-bottom: 16px; padding: 6px 9px; border: 1px solid rgba(255,255,255,.14); border-radius: 6px; color: #a8b2c2; font-size: 8px; font-weight: 800; letter-spacing: .16em; }
.plan-hero h2 { margin: 0; font-size: 31px; font-weight: 520; letter-spacing: -.035em; }
.plan-hero h2 strong { color: #55dbaf; font-weight: 700; }
.plan-hero p { max-width: 530px; margin: 11px 0 0; color: #94a0b3; font-size: 12px; line-height: 1.7; }
.plan-hero .button { position: relative; z-index: 2; flex: 0 0 auto; }
.plan-glow { position: absolute; top: -190px; right: -30px; width: 430px; height: 430px; border-radius: 50%; background: radial-gradient(circle, rgba(43,180,137,.18), transparent 66%); }
.stat-grid { display: grid; margin-top: 22px; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.stat-card { position: relative; min-height: 153px; padding: 25px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.stat-card[role="button"] { cursor: pointer; }
.stat-card[role="button"]:hover { border-color: #cbd0d9; box-shadow: var(--shadow); }
.stat-number { position: absolute; top: 21px; right: 22px; color: #d7dbe2; font-family: ui-monospace, monospace; font-size: 10px; }
.stat-card p { margin: 0 0 15px; color: #8b93a0; font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.stat-card strong { display: block; overflow: hidden; font-size: 20px; font-weight: 680; letter-spacing: -.025em; text-overflow: ellipsis; white-space: nowrap; }
.stat-card small { display: block; margin-top: 9px; color: #9ba2ad; font-size: 10px; }
.content-grid { display: grid; margin-top: 22px; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.quick-panel, .security-panel, .settings-form { padding: 27px; }
.panel-heading { display: flex; margin-bottom: 20px; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.panel-heading .eyebrow { margin-bottom: 7px; }
.quick-list { display: grid; }
.quick-list button { display: grid; padding: 15px 4px; grid-template-columns: 42px 1fr 25px; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #eff1f4; background: transparent; cursor: pointer; text-align: left; }
.quick-list button:last-child { border-bottom: 0; }
.quick-icon { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 10px; background: #f1f4f6; color: #3f4a5a; }
.quick-list button > span:nth-child(2) { display: grid; }
.quick-list strong { font-size: 12px; }
.quick-list small { margin-top: 5px; color: #929aa7; font-size: 10px; }
.quick-list .arrow { color: #a4abb5; }
.detail-list { margin: 0; }
.detail-list > div { display: flex; padding: 14px 0; justify-content: space-between; border-bottom: 1px solid #eff1f4; gap: 15px; font-size: 11px; }
.detail-list > div:last-child { border-bottom: 0; }
.detail-list dt { color: #929aa7; }
.detail-list dd { margin: 0; font-weight: 650; text-align: right; }
.status-badge { display: inline-flex; width: fit-content; padding: 5px 9px; border-radius: 20px; background: #edf0f4; color: #667085; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.status-active, .status-trialing { background: #e7f7f1; color: #147355; }
.status-past_due, .status-suspended, .status-expired, .status-canceled { background: #fff0f1; color: #b52c43; }

.resource-slot { min-height: 240px; }
.loading-panel, .empty-state { display: grid; padding: 55px 25px; place-items: center; align-content: center; text-align: center; }
.loading-panel p { margin: 14px 0 0; color: var(--muted); font-size: 12px; }
.empty-state h2 { margin: 18px 0 8px; font-size: 18px; }
.empty-state p { max-width: 430px; margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-illustration { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 18px; background: #eff2f5; color: #8791a1; font-size: 16px; font-weight: 850; letter-spacing: -.06em; }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: #fff0f1; color: #b52c43; font-weight: 850; }
.card-list { display: grid; gap: 13px; }
.resource-card { display: grid; padding: 24px; grid-template-columns: 48px 1fr; gap: 17px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.resource-icon { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 13px; background: #f0f3f5; color: #3d4858; }
.resource-main { display: grid; grid-template-columns: 1fr auto; gap: 18px; }
.resource-main h2 { margin: 4px 0 0; font-size: 17px; letter-spacing: -.02em; }
.resource-type { margin: 0; color: #8e97a5; font-size: 9px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.resource-main dl { display: flex; margin: 18px 0 0; grid-column: 1 / -1; gap: 42px; }
.resource-main dl div { display: grid; gap: 5px; }
.resource-main dt { color: #929aa7; font-size: 9px; text-transform: uppercase; }
.resource-main dd { margin: 0; font-size: 11px; font-weight: 650; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan-card { position: relative; padding: 29px; border: 1px solid var(--line); border-radius: var(--radius); background: white; }
.plan-card.featured { border-color: #263244; box-shadow: 0 16px 38px rgba(17,24,39,.12); }
.recommended { position: absolute; top: 0; right: 24px; padding: 7px 10px; border-radius: 0 0 7px 7px; background: var(--ink); color: white; font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.plan-card h2 { margin: 0; font-size: 24px; }
.plan-price { margin-top: 19px; font-size: 19px; font-weight: 750; }
.plan-code { color: #a0a7b2; font-family: ui-monospace, monospace; font-size: 10px; }
.plan-card ul { display: grid; min-height: 180px; margin: 23px 0; padding: 21px 0 0; gap: 12px; border-top: 1px solid var(--line); list-style: none; }
.plan-card li { display: flex; gap: 9px; color: #4e5868; font-size: 11px; }
.plan-card li span { color: var(--accent); font-weight: 900; }
.settings-grid { display: grid; grid-template-columns: 280px 1fr; gap: 18px; align-items: start; }
.settings-profile { display: grid; padding: 35px 25px; justify-items: center; text-align: center; }
.large-avatar { display: grid; width: 78px; height: 78px; place-items: center; border-radius: 22px; background: var(--ink); color: white; font-size: 22px; font-weight: 800; }
.settings-profile h2 { margin: 18px 0 5px; font-size: 18px; }
.settings-profile p { margin: 0 0 16px; color: var(--muted); font-size: 11px; }
.settings-form .form-stack { max-width: 600px; }
.form-actions { display: flex; margin-top: 6px; justify-content: flex-end; }

.toast-region { position: fixed; z-index: 100; top: 22px; right: 22px; display: grid; width: min(360px, calc(100vw - 44px)); gap: 9px; pointer-events: none; }
.toast { padding: 14px 17px; border: 1px solid #bee4d7; border-radius: 11px; background: #f1fbf7; color: #155f48; box-shadow: var(--shadow); font-size: 12px; font-weight: 650; animation: toast-in .25s ease-out; }
.toast-error { border-color: #f0c3ca; background: #fff5f6; color: #a2283d; }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } }

@media (max-width: 980px) {
  .auth-page { grid-template-columns: 360px 1fr; }
  .story-copy h1 { font-size: 45px; }
  .account-app { grid-template-columns: 220px 1fr; }
  .stat-grid, .plan-grid { grid-template-columns: 1fr 1fr; }
  .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .auth-page { display: block; }
  .auth-story { display: none; }
  .auth-main { padding: 35px 24px; }
  .mobile-brand { display: flex; margin-bottom: 54px; align-items: center; gap: 11px; }
  .account-app { display: block; }
  .sidebar { position: fixed; z-index: 30; left: 0; width: 260px; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 25px 0 50px rgba(17,24,39,.2); }
  .sidebar.open { transform: translateX(0); }
  .topbar { position: sticky; z-index: 20; top: 0; height: 64px; padding: 0 20px; }
  .menu-button { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: white; }
  .breadcrumb { display: none; }
  .view { padding: 32px 20px 55px; }
  .welcome-row, .page-heading { align-items: flex-start; flex-direction: column; }
  .welcome-row .button, .page-heading .button { width: 100%; }
  .plan-hero { padding: 29px; align-items: flex-start; flex-direction: column; }
  .stat-grid, .plan-grid, .settings-grid { grid-template-columns: 1fr; }
  .resource-main dl { flex-wrap: wrap; gap: 18px 30px; }
}

@media (max-width: 440px) {
  .auth-heading h2 { font-size: 28px; }
  .plan-hero h2 { font-size: 26px; }
  .resource-card { grid-template-columns: 1fr; }
  .resource-main { grid-template-columns: 1fr auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
