:root {
  color-scheme: dark;
  --bg: #071015;
  --bg-soft: #0b171d;
  --surface: #111f26;
  --surface-soft: #15262f;
  --surface-raised: #1b3039;
  --text: #f2f8f5;
  --text-soft: #bfd0cb;
  --muted: #94aaa4;
  --muted-strong: #b5c7c1;
  --line: rgba(168, 197, 187, .14);
  --line-strong: rgba(168, 197, 187, .24);
  --accent: #83e7c3;
  --accent-strong: #43cfa7;
  --accent-soft: rgba(91, 214, 169, .12);
  --accent-ink: #08140f;
  --brand-lime: #b7f36a;
  --brand-violet: #71877d;
  --brand-coral: #ff9c83;
  --success: #71dfa6;
  --warning: #ffd17a;
  --danger: #ff8c9a;
  --shadow: 0 12px 34px rgba(0, 0, 0, .18);
  --shadow-raised: 0 22px 54px rgba(0, 0, 0, .27);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f7f5;
  --bg-soft: #edf3f0;
  --surface: #ffffff;
  --surface-soft: #f7faf8;
  --surface-raised: #edf4f0;
  --text: #15251f;
  --text-soft: #425850;
  --muted: #5d756b;
  --muted-strong: #435a50;
  --line: rgba(29, 67, 51, .12);
  --line-strong: rgba(29, 67, 51, .21);
  --accent: #087b5d;
  --accent-strong: #096749;
  --accent-soft: rgba(8, 123, 93, .09);
  --accent-ink: #ffffff;
  --brand-lime: #72c83d;
  --brand-violet: #637b70;
  --success: #087a59;
  --warning: #805300;
  --danger: #b33c50;
  --shadow: 0 12px 30px rgba(23, 55, 41, .055);
  --shadow-raised: 0 20px 44px rgba(23, 55, 41, .09);
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    radial-gradient(ellipse at 12% 0%, rgba(88, 207, 164, .14), transparent 32%),
    radial-gradient(ellipse at 94% 8%, rgba(104, 91, 190, .13), transparent 35%),
    linear-gradient(rgba(160, 204, 185, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(160, 204, 185, .018) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-soft), var(--bg) 58%);
  background-size: auto, auto, 44px 44px, 44px 44px, auto;
  content: "";
  pointer-events: none;
}
html[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 78% -12%, rgba(50, 158, 116, .09), transparent 39%),
    linear-gradient(rgba(47, 91, 76, .022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(47, 91, 76, .022) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdfc, var(--bg) 56%);
  background-size: auto, 44px 44px, 44px 44px, auto;
}
a { color: var(--accent); text-decoration: none; text-underline-offset: 3px; }
a:hover { color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button, [role="button"] { cursor: pointer; }
button:disabled, input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; }
img, svg { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
::selection { color: var(--text); background: rgba(72, 200, 231, .25); }

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 11px 15px;
  transform: translateY(-160%);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
.skip-link:focus { transform: translateY(0); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  clip-path: inset(50%) !important;
}
.icon { display: block; width: 18px; height: 18px; flex: 0 0 18px; }
.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .15em;
  line-height: 1.35;
  text-transform: uppercase;
}
.muted, .hint, .tiny { color: var(--muted); }
.tiny { font-size: 12px; }
.hint { font-size: 13px; line-height: 1.6; }
.field-help { display: block; color: var(--muted); font-size: 11px; font-weight: 500; line-height: 1.5; }

.glass {
  border: 1px solid color-mix(in srgb, var(--line-strong) 72%, transparent);
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface) 95%, white 5%), var(--surface));
  box-shadow: var(--shadow);
}
.brand-mark {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border: 1px solid rgba(155, 255, 47, .38);
  border-radius: 14px;
  background: #03070b url("../images/amzx-mark.png") center / 88% auto no-repeat;
  color: transparent;
  font-size: 0;
  font-weight: 950;
  letter-spacing: -.09em;
  box-shadow: 0 8px 24px rgba(46, 208, 164, .13), inset 0 1px rgba(255, 255, 255, .14);
}
.brand-mark::after { display: none; }
.brand-mark.has-custom-logo{overflow:hidden;background:var(--bg-soft);border-color:var(--line-strong)}
.brand-mark.has-custom-logo img{display:block;width:100%;height:100%;object-fit:contain;padding:3px}

/* Application frame and navigation */
.app-shell {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: 260px minmax(0, 1fr);
}
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  height: 100dvh;
  min-height: 540px;
  flex-direction: column;
  padding: 24px 15px 18px;
  border-right: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 10% 0%, rgba(79, 187, 145, .09), transparent 48%),
    color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(20px);
}
.side-brand {
  display: flex;
  min-height: 62px;
  align-items: center;
  gap: 12px;
  padding: 0 9px 24px;
  color: var(--text);
}
.side-brand:hover { color: var(--text); }
.brand-copy { display: grid; gap: 2px; }
.brand-copy strong { font-size: 16px; font-weight: 900; letter-spacing: .1em; line-height: 1; }
.brand-copy > span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .2em; }
.nav-group { margin: 10px 0 18px; }
.nav-group > small {
  display: block;
  padding: 0 12px 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .16em;
}
.sidebar nav { display: grid; gap: 4px; }
.sidebar nav a {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 13px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 660;
  transition: color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.sidebar nav a .icon { color: var(--muted); }
.sidebar nav a:hover, .sidebar nav a.active {
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: linear-gradient(105deg, color-mix(in srgb, var(--accent) 13%, var(--surface)), color-mix(in srgb, var(--brand-violet) 8%, var(--surface)));
  color: var(--text);
}
.sidebar nav a.active { box-shadow: inset 3px 0 var(--accent), 0 6px 20px rgba(38, 123, 190, .08); }
.sidebar nav a.active .icon { color: var(--accent); }
.side-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding: 15px 7px 0;
  border-top: 1px solid var(--line);
}
.version-chip { display: flex; align-items: center; gap: 9px; color: var(--text); }
.version-chip > span:last-child { display: grid; gap: 1px; }
.version-chip strong { font-size: 11px; }
.version-chip small { color: var(--muted); font-size: 10px; }
.live-dot { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 15%, transparent); }
.logout-link { padding: 8px 9px; color: var(--muted-strong); font-size: 11px; font-weight: 650; }
.logout-link:hover { color: var(--danger); }
.content { min-width: 0; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 78px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px clamp(17px, 2.8vw, 36px);
  border-bottom: 1px solid var(--line-strong);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bg) 94%, transparent), color-mix(in srgb, var(--surface) 90%, transparent));
  backdrop-filter: blur(18px);
}
.topbar h1 { margin: 0; color: var(--text); font-size: clamp(22px, 2.1vw, 27px); font-weight: 810; letter-spacing: -.045em; line-height: 1.18; }
.top-title .eyebrow { margin-bottom: 4px; color: var(--muted); font-size: 9px; letter-spacing: .14em; }
.top-title .eyebrow span { margin: 0 4px; color: var(--line-strong); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.icon-action, .avatar {
  display: grid;
  width: 41px;
  height: 41px;
  flex: 0 0 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: none;
}
.icon-action { padding: 0; }
.icon-action:hover { border-color: var(--accent); background: var(--surface-raised); color: var(--accent); }
.avatar { border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 14px; font-weight: 850; }
.avatar:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }
.mobile-nav { display: none; }
.page {
  display: grid;
  width: min(100%, 1260px);
  max-width: 1260px;
  gap: 20px;
  margin: 0 auto;
  padding: clamp(22px, 3.2vw, 44px) clamp(17px, 2.8vw, 36px);
}

/* Headings, cards and dashboard */
.page-hero, .hero {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(ellipse at 86% 12%, rgba(101, 215, 174, .16), transparent 34%),
    radial-gradient(ellipse at 100% 100%, rgba(103, 155, 126, .10), transparent 45%),
    linear-gradient(132deg, var(--surface), color-mix(in srgb, var(--surface) 88%, #17332e));
  box-shadow: var(--shadow-raised);
}
.page-hero { padding: clamp(23px, 3vw, 37px); }
.hero { display: grid; min-height: 252px; grid-template-columns: minmax(0, 1fr) 190px; align-items: center; gap: 25px; padding: clamp(25px, 3.1vw, 40px); }
.hero h2, .page-hero h2 {
  margin: 10px 0 11px;
  color: var(--text);
  font-size: clamp(26px, 3.2vw, 39px);
  font-weight: 730;
  letter-spacing: -.045em;
  line-height: 1.12;
}
.hero p, .page-hero p:not(.eyebrow) { max-width: 660px; margin-top: 0; color: var(--text-soft); line-height: 1.7; }
.compact-hero { display: flex; min-height: 0; align-items: center; justify-content: space-between; gap: 20px; }
.compact-hero h2 { margin: 4px 0 7px; font-size: clamp(25px, 3vw, 32px); }
.compact-hero p { max-width: 700px; margin-bottom: 0; }
.pulse-orb, .shield-orb {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(111, 218, 244, .36);
  background: radial-gradient(circle at 35% 26%, #d1fbff, #50d5ee 35%, #276bf5 74%, #533fc0);
  color: #06202a;
  box-shadow: 0 12px 45px rgba(29, 155, 198, .2), inset 0 0 24px rgba(255,255,255,.2);
}
.pulse-orb { width: 142px; height: 142px; border-radius: 50%; }
.pulse-orb span { display: block; width: 92px; height: 92px; border-radius: 22px; background: #03070b url("../images/amzx-mark.png") center / 88% auto no-repeat; box-shadow: 0 12px 28px rgba(0, 0, 0, .23); font-size: 0; }
.shield-orb { width: 70px; height: 70px; border-radius: 22px; font-size: 29px; font-weight: 900; }
.actions, .inline-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.stat {
  position: relative;
  min-width: 0;
  min-height: 132px;
  overflow: hidden;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    radial-gradient(ellipse at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 48%),
    linear-gradient(145deg, var(--surface), color-mix(in srgb, var(--surface) 94%, var(--brand-violet)));
  box-shadow: var(--shadow);
}
.stat::after { position: absolute; top: 0; right: 18px; width: 52px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--brand-violet)); content: ""; opacity: .9; }
.stat span, .stat small { display: block; color: var(--muted); }
.stat span { color: var(--text-soft); font-size: 12px; font-weight: 650; }
.stat strong { display: block; margin: 9px 0 3px; color: var(--text); font-size: clamp(25px, 3vw, 34px); font-weight: 760; letter-spacing: -.05em; line-height: 1.08; font-variant-numeric: tabular-nums; }
.stat small { font-size: 11px; }
.panel {
  min-width: 0;
  padding: clamp(19px, 2.1vw, 28px);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--surface) 96%, var(--accent) 4%), var(--surface) 60%);
  box-shadow: var(--shadow);
}
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.panel-head h2 { margin: 0; color: var(--text); font-size: 18px; font-weight: 720; letter-spacing: -.025em; }
.panel-head > a:not(.btn) { font-size: 12px; font-weight: 700; }
.badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--line));
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .12em;
  line-height: 1.3;
}
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { background: color-mix(in srgb, var(--surface-soft) 82%, var(--accent-soft)); color: var(--muted-strong); font-size: 10px; font-weight: 820; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
td { color: var(--text-soft); font-size: 12px; }
td strong { color: var(--text); }
tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: var(--accent-soft); }
code {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
  overflow-wrap: anywhere;
}
.empty { padding: 34px 20px; color: var(--muted); text-align: center; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 17px; }

/* Buttons and form fields */
.btn {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text);
  font-size: 12px;
  font-weight: 730;
  letter-spacing: .005em;
  line-height: 1.2;
  text-align: center;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.btn:hover { color: var(--text); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary {
  border-color: color-mix(in srgb, var(--brand-lime) 64%, white);
  background: linear-gradient(112deg, var(--brand-lime) 0%, #73e4b2 100%);
  color: #102019;
  box-shadow: 0 9px 25px rgba(75, 190, 128, .18), inset 0 1px rgba(255, 255, 255, .42);
}
.btn.primary:hover { border-color: color-mix(in srgb, var(--brand-lime) 45%, white); background: linear-gradient(112deg, #c6fa82 0%, #8aefc5 100%); color: #102019; box-shadow: 0 12px 30px rgba(75, 190, 128, .25), inset 0 1px rgba(255, 255, 255, .48); }
.btn.secondary { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text); }
.btn.secondary:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn.ghost { border-color: var(--line); background: var(--surface-soft); color: var(--text-soft); }
.btn.ghost:hover { border-color: var(--line-strong); background: var(--surface-raised); color: var(--text); }
.btn.compact { min-height: 38px; padding: 0 12px; font-size: 11px; }
.btn.wide { width: 100%; }
.btn.danger-btn { border-color: color-mix(in srgb, var(--danger) 38%, var(--line)); background: color-mix(in srgb, var(--danger) 12%, var(--surface)); color: var(--danger); }
.btn.danger-btn:hover { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 18%, var(--surface)); }
.btn.disabled, .btn:disabled, .btn[aria-disabled="true"] { opacity: .48; pointer-events: none; transform: none; }
.button-icon { display: inline-flex; }
.button-icon .icon { width: 15px; height: 15px; }
.stack { display: grid; gap: 14px; }
.stack h2 { margin: 6px 0 0; color: var(--text); font-size: 16px; }
label { color: var(--text-soft); font-size: 12px; font-weight: 680; }
.stack label, form > label, fieldset label { display: grid; align-content: start; gap: 7px; }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]),
textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 45px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  background: color-mix(in srgb, var(--bg-soft) 76%, var(--surface));
  color: var(--text);
  font-size: 13px;
  font-weight: 450;
  line-height: 1.45;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}
textarea { min-height: 82px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type="checkbox"], input[type="radio"] { width: 19px; height: 19px; accent-color: var(--accent-strong); }
input[type="color"] { width: 45px; height: 42px; padding: 4px; border: 1px solid var(--line-strong); border-radius: 9px; background: var(--surface); }
input[type="file"] { width: 100%; min-height: 45px; padding: 8px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--bg-soft); color: var(--text-soft); }
input[type="file"]::file-selector-button { min-height: 29px; margin-right: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-raised); color: var(--text); font: inherit; font-size: 11px; font-weight: 700; }
.grid2, .grid3 { display: grid; min-width: 0; gap: 12px; }
.grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.toggle-line { display: flex !important; align-items: center; gap: 10px; }
.toggle-line input { flex: 0 0 19px; }
.alert { margin: 0; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 11px; font-size: 12px; line-height: 1.55; }
.alert.success { border-color: color-mix(in srgb, var(--success) 34%, var(--line)); background: color-mix(in srgb, var(--success) 10%, var(--surface)); color: var(--success); }
.alert.danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); background: color-mix(in srgb, var(--danger) 10%, var(--surface)); color: var(--danger); }
.alert.warning { border-color: color-mix(in srgb, var(--warning) 34%, var(--line)); background: color-mix(in srgb, var(--warning) 9%, var(--surface)); color: var(--warning); }
.alert.info { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); background: var(--accent-soft); color: var(--text-soft); }
hr { height: 1px; margin: 5px 0; border: 0; background: var(--line); }
.search { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.search input { flex: 1; }
.copy-field { display: flex; min-width: 0; align-items: center; gap: 8px; }
.copy-field input { min-width: 0; flex: 1; }
.auto-fill-card {
  padding: 13px 15px;
  border: 1px solid color-mix(in srgb, var(--accent) 26%, var(--line));
  border-radius: 12px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), color-mix(in srgb, var(--brand-violet) 6%, var(--surface)) 70%, var(--surface));
  color: var(--text);
}
.auto-fill-card p { margin: 5px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.auto-filled { border-color: var(--success) !important; box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 13%, transparent) !important; }
.details-box { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.details-box summary { color: var(--text); font-size: 12px; font-weight: 740; }
.details-box > div { display: grid; gap: 12px; margin-top: 13px; }

/* Lists, extraction and diagnostics */
.editor-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(290px, .75fr); align-items: start; gap: 18px; }
.preview { position: sticky; top: 105px; min-width: 0; }
.qr-box {
  display: grid;
  min-height: 220px;
  place-items: center;
  margin: 14px 0 17px;
  padding: 18px;
  border: 1px solid #dce8e3;
  border-radius: 18px;
  background: radial-gradient(circle at 50% 44%, #ffffff 0%, #ffffff 64%, #f3f8f5 100%);
  color: #4a5961;
}
.qr-box img, .qr-box canvas, .qr-svg { display: block; width: min(100%, 195px); height: auto; }
.qr-empty { max-width: 240px; color: #667782; font-size: 12px; text-align: center; }
.cards-list { display: grid; gap: 9px; }
.company-card {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(170px, 1.1fr) minmax(150px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--surface-soft) 96%, var(--accent-soft)), var(--surface-soft));
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.company-card:hover { border-color: var(--line-strong); background: var(--surface-raised); }
.company-card > div:first-child { display: grid; min-width: 0; grid-template-columns: 10px minmax(0, 1fr); column-gap: 8px; }
.company-card > div:first-child > strong { min-width: 0; overflow-wrap: anywhere; }
.company-card > div:first-child > small { grid-column: 2; margin-top: 3px; color: var(--muted); }
.company-card code { min-width: 0; overflow-wrap: anywhere; }
.status { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: var(--muted); }
.status.active { background: var(--success); box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 15%, transparent); }
.status.inactive { background: var(--danger); }
.card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.icon-btn {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
}
.icon-btn:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.check-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 16px 0; }
.check { display: flex; min-height: 46px; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); color: var(--text-soft); font-size: 11px; font-weight: 640; }
.check > span { display: grid; width: 23px; height: 23px; flex: 0 0 23px; place-items: center; border-radius: 7px; background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); font-weight: 900; }
.check.ok > span { background: color-mix(in srgb, var(--success) 12%, var(--surface)); color: var(--success); }
.check.warn > span { background: color-mix(in srgb, var(--warning) 13%, var(--surface)); color: var(--warning); }
.security-list { display: grid; gap: 9px; }
.security-list > div { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; column-gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.security-list > div > span { display: grid; width: 27px; height: 27px; grid-row: 1 / span 2; place-items: center; border-radius: 8px; background: color-mix(in srgb, var(--success) 11%, var(--surface)); color: var(--success); font-weight: 850; }
.security-list b { color: var(--text); font-size: 11px; }
.security-list small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.toast {
  position: fixed;
  z-index: 100;
  bottom: 24px;
  left: 50%;
  max-width: min(90vw, 380px);
  padding: 11px 15px;
  transform: translate(-50%, 12px);
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: var(--surface-raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 720;
  opacity: 0;
  box-shadow: var(--shadow-raised);
  transition: opacity .18s var(--ease), transform .18s var(--ease);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }

/* Sign-in and setup screens */
.auth-page, .login-page, .install-page { display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: clamp(20px, 3.5vw, 48px); }
.auth-shell { display: grid; width: min(1240px, 100%); grid-template-columns: minmax(0, 1.28fr) minmax(360px, .72fr); align-items: stretch; gap: 22px; }
.auth-brand {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  min-height: 610px;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(30px, 4.4vw, 54px) clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-strong);
  border-radius: 30px;
  background-color: var(--surface);
  background-image:
    url("../images/amzx-place-id-login-art.svg"),
    radial-gradient(ellipse at 12% 7%, rgba(83, 202, 154, .18), transparent 35%),
    radial-gradient(ellipse at 92% 26%, rgba(100, 82, 190, .14), transparent 41%),
    linear-gradient(135deg, #122229 0%, #0b171d 72%);
  background-repeat: no-repeat;
  background-position: right 26px bottom 24px, center, center, center;
  background-size: min(47%, 370px) auto, auto, auto, auto;
  box-shadow: var(--shadow-raised);
}
.auth-brand::before { position: absolute; z-index: -1; inset: 0; background: linear-gradient(rgba(164, 198, 236, .028) 1px, transparent 1px), linear-gradient(90deg, rgba(164, 198, 236, .028) 1px, transparent 1px); background-size: 42px 42px; content: ""; pointer-events: none; }
.brand-lockup, .mobile-brand { display: flex; align-items: center; gap: 12px; }
.brand-lockup strong, .brand-lockup span, .mobile-brand strong, .mobile-brand span { display: block; }
.brand-lockup strong, .mobile-brand strong { color: var(--text); font-size: 17px; font-weight: 900; letter-spacing: .13em; }
.brand-lockup span, .mobile-brand span { color: var(--muted-strong); font-size: 11px; }
.auth-copy { position: relative; z-index: 1; width: min(100%, 560px); margin: auto 0; padding: 40px 0 192px; }
.auth-copy h1 { max-width: 560px; margin: 13px 0 17px; color: var(--text); font-size: clamp(36px, 4.2vw, 54px); font-weight: 780; letter-spacing: -.058em; line-height: 1.02; text-wrap: balance; }
.auth-copy > p:last-of-type { max-width: 510px; color: var(--text-soft); font-size: 15px; line-height: 1.72; }
.security-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 22px; }
.security-pills span { padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent); color: var(--text-soft); font-size: 11px; font-weight: 720; backdrop-filter: blur(10px); }
.auth-card, .login-card, .install-card { width: 100%; max-width: 470px; align-self: center; padding: clamp(25px, 3vw, 38px); border: 1px solid var(--line-strong); border-radius: 27px; background: linear-gradient(150deg, color-mix(in srgb, var(--surface) 98%, white 2%), color-mix(in srgb, var(--surface) 96%, #10251e)); box-shadow: var(--shadow-raised); }
.auth-card h2, .login-card h1, .install-card h1 { margin: 7px 0 6px; color: var(--text); font-size: 29px; font-weight: 760; letter-spacing: -.045em; }
.auth-card > p.muted, .login-card > p.muted { margin-top: 0; line-height: 1.6; }
.mobile-brand { display: none; margin-bottom: 22px; }
.auth-form { margin-top: 18px; }
.auth-form label { gap: 8px; color: var(--muted-strong); font-size: 12px; font-weight: 720; }
.auth-form input { min-height: 51px; padding-inline: 14px; border-radius: 13px; background: rgba(6, 14, 26, .55); }
.auth-form .btn.primary { min-height: 51px; margin-top: 3px; border-radius: 13px; font-size: 13px; font-weight: 800; }
.auth-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted-strong); font-size: 11px; }
html[data-theme="light"] .auth-form input { background: var(--bg-soft); color: var(--text); }
.login-shell, .install-shell { width: min(100%, 720px); }
.login-card .brand-mark { margin-bottom: 19px; }
.install-card { max-width: none; }
.install-card h1 { font-size: 30px; }
.install-card > p { color: var(--text-soft); }
.install-card .stack { margin-top: 17px; }
.brand-row { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; }
.brand-row h1 { margin: 4px 0 0; }

@media (max-width: 1080px) {
  .app-shell { grid-template-columns: 228px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .page { padding: 22px; }
  .company-card { grid-template-columns: minmax(150px, 1fr) minmax(130px, 1fr); }
  .company-card .card-actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .topbar { min-height: 74px; padding: 12px 18px; }
  .page { gap: 16px; padding: 18px 15px 100px; }
  .auth-shell { width: min(720px, 100%); grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .auth-brand { min-height: 470px; padding: 28px 32px 24px; background-position: right 18px bottom 18px, center, center, center; background-size: min(38%, 280px) auto, auto, auto, auto; }
  .auth-copy { width: min(65%, 520px); padding: 25px 0 145px; }
  .auth-card { max-width: none; }
  .hero { grid-template-columns: minmax(0, 1fr) 135px; min-height: 210px; }
  .pulse-orb { width: 118px; height: 118px; }
  .editor-grid { grid-template-columns: minmax(0, 1fr); }
  .preview { position: static; }
  .company-card { grid-template-columns: minmax(160px, 1fr) minmax(150px, 1fr) auto; }
  .company-card .card-actions { grid-column: auto; justify-content: flex-end; }
  .mobile-nav {
    position: fixed;
    z-index: 50;
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 3px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: 17px;
    background: color-mix(in srgb, var(--surface) 97%, transparent);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-raised);
  }
  .mobile-nav a {
    display: grid;
    min-width: 0;
    min-height: 51px;
    align-content: center;
    justify-items: center;
    gap: 2px;
    padding: 4px 2px;
    border-radius: 11px;
    color: var(--muted-strong);
    font-size: 9.5px;
    font-weight: 680;
    line-height: 1.1;
  }
  .mobile-nav a .icon { width: 17px; height: 17px; }
  .mobile-nav a:hover, .mobile-nav a.active { background: var(--accent-soft); color: var(--accent); }
}
@media (max-width: 680px) {
  .topbar { min-height: 67px; padding: 10px 13px; }
  .topbar h1 { font-size: 19px; }
  .top-title .eyebrow { max-width: 190px; font-size: 8px; }
  .top-actions { gap: 6px; }
  .top-actions > .btn { display: none; }
  .icon-action, .avatar { width: 39px; height: 39px; flex-basis: 39px; }
  .page { padding: 14px 11px 94px; }
  .page-hero { padding: 20px; border-radius: 18px; }
  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 21px; border-radius: 18px; }
  .hero h2, .page-hero h2 { font-size: clamp(25px, 8vw, 32px); }
  .hero p, .page-hero p:not(.eyebrow) { margin-bottom: 13px; font-size: 13px; }
  .pulse-orb { display: none; }
  .compact-hero { align-items: flex-start; }
  .shield-orb { width: 48px; height: 48px; border-radius: 15px; font-size: 21px; }
  .stats { grid-template-columns: 1fr; gap: 9px; }
  .stat { display: grid; min-height: 88px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 15px 17px; }
  .stat strong { grid-row: 1 / span 2; grid-column: 2; margin: 0 0 0 12px; font-size: 25px; }
  .panel { padding: 16px; border-radius: 14px; }
  .panel-head { align-items: flex-start; gap: 10px; }
  .panel-head h2 { font-size: 16px; }
  .two-col { grid-template-columns: 1fr; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .check-grid { grid-template-columns: 1fr; }
  .company-card { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .company-card .card-actions { grid-column: auto; justify-content: flex-start; }
  .company-card code { display: block; max-width: 100%; }
  .search { align-items: stretch; }
  .search .btn { min-width: 78px; }
  .copy-field { align-items: stretch; }
  .copy-field .btn { flex: 0 0 auto; }
  .auth-page, .login-page, .install-page { padding: 15px; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-card { max-width: 480px; margin: auto; padding: clamp(23px, 7vw, 32px); }
  .mobile-brand { display: flex; }
  .auth-copy { display: none; }
  .login-card { padding: 23px; border-radius: 20px; }
  .auth-foot { flex-wrap: wrap; }
}
@media (max-width: 390px) {
  .topbar h1 { font-size: 17px; }
  .top-title .eyebrow { font-size: 7px; letter-spacing: .1em; }
  .mobile-nav { gap: 1px; padding: 5px; }
  .mobile-nav a { min-height: 47px; font-size: 8.5px; }
  .mobile-nav a .icon { width: 16px; height: 16px; }
  .panel-head .badge { max-width: 42%; text-align: center; }
  .search { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Mobile finishing pass: keep every panel surface inside the viewport. */
.app-shell, .content, .page { min-width: 0; }
@media (max-width: 900px) {
  .app-shell { width: 100%; }
  .content { width: 100%; }
  .page { width: 100%; max-width: 100%; }
  .top-title { min-width: 0; }
  .topbar h1 { overflow-wrap: anywhere; }
  .mobile-nav {
    right: max(8px, env(safe-area-inset-right));
    bottom: max(8px, env(safe-area-inset-bottom));
    left: max(8px, env(safe-area-inset-left));
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  body { overflow-x: hidden; }
  .topbar {
    min-height: 64px;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
  }
  .top-title { flex: 1 1 auto; }
  .top-title .eyebrow {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar h1 { max-width: 100%; font-size: clamp(17px, 5vw, 21px); line-height: 1.14; }
  .top-actions { flex: 0 0 auto; gap: 5px; margin-left: auto; }
  .page {
    gap: 14px;
    padding: 13px 11px calc(100px + env(safe-area-inset-bottom));
  }
  .page > *, .two-col > *, .grid2 > *, .grid3 > * { min-width: 0; }
  .page-hero, .hero { border-radius: 18px; box-shadow: 0 10px 28px rgba(0, 0, 0, .16); }
  .panel { padding: 15px; border-radius: 16px; box-shadow: 0 7px 22px rgba(0, 0, 0, .12); }
  .panel-head { flex-wrap: wrap; }
  .panel-head > :first-child { min-width: 0; }
  .panel-head .badge { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
  }
  .table-wrap table { width: 100%; min-width: 560px; }
  .table-wrap th, .table-wrap td { padding: 11px 12px; }
  .table-wrap td code { display: inline-block; max-width: 300px; white-space: normal; overflow-wrap: anywhere; }
  .search { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; width: 100%; }
  .search input { min-width: 0; }
  .actions, .inline-actions { align-items: stretch; }
  .actions > .btn, .inline-actions > .btn { flex: 1 1 140px; }
  .alert, .details-box, .auto-fill-card { overflow-wrap: anywhere; }
  .mobile-nav {
    gap: 2px;
    padding: 5px;
    border-radius: 16px;
    box-shadow: 0 12px 34px rgba(0, 0, 0, .24);
  }
  .mobile-nav a {
    min-height: 49px;
    gap: 3px;
    padding-inline: 1px;
    overflow: hidden;
    font-size: 9px;
    text-align: center;
    white-space: nowrap;
  }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  html[data-theme="light"] .page-hero,
  html[data-theme="light"] .hero { box-shadow: 0 10px 28px rgba(23, 55, 41, .07); }
  html[data-theme="light"] .panel { box-shadow: 0 7px 22px rgba(23, 55, 41, .05); }
}
@media (max-width: 380px) {
  .topbar { padding-inline: 10px; }
  .topbar h1 { font-size: 17px; }
  .icon-action, .avatar { width: 36px; height: 36px; flex-basis: 36px; }
  .page { padding-inline: 9px; }
  .panel { padding: 13px; }
  .table-wrap table { min-width: 520px; }
  .mobile-nav { gap: 1px; padding: 4px; }
  .mobile-nav a { min-height: 47px; font-size: 8.5px; }
}

/* Panel navigation and denser, readable workspace surfaces. */
.sidebar nav a { font-size: 13px; }
.badge { font-size: 10px; letter-spacing: .08em; }
.field-help { font-size: 12px; }
.panel { box-shadow: 0 16px 40px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.025); }
.panel-head h2 { font-size: clamp(17px,1.5vw,21px); }
.panel-pagination { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:18px;padding-top:16px;border-top:1px solid var(--line);color:var(--muted-strong);font-size:12px; }
.panel-pagination>div { display:flex;flex-wrap:wrap;gap:8px; }
.panel-pagination .btn { min-height:44px; }
.dashboard-hero h2 { max-width:760px; }
.dashboard-shortcuts { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px; }
.dashboard-shortcuts a { display:grid;min-width:0;min-height:142px;grid-template-columns:minmax(0,1fr) auto;align-content:center;gap:4px 9px;padding:20px;border:1px solid var(--line-strong);border-radius:18px;background:linear-gradient(145deg,var(--surface),var(--surface-soft));color:var(--text);box-shadow:var(--shadow);transition:transform .18s var(--ease),border-color .18s var(--ease); }
.dashboard-shortcuts a:hover { transform:translateY(-3px);border-color:var(--accent);color:var(--text); }
.dashboard-shortcuts a:focus-visible { outline:3px solid var(--accent);outline-offset:3px; }
.dashboard-shortcut-icon { display:grid;width:38px;height:38px;grid-column:1/-1;place-items:center;margin-bottom:5px;border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));border-radius:12px;background:var(--accent-soft);color:var(--accent); }
.dashboard-shortcuts strong { font-size:14px;line-height:1.25; }
.dashboard-shortcuts small { grid-column:1;color:var(--muted-strong);font-size:11px;line-height:1.35; }
.dashboard-shortcuts a>span:last-child { grid-row:2/span 2;grid-column:2;align-self:center;color:var(--accent);font-size:20px; }
.dashboard-recent-list { display:grid;gap:8px; }
.dashboard-recent-list a { display:flex;min-height:60px;align-items:center;justify-content:space-between;gap:12px;padding:11px 14px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft);color:var(--text); }
.dashboard-recent-list a:hover { border-color:var(--accent);background:var(--accent-soft); }
.dashboard-recent-list a>span:first-child { display:grid;min-width:0;gap:2px; }
.dashboard-recent-list strong { overflow-wrap:anywhere;font-size:13px; }
.dashboard-recent-list small { color:var(--muted-strong);font-size:11px; }
.dashboard-recent-open { flex:0 0 auto;color:var(--accent);font-size:12px;font-weight:700; }
.sidebar-close, .sidebar-backdrop { display: none; }
.panel-menu-toggle { flex: 0 0 44px; width: 44px; height: 44px; }
.top-title { flex: 1 1 auto; min-width: 0; }
.top-actions { flex: 0 0 auto; }
.app-shell.is-collapsed { grid-template-columns: 80px minmax(0,1fr); }
.is-collapsed .sidebar { padding-inline: 9px; }
.is-collapsed .side-brand { justify-content: center; padding-inline: 0; }
.is-collapsed .brand-copy, .is-collapsed .nav-group > small, .is-collapsed .version-chip { display: none; }
.is-collapsed .sidebar nav a { justify-content: center; padding-inline: 0; }
.is-collapsed .sidebar nav a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.is-collapsed .sidebar nav a .icon { width: 21px; height: 21px; flex-basis: 21px; }
.is-collapsed .side-foot { justify-content: center; padding-inline: 0; }
.is-collapsed .logout-link { padding: 9px 2px; }
.mobile-nav button { display: grid; min-width: 0; min-height: 51px; align-content: center; justify-items: center; gap: 2px; padding: 4px 2px; border: 0; border-radius: 11px; background: transparent; color: var(--muted-strong); font-size: 10px; font-weight: 680; line-height: 1.1; }
.mobile-nav button .icon { width: 18px; height: 18px; }
.mobile-nav button:hover, .mobile-nav button.active { background: var(--accent-soft); color: var(--accent); }
@media (max-width: 900px) {
  .dashboard-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .app-shell.is-collapsed { display: block; }
  .sidebar, .is-collapsed .sidebar { position: fixed; z-index: 80; top: 0; bottom: 0; left: 0; display: flex; width: min(320px,calc(100vw - 44px)); height: 100dvh; min-height: 0; padding: 24px 15px 18px; transform: translateX(-105%); visibility: hidden; overflow-y: auto; transition: transform .22s var(--ease), visibility .22s; box-shadow: var(--shadow-raised); }
  .app-shell.menu-open .sidebar { transform: translateX(0); visibility: visible; }
  .sidebar-backdrop:not([hidden]) { position: fixed; z-index: 75; inset: 0; display: block; width: 100%; border: 0; background: rgba(0,9,12,.66); backdrop-filter: blur(3px); }
  .sidebar-close { position: absolute; top: 24px; right: 14px; display: grid; font-size: 28px; line-height: 1; }
  .is-collapsed .brand-copy, .is-collapsed .nav-group > small, .is-collapsed .version-chip { display: grid; }
  .is-collapsed .nav-group > small { display: block; }
  .is-collapsed .side-brand { justify-content: flex-start; padding-inline: 9px; }
  .is-collapsed .sidebar nav a { justify-content: flex-start; padding-inline: 12px; }
  .is-collapsed .sidebar nav a span { position: static; width: auto; height: auto; clip-path: none; }
  .is-collapsed .side-foot { justify-content: space-between; }
  .mobile-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .mobile-nav button { min-height: 51px; }
  body.panel-menu-open { overflow: hidden; }
}
@media (max-width: 680px) {
  .dashboard-shortcuts { gap:9px; }
  .dashboard-shortcuts a { min-height:124px;padding:14px; }
  .dashboard-shortcuts strong { font-size:13px; }
  .page { padding-bottom: calc(105px + env(safe-area-inset-bottom)); }
  .panel-pagination { align-items:flex-start;flex-direction:column; }
  .mobile-nav { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .mobile-nav button { min-height: 49px; font-size: 9px; }
  .panel-head h2 { line-height: 1.25; }
}
@media (max-width: 380px) { .mobile-nav button { min-height: 47px; font-size: 8.5px; } }
@media (prefers-reduced-motion: reduce) { .sidebar { transition: none !important; } }

/* AMZX workspace finish: one restrained visual language across every tab. */
.sidebar { border-right-color: var(--line-strong); box-shadow: inset -1px 0 rgba(255,255,255,.025); }
.nav-group > small { color: var(--muted-strong); }
.sidebar nav a { min-height: 47px; }
.sidebar nav a.active { border-color: color-mix(in srgb, var(--accent) 38%, var(--line)); }
.page-hero, .hero { border-color: color-mix(in srgb, var(--accent) 21%, var(--line-strong)); }
.page-hero::after, .hero::after { position:absolute; inset:auto 0 0; height:2px; background:linear-gradient(90deg,transparent,var(--accent),transparent); opacity:.55; content:""; pointer-events:none; }
.panel-head { min-width:0; flex-wrap:wrap; }
.panel-head > div { min-width:0; }
.panel-head h2 { overflow-wrap:anywhere; font-weight:780; }
.panel > p { max-width:80ch; color:var(--text-soft); }
.stat { border-color:var(--line-strong); }
.stat strong { font-weight:820; }
.dashboard-shortcuts { grid-template-columns:repeat(3,minmax(0,1fr)); }
.dashboard-shortcuts a { min-height:134px; border-radius:17px; }
.dashboard-shortcuts a:hover, .dashboard-recent-list a:hover { box-shadow:0 16px 34px rgba(0,0,0,.16); }
.table-wrap { border-color:var(--line-strong); border-radius:14px; }
tbody tr:last-child td { border-bottom:0; }
th, td { overflow-wrap:anywhere; }
.empty { border:1px dashed var(--line-strong); border-radius:13px; background:var(--surface-soft); color:var(--muted-strong); }
label { color:var(--text-soft); }
input:not([type="checkbox"]):not([type="radio"]):not([type="color"]):not([type="file"]), textarea, select { border-color:var(--line-strong); }
.btn { white-space:normal; }
.btn:focus-visible, .sidebar nav a:focus-visible, .mobile-nav a:focus-visible, .mobile-nav button:focus-visible { outline:3px solid var(--accent); outline-offset:3px; }
.update-hero { display:flex; align-items:center; justify-content:space-between; gap:18px; }
.update-hero .badge { flex:0 0 auto; }
.update-checks { grid-template-columns:repeat(4,minmax(0,1fr)); }
.update-install-form { max-width:620px; margin-top:18px; }
.update-install-form .btn { justify-self:start; }
.update-rollback-summary { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px; padding:17px 19px; border:1px solid color-mix(in srgb,var(--accent) 34%,var(--line)); border-radius:15px; background:var(--accent-soft); color:var(--text); }
.update-rollback-summary strong { font-size:clamp(19px,2.3vw,25px); letter-spacing:-.035em; }
.update-rollback-summary strong span { color:var(--accent); }
.update-rollback-summary > span { color:var(--muted-strong); font-size:12px; font-weight:720; }
.update-rollback-form { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin-top:16px; }
.update-rollback-form label { display:grid; flex:1 1 230px; max-width:310px; gap:7px; }
.update-rollback-form .btn { min-height:45px; }
html[data-theme="light"] .dashboard-shortcuts a:hover, html[data-theme="light"] .dashboard-recent-list a:hover { box-shadow:0 14px 32px rgba(23,55,41,.1); }
@media (max-width:1000px) { .dashboard-shortcuts { grid-template-columns:repeat(2,minmax(0,1fr)); } .update-checks { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:680px) {
  .page { width:100%; max-width:100%; gap:14px; padding:13px 11px calc(105px + env(safe-area-inset-bottom)); }
  .topbar { min-height:64px; padding:9px 12px; }
  .panel { border-radius:17px; padding:16px; }
  .page-hero, .hero { border-radius:19px; }
  .dashboard-shortcuts { gap:9px; }
  .dashboard-shortcuts a { min-height:116px; padding:14px; }
  .update-hero { align-items:flex-start; flex-direction:column; }
  .update-checks { gap:8px; }
  .update-install-form .btn, .update-rollback-form .btn { width:100%; }
  .update-rollback-form label { flex-basis:100%; max-width:none; }
  .mobile-nav { border:1px solid var(--line-strong); background:color-mix(in srgb,var(--bg) 95%,transparent); backdrop-filter:blur(18px); }
}
@media (max-width:380px) { .update-checks { grid-template-columns:minmax(0,1fr); } .dashboard-shortcuts a { min-height:112px; } }
.brand-copy{min-width:0}.brand-copy strong{max-width:155px;overflow-wrap:anywhere;line-height:1.2;letter-spacing:.035em}.top-title .eyebrow{overflow-wrap:anywhere}.brand-lockup>div:last-child,.mobile-brand>div:last-child{min-width:0;overflow-wrap:anywhere}

/* Desktop work areas use a calmer, denser scale; editor canvas keeps its width. */
@media(min-width:1100px){
  .page{max-width:1150px;gap:17px;padding:26px 30px}
  .panel-plates .page{max-width:1260px}
  .page-hero{padding:25px 29px;border-radius:20px}
  .page-hero h2,.hero h2{font-size:clamp(25px,2.45vw,33px)}
  .panel{padding:21px;border-radius:17px}
  .stat{min-height:113px;padding:17px 19px}
  .dashboard-shortcuts a{min-height:111px;padding:15px}
  .dashboard-hero{min-height:210px}
}
