:root {
  /* Brand */
  --brand-primary: #7c3aed;
  --brand-primary-strong: #6d28d9;
  
  /* Surfaces & Borders */
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --surface-hover: #f3f4f6;
  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  
  /* Text */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  
  /* Semantic */
  --success: #059669;
  --success-bg: #ecfdf5;
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warning: #d97706;
  --warning-bg: #fffbeb;

  /* Shapes */
  --radius-sm:2px;
  --radius-md:2px;
  --radius-lg:2px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 1px 3px rgba(0,0,0,0.05);
}

html[data-color-scheme-override="dark"] {
  --surface: #111827;
  --surface-muted: #1f2937;
  --surface-hover: #374151;
  --border-subtle: #374151;
  --border-strong: #4b5563;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --success-bg: rgba(5, 150, 105, 0.1);
  --danger-bg: rgba(220, 38, 38, 0.1);
  --warning-bg: rgba(217, 119, 6, 0.1);
  color-scheme: dark;
}
html[data-color-scheme-override="light"] { color-scheme: light; }

/* Explicit choices must also win over page-local prefers-color-scheme blocks. */
html[data-color-scheme-override="dark"] {
  --brand-primary: #c4a5ff;
  --brand-primary-strong: #d8b4fe;
  --brand-accent: #d8b4fe;
  --brand-ink: #f3ebfb;
  --surface: #181024;
  --surface-muted: #140d20;
  --surface-raised: rgba(17, 24, 39, .88);
  --surface-hover: #322b4d;
  --text: #f5edfd;
  --text-muted: #b6a8c7;
  --text-primary: #f2eefd;
  --text-secondary: #b9abd6;
  --text-tertiary: #8878a8;
  --border-subtle: #322b4d;
  --border-strong: #4a3f6b;
  --focus: #d8b4fe;
  --danger: #fda4af;
  --danger-bg: rgba(253, 164, 175, .12);
  --danger-surface: rgba(253, 164, 175, .12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, .12);
  --warning-surface: rgba(251, 191, 36, .12);
  --success: #6ee7b7;
  --success-bg: rgba(110, 231, 183, .12);
  --success-surface: rgba(110, 231, 183, .12);
  --shadow-card: 0 14px 34px rgba(0, 0, 0, .28);
  color-scheme: dark;
}

html[data-color-scheme-override="light"] {
  --brand-primary: #7c3aed;
  --brand-primary-strong: #6d28d9;
  --brand-accent: #a855f7;
  --brand-ink: #221133;
  --surface: #ffffff;
  --surface-muted: #f9f5ff;
  --surface-raised: rgba(255, 255, 255, .92);
  --surface-hover: #f3f4f6;
  --text: #241a33;
  --text-muted: #665475;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-tertiary: #9ca3af;
  --border-subtle: #e7dcf5;
  --border-strong: #d4c5f0;
  --focus: #6d28d9;
  --danger: #be123c;
  --danger-bg: #fef2f2;
  --danger-surface: #fff1f2;
  --warning: #b45309;
  --warning-bg: #fffbeb;
  --warning-surface: #fff7ed;
  --success: #047857;
  --success-bg: #ecfdf5;
  --success-surface: #ecfdf5;
  --shadow-card: 0 12px 30px rgba(15, 23, 42, .08);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  html:not([data-color-scheme-override="light"]) {
    --surface: #111827;
    --surface-muted: #1f2937;
    --surface-hover: #374151;
    --border-subtle: #374151;
    --border-strong: #4b5563;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-tertiary: #9ca3af;
    --success-bg: rgba(5, 150, 105, 0.1);
    --danger-bg: rgba(220, 38, 38, 0.1);
    --warning-bg: rgba(217, 119, 6, 0.1);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: var(--surface-muted);
}

.payai-route-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, visibility .16s linear;
}
.payai-route-spinner {
  width: 32px;
  aspect-ratio: 1;
  border: 2px solid var(--brand-primary);
  border-right-color: transparent;
  border-radius: 50%;
  animation: payai-route-spin .8s linear infinite;
}
html[data-payai-route-transition="loading"] .payai-route-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
html[data-payai-route-transition="entering"] .payai-route-overlay {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
html[data-payai-route-transition="loading"] main#main {
  animation: payai-route-exit 140ms ease forwards;
}
html[data-payai-route-transition="entering"] main#main {
  animation: payai-route-enter 260ms ease-out;
}
.payai-router-notify {
  position: fixed;
  top: 16px;
  right: max(var(--pa-page-inline, 24px), 16px);
  z-index: 120;
  max-width: min(420px, calc(100vw - 32px));
  margin: 0;
  color: var(--pa-danger, #dc2626);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.5;
  text-align: right;
  text-shadow: 0 1px 2px rgb(255 255 255 / 72%);
  animation: payai-notify-in 260ms ease;
}
@media(prefers-reduced-motion:no-preference){
  html body .stat-accent-violet,
  html body .stat-accent-blue,
  html body .stat-accent-green,
  html body .stat-accent-amber,
  html body .stat-accent-cyan {
    transition: transform .18s, box-shadow .18s, border-color .18s;
  }
}
.stat-accent-violet,
html body .stat-accent-violet {
  border-top: 3px solid #6d28d9;
  background: linear-gradient(180deg, rgba(139, 92, 246, .06), transparent 65%);
}
html body .stat-accent-violet .pa-kpi-label,
html body .stat-accent-violet .security-label {
  color: #6d28d9;
}
.stat-accent-blue,
html body .stat-accent-blue {
  border-top: 3px solid #1d4ed8;
  background: linear-gradient(180deg, rgba(59, 130, 246, .06), transparent 65%);
}
html body .stat-accent-blue .pa-kpi-label,
html body .stat-accent-blue .security-label {
  color: #1d4ed8;
}
.stat-accent-green,
html body .stat-accent-green {
  border-top: 3px solid #15803d;
  background: linear-gradient(180deg, rgba(34, 197, 94, .06), transparent 65%);
}
html body .stat-accent-green .pa-kpi-label,
html body .stat-accent-green .security-label {
  color: #15803d;
}
.stat-accent-amber,
html body .stat-accent-amber {
  border-top: 3px solid #b45309;
  background: linear-gradient(180deg, rgba(245, 158, 11, .07), transparent 65%);
}
html body .stat-accent-amber .pa-kpi-label,
html body .stat-accent-amber .security-label {
  color: #b45309;
}
.stat-accent-cyan,
html body .stat-accent-cyan {
  border-top: 3px solid #0e7490;
  background: linear-gradient(180deg, rgba(6, 182, 212, .06), transparent 65%);
}
html body .stat-accent-cyan .pa-kpi-label,
html body .stat-accent-cyan .security-label {
  color: #0e7490;
}
@keyframes payai-notify-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes payai-route-spin {
  to { transform: rotate(360deg); }
}
@keyframes payai-route-exit {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: .55; transform: translateY(6px); }
}
@keyframes payai-route-enter {
  from { opacity: .55; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
@media(prefers-reduced-motion:reduce){
  .payai-route-overlay{transition:none}
  .payai-route-spinner{animation:none}
  html[data-payai-route-transition] main#main{animation:none}
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--brand-primary-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 16px; font-size: 14px; font-weight: 500;
  border-radius:2px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none !important;
}
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-strong); color: var(--surface); }
.btn-default { background: var(--surface); border-color: var(--border-subtle); color: var(--text-primary); }
.btn-default:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.btn-danger { background: var(--danger-bg); border-color: transparent; color: var(--danger); }
.btn-sm { padding: 4px 8px; font-size: 14px; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 6px; font-weight: 500; }
input, select, textarea {
  width: 100%; padding: 8px 12px; background: var(--surface);
  border: 1px solid var(--border-subtle); border-radius:2px;
  color: var(--text-primary); font-family: inherit; font-size: 14px; outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-primary); box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

/* Panels */
.panel {
  background: var(--surface); border: 1px solid var(--border-subtle);
  border-radius:2px; box-shadow: var(--shadow-sm); margin-bottom: 24px;
}
.panel-header { padding: 16px; border-bottom: 1px solid var(--border-subtle); }
.panel-body { padding: 16px; }
.panel-footer { padding: 16px; border-top: 1px solid var(--border-subtle); background: var(--surface-muted); }

/* Tables */
.table-container { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 12px 24px; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { color: var(--text-secondary); font-weight: 500; background: var(--surface-muted); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-hover); }

/* Layouts */
.shell-container { display: flex; min-height: 100vh; flex-direction: column; }

/* 1. StorefrontShell */
.storefront-header {
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border-subtle);
  position: sticky; top: 0; z-index: 100;
}
.storefront-main { flex: 1; padding: 32px 24px; max-width: 1200px; margin: 0 auto; width: 100%; }

/* 2. AuthShell */
.auth-layout {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: var(--surface-muted);
}
.auth-card {
  width: 100%; max-width: 400px; background: var(--surface);
  border: 1px solid var(--border-subtle); border-radius:2px;
  padding: 32px; box-shadow: var(--shadow-md);
}

/* 3 & 4. ConsoleShell / AdminShell */
.dashboard-layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; background: var(--surface); border-right: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; height: 100vh; position: sticky; top: 0;
}
.sidebar-header { height: 56px; padding: 0 24px; display: flex; align-items: center; border-bottom: 1px solid var(--border-subtle); }
.prototype-console .sidebar-header { flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; height: auto; padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); }
.prototype-console .sidebar-header[data-navigation-header="account"] { min-height: 56px; }
.prototype-console .sidebar-header[data-navigation-header="workspace"] { min-height: 72px; }
.sidebar-title { font-size: 14px; font-weight: 700; color: var(--text-secondary); letter-spacing: .04em; }
.sidebar-back-link { display:inline-flex; align-items:center; gap:4px; min-height:24px; margin-bottom:0; color:var(--brand-primary); font-size:14px; font-weight:600; text-decoration:none; }
.sidebar-back-link:hover { text-decoration:underline; }
.sidebar-home-link { margin-left: auto; color: var(--text-secondary); font-size: 14px; font-weight: 500; text-decoration: none; }
.sidebar-home-link:hover { color: var(--text-primary); text-decoration: underline; }
.sidebar-header[id$="-header"][id^="console-anchor"] { flex-wrap: wrap; height: auto; padding: 0 16px 8px; }
.sidebar-nav { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-link { padding: 8px 12px; color: var(--text-secondary); border-radius:2px; font-weight: 500; }
.sidebar-link:hover { background: var(--surface-hover); color: var(--text-primary); text-decoration: none; }
.sidebar-link.active { background: var(--brand-primary); color: white; text-decoration: none; }
.prototype-console .sidebar-nav { display: block; overflow: hidden; padding: 0; }
.prototype-console .sidebar-shutter { position: relative; overflow: hidden; }
.prototype-console .sidebar-shutter::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(to bottom, rgb(17 24 39 / 0%), rgb(17 24 39 / 5%), rgb(17 24 39 / 0%));
  transition: opacity .18s ease;
}
.prototype-console .sidebar-panel { display: flex; flex-direction: column; gap: 4px; padding: 8px; }
.prototype-console .sidebar-panel.is-entering-from-left { animation: sidebar-slide-from-left 280ms cubic-bezier(.22,.61,.36,1) both; }
.prototype-console .sidebar-panel.is-entering-from-right { animation: sidebar-slide-from-right 280ms cubic-bezier(.22,.61,.36,1) both; }
.prototype-console .sidebar-link.workspace-picker-entry { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.submenu-chevron { width: 12px; height: 12px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes sidebar-slide-from-left {
  from { opacity: 0; transform: translateX(-28px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes sidebar-slide-from-right {
  from { opacity: 0; transform: translateX(28px); }
  to { opacity: 1; transform: translateX(0); }
}
.prototype-console .sidebar-shutter[data-shutter-state="entering"]::after { opacity: 1; }
.dashboard-main { flex: 1; padding: 32px; min-width: 0; }

/* Utilities */
.brand-icon { background: var(--brand-primary); color: white; width: 24px; height: 24px; display: grid; place-items: center; border-radius:2px; font-family: monospace; font-size: 14px; font-weight: bold; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text-primary); text-decoration: none !important; }
.nav-links { display: flex; gap: 8px; }
.nav-link { padding: 6px 12px; color: var(--text-secondary); border-radius:2px; font-weight: 500; }
.nav-link:hover, .nav-link.active, .nav-link[aria-current="page"] { background: var(--surface-hover); color: var(--text-primary) !important; text-decoration: none; }
.storefront-account{position:relative;flex:0 0 auto}
.storefront-account-trigger{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:4px 10px;margin:0;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:500;cursor:pointer}
.storefront-account-trigger:hover{background:var(--surface-hover)}
.storefront-account-avatar{display:inline-block;width:24px;height:24px;border-radius:50%;background:linear-gradient(135deg,#ddd6fe,#c7d2fe)}
.storefront-account-id{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:monospace}
.storefront-account-chevron{width:12px;height:12px;stroke:currentColor;stroke-width:1.5;fill:none}
.storefront-account-menu{position:absolute;top:calc(100% + 6px);right:0;min-width:132px;margin:0;padding:4px;list-style:none;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 8px 24px rgb(17 24 39 / .12);z-index:101}
.storefront-account-menu a,.storefront-account-menu button{display:flex;width:100%;align-items:center;padding:8px 10px;border:0;border-radius:2px;background:transparent;color:var(--text-primary);font-size:14px;text-align:left;text-decoration:none!important;cursor:pointer}
.storefront-account-menu a:hover,.storefront-account-menu button:hover{background:var(--surface-hover)}
.mono { font-family: monospace; font-size: 14px; }
.status-pill { display: inline-flex; align-items: center; padding: 2px 8px; border-radius:2px; font-size: 14px; font-weight: 500; }
.status-success { background: var(--success-bg); color: var(--success); }
.status-warning { background: var(--warning-bg); color: var(--warning); }
.status-danger { background: var(--danger-bg); color: var(--danger); }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-right { text-align: right; }
.text-secondary { color: var(--text-secondary); }
.mt-4 { margin-top: 16px; }
.mb-4 { margin-bottom: 16px; }

/* Runtime components share the prototype's tokens and layout metrics. */
:root{--text:var(--text-primary);--text-muted:var(--text-secondary);--surface-2:var(--surface-hover);--surface-raised:var(--surface);--shadow-card:var(--shadow-sm);--focus:var(--brand-primary);--brand-accent:var(--brand-primary);--brand-ink:var(--text-primary);--danger-surface:var(--danger-bg)}
[hidden]{display:none!important}
html{font-size:14px}
body,body.pa-surface{background:var(--surface-muted);color:var(--text-primary);font:14px/1.5 'Inter',system-ui,sans-serif}
h1{font-size:24px;line-height:1.3;margin:0 0 24px}h2{font-size:20px}h3{font-size:16px}p{color:var(--text-secondary)}
:focus-visible{outline:2px solid var(--brand-primary);outline-offset:3px}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.skip,.skip-link{position:fixed;left:12px;top:-80px;z-index:1000;background:var(--surface);padding:12px}.skip:focus,.skip-link:focus{top:8px}
.prototype-store>main{max-width:1200px;width:100%;padding:32px 24px;margin:0 auto;flex:1}
.prototype-store{display:flex;flex-direction:column;min-height:100vh}
.prototype-store>.storefront-header{height:56px;min-height:56px;padding:0 24px;box-shadow:none;backdrop-filter:none}
.storefront-header .brand{font-size:14px;font-weight:600}.storefront-header .brand-icon{flex:0 0 24px}
.site-preferences{position:relative;display:inline-flex;align-items:center;gap:6px;margin-left:4px}
.site-preference-button{position:relative;display:inline-grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-secondary);cursor:pointer}
.site-preference-button:hover{background:var(--surface-hover);color:var(--text-primary)}
.site-preference-icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.site-preference-code{position:absolute;right:-2px;bottom:-2px;min-width:20px;height:20px;padding:0 3px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:700;line-height:18px;text-align:center}
.site-preferences-floating{position:fixed;top:14px;right:16px;z-index:120}
.site-preferences-floating .site-preferences{margin-left:0}
@media(max-width:719px){.site-preferences{margin-left:0}.site-preference-button{width:44px;height:44px;min-height:44px}}
.prototype-store[data-page='about']>main,.prototype-store[data-page='legal']>main{max-width:800px}
.prototype-store[data-page='recharge']>main{max-width:600px}
.prototype-store[data-page='recharge'] .recharge-layout{display:flex;flex-direction:column-reverse}
.prototype-store[data-page='recharge'] .recharge-layout>*{width:100%}
.prototype-auth{display:flex;align-items:center;justify-content:center;min-height:100vh;padding:24px}
.prototype-auth>main{margin:0;padding:0;width:100%;max-width:400px;min-height:0;display:block}
.prototype-auth .login-card{padding:32px;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:var(--shadow-sm);width:100%}
.prototype-auth h1{text-align:center;font-size:24px}.prototype-auth .brand{justify-content:center;margin-bottom:24px}
.prototype-auth form>label{margin-top:16px}.prototype-auth form>button[type=submit]{width:100%;margin-top:24px}
.prototype-console{display:flex;align-items:flex-start;min-height:100vh}
.prototype-console>.sidebar{width:240px;flex:0 0 240px;overflow-y:auto}
.prototype-console>main{flex:1;min-width:0;max-width:none;width:calc(100% - 240px);margin:0;padding:32px}
.sidebar-nav a[aria-current=page]{background:var(--brand-primary);color:white}
.sidebar-nav{overflow:auto}.sidebar-header{flex-shrink:0}.sidebar-section{padding:16px 12px 4px;font-size:14px;color:var(--text-secondary)}
button,.primary-button,.ghost-button,.pa-btn{font:500 14px/1.5 inherit;border-radius:2px;padding:8px 16px;min-height:40px;border:1px solid var(--border-subtle);background:var(--surface);color:var(--text-primary);box-shadow:none;cursor:pointer;transform:none}
.primary-button,.pa-btn.primary{background:var(--brand-primary);color:white;border-color:var(--brand-primary)}
.primary-button:hover,.pa-btn.primary:hover{background:var(--brand-primary-strong);color:white;box-shadow:none;transform:none}
button:disabled{opacity:.5;cursor:not-allowed}input[type=checkbox],input[type=radio]{width:auto;min-height:0}
.info-card,.data-card,.product-card,.order-card,.help-article,.pa-card,.metric-card,.login-card{background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:var(--shadow-sm);padding:16px;transform:none}
.pa-card.hoverable:hover,.product-card:hover{transform:none;box-shadow:var(--shadow-sm)}
.hero{border:1px solid var(--border-subtle);border-radius:2px;padding:64px 16px;background:linear-gradient(180deg,var(--surface),var(--surface-muted));text-align:center;box-shadow:none}
.hero h1{font-size:32px;margin-bottom:16px}.hero p{max-width:600px;margin:0 auto 24px}.hero .card-actions{justify-content:center}
#home>.two-column{margin-top:24px}.brand-mark{width:24px;height:24px;border-radius:2px;background:var(--brand-primary);box-shadow:none}
.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px}
.pa-grid.kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px}
.metric-card strong,.pa-kpi-value{font-size:28px;font-weight:600}.pa-kpi-icon{display:none}.pa-kpi-label{font-size:14px;letter-spacing:0;text-transform:none;color:var(--text-secondary)}
.pa-table-wrap{border-radius:2px;box-shadow:none;overflow-x:auto;background:var(--surface);border:1px solid var(--border-subtle)}
.data-table th,.data-table td,.pa-table-wrap th,.pa-table-wrap td{padding:12px 24px;font-size:14px;color:var(--text-primary);letter-spacing:0;text-transform:none}
.data-table th,.pa-table-wrap th{background:var(--surface-muted);color:var(--text-secondary)}
.pa-mono,.mono{font-family:monospace} .state-card,.state,.empty-state,.error-state{border-radius:2px;padding:16px;margin-bottom:16px}
.error-state,.state.error{color:var(--danger);background:var(--danger-bg)}
dialog{background:var(--surface);color:var(--text-primary);border:1px solid var(--border-subtle);border-radius:2px;padding:24px;max-height:90vh;overflow:auto;width:min(720px,calc(100vw - 32px));max-width:min(720px,calc(100vw - 32px))}dialog::backdrop{background:rgb(17 24 39 / .4)}
footer{padding:24px;border-top:1px solid var(--border-subtle);background:var(--surface);color:var(--text-secondary)}
@media(max-width:719px){
 .prototype-store>.storefront-header{height:auto;min-height:56px;flex-wrap:wrap;padding:12px 16px;gap:8px}.nav-links{flex-wrap:wrap;gap:0}.nav-link{padding:6px 8px}
 .prototype-store>main{padding:24px 16px}.prototype-console{display:block}.prototype-console>.sidebar{width:100%;height:auto;position:static;border-right:0;border-bottom:1px solid var(--border-subtle)}.prototype-console .sidebar-nav{overflow-x:auto}.prototype-console .sidebar-panel{flex-direction:row;flex-wrap:nowrap;padding:8px 16px}.sidebar-link{white-space:nowrap}.sidebar-section{display:none}
 .prototype-console>main{width:100%;padding:24px 16px}.metric-grid,.pa-grid.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.hero{padding:40px 20px}.hero h1{font-size:28px}
 button,.primary-button,.ghost-button,.pa-btn,input:not([type=checkbox]):not([type=radio]),select{min-height:44px}.data-card{overflow-x:auto}.prototype-auth{padding:16px}.prototype-auth .login-card{padding:16px}
}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

@media(min-width:720px){.prototype-store>main{min-width:0}.prototype-console>main{min-width:0}}
@media(min-width:1024px){.prototype-store>main{max-width:1200px}.prototype-console>main{padding:32px}}
.prototype-runtime-note{max-width:1200px;margin:8px auto 0;padding:8px 16px;color:var(--text-secondary);font-size:14px}.prototype-console .prototype-runtime-note{max-width:none;margin:8px 32px 0}

.prototype-page>.dashboard-layout{width:100%}.dashboard-layout>.sidebar{flex:0 0 240px;overflow-y:auto}
.prototype-store .hero::before,.prototype-store .hero::after{display:none}
.prototype-store[data-page=home] .hero{margin:0;width:100%;max-width:none}.prototype-store[data-page=home] #home{margin:0}
.prototype-store[data-page=home] .hero p.mode-note{display:none}
.catalog-layout{display:grid;grid-template-columns:240px minmax(0,1fr);gap:16px;align-items:start}
.catalog-layout #products{min-width:0}.catalog-layout h1{font-size:20px;margin:0 0 8px}.catalog-layout h2{font-size:16px;margin:0}
.catalog-row{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px;border-bottom:1px solid var(--border-subtle)}.catalog-row:last-child{border-bottom:0}
.catalog-row h2{font-size:16px;margin:0 0 4px}.catalog-row p{margin:4px 0}.catalog-price{flex-shrink:0;text-align:right}.catalog-price strong{display:block;font-size:18px;margin-bottom:12px}
.prototype-store[data-page=product-detail] .product-visual{display:none}.prototype-store[data-page=product-detail] .detail-layout{grid-template-columns:minmax(0,1fr) 320px;gap:24px;align-items:start}
/* /sites/checkout is the dedicated purchase page; width is owned by its own
   .purchase-main (matches the 1240px storefront baseline). */
.prototype-store[data-page=checkout]>main{max-width:1240px}
body[data-admin-view] .admin-nav{display:none}.prototype-console .login-layout{min-height:70vh}.prototype-console .login-card{max-width:400px;margin:auto}
.prototype-store[data-page=help-article]>main{max-width:800px}.prototype-store[data-page=help-article] #help-search,.prototype-store[data-page=help-article] #help-title{display:none}
.prototype-store[data-page=help-article] .help-layout{display:block}
@media(max-width:719px){.catalog-layout{display:block}.catalog-row{padding:20px 16px;gap:16px}.catalog-row h2{font-size:16px}.dashboard-layout{display:block}.dashboard-layout>.sidebar{width:100%;height:auto;position:static}.dashboard-main{padding:24px 16px}.prototype-store[data-page=product-detail] .detail-layout{grid-template-columns:1fr}}

.session-actions{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}
.prototype-console[data-page=wallet] .metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.prototype-console[data-page=wallet] .metric-card{background:var(--surface);padding:16px}.prototype-console[data-page=wallet] .metric-card strong{font-size:32px}
.prototype-auth .auth-layout{min-height:0;width:100%}.prototype-auth .auth-card{width:100%;max-width:400px}
.sidebar-link[aria-current=page]{background:var(--surface-hover);color:var(--text-primary)}
@media(max-width:719px){.prototype-auth .auth-card{padding:16px}.session-actions{flex-wrap:wrap}.prototype-console[data-page=wallet] .metric-grid{grid-template-columns:1fr 1fr}}

.dashboard-range{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-bottom:24px}
.dashboard-range label{margin:0}.dashboard-range select,.dashboard-range input{width:auto;max-width:100%}

.channel-editor{width:640px}.channel-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.span-all{grid-column:1/-1}

.provider-heading{align-items:flex-start;gap:16px}
.provider-subtitle{margin:4px 0 0;color:var(--text-secondary);font-size:14px}
.provider-filter{display:grid;grid-template-columns:auto minmax(180px,1fr) auto minmax(140px,1fr) auto;align-items:end;gap:12px;padding:16px}
.provider-filter label{margin:0}
.provider-checkboxes{display:flex;align-items:center;gap:16px}
.provider-checkboxes label{display:flex;align-items:center;gap:8px;margin:0}
.provider-identity{display:flex;align-items:center;gap:10px;min-width:180px}
.provider-icon{display:inline-grid;place-items:center;width:28px;height:28px;overflow:hidden;border-radius:2px;background:var(--surface-muted)}
.provider-icon img{width:100%;height:100%;object-fit:contain}
.provider-letter{font-size:14px;font-weight:700;line-height:1}
.provider-settings{padding:4px 0}
.provider-toggle{cursor:pointer}
.provider-toggle .provider-meta{display:block;font-size:14px;color:var(--text-secondary)}
.provider-switch{appearance:none;flex-shrink:0;width:40px;height:22px;margin:0;border:1px solid var(--border-subtle);border-radius:50%;background:var(--border-subtle);cursor:pointer;transition:background .15s ease,border-color .15s ease}
.provider-switch::before{content:"";display:block;width:16px;height:16px;margin:2px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px rgb(15 23 42 / .2);transition:transform .15s ease}
.provider-switch:checked{background:var(--brand-primary);border-color:var(--brand-primary)}
.provider-switch:checked::before{transform:translateX(18px)}
.provider-switch:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.provider-switch:disabled{cursor:not-allowed;opacity:.6}
.provider-name{display:flex;flex-direction:column;min-width:0}
.provider-name small{color:var(--text-tertiary);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.provider-status{display:inline-flex;align-items:center;min-height:24px;padding:2px 8px;border-radius:2px;font-size:14px;font-weight:600}
.provider-status.enabled{background:var(--success-bg);color:var(--success)}
.provider-status.disabled{background:var(--warning-bg);color:var(--warning)}
.provider-actions{display:flex;gap:8px;white-space:nowrap}
@media(max-width:719px){
  .provider-heading{display:block}
  .provider-filter{grid-template-columns:1fr;align-items:stretch}
  .provider-actions{flex-direction:column}
}
@media(max-width:719px){.channel-fields{grid-template-columns:1fr}.panel-header.flex{flex-wrap:wrap}.dashboard-main>.flex{flex-wrap:wrap;gap:12px}.catalog-row{flex-wrap:wrap}.catalog-row>div{min-width:0;overflow-wrap:anywhere}.catalog-price{text-align:left}}

.pagination{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px}
.pagination{justify-content:space-between}
.pagination-summary{color:var(--text-secondary);font-size:14px;white-space:nowrap}
.pagination-navigation{display:flex;align-items:center;gap:8px}
.pagination-page{min-width:34px;min-height:34px;padding:0 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-secondary);font-size:14px}
.pagination-page[aria-current="page"],.pagination-page:hover:not(:disabled){color:var(--brand-primary)}
.pagination-page:disabled{cursor:not-allowed;opacity:.55}
.pagination-settings{display:flex;align-items:center;gap:8px;color:var(--text-secondary);font-size:14px}
.pagination-select{min-height:34px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px}
.pagination .pagination-size{margin-left:auto;display:flex;align-items:center;gap:.5rem}
.resource-details{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px}.resource-details dd{margin:0;overflow-wrap:anywhere}
.table-container table{min-width:600px}.table-container th,.table-container td{white-space:nowrap}
@media(max-width:719px){.sidebar-nav .sidebar-link{min-height:44px;display:inline-flex;align-items:center}.resource-details{grid-template-columns:1fr}.resource-details dd{margin-bottom:8px}.dashboard-main>.grid{grid-template-columns:1fr!important}}

/* =============================================================
   Auth journey redesign — wider two-column guidance + form card
   ============================================================= */
.prototype-auth:is([data-page=sign-in],[data-page=sign-up],[data-page=password-reset])>main{max-width:1020px}
.auth-shell{display:grid;grid-template-columns:minmax(320px,560px) minmax(340px,420px);gap:32px;align-items:stretch;width:100%;max-width:1020px}
.auth-journey{display:flex;flex-direction:column;gap:16px}
.auth-journey-card{padding:28px;background:linear-gradient(160deg,var(--surface) 0%,#f9fafb 100%);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 1px 2px rgba(15,23,42,.04);flex:1}
.auth-step-badge{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:var(--brand-primary);color:#fff;font-weight:600;font-size:14px}
.auth-steps{display:flex;gap:12px}
.auth-steps>*{display:flex;align-items:center;gap:8px}
.auth-steps .connector{width:44px;height:1px;background:var(--border-subtle)}
.auth-steps .step-label{font-size:14px;color:var(--text-secondary);font-weight:500}
.auth-steps .step-label.done{color:var(--text-primary)}
.auth-form-card{padding:28px;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.auth-divider{border:0;border-top:1px solid var(--border-subtle);margin:20px 0}
.policy-line{display:flex;align-items:flex-start;gap:8px;font-size:14px;color:var(--text-secondary)}
.policy-line input[type=checkbox]{width:18px;height:18px;min-height:18px;margin:2px 0 0;accent-color:var(--brand-primary)}
.tab-btn{flex:1;min-height:40px;border:1px solid var(--border-subtle);border-radius:2px;background:transparent;color:var(--text-secondary);font-weight:500;cursor:pointer}
.tab-btn.active{background:var(--brand-primary);border-color:var(--brand-primary);color:#fff}
.auth-tab-switch{display:flex;gap:8px;margin-bottom:16px}
.helper-list{margin:0;padding-left:20px;display:grid;gap:8px;color:var(--text-secondary);font-size:14px}
.pwd-meter{height:6px;border-radius:2px;background:var(--border-subtle);overflow:hidden;position:relative;margin-top:8px}
.pwd-meter::before{content:"";position:absolute;inset:0;width:calc(var(--strength,0)*20%);background:var(--meter-color,#94a3b8);transition:width .2s ease,background-color .2s ease}
.pwd-meter[data-score="0"]{--strength:0;--meter-color:#94a3b8}
.pwd-meter[data-score="1"]{--strength:1;--meter-color:#ef4444}
.pwd-meter[data-score="2"]{--strength:2;--meter-color:#f97316}
.pwd-meter[data-score="3"]{--strength:3;--meter-color:#eab308}
.pwd-meter[data-score="4"]{--strength:4;--meter-color:#22c55e}
.pwd-meter[data-score="5"]{--strength:5;--meter-color:#16a34a}
.pwd-meter::after{content:attr(data-label);position:absolute;left:0;top:-22px;font-size:14px;color:var(--text-secondary);white-space:nowrap}
.field-wrapper{position:relative}
.field-tooltip{position:absolute;z-index:20;left:0;top:100%;width:max-content;max-width:min(320px,100%);margin-top:6px;padding:8px 10px;border:1px solid var(--border-strong);border-radius:2px;background:var(--surface-muted);color:var(--text-primary);box-shadow:0 8px 20px rgba(15,23,42,.12);font-size:14px;line-height:1.45;opacity:0;visibility:hidden;transform:translateY(-4px);transition:opacity .16s ease,transform .16s ease,visibility .16s linear}
.field-wrapper:focus-within .field-tooltip{opacity:1;visibility:visible;transform:translateY(0)}
.auth-meta-row{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.auth-meta-row .helper{font-size:14px;color:var(--text-secondary)}
.otp-cell{width:44px;height:52px;text-align:center;font-size:20px;font-weight:600;padding:0;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface)}
.otp-grid{display:grid;grid-template-columns:repeat(6,minmax(44px,1fr));gap:8px}
@media(max-width:719px){
  .auth-layout{grid-template-columns:1fr}
  .auth-layout{gap:20px}
  .otp-grid{grid-template-columns:repeat(6,1fr);gap:6px}
  .otp-cell{width:100%;aspect-ratio:1;border-radius:2px}
}

/* ---------- Vendor rail + product icon badges ---------- */
.catalog-sidebars{display:flex;flex-direction:column;gap:16px;min-width:0}
.vendor-panel .panel-header{margin-bottom:8px}
.vendor-rail{display:flex;flex-direction:column;gap:4px}
.vendor-item{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:2px;background:transparent;color:var(--text-primary);cursor:pointer;font-size:14px;text-align:left;transition:background .15s ease,border-color .15s ease}
.vendor-item:hover{background:var(--surface-hover)}
.vendor-item.active{background:var(--surface-hover);border-color:var(--brand-primary)}
.vendor-icon{flex-shrink:0;border-radius:2px}
.vendor-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vendor-count{flex-shrink:0;min-width:24px;text-align:center;font-size:14px;font-weight:600;padding:2px 6px;border-radius:2px;background:var(--border-subtle);color:var(--text-secondary)}
.catalog-row .vendor-tag{display:inline-block;margin-left:8px;font-size:14px;color:var(--text-secondary);background:var(--surface-hover);border-radius:2px;padding:2px 6px;vertical-align:middle}
.product-vendor-icon{display:inline-block;margin-right:6px;vertical-align:middle;border-radius:2px}
@media(max-width:719px){
  .catalog-sidebars{display:block}
  .vendor-rail{flex-direction:row;flex-wrap:wrap}
  .vendor-item{width:auto;min-height:44px}
  .vendor-item .vendor-count{display:none}
}

/* Shared account and workspace dropdowns: separate controls and separate menus. */
.account-controls{display:flex;align-items:center;gap:8px;min-width:0}
.console-account,.storefront-account,.workspace-switcher{position:relative;min-width:0}
.console-account .account-trigger{width:calc(100% - 32px);justify-content:flex-start;margin:0 16px 12px;padding:8px 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:600}
.storefront-account .account-trigger{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:4px 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:500}
.account-trigger{display:inline-flex;align-items:center;gap:8px;cursor:pointer}
.console-account .account-trigger:hover,.storefront-account .account-trigger:hover{background:var(--surface-hover)}
.workspace-trigger{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:4px 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:500;cursor:pointer}
.workspace-trigger:hover{background:var(--surface-hover)}
.workspace-trigger-name{max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:600}
.workspace-chevron{width:12px;height:12px;stroke:currentColor;stroke-width:1.5;fill:none}
.workspace-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:220px;margin:0;padding:8px;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 8px 24px rgb(17 24 39 / .12);z-index:101}
.workspace-menu-heading{margin:0 0 6px;padding:0 4px;color:var(--text-secondary);font-size:14px;font-weight:600}
.workspace-menu-list{margin:0;padding:0;list-style:none}
.workspace-option-row{display:flex;align-items:center;gap:4px}
.workspace-option-select{display:flex;flex:1;min-width:0;align-items:center;gap:8px;padding:8px 10px;border:0;border-radius:2px;background:transparent;color:var(--text-primary);font-size:14px;text-align:left;cursor:pointer}
.workspace-option-select:hover{background:var(--surface-hover)}
.workspace-option-select[aria-checked="true"]{background:var(--surface-hover);font-weight:700}
.workspace-facts{display:grid;grid-template-columns:auto minmax(0,1fr);gap:8px 16px;margin:16px 0}
.workspace-facts dt{color:var(--text-secondary);font-size:14px}
.workspace-facts dd{margin:0;color:var(--text-primary);font-size:14px;overflow-wrap:anywhere}
.workspace-facts div{display:contents}
.workspace-search{display:flex;align-items:center;min-width:240px}
.workspace-search .pa-input{width:100%}
.workspace-row-actions{display:flex;align-items:center;gap:4px;flex-wrap:wrap}
#workspace-list tr[data-workspace-row]{cursor:pointer}
#workspace-list tr[data-workspace-row]:hover{background:var(--surface-hover)}
#workspace-list tr[data-workspace-row]:focus-visible{outline:2px solid var(--brand-primary);outline-offset:-2px}
#workspace-list tr[data-workspace-row][aria-selected="true"]{background:var(--surface-hover)}
.workspace-sort{display:inline-flex;align-items:center;gap:4px;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer}
.workspace-sort::after{content:"↕";color:var(--text-secondary);font-size:14px}
.workspace-sort.active{color:var(--brand-primary)}
.workspace-sort.active::after{content:"↑"}
.workspace-sort.active.descending::after{content:"↓"}
.workspace-option-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.workspace-option-state{margin-left:auto;color:var(--brand-primary);font-size:14px;font-weight:600}
.workspace-menu-empty{display:block;padding:8px 10px;color:var(--text-secondary);font-size:14px}
.workspace-menu-status{margin:6px 0 0;padding:0 4px;color:var(--text-secondary);font-size:14px}
.workspace-menu-skeleton{display:block;height:14px;margin:8px 4px;border-radius:2px;background:linear-gradient(90deg,var(--surface-muted) 25%,var(--surface-hover) 45%,var(--surface-muted) 65%);background-size:200% 100%;animation:workspace-menu-loading 1.1s ease-in-out infinite}
.workspace-menu-skeleton:nth-child(2){width:82%}
.workspace-menu-skeleton:nth-child(3){width:64%}
@keyframes workspace-menu-loading{from{background-position:200% 0}to{background-position:-200% 0}}
@media(prefers-reduced-motion:reduce){
  .workspace-menu-skeleton{animation:none}
  .prototype-console .sidebar-panel.is-entering-from-left,
  .prototype-console .sidebar-panel.is-entering-from-right{animation:none}
}
.workspace-create-toggle{display:flex;width:100%;align-items:center;justify-content:center;min-height:36px;margin-top:6px;padding:6px 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font-size:14px;font-weight:600;cursor:pointer}
.workspace-create-toggle:hover{background:var(--surface-hover)}
.workspace-editor-dialog{width:min(720px,calc(100vw - 48px));max-width:min(720px,calc(100vw - 48px))}
.workspace-editor-form{display:flex;flex-direction:column;gap:18px}
.workspace-form-note{margin:0;padding:10px 12px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface-muted);color:var(--text-secondary);font-size:14px;line-height:1.5}
.workspace-field-warning{margin:2px 0 0;display:flex;align-items:flex-start;gap:5px;color:rgb(146 64 14);font-size:14px;line-height:1.4}
.workspace-field-warning::before{content:"⚠";flex-shrink:0;line-height:1.4}
.workspace-dialog-head h2{margin:0;font-size:20px;line-height:1.3}
.workspace-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
.workspace-editor-grid .span-2{grid-column:1/-1}
.workspace-dialog-actions .workspace-create-submit{width:auto;min-width:120px}
.workspace-editor-form .field-error{margin:0;color:var(--danger);font-size:14px}
.workspace-field{display:flex;flex-direction:column;gap:4px;color:var(--text-secondary);font-size:14px}
.workspace-field span{font-weight:600}
.workspace-field input,.workspace-field textarea{width:100%;min-height:36px;height:36px;padding:6px 8px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font:inherit;box-sizing:border-box}
.workspace-select{position:relative}
.workspace-select-trigger{display:flex;width:100%;min-height:36px;height:36px;align-items:center;justify-content:space-between;gap:8px;padding:6px 8px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font:inherit;cursor:pointer;box-sizing:border-box}
.workspace-select-trigger[aria-expanded="true"]{border-color:var(--brand-primary)}
.workspace-select-trigger:disabled{cursor:not-allowed;opacity:.62}
.workspace-select-chevron{width:12px;height:12px;fill:none;stroke:var(--text-secondary);stroke-width:1.5;transition:transform .16s ease}
.workspace-select[data-open="true"] .workspace-select-chevron{transform:rotate(180deg)}
.workspace-select-options{position:absolute;top:calc(100% + 6px);left:0;right:0;z-index:30;margin:0;padding:6px;list-style:none;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 8px 24px rgb(17 24 39 / .12);max-height:220px;overflow:auto}
.workspace-select[data-placement="top"] .workspace-select-options{top:auto;bottom:calc(100% + 6px)}
.workspace-select-options li{display:flex;min-height:34px;align-items:center;padding:7px 9px;border-radius:2px;color:var(--text-primary);font-size:14px;cursor:pointer}
.workspace-select-options li:hover{background:var(--surface-hover)}
.workspace-select-options li[aria-selected="true"]{background:color-mix(in srgb,var(--brand-primary) 10%,transparent);color:var(--brand-primary);font-weight:600}
.workspace-field textarea{min-height:96px;height:auto;resize:none}
@media(max-width:719px){
  .workspace-editor-dialog{width:calc(100vw - 24px);max-width:calc(100vw - 24px)}
  .workspace-editor-grid{grid-template-columns:1fr}
  .workspace-editor-grid .span-2{grid-column:auto}
  .workspace-dialog-actions{flex-direction:column-reverse}
  .workspace-dialog-actions .pa-btn{width:100%}
}
.account-avatar{display:inline-block;width:26px;height:26px;border-radius:50%;background:linear-gradient(135deg,#ddd6fe,#c7d2fe)}
.account-id{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--pa-mono,monospace)}
.storefront-account .account-id{max-width:180px}
.account-chevron{width:12px;height:12px;stroke:currentColor;stroke-width:1.5;fill:none}
.account-menu{position:absolute;top:calc(100% + 6px);left:0;min-width:212px;margin:0;padding:4px;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 8px 24px rgb(17 24 39 / .12);z-index:101}
.storefront-account .account-menu{left:auto;right:0}
.account-menu-list{margin:0;padding:0;list-style:none}
.account-menu-list a,.account-menu-list button{display:flex;width:100%;align-items:center;padding:8px 10px;border:0;border-radius:2px;background:transparent;color:var(--text-primary);font-size:14px;text-align:left;text-decoration:none!important;cursor:pointer}
.account-menu-list a:hover,.account-menu-list button:hover{background:var(--surface-hover)}
.account-menu-list .account-signout{color:var(--danger);font-weight:600}
.account-menu-list .account-signout:hover{background:var(--danger-bg);color:var(--danger)}
.account-menu-divider{margin:6px 0;border:0;border-top:1px solid var(--border-subtle)}
.account-menu:has(.account-menu-group){max-height:min(720px,calc(100dvh - 100px));overflow-y:auto;overscroll-behavior:contain}
.account-menu-group{list-style:none;margin:0;padding:0}
.account-menu-heading{padding:6px 10px;margin:8px 0 4px;background:var(--border-subtle);color:var(--text-primary);font-size:14px;font-weight:700;border-radius:2px}
.account-menu-list>li:first-child .account-menu-heading{margin-top:0}
.account-menu-list:has(.account-menu-group)>.account-signout,
.account-menu-list:has(.account-menu-group)>li:last-child{border-top:1px solid var(--border-subtle);margin-top:8px;padding-top:4px}
.theme-switch-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 10px}
.theme-switch-label{font-size:14px;color:var(--text-secondary)}
.theme-toggle-group{display:inline-flex;border:1px solid var(--border-subtle);border-radius:2px;overflow:hidden}
.theme-toggle-group button{min-width:44px;padding:4px 10px;border:0;background:transparent;color:var(--text-secondary);font-size:14px;cursor:pointer}
.theme-toggle-group button[aria-checked="true"]{background:var(--brand-primary);color:white}
.account-preferences-overlay{position:fixed;inset:0;z-index:102;display:grid;place-items:center;background:rgb(17 24 39 / .4)}
.preference-sheet{width:min(420px,calc(100vw - 32px));padding:16px;background:var(--surface);border:1px solid var(--border-subtle);border-radius:2px;box-shadow:var(--shadow-md)}
.preference-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.preference-header h3{margin:0;font-size:16px}
.preference-close{width:32px;height:32px;border:0;border-radius:50%;background:var(--surface-hover);color:var(--text-primary);font-size:20px;line-height:1;cursor:pointer}
.preference-body{display:flex;flex-direction:column;gap:12px;margin:0}
.preference-body fieldset{margin:0;padding:0;border:0}
.preference-body legend{margin-bottom:6px;font-size:14px;font-weight:600;color:var(--text-secondary)}
.preference-body label{display:flex;align-items:center;gap:8px;font-size:14px}
.preference-body select{min-height:36px;padding:4px 8px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary)}
.preference-note{margin:4px 0 0;color:var(--text-tertiary)}
@media(max-width:719px){
 .console-account .account-trigger{width:calc(100% - 24px);margin:0 12px 8px}
 .storefront-account .account-trigger{min-height:32px;padding:4px 8px}.storefront-account .account-id{max-width:128px}
 .storefront-account .account-menu{right:0;left:auto}
 .workspace-trigger{min-height:32px;padding:4px 8px}.workspace-trigger-name{max-width:128px}
 .account-controls[data-account-variant="home"] .workspace-menu{right:0;left:auto}
 .account-menu{min-width:180px}
 .workspace-menu{min-width:180px}
}

/* Sidebar-mounted console controls stack; dashboard top-bar controls stay inline. */
.sidebar-header > .account-controls{width:100%;flex-direction:column;align-items:stretch;margin:8px 0}
.sidebar-header > .account-controls .console-account .account-trigger{width:100%;margin:0}
.sidebar-header > .account-controls .workspace-switcher{width:100%}
.sidebar-header > .account-controls .workspace-trigger{width:100%}

/* Signed-in console shell: every internal page shares the dashboard top bar,
   left navigation, and right content workspace. */
.prototype-console{
  display:flex;
  flex-direction:column;
  min-height:100vh;
  align-items:stretch;
}
.prototype-console .console-topbar{
  position:sticky;
  top:0;
  z-index:100;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  min-height:64px;
  padding:10px 24px;
  border-bottom:1px solid var(--border-subtle);
  background:var(--surface);
}
.prototype-console .console-topbar-identity{
  min-width:0;
  display:flex;
  align-items:center;
}
.prototype-console .console-account-anchor{
  min-width:0;
  display:flex;
  align-items:center;
}
.prototype-console .console-topbar-nav{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}
.console-site-search{display:flex;align-items:center;min-width:180px;max-width:280px;flex:1 1 220px;border-radius:2px}
.console-site-search:focus-within{outline:2px solid var(--brand-primary);outline-offset:3px}
.console-site-search input{flex:1 1 auto;min-width:0;width:100%;min-height:36px;padding:0 12px;border:1px solid var(--border-subtle);border-right:0;border-radius:2px 0 0 2px;background:var(--surface);color:var(--text-primary);font-size:14px;white-space:nowrap;text-overflow:ellipsis}
.console-site-search button{display:inline-grid;place-items:center;width:38px;min-width:38px;min-height:36px;padding:0;border:1px solid var(--border-subtle);border-left:0;border-radius:0 2px 2px 0;background:var(--surface);color:var(--text-secondary);cursor:pointer}
.console-site-search input:focus,
.console-site-search button:focus,
.console-site-search input:focus-visible,
.console-site-search button:focus-visible{outline:none;box-shadow:none}
.console-site-search button:hover{background:var(--surface-hover);color:var(--brand-primary)}
.console-site-search svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.console-filter{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;margin:0 0 16px;padding:0;border:0}
.console-filter-field{display:flex;align-items:center;gap:12px;min-width:0;max-width:340px;flex:1 1 240px}
.console-filter-field-grow{flex:1 1 260px;max-width:420px}
.console-filter-label{margin:0;color:var(--text-secondary);font-size:14px;font-weight:600}
.console-filter-label{flex-shrink:0;white-space:nowrap}
.console-filter .pa-input,.console-filter .pa-select{box-sizing:border-box;width:100%;min-width:0;height:36px;min-height:36px;padding:0 12px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font:inherit;font-size:14px}
.console-filter .admin-filter-select{position:relative;flex:1;min-width:0}
.console-filter .workspace-select{min-width:180px}
.console-filter .workspace-select-trigger{height:36px;min-height:36px;padding:0 12px;font-size:14px}
.console-filter .workspace-select-value{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.console-filter .workspace-select-options{padding:6px;border:1px solid var(--border-subtle);border-radius:2px;box-shadow:0 2px 6px rgb(17 24 39 / .12)}
.console-filter .workspace-select-options li{min-height:36px;padding:8px 12px;border-radius:2px;font-size:14px;white-space:nowrap}
.console-filter-actions{display:flex;gap:8px;margin-left:auto}
.console-refresh-button{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-secondary);cursor:pointer}
.console-refresh-button:hover{color:var(--brand-primary);border-color:var(--brand-primary)}
.console-refresh-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
.console-refresh-button:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
.console-filter-tags{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:0 0 12px}
.console-filter-tag{display:inline-flex;align-items:center;gap:6px;min-height:28px;padding:0 10px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface-muted);color:var(--text-secondary);font-size:14px}
.console-filter-tag button{display:inline-grid;place-items:center;width:20px;height:20px;min-height:20px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;cursor:pointer}
.console-filter-tag button:hover{background:var(--surface-hover);color:var(--brand-primary)}
.prototype-console .console-topbar-link{
  display:inline-flex;
  align-items:center;
  min-height:44px;
  padding:6px 12px;
  border-radius:2px 0 0 2px;
  color:var(--text-secondary);
  font-size:14px;
  font-weight:500;
  white-space:nowrap;
}
.prototype-console .console-topbar-link:hover,
.prototype-console .console-topbar-link[aria-current="page"]{
  background:var(--surface-hover);
  color:var(--text-primary);
  text-decoration:none;
}
.prototype-console .console-topbar-home,
.prototype-console .console-topbar-login{
  min-height:44px;
  margin-left:4px;
  white-space:nowrap;
}
.prototype-console .console-workspace{
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  align-items:start;
  min-height:calc(100vh - 64px);
}
.prototype-console .console-sidebar{
  width:240px;
  min-height:calc(100vh - 64px);
  height:auto;
  position:sticky;
  top:64px;
  align-self:start;
  overflow-y:auto;
}
.prototype-console .console-content{
  width:100%;
  min-width:0;
  max-width:none;
  margin:0;
  padding:12px 24px 24px;
}
[data-profile-page]{padding-bottom:48px}
.profile-identity{display:flex;align-items:center;gap:16px;padding:4px 0 20px}
.profile-avatar{position:relative;display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:linear-gradient(135deg,#fecaca,#ef4444);color:#fff}
.profile-avatar-image{position:absolute;inset:0;width:100%;height:100%;border-radius:50%;object-fit:cover}
.profile-avatar-initials{font-size:18px;font-weight:600}
.profile-avatar-camera{position:absolute;right:-2px;bottom:-2px;display:grid;place-items:center;width:22px;height:22px;border:2px solid #fff;border-radius:50%;background:#111827}
.profile-avatar-camera svg{width:11px;height:11px;fill:#fff}
.profile-edit{margin-top:8px;align-self:flex-start}
.profile-edit-dialog{width:min(720px,calc(100vw - 32px))}
.profile-edit-dialog form{display:grid;gap:16px}
.profile-edit-dialog label{display:grid;gap:6px;color:var(--text-secondary);font-size:14px;font-weight:600}
.profile-edit-dialog input{min-height:42px;padding:0 12px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-primary);font:inherit}
.profile-identity-name{margin:0;font-size:20px;line-height:24px;font-weight:600}
.profile-identity-email{margin:4px 0 0;font-size:14px;color:var(--text-secondary)}
.profile-board{margin-bottom:24px;padding:16px;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);box-shadow:0 1px 2px rgba(15,23,42,.04)}
.profile-board-toolbar{display:flex;align-items:center;gap:16px;min-height:40px}
.profile-board-title{display:inline-flex;align-items:center;gap:6px;margin:0;font-size:16px;font-weight:600}
.profile-controls{display:flex;align-items:center;gap:8px}
.profile-select{min-width:132px}
.profile-select:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
.profile-segments{display:inline-flex;flex-wrap:nowrap;gap:2px;height:36px;margin:0;padding:0;box-sizing:border-box;border:1px solid #e5e7eb;border-radius:2px;background:#f3f4f6}
.profile-segment{display:inline-flex;flex:0 0 auto;align-items:stretch;white-space:nowrap}
.profile-segment input{position:absolute;width:1px;height:1px;margin:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.profile-segment span{display:inline-flex;width:100%;min-height:34px;align-self:stretch;align-items:center;justify-content:center;padding:0 12px;border-radius:2px;color:var(--text-primary);font-size:14px;line-height:1;cursor:pointer}
.profile-segment input:checked + span{background:var(--surface);color:var(--brand-primary);font-weight:500}
.profile-segment input:focus-visible + span{outline:2px solid var(--brand-primary);outline-offset:2px}
.profile-external-link{display:inline-flex;align-items:center;gap:6px;margin-left:auto;color:var(--text-primary);font-size:14px;text-decoration:none}
.profile-external-link:hover{color:var(--brand-primary)}
.profile-external-link svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.profile-usage-layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:24px;align-items:start;margin-top:20px}
.profile-usage-total{margin:0;font-size:40px;line-height:44px;font-weight:700;letter-spacing:-.02em}
.profile-usage-note{margin:8px 0 0;font-size:14px;color:var(--text-secondary)}
.profile-chart{margin-top:16px}
.profile-chart svg{display:block;width:100%;height:auto;font-family:inherit}
.profile-top-panel{border-left:1px solid #e5e7eb;padding-left:24px;min-height:260px}
.profile-top-title{margin:0;font-family:inherit;font-size:16px;font-weight:600}
.profile-top-title span{color:var(--text-secondary)}
.profile-top-models{display:grid;gap:12px;margin:16px 0 0;padding:0;list-style:none}
.profile-top-model{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:14px}
.profile-model-name{min-width:0;overflow-wrap:anywhere}
.profile-model-value{flex:0 0 auto;font-weight:600}
.profile-divider{margin:24px 0;border:0;border-top:1px solid #e5e7eb}
.profile-activity-toolbar{margin-bottom:20px}
.profile-info-icon{width:16px;height:16px;fill:none;stroke:var(--text-secondary);stroke-width:2;stroke-linecap:round}
.profile-activity-metric{margin-left:auto;font-size:14px;color:var(--text-primary)}
.profile-stat-stack{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:flex-start;gap:16px 48px;margin:12px 0 20px}
.profile-stat{min-width:0}
.profile-stat + .profile-stat{border-top:0;padding-top:0}
.profile-stat-label{margin:0;font-size:14px;color:var(--text-secondary)}
.profile-stat-value{margin:6px 0 0;font-size:20px;font-weight:600}
.profile-last-created{display:flex;align-items:baseline;gap:8px}
.profile-last-created-date{font-size:14px;font-weight:400;color:var(--text-secondary)}
.profile-heatmap{overflow:hidden}
.profile-heatmap-grid{display:flex;align-items:flex-start;justify-content:space-between;gap:4px;min-width:0;width:100%}
.profile-heat-day-column{display:grid;flex:0 0 14px;grid-template-rows:16px repeat(7,var(--profile-heat-size,14px));gap:4px}
.profile-heat-corner{display:block}
.profile-heat-month-group{display:flex;flex:1 1 0;flex-direction:column;gap:4px;min-width:0}
.profile-heat-year-separator{display:flex;flex-direction:column;align-items:center;align-self:stretch;flex:0 0 auto;margin:0 4px}
.profile-heat-year-separator::after{content:"";width:1px;flex:1;margin-top:4px;background:var(--border-subtle)}
.profile-heat-year{font-size:14px;line-height:16px;color:#6b7280}
.profile-heat-month-separator{width:1px;align-self:stretch;flex:0 0 auto;background:var(--border-subtle)}
.profile-heat-month-grid{display:grid;grid-template-columns:repeat(var(--profile-heat-weeks,1),minmax(0,1fr));grid-template-rows:repeat(7,var(--profile-heat-size,14px));gap:4px}
.profile-heat-month{grid-column:1 / -1;overflow:hidden;font-size:14px;line-height:16px;color:#6b7280;text-align:center;white-space:nowrap;flex:0 0 16px;height:16px}
.profile-heat-day{display:block;width:14px;height:14px;overflow:hidden;font-size:14px;line-height:14px;color:#6b7280;text-align:center}
.profile-heat-cell{width:100%;max-width:14px;min-width:0;height:auto;aspect-ratio:1;align-self:start;justify-self:center;border-radius:2px}
.profile-heat-cell-current{box-shadow:inset 0 0 0 2px var(--brand-primary),0 0 0 1px var(--surface)}
.profile-heat-legend{display:inline-flex;align-items:center;gap:5px;margin-top:12px;font-size:14px;color:var(--text-secondary)}
.profile-heat-swatch{width:12px;height:12px;border-radius:2px}
.profile-heat-swatch[data-level="0"]{background:#f3f4f6}
.profile-heat-swatch[data-level="1"]{background:#dbeafe}
.profile-heat-swatch[data-level="2"]{background:#bfdbfe}
.profile-heat-swatch[data-level="3"]{background:#93c5fd}
.profile-heat-swatch[data-level="4"]{background:#3b82f6}
.profile-keys-title{margin-bottom:20px}
.profile-table-wrap{border:1px solid var(--border-subtle);border-radius:2px;overflow:hidden}
.profile-key-table{width:100%;border-collapse:collapse}
.profile-key-table th,.profile-key-table td{padding:14px 16px;font-size:14px;text-align:left;vertical-align:middle}
.profile-key-table th{color:var(--text-secondary);font-weight:500}
.profile-key-table tbody tr + tr{border-top:1px solid #e5e7eb}
.profile-key-name{font-weight:500}
.profile-key-masked{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.profile-key-created,.profile-key-table th:last-child{text-align:right}
.profile-empty{color:var(--text-secondary)}
@media(max-width:900px){
  .profile-usage-layout{grid-template-columns:1fr}
  .profile-top-panel{border-left:0;border-top:1px solid #e5e7eb;padding-left:0;padding-top:20px;min-height:0}
}
@media(max-width:719px){
  .profile-board{padding:16px}
  .profile-board-toolbar{align-items:flex-start;flex-wrap:wrap}
  .profile-external-link{margin-left:0}
  .profile-stat-stack{gap:16px 32px}
  .profile-stat + .profile-stat{border-top:0;padding-top:0}
  .profile-key-table th,.profile-key-table td{padding:12px}
}
.prototype-console .console-account .account-trigger{
  width:auto;
  max-width:min(420px,42vw);
  margin:0;
  padding:8px 10px;
}
.prototype-console .console-account .account-id{
  max-width:none;
  overflow:visible;
  text-overflow:clip;
  white-space:nowrap;
}
.prototype-console .workspace-trigger{
  width:auto;
  max-width:min(260px,28vw);
}
.prototype-console .workspace-trigger-name{
  max-width:180px;
}
.prototype-console[data-page="dashboard"] .console-account .account-trigger,
.prototype-console[data-page="dashboard"] .workspace-trigger{
  height:44px;
  min-height:44px;
  padding:0 12px;
}
.prototype-console .console-topbar-nav .site-preferences{
  order:1;
}
.prototype-console .console-topbar-nav .console-topbar-home{
  order:2;
}
.prototype-console .console-account .account-menu{
  left:0;
  right:auto;
}
.prototype-console .workspace-menu{
  left:0;
  right:auto;
}
@media(max-width:719px){
  .prototype-console .console-topbar{
    align-items:stretch;
    flex-direction:column;
    gap:8px;
    padding:10px 16px;
  }
  .prototype-console .console-topbar-nav{
    justify-content:flex-start;
    overflow-x:auto;
    flex-wrap:nowrap;
    padding-bottom:2px;
  }
  .prototype-console .console-topbar-login{
    margin-left:0;
  }
  .prototype-console .console-workspace{
    display:block;
    min-height:0;
  }
  .prototype-console .console-sidebar{
    width:100%;
    min-height:0;
    position:static;
    border-right:0;
    border-bottom:1px solid var(--border-subtle);
  }
  .prototype-console .console-content{
    padding:24px 16px;
  }
  .prototype-console .console-account .account-trigger{
    width:100%;
    max-width:none;
  }
  .prototype-console .workspace-trigger{
    width:100%;
    max-width:none;
  }
  .prototype-console .workspace-trigger-name{
    max-width:none;
  }
}
@media(min-width:720px){
  .prototype-console .console-topbar-nav{
    flex-wrap:nowrap;
  }
}
@media(min-width:1024px){
  .prototype-console .console-content{
    padding:32px;
  }
}

/* ---------- Compact OpenRouter-aligned rhythm ---------- */
:root{
  --compact-control-h:32px;
  --compact-gap:4px;
  --compact-pad-x:8px;
  --compact-radius:2px;
  --compact-header-h:56px;
  --compact-page-pad:24px;
  --compact-card-pad:16px;
}
.storefront-header,
.prototype-store>.storefront-header{
  height:var(--compact-header-h);
  min-height:var(--compact-header-h);
  padding:0 16px;
}
.nav-links,
.console-topbar-nav,
.site-preferences,
.account-controls{
  gap:var(--compact-gap);
}
.nav-links{
  align-items:center;
  gap:20px;
}
.nav-links > .site-preferences{margin-left:16px}
.nav-link,
.console-topbar-link,
.console-topbar-home,
.console-topbar-login{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  padding:0 14px;
  border-radius:2px;
  font-size:14px;
  line-height:1;
}
.console-topbar-home,
.console-topbar-login{
  margin-left:0;
}
.storefront-header .nav-link{
  height:44px;
  min-height:44px;
}
.storefront-header .account-dashboard-link{
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
}
.btn,
.primary-button,
.ghost-button,
.pa-btn,
button{
  min-height:var(--compact-control-h);
  padding:0 12px;
  border-radius:2px;
  font-size:14px;
}
.btn{
  height:var(--compact-control-h);
  padding:0 12px;
}
input,
select,
textarea{
  min-height:var(--compact-control-h);
  padding:6px 10px;
  border-radius:2px;
}
.panel-header{padding:12px 16px}
.panel-body{padding:16px}
.panel-footer{padding:12px 16px}
th,td{padding:8px 12px}
.storefront-main,
.prototype-store>main{
  padding:var(--compact-page-pad);
}
.info-card,
.data-card,
.product-card,
.order-card,
.help-article,
.pa-card,
.metric-card,
.login-card{
  padding:var(--compact-card-pad);
}
.hero{padding:40px 24px}
.hero h1{font-size:28px;margin-bottom:12px}
.hero p{margin-bottom:16px}
.metric-grid,
.pa-grid.kpis{gap:12px}
.metric-card strong,
.pa-kpi-value{font-size:24px}
.data-table th,
.data-table td,
.pa-table-wrap th,
.pa-table-wrap td{padding:8px 12px}
.state-card,
.state,
.empty-state,
.error-state{padding:12px;margin-bottom:12px}
dialog{padding:16px}
footer{padding:16px}
.sidebar-header{height:var(--compact-header-h);padding:0 16px}
.sidebar-nav{padding:12px;gap:2px}
.sidebar-link{padding:6px 10px;min-height:var(--compact-control-h)}
.prototype-console .sidebar-nav{display:flex;flex-direction:column}
.prototype-console .sidebar-link{display:flex;align-items:center;width:100%;white-space:nowrap}
.sidebar-section{padding:12px 8px 2px}
body[data-domain="console"] .console-sidebar{display:flex;flex-direction:column;max-height:calc(100dvh - 64px);overflow:hidden}
body[data-domain="console"] .console-sidebar>.sidebar-nav{flex:1;min-height:0;overflow-y:auto}
body[data-domain="console"] .sidebar-section{display:block;margin:12px 0 4px;padding:6px 10px;background:var(--border-subtle);color:var(--text-primary);font-weight:700;border-radius:2px}
body[data-domain="console"] .sidebar-section:first-child{margin-top:0}
body[data-domain="console"] .sidebar-shutter{overflow:visible}
body[data-domain="console"] .sidebar-signout{flex-shrink:0;margin:12px;width:calc(100% - 24px);min-height:36px;padding:6px 10px;text-align:left;color:var(--danger);background:transparent;border:0;border-radius:2px;font:inherit;font-weight:700;cursor:pointer}
body[data-domain="console"] .sidebar-signout:hover{color:var(--danger);background:var(--danger-surface)}
@media(max-width:719px){
 body[data-domain="console"] .console-sidebar{max-height:none;min-height:0;position:static;width:100%}
 body[data-domain="console"] .sidebar-nav{max-height:50dvh;overflow:auto}
 body[data-domain="console"] .sidebar-panel{flex-direction:column;align-items:stretch}
}
.dashboard-main{padding:var(--compact-page-pad)}
.catalog-layout{gap:12px}
.catalog-row{padding:16px;gap:16px}
.catalog-sidebars{gap:12px}
.vendor-panel .panel-header{margin-bottom:4px}
.vendor-rail{gap:2px}
.vendor-item{padding:6px 8px;min-height:var(--compact-control-h)}
.dashboard-range{gap:8px;margin-bottom:16px}
.pagination{gap:8px;margin-top:12px}
.session-actions{gap:8px;margin-top:16px}
.channel-fields{gap:12px}
.resource-details{gap:6px 12px}
.auth-shell{gap:24px}
.auth-journey{gap:12px}
.auth-journey-card,
.auth-form-card{padding:20px}
.auth-steps{gap:8px}
.auth-tab-switch{gap:4px;margin-bottom:12px}
.tab-btn{min-height:var(--compact-control-h)}
.helper-list{gap:4px}
.field-tooltip{padding:6px 8px}
.otp-cell{height:44px}
.otp-grid{gap:6px}
.preference-sheet{padding:12px}
.preference-body{gap:8px}
.preference-body select{min-height:var(--compact-control-h)}
.theme-toggle-group button{min-width:36px;padding:2px 8px}
.account-menu-divider{margin:4px 0}
.workspace-menu-heading{margin:0 0 4px}
.workspace-menu-status{margin:4px 0 0}
.prototype-runtime-note{margin:4px auto 0;padding:4px 16px}
.prototype-console .prototype-runtime-note{margin:4px 24px 0}
.prototype-auth{padding:16px}
.prototype-auth .login-card{padding:16px}
.prototype-auth form>label{margin-top:12px}
.prototype-auth form>button[type=submit]{margin-top:16px}
.prototype-console .login-layout{min-height:60vh}
.prototype-console[data-page=wallet] .metric-card{padding:16px}
.prototype-console[data-page=wallet] .metric-card strong{font-size:24px}
.site-preferences{gap:var(--compact-gap);margin-left:0}
.site-preference-button{
  width:var(--compact-control-h);
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  border-radius:2px;
}
.site-preference-icon{width:16px;height:16px}
.site-preference-code{right:-3px;bottom:-3px;min-width:20px;height:20px;font-size:14px;line-height:18px}
.site-preferences-floating{top:12px;right:12px}
.account-trigger,
.workspace-trigger{
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  padding:0 8px;
  border-radius:2px;
  gap:6px;
}
.account-avatar{width:20px;height:20px}
.account-chevron,
.workspace-chevron{width:10px;height:10px}
.account-menu,
.workspace-menu{
  top:calc(100% + 4px);
  padding:4px;
  border-radius:2px;
}
.account-menu-list a,
.account-menu-list button,
.workspace-option-select{
  min-height:var(--compact-control-h);
  padding:0 8px;
  border-radius:2px;
}
.prototype-console .console-topbar{
  min-height:var(--compact-header-h);
  padding:0 16px;
  gap:16px;
}
.prototype-console .console-topbar-nav{
  align-items:center;
  gap:20px;
}
.prototype-console .console-topbar-nav > .site-preferences{margin-left:16px}
.prototype-console .console-topbar-link{
  min-height:var(--compact-control-h);
  padding:0 14px;
}
.prototype-console .console-topbar-home,
.prototype-console .console-topbar-login{
  min-height:var(--compact-control-h);
  margin-left:0;
}
.prototype-console .console-workspace{
  min-height:calc(100vh - var(--compact-header-h));
}
.prototype-console .console-sidebar{
  min-height:calc(100vh - var(--compact-header-h));
  top:var(--compact-header-h);
}
.prototype-console .console-content{padding:var(--compact-page-pad)}
.prototype-console > main{padding:var(--compact-page-pad)}
.prototype-console .console-account .account-trigger{
  padding:0 8px;
}
.prototype-console[data-page="dashboard"] .console-account .account-trigger,
.prototype-console[data-page="dashboard"] .workspace-trigger{
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  padding:0 8px;
}
.console-actions{gap:8px}
.admin-nav{gap:4px;margin:16px 0}
.admin-nav button{min-height:var(--compact-control-h);padding:0 8px}
.product-form{margin-top:12px;padding:16px}
.admin-dialog .product-form{padding:16px}
.prototype-console .login-layout{min-height:60vh}
.relay-facts{gap:8px 16px}
.relay-steps{gap:8px}
.endpoint-table td:first-child{width:72px}
.secret-banner{gap:8px}
.agent-example{padding:12px}
.order-search-header{gap:8px}
.order-search-form{margin:0 4px}
.order-search-form input{
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  padding:0 12px;
  border-radius:2px 0 0 2px;
}
.order-search-submit{
  width:var(--compact-control-h);
  min-width:var(--compact-control-h);
  height:var(--compact-control-h);
  min-height:var(--compact-control-h);
  border-radius:0 2px 2px 0;
}
.order-search-layout{min-height:calc(100vh - var(--compact-header-h))}
.order-sidebar{
  top:var(--compact-header-h);
  min-height:calc(100vh - var(--compact-header-h));
  padding:16px 12px;
}
.order-sidebar h2{margin-bottom:12px}
.order-sidebar-nav{gap:2px}
.order-sidebar-nav a{min-height:var(--compact-control-h);padding:6px 10px}
.order-sidebar-note{margin-top:16px;padding-top:12px}
.order-main{padding:16px}
.order-main-heading{margin-bottom:16px}
.order-query-card,
.order-detail-card{padding:16px}
.order-query-form input,
.order-query-form button{min-height:var(--compact-control-h)}
.order-center{gap:12px}
.order-results{gap:8px}
.order-results .order-card{padding:12px 16px;gap:12px}
.order-results .order-card h3{margin-bottom:6px}
.order-results .order-facts{gap:6px 12px}
.order-results .order-facts div{gap:1px}
.order-detail-header{padding-bottom:16px}
.order-detail-grid{gap:12px 16px;margin-top:16px}
.order-detail-section{margin-top:16px;padding-top:16px}
.order-detail-section h3{margin-bottom:6px}
.order-detail-section p{margin-bottom:6px}
.order-detail-section .card-actions{margin-top:8px}
.order-context{padding:8px 12px}
.order-query-prompt h2{font-size:16px}
.order-query-prompt p{margin-bottom:12px}
.order-flow-steps li{min-height:var(--compact-control-h);padding:4px 8px}
.order-kicker,
.order-search-hint,
.order-sidebar-note p,
.order-sidebar-note a,
.order-detail-grid dt,
.order-retention-note{font-size:14px}
.prototype-auth[data-page="sign-in"] .auth-shell{gap:24px}
.prototype-auth[data-page="sign-in"] .auth-form-card{padding:20px}
.prototype-auth[data-page="sign-in"] form[data-mode]>input:not(.otp-cell):not(.visually-hidden){
  height:36px;
  margin-bottom:12px;
}
.prototype-auth[data-page="sign-in"] .primary-button,
.prototype-auth[data-page="sign-in"] .ghost-button{
  height:36px;
}
.prototype-auth[data-page="sign-up"] form input:not([type=checkbox]):not(.otp-cell):not(.visually-hidden){
  height:36px;
  min-height:36px;
  margin-bottom:12px;
}
@media(max-width:719px){
  .storefront-header,
  .prototype-store>.storefront-header{
    height:auto;
    min-height:var(--compact-header-h);
    padding:8px 16px;
  }
  .nav-links{gap:4px}
  .nav-link{padding:0 8px}
  .nav-links > .site-preferences{margin-left:0}
  .nav-link,
  .console-topbar-link,
  .console-topbar-home,
  .console-topbar-login,
  .site-preference-button,
  .account-trigger,
  .workspace-trigger,
  .btn,
  .primary-button,
  .ghost-button,
  .pa-btn,
  button,
  input,
  select{
    min-height:44px;
  }
  .site-preference-button{width:44px;height:44px}
  .prototype-console .console-topbar{padding:8px 16px;gap:4px}
  .prototype-console .console-topbar-nav{gap:4px}
  .prototype-console .console-topbar-nav > .site-preferences{margin-left:0}
  .prototype-console .console-content,
  .prototype-console > main,
  .prototype-store>main,
  .dashboard-main,
  .order-main{padding:16px}
  .order-search-layout{display:block;min-height:0}
  .order-sidebar{position:static;min-height:0;padding:12px}
  .order-sidebar-nav a{min-height:44px}
}
@media(min-width:720px) and (max-width:1023px){
  .storefront-header,
  .prototype-store>.storefront-header{padding:0 24px}
  .nav-links{gap:12px}
  .nav-link{padding:0 10px}
  .nav-links > .site-preferences{margin-left:8px}
  .prototype-console .console-topbar{padding:0 24px}
  .prototype-console .console-topbar-nav{gap:12px}
  .prototype-console .console-topbar-link{padding:0 10px}
  .prototype-console .console-topbar-nav > .site-preferences{margin-left:8px}
}
@media(min-width:1024px) and (max-width:1279px){
  .prototype-console .console-topbar{padding:0 24px}
  .prototype-console .console-topbar-nav{gap:12px}
  .prototype-console .console-topbar-link{padding:0 10px}
  .prototype-console .console-topbar-nav > .site-preferences{margin-left:8px}
}
@media(min-width:1024px){
  .prototype-console .console-content{padding:var(--compact-page-pad)}
}

/* Page-local styles are authored after the shared sheet on several pages.
   These higher-specificity rules keep the compact rhythm authoritative. */
html body .hero{
  min-height:0;
  gap:16px;
  padding:40px 24px;
}
html body .hero h1{font-size:28px;margin:0}
html body .hero>p{margin:0;max-width:640px}
html body .hero-badges{gap:8px}
html body .badge{min-height:28px;padding:2px 8px}
html body .hero .card-actions{gap:8px;margin-top:16px}
html body .hero .card-actions a{min-height:32px;padding:0 12px;border-radius:2px}
html body .feature-row{gap:12px;margin-top:16px}
html body .feature-card h2{font-size:16px}
html body .feature-card>p{font-size:14px;line-height:1.5}
html body .filter-panel{gap:12px;margin:16px 0 12px;padding:16px}
html body .filter-field{gap:4px}
html body .filter-field input{min-height:32px;padding:6px 10px}
html body .filter-field button{min-height:32px;padding:0 12px}
html body .grid{gap:12px}
html body .order-card{padding:12px}
html body .order-card-body{gap:8px}
html body .order-facts{gap:4px}
html body .product-visual{min-height:96px;padding:16px}
html body .product-visual img{height:96px}
html body .product-icon{width:40px;height:40px;border-radius:2px}
html body .product-body{padding:16px;gap:8px}
html body .product-meta{gap:8px}
html body .stock-pill{min-height:24px;padding:2px 8px}
html body .card-actions{gap:8px}
html body .skeleton-card{padding:16px}
html body .detail-layout{gap:12px}
html body .checkout-grid{gap:8px}
html body .quantity-stepper{grid-template-columns:32px minmax(0,1fr) 32px;gap:4px}
html body .detail-facts{gap:8px}
html body .detail-facts div{padding:8px 10px}
html body .redirect-disclosure label{min-height:32px}
html body .payment-status{padding:12px 16px;gap:8px}
html body .payment-status dl{gap:8px}
html body .payment-status dl div{padding:8px 10px}
html body .payment-actions{gap:8px}
html body .order-flow-steps{gap:4px;margin-bottom:12px}
html body .order-flow-steps li{min-height:32px;padding:4px 8px}
html body .order-search-hint{border-radius:2px}
html body .order-context{gap:8px;margin-top:12px}
html body .two-column{gap:12px}
html body .help-grid{gap:8px}
html body .help-article{padding:12px}
html body .footer-shell{padding:16px 24px;gap:8px}
html body .prototype-store[data-page="shop"]>main{padding:24px}
html body .catalog-sidebars{top:72px;gap:12px}
html body .catalog-filters .panel-body{gap:12px}
html body .category-card-grid{gap:6px}
html body .category-card{min-height:56px;padding:8px 10px;border-radius:2px}
html body .vendor-mobile-details summary{min-height:32px;padding:4px 8px}
html body .vendor-mobile-details .vendor-rail{gap:4px;margin-bottom:8px;padding:0 4px}
html body .catalog-mobile-controls{margin-bottom:12px}
html body #product-list{gap:12px}
html body .package-card{padding:16px;border-radius:2px}
html body .package-topline{gap:8px}
html body .package-tier{min-height:24px;padding:2px 8px;font-size:14px}
html body .package-vendor img{width:20px;height:20px}
html body .package-name{margin-top:8px;font-size:16px}
html body .package-desc{margin-top:4px;font-size:14px;line-height:1.5}
html body .package-tags{margin-top:8px;gap:4px}
html body .package-tags li{padding:2px 6px;font-size:14px}
html body .package-pricing{margin-top:12px;padding-top:8px;gap:8px}
html body .package-price{font-size:20px}
html body .package-cycle{font-size:14px}
html body .package-stock{font-size:14px}
html body .package-actions{gap:4px;margin-top:12px}
/* The site canvas belongs to the domain shell, not an individual page section.
   Page-local body shorthands must not erase it during client-side navigation. */
body[data-domain="site"]{
  --site-canvas-color:#f7f9ff;
  --site-grid-line:rgba(70,110,255,.055);
  background-color:var(--site-canvas-color)!important;
  background-image:linear-gradient(var(--site-grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--site-grid-line) 1px,transparent 1px)!important;
  background-size:32px 32px!important;
  background-position:0 0!important;
  background-repeat:repeat!important;
  min-height:100vh;
}
@media(prefers-color-scheme:dark){
  html:not([data-color-scheme-override="light"]) body[data-domain="site"]{
    --site-canvas-color:#140d20;
    --site-grid-line:rgba(167,139,250,.09);
  }
}
html[data-color-scheme-override="dark"] body[data-domain="site"]{
  --site-canvas-color:#140d20;
  --site-grid-line:rgba(167,139,250,.09);
}
body[data-domain="site"]>main{min-width:0}
body[data-domain="site"][data-page="help"]{
  --site-canvas-color:var(--surface-muted);
  background-image:none!important;
  background-size:auto!important;
  background-position:0 0!important;
  background-repeat:no-repeat!important;
}
body[data-domain="site"] .empty-state{background:var(--surface-muted)!important}
body[data-domain="site"] .error-state{
  background:linear-gradient(var(--danger-surface),var(--danger-surface)),var(--surface)!important;
}
body[data-domain="site"] .payment-status.payment-failed{
  background:linear-gradient(var(--danger-surface),var(--danger-surface)),var(--surface)!important;
}
body[data-domain="site"] .payment-status{
  background:linear-gradient(var(--success-surface),var(--success-surface)),var(--surface)!important;
}
body[data-domain="site"] .redirect-disclosure{
  background:linear-gradient(var(--warning-surface),var(--warning-surface)),var(--surface)!important;
}
body[data-domain="site"] .category-card[aria-pressed="true"]{
  background:linear-gradient(rgba(124,58,237,.08),rgba(124,58,237,.08)),var(--surface)!important;
}
body[data-domain="site"][data-layout="storefront"]>#site-footer{
  flex-shrink:0;
  width:100%;
  margin:0;
  padding:0;
  border-top:1px solid var(--border-subtle);
  background:transparent;
  color:var(--text-secondary);
}
html body[data-domain="site"][data-layout="storefront"] #site-footer .footer-shell{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:start;
  width:100%;
  max-width:1180px;
  margin:0 auto;
  gap:24px;
  padding:24px;
  color:inherit;
}
html body[data-domain="site"][data-layout="storefront"] #site-footer .footer-shell>div{min-width:0;overflow-wrap:anywhere}
@media(max-width:1023px){
  html body[data-domain="site"][data-layout="storefront"] #site-footer .footer-shell{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:599px){
  html body[data-domain="site"][data-layout="storefront"] #site-footer .footer-shell{grid-template-columns:minmax(0,1fr);gap:20px;padding:24px 16px}
}
html body #site-footer h2{font-size:14px;margin:2px 0 4px}
html body #site-footer p{font-size:14px;margin:2px 0}
html body .prototype-auth[data-page="sign-in"] .auth-shell{gap:24px}
html body .prototype-auth[data-page="sign-in"] .auth-form-card{padding:20px}
html body .prototype-auth[data-page="sign-in"] form[data-mode]>input:not(.otp-cell):not(.visually-hidden){
  height:36px;
  margin-bottom:12px;
}
html body .prototype-auth[data-page="sign-in"] .primary-button,
html body .prototype-auth[data-page="sign-in"] .ghost-button{height:36px}
html body .prototype-auth[data-page="sign-up"] form input:not([type=checkbox]):not(.otp-cell):not(.visually-hidden){
  height:36px;
  min-height:36px;
  margin-bottom:12px;
}
html body .auth-journey-card,
html body .auth-form-card{padding:20px}
html body .auth-journey{gap:12px}
html body .auth-steps{gap:8px}
html body .auth-tab-switch{gap:4px;margin-bottom:12px}
html body .tab-btn{min-height:32px}
html body .helper-list{gap:4px}
html body .field-tooltip{padding:6px 8px}
html body .otp-grid{gap:6px}
html body .otp-cell{height:44px}
html body .captcha-image{height:36px}
html body .login-modes-bar{gap:8px;margin-top:16px;padding-top:12px}
html body .social-circle-btn{width:40px;height:40px}
html body .console-actions{gap:8px}
html body .relay-facts{gap:8px 16px}
html body .relay-steps{gap:8px}
html body .endpoint-table td:first-child{width:72px}
html body .secret-banner{gap:8px}
html body .agent-example{padding:12px}
html body .pa-docs pre{padding:12px}
html body .pa-docs th,
html body .pa-docs td{padding:6px 8px}
html body .admin-nav{gap:4px;margin:16px 0}
html body .admin-nav button{min-height:32px;padding:0 8px}
html body .product-form{margin-top:12px;padding:16px}
html body .admin-dialog .product-form{padding:16px}
html body .state{padding:16px}
html body .data-card{padding:16px}
html body .login-card{padding:16px}
html body .data-table th,
html body .data-table td{padding:8px 12px}
html body .filter-grid{gap:8px}
html body .metric-grid,
html body .overview-grid{gap:8px}
html body .distribution,
html body .latest-list{padding:12px}
html body .form-actions{gap:8px}

/* Small-radius normalization: rectangular controls and surfaces use 2px.
   True circles (avatars, dots, step badges) keep their 50% radius. */
html body input:not([type="checkbox"]):not([type="radio"]),
html body select,
html body textarea,
html body button,
html body .btn,
html body .primary-button,
html body .ghost-button,
html body .pa-btn,
html body .storefront-account-trigger,
html body .site-preference-button,
html body .site-preference-code,
html body .workspace-trigger,
html body .account-trigger,
html body .theme-toggle-group,
html body .status-pill,
html body .pa-badge,
html body .pa-env-chip,
html body .vendor-count,
html body .order-search-hint,
html body .package-tier,
html body .pwd-meter,
html body .skeleton,
html body .brand-mark,
html body .brand-icon,
html body .product-icon,
html body .product-visual span,
html body .pa-logo-mark,
html body .pa-kpi-icon,
html body .pa-card,
html body .panel,
html body .data-card,
html body .info-card,
html body .product-card,
html body .order-card,
html body .help-article,
html body .metric-card,
html body .login-card,
html body .auth-card,
html body .auth-form-card,
html body .auth-journey-card,
html body .hero,
html body .promo-banner,
html body .pa-table-wrap,
html body .state-card,
html body .state,
html body .empty-state,
html body .error-state,
html body dialog,
html body .admin-dialog,
html body .workspace-dialog,
html body .preference-sheet,
html body .account-menu,
html body .workspace-menu,
html body .storefront-account-menu,
html body .field-tooltip,
html body .vendor-item,
html body .category-card,
html body .package-card,
html body .order-query-card,
html body .order-query-help,
html body .order-detail-card,
html body .order-context,
html body .product-form,
html body .distribution,
html body .latest-list,
html body .pa-alert,
html body .pa-toast,
html body .pa-login-card,
html body .workspace-create-toggle,
html body .workspace-create-submit,
html body .workspace-field input,
html body .workspace-field textarea,
html body .workspace-dialog-actions .pa-btn,
html body .console-site-search{
  border-radius:2px!important;
}
html body .pa-toast{border-radius:8px!important}
/* Composite input+button controls keep a square internal seam. */
html body .console-site-search input[type="search"],
html body .order-search-form input[type="search"]{
  border-radius:2px 0 0 2px!important;
}
html body .console-site-search button,
html body .order-search-submit{
  border-radius:0 2px 2px 0!important;
}
html body .checkbox-grid{gap:8px}
html body .admin-dialog{padding:0}
html body .login-layout{min-height:60vh}
@media(max-width:719px){
  html body .hero{padding:32px 16px}
  html body .hero .card-actions a{min-height:44px}
  html body .prototype-store[data-page="shop"]>main{padding:16px}
  html body .catalog-sidebars{top:auto}
  html body .vendor-item{min-height:44px}
  html body .package-actions{grid-template-columns:1fr}
  html body .social-circle-btn{width:44px;height:44px}
}

/* Dialog shell: sticky title/action bands with a scrollable body. */
html body dialog{
  padding:0!important;
  border:1px solid var(--border-subtle)!important;
  border-radius:2px!important;
  background:var(--surface)!important;
  color:var(--text-primary)!important;
  box-shadow:0 24px 64px rgba(15,23,42,.24)!important;
  max-height:calc(100vh - 32px)!important;
  overflow:hidden!important;
}
html body dialog[data-css-viewer-compatible="true"]{
  position:fixed!important;
  inset:0!important;
  margin:auto!important;
  height:fit-content!important;
  z-index:110!important;
}
html body .payai-dialog-backdrop{
  position:fixed;
  inset:0;
  z-index:105;
  background:rgb(17 24 39 / .4);
}
html body dialog[data-css-viewer-compatible="true"]::backdrop{
  background:transparent!important;
  backdrop-filter:none!important;
}
html body dialog > form{
  display:flex!important;
  flex-direction:column!important;
  gap:14px!important;
  max-height:calc(100vh - 32px)!important;
  margin:0!important;
  padding:0!important;
  overflow:auto!important;
}
html body dialog > h2:first-child,
html body dialog > form > h2:first-child,
html body dialog > form > header:first-child{
  position:sticky!important;
  top:0!important;
  z-index:2!important;
  margin:0!important;
  padding:18px 24px!important;
  border-bottom:1px solid var(--border-subtle)!important;
  background:linear-gradient(180deg,var(--surface),var(--surface-muted))!important;
  font-size:18px!important;
  line-height:1.35!important;
}
html body dialog > form > header:first-child h2{
  margin:0!important;
  font-size:18px!important;
}
html body dialog > form > header:first-child p{
  margin:4px 0 0!important;
  color:var(--text-secondary)!important;
  font-size:14px!important;
}
html body dialog > :not(h2):not(form),
html body dialog > form > :not(h2):not(header):not(.form-actions):not(.session-actions):not(menu):not(.workspace-dialog-actions):not(.dialog-actions){
  margin-left:24px!important;
  margin-right:24px!important;
}
html body dialog > h2:first-child + *,
html body dialog > form > h2:first-child + *,
html body dialog > form > header:first-child + *{
  margin-top:18px!important;
}
html body dialog > form > .form-actions:last-child,
html body dialog > form > .session-actions:last-child,
html body dialog > form > menu:last-child,
html body dialog > form > .workspace-dialog-actions:last-child,
html body dialog > form > .dialog-actions:last-child{
  position:sticky!important;
  bottom:0!important;
  z-index:2!important;
  display:flex!important;
  justify-content:flex-end!important;
  gap:10px!important;
  margin:0!important;
  padding:16px 24px!important;
  border-top:1px solid var(--border-subtle)!important;
  background:linear-gradient(0deg,var(--surface),var(--surface-muted))!important;
}
html body dialog > form > :last-child:not(.form-actions):not(.session-actions):not(menu):not(.workspace-dialog-actions):not(.dialog-actions){
  margin-bottom:24px!important;
}
/* Dialog form controls follow one MDC-like compact baseline. */
:root{
  --dialog-control-h:36px;
  --dialog-control-line:20px;
}
html body dialog input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not(.otp-cell),
html body dialog select,
html body dialog .workspace-select-trigger,
html body dialog textarea.credential-textarea{
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  height:var(--dialog-control-h)!important;
  min-height:var(--dialog-control-h)!important;
  max-height:var(--dialog-control-h)!important;
  padding:0 12px!important;
  border:1px solid var(--border-subtle)!important;
  border-radius:2px!important;
  background:var(--surface)!important;
  color:var(--text-primary)!important;
  font:inherit!important;
  font-size:14px!important;
  line-height:var(--dialog-control-line)!important;
  vertical-align:middle!important;
}
html body dialog textarea:not(.credential-textarea){
  box-sizing:border-box!important;
  width:100%!important;
  min-width:0!important;
  min-height:96px!important;
  padding:10px 12px!important;
  border:1px solid var(--border-subtle)!important;
  border-radius:2px!important;
  background:var(--surface)!important;
  color:var(--text-primary)!important;
  font:inherit!important;
  font-size:14px!important;
  line-height:var(--dialog-control-line)!important;
  resize:vertical!important;
}
/* Workspace dialog textareas keep the page-owned no-resize contract; this
   later rule wins the shared resize:vertical declaration above. */
html body .workspace-dialog textarea.workspace-field-textarea,
html body .workspace-dialog .workspace-field textarea{
  resize:none!important;
}
html body dialog label{
  color:var(--text-secondary)!important;
  font-size:14px!important;
  line-height:var(--dialog-control-line)!important;
  font-weight:600!important;
}

/* Admin dialogs reuse the workspace form rhythm without copying its page styles. */
html body .admin-dialog{
  width:min(720px,calc(100vw - 32px))!important;
  max-width:min(720px,calc(100vw - 32px))!important;
}
html body .admin-dialog > form{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px 20px!important;
  align-items:start!important;
  padding:0!important;
}
html body .admin-dialog > form > *{
  min-width:0;
}
html body .admin-dialog > form > h2,
html body .admin-dialog > form > header,
html body .admin-dialog > form > fieldset,
html body .admin-dialog > form > p,
html body .admin-dialog > form > .workspace-form-grid,
html body .admin-dialog > form > .channel-layout,
html body .admin-dialog > form > .drawer-fields,
html body .admin-dialog > form > .administrator-fields,
html body .admin-dialog > form > .model-channel-group,
html body .admin-dialog > form > .channel-fields,
html body .admin-dialog > form > .form-actions,
html body .admin-dialog > form > .session-actions,
html body .admin-dialog > form > menu,
html body .admin-dialog > form > label.checkbox-option,
html body .admin-dialog > form > div:has(> textarea:not(.credential-textarea)){
  grid-column:1/-1;
}
html body .admin-dialog > form > label:not(.checkbox-option),
html body .admin-dialog > form > input:not([type="hidden"]){
  grid-column:1/-1;
}
html body .admin-dialog .administrator-fields{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px 20px!important;
}
html body .admin-dialog .administrator-fields > div:has(> .reason-textarea){
  grid-column:1/-1;
}
html body .admin-dialog .drawer-fields{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:16px!important;
}
html body .admin-dialog .drawer-fields > *{
  min-width:0;
  grid-column:1/-1;
}
html body .admin-dialog fieldset{
  min-width:0;
  margin:0;
  padding:12px;
  border:1px solid var(--border-subtle);
  border-radius:2px;
}
html body .admin-dialog legend{
  padding:0;
  color:var(--text-secondary);
  font-size:14px;
  font-weight:600;
}
@media(max-width:719px){
  html body .admin-dialog > form{
    grid-template-columns:1fr!important;
    gap:14px!important;
  }
}

/* Workspace list dialog keeps the wider spacious editor shell that the
   workspace design baseline owns; the 720px admin clamp must not narrow it. */
@media(min-width:720px){
  html body .workspace-dialog{
    width:min(880px,calc(100vw - 48px))!important;
    max-width:min(880px,calc(100vw - 48px))!important;
  }
}
html body dialog input[readonly]:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not(.otp-cell){
  background:var(--surface-hover)!important;
  color:var(--text-secondary)!important;
  cursor:not-allowed!important;
}

/* Task 010: one compact account heading band, aligned with the sidebar. */
html body.prototype-console .console-content{padding:12px 24px}
html body.prototype-console .console-content > section:first-child > .pa-section-head,
html body.prototype-console .console-content > .activity-header,
html body.prototype-console .console-content > .notification-settings-header,
html body.prototype-console .console-content > .credits-header,
html body.prototype-console .console-content > .profile-identity{
  box-sizing:border-box;min-height:44px;margin:0;padding:0 0 12px;
  display:flex;align-items:center;justify-content:space-between;gap:12px;
}
html body.prototype-console .console-content > .profile-identity{justify-content:flex-start;min-height:72px}
html body.prototype-console .profile-identity .profile-avatar{width:48px;height:48px;flex:0 0 48px}
html body.prototype-console .profile-identity .profile-avatar-initials{font-size:20px}
html body.prototype-console .profile-identity .profile-avatar-camera{width:24px;height:24px}
html body.prototype-console .profile-identity .profile-avatar-camera svg{width:12px;height:12px}
html body.prototype-console .profile-identity-name{font-size:20px;line-height:24px}
html body.prototype-console .profile-identity-email{margin:2px 0 0;line-height:16px}
html body.prototype-console .console-content > section:first-child > .pa-section-head .pa-h1,
html body.prototype-console .activity-header .pa-h1{font-size:24px;line-height:32px}
html body.prototype-console .console-content > section:first-child > .pa-section-head + [role="status"]:empty,
html body.prototype-console .console-content > .activity-state:empty{display:none}
html body.prototype-console .console-content > section:first-child > [role="status"]{margin:0}
html body.prototype-console .console-content > section:first-child + .pa-section,
html body.prototype-console .console-content > [hidden] + .pa-section{margin-top:0}
html body.prototype-console .console-content > .activity-tabs{margin-top:0}
html body.prototype-console .workspace-search input[type="search"]{height:36px;min-height:36px;padding:0 12px}
html body.prototype-console .sidebar-nav a.active,
html body.prototype-console .sidebar-nav a[aria-current="page"]{background:var(--brand-primary);color:white}
/* The table owns the boundary; nested cards do not add a second frame. */
html body.prototype-console .pa-card:has(> .pa-table-wrap){padding:0;border:0;box-shadow:none;background:transparent}
html body.prototype-console .pa-card > .pa-card-head{border:0;padding:0 0 12px}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) table{border-collapse:collapse}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) thead{border:0}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) th{background:var(--surface-muted);border:0;border-bottom:1px solid var(--border-subtle)}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) tbody{border:0}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) td p{margin:0;border:0}
html body.prototype-console :is(.pa-table-wrap,.profile-table-wrap,.activity-table-wrap) td .pa-empty{border:0;margin:0}
html body.prototype-console .profile-chart{overflow-x:auto}
html body.prototype-console .profile-chart svg{width:auto;max-width:none;height:auto}
html body.prototype-console .profile-activity-toolbar,
html body.prototype-console .profile-keys-title{margin-bottom:0}
html body.prototype-console .credits-balance{margin-top:0}
html body.prototype-console .notification-group{padding-top:0}
html body.prototype-console .notification-group + .notification-group{padding-top:24px}
/* Refresh actions are shared by Activity and Order Records. */
html body.prototype-console #order-records-refresh,
html body.prototype-console #activity-refresh{display:inline-grid;place-items:center;width:32px;height:32px;min-height:32px;padding:0;border:1px solid var(--border-subtle);border-radius:2px;background:var(--surface);color:var(--text-secondary);cursor:pointer}
html body.prototype-console #order-records-refresh svg,
html body.prototype-console #activity-refresh svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
html body.prototype-console #order-records-refresh:focus-visible,
html body.prototype-console #activity-refresh:focus-visible{outline:2px solid var(--brand-primary);outline-offset:2px}
@media(max-width:719px){
  html body.prototype-console .console-content{padding:12px 16px}
  html body.prototype-console .workspace-search{min-width:0;flex:1}
  html body.prototype-console .console-filter-field,html body.prototype-console .console-filter-field-grow{max-width:none;flex:1 1 100%}
  html body.prototype-console .console-filter-actions{margin-left:0}
  html body.prototype-console .console-filter-actions .pa-btn{flex:1;justify-content:center}
  html body.prototype-console #activity-refresh{margin-top:0;align-self:center}
}
