/* Account-only workspace. Public pages keep their existing layout. */
[data-inner].account-shell { --account-muted: #656b73; width: min(1440px, calc(100% - 64px)); padding: 42px 0 80px; }
.account-shell .account-grid { grid-template-columns: 180px minmax(0, 1fr); gap: 44px; }
.account-shell .account-sidebar { top: 104px; }
.account-shell .side-label { color: #777e87; font-size: 10px; letter-spacing: .1em; }
.account-shell .side-link { display: flex; gap: 13px; align-items: center; margin: 4px 0; padding: 11px 12px; border-radius: 5px; font-size: 13px; }
.account-shell .side-link.active { color: #14181d; background: #eaeef3; font-weight: 600; }
.account-shell .account-nav-index { color: #8a929d; font: 10px var(--mono); }
.account-shell .account-sidebar-help { margin-top: 44px; border-top: 1px solid var(--line); padding-top: 23px; }
.account-shell .account-sidebar-help .side-link { padding-left: 0; font-size: 12px; }
.account-shell .account-heading { align-items: center; margin-bottom: 16px; gap: 20px; }
[data-inner].account-shell .account-heading h1 { font-size: 36px; letter-spacing: -.045em; margin: 8px 0; }
.account-shell .account-heading p { margin: 0; color: var(--account-muted); font-size: 13px; }
.account-shell .eyebrow { font: 10px var(--mono); letter-spacing: .1em; color: #7c838d; }
.account-shell .button { border-radius: 5px; padding: 10px 15px; gap: 8px; white-space: normal; }
.account-shell .auth-panel { padding: 0; border: 0; background: none; margin: 0; }
.account-shell .auth-panel > .note { display: none; }
.account-shell [data-auth-status] { margin: 0; color: var(--account-muted); font-size: 11px; overflow-wrap: anywhere; }
.account-shell .account-toolbar { margin: 17px 0 24px; }
.account-shell .account-toolbar .note { margin: 0; color: var(--account-muted); }
.account-shell .account-toolbar .button { padding: 6px 11px; font-size: 11px; }
.account-shell [data-account-live] .dashboard-card { min-width: 0; min-height: 0; margin: 0 0 20px; padding: 24px; border-radius: 8px; border: 1px solid #e1e5e9; box-shadow: 0 2px 4px #192a3d03; }
.account-shell .dashboard-card h2 { font-size: 15px; letter-spacing: -.02em; font-weight: 600; margin: 0 0 20px; }
.account-shell .dashboard-card h3 { font-size: 13px; font-weight: 600; }
.account-shell .dashboard-card p { color: var(--account-muted); font-size: 12px; line-height: 1.65; }
.account-shell .note { color: var(--account-muted); }
.account-shell .account-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid #e1e5e9; border-radius: 8px; margin-bottom: 22px; background: #fafbfc; }
.account-shell .account-stat { min-width: 0; padding: 20px; }
.account-shell .account-stats > .account-stat + .account-stat { border-left: 1px solid #e1e5e9; }
.account-shell .stat-label { display: block; font-size: 11px; color: #616a76; margin-bottom: 12px; }
.account-shell .stat-value { display: block; font-size: clamp(19px, 2vw, 27px); font-weight: 550; letter-spacing: -.04em; line-height: 1.25; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.account-shell .account-stat p { font-size: 11px; color: var(--account-muted); margin: 9px 0 15px; }
.account-shell .account-stat .text-link { font-size: 11px; }
.account-shell .account-summary-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr); gap: 20px; align-items: start; }
.account-shell .credit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.account-shell .credit-grid .account-stat { padding: 0; }
.account-shell .credit-grid .stat-value { font-size: 30px; }
.account-shell .credit-grid .account-disclosure { padding: 12px 0 0; border-width: 1px 0 0; border-radius: 0; margin: 0; }
.account-shell .account-plan { padding: 18px 0 0; margin-top: 18px; }
.account-shell .account-plan:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.account-shell .panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.account-shell .account-badge { font-size: 10px; padding: 3px 8px; color: #27725c; background: #eaf4ee; border-radius: 4px; }
.account-shell .allowance-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.account-shell .allowance-grid .account-stat { padding: 12px 0 0; }
.account-shell .allowance-grid .stat-value { font-size: 23px; }
.account-shell .allowance-grid .account-stat p { margin-bottom: 8px; }
.account-shell progress { width: 100%; height: 5px; accent-color: #526bc6; display: block; border: 0; border-radius: 5px; overflow: hidden; background: #edf0f4; }
.account-shell progress::-webkit-progress-bar { background: #edf0f4; }
.account-shell progress::-webkit-progress-value { background: #526bc6; }
.account-shell progress::-moz-progress-bar { background: #526bc6; }
.account-shell .allowance-grid small { display: block; font-size: 10px; color: var(--account-muted); margin-top: 10px; }
.account-shell .account-disclosure { border: 1px solid #e1e5e9; border-radius: 7px; padding: 16px 20px; margin-bottom: 20px; min-width: 0; }
.account-shell .account-disclosure > summary { cursor: pointer; font-size: 12px; font-weight: 550; }
.account-shell .account-disclosure[open] > summary { margin-bottom: 18px; }
.account-shell .dashboard-card .account-disclosure { margin: 18px 0 0; padding: 14px 0 0; border-width: 1px 0 0; border-radius: 0; }
.account-shell .account-disclosure p { font-size: 12px; color: var(--account-muted); }
.account-shell .setup-step { display: flex; align-items: center; gap: 16px; padding: 18px 0; border-top: 1px solid #e9ecf0; }
.account-shell .setup-step:first-child { border-top: 0; }
.account-shell .setup-step h3 { margin: 0; font-size: 13px; font-weight: 550; }
.account-shell .setup-step p { margin: 5px 0 0; }
.account-shell .setup-step .text-link { margin-left: auto; flex-shrink: 0; font-size: 12px; }
.account-shell .step-index { flex: 0 0 28px; width: 28px; height: 28px; display: grid; place-items: center; border: 1px solid #dce1e7; border-radius: 50%; color: #6c7480; font-size: 11px; }
.account-shell .complete .step-index { background: #eaf4ee; border-color: #dcece2; color: #27725c; }
.account-shell .connection-address { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; background: #f5f7f9; border: 1px solid #e8ecf0; border-radius: 5px; }
.account-shell .connection-address code { font: 12px var(--mono); overflow-wrap: anywhere; }
.account-shell .account-models, .account-shell .account-guides { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 20px; }
.account-shell .account-models code { font: 10px var(--mono); background: #f4f6f9; padding: 5px 8px; border-radius: 3px; }
.account-shell .account-guides .text-link { font-size: 12px; }
.account-shell .account-form { gap: 14px; }
.account-shell .account-form label { flex: 1 1 155px; min-width: 0; font-size: 11px; color: var(--account-muted); }
.account-shell input, .account-shell select { min-width: 0; width: 100%; min-height: 40px; padding: 9px 11px; font: 12px var(--sans); background: #fff; border: 1px solid #dce1e7; border-radius: 5px; color: #202833; }
.account-shell input:focus-visible, .account-shell select:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.account-shell .account-toggle { display: flex; align-items: start; gap: 12px; font-size: 13px; }
.account-shell .account-toggle input { width: 17px; min-height: 17px; margin: 2px 0; flex-shrink: 0; }
.account-shell .account-table th { font-size: 10px; color: #6b7380; font-weight: 500; background: #f7f9fb; }
.account-shell .account-table td { font-size: 12px; overflow-wrap: anywhere; }
.account-shell .account-table th, .account-shell .account-table td { padding: 12px; }
.account-shell .account-table-scroll { scrollbar-width: thin; }
.account-shell .account-presets { display: flex; gap: 8px; margin: -6px 0 22px; }
.account-shell .account-presets .button { font-size: 11px; padding: 6px 12px; }
.account-shell .analytics-metric { display: flex; align-items: center; gap: 12px; font-size: 12px; }
.account-shell .analytics-metric select { width: auto; }
.account-shell .account-charts { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.account-shell [data-account-live] .account-charts .dashboard-card { padding: 20px; background: #fafbfc; margin: 0; box-shadow: none; }
.account-shell .chart-total { font-size: 26px; letter-spacing: -.04em; font-weight: 550; overflow-wrap: anywhere; }
.account-shell .daily-chart { margin-top: 24px; }
.account-shell .daily-chart > small { font-size: 10px; color: var(--account-muted); }
.account-shell .daily-bars { display: flex; align-items: stretch; gap: 3px; height: 180px; margin-top: 12px; border-bottom: 1px solid #cbd3de; background: repeating-linear-gradient(to top, transparent 0, transparent calc(25% - 1px), #e3e7ed calc(25% - 1px), #e3e7ed 25%); }
.account-shell .daily-bar { flex: 1 1 0; min-width: 0; padding: 0; border: 0; background: transparent; border-radius: 0; display: flex; flex-direction: column-reverse; align-items: stretch; justify-content: start; gap: 0; }
.account-shell .daily-bar span { flex-shrink: 0; width: 100%; }
.account-shell .daily-bar:hover { background: #526bc610; }
.account-shell .chart-axis { display: flex; justify-content: space-between; color: var(--account-muted); font-size: 10px; margin-top: 9px; }
.account-shell .chart-detail { min-height: 36px; font-size: 10px; color: var(--account-muted); }
.account-shell .chart-legend { display: flex; gap: 8px 16px; flex-wrap: wrap; list-style: none; margin: 10px 0 0; padding: 0; font-size: 10px; }
.account-shell .chart-legend li { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.account-shell .chart-legend i { width: 8px; height: 8px; flex-shrink: 0; border-radius: 2px; }
.account-shell .model-treemap { position: relative; width: 100%; height: 240px; margin-top: 20px; }
.account-shell .model-tile { position: absolute; border: 2px solid #fafbfc; border-radius: 4px; padding: 8px; display: flex; flex-direction: column; gap: 12px; align-items: start; justify-content: space-between; color: #fff; text-align: left; overflow: hidden; }
.account-shell .model-tile span { font-size: 11px; overflow-wrap: anywhere; line-height: 1.5; }
.account-shell .model-tile strong { font-size: 20px; font-weight: 500; }
.account-shell .model-tile:hover { filter: brightness(1.08); }
.account-shell .chart-empty { min-height: 220px; display: grid; place-items: center; padding: 30px; text-align: center; color: var(--account-muted); font-size: 12px; }
.account-shell .account-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; }
.account-shell .billing-topup { border-top: 1px solid #e1e5e9; padding-top: 22px; margin-top: 22px; }
.account-shell .billing-topup > .text-link { display: inline-block; margin-top: 15px; }
.account-shell dssub-credit-checkout { display: block; margin-top: 14px; }
.account-shell dssub-credit-checkout > label { display: flex; flex-wrap: wrap; align-items: center; gap: 15px; font-size: 12px; }
.account-shell dssub-credit-checkout select { width: auto; }
.account-shell .account-mobile-nav { display: none; }
@media (max-width: 1180px) {
  .account-shell .account-grid { gap: 28px; grid-template-columns: 155px minmax(0, 1fr); }
  .account-shell .account-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-shell .account-stats > .account-stat:nth-child(3) { border-left: 0; }
  .account-shell .account-stats > .account-stat:nth-child(n+3) { border-top: 1px solid #e1e5e9; }
  .account-shell .account-summary-grid, .account-shell .account-charts { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body:has(.account-shell) .menu { display: inline-flex; }
  body:has(.account-shell) .nav { display: none; position: absolute; top: 100%; left: 12px; right: 12px; align-items: stretch; flex-direction: column; gap: 0; padding: 12px 20px 20px; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 30px #0002; }
  body:has(.account-shell) .nav.open { display: flex; }
  body:has(.account-shell) .nav a { padding: 13px 0; }
  body:has(.account-shell) .nav .account { margin-top: 8px; padding: 11px 16px; text-align: center; }
  [data-inner].account-shell { width: calc(100% - 32px); padding-top: 24px; padding-bottom: 100px; }
  .account-shell .account-grid { display: block; }
  .account-shell .account-sidebar { position: static; margin: 0 0 25px; padding: 0 0 10px; border-bottom: 1px solid #e1e5e9; }
  .account-shell .account-sidebar > .side-label, .account-shell .account-sidebar-help { display: none; }
  .account-shell .account-sidebar nav { display: flex; overflow-x: auto; scrollbar-width: thin; }
  .account-shell .account-sidebar .side-link { flex-shrink: 0; font-size: 11px; padding: 8px 10px; }
  .account-shell .account-nav-index { display: none; }
  [data-inner].account-shell .account-heading h1 { font-size: 30px; }
  .account-shell .account-heading { align-items: start; }
  .account-shell .account-heading > .button { padding: 8px 10px; font-size: 11px; flex: 0 0 105px; }
  .account-shell .account-heading p { font-size: 12px; }
  .account-shell .account-toolbar { flex-direction: row; align-items: center; gap: 10px; }
  .account-shell .account-toolbar .note { font-size: 10px; }
  .account-shell .account-stat { padding: 16px; }
  .account-shell .stat-value { font-size: 23px; }
  .account-shell [data-account-live] .dashboard-card { padding: 20px; }
  .account-shell .credit-grid { gap: 12px; }
  .account-shell .credit-grid .stat-value { font-size: 27px; }
  .account-shell .account-form { flex-direction: row; }
  .account-shell .account-form label { flex-basis: 100%; }
  .account-shell .usage-controls label { flex-basis: 110px; }
  .account-shell .setup-step { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; }
  .account-shell .setup-step .text-link { grid-column: 2; margin: 0; }
  .account-shell .allowance-grid { gap: 14px; }
  .account-shell .allowance-grid .stat-value { font-size: 21px; }
  .account-shell .account-disclosure { padding: 16px; }
  .account-shell [data-account-live] .account-charts .dashboard-card { padding: 16px; }
  .account-shell .daily-bars { gap: 2px; }
  .account-shell .account-mobile-nav { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; z-index: 15; inset: auto 0 0; background: #fffffff5; border-top: 1px solid #dfe4ea; padding: 8px 8px max(8px, env(safe-area-inset-bottom)); backdrop-filter: blur(12px); }
  .account-shell .account-mobile-nav .side-link { justify-content: center; font-size: 11px; padding: 11px 4px; margin: 0; }
  body:has(.account-shell) .site-footer { padding-bottom: 90px; }
}
@media (prefers-reduced-motion: reduce) { body:has(.account-shell) { scroll-behavior: auto; } }
