:root {
  --bg: #070b0c;
  --panel: #0f1617;
  --panel-2: #141d1e;
  --line: #263234;
  --text: #f2f6f4;
  --muted: #8e9d99;
  --accent: #c7f36b;
  --accent-ink: #111a05;
  --danger: #ff6b6b;
  --success: #65d79d;
  --warning: #ffcc66;
  --radius: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }

.auth-page {
  display: grid;
  place-items: center;
  padding: 32px 18px;
  background:
    radial-gradient(circle at 15% 15%, rgba(215,255,69,.08), transparent 28%),
    radial-gradient(circle at 85% 85%, rgba(71,142,255,.08), transparent 26%),
    var(--bg);
}
.auth-card {
  width: min(100%, 430px);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(18,24,32,.96);
  box-shadow: 0 22px 70px rgba(0,0,0,.36);
}
.install-card { width: min(100%, 760px); }
.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 900;
  letter-spacing: -.04em;
}
.eyebrow { margin: 20px 0 5px; color: var(--accent); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 8px; font-size: clamp(25px, 4vw, 34px); letter-spacing: -.035em; }
h2 { margin-bottom: 5px; font-size: 19px; letter-spacing: -.015em; }
h3 { margin-bottom: 5px; font-size: 15px; }
.muted, .field-note, .optional { color: var(--muted); }
.field-note { margin: -5px 0 18px; font-size: 12px; }
.optional { font-size: 11px; font-weight: 500; }

label { display: block; margin: 0 0 16px; color: #cbd5df; font-size: 12px; font-weight: 700; }
input, textarea, select {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #0d131a;
  color: var(--text);
  padding: 11px 12px;
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #789112; box-shadow: 0 0 0 3px rgba(215,255,69,.09); }
.form-grid { display: grid; gap: 0 14px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.three { grid-template-columns: 1.2fr 1fr auto; align-items: end; }

.button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #1b2530;
  color: var(--text);
  padding: 8px 14px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 800;
}
.button:hover { filter: brightness(1.08); }
.button.primary { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.button.danger { border-color: rgba(255,107,107,.45); color: #ff9c9c; }
.button.small { min-height: 32px; padding: 5px 10px; font-size: 12px; }
.button.wide { width: 100%; }

.alert { margin: 18px 0; border: 1px solid; border-radius: 11px; padding: 11px 13px; }
.alert-error { border-color: rgba(255,107,107,.4); background: rgba(255,107,107,.08); color: #ffaaaa; }
.alert-success { border-color: rgba(101,215,157,.4); background: rgba(101,215,157,.08); color: #95edbd; }

.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(11,15,20,.92);
  padding: 0 max(18px, calc((100vw - 1180px) / 2));
  backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 900; letter-spacing: -.02em; }
.brand .brand-mark { width: 34px; height: 34px; border-radius: 9px; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; }
.shell { width: min(1180px, calc(100% - 36px)); margin: 30px auto 60px; }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 6px 0 0; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 16px; }
.stat span { display: block; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stat strong { display: block; margin-top: 7px; font-size: 23px; line-height: 1.1; }
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: 18px; overflow: hidden; }
.card-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.agent-list { display: grid; gap: 7px; margin-bottom: 18px; }
.agent-link { display: block; border: 1px solid transparent; border-radius: 10px; padding: 10px 11px; text-decoration: none; color: #c5d0da; }
.agent-link:hover { background: var(--panel-2); }
.agent-link.active { border-color: #4b5a28; background: rgba(215,255,69,.07); color: var(--text); }
.agent-link small { display: block; margin-top: 2px; color: var(--muted); }
.divider { height: 1px; margin: 18px 0; background: var(--line); }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; }
.status::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status.on { background: rgba(101,215,157,.1); color: var(--success); }
.status.off { background: rgba(255,107,107,.1); color: var(--danger); }
.code-box { border: 1px dashed #3a4755; border-radius: 10px; background: #0c1117; padding: 12px; overflow-wrap: anywhere; color: #dbe6ef; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; }
.secret-box { margin: 14px 0; border: 1px solid rgba(255,204,102,.4); border-radius: 12px; background: rgba(255,204,102,.06); padding: 14px; }
.secret-box textarea { min-height: 72px; color: var(--warning); }
.scan-state { min-height: 20px; margin: -7px 0 14px; font-size: 12px; color: var(--muted); }
.scan-state.ok { color: var(--success); }
.scan-state.bad { color: var(--danger); }
.qris-preview { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel-2); padding: 12px; }
.qris-preview img { width: 86px; height: 86px; border-radius: 9px; object-fit: cover; background: white; }
.qris-preview p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { border-bottom: 1px solid var(--line); padding: 11px 10px; text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td { font-size: 12px; }
tr:last-child td { border-bottom: 0; }
.inline-form { display: inline; }
.empty { border: 1px dashed var(--line); border-radius: 11px; padding: 18px; color: var(--muted); text-align: center; }
.row-actions { display: flex; align-items: center; gap: 7px; }
.fingerprint { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); }
details { margin: 4px 0 16px; }
summary { cursor: pointer; color: var(--muted); font-size: 12px; }

@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .auth-card { padding: 22px; }
  .form-grid.two { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .top-actions span { display: none; }
  .page-head { align-items: start; flex-direction: column; }
  .qris-preview { align-items: flex-start; }
}

/* V3 premium operations theme */
body {
  background:
    radial-gradient(circle at 8% -10%, rgba(76, 183, 145, .13), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(199, 243, 107, .07), transparent 28%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    var(--bg);
  background-size: auto, auto, 36px 36px, 36px 36px, auto;
  letter-spacing: -.005em;
}

.topbar {
  min-height: 70px;
  border-bottom-color: rgba(122, 157, 146, .2);
  background: rgba(7, 11, 12, .86);
  box-shadow: 0 12px 38px rgba(0,0,0,.2);
}
.brand { gap: 12px; }
.brand .brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 10px 4px 10px 4px;
  background: linear-gradient(145deg, #d9ff86, #82c954);
  box-shadow: 0 7px 22px rgba(145, 217, 89, .18), inset 0 1px rgba(255,255,255,.4);
}
.brand-copy { display: grid; line-height: 1.12; }
.brand-copy small {
  margin-top: 4px;
  color: #74837f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.top-actions .button { background: transparent; }

.shell { margin-top: 24px; }
.page-head {
  position: relative;
  isolation: isolate;
  min-height: 150px;
  align-items: center;
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #283638;
  border-radius: 16px;
  background:
    linear-gradient(110deg, rgba(36, 63, 57, .82), rgba(13, 20, 21, .95) 52%, rgba(16, 25, 25, .96)),
    var(--panel);
  padding: 28px 30px;
  box-shadow: 0 22px 55px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.04);
}
.page-head::before {
  position: absolute;
  z-index: -1;
  top: -90px;
  right: -50px;
  width: 370px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199,243,107,.13), rgba(199,243,107,0) 66%);
  content: "";
}
.page-head::after {
  position: absolute;
  z-index: -1;
  right: 28px;
  bottom: -85px;
  width: 250px;
  height: 210px;
  opacity: .18;
  background:
    linear-gradient(90deg, transparent 48%, #89ad83 49%, #89ad83 51%, transparent 52%),
    linear-gradient(transparent 48%, #89ad83 49%, #89ad83 51%, transparent 52%);
  background-size: 24px 24px;
  transform: rotate(12deg);
  content: "";
}
.page-title { position: relative; }
.page-title h1 { margin: 3px 0 5px; font-size: clamp(29px, 4vw, 42px); font-weight: 780; }
.page-title p { margin-bottom: 0; color: #a5b5b0; }
.page-kicker, .section-label {
  color: var(--accent);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .17em;
}
.server-live {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 185px;
  border: 1px solid rgba(188, 236, 119, .22);
  border-radius: 12px;
  background: rgba(7, 13, 12, .52);
  padding: 12px 14px;
  box-shadow: inset 0 1px rgba(255,255,255,.035);
}
.server-live strong, .server-live small { display: block; }
.server-live strong { font-size: 12px; }
.server-live small { margin-top: 2px; color: #84938e; font-size: 10px; }
.live-pulse {
  position: relative;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #83eea9;
  box-shadow: 0 0 0 5px rgba(101,215,157,.1), 0 0 20px rgba(101,215,157,.6);
}

.stats { gap: 10px; }
.stat {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  border-color: #243032;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(18,27,28,.96), rgba(12,18,19,.98));
  padding: 16px 17px;
  box-shadow: 0 14px 34px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
}
.stat::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: #6a7b78;
  content: "";
}
.stat::after {
  position: absolute;
  right: -24px;
  bottom: -33px;
  width: 98px;
  height: 98px;
  border: 18px solid rgba(255,255,255,.018);
  border-radius: 50%;
  content: "";
}
.stat-agent::before { background: #c7f36b; }
.stat-web::before { background: #65d79d; }
.stat-generate::before { background: #5abcf0; }
.stat-error::before { background: #ff826f; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stat-top b {
  border: 1px solid #2c3a3b;
  border-radius: 6px;
  background: #11191a;
  color: #72817d;
  padding: 3px 6px;
  font: 700 8px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .1em;
}
.stat strong { margin-top: 13px; font-size: 30px; font-weight: 760; }
.stat > small { position: relative; z-index: 1; color: #65736f; font-size: 10px; }

.layout { grid-template-columns: 272px minmax(0, 1fr); gap: 14px; }
.card {
  position: relative;
  border-color: #243032;
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(16,24,25,.98), rgba(12,18,19,.98));
  box-shadow: 0 16px 42px rgba(0,0,0,.18), inset 0 1px rgba(255,255,255,.025);
}
.qris-section::before, .client-section::before, .version-section::before, .logs-section::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: #60706d;
  content: "";
}
.qris-section::before { background: #c7f36b; }
.client-section::before { background: #65d79d; }
.version-section::before { background: #f5bd64; }
.logs-section::before { background: #5abcf0; }
.card-head h2 { margin-top: 3px; font-size: 18px; }
.section-label { display: block; margin-bottom: 3px; }
.agent-sidebar { position: sticky; top: 86px; padding: 15px; }
.agent-sidebar .card-head { margin-bottom: 10px; padding: 3px 3px 0; }
.agent-list { gap: 5px; }
.agent-link {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 9px;
  padding: 8px;
}
.agent-link.active {
  border-color: rgba(199,243,107,.24);
  background: linear-gradient(90deg, rgba(199,243,107,.105), rgba(199,243,107,.02));
  box-shadow: inset 3px 0 var(--accent);
}
.agent-monogram {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #2f3c3d;
  border-radius: 9px;
  background: #11191a;
  color: #9ead9f;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}
.agent-link.active .agent-monogram { border-color: #526d3a; background: #1a2618; color: var(--accent); }
.agent-overview {
  overflow: visible;
  background:
    linear-gradient(120deg, rgba(29,47,43,.7), rgba(14,21,22,.98) 50%),
    var(--panel);
}
.agent-overview .code-box { border-style: solid; border-color: #293738; background: rgba(5,10,10,.62); color: #aabbb6; }

input, textarea, select {
  border-color: #2b383a;
  border-radius: 9px;
  background: #091011;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.35);
}
input:hover, textarea:hover, select:hover { border-color: #3a4a4c; }
input:focus, textarea:focus, select:focus { border-color: #83a74d; box-shadow: 0 0 0 3px rgba(199,243,107,.08), inset 0 1px 2px rgba(0,0,0,.3); }
.button {
  border-color: #314042;
  border-radius: 9px;
  background: linear-gradient(#1b2728, #141d1e);
  box-shadow: 0 5px 14px rgba(0,0,0,.14), inset 0 1px rgba(255,255,255,.035);
}
.button.primary {
  border-color: #b6df5f;
  background: linear-gradient(135deg, #d2f782, #a8dc55);
  box-shadow: 0 7px 20px rgba(167,219,84,.16), inset 0 1px rgba(255,255,255,.35);
}
.button:active { transform: translateY(1px); }
.qris-preview { border-color: #2d3d39; background: rgba(19,31,28,.72); }
.qris-preview img { border: 5px solid #fff; box-shadow: 0 8px 24px rgba(0,0,0,.28); }
.code-box { border-color: #344143; background: #080e0f; }
.secret-box { border-color: rgba(199,243,107,.3); background: linear-gradient(120deg, rgba(199,243,107,.09), rgba(101,215,157,.035)); }

table { border: 1px solid #223032; border-radius: 10px; border-collapse: separate; border-spacing: 0; overflow: hidden; }
th { background: #10191a; color: #74837f; }
th, td { border-bottom-color: #222e30; }
tbody tr { background: rgba(8,14,15,.3); transition: background .12s; }
tbody tr:hover { background: rgba(199,243,107,.035); }
.empty { border-color: #2b383a; background: rgba(8,14,15,.32); }

.auth-page {
  background:
    radial-gradient(circle at 15% 10%, rgba(78,187,147,.16), transparent 32%),
    radial-gradient(circle at 85% 90%, rgba(199,243,107,.08), transparent 30%),
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px),
    #070b0c;
  background-size: auto, auto, 34px 34px, 34px 34px, auto;
}
.auth-card {
  position: relative;
  overflow: hidden;
  border-color: #2a3939;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(18,28,28,.98), rgba(10,15,16,.99));
  box-shadow: 0 32px 90px rgba(0,0,0,.44), inset 0 1px rgba(255,255,255,.035);
}
.auth-card::before {
  position: absolute;
  top: -58px;
  right: -54px;
  width: 180px;
  height: 180px;
  border: 26px solid rgba(199,243,107,.035);
  border-radius: 34px;
  transform: rotate(24deg);
  content: "";
}
.auth-card::after {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #65d79d, #c7f36b 50%, transparent 86%);
  content: "";
}
.auth-card > * { position: relative; z-index: 1; }
.auth-card > .brand-mark { border-radius: 10px 4px 10px 4px; box-shadow: 0 9px 28px rgba(168,220,85,.2); }
.auth-card h1 { font-size: 31px; }

@media (max-width: 850px) {
  .layout { grid-template-columns: 1fr; }
  .agent-sidebar { position: static; }
  .page-head { min-height: 136px; }
}
@media (max-width: 620px) {
  .page-head { align-items: flex-start; min-height: 190px; padding: 23px 20px; }
  .server-live { min-width: 0; width: 100%; }
  .stat { min-height: 112px; padding: 14px; }
  .stat strong { font-size: 26px; }
  .topbar { padding-inline: 15px; }
}

/* V4 guided setup and management */
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
.quick-nav {
  position: sticky;
  z-index: 8;
  top: 70px;
  display: flex;
  gap: 4px;
  margin: -6px 0 14px;
  overflow-x: auto;
  border: 1px solid rgba(48,65,65,.86);
  border-radius: 11px;
  background: rgba(8,14,15,.88);
  padding: 6px;
  box-shadow: 0 12px 28px rgba(0,0,0,.18);
  backdrop-filter: blur(14px);
}
.quick-nav a {
  flex: 0 0 auto;
  border-radius: 7px;
  color: #8f9e9a;
  padding: 7px 12px;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}
.quick-nav a:hover { background: #162021; color: var(--text); }

.onboarding { margin-bottom: 14px; padding: 20px; }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.onboarding-head h2 { margin: 4px 0 3px; }
.onboarding-head p { margin-bottom: 0; color: var(--muted); font-size: 12px; }
.onboarding-head > strong { color: var(--accent); font-size: 25px; }
.progress-track { height: 5px; margin: 17px 0; overflow: hidden; border-radius: 999px; background: #202c2d; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5ec895, var(--accent)); box-shadow: 0 0 14px rgba(199,243,107,.25); transition: width .25s; }
.setup-steps { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.setup-step {
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 10px;
  border: 1px solid #293638;
  border-radius: 10px;
  background: rgba(7,13,14,.5);
  padding: 11px;
  color: var(--text);
  text-decoration: none;
}
.setup-step > span {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #465456;
  border-radius: 50%;
  color: #9ca9a6;
  font-size: 11px;
  font-weight: 900;
}
.setup-step strong, .setup-step small { display: block; }
.setup-step strong { font-size: 11px; }
.setup-step small { margin-top: 3px; color: #73817e; font-size: 9px; line-height: 1.35; }
.setup-step.done { border-color: rgba(101,215,157,.25); background: rgba(101,215,157,.045); }
.setup-step.done > span { border-color: #4c9970; background: #173526; color: #82e5ad; }
.beginner-note { margin-top: 12px; border-left: 2px solid #f5bd64; background: rgba(245,189,100,.045); padding: 9px 12px; color: #a9b5b1; font-size: 11px; }
.beginner-note strong { color: #e8c986; }

.test-section::before, .settings-section::before, .system-section::before {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 0;
  width: 2px;
  border-radius: 0 2px 2px 0;
  background: #6f67d6;
  content: "";
}
.test-form { display: grid; grid-template-columns: minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
.test-form label { margin-bottom: 0; }
.button:disabled { cursor: not-allowed; filter: grayscale(.8); opacity: .45; }
.test-result-card {
  display: grid;
  grid-template-columns: 210px minmax(0,1fr);
  align-items: center;
  gap: 24px;
  margin: 0 0 16px;
  border: 1px solid rgba(199,243,107,.28);
  border-radius: 15px;
  background: linear-gradient(120deg, rgba(199,243,107,.09), rgba(13,22,22,.96) 48%);
  padding: 20px;
  box-shadow: 0 18px 44px rgba(0,0,0,.22);
}
.test-result-card h2 { margin: 5px 0 0; }
.test-result-card > div > strong { display: block; margin: 7px 0; color: var(--accent); font-size: 26px; }
.test-result-card p { margin-bottom: 0; color: var(--muted); }
.test-qr { display: grid; place-items: center; min-height: 185px; border-radius: 12px; background: #fff; padding: 10px; }
.test-qr canvas { display: block; width: 100% !important; height: auto !important; }

.manage-form, #rotate-form, #version-form {
  margin-top: 14px;
  border: 1px solid #344345;
  border-radius: 11px;
  background: rgba(8,14,15,.8);
  padding: 15px;
}
.settings-section::before { background: #f5bd64; }
.system-section::before { background: #65d79d; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.settings-panel { border: 1px solid #293638; border-radius: 11px; background: rgba(8,14,15,.42); padding: 15px; }
.settings-panel > p { margin-bottom: 15px; color: var(--muted); font-size: 11px; }
.security-state { display: flex; align-items: center; gap: 9px; margin: 0 0 13px; }
.security-state small { color: var(--muted); }
.health-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.health-item { min-height: 112px; border: 1px solid #293638; border-radius: 10px; background: rgba(8,14,15,.45); padding: 12px; }
.health-item strong, .health-item small { display: block; }
.health-item strong { margin-top: 13px; }
.health-item small { margin-top: 3px; overflow-wrap: anywhere; color: var(--muted); font-size: 9px; line-height: 1.4; }

@media (max-width: 900px) {
  .setup-steps, .health-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .quick-nav { top: 64px; }
  .setup-steps, .health-grid { grid-template-columns: 1fr; }
  .test-form, .test-result-card { grid-template-columns: 1fr; }
  .test-qr { max-width: 230px; }
  .onboarding-head { align-items: flex-start; }
}
