:root {
  --brand-950: #042f2e;
  --brand-900: #134e4a;
  --brand-800: #115e59;
  --brand-700: #0f766e;
  --brand-600: #0d9488;
  --brand-500: #14b8a6;
  --brand-100: #ccfbf1;
  --brand-50: #f0fdfa;
  --ink-950: #101828;
  --ink-900: #1d2939;
  --ink-700: #344054;
  --ink-600: #475467;
  --ink-500: #667085;
  --ink-400: #98a2b3;
  --ink-300: #d0d5dd;
  --ink-200: #e4e7ec;
  --ink-100: #f2f4f7;
  --ink-50: #f9fafb;
  --white: #fff;
  --success-700: #027a48;
  --success-600: #039855;
  --success-100: #d1fadf;
  --success-50: #ecfdf3;
  --warning-800: #93370d;
  --warning-700: #b54708;
  --warning-100: #fef0c7;
  --warning-50: #fffaeb;
  --danger-700: #b42318;
  --danger-600: #d92d20;
  --danger-100: #fee4e2;
  --danger-50: #fef3f2;
  --info-700: #175cd3;
  --info-100: #d1e9ff;
  --info-50: #eff8ff;
  --protected-700: #6941c6;
  --protected-100: #ebe9fe;
  --protected-50: #f4f3ff;
  --sidebar-w: 264px;
  --topbar-h: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 5%);
  --shadow-sm: 0 1px 3px rgb(16 24 40 / 8%), 0 1px 2px rgb(16 24 40 / 5%);
  --shadow-md: 0 10px 24px rgb(16 24 40 / 10%), 0 3px 8px rgb(16 24 40 / 5%);
  --focus: 0 0 0 3px rgb(20 184 166 / 22%);
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--ink-50); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink-900); font-family: Inter, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { color: inherit; font: inherit; }
button, summary, select, input[type="checkbox"], input[type="color"], input[type="file"] { cursor: pointer; }
button { border: 0; }
a { color: inherit; text-decoration: none; }
img, video, iframe { display: block; max-width: 100%; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, strong { letter-spacing: -.015em; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; }
input, select, textarea { border: 1px solid var(--ink-300); border-radius: var(--radius-sm); background: var(--white); outline: none; transition: border-color .18s ease, box-shadow .18s ease; }
input, select { min-height: 42px; padding: 9px 12px; }
textarea { width: 100%; padding: 10px 12px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-400); }
input:focus, select:focus, textarea:focus { border-color: var(--brand-600); box-shadow: var(--focus); }
input::placeholder, textarea::placeholder { color: var(--ink-400); }
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; background: var(--ink-100); color: var(--ink-500); }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
::selection { background: var(--brand-100); color: var(--brand-950); }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 1000; left: 16px; top: -64px; padding: 10px 14px; border-radius: 8px; background: var(--ink-950); color: white; transition: top .2s; }
.skip-link:focus { top: 12px; }
.muted { color: var(--ink-400); }
.text-danger { color: var(--danger-700) !important; }
.text-warning { color: var(--warning-700) !important; }
.text-success { color: var(--success-700) !important; }
.align-right { text-align: right !important; }
.eyebrow { margin-bottom: 4px; color: var(--brand-700); font-size: 11px; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }

/* Core controls */
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; padding: 8px 14px; border: 1px solid transparent; border-radius: var(--radius-sm); font-weight: 650; line-height: 1.2; white-space: nowrap; transition: transform .16s ease, box-shadow .16s ease, color .16s ease, border-color .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled, .button.is-loading { cursor: wait; opacity: .68; transform: none; }
.button--primary { border-color: var(--brand-700); background: var(--brand-700); color: white; box-shadow: 0 1px 2px rgb(15 118 110 / 18%); }
.button--primary:hover { border-color: var(--brand-800); background: var(--brand-800); box-shadow: 0 5px 12px rgb(15 118 110 / 18%); }
.button--secondary { border-color: var(--ink-300); background: white; color: var(--ink-700); box-shadow: var(--shadow-xs); }
.button--secondary:hover { border-color: var(--brand-600); color: var(--brand-700); }
.button--ghost { border-color: transparent; background: transparent; color: var(--ink-600); }
.button--ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.button--danger-ghost { border-color: var(--danger-100); background: var(--danger-50); color: var(--danger-700); }
.button--danger-ghost:hover { border-color: var(--danger-600); }
.button--lg { min-height: 48px; padding: 12px 18px; border-radius: 10px; }
.button--block { width: 100%; }
.icon-button { display: inline-grid; width: 38px; height: 38px; padding: 0; place-items: center; border-radius: 8px; background: transparent; color: var(--ink-600); font-size: 20px; }
.icon-button:hover { background: var(--ink-100); color: var(--ink-900); }
.text-link, .text-button { padding: 0; background: transparent; color: var(--brand-700); font-weight: 650; }
.text-link:hover, .text-button:hover { color: var(--brand-900); text-decoration: underline; text-underline-offset: 3px; }
.text-button--strong { color: var(--ink-900); font-weight: 700; }
.text-button--danger { color: var(--danger-700); }
.text-button--danger:hover { color: var(--danger-600); }
.inline-form { display: inline; }
.row-actions { display: inline-flex; align-items: center; justify-content: flex-end; gap: 14px; }
.locked-label { display: inline-flex; align-items: center; color: var(--ink-500); font-size: 12px; line-height: 1.3; white-space: nowrap; }
.locked-label::before { content: "\25c8"; margin-right: 5px; color: var(--ink-400); }
.locked-label--button { min-height: 40px; padding: 8px 12px; border: 1px solid var(--ink-200); border-radius: 8px; background: var(--ink-50); }
.readonly-hint { display: inline-flex; min-height: 34px; align-items: center; padding: 6px 10px; border: 1px solid var(--ink-200); border-radius: 999px; background: var(--ink-50); color: var(--ink-500); font-size: 11px; }

/* Badges and identity */
.badge { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; background: var(--info-50); color: var(--info-700); font-size: 12px; font-weight: 650; line-height: 1.3; white-space: nowrap; }
.badge__dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; }
.badge--success { background: var(--success-50); color: var(--success-700); }
.badge--warning { background: var(--warning-50); color: var(--warning-700); }
.badge--danger { background: var(--danger-50); color: var(--danger-700); }
.badge--neutral { background: var(--ink-100); color: var(--ink-600); }
.badge--info { background: var(--info-50); color: var(--info-700); }
.badge--brand { background: var(--brand-50); color: var(--brand-800); }
.badge--protected { border: 1px solid var(--protected-100); background: var(--protected-50); color: var(--protected-700); }
.badge--sm { width: fit-content; min-height: 20px; margin-top: 4px; padding: 2px 7px; font-size: 10px; }
.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; border: 1px solid var(--brand-100); border-radius: 50%; background: linear-gradient(145deg, var(--brand-50), var(--brand-100)); color: var(--brand-800); font-weight: 750; text-transform: uppercase; }
.avatar--md { width: 40px; height: 40px; }
.avatar--sm { width: 34px; height: 34px; font-size: 13px; }
.avatar--xs { width: 28px; height: 28px; font-size: 11px; }
.site-swatch { width: 36px; height: 36px; flex: 0 0 auto; border: 4px solid color-mix(in srgb, var(--swatch, var(--brand-700)) 14%, white); border-radius: 10px; background: var(--swatch, var(--brand-700)); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 28%); }

/* App shell */
.app-shell { min-height: 100vh; background: var(--ink-50); }
.sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; display: flex; width: var(--sidebar-w); flex-direction: column; border-right: 1px solid rgb(255 255 255 / 8%); background: linear-gradient(180deg, #0b2727 0%, #102c2b 46%, #101f20 100%); color: rgb(255 255 255 / 72%); }
.sidebar__brand { display: flex; height: var(--topbar-h); align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { display: inline-grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: linear-gradient(145deg, var(--brand-600), var(--brand-800)); color: white; box-shadow: inset 0 1px rgb(255 255 255 / 22%), 0 6px 14px rgb(0 0 0 / 12%); font-size: 18px; font-weight: 800; }
.brand__copy { display: grid; gap: 0; }
.brand__copy strong { color: white; font-size: 15px; }
.brand__copy small { color: rgb(255 255 255 / 44%); font-size: 8px; font-weight: 650; letter-spacing: .15em; }
.sidebar__close { display: none; color: white; }
.sidebar__nav { flex: 1; overflow-y: auto; padding: 18px 12px; }
.nav-section-label { margin: 17px 11px 7px; color: rgb(255 255 255 / 35%); font-size: 10px; font-weight: 750; letter-spacing: .12em; }
.nav-section-label:first-child { margin-top: 0; }
.nav-item { display: flex; min-height: 44px; align-items: center; gap: 11px; margin-bottom: 3px; padding: 9px 11px; border-radius: 9px; color: rgb(255 255 255 / 70%); font-weight: 560; transition: background .16s ease, color .16s ease; }
.nav-item:hover { background: rgb(255 255 255 / 7%); color: white; }
.nav-item.is-active { background: linear-gradient(90deg, rgb(20 184 166 / 22%), rgb(20 184 166 / 10%)); color: white; box-shadow: inset 2px 0 var(--brand-500); }
.nav-item__icon { display: grid; width: 22px; place-items: center; color: rgb(255 255 255 / 48%); font-size: 17px; }
.nav-item.is-active .nav-item__icon { color: var(--brand-500); }
.nav-item__count { min-width: 21px; margin-left: auto; padding: 1px 6px; border-radius: 999px; background: var(--danger-600); color: white; font-size: 11px; text-align: center; }
.sidebar__footer { padding: 16px 20px 20px; border-top: 1px solid rgb(255 255 255 / 8%); }
.environment { display: flex; align-items: center; gap: 7px; color: rgb(255 255 255 / 70%); font-size: 11px; }
.environment__dot { width: 7px; height: 7px; border-radius: 50%; background: #32d583; box-shadow: 0 0 0 4px rgb(50 213 131 / 12%); }
.environment strong { margin-left: auto; color: rgb(255 255 255 / 40%); font-weight: 500; }
.sidebar__footer p { margin: 9px 0 0 14px; color: rgb(255 255 255 / 30%); font-size: 10px; }
.workspace { min-height: 100vh; margin-left: var(--sidebar-w); }
.topbar { position: sticky; z-index: 30; top: 0; display: flex; height: var(--topbar-h); align-items: center; justify-content: space-between; padding: 0 28px; border-bottom: 1px solid var(--ink-200); background: rgb(255 255 255 / 92%); backdrop-filter: blur(12px); }
.topbar__start, .topbar__actions { display: flex; align-items: center; gap: 14px; }
.page-heading span { display: block; margin-bottom: 1px; color: var(--ink-500); font-size: 10px; font-weight: 650; letter-spacing: .09em; }
.page-heading h1 { margin: 0; color: var(--ink-950); font-size: 20px; line-height: 1.2; }
.mobile-menu { display: none; }
.health-pill { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--ink-200); border-radius: 999px; background: var(--ink-50); color: var(--ink-600); font-size: 12px; }
.health-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success-600); box-shadow: 0 0 0 3px var(--success-100); }
.health-pill__dot.is-warning { background: var(--warning-700); box-shadow: 0 0 0 3px var(--warning-100); }
.user-menu { position: relative; }
.user-menu > summary { display: flex; align-items: center; gap: 9px; padding: 4px 5px; border-radius: 10px; list-style: none; }
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: var(--ink-50); }
.user-menu__copy { display: grid; gap: 1px; }
.user-menu__copy strong { font-size: 13px; }
.user-menu__copy small .badge { min-height: auto; padding: 0; background: transparent; color: var(--ink-500); font-size: 10px; }
.user-menu__chevron { color: var(--ink-400); }
.user-menu__popover { position: absolute; top: calc(100% + 8px); right: 0; width: 224px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 12px; background: white; box-shadow: var(--shadow-md); }
.user-menu__identity { display: grid; padding: 14px; border-bottom: 1px solid var(--ink-100); }
.user-menu__identity span { color: var(--ink-500); font-size: 12px; word-break: break-all; }
.user-menu__popover > a, .user-menu__popover form button { display: block; width: 100%; padding: 10px 14px; background: white; color: var(--ink-700); text-align: left; }
.user-menu__popover > a:hover, .user-menu__popover form button:hover { background: var(--ink-50); color: var(--brand-700); }
.main { width: 100%; max-width: 1600px; min-height: calc(100vh - var(--topbar-h) - 54px); margin: 0 auto; padding: 24px 28px 40px; }
.app-footer { display: flex; max-width: 1600px; margin: 0 auto; justify-content: space-between; padding: 16px 28px 22px; color: var(--ink-400); font-size: 11px; }
.mobile-scrim { position: fixed; z-index: 45; inset: 0; background: rgb(16 24 40 / 54%); backdrop-filter: blur(2px); }

/* Alerts, notices, panels */
.alert { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--info-100); border-radius: 10px; background: var(--info-50); color: var(--info-700); }
.alert--success { border-color: var(--success-100); background: var(--success-50); color: var(--success-700); }
.alert--warning { border-color: var(--warning-100); background: var(--warning-50); color: var(--warning-800); }
.alert--error, .alert--danger { border-color: var(--danger-100); background: var(--danger-50); color: var(--danger-700); }
.alert__icon { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; font-weight: 800; }
.alert p { margin: 0; }
.alert__close { margin: -5px -5px -5px auto; padding: 4px 8px; background: transparent; color: currentColor; font-size: 18px; opacity: .7; }
.notice { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; padding: 16px 18px; border: 1px solid var(--brand-100); border-radius: 12px; background: linear-gradient(100deg, var(--brand-50), #f7fffd); color: var(--brand-900); }
.notice__mark { display: grid; width: 28px; height: 28px; flex: 0 0 auto; place-items: center; border-radius: 8px; background: var(--brand-100); color: var(--brand-800); font-weight: 800; }
.notice strong { display: block; margin-bottom: 2px; }
.notice p { margin: 0; color: var(--ink-600); font-size: 13px; }
.notice > a { margin-left: auto; color: var(--brand-700); font-weight: 650; white-space: nowrap; }
.notice--compact { padding: 12px 14px; }
.notice--compact .notice__mark { width: 24px; height: 24px; }
.notice--danger { border-color: var(--danger-100); background: var(--danger-50); color: var(--danger-700); }
.notice--danger .notice__mark { background: var(--danger-100); color: var(--danger-700); }
.notice--warning { border-color: var(--warning-100); background: var(--warning-50); color: var(--warning-800); }
.notice--warning .notice__mark { background: var(--warning-100); color: var(--warning-800); }
.notice--info { border-color: var(--info-100); background: var(--info-50); color: var(--info-700); }
.notice--info .notice__mark { background: var(--info-100); color: var(--info-700); }
.notice--protected { border-color: var(--protected-100); background: var(--protected-50); color: var(--protected-700); }
.notice--protected .notice__mark { background: var(--protected-100); color: var(--protected-700); }
.form-error-summary:focus { outline: 3px solid color-mix(in srgb, var(--danger-600) 35%, transparent); outline-offset: 3px; }
.form-error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.form-error-summary li + li { margin-top: 4px; }
.form-error-summary a { color: var(--danger-700); text-decoration: underline; text-underline-offset: 2px; }
.panel { min-width: 0; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-xs); }
.panel__header { display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid var(--ink-100); }
.panel__header .eyebrow { margin-bottom: 2px; }
.panel__header h2 { margin: 0; color: var(--ink-950); font-size: 16px; }
.panel__actions { display: flex; align-items: center; gap: 8px; }
.page-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 20px; }
.page-intro h2 { margin-bottom: 4px; color: var(--ink-950); font-size: 22px; }
.page-intro p { max-width: 740px; margin-bottom: 0; color: var(--ink-500); }
.page-intro--form { align-items: center; }
.breadcrumbs { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; color: var(--ink-500); font-size: 12px; }
.breadcrumbs a:hover { color: var(--brand-700); }
.summary-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); margin-bottom: 20px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-xs); }
.summary-strip > div { position: relative; display: grid; gap: 2px; padding: 15px 18px; }
.summary-strip > div:not(:last-child)::after { content: ""; position: absolute; top: 14px; right: 0; bottom: 14px; width: 1px; background: var(--ink-100); }
.summary-strip span { color: var(--ink-500); font-size: 12px; }
.summary-strip strong { color: var(--ink-950); font-size: 22px; }

/* Tables and tools */
.toolbar { display: flex; align-items: center; gap: 9px; padding: 14px 16px; border-bottom: 1px solid var(--ink-100); }
.toolbar--wrap { flex-wrap: wrap; }
.toolbar select { width: auto; min-width: 138px; }
.toolbar__separator { color: var(--ink-400); }
.search-field { position: relative; flex: 1 1 280px; min-width: 220px; }
.search-field > span { position: absolute; z-index: 1; top: 50%; left: 12px; color: var(--ink-400); font-size: 18px; transform: translateY(-53%); }
.search-field input { width: 100%; padding-left: 36px; }
.date-filter { width: 150px; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
.data-table th { padding: 11px 16px; border-bottom: 1px solid var(--ink-200); background: var(--ink-50); color: var(--ink-500); font-size: 11px; font-weight: 700; letter-spacing: .025em; text-align: left; }
.data-table td { padding: 13px 16px; border-bottom: 1px solid var(--ink-100); color: var(--ink-700); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .13s ease; }
.data-table tbody tr:hover { background: #fbfdfd; }
.data-table tbody tr.is-protected { background: linear-gradient(90deg, var(--protected-50), white 30%); }
.data-table a strong { color: var(--ink-900); }
.entity { display: flex; align-items: center; gap: 10px; }
.entity > div, .stacked-cell { display: grid; gap: 1px; }
.entity small, .stacked-cell small { max-width: 240px; overflow: hidden; color: var(--ink-500); font-size: 11px; text-overflow: ellipsis; }
.metric-link { display: inline-grid; }
.metric-link strong { color: var(--brand-700); font-size: 16px; }
.metric-link span { color: var(--ink-500); font-size: 10px; }
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 16px; border-top: 1px solid var(--ink-100); }
.pagination__summary { margin-right: auto; color: var(--ink-500); font-size: 12px; }
.pagination__item { padding: 6px 10px; border: 1px solid var(--ink-200); border-radius: 7px; background: white; color: var(--ink-600); font-size: 12px; }
.pagination__item:hover { border-color: var(--brand-600); color: var(--brand-700); }
.pagination__item.is-disabled { pointer-events: none; opacity: .45; }
.pagination__current { color: var(--ink-600); font-size: 12px; }
.empty-state { display: grid; min-height: 250px; padding: 38px 24px; place-items: center; align-content: center; text-align: center; }
.empty-state__mark { display: grid; width: 48px; height: 48px; margin-bottom: 12px; place-items: center; border-radius: 14px; background: var(--ink-100); color: var(--ink-400); font-size: 20px; letter-spacing: 2px; }
.empty-state h3 { margin-bottom: 5px; font-size: 16px; }
.empty-state p { max-width: 430px; margin-bottom: 16px; color: var(--ink-500); }

/* Dashboard */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card { min-width: 0; padding: 17px 18px; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-xs); }
.kpi-card__head { display: flex; align-items: center; justify-content: space-between; color: var(--ink-500); font-size: 12px; }
.kpi-icon { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; font-size: 16px; }
.kpi-icon--teal { background: var(--brand-50); color: var(--brand-700); }
.kpi-icon--blue { background: var(--info-50); color: var(--info-700); }
.kpi-icon--amber { background: var(--warning-50); color: var(--warning-700); }
.kpi-icon--green { background: var(--success-50); color: var(--success-700); }
.kpi-card > strong { display: block; margin: 9px 0 5px; color: var(--ink-950); font-size: 28px; line-height: 1.1; }
.kpi-card__foot { display: flex; align-items: center; gap: 5px; color: var(--ink-400); font-size: 11px; }
.trend { font-weight: 700; }
.trend--up { color: var(--success-700); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 18px; }
.panel--span-2 { min-width: 0; }
.attention-list { margin: 0; padding: 8px 18px 18px; list-style: none; }
.attention-item { display: flex; gap: 10px; padding: 13px 0; border-bottom: 1px solid var(--ink-100); }
.attention-item:last-child { border-bottom: 0; }
.attention-item__mark { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 7px; background: var(--warning-50); color: var(--warning-700); font-weight: 800; }
.attention-item--danger .attention-item__mark, .attention-item--error .attention-item__mark { background: var(--danger-50); color: var(--danger-700); }
.attention-item strong { display: block; font-size: 13px; }
.attention-item p { margin: 2px 0 4px; color: var(--ink-500); font-size: 12px; }
.attention-item a { color: var(--brand-700); font-size: 11px; font-weight: 650; }
.all-clear { display: grid; min-height: 230px; padding: 28px; place-items: center; align-content: center; text-align: center; }
.all-clear > span { display: grid; width: 42px; height: 42px; margin-bottom: 10px; place-items: center; border-radius: 50%; background: var(--success-50); color: var(--success-700); font-size: 18px; }
.all-clear p { margin: 3px 0 0; color: var(--ink-500); font-size: 12px; }
.job-timeline { margin: 0; padding: 6px 20px 12px; list-style: none; }
.job-timeline li { display: flex; min-height: 62px; align-items: center; gap: 12px; border-bottom: 1px solid var(--ink-100); }
.job-timeline li:last-child { border-bottom: 0; }
.job-timeline__rail { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--ink-400); box-shadow: 0 0 0 4px var(--ink-100); }
.job-timeline__rail--success, .job-timeline__rail--succeeded, .job-timeline__rail--completed { background: var(--success-600); box-shadow: 0 0 0 4px var(--success-50); }
.job-timeline__rail--running, .job-timeline__rail--processing, .job-timeline__rail--provisioning { background: var(--warning-700); box-shadow: 0 0 0 4px var(--warning-50); }
.job-timeline__rail--failed { background: var(--danger-600); box-shadow: 0 0 0 4px var(--danger-50); }
.job-timeline__body { display: grid; min-width: 0; flex: 1; }
.job-timeline__body > div { display: flex; min-width: 0; gap: 7px; }
.job-timeline__body span { overflow: hidden; color: var(--ink-500); text-overflow: ellipsis; white-space: nowrap; }
.job-timeline__body small { color: var(--ink-400); }
.health-summary { margin: 0; padding: 8px 20px 12px; }
.health-summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--ink-100); }
.health-summary dt { color: var(--ink-500); }
.health-summary dd { margin: 0; font-weight: 650; }
.health-summary + .button { width: calc(100% - 40px); margin: 0 20px 20px; }

/* Forms */
.field { min-width: 0; }
.field label, .label-row label { display: inline-block; margin-bottom: 6px; color: var(--ink-700); font-size: 12px; font-weight: 650; }
.field > input, .field > select { width: 100%; }
.required { color: var(--danger-600); }
.field-hint, .field-error { margin: 5px 0 0; color: var(--ink-500); font-size: 11px; }
.field-hint a { color: var(--brand-700); font-weight: 650; }
.field-error { color: var(--danger-700); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger-600); }
.form-stack { display: grid; gap: 17px; }
.form-grid { display: grid; gap: 18px; }
.form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field--span-2 { grid-column: 1 / -1; }
.checkbox { display: inline-flex; align-items: flex-start; gap: 8px; color: var(--ink-600); font-size: 12px; }
.checkbox input { width: 16px; min-height: 16px; margin: 1px 0 0; padding: 0; accent-color: var(--brand-700); }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 65px; }
.password-field button { position: absolute; top: 50%; right: 7px; padding: 5px 7px; background: transparent; color: var(--brand-700); font-size: 11px; font-weight: 650; transform: translateY(-50%); }
.color-field { display: flex; gap: 8px; }
.color-field input[type="color"] { width: 50px; flex: 0 0 auto; padding: 4px; }
.color-field input[type="text"] { flex: 1; }
.brand-preview { display: grid; min-height: 98px; align-content: center; gap: 3px; padding: 14px 16px; border-radius: 10px; background: linear-gradient(130deg, color-mix(in srgb, var(--preview-color) 88%, black), var(--preview-color)); color: white; box-shadow: inset 0 0 0 1px rgb(255 255 255 / 13%); }
.brand-preview span { font-size: 10px; opacity: .65; }
.brand-preview strong { font-size: 14px; }
.brand-preview button { width: fit-content; margin-top: 5px; padding: 5px 9px; border-radius: 6px; background: white; color: var(--preview-color); font-size: 10px; font-weight: 700; }
.file-drop { position: relative; display: flex; min-height: 104px; align-items: center; justify-content: center; gap: 12px; padding: 16px; border: 1px dashed var(--ink-300); border-radius: 10px; background: var(--ink-50); text-align: left; transition: border-color .16s, background .16s; }
.file-drop:hover, .file-drop.is-dragging { border-color: var(--brand-600); background: var(--brand-50); }
.file-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.file-drop__mark { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ink-200); border-radius: 9px; background: white; color: var(--brand-700); font-size: 20px; }
.file-drop strong { display: block; color: var(--ink-700); font-size: 12px; }
.file-drop p { margin: 2px 0 0; color: var(--ink-500); font-size: 10px; }
.file-drop--compact { min-height: 82px; }
.current-file { display: flex; align-items: center; gap: 10px; margin: 7px 0 0; color: var(--ink-500); font-size: 11px; }
.current-file a { color: var(--brand-700); }
.current-file .checkbox { margin-left: auto; }
.site-form { margin-bottom: 30px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.form-layout__main { display: grid; gap: 18px; min-width: 0; }
.form-section { padding: 0 22px 24px; }
.form-section__header { display: flex; gap: 12px; margin: 0 -22px 22px; padding: 18px 22px; border-bottom: 1px solid var(--ink-100); }
.step-number { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border-radius: 9px; background: var(--brand-50); color: var(--brand-700); font-size: 11px; font-weight: 750; }
.form-section__header h3 { margin: 0 0 2px; font-size: 15px; }
.form-section__header p { margin: 0; color: var(--ink-500); font-size: 11px; }
.sticky-summary { position: sticky; top: calc(var(--topbar-h) + 18px); padding: 20px; }
.sticky-summary h3 { margin-bottom: 15px; font-size: 17px; }
.check-list { display: grid; gap: 9px; margin: 0 0 17px; padding: 0; color: var(--ink-600); font-size: 12px; list-style: none; }
.check-list li { display: flex; align-items: flex-start; gap: 7px; }
.check-list span { color: var(--success-700); font-weight: 800; }
.summary-callout { margin-bottom: 16px; padding: 11px; border-radius: 8px; background: var(--ink-50); }
.summary-callout strong { font-size: 11px; }
.summary-callout p { margin: 3px 0 0; color: var(--ink-500); font-size: 10px; }
.sticky-summary .button + .button { margin-top: 8px; }
.submit-note { margin: 13px 0 0; color: var(--ink-400); font-size: 10px; text-align: center; }
.security-note { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 9px; background: var(--ink-50); color: var(--ink-600); }
.security-note > span { color: var(--brand-700); }
.security-note p { margin: 0; font-size: 11px; }
.security-note strong { display: block; color: var(--ink-700); }
.security-note--inline { margin-top: 18px; }
.session-note { display: flex; align-items: flex-start; gap: 7px; margin: -2px 0 0; color: var(--ink-500); font-size: 11px; }
.session-note span { color: var(--brand-700); }
.account-security-layout { max-width: 720px; }
.account-security-form { overflow: hidden; }
.account-security-form__body { padding: 22px; }
.account-security-form__actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; padding-top: 3px; }

/* Dialog */
.dialog { width: min(560px, calc(100vw - 32px)); max-height: min(820px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 0; border-radius: 16px; background: white; box-shadow: 0 24px 60px rgb(16 24 40 / 26%); }
.dialog::backdrop { background: rgb(16 24 40 / 58%); backdrop-filter: blur(3px); }
.dialog[open] { animation: dialog-in .18s ease-out; }
.dialog > form { display: flex; max-height: min(820px, calc(100vh - 32px)); flex-direction: column; }
.dialog__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 19px 22px 15px; border-bottom: 1px solid var(--ink-100); }
.dialog__header h2 { margin: 0; font-size: 18px; }
.dialog__body { overflow-y: auto; padding: 20px 22px; }
.dialog__footer { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--ink-100); background: var(--ink-50); }
.dialog--detail { width: min(680px, calc(100vw - 32px)); overflow-y: auto; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* Details */
.detail-hero { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; padding: 20px; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; box-shadow: var(--shadow-xs); }
.detail-hero--protected { border-color: var(--protected-100); background: linear-gradient(105deg, var(--protected-50), white 42%); }
.detail-hero__identity { display: flex; min-width: 0; align-items: center; gap: 14px; }
.site-emblem { display: grid; width: 54px; height: 54px; flex: 0 0 auto; place-items: center; border: 5px solid color-mix(in srgb, var(--swatch) 14%, white); border-radius: 15px; background: var(--swatch); color: white; font-size: 20px; font-weight: 800; box-shadow: var(--shadow-sm); }
.detail-hero__title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.detail-hero h2 { margin: 0; font-size: 22px; }
.detail-hero p { margin: 3px 0 0; color: var(--ink-500); font-size: 12px; }
.domain-link { color: var(--brand-700); font-size: 12px; }
.detail-hero__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.detail-hero__actions form { display: inline-flex; }
.detail-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: var(--radius-md); background: white; }
.detail-stat-grid > div { position: relative; display: grid; gap: 5px; padding: 16px 18px; }
.detail-stat-grid > div:not(:last-child)::after { content: ""; position: absolute; top: 15px; right: 0; bottom: 15px; width: 1px; background: var(--ink-100); }
.detail-stat-grid span:first-child { color: var(--ink-500); font-size: 11px; }
.detail-stat-grid strong { min-height: 24px; color: var(--ink-900); font-size: 14px; }
.detail-stat-grid small { color: var(--ink-400); font-size: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; align-items: start; }
.detail-grid__main { display: grid; min-width: 0; gap: 18px; }
.detail-grid__aside { display: grid; gap: 18px; }
.browser-frame { margin: 18px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--ink-100); }
.browser-frame__bar { display: flex; height: 34px; align-items: center; gap: 5px; padding: 0 10px; border-bottom: 1px solid var(--ink-200); background: var(--ink-50); }
.browser-frame__bar > span { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-300); }
.browser-frame__bar > div { max-width: 60%; margin-left: 8px; overflow: hidden; color: var(--ink-500); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.browser-frame iframe { width: 100%; height: 430px; border: 0; background: white; }
.preview-unavailable { display: grid; min-height: 330px; margin: 18px; place-items: center; align-content: center; border: 1px dashed var(--ink-300); border-radius: 10px; background: var(--ink-50); text-align: center; }
.preview-unavailable > span { display: grid; width: 44px; height: 44px; margin-bottom: 9px; place-items: center; border-radius: 12px; background: white; color: var(--ink-400); font-size: 20px; box-shadow: var(--shadow-xs); }
.preview-unavailable h3 { margin-bottom: 4px; font-size: 14px; }
.preview-unavailable p { max-width: 440px; margin: 0; color: var(--ink-500); font-size: 11px; }
.monitor-grid { display: grid; grid-template-columns: repeat(4, 1fr); padding: 18px; }
.monitor-grid > div { display: grid; gap: 3px; padding: 0 14px; border-right: 1px solid var(--ink-100); }
.monitor-grid > div:first-child { padding-left: 0; }
.monitor-grid > div:last-child { border: 0; }
.monitor-grid span { color: var(--ink-500); font-size: 10px; }
.monitor-grid strong { font-size: 17px; }
.monitor-grid small { color: var(--ink-400); font-size: 9px; }
.check-strip { display: flex; height: 38px; align-items: center; gap: 3px; margin: 0 18px 18px; overflow: hidden; }
.check-strip__item { height: 24px; min-width: 3px; flex: 1; border-radius: 2px; background: var(--ink-300); }
.check-strip__item--healthy, .check-strip__item--success { background: var(--success-600); }
.check-strip__item--unhealthy, .check-strip__item--failed, .check-strip__item--error { background: var(--danger-600); }
.definition-card dl { margin: 0; padding: 7px 20px 15px; }
.definition-card dl > div { display: grid; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); }
.definition-card dl > div:last-child { border: 0; }
.definition-card dt { color: var(--ink-500); font-size: 10px; }
.definition-card dd { margin: 0; overflow-wrap: anywhere; color: var(--ink-700); font-size: 12px; }
.copyable { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.copyable button, .trace-id button { padding: 3px 6px; border-radius: 5px; background: var(--ink-100); color: var(--brand-700); font-size: 9px; }
.color-value { display: inline-flex; align-items: center; gap: 6px; }
.color-value i { width: 13px; height: 13px; border: 1px solid rgb(0 0 0 / 8%); border-radius: 4px; background: var(--swatch); }
.quick-links { padding: 16px 18px; }
.quick-links h3 { margin-bottom: 9px; font-size: 13px; }
.quick-links a { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--ink-100); color: var(--ink-600); font-size: 11px; }
.quick-links a:last-child { border: 0; }
.quick-links a:hover { color: var(--brand-700); }

/* Jobs and audit */
.progress-cell { display: flex; align-items: center; gap: 8px; }
.progress { width: 78px; height: 6px; overflow: hidden; border-radius: 999px; background: var(--ink-100); }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); }
.progress-cell small { min-width: 28px; color: var(--ink-500); }
.job-detail-list { display: grid; grid-template-columns: repeat(2, 1fr); margin: 0 0 18px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 10px; }
.job-detail-list > div { padding: 10px 12px; border-bottom: 1px solid var(--ink-100); }
.job-detail-list > div:nth-child(odd) { border-right: 1px solid var(--ink-100); }
.job-detail-list dt { color: var(--ink-500); font-size: 10px; }
.job-detail-list dd { margin: 2px 0 0; font-size: 12px; font-weight: 600; }
.job-steps { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.job-step { position: relative; display: flex; align-items: flex-start; gap: 10px; padding-bottom: 15px; }
.job-step:not(:last-child)::before { content: ""; position: absolute; top: 24px; bottom: 0; left: 11px; width: 1px; background: var(--ink-200); }
.job-step > span { z-index: 1; display: grid; width: 23px; height: 23px; flex: 0 0 auto; place-items: center; border: 1px solid var(--ink-300); border-radius: 50%; background: white; color: var(--ink-500); font-size: 9px; font-weight: 750; }
.job-step--success > span, .job-step--completed > span { border-color: var(--success-100); background: var(--success-50); color: var(--success-700); }
.job-step--failed > span, .job-step--error > span { border-color: var(--danger-100); background: var(--danger-50); color: var(--danger-700); }
.job-step > div { flex: 1; }
.job-step strong { font-size: 12px; }
.job-step p { margin: 1px 0 0; color: var(--ink-500); font-size: 10px; }
.job-step > small { color: var(--ink-400); }
.error-box { margin-bottom: 18px; padding: 12px; border: 1px solid var(--danger-100); border-radius: 9px; background: var(--danger-50); }
.error-box strong { color: var(--danger-700); font-size: 11px; }
.error-box pre { max-height: 140px; margin: 7px 0; overflow: auto; color: var(--ink-700); font-size: 10px; white-space: pre-wrap; }
.error-box small { color: var(--ink-500); }
.audit-detail { position: relative; display: inline-block; text-align: left; }
.audit-detail summary { color: var(--brand-700); font-weight: 650; list-style: none; }
.audit-detail summary::-webkit-details-marker { display: none; }
.audit-detail__popover { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(440px, calc(100vw - 40px)); padding: 14px; border: 1px solid var(--ink-200); border-radius: 10px; background: white; box-shadow: var(--shadow-md); white-space: normal; }
.audit-detail__popover dl { display: grid; gap: 8px; margin: 0; }
.audit-detail__popover dl > div { display: grid; grid-template-columns: 90px 1fr; gap: 9px; }
.audit-detail__popover dt { color: var(--ink-500); font-size: 10px; }
.audit-detail__popover dd { margin: 0; overflow-wrap: anywhere; font-size: 11px; }
.change-list { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--ink-100); }
.change-list > strong { font-size: 11px; }
.change-list p { display: grid; grid-template-columns: 90px 1fr 1fr; gap: 6px; margin: 7px 0 0; font-size: 10px; }
.change-list span { color: var(--ink-500); }
.change-list del, .change-list ins { padding: 3px 5px; border-radius: 4px; overflow-wrap: anywhere; text-decoration: none; }
.change-list del { background: var(--danger-50); color: var(--danger-700); }
.change-list ins { background: var(--success-50); color: var(--success-700); }

/* Authentication */
.auth-shell { min-height: 100vh; background: white; }
.auth-layout { display: grid; min-height: 100vh; grid-template-columns: minmax(420px, .92fr) minmax(500px, 1.08fr); }
.auth-story { position: relative; display: flex; min-height: 100vh; overflow: hidden; flex-direction: column; padding: 34px 42px; background: linear-gradient(145deg, #062f2e 0%, #0f514d 60%, #073b39 100%); color: white; }
.auth-story::before { content: ""; position: absolute; width: 520px; height: 520px; right: -220px; bottom: -130px; border: 1px solid rgb(255 255 255 / 8%); border-radius: 50%; box-shadow: 0 0 0 70px rgb(255 255 255 / 2.5%), 0 0 0 140px rgb(255 255 255 / 2%); }
.auth-story::after { content: ""; position: absolute; width: 220px; height: 220px; top: 20%; left: -120px; border-radius: 50%; background: rgb(20 184 166 / 10%); filter: blur(1px); }
.auth-story__content { z-index: 1; margin: auto 0; }
.auth-story__eyebrow { margin-bottom: 12px; color: #5eead4; font-size: 11px; font-weight: 700; letter-spacing: .16em; }
.auth-story h1 { max-width: 580px; margin-bottom: 18px; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.18; }
.auth-story__content > p:not(.auth-story__eyebrow) { max-width: 520px; color: rgb(255 255 255 / 65%); font-size: 15px; }
.auth-story__metrics { display: grid; max-width: 520px; grid-template-columns: repeat(3, 1fr); margin-top: 40px; padding-top: 20px; border-top: 1px solid rgb(255 255 255 / 12%); }
.auth-story__metrics > div { display: grid; }
.auth-story__metrics strong { font-size: 20px; }
.auth-story__metrics span { color: rgb(255 255 255 / 45%); font-size: 10px; }
.auth-story__footer { z-index: 1; margin: 0; color: rgb(255 255 255 / 38%); font-size: 10px; letter-spacing: .05em; }
.auth-panel { display: grid; min-height: 100vh; padding: 50px; place-items: center; align-content: center; background: linear-gradient(180deg, white, var(--ink-50)); }
.auth-card { width: min(430px, 100%); padding: 34px; border: 1px solid var(--ink-200); border-radius: var(--radius-xl); background: white; box-shadow: 0 18px 50px rgb(16 24 40 / 9%); }
.auth-card__header { margin-bottom: 24px; }
.auth-card__header h2 { margin-bottom: 6px; font-size: 25px; }
.auth-card__header > p:last-child { margin-bottom: 0; color: var(--ink-500); }
.auth-mobile-mark { display: none; }
.auth-form { display: grid; gap: 17px; }
.label-row { display: flex; justify-content: space-between; }
.auth-form .button { justify-content: space-between; margin-top: 2px; }
.auth-card > .security-note { margin-top: 20px; }
.auth-meta { margin: 18px 0 0; color: var(--ink-400); font-size: 10px; text-align: center; }

/* Error page */
.error-shell { min-height: 100vh; background: radial-gradient(circle at 50% 10%, var(--brand-50), white 42%, var(--ink-50)); }
.error-layout { display: flex; width: min(1100px, calc(100% - 40px)); min-height: 100vh; margin: auto; flex-direction: column; padding: 28px 0; }
.error-layout .brand .brand__copy strong { color: var(--ink-900); }
.error-layout .brand .brand__copy small { color: var(--ink-400); }
.error-card { position: relative; width: min(620px, 100%); margin: auto; padding: 46px; overflow: hidden; border: 1px solid var(--ink-200); border-radius: 22px; background: rgb(255 255 255 / 90%); box-shadow: var(--shadow-md); }
.error-code { position: absolute; top: -24px; right: 12px; color: var(--brand-50); font-size: 150px; font-weight: 850; line-height: 1; user-select: none; }
.error-card .eyebrow, .error-card h1, .error-card > p, .error-actions, .trace-id { position: relative; }
.error-card h1 { max-width: 460px; margin-bottom: 10px; font-size: 28px; }
.error-card > p:not(.eyebrow):not(.error-card__meta) { max-width: 480px; color: var(--ink-500); }
.trace-id { display: flex; align-items: center; gap: 8px; width: fit-content; margin-top: 20px; padding: 8px 10px; border-radius: 8px; background: var(--ink-50); color: var(--ink-500); font-size: 10px; }
.trace-id code { color: var(--ink-700); }
.error-actions { display: flex; gap: 9px; margin-top: 24px; }
.error-card__meta { margin: 22px 0 0; color: var(--ink-400); font-size: 9px; }

.toast-region { position: fixed; z-index: 120; right: 20px; bottom: 20px; display: grid; width: min(360px, calc(100vw - 40px)); gap: 8px; pointer-events: none; }
.toast { padding: 11px 13px; border: 1px solid var(--ink-200); border-radius: 10px; background: var(--ink-900); color: white; box-shadow: var(--shadow-md); font-size: 12px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* Responsive */
@media (max-width: 1180px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .form-layout, .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .form-layout__aside { order: -1; }
  .sticky-summary { position: static; }
  .sticky-summary .check-list, .sticky-summary .summary-callout, .sticky-summary .submit-note { display: none; }
  .sticky-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px; }
  .sticky-summary .eyebrow, .sticky-summary h3 { margin: 0 auto 0 0; }
  .sticky-summary .eyebrow { display: none; }
  .sticky-summary .button { width: auto; margin: 0 !important; }
  .detail-grid__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  :root { --sidebar-w: 248px; }
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; }
  body.nav-open { overflow: hidden; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 12px 0 30px rgb(16 24 40 / 22%); }
  .sidebar__close, .mobile-menu { display: inline-grid; }
  .workspace { margin-left: 0; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .panel--span-2 { grid-column: auto; }
  .detail-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-stat-grid > div:nth-child(2)::after { display: none; }
  .monitor-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 0; }
  .monitor-grid > div:nth-child(2) { border-right: 0; }
  .monitor-grid > div:nth-child(3) { padding-left: 0; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; }
  .auth-mobile-mark { display: grid; width: 42px; height: 42px; margin-bottom: 20px; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--brand-600), var(--brand-800)); color: white; font-size: 19px; font-weight: 800; }
}

@media (max-width: 720px) {
  :root { --topbar-h: 62px; }
  .topbar { padding: 0 16px; }
  .main { padding: 18px 14px 32px; }
  .app-footer { padding: 14px; }
  .app-footer span:last-child { display: none; }
  .page-heading span, .health-pill, .user-menu__copy, .user-menu__chevron { display: none; }
  .page-heading h1 { font-size: 17px; }
  .user-menu > summary { padding: 0; }
  .page-intro { align-items: stretch; flex-direction: column; gap: 12px; }
  .page-intro .button { align-self: flex-start; }
  .page-intro h2 { font-size: 19px; }
  .notice { align-items: flex-start; flex-wrap: wrap; }
  .notice > a { width: 100%; margin: 3px 0 0 40px; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .summary-strip > div::after { display: none; }
  .summary-strip > div:nth-child(odd) { border-right: 1px solid var(--ink-100); }
  .summary-strip > div { border-bottom: 1px solid var(--ink-100); }
  .summary-strip > div:nth-last-child(-n+2) { border-bottom: 0; }
  .toolbar { align-items: stretch; }
  .toolbar > select, .toolbar > .date-filter { min-width: 0; flex: 1 1 145px; width: auto; }
  .toolbar .button { flex: 0 0 auto; }
  .form-grid--2 { grid-template-columns: 1fr; }
  .field--span-2 { grid-column: auto; }
  .form-section { padding: 0 16px 20px; }
  .form-section__header { margin: 0 -16px 18px; padding: 16px; }
  .sticky-summary { display: grid; grid-template-columns: 1fr 1fr; }
  .sticky-summary h3 { grid-column: 1 / -1; }
  .detail-hero { align-items: stretch; flex-direction: column; }
  .detail-hero__actions { justify-content: flex-start; }
  .detail-stat-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid__aside { grid-template-columns: 1fr; }
  .browser-frame iframe { height: 330px; }
  .auth-panel { padding: 24px 16px; }
  .auth-card { padding: 26px 22px; border-radius: 16px; }
  .dialog__header, .dialog__body, .dialog__footer { padding-right: 16px; padding-left: 16px; }
  .audit-detail__popover { position: fixed; z-index: 90; top: auto; right: 14px; bottom: 14px; left: 14px; width: auto; max-height: 60vh; overflow: auto; }
  .error-card { padding: 34px 24px; }
  .error-code { font-size: 110px; }
}

@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { padding: 14px; }
  .kpi-card > strong { font-size: 23px; }
  .kpi-card__foot { align-items: flex-start; flex-direction: column; gap: 0; }
  .panel__header { align-items: flex-start; flex-direction: column; }
  .panel__actions { width: 100%; }
  .panel__actions .button { flex: 1; }
  .summary-strip { grid-template-columns: 1fr 1fr; }
  .summary-strip > div { padding: 13px 14px; }
  .toolbar { display: grid; grid-template-columns: 1fr 1fr; }
  .toolbar .search-field { grid-column: 1 / -1; min-width: 0; }
  .toolbar > select, .toolbar > .date-filter, .toolbar > .button { width: 100%; }
  .toolbar__separator { display: none; }
  .pagination { justify-content: center; }
  .pagination__summary { display: none; }
  .detail-hero__identity { align-items: flex-start; }
  .site-emblem { width: 46px; height: 46px; }
  .detail-hero h2 { font-size: 18px; }
  .detail-hero__actions > *, .detail-hero__actions form, .detail-hero__actions form button { width: 100%; }
  .detail-stat-grid { grid-template-columns: 1fr; }
  .detail-stat-grid > div { border-bottom: 1px solid var(--ink-100); }
  .detail-stat-grid > div::after { display: none; }
  .monitor-grid { grid-template-columns: 1fr 1fr; }
  .monitor-grid > div { padding: 0 10px; }
  .browser-frame { margin: 12px; }
  .browser-frame iframe { height: 260px; }
  .sticky-summary { grid-template-columns: 1fr; }
  .sticky-summary h3 { grid-column: auto; }
  .job-detail-list { grid-template-columns: 1fr; }
  .job-detail-list > div:nth-child(odd) { border-right: 0; }
  .current-file { align-items: flex-start; flex-direction: column; }
  .current-file .checkbox { margin-left: 0; }
  .error-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  .sidebar, .topbar, .app-footer, .toolbar, .button, .text-button, .pagination, .notice > a { display: none !important; }
  .workspace { margin: 0; }
  .main { max-width: none; padding: 0; }
  .panel, .summary-strip, .detail-hero { break-inside: avoid; box-shadow: none; }
}
