:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafb;
  --ink: #16202a;
  --muted: #66727f;
  --line: #dde3e8;
  --line-strong: #cbd4dc;
  --nav: #111b24;
  --nav-soft: #1a2732;
  --primary: #117b6b;
  --primary-dark: #0c6256;
  --primary-soft: #e4f4f0;
  --danger: #b93838;
  --danger-soft: #fdecec;
  --success: #267a4a;
  --success-soft: #e9f6ee;
  --shadow: 0 1px 2px rgb(15 23 42 / 5%), 0 12px 28px rgb(15 23 42 / 5%);
  --radius: 14px;
  --radius-sm: 9px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.55; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #2d8f7f; outline-offset: 2px; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 100; transform: translateY(-150%); padding: 9px 13px; border-radius: 8px; color: #fff; background: var(--primary-dark); font-weight: 750; }
.skip-link:focus { transform: translateY(0); }
.main-content:focus { outline: none; }
.clipboard-fallback { position: fixed; width: 1px; height: 1px; inset: 0 auto auto 0; opacity: 0; pointer-events: none; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px 16px; color: #dce5eb; background: var(--nav); z-index: 30; }
.sidebar-backdrop { display: none; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 8px 18px; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.brand > span:last-child { min-width: 0; }
.brand strong { display: block; overflow: hidden; color: #fff; font-size: 17px; letter-spacing: .02em; text-overflow: ellipsis; white-space: nowrap; }
.brand small { display: block; margin-top: 1px; color: #81909c; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.brand-mark { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; border-radius: 11px; background: #d9f1eb; color: #0c6557; font-size: 19px; font-weight: 800; box-shadow: inset 0 0 0 1px rgb(17 123 107 / 18%); }
.brand-mark-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 24px; }
.nav { display: grid; gap: 5px; margin-top: 20px; }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: 11px; padding: 0 12px; border-radius: 9px; color: #9eacb7; font-weight: 600; transition: background .16s ease, color .16s ease; }
.nav-link:hover { color: #fff; background: rgb(255 255 255 / 6%); }
.nav-link.is-active { color: #e9fffa; background: #1c3a37; box-shadow: inset 3px 0 0 #56c0a9; }
.nav-icon { width: 20px; height: 20px; flex: 0 0 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; color: #7e8f9c; }
.nav-link.is-active .nav-icon { color: #75d0bd; }
.sidebar-user { margin-top: auto; min-height: 58px; display: grid; grid-template-columns: 38px minmax(0, 1fr) 40px; align-items: center; gap: 9px; padding: 10px 8px 0; border-top: 1px solid rgb(255 255 255 / 8%); }
.avatar { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #263744; color: #fff; font-weight: 800; }
.sidebar-user-copy { min-width: 0; }
.sidebar-user-copy strong, .sidebar-user-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy strong { color: #eef3f6; font-size: 13px; }
.sidebar-user-copy small { color: #7f8f9b; font-size: 11px; }
.icon-button, .menu-button, .password-toggle { min-width: 40px; min-height: 40px; border: 0; border-radius: 9px; cursor: pointer; }
.icon-button { color: #9dacb7; background: transparent; }
.icon-button:hover { color: #fff; background: rgb(255 255 255 / 7%); }

.main-area { min-width: 0; }
.topbar { height: 68px; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid var(--line); background: rgb(255 255 255 / 94%); backdrop-filter: blur(12px); }
.topbar h1 { margin: 0; font-size: 18px; letter-spacing: -.01em; }
.topbar-meta { margin-left: auto; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #28a15e; box-shadow: 0 0 0 4px #e1f5e9; }
.menu-button { display: none; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); }
.main-content { width: min(1540px, 100%); margin: 0 auto; padding: 28px; display: grid; gap: 20px; }

.card, .hero-card, .stat-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card { min-width: 0; }
.card-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-header h2 { margin: 0; font-size: 16px; }
.card-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 20px; }
.hero-card { min-height: 156px; display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 28px 32px; background: #15252d; color: #fff; overflow: hidden; }
.hero-card h2 { margin: 5px 0 5px; font-size: 26px; letter-spacing: -.03em; }
.hero-card p { margin: 0; color: #aab8c0; }
.hero-metric { min-width: 170px; text-align: right; }
.hero-metric span { display: block; color: #93a5ae; font-size: 12px; }
.hero-metric strong { display: block; margin-top: 2px; color: #92ddcc; font-size: 38px; line-height: 1; }
.eyebrow { margin: 0; color: #62b8a6 !important; font-size: 10px !important; font-weight: 800; letter-spacing: .18em; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { position: relative; min-height: 112px; padding: 21px; overflow: hidden; }
.stat-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--line-strong); }
.stat-card span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 10px; font-size: 28px; line-height: 1; letter-spacing: -.03em; }
.stat-blue::before { background: #4d7ec5; }.stat-violet::before { background: #8269bb; }.stat-amber::before { background: #d29a31; }.stat-green::before { background: #3b9870; }

.page-grid { display: grid; gap: 20px; align-items: start; }
.page-grid-sidebar { grid-template-columns: minmax(0, 1fr) 360px; }
.detail-grid { grid-template-columns: minmax(0, 1fr) 340px; }
.sticky-card { position: sticky; top: 88px; }
.stack { display: grid; gap: 20px; }
.form-card { overflow: visible; }
.form-stack { display: grid; gap: 15px; }
.form-grid { display: grid; gap: 16px; }
.form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.product-form { display: grid; gap: 24px; }
.rule-section { padding-top: 4px; }
.rule-section + .rule-section { border-top: 1px solid var(--line); padding-top: 22px; }
.section-heading { margin-bottom: 14px; }
.section-heading h3 { margin: 0; font-size: 14px; }
.section-heading p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; padding-top: 4px; }
.filter-card { overflow: visible; }
.filter-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; align-items: end; }
.filter-actions { min-height: 42px; display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.checkbox-field { min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.checkbox-field input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.field { display: grid; gap: 7px; color: #34414c; font-size: 12px; font-weight: 700; }
.field small { color: var(--muted); font-weight: 400; line-height: 1.45; }
.input, .select { width: 100%; min-height: 42px; padding: 9px 11px; color: var(--ink); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: #fff; outline: none; transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder { color: var(--muted); }
.input:focus, .select:focus { border-color: #4a9d8e; box-shadow: 0 0 0 3px rgb(17 123 107 / 12%); }
.multi-select { min-height: 110px; }
.input-action, .password-wrap { position: relative; display: flex; gap: 8px; align-items: center; }
.input-action .input { min-width: 0; flex: 1 1 auto; }
.input-action .button { flex: 0 0 auto; white-space: nowrap; }
.password-wrap .input { padding-right: 68px; }
.password-toggle { position: absolute; right: 2px; min-width: 58px; color: var(--primary); background: transparent; font-size: 12px; font-weight: 700; }

.button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; font-weight: 750; transition: background .15s ease, border-color .15s ease, transform .1s ease; }
.button:active { transform: translateY(1px); }
.button:disabled { opacity: .65; cursor: wait; transform: none; }
form[aria-busy="true"] { cursor: progress; }
.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.button-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button-ghost { color: #42515d; background: #fff; border-color: var(--line-strong); }
.button-ghost:hover { background: var(--surface-2); }
.button-small { min-height: 40px; padding: 0 12px; font-size: 12px; }
.button-block { width: 100%; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th { padding: 11px 16px; color: var(--muted); background: #fafbfc; border-bottom: 1px solid var(--line); font-size: 11px; text-align: left; text-transform: uppercase; letter-spacing: .04em; }
td { padding: 14px 16px; border-bottom: 1px solid #edf0f2; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcfd; }
.cell-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.empty-cell, .empty-state { padding: 42px !important; color: var(--muted); text-align: center; }
.table-link, .back-link { color: var(--primary); font-weight: 750; }
.table-link:hover, .back-link:hover { text-decoration: underline; }
.code-chip { display: inline-block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; padding: 4px 7px; border: 1px solid var(--line); border-radius: 6px; color: #3e4b56; background: var(--surface-2); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; }
.badge { display: inline-flex; align-items: center; min-height: 25px; padding: 2px 9px; border-radius: 999px; color: #586673; background: #eef1f3; font-size: 11px; font-weight: 750; }
.badge-success { color: var(--success); background: var(--success-soft); }
.badge-danger { color: var(--danger); background: var(--danger-soft); }
.badge-muted { color: #596671; background: #eceff1; }
.badge-status-new { color: #8a650f; background: #fff3d2; }.badge-status-contacted { color: #315e9c; background: #e8f0fc; }.badge-status-qualified { color: #24784a; background: #e7f5ed; }.badge-status-rejected { color: #a23b3b; background: #fae9e9; }.badge-status-converted { color: #6b4ba3; background: #f0e9fa; }
.badge-large { min-height: 34px; padding-inline: 14px; font-size: 12px; }
.alert { padding: 12px 14px; border: 1px solid; border-radius: 10px; font-weight: 650; }
.alert-success { color: var(--success); background: var(--success-soft); border-color: #b9dfc8; }
.alert-error { color: var(--danger); background: var(--danger-soft); border-color: #f1bcbc; }
.pagination { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; border-top: 1px solid var(--line); }
.pagination-summary { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pagination-summary strong { color: var(--ink); }
.pagination-links { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.pagination-link { min-width: 34px; min-height: 34px; display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: #4c5a66; background: #fff; font-size: 12px; font-weight: 700; }
a.pagination-link:hover { border-color: #9fc9bf; color: var(--primary); background: var(--primary-soft); }
.pagination-link.is-current { color: #fff; border-color: var(--primary); background: var(--primary); }
.pagination-link.is-disabled { color: #9ba6ae; background: var(--surface-2); cursor: not-allowed; }
.pagination-step { min-width: 64px; }
.pagination-ellipsis { min-width: 24px; color: var(--muted); text-align: center; }

.detail-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 4px 2px; }
.detail-header-badges { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.detail-header h2 { margin: 9px 0 3px; font-size: 22px; }
.detail-header p { margin: 0; color: var(--muted); }
.kv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 8px 20px 20px; }
.kv-grid div { min-height: 76px; padding: 16px 12px; border-bottom: 1px solid #edf0f2; }
.kv-grid dt, .kv-list dt { color: var(--muted); font-size: 11px; }
.kv-grid dd, .kv-list dd { margin: 5px 0 0; font-weight: 750; overflow-wrap: anywhere; }
.kv-list { margin: 0; padding: 8px 20px 20px; }
.kv-list div { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.kv-list div:last-child { border-bottom: 0; }
.kv-list dd { margin: 0; text-align: right; }

.log-list { padding: 6px 20px 16px; }
.log-item { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; padding: 16px 0; border-bottom: 1px solid #edf0f2; }
.log-item:last-child { border-bottom: 0; }
.log-icon { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--success); background: var(--success-soft); font-weight: 800; }
.log-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.log-title span, .log-main p { color: var(--muted); font-size: 11px; }
.log-main p { margin: 3px 0 0; }
.log-details { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.log-details span { padding: 4px 7px; border-radius: 6px; color: #596671; background: var(--surface-2); font-size: 11px; }
.log-details b { margin-right: 3px; }
.log-metadata { min-width: 90px; }
.log-metadata summary { color: var(--primary); cursor: pointer; font-size: 12px; font-weight: 750; }
.log-metadata[open] { min-width: 260px; }
.log-metadata .log-details { max-width: 360px; white-space: normal; }
.row-actions { display: inline-flex; align-items: center; gap: 7px; }
.row-actions form { margin: 0; }
body.dialog-open { overflow: hidden; }
.action-dialog { width: min(440px, calc(100vw - 32px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; color: var(--ink); background: transparent; overflow: visible; white-space: normal; text-align: left; }
.action-dialog:not([open]) { display: none; }
.action-dialog::backdrop { background: rgb(15 23 42 / 52%); backdrop-filter: blur(2px); }
.action-dialog-wide { width: min(560px, calc(100vw - 32px)); }
.action-dialog-xl { width: min(960px, calc(100vw - 32px)); }
.dialog-panel { max-height: calc(100dvh - 32px); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: 0 28px 80px rgb(15 23 42 / 30%); }
.dialog-header { min-height: 76px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.dialog-header h3 { margin: 0; font-size: 17px; }
.dialog-header p { margin: 3px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.dialog-close { width: 36px; height: 36px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: 9px; color: #687581; background: #fff; cursor: pointer; font-size: 22px; line-height: 1; }
.dialog-close:hover { color: var(--ink); background: var(--surface-2); }
.dialog-body { min-height: 0; padding: 20px; overflow-y: auto; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 6px; padding-top: 16px; border-top: 1px solid var(--line); }
.form-note { margin: 0; padding: 10px 12px; border-radius: 8px; color: var(--muted); background: var(--surface-2); font-size: 12px; }
.rule-summary-row { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.rule-summary-list .rule-summary-row:last-child { border-bottom: 0; }
.rule-summary-row b { color: var(--muted); font-weight: 600; }
.rule-summary-row span { color: var(--ink); overflow-wrap: anywhere; }
.guide-toolbar { display: grid; grid-template-columns: minmax(260px, 420px) minmax(0, 1fr) auto; align-items: end; gap: 18px; }
.guide-channel-form { min-width: 0; }
.guide-summary { min-width: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.guide-summary > span { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.guide-summary b { color: var(--ink); }
.guide-summary code { max-width: 340px; overflow: hidden; text-overflow: ellipsis; color: #394956; }
.guide-actions { display: flex; justify-content: flex-end; gap: 8px; }
.guide-document-wrap { padding: 0 20px 20px; }
.guide-document { width: 100%; min-height: 640px; display: block; resize: vertical; padding: 20px; border: 1px solid #253643; border-radius: 12px; color: #dce8ee; background: #101a22; outline: none; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre; tab-size: 4; }

.auth-body { min-height: 100vh; display: grid; grid-template-rows: minmax(0, 1fr) auto; align-items: center; padding: 40px; color: var(--ink); background: #eef2f1; }
.auth-shell { width: min(860px, 100%); min-height: 560px; justify-self: center; display: grid; grid-template-columns: 360px minmax(0, 1fr); overflow: hidden; border: 1px solid #d7dedf; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgb(22 32 42 / 14%); }
.auth-brand { min-width: 0; display: flex; flex-direction: column; padding: 38px; color: #edf4f5; background: var(--nav); }
.auth-brand-lockup { display: flex; align-items: center; gap: 13px; }
.auth-brand-lockup > span:last-child { min-width: 0; }
.auth-brand-lockup strong, .auth-brand-lockup small { display: block; }
.auth-brand-lockup strong { overflow: hidden; color: #fff; font-size: 17px; text-overflow: ellipsis; white-space: nowrap; }
.auth-brand-lockup small { margin-top: 1px; color: #91a2ad; font-size: 11px; letter-spacing: .08em; }
.auth-brand-copy { margin-top: 68px; }
.auth-kicker { margin: 0; color: #61b9a7; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.auth-brand-copy h1 { margin: 13px 0 14px; font-size: 30px; line-height: 1.28; letter-spacing: -.035em; text-wrap: balance; }
.auth-brand-copy > p:last-child { margin: 0; color: #a8b6be; font-size: 13px; line-height: 1.75; }
.auth-trust-list { display: grid; gap: 0; margin: 32px 0 0; padding: 0; list-style: none; }
.auth-trust-list li { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid rgb(255 255 255 / 9%); }
.auth-trust-list strong { color: #e8f0f2; font-size: 12px; }
.auth-trust-list span { color: #8799a4; font-size: 11px; line-height: 1.55; }
.auth-brand-foot { margin: auto 0 0; padding-top: 28px; color: #718590; font-size: 11px; }
.auth-login { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 48px; background: #fff; }
.auth-login-inner { width: min(360px, 100%); }
.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin: 8px 0 6px; font-size: 27px; line-height: 1.2; letter-spacing: -.025em; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); }
.auth-login .alert { margin-bottom: 20px; }
.auth-form { gap: 8px; }
.auth-form .field { margin-top: 10px; font-size: 13px; }
.auth-form .field:first-of-type { margin-top: 0; }
.auth-input { min-height: 48px; padding: 11px 13px; border-radius: 10px; }
.auth-form .password-wrap { width: 100%; }
.auth-form .password-toggle { min-height: 42px; right: 4px; }
.auth-submit { min-height: 48px; margin-top: 18px; border-radius: 10px; font-size: 14px; }
.auth-security-note { margin: 26px 0 0; padding-top: 18px; border-top: 1px solid var(--line); color: #687681; font-size: 11px; line-height: 1.65; }
.auth-security-note strong { margin-right: 5px; color: #40505b; }
.auth-footer { justify-self: center; padding: 18px 10px 0; color: var(--muted); font-size: 11px; }
.setup-shell { width: min(960px, 100%); min-height: 680px; justify-self: center; display: grid; grid-template-columns: 320px minmax(0, 1fr); overflow: hidden; border: 1px solid #d7dedf; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px rgb(22 32 42 / 14%); }
.setup-aside { min-width: 0; display: flex; flex-direction: column; padding: 36px; color: #edf4f5; background: var(--nav); }
.setup-intro { margin-top: 60px; }
.setup-intro h1 { margin: 13px 0 12px; font-size: 29px; line-height: 1.25; letter-spacing: -.035em; }
.setup-intro > p:last-child { margin: 0; color: #a8b6be; font-size: 13px; line-height: 1.7; }
.setup-steps { display: grid; gap: 0; margin: 34px 0 0; padding: 0; list-style: none; }
.setup-steps li { min-width: 0; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; padding: 14px 0; border-top: 1px solid rgb(255 255 255 / 9%); }
.setup-steps li > span { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid rgb(117 208 189 / 36%); border-radius: 50%; color: #7cd2c0; background: rgb(117 208 189 / 8%); font-size: 11px; font-weight: 800; }
.setup-steps strong, .setup-steps small { display: block; }
.setup-steps strong { color: #e8f0f2; font-size: 12px; }
.setup-steps small { margin-top: 2px; color: #8799a4; font-size: 11px; line-height: 1.5; }
.setup-aside-note { margin: auto 0 0; padding-top: 28px; color: #718590; font-size: 11px; line-height: 1.6; }
.setup-content { min-width: 0; display: flex; align-items: center; justify-content: center; padding: 42px 46px; background: #fff; }
.setup-content-inner { width: min(520px, 100%); }
.setup-form-heading { margin-bottom: 22px; }
.setup-form-heading h2 { margin: 8px 0 6px; font-size: 27px; line-height: 1.2; letter-spacing: -.025em; }
.setup-form-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.setup-status { display: grid; grid-template-columns: 10px minmax(0, 1fr); gap: 10px; align-items: start; margin-bottom: 22px; padding: 12px 13px; border: 1px solid #c6e3d0; border-radius: 10px; background: #f1f9f4; }
.setup-status > span { width: 8px; height: 8px; margin-top: 5px; border-radius: 50%; background: #2c9259; box-shadow: 0 0 0 3px #dcefe3; }
.setup-status strong, .setup-status small { display: block; }
.setup-status strong { color: #276a45; font-size: 12px; }
.setup-status small { margin-top: 1px; color: #5e7668; font-size: 11px; }
.setup-content .alert { margin-bottom: 22px; }
.setup-form { display: grid; gap: 22px; }
.setup-fieldset { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.setup-fieldset legend { width: 100%; margin-bottom: 3px; padding: 0 0 9px; border-bottom: 1px solid var(--line); color: #26343e; font-size: 13px; font-weight: 800; }
.setup-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.setup-form-grid > div { min-width: 0; display: grid; gap: 7px; }
.setup-span-2 { grid-column: 1 / -1; }
.setup-input { min-height: 48px; padding: 11px 13px; border-radius: 10px; }
.setup-password-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.setup-submit { min-height: 48px; border-radius: 10px; font-size: 14px; }
.setup-footnote { margin: 20px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.setup-body-full .setup-shell { width: min(1040px, 100%); }
.setup-body-full .setup-content { align-items: flex-start; }
.setup-body-full .setup-content-inner { width: min(600px, 100%); }
.error-card { width: min(500px, 100%); padding: 44px; border-radius: 18px; background: #fff; text-align: center; }
.error-card h1 { margin: 8px 0; }.error-card p { color: var(--muted); }.error-code { color: var(--primary); font-size: 48px; font-weight: 850; }

@media (max-width: 1800px) {
  .page-grid-sidebar { grid-template-columns: 1fr; }
  .page-grid-sidebar > .sticky-card { position: static; }
}

@media (max-width: 1180px) {
  .page-grid-sidebar, .detail-grid { grid-template-columns: 1fr; }
  .sticky-card { position: static; }
  .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  body.sidebar-open { overflow: hidden; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); width: 260px; transition: transform .2s ease; box-shadow: 12px 0 40px rgb(0 0 0 / 25%); }
  .app-shell.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-backdrop:not([hidden]) { position: fixed; inset: 0; z-index: 25; display: block; padding: 0; border: 0; background: rgb(15 23 42 / 48%); cursor: pointer; }
  .menu-button { display: inline-flex; align-items: center; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar { padding: 0 18px; }
  .main-content { padding: 20px 16px; }
  .auth-body { padding: 24px; }
  .auth-shell { grid-template-columns: 1fr; max-width: 540px; }
  .auth-brand { padding: 30px 34px; }
  .auth-brand-copy { margin-top: 34px; }
  .auth-brand-copy h1 { font-size: 27px; }
  .auth-trust-list { display: none; }
  .auth-brand-foot { display: none; }
  .auth-login { padding: 38px 34px; }
  .setup-shell { grid-template-columns: 1fr; max-width: 640px; }
  .setup-aside { padding: 30px 34px; }
  .setup-intro { margin-top: 32px; }
  .setup-intro h1 { font-size: 27px; }
  .setup-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .setup-steps li { grid-template-columns: 30px minmax(0, 1fr); border-top: 0; }
  .setup-steps small, .setup-aside-note { display: none; }
  .setup-content { padding: 38px 34px; }
}
@media (max-width: 640px) {
  .auth-body { padding: 0; align-items: start; background: #fff; }
  .auth-shell { width: 100%; min-height: auto; border: 0; border-radius: 0; box-shadow: none; }
  .auth-brand { padding: 24px; }
  .auth-brand-copy { margin-top: 28px; }
  .auth-brand-copy h1 { margin-bottom: 10px; font-size: 24px; }
  .auth-login { padding: 32px 24px 38px; }
  .auth-heading h2 { font-size: 25px; }
  .auth-footer { width: 100%; padding: 16px 20px; border-top: 1px solid var(--line); background: #fff; text-align: center; }
  .setup-shell { width: 100%; min-height: auto; border: 0; border-radius: 0; box-shadow: none; }
  .setup-aside { padding: 24px; }
  .setup-intro { margin-top: 28px; }
  .setup-intro h1 { font-size: 24px; }
  .setup-steps { gap: 8px; }
  .setup-steps li { grid-template-columns: 28px minmax(0, 1fr); gap: 7px; padding: 8px 0; }
  .setup-content { padding: 32px 24px 38px; }
  .setup-form-heading h2 { font-size: 25px; }
  .setup-form-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 96px; padding: 17px; }
  .stat-card strong { font-size: 24px; }
  .hero-card { align-items: flex-start; padding: 24px; flex-direction: column; }
  .hero-metric { text-align: left; }
  .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; }
  .kv-grid { grid-template-columns: 1fr 1fr; }
  .detail-header { align-items: flex-start; flex-direction: column; }
  .card-header { align-items: flex-start; padding: 16px; }
  .card-body { padding: 16px; }
  .topbar-meta { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .action-dialog, .action-dialog-wide, .action-dialog-xl { width: calc(100vw - 20px); }
  .dialog-panel { max-height: calc(100dvh - 20px); border-radius: 12px; }
  .dialog-header { min-height: 68px; padding: 15px 16px; }
  .dialog-close { width: 44px; height: 44px; }
  .dialog-body { padding: 16px; }
  .dialog-actions .button { flex: 1; }
  .guide-toolbar { grid-template-columns: 1fr; align-items: stretch; }
  .guide-actions { justify-content: stretch; }
  .guide-actions .button { flex: 1; }
  .guide-document-wrap { padding: 0 12px 12px; }
  .guide-document { min-height: 520px; padding: 14px; }
  .pagination { align-items: stretch; flex-direction: column; padding: 14px 12px; }
  .pagination-summary { text-align: center; }
  .pagination-links { justify-content: center; }
  .pagination-link { min-width: 44px; min-height: 44px; }
  .pagination-step { min-width: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
