:root {
  color-scheme: light;
  --canvas: #f5f7f7;
  --paper: #ffffff;
  --ink: #17201d;
  --ink-soft: #3f4b46;
  --muted: #75807b;
  --line: #e4e9e7;
  --line-strong: #cfd8d4;
  --nav: #13231e;
  --nav-soft: #1c3029;
  --primary: #087a5b;
  --primary-dark: #056247;
  --primary-soft: #e9f7f2;
  --accent: #e7a93b;
  --danger: #c84954;
  --danger-soft: #fff0f1;
  --blue: #3176c5;
  --shadow-sm: 0 1px 2px rgba(17, 31, 25, .04), 0 5px 18px rgba(17, 31, 25, .035);
  --shadow-lg: 0 24px 70px rgba(8, 25, 18, .18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; min-width: 320px; max-width: 100%; min-height: 100%; overflow-x: hidden; }
body { color: var(--ink); background: var(--canvas); font: 14px/1.55 "Microsoft YaHei", "PingFang SC", system-ui, sans-serif; letter-spacing: 0; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
code { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12px; overflow-wrap: anywhere; }

.topbar { height: 68px; position: fixed; z-index: 20; inset: 0 0 auto 0; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; background: var(--paper); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.brand > span:last-child { display: grid; }
.brand strong { font-size: 15px; line-height: 1.2; }
.brand small { margin-top: 3px; color: var(--muted); font: 9px/1.1 Consolas, monospace; text-transform: uppercase; }
.brand-icon { width: 38px; height: 38px; display: inline-grid; place-items: center; flex: 0 0 auto; border-radius: 7px; background: var(--primary); color: white; font: 800 11px/1 Consolas, monospace; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-actions form { margin: 0; }
.environment-badge { padding: 5px 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #b9ddcf; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-size: 10px; font-weight: 700; }
.environment-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #23a87c; }
.icon-button { min-width: 34px; height: 34px; padding: 0 9px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink-soft); }
.icon-button:hover { border-color: #aebbb5; background: #f7f9f8; }
.logout-button { font-size: 11px; font-weight: 700; }

.shell { min-height: 100vh; padding-top: 68px; display: grid; grid-template-columns: 230px minmax(0, 1fr); }
.sidebar { position: fixed; top: 68px; bottom: 0; left: 0; width: 230px; display: flex; flex-direction: column; background: var(--nav); color: #afbeb8; }
.sidebar nav { padding: 18px 12px; display: grid; gap: 4px; }
.sidebar nav a { min-height: 43px; padding: 0 13px; display: flex; align-items: center; gap: 11px; border-radius: 6px; color: #b6c4bf; font-size: 12px; font-weight: 600; }
.sidebar nav a:hover { background: rgba(255,255,255,.05); color: white; }
.sidebar nav a.active { background: var(--nav-soft); color: white; box-shadow: inset 3px 0 0 var(--accent); }
.nav-dot { width: 7px; height: 7px; border-radius: 2px; border: 1px solid #73877f; transform: rotate(45deg); }
.active .nav-dot { border-color: var(--accent); background: var(--accent); }
.sidebar-foot { margin-top: auto; padding: 18px 20px; display: flex; align-items: center; gap: 9px; border-top: 1px solid rgba(255,255,255,.07); color: #71827b; font-size: 9px; }
.sidebar-foot div { display: grid; }
.sidebar-foot strong { margin-top: 2px; color: #9eafa8; font-size: 9px; }
.system-dot { width: 8px; height: 8px; border-radius: 50%; background: #39b989; box-shadow: 0 0 0 4px rgba(57,185,137,.1); }

.content { grid-column: 2; min-width: 0; padding: 30px clamp(22px, 3.5vw, 52px) 52px; }
.page-header { min-height: 59px; margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-header h1 { margin: 0; font-size: 25px; line-height: 1.18; font-weight: 760; }
.page-header p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.panel-eyebrow { display: block; margin-bottom: 2px; color: var(--primary); font: 700 9px Consolas, monospace; }

.button, button.button { min-height: 38px; padding: 0 15px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper); color: var(--ink-soft); font-weight: 700; font-size: 12px; transition: border-color .15s, background .15s, transform .15s; }
.button:hover { border-color: #aab8b2; background: #f8faf9; }
.button:active { transform: translateY(1px); }
.button:disabled, button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary, button.primary { border-color: var(--primary); background: var(--primary); color: white; box-shadow: 0 5px 14px rgba(8,122,91,.16); }
.button.primary:hover, button.primary:hover { background: var(--primary-dark); }
.button.full { width: calc(100% - 36px); margin: 16px 18px 18px; }
.danger-button { color: var(--danger); border-color: #e7bfc3; }

.flash { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #bde1d3; border-left: 4px solid var(--primary); border-radius: 6px; background: var(--primary-soft); color: var(--primary-dark); }
.flash.error { border-color: #edc2c6; border-left-color: var(--danger); background: var(--danger-soft); color: #922f38; }
.warning-banner, .secret-banner { margin-bottom: 17px; padding: 14px 16px; display: flex; align-items: center; gap: 14px; border: 1px solid #ead29e; border-radius: 7px; background: #fff9eb; }
.warning-banner span { color: #705d30; }
.warning-banner a { margin-left: auto; font-weight: 700; }
.secret-banner { justify-content: space-between; border-color: #b7ddce; background: #eff9f5; }
.secret-banner strong, .secret-banner code { display: block; }
.secret-banner code { margin-top: 5px; color: var(--primary-dark); font-size: 13px; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat { min-height: 124px; padding: 20px; position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow-sm); }
.stat::after { content: ""; position: absolute; right: -16px; bottom: -22px; width: 72px; height: 72px; border: 12px solid #eef3f1; border-radius: 50%; }
.stat span, .stat small { display: block; position: relative; z-index: 1; color: var(--muted); font-size: 11px; }
.stat strong { display: block; position: relative; z-index: 1; margin: 11px 0 7px; font-size: 28px; line-height: 1; font-variant-numeric: tabular-nums; }
.two-column { margin-top: 16px; display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(290px, .75fr); gap: 16px; align-items: start; }
.panel { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); }
.panel-header { min-height: 54px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-header h2 { margin: 0; font-size: 14px; }
.panel-header > span, .panel-header a { color: var(--muted); font-size: 11px; }

.table-scroll { overflow-x: auto; border-radius: inherit; }
table { width: 100%; min-width: 760px; border-collapse: collapse; }
th { height: 42px; padding: 0 13px; color: var(--muted); background: #f8faf9; font-size: 10px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
td { padding: 12px 13px; border-bottom: 1px solid #edf0ef; font-size: 12px; vertical-align: middle; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: #fafcfb; }
tbody tr:last-child td { border-bottom: 0; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); font-size: 10px; }
td.empty { height: 150px; text-align: center; color: var(--muted); }
.status, .http-status { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.status.ok, .http-status.s2, .http-status.s3 { color: var(--primary-dark); border-color: #b3daca; background: var(--primary-soft); }
.status.off, .http-status.s4, .http-status.s5 { color: #9a313b; border-color: #e8bcc1; background: var(--danger-soft); }
.status.pending { color: #7a5a16; border-color: #ead29e; background: #fff9eb; }
.inline-actions { display: flex; align-items: center; gap: 9px; }
.link-button { padding: 0; border: 0; background: transparent; color: var(--primary); font-size: 11px; font-weight: 700; }
.link-button.danger { color: var(--danger); }

.info-list { margin: 0; padding: 8px 18px 0; }
.info-list div { padding: 11px 0; display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 10px; border-bottom: 1px solid var(--line); }
.info-list dt { color: var(--muted); font-size: 11px; }
.info-list dd { margin: 0; font-size: 12px; text-align: right; overflow-wrap: anywhere; }
.info-list.compact { padding-left: 0; padding-right: 0; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.settings-form { padding-bottom: 20px; }
.settings-form > label, .stack-form label, .dialog-form > label, .form-row label, .tester-form > label, .install-form > label { margin: 16px 18px 0; display: grid; gap: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
label > span:first-child { color: var(--ink-soft); }
input, select, textarea { width: 100%; min-height: 41px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 6px; background: white; color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s; }
textarea { padding-top: 10px; resize: vertical; font-family: Consolas, monospace; }
input::placeholder, textarea::placeholder { color: #a2aaa6; }
input:focus, select:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(8,122,91,.1); }
label small { color: var(--muted); font-weight: 400; }
.settings-form > .button { margin: 20px 18px 0; }

dialog { width: min(500px, calc(100% - 24px)); padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(9,22,16,.52); backdrop-filter: blur(3px); }
.dialog-form { padding-bottom: 18px; }
.dialog-header { min-height: 58px; padding: 0 18px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.dialog-header h2 { margin: 0; font-size: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; }
.dialog-actions { margin: 21px 18px 0; display: flex; justify-content: flex-end; gap: 8px; }

.service-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.service-card { min-width: 0; overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow-sm); transition: transform .15s, box-shadow .15s; }
.service-card:hover { transform: translateY(-1px); box-shadow: 0 9px 26px rgba(17,31,25,.08); }
.service-card-head { min-height: 76px; padding: 14px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.service-card h2 { margin: 4px 0 0; font-size: 16px; }
.service-slug { color: var(--primary); font: 700 10px Consolas, monospace; text-transform: uppercase; }
.card-actions { padding: 14px 18px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); background: #fbfcfc; }
.service-empty { grid-column: 1 / -1; min-height: 220px; display: grid; place-items: center; color: var(--muted); }
.checkbox-row { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf9; }
.checkbox-row label { display: flex; align-items: center; gap: 5px; font-weight: 500; }
.checkbox-row input, .checkbox-list input, .agreement input { width: 16px; min-height: 16px; margin: 0; accent-color: var(--primary); }
.checkbox-list { display: grid; gap: 5px; padding: 7px; max-height: 220px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; background: #f8faf9; }
.checkbox-list label { min-height: 37px; padding: 7px 9px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 5px; background: white; font-weight: 500; }
.checkbox-list small { margin-left: auto; }

.deployment-summary { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow-sm); }
.deployment-summary > div { min-height: 82px; padding: 16px 18px; display: grid; align-content: center; gap: 6px; border-right: 1px solid var(--line); }
.deployment-summary > div:last-child { border-right: 0; }
.deployment-summary span { color: var(--muted); font-size: 10px; }
.deployment-summary strong { font-size: 18px; }
.deployment-list { display: grid; gap: 12px; }
.deployment-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; overflow: hidden; }
.deployment-main { min-width: 0; padding: 18px; }
.deployment-title { display: flex; align-items: center; gap: 12px; }
.deployment-title h2 { margin: 0 auto 0 0; font-size: 16px; }
.deployment-title .service-slug { flex: 0 0 auto; }
.deployment-meta { margin: 17px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
.deployment-meta div { min-width: 0; display: grid; gap: 4px; }
.deployment-meta dt { color: var(--muted); font-size: 10px; }
.deployment-meta dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; }
.deployment-error { margin-top: 14px; padding: 10px 12px; border: 1px solid #edc2c6; border-radius: 6px; background: var(--danger-soft); color: #922f38; font-size: 11px; overflow-wrap: anywhere; }
.deployment-actions { min-width: 148px; padding: 16px; display: flex; flex-direction: column; justify-content: center; gap: 8px; border-left: 1px solid var(--line); background: #fbfcfc; }
.deployment-actions form { display: grid; gap: 8px; }
.deployment-actions .button { width: 100%; }
.deployment-empty { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.deployment-empty strong { color: var(--ink); font-size: 15px; }
.upload-form { padding-bottom: 18px; }
.upload-zone { margin: 18px; min-height: 150px; padding: 24px; position: relative; display: grid; place-items: center; align-content: center; gap: 7px; border: 1px dashed #a9bbb4; border-radius: 7px; background: #f7faf9; text-align: center; }
.upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.upload-zone strong { color: var(--primary-dark); }
.upload-zone span, .upload-rules span { color: var(--muted); font-size: 10px; }
.upload-rules { margin: 0 18px; padding: 12px 14px; display: grid; gap: 5px; border-left: 3px solid var(--accent); background: #fff9eb; }
.deployment-log { overflow: hidden; }
.deployment-log pre { min-height: 520px; max-height: 72vh; margin: 0; padding: 18px; overflow: auto; background: #12201b; color: #d8e9e1; font: 11px/1.65 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.tester-layout { display: grid; grid-template-columns: minmax(300px, .58fr) minmax(0, 1.42fr); gap: 16px; align-items: start; }
.tester-form { padding-bottom: 18px; }
.tester-form > .button { margin: 20px 18px 4px; }
.response-panel { overflow: hidden; }
.response-panel pre { min-height: 450px; max-height: 68vh; margin: 0; padding: 18px; overflow: auto; background: #12201b; color: #d8e9e1; font: 12px/1.62 Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }

.guide-layout { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 16px; align-items: start; }
.guide-nav { position: sticky; top: 90px; padding: 13px; display: grid; gap: 3px; }
.guide-nav strong { padding: 7px 10px 11px; font-size: 12px; }
.guide-nav a { padding: 8px 10px; border-radius: 5px; color: var(--ink-soft); font-size: 11px; border-left: 2px solid transparent; }
.guide-nav a:hover { color: var(--primary); border-left-color: var(--primary); background: var(--primary-soft); }
.guide-content { padding: 8px 27px 24px; }
.guide-content section { padding: 21px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 85px; }
.guide-content h2 { margin: 0 0 11px; font-size: 18px; }
.guide-content p { margin: 8px 0; color: var(--ink-soft); }
.guide-content ol { margin: 8px 0; padding-left: 22px; }
.guide-content li { margin: 8px 0; }
.guide-content pre { margin: 11px 0; padding: 15px 16px; overflow-x: auto; border-radius: 7px; background: #12201b; color: #d8e9e1; font: 12px/1.6 Consolas, monospace; white-space: pre-wrap; }
.guide-note { margin-top: 13px; padding: 12px 14px; display: grid; gap: 3px; border: 1px solid #ecd59e; border-left: 4px solid var(--accent); border-radius: 6px; background: #fff9eb; }
.guide-note span { color: #675a36; font-size: 11px; }
.status-guide { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.status-guide div { padding: 10px 12px; display: flex; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 6px; background: #f8faf9; }
.status-guide strong { color: var(--primary); font-family: Consolas, monospace; }
.status-guide span { color: var(--ink-soft); font-size: 11px; }
.guide-footer { padding: 20px 0 0; color: var(--muted); font-size: 11px; }

/* Authentication and installation */
.login-page, .install-page { min-height: 100vh; background: #eef3f1; }
.auth-shell { width: min(1040px, calc(100% - 40px)); min-height: 610px; margin: auto; display: grid; grid-template-columns: 1.12fr .88fr; border: 1px solid #dbe4e0; border-radius: 8px; overflow: hidden; background: white; box-shadow: var(--shadow-lg); }
.login-page { display: grid; place-items: center; padding: 20px; }
.auth-intro { padding: 66px 58px; position: relative; overflow: hidden; background: var(--nav); color: white; }
.auth-intro::after { content: ""; position: absolute; width: 280px; height: 280px; right: -95px; bottom: -105px; border: 54px solid rgba(231,169,59,.12); border-radius: 50%; }
.auth-kicker { color: var(--accent); font: 700 10px Consolas, monospace; }
.auth-intro h1, .install-copy h1 { margin: 25px 0 18px; font-size: 39px; line-height: 1.25; }
.auth-intro p, .install-copy p { max-width: 410px; margin: 0; color: #b8c9c2; line-height: 1.8; }
.auth-feature-list { margin-top: 50px; display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.auth-feature-list span { padding: 11px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; color: #d6e1dd; font-size: 11px; }
.login-panel { padding: 64px 52px; display: flex; flex-direction: column; justify-content: center; }
.login-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 34px; }
.login-brand h2 { margin: 0; font-size: 20px; }
.login-brand p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.stack-form { display: grid; gap: 18px; }
.stack-form label { margin: 0; }
.stack-form button { min-height: 44px; margin-top: 4px; border: 1px solid var(--primary); border-radius: 6px; }
.login-note { margin: 22px 0 0; color: var(--muted); font-size: 10px; }

.install-page { padding: 34px; }
.install-shell { width: min(1160px, 100%); margin: 0 auto; overflow: hidden; border: 1px solid #dbe4e0; border-radius: 8px; background: white; box-shadow: var(--shadow-lg); }
.install-header { min-height: 68px; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.install-brand { display: flex; align-items: center; gap: 11px; }
.install-brand > div { display: grid; }
.install-brand strong { font-size: 14px; }
.install-brand span:last-child { color: var(--muted); font-size: 10px; }
.step-badge { padding: 6px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font: 700 10px Consolas, monospace; }
.install-grid { display: grid; grid-template-columns: .82fr 1.18fr; min-height: 670px; }
.install-copy { padding: 68px 52px; position: relative; overflow: hidden; background: var(--nav); color: white; }
.install-copy::after { content: ""; position: absolute; width: 230px; height: 230px; left: -100px; bottom: -100px; border: 43px solid rgba(231,169,59,.1); border-radius: 50%; }
.install-copy h1 { font-size: 34px; }
.install-security { margin-top: 46px; padding: 14px; display: grid; gap: 4px; border: 1px solid rgba(255,255,255,.13); border-radius: 7px; background: rgba(255,255,255,.04); }
.install-security strong { color: white; font-size: 12px; }
.install-security span { color: #aabdb5; font-size: 10px; line-height: 1.6; }
.install-panel { padding: 40px 48px 46px; }
.install-panel-heading span { color: var(--primary); font: 700 9px Consolas, monospace; }
.install-panel-heading h2 { margin: 5px 0 4px; font-size: 22px; }
.install-panel-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.requirement-list { margin: 22px 0 5px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.requirement { min-height: 56px; padding: 9px 11px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 6px; background: #fafcfb; }
.requirement-icon { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 50%; font: 800 8px Consolas, monospace; }
.requirement-icon.ok { background: var(--primary-soft); color: var(--primary); }
.requirement-icon.error { background: var(--danger-soft); color: var(--danger); }
.requirement div { min-width: 0; display: grid; }
.requirement strong { font-size: 10px; }
.requirement small { color: var(--muted); font-size: 9px; overflow-wrap: anywhere; }
.install-form { margin-top: 4px; }
.install-form > label, .install-form .form-row label { margin-left: 0; margin-right: 0; }
.install-form .form-row { gap: 12px; }
.agreement { display: flex !important; grid-template-columns: none; flex-direction: row; align-items: flex-start; gap: 8px !important; color: var(--muted) !important; font-weight: 400 !important; }
.agreement input { margin-top: 2px; flex: 0 0 auto; }
.install-submit { width: 100%; min-height: 45px; margin-top: 18px; border: 0; border-radius: 6px; }
.install-submit:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 1000px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .two-column, .settings-grid, .tester-layout { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: 1fr; }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-nav { position: static; grid-template-columns: repeat(4, 1fr); }
  .guide-nav strong { grid-column: 1 / -1; }
  .auth-shell { grid-template-columns: 1fr 1fr; }
  .auth-intro { padding: 54px 38px; }
  .login-panel { padding: 54px 38px; }
  .install-grid { grid-template-columns: 1fr; }
  .deployment-card { grid-template-columns: 1fr; }
  .deployment-actions { flex-direction: row; border-left: 0; border-top: 1px solid var(--line); }
  .deployment-actions form { display: flex; flex-wrap: wrap; }
  .deployment-actions .button { width: auto; }
  .install-copy { min-height: 310px; padding: 46px; }
}

@media (max-width: 720px) {
  .topbar { height: 60px; padding: 0 12px; }
  .brand small, .environment-badge { display: none; }
  .brand strong { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .shell { display: block; padding-top: 60px; }
  .sidebar { position: static; width: 100%; max-width: 100vw; height: 47px; overflow-x: auto; overflow-y: hidden; }
  .sidebar nav { width: max-content; min-width: 100%; height: 47px; padding: 0 6px; display: flex; gap: 0; }
  .sidebar nav a { flex: 0 0 auto; min-height: 47px; padding: 0 11px; border-radius: 0; box-shadow: none; font-size: 11px; }
  .sidebar nav a.active { box-shadow: inset 0 -3px 0 var(--accent); }
  .nav-dot, .sidebar-foot { display: none; }
  .content { padding: 21px 10px 34px; }
  .page-header { min-height: 48px; align-items: center; }
  .page-header h1 { font-size: 20px; }
  .page-header p { max-width: 230px; }
  .stat-grid { gap: 9px; }
  .stat { min-height: 103px; padding: 15px; }
  .stat strong { font-size: 23px; }
  .warning-banner, .secret-banner { align-items: flex-start; flex-direction: column; gap: 8px; }
  .warning-banner a { margin-left: 0; }
  .form-row { grid-template-columns: 1fr; }
  .response-panel pre { min-height: 330px; }
  .guide-content { padding: 4px 14px 20px; }
  .guide-nav { grid-template-columns: repeat(3, 1fr); }
  .guide-nav a { text-align: center; padding: 7px 3px; }
  .status-guide { grid-template-columns: 1fr; }
  .login-page { padding: 12px; }
  .auth-shell { width: 100%; min-height: 0; grid-template-columns: 1fr; }
  .auth-intro { min-height: 245px; padding: 36px 28px; }
  .auth-intro h1 { margin: 18px 0 11px; font-size: 29px; }
  .auth-intro p { font-size: 12px; }
  .auth-feature-list { margin-top: 23px; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .auth-feature-list span { padding: 7px 3px; text-align: center; font-size: 9px; }
  .login-panel { padding: 34px 26px; }
  .install-page { padding: 10px; }
  .install-header { padding: 0 13px; }
  .step-badge { display: none; }
  .install-copy { min-height: 255px; padding: 35px 25px; }
  .install-copy h1 { margin: 18px 0 10px; font-size: 28px; }
  .install-security { margin-top: 22px; }
  .install-panel { padding: 28px 20px 34px; }
  .requirement-list { grid-template-columns: 1fr; }
  .deployment-summary { grid-template-columns: 1fr 1fr; }
  .deployment-summary > div:nth-child(2) { border-right: 0; }
  .deployment-summary > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .deployment-meta { grid-template-columns: 1fr 1fr; }
  .deployment-title { flex-wrap: wrap; }
  .deployment-title h2 { order: 3; width: 100%; }
  .deployment-actions { flex-direction: column; }
  .deployment-actions form { display: grid; grid-template-columns: 1fr 1fr; }
  .deployment-actions .button { width: 100%; }
}
