:root {
  color-scheme: light;
  font-family: Inter, "Noto Sans KR", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-strong: #f8fafc;
  --line: #dce4ee;
  --line-strong: #c8d3e0;
  --text: #172033;
  --muted: #66758a;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-soft: #eff6ff;
  --success: #0f8a62;
  --warning: #b96808;
  --danger: #dc2626;
  --state-on: #087a4d;
  --state-on-strong: #055f3b;
  --state-on-soft: #e8f8ef;
  --state-off: #c9363e;
  --state-off-strong: #a9262e;
  --state-off-soft: #fff0f1;
  --shadow-sm: 0 2px 8px rgba(22, 34, 51, .06);
  --shadow-md: 0 12px 32px rgba(22, 34, 51, .08);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: linear-gradient(180deg, #fbfdff 0, var(--bg) 320px); color: var(--text); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.background-grid { position: fixed; inset: 0; opacity: .22; pointer-events: none; background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.app-shell { position: relative; min-height: 100vh; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr); align-items: center; gap: clamp(40px, 8vw, 130px); width: min(1180px, calc(100% - 64px)); margin: auto; }
.brand-panel h1 { margin: 12px 0 24px; max-width: 720px; font-size: clamp(42px, 5.2vw, 68px); line-height: 1.08; letter-spacing: -.05em; }
.brand-panel h1 span { display: block; white-space: nowrap; }
.brand-copy { max-width: 570px; color: var(--muted); line-height: 1.8; font-size: 17px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.status-line { display: flex; align-items: center; gap: 10px; margin-top: 42px; color: #bfd4e7; font-size: 13px; }
.status-line span, .server-state { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 16px var(--accent); }
.card { border: 1px solid var(--line); border-radius: 20px; background: var(--panel); box-shadow: 0 24px 70px rgba(0, 0, 0, .28); backdrop-filter: blur(18px); }
.login-card, .form-card { display: grid; gap: 22px; padding: 38px; }
.login-card h2, .form-card h2, .table-card h2 { margin: 0; font-size: 28px; }
.login-signup { display: flex; align-items: center; justify-content: center; gap: 8px; padding-top: 4px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.login-signup a { color: var(--accent); font-weight: 800; }
.login-signup a:hover { text-decoration: underline; }
.muted, .section-heading p, .form-help { color: var(--muted); }
label { display: grid; gap: 9px; color: #c4d5e5; font-size: 13px; font-weight: 700; }
input { width: 100%; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #091728; color: var(--text); padding: 13px 14px; transition: border-color .2s, box-shadow .2s; }
input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(38, 198, 165, .13); }
button, .secondary { border: 0; border-radius: 10px; padding: 12px 17px; cursor: pointer; font-weight: 800; }
button:disabled { cursor: not-allowed; opacity: .45; }
.primary { background: var(--accent); color: #05251f; }
.primary:hover { background: #42d8b9; }
.secondary { display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #172c44; color: var(--text); }
.ghost { background: transparent; color: #b9cad9; border: 1px solid var(--line); }
.danger { border: 1px solid rgba(255, 121, 121, .4); background: rgba(255, 121, 121, .1); color: var(--danger); }
.danger:hover { background: rgba(255, 121, 121, .18); }
.password-dialog { width: min(460px, calc(100% - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: #102137; color: var(--text); box-shadow: 0 30px 100px #000; }
.password-dialog::backdrop { background: rgba(3, 9, 16, .75); backdrop-filter: blur(5px); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
.split-actions { display: grid; grid-template-columns: auto 1fr auto auto; }
.message { min-height: 20px; margin: -4px 0; color: var(--danger); font-size: 13px; }
.message.success { color: var(--accent); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 114px; padding: 24px max(32px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(7, 17, 29, .78); backdrop-filter: blur(18px); }
.topbar h1 { margin: 0; font-size: 28px; }
.user-actions { display: flex; align-items: center; gap: 12px; }
.user-actions > span { display: grid; justify-items: end; margin-right: 8px; }
.user-actions small, .access-row small { display: block; margin-top: 4px; color: var(--muted); }
.content { width: min(1180px, calc(100% - 64px)); margin: auto; padding: 52px 0 80px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 7px; font-size: 24px; }
.section-heading p { margin: 0; }
.count { color: var(--muted); font-size: 13px; }
.server-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.server-card { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; min-height: 126px; padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); transition: transform .2s, border-color .2s, background .2s; }
.server-card:hover { transform: translateY(-3px); border-color: rgba(38, 198, 165, .6); background: #132a41; }
.server-card h3 { margin: 0 0 7px; }
.server-card p { margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; }
.server-icon { display: flex; align-items: flex-end; gap: 3px; width: 48px; height: 48px; padding: 11px; border-radius: 12px; background: rgba(38, 198, 165, .12); }
.server-icon span { width: 7px; border-radius: 2px; background: var(--accent); }
.server-icon span:nth-child(1) { height: 16px; }.server-icon span:nth-child(2) { height: 25px; }.server-icon span:nth-child(3) { height: 20px; }
.open-arrow { color: var(--accent); font-size: 24px; }
.empty-state { padding: 58px; border: 1px dashed var(--line); border-radius: 16px; text-align: center; color: var(--muted); }
.empty-state strong { color: var(--text); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.back-link { display: inline-flex; align-items: center; margin-bottom: 22px; color: #a9c1d6; font-size: 13px; font-weight: 700; }
.back-link:hover { color: var(--accent); }
.admin-content { width: min(1280px, calc(100% - 56px)); padding-top: 34px; }
.admin-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 36px; margin-bottom: 24px; padding: 30px 32px; border: 1px solid var(--line); border-radius: 20px; background: linear-gradient(115deg, rgba(19, 48, 74, .94), rgba(12, 28, 46, .86)); box-shadow: 0 20px 55px rgba(0, 0, 0, .22); }
.admin-hero h2 { max-width: 660px; margin: 0 0 9px; font-size: clamp(25px, 3vw, 36px); letter-spacing: -.035em; }
.admin-hero > div > p:last-child { max-width: 690px; margin: 0; color: var(--muted); line-height: 1.65; }
.admin-summary { display: grid; grid-template-columns: repeat(3, minmax(100px, 1fr)); overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: rgba(4, 15, 27, .38); }
.admin-summary > div { display: grid; min-width: 120px; padding: 18px 20px; border-left: 1px solid var(--line); }
.admin-summary > div:first-child { border-left: 0; }
.admin-summary span { color: var(--muted); font-size: 11px; font-weight: 800; }
.admin-summary strong { margin: 3px 0; color: var(--text); font-size: 25px; }
.admin-summary small { color: #7890a6; font-size: 10px; }
.setup-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; gap: 20px; }
.setup-card { display: grid; gap: 20px; padding: 26px; border-radius: 18px; box-shadow: 0 18px 50px rgba(0, 0, 0, .2); }
.setup-card-head { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.setup-card-head h2 { margin: 0; font-size: 23px; }
.setup-card-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.step-number { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(38, 198, 165, .35); border-radius: 10px; background: rgba(38, 198, 165, .12); color: var(--accent); font-size: 15px; font-weight: 900; }
.form-section { display: grid; gap: 16px; }
label:not(.permission-option, .role-option) > span:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
label:not(.permission-option, .role-option) > span small { color: #7890a6; font-size: 10px; font-weight: 600; }
.inline-fields { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 12px; }
.slug-field { display: grid; grid-template-columns: minmax(150px, .72fr) minmax(0, 1fr); align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; background: #091728; }
.slug-field:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(38, 198, 165, .13); }
.slug-field input { border: 0; border-radius: 0; box-shadow: none; }
.slug-field input:focus { box-shadow: none; }
.slug-field span { overflow: hidden; padding: 0 12px; border-left: 1px solid var(--line); color: #718aa1; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.endpoint-preview, .dialog-server-address { display: grid; gap: 5px; padding: 13px 15px; border: 1px solid rgba(38, 198, 165, .2); border-radius: 11px; background: rgba(38, 198, 165, .06); }
.endpoint-preview span, .dialog-server-address span { color: #7f9aae; font-size: 10px; font-weight: 800; }
.endpoint-preview strong, .dialog-server-address strong { overflow: hidden; color: #b9eadf; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; text-overflow: ellipsis; }
.full-button { width: 100%; min-height: 46px; }
.user-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset > legend { margin-bottom: 9px; color: #c4d5e5; font-size: 13px; font-weight: 700; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-option { position: relative; display: block; cursor: pointer; }
.role-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.role-option > span { display: grid; gap: 3px; min-height: 67px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #0b1a2c; transition: border-color .2s, background .2s, box-shadow .2s; }
.role-option small { color: var(--muted); font-size: 10px; font-weight: 600; }
.role-option input:checked + span { border-color: rgba(38, 198, 165, .75); background: rgba(38, 198, 165, .1); box-shadow: inset 0 0 0 1px rgba(38, 198, 165, .18); }
.role-option input:focus-visible + span { box-shadow: 0 0 0 3px rgba(38, 198, 165, .15); }
.permission-fieldset { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(6, 17, 29, .46); }
.permission-fieldset.is-disabled { opacity: .72; }
.permission-title { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.permission-title > span { color: var(--muted); font-size: 11px; }
.permission-title > strong { color: #d8e7f4; font-size: 13px; }
.permission-selector { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.permission-selector-create { max-height: 160px; overflow: auto; padding-right: 2px; }
.permission-option { position: relative; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 9px; min-width: 0; padding: 10px 11px; border: 1px solid var(--line); border-radius: 10px; background: #0a192a; cursor: pointer; transition: border-color .2s, background .2s; }
.permission-option:hover { border-color: rgba(38, 198, 165, .4); }
.permission-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.permission-mark { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid #486179; border-radius: 6px; color: transparent; font-size: 12px; }
.permission-copy { display: grid; min-width: 0; gap: 2px; }
.permission-copy strong, .permission-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.permission-copy strong { font-size: 11px; }
.permission-copy small { color: #70899f; font-size: 9px; font-weight: 600; }
.permission-option:has(input:checked) { border-color: rgba(38, 198, 165, .48); background: rgba(38, 198, 165, .09); }
.permission-option input:checked + .permission-mark { border-color: var(--accent); background: var(--accent); color: #05251f; }
.permission-option:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(38, 198, 165, .13); }
.permission-option:has(input:disabled) { cursor: default; }
.permission-option.is-paused { border-style: dashed; opacity: .72; }
.permission-empty { display: grid; grid-column: 1 / -1; gap: 4px; padding: 18px; border: 1px dashed var(--line); border-radius: 10px; color: var(--muted); text-align: center; }
.permission-empty strong { color: #b9cad9; font-size: 12px; }
.permission-empty span { font-size: 10px; }
.permission-fieldset .form-help { margin: 0; font-size: 10px; line-height: 1.5; }
.management-section { margin-top: 42px; scroll-margin-top: 24px; }
.management-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.management-heading h2 { margin: 0; font-size: 24px; }
.management-heading p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.access-list, .registered-list { display: grid; gap: 12px; }
.access-card, .managed-server-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: rgba(14, 29, 47, .92); box-shadow: 0 12px 34px rgba(0, 0, 0, .15); }
.access-card { transition: border-color .2s, box-shadow .2s; }
.access-card.has-changes { border-color: rgba(255, 196, 87, .52); box-shadow: 0 0 0 1px rgba(255, 196, 87, .08), 0 12px 34px rgba(0, 0, 0, .15); }
.access-card-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 17px 19px; border-bottom: 1px solid var(--line); }
.user-identity, .managed-server-main { display: flex; align-items: center; min-width: 0; gap: 12px; }
.user-avatar { display: grid; flex: 0 0 auto; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(135deg, #285579, #163451); color: #d9ecfc; font-size: 14px; font-weight: 900; }
.identity-line { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.identity-line h3 { margin: 0; font-size: 15px; }
.user-identity p { margin: 3px 0 0; color: var(--muted); font-size: 10px; }
.compact-button { padding: 8px 11px; font-size: 10px; white-space: nowrap; }
.access-head-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.access-card-body { display: grid; gap: 12px; padding: 16px 19px; }
.access-card.has-changes .save-access { border-color: rgba(255, 196, 87, .45); background: rgba(255, 196, 87, .12); color: #ffcf72; }
.managed-server-card { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(190px, .55fr) auto; align-items: center; gap: 22px; padding: 18px 19px; }
.server-status-icon { flex: 0 0 auto; width: 34px; height: 34px; border: 1px solid rgba(38, 198, 165, .24); border-radius: 10px; background: radial-gradient(circle, var(--accent) 0 3px, rgba(38, 198, 165, .11) 4px); }
.server-status-icon.inactive { border-color: var(--line); background: radial-gradient(circle, #71879a 0 3px, rgba(113, 135, 154, .1) 4px); }
.server-public-url { display: block; max-width: 500px; margin-top: 5px; overflow: hidden; color: #78bde8; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.server-public-url:hover { color: var(--accent); text-decoration: none; }
.server-endpoint { display: grid; gap: 5px; }
.server-endpoint span { color: var(--muted); font-size: 9px; font-weight: 700; }
code { color: #c1d5e7; font-size: 11px; }
.managed-server-actions { display: flex; justify-content: flex-end; gap: 8px; }
.managed-server-actions button { width: 72px; min-width: 72px; padding-right: 8px; padding-left: 8px; }
.pause-button { border: 1px solid rgba(255, 196, 87, .25); background: rgba(255, 196, 87, .08); color: #e8bd70; }
.pause-button:hover { background: rgba(255, 196, 87, .14); }
.management-empty { padding: 40px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.management-empty strong { color: #cbdceb; }
.management-empty p { margin: 7px 0 0; font-size: 11px; }
.account-options { display: flex; gap: 22px; }
.check-line { display: flex; align-items: center; gap: 9px; }
.check-line input { width: auto; }
.dialog-server-address { margin-top: -6px; }
.admin-toast { position: fixed; z-index: 20; top: 24px; left: 50%; display: none; min-width: min(420px, calc(100% - 32px)); max-width: 620px; margin: 0; padding: 13px 18px; border: 1px solid rgba(255, 121, 121, .35); border-radius: 12px; background: #251a25; box-shadow: 0 18px 55px rgba(0, 0, 0, .42); text-align: center; transform: translateX(-50%); }
.admin-toast:not(:empty) { display: block; }
.admin-toast.success { border-color: rgba(38, 198, 165, .35); background: #0c2a2b; }
.is-hidden { display: none !important; }

.admin-management-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; }
.admin-management-tab { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; background: transparent; color: var(--muted); }
.admin-management-tab > span { font-size: 14px; }
.admin-management-tab > strong { padding: 4px 8px; border-radius: 999px; font-size: 10px; }
.admin-management-tab.is-active { background: var(--panel); color: var(--text); }
.admin-management-tab > strong.has-pending { color: var(--warning); }
.admin-management-panels { min-width: 0; }
.admin-pane[hidden] { display: none; }
.admin-pane { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: rgba(9, 23, 40, .42); }
.pane-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 15px; }
.pane-heading h2 { margin: 0; font-size: 22px; }
.pane-heading > span { padding: 6px 9px; border-radius: 999px; background: rgba(124, 153, 180, .1); color: var(--muted); font-size: 10px; white-space: nowrap; }
.pane-heading > span strong { color: var(--accent); }
.pane-heading > span.has-pending { background: rgba(255, 196, 87, .1); color: #e7c47f; }
.pane-heading > span.has-pending strong { color: #f2c56f; }
.server-pane .managed-server-card { grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.server-pane .server-endpoint { grid-column: 1; }
.server-pane .managed-server-actions { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; flex-direction: column; }
.admin-quick-stats { display: flex; gap: 8px; }
.admin-quick-stats > span { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; background: rgba(14, 29, 47, .72); color: var(--muted); font-size: 10px; }
.admin-quick-stats strong { margin-left: 5px; color: var(--text); font-size: 12px; }
.admin-quick-stats .has-pending { border-color: rgba(255, 196, 87, .3); color: #e7c47f; }
.setup-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setup-disclosure { overflow: hidden; border-radius: 14px; box-shadow: 0 12px 32px rgba(0, 0, 0, .16); }
.setup-disclosure > summary { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 58px; padding: 0 19px; cursor: pointer; list-style: none; }
.setup-disclosure > summary::-webkit-details-marker { display: none; }
.setup-disclosure > summary strong { font-size: 14px; }
.add-button-icon { display: grid; place-items: center; width: 26px; height: 26px; border: 1px dashed currentColor; border-radius: 7px; font-size: 17px; line-height: 1; }
.setup-form { display: grid; gap: 15px; padding: 19px; border-top: 1px solid var(--line); }
.setup-form .endpoint-preview { padding: 11px 13px; }
.setup-form .permission-fieldset { padding: 12px; }
.setup-form .role-option > span { min-height: 58px; }

.registration-page { width: min(1240px, calc(100% - 56px)); min-height: 100vh; margin: auto; padding: 28px 0 70px; }
.simple-registration { width: min(720px, calc(100% - 32px)); }
.registration-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.registration-top > .ghost { padding: 8px 12px; border-radius: 9px; font-size: 10px; font-weight: 800; }
.registration-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--text); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid rgba(38, 198, 165, .45); border-radius: 11px; background: rgba(38, 198, 165, .12); color: var(--accent); font-size: 17px; font-weight: 900; }
.registration-brand > span:last-child { display: grid; gap: 2px; }
.registration-brand strong { font-size: 12px; letter-spacing: .12em; }
.registration-brand small { color: var(--muted); font-size: 8px; letter-spacing: .1em; }
.registration-shell { display: grid; grid-template-columns: minmax(320px, .72fr) minmax(600px, 1.28fr); align-items: start; min-width: 0; gap: clamp(36px, 6vw, 88px); margin-top: 50px; }
.registration-guide { position: sticky; top: 34px; min-width: 0; padding: 42px 12px 0; }
.registration-guide h1 { max-width: 500px; margin: 10px 0 18px; font-size: clamp(36px, 4.4vw, 59px); line-height: 1.12; letter-spacing: -.05em; }
.registration-guide > p:not(.eyebrow) { max-width: 480px; margin: 0; color: var(--muted); line-height: 1.75; font-size: 15px; }
.registration-guide ol { display: grid; gap: 18px; margin: 38px 0 0; padding: 0; list-style: none; }
.registration-guide li { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 13px; }
.registration-guide li > span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid var(--line); border-radius: 9px; background: rgba(20, 43, 68, .68); color: var(--accent); font-size: 11px; font-weight: 900; }
.registration-guide li div { display: grid; gap: 3px; }
.registration-guide li strong { font-size: 13px; }
.registration-guide li small { color: var(--muted); font-size: 10px; }
.privacy-contact { display: grid; gap: 4px; margin-top: 38px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(8, 23, 39, .6); }
.privacy-contact span { color: var(--muted); font-size: 9px; font-weight: 800; }
.privacy-contact strong { font-size: 11px; }
.signup-card { display: grid; min-width: 0; gap: 0; overflow: hidden; border-radius: 20px; background: rgba(14, 29, 47, .96); }
.simple-signup-card { margin-top: 28px; }
.simple-signup-head { padding: 27px 30px 23px; border-bottom: 1px solid var(--line); background: rgba(18, 40, 63, .55); }
.simple-signup-head h1 { margin: 0; font-size: 28px; }
.simple-signup-head p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.signup-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 28px 30px 24px; border-bottom: 1px solid var(--line); background: rgba(18, 40, 63, .65); }
.signup-card-head h2 { margin: 0; font-size: 27px; }
.signup-card-head p:last-child { margin: 6px 0 0; color: var(--muted); font-size: 11px; }
.signup-card-head > a { padding: 8px 11px; border: 1px solid var(--line); border-radius: 9px; color: #b8cbdc; font-size: 10px; font-weight: 800; }
.signup-section { display: grid; min-width: 0; gap: 15px; padding: 24px 30px; border-bottom: 1px solid var(--line); }
.signup-section > h2 { margin: 0 0 2px; color: #dbe9f5; font-size: 14px; }
.signup-section-title { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px; margin-bottom: 2px; }
.signup-section-title > span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 800; }
.signup-section-title > div { display: grid; gap: 2px; }
.signup-section-title strong { font-size: 13px; }
.signup-section-title small { color: var(--muted); font-size: 9px; font-weight: 600; }
.signup-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.contact-type-options { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.contact-type-options label { position: relative; cursor: pointer; }
.contact-type-options input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contact-type-options label > span { display: grid; gap: 3px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #0a192a; transition: border-color .2s, background .2s; }
.contact-type-options label > span small { color: var(--muted); font-size: 9px; }
.contact-type-options input:checked + span { border-color: rgba(38, 198, 165, .65); background: rgba(38, 198, 165, .09); }
.contact-type-options input:focus-visible + span { box-shadow: 0 0 0 3px rgba(38, 198, 165, .13); }
.contact-panel { display: grid; gap: 10px; }
.action-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.action-input button { min-width: 124px; padding: 10px 12px; font-size: 10px; }
.contact-notice { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 9px; background: rgba(90, 151, 255, .07); color: #8fa9be; font-size: 9px; line-height: 1.55; }
.contact-notice > span { display: grid; place-items: center; width: 17px; height: 17px; border: 1px solid rgba(90, 151, 255, .25); border-radius: 50%; color: #8eb9ff; font-weight: 900; }
#email-availability-note.warning { color: #f2c56f; }
.verified-state { display: flex; align-items: center; gap: 8px; padding: 11px 13px; border: 1px solid rgba(38, 198, 165, .28); border-radius: 9px; background: rgba(38, 198, 165, .08); color: #68dbc2; font-size: 11px; }
.verified-state > span { display: grid; place-items: center; width: 19px; height: 19px; border-radius: 50%; background: var(--accent); color: #05251f; font-size: 10px; font-weight: 900; }
.consent-section { border-bottom: 0; }
.simple-signup-card .consent-section { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.consent-check { grid-template-columns: auto 1fr; align-items: center; gap: 11px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7, 19, 32, .55); cursor: pointer; }
.consent-check input { width: 18px; height: 18px; min-height: 18px; margin: 0; padding: 0; accent-color: var(--accent); }
.consent-check > span { display: flex; align-items: center; min-height: 18px; }
.consent-check strong { display: inline-flex; align-items: center; line-height: 1.2; font-size: 11px; }
.consent-check em { margin-left: 4px; color: var(--accent); font-size: 9px; font-style: normal; }
.consent-check small { color: var(--muted); font-size: 9px; font-weight: 600; line-height: 1.5; }
.privacy-detail-link { justify-self: end; color: #84a9c4; font-size: 10px; font-weight: 700; }
.privacy-detail-link:hover { color: var(--accent); }
.signup-message { min-height: 18px; margin: 0; padding: 0 30px; line-height: 1.5; }
.signup-submit { min-height: 48px; margin: 16px 30px 28px; }
.completion-page { display: grid; align-content: center; justify-items: start; max-width: 900px; padding-bottom: 90px; }
.completion-card { width: min(620px, 100%); margin: 42px auto 0; padding: 48px; text-align: center; }
.simple-registration.completion-page { max-width: 720px; }
.simple-registration .completion-card { padding: 44px; }
.simple-registration .completion-button { margin-top: 28px; }
.completion-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 20px; border-radius: 18px; background: rgba(38, 198, 165, .14); color: var(--accent); font-size: 24px; font-weight: 900; }
.completion-card h1 { margin: 0; font-size: 31px; }
.completion-card > p:not(.eyebrow) { max-width: 480px; margin: 13px auto 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.approval-flow { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: center; gap: 9px; margin: 31px 0; }
.approval-flow > span { display: grid; place-items: center; gap: 5px; min-height: 70px; border: 1px solid var(--line); border-radius: 11px; color: #6f879c; font-size: 12px; }
.approval-flow strong { color: #9cb0c2; font-size: 9px; }
.approval-flow > span.done { border-color: rgba(38, 198, 165, .3); color: var(--accent); }
.approval-flow > span.current { border-color: rgba(255, 196, 87, .3); color: #f2c56f; }
.approval-flow > i { width: 12px; height: 1px; background: var(--line); }
.completion-button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border-radius: 10px; font-weight: 800; }
.privacy-page { min-height: 100vh; padding-bottom: 80px; }
.privacy-header { display: flex; align-items: center; justify-content: space-between; width: min(1040px, calc(100% - 48px)); min-height: 92px; margin: auto; }
.privacy-close { padding: 9px 12px; border-radius: 9px; font-size: 10px; font-weight: 800; }
.privacy-document { width: min(880px, calc(100% - 48px)); margin: 22px auto 0; padding: 46px 52px; border: 1px solid var(--line); border-radius: 20px; background: rgba(14, 29, 47, .94); box-shadow: 0 24px 70px rgba(0, 0, 0, .24); }
.privacy-document > h1 { margin: 0; font-size: clamp(30px, 4vw, 43px); letter-spacing: -.04em; }
.privacy-version { margin: 9px 0 0; color: #7890a6; font-size: 10px; }
.privacy-lead { margin: 24px 0 34px; padding: 18px 20px; border-left: 3px solid var(--accent); background: rgba(38, 198, 165, .06); color: #b9ccdc; line-height: 1.75; font-size: 13px; }
.privacy-document > section { display: grid; grid-template-columns: 36px 1fr; gap: 16px; padding: 25px 0; border-top: 1px solid var(--line); }
.privacy-document > section > span { color: var(--accent); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; font-weight: 800; }
.privacy-document h2 { margin: -4px 0 10px; font-size: 16px; }
.privacy-document section p, .privacy-document li { color: #9eb3c5; font-size: 12px; line-height: 1.75; }
.privacy-document section p { margin: 0; }
.privacy-document ul { margin: 0; padding-left: 19px; }
.privacy-note { margin-top: 12px !important; padding: 11px 13px; border-radius: 9px; background: rgba(90, 151, 255, .07); }
.privacy-footer-note { margin-top: 20px; padding: 18px 20px; border: 1px solid rgba(255, 196, 87, .2); border-radius: 12px; background: rgba(255, 196, 87, .05); }
.privacy-footer-note strong { color: #e7c47f; font-size: 12px; }
.privacy-footer-note p { margin: 7px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }

@media (max-width: 900px) {
  .login-layout { grid-template-columns: 1fr; gap: 30px; padding: 60px 0; }.brand-panel h1 { font-size: 46px; }.status-line { margin-top: 24px; }
  .server-grid { grid-template-columns: 1fr 1fr; }
  .admin-hero { grid-template-columns: 1fr; }
  .admin-summary { width: 100%; }
  .setup-grid { grid-template-columns: 1fr; }
  .managed-server-card { grid-template-columns: 1fr auto; }
  .server-endpoint { grid-column: 1; }
  .managed-server-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; }
  .registration-shell { grid-template-columns: 1fr; margin-top: 32px; }
  .registration-guide { position: static; display: grid; grid-template-columns: 1fr auto; gap: 20px 30px; padding: 20px 4px 0; }
  .registration-guide h1, .registration-guide > p:not(.eyebrow) { grid-column: 1; }
  .registration-guide ol { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .privacy-contact { display: none; }
}

@media (max-width: 600px) {
  .login-layout, .content { width: min(100% - 30px, 1180px); }.login-layout { padding: 32px 0; }.brand-panel h1 { font-size: clamp(28px, 9vw, 36px); }.brand-copy, .status-line { display: none; }.login-card { padding: 25px; }
  .topbar { align-items: center; min-height: 88px; padding: 16px 13px; }.topbar .eyebrow, .user-actions > span, .user-actions > a.secondary { display: none; }.topbar h1 { font-size: 20px; white-space: nowrap; }.user-actions { gap: 6px; }.user-actions button, .user-actions a { padding: 9px 10px; font-size: 11px; white-space: nowrap; }
  .content { padding-top: 34px; }.server-grid { grid-template-columns: 1fr; }.section-heading { align-items: flex-start; }.inline-fields, .user-fields, .role-options { grid-template-columns: 1fr; }
  .admin-content { width: min(100% - 24px, 1280px); }
  .admin-quick-stats { display: grid; grid-template-columns: repeat(3, 1fr); }
  .admin-quick-stats > span { display: grid; justify-items: center; gap: 3px; padding: 9px 5px; text-align: center; }
  .admin-quick-stats strong { margin: 0; }
  .setup-actions { grid-template-columns: 1fr; }
  .admin-hero { padding: 22px 19px; }
  .admin-summary { grid-template-columns: 1fr; }
  .admin-summary > div { grid-template-columns: 1fr auto; align-items: center; min-width: 0; padding: 12px 14px; border-top: 1px solid var(--line); border-left: 0; }
  .admin-summary > div:first-child { border-top: 0; }
  .admin-summary small { grid-column: 1; }
  .admin-summary strong { grid-column: 2; grid-row: 1 / span 2; }
  .setup-card { padding: 20px 17px; }
  .slug-field { grid-template-columns: 1fr; }
  .slug-field span { padding: 9px 13px; border-top: 1px solid var(--line); border-left: 0; }
  .management-heading { align-items: stretch; flex-direction: column; }
  .access-card-head { align-items: stretch; flex-direction: column; }
  .access-head-actions { justify-content: stretch; width: 100%; }
  .access-head-actions button { flex: 1; }
  .permission-selector { grid-template-columns: 1fr; }
  .permission-selector-create { max-height: none; overflow: visible; padding-right: 0; }
  .managed-server-card { grid-template-columns: 1fr; gap: 16px; }
  .managed-server-actions { grid-column: 1; grid-row: auto; flex-direction: row; justify-content: stretch; }
  .server-pane .managed-server-card { grid-template-columns: 1fr; }
  .server-pane .server-endpoint { grid-column: 1; }
  .server-pane .managed-server-actions { grid-column: 1; grid-row: auto; flex-direction: row; }
  .managed-server-actions button { flex: 1; width: auto; min-width: 0; }
  .split-actions { grid-template-columns: 1fr 1fr; }.split-actions span { display: none; }
  .registration-page { width: min(100% - 24px, 1240px); padding-top: 18px; }
  .simple-registration { width: min(100% - 24px, 720px); }
  .simple-signup-card { margin-top: 20px; }
  .simple-signup-head { padding: 23px 18px 20px; }
  .simple-signup-head h1 { font-size: 24px; }
  .registration-shell { gap: 24px; margin-top: 24px; }
  .registration-guide { display: block; padding: 16px 2px 0; }
  .registration-guide h1 { margin-bottom: 12px; font-size: 32px; }
  .registration-guide h1 { overflow-wrap: anywhere; }
  .registration-guide > p:not(.eyebrow) { font-size: 12px; }
  .registration-guide ol { display: none; }
  .signup-card-head, .signup-section { padding-right: 18px; padding-left: 18px; }
  .simple-signup-card .consent-section { grid-template-columns: 1fr; }
  .signup-card label, .signup-card input, .contact-panel, .consent-check > span { min-width: 0; }
  .signup-card label:not(.permission-option, .role-option) > span:first-child { flex-wrap: wrap; }
  .signup-card-head h2 { font-size: 23px; }
  .signup-two-fields, .contact-type-options { grid-template-columns: 1fr; }
  .action-input { grid-template-columns: 1fr; }
  .action-input button { min-height: 42px; width: 100%; }
  .signup-message { padding: 0 18px; }
  .signup-submit { margin-right: 18px; margin-left: 18px; }
  .completion-page { align-content: start; padding-top: 18px; }
  .completion-card { margin-top: 28px; padding: 34px 20px; }
  .completion-card h1 { font-size: 25px; }
  .approval-flow { grid-template-columns: 1fr; }
  .approval-flow > i { width: 1px; height: 10px; margin: auto; }
  .privacy-header { width: min(100% - 24px, 1040px); min-height: 78px; }
  .privacy-header .registration-brand small { display: none; }
  .privacy-document { width: min(100% - 24px, 880px); margin-top: 12px; padding: 31px 20px; }
  .privacy-document > section { grid-template-columns: 27px 1fr; gap: 9px; }
}

/* Light interface system */
.background-grid {
  opacity: .35;
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 62%);
}

.card {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-md);
  backdrop-filter: none;
}

.eyebrow { color: var(--accent); }
.status-line { color: #52647a; }
.status-line span,
.server-state { background: var(--success); box-shadow: 0 0 0 4px rgba(15, 138, 98, .12); }
.muted,
.section-heading p,
.form-help { color: var(--muted); }

label,
fieldset > legend { color: #34445a; }
input {
  min-height: 44px;
  border-color: var(--line-strong);
  background: #fff;
  color: var(--text);
}
input::placeholder { color: #9aa8b8; }
input:hover { border-color: #aebdcd; }
input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

button,
.secondary {
  min-height: 42px;
  border-radius: 10px;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
}
button:not(:disabled):active,
.secondary:active { transform: translateY(1px); }
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .2);
  outline-offset: 2px;
}
.primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 5px 14px rgba(37, 99, 235, .22);
}
.primary:hover { background: var(--accent-strong); }
.secondary {
  border: 1px solid #b8c6d8;
  background: #fff;
  color: #2d4059;
}
.secondary:hover {
  border-color: #8aabdf;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.ghost {
  border: 1px solid #c6d1de;
  background: #fff;
  color: #43546a;
}
.ghost:hover {
  border-color: #9caec2;
  background: #f4f7fa;
  color: #172033;
}
.danger {
  border-color: #f3b4b4;
  background: #fff5f5;
  color: var(--danger);
}
.danger:hover { background: #fee7e7; }

.login-layout { gap: clamp(48px, 8vw, 112px); }
.brand-panel h1 { color: #111b2e; }
.login-card,
.form-card { gap: 20px; }
.login-card { border-top: 4px solid var(--accent); }
.login-signup { padding-top: 18px; }
.login-signup a { color: var(--accent-strong); }
.message.success { color: var(--success); }

.password-dialog {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 80px rgba(15, 23, 42, .24);
}
.password-dialog::backdrop {
  background: rgba(30, 41, 59, .42);
  backdrop-filter: blur(3px);
}

.topbar {
  min-height: 94px;
  padding: 20px max(24px, calc((100vw - 1280px) / 2));
  border-color: var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 1px 0 rgba(22, 34, 51, .03);
  backdrop-filter: blur(14px);
}
.topbar h1 { color: #111b2e; }
.user-actions > button,
.user-actions > .portal-home-link,
.user-actions > .management-menu > summary {
  height: 42px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
.management-menu {
  position: relative;
  display: flex;
  align-items: center;
}
.management-menu > summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  list-style: none;
  cursor: pointer;
  user-select: none;
}
.management-menu > summary::marker { content: ""; }
.management-menu > summary::-webkit-details-marker { display: none; }
.management-label {
  display: inline-flex;
  align-items: center;
}
.management-chevron {
  width: 14px;
  height: 14px;
  overflow: visible;
  color: #758399;
  transition: transform .18s;
}
.management-chevron path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.management-menu[open] > summary {
  border-color: #8aabdf;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.management-menu[open] > summary .management-chevron {
  color: var(--accent-strong);
  transform: rotate(180deg);
}
.management-menu-popover {
  position: absolute;
  z-index: 100;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 184px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .16);
}
.management-menu-popover a {
  padding: 11px 12px;
  border-radius: 8px;
  color: #34445a;
  font-size: 12px;
  font-weight: 750;
}
.management-menu-popover a:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.content {
  width: min(1280px, calc(100% - 48px));
  padding: 40px 0 72px;
}
.section-heading {
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.count {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #52647a;
  font-weight: 700;
}

.server-grid { gap: 20px; }
.server-card {
  min-height: 132px;
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.server-card:hover {
  transform: translateY(-2px);
  border-color: #8eb4f4;
  background: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .11);
}
.server-icon { background: var(--accent-soft); }
.server-icon span { background: var(--accent); }
.open-arrow {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
}
.site-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.site-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 240px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.site-card:hover {
  transform: translateY(-3px);
  border-color: #8eb4f4;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .12);
}
.site-card-top,
.site-card-stats,
.site-client-heading,
.site-client-open {
  display: flex;
  align-items: center;
}
.site-card-top { justify-content: space-between; }
.site-icon {
  position: relative;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  width: 48px;
  height: 48px;
  padding: 12px;
  border-radius: 13px;
  background: var(--accent-soft);
}
.site-icon span {
  width: 6px;
  border-radius: 2px 2px 0 0;
  background: var(--accent);
}
.site-icon span:nth-child(1) { height: 13px; }
.site-icon span:nth-child(2) { height: 24px; }
.site-icon span:nth-child(3) { height: 18px; }
.site-card-copy {
  align-self: end;
  padding: 24px 0 20px;
}
.site-card-copy .site-code {
  margin: 0 0 7px;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-card-copy h3 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 21px;
}
.site-card-copy > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.site-card-stats {
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid #edf1f6;
}
.site-card-stats span {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f2f5f8;
  color: #617087;
  font-size: 10px;
}
.site-card-stats span.has-online {
  background: var(--state-on-soft);
  color: var(--state-on);
}
.site-card-stats strong {
  margin-right: 2px;
  font-size: 12px;
}
.central-offline-notice {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 22px;
  padding: 15px 17px;
  border: 1px solid #f1b6b6;
  border-radius: 13px;
  background: #fff5f5;
  color: #8d2525;
}
.central-offline-notice > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #cf3434;
  color: #fff;
  font-weight: 900;
}
.central-offline-notice strong { display: block; font-size: 13px; }
.central-offline-notice p { margin: 3px 0 0; color: #9d4d4d; font-size: 11px; }

.system-page-content { display: grid; gap: 18px; }
.system-tabs {
  display: inline-flex;
  justify-self: start;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}
.system-tabs button {
  min-height: 38px;
  padding: 0 20px;
  border: 0;
  background: transparent;
  color: #66768b;
  box-shadow: none;
  font-weight: 800;
}
.system-tabs button.is-active { background: var(--accent); color: #fff; }
.system-panel {
  display: none;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.system-panel.is-active { display: block; }
.system-panel-heading,
.system-panel-actions,
.health-card-head,
.audit-pagination,
.audit-pagination > div { display: flex; align-items: center; }
.system-panel-heading { justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.system-panel-heading h2 { margin: 0 0 5px; color: #172033; font-size: 22px; }
.system-panel-heading p { margin: 0; color: var(--muted); font-size: 12px; }
.system-panel-actions { gap: 9px; }
.system-overall {
  padding: 8px 11px;
  border-radius: 999px;
  background: #fff2df;
  color: #a65b08;
  font-size: 11px;
  font-weight: 850;
}
.system-overall.ok { background: var(--state-on-soft); color: var(--state-on); }
.system-overall.checking { background: #eef2f6; color: #66768b; }
.health-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.health-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfcfe;
}
.health-card.ok { border-color: #a9ddca; background: #f3fbf8; }
.health-card.error { border-color: #f1b6b6; background: #fff5f5; }
.health-card.unconfigured,
.health-card.pending { border-color: #ead1a0; background: #fffaf0; }
.health-card-head { gap: 9px; }
.health-card-head h3 { margin: 0; color: #27364a; font-size: 14px; }
.health-card-head small { margin-left: auto; color: #718096; }
.health-indicator { width: 9px; height: 9px; border-radius: 50%; background: #d18a22; }
.health-card.ok .health-indicator { background: var(--state-on); }
.health-card.error .health-indicator { background: var(--danger); }
.health-card > p { min-height: 36px; margin: 16px 0 0; color: #5b6b80; font-size: 11px; line-height: 1.55; }
.health-card dl { display: grid; gap: 7px; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid rgba(40, 70, 100, .1); }
.health-card dl > div { display: flex; justify-content: space-between; gap: 8px; }
.health-card dt { color: #7b899b; font-size: 10px; }
.health-card dd { margin: 0; color: #34445a; font-size: 10px; font-weight: 750; }
.system-checked-at { margin: 17px 0 0; color: #8996a7; font-size: 10px; text-align: right; }
.system-loading { padding: 55px; color: var(--muted); text-align: center; }
.audit-action-filter {
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fff;
  color: #34445a;
  font: inherit;
  font-size: 12px;
}
.system-audit-table-wrap { max-height: 550px; }
.system-audit-table { min-width: 1030px; }
.system-audit-table th:nth-child(1) { width: 150px; }
.system-audit-table th:nth-child(2) { width: 175px; }
.system-audit-table th:nth-child(3) { width: 150px; }
.system-audit-table th:nth-child(4) { width: 130px; }
.system-audit-table th:nth-child(6) { width: 70px; }
.audit-action { display: block; color: #27364a; font-size: 12px; }
.audit-detail { max-width: 360px; overflow-wrap: anywhere; color: #5b6b80; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 10px; }
.audit-pagination { justify-content: space-between; gap: 12px; margin-top: 16px; color: #718096; font-size: 11px; }
.audit-pagination > div { gap: 7px; }
.audit-pagination button { min-height: 36px; padding: 0 14px; }
.system-fatal { display: grid; justify-items: start; gap: 12px; margin: 15vh auto; padding: 30px; border: 1px solid var(--line); border-radius: 16px; background: #fff; }
.system-fatal p { margin: 0; color: var(--muted); }
.dashboard-back-row {
  margin-bottom: 18px;
}
.section-kicker {
  margin: 0 0 5px !important;
  color: var(--accent) !important;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.site-client-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.site-client-card {
  display: grid;
  gap: 20px;
  min-width: 0;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.site-client-card:hover {
  transform: translateY(-2px);
  border-color: #8eb4f4;
  box-shadow: 0 14px 30px rgba(37, 99, 235, .11);
}
.site-client-heading {
  min-width: 0;
  gap: 12px;
}
.site-client-heading > div {
  min-width: 0;
  margin-right: auto;
}
.site-client-heading h3 {
  margin: 0 0 5px;
  overflow: hidden;
  color: #172033;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-client-heading code {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-client-state {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid #ef9da3;
  border-radius: 12px;
  background: radial-gradient(circle, var(--state-off) 0 5px, var(--state-off-soft) 6px);
}
.site-client-state.online {
  border-color: #77cfae;
  background: radial-gradient(circle, var(--state-on) 0 5px, var(--state-on-soft) 6px);
}
.client-state-label {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--state-off-soft);
  color: var(--state-off-strong);
  font-size: 9px;
  font-weight: 800;
}
.client-state-label.online {
  background: var(--state-on-soft);
  color: var(--state-on);
}
.site-client-meta {
  display: grid;
  grid-template-columns: .75fr 1.35fr .6fr;
  gap: 8px;
  margin: 0;
}
.site-client-meta > div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: #f5f7fa;
}
.site-client-meta dt {
  margin-bottom: 4px;
  color: #7b889b;
  font-size: 8px;
  font-weight: 800;
}
.site-client-meta dd {
  margin: 0;
  overflow: hidden;
  color: #34445a;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-client-open {
  justify-content: flex-end;
  gap: 8px;
  padding-top: 15px;
  border-top: 1px solid #edf1f6;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}
.site-client-open span { font-size: 16px; }
.empty-state,
.management-empty {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, .7);
}
.empty-state strong,
.management-empty strong { color: var(--text); }

.back-link {
  min-height: 38px;
  margin-bottom: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: #43546a;
}
.back-link:hover {
  border-color: #9eb8de;
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.admin-hero {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.admin-summary {
  border-color: var(--line);
  background: #f8fafc;
}
.admin-summary > div { border-color: var(--line); }
.admin-summary small { color: #758399; }
.setup-card { box-shadow: var(--shadow-md); }
.step-number {
  border-color: #a9c4f1;
  background: var(--accent-soft);
  color: var(--accent);
}
.admin-content {
  width: min(1280px, calc(100% - 48px));
  padding-top: 28px;
}
.admin-management-tabs {
  border-color: var(--line);
  background: #edf2f7;
  box-shadow: var(--shadow-sm);
}
.admin-management-tab {
  border: 1px solid transparent;
  color: #607087;
  box-shadow: none;
}
.admin-management-tab:hover {
  background: rgba(255, 255, 255, .58);
  color: var(--text);
}
.admin-management-tab.is-active {
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.admin-management-tab > strong {
  background: #dfe7f0;
  color: #52647a;
}
.admin-management-tab.is-active > strong {
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.admin-management-tab > strong.has-pending {
  background: #fff3d6;
  color: #9a5a08;
}
.admin-pane {
  padding: 24px;
  border-color: var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.pane-heading {
  min-height: 42px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.pane-heading h2 { margin-right: auto; color: #111b2e; }
.pane-heading > span {
  padding: 7px 10px;
  background: #f1f5f9;
  color: #52647a;
  font-size: 11px;
}
.pane-heading > span strong { color: var(--accent-strong); }
.pane-heading > span.has-pending {
  background: #fff7e6;
  color: #9a5a08;
}
.pane-heading > span.has-pending strong { color: #9a5a08; }
.admin-quick-stats { gap: 10px; }
.admin-quick-stats > span {
  min-width: 84px;
  padding: 9px 12px;
  border-color: var(--line);
  background: #f8fafc;
  color: #596b80;
  font-size: 11px;
}
.admin-quick-stats strong {
  color: #172033;
  font-size: 14px;
}
.admin-quick-stats .has-pending {
  border-color: #f2cf91;
  background: #fff9ed;
  color: #9a5a08;
}

.setup-actions { gap: 12px; }
.setup-disclosure {
  border-color: #c9d3df;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(39, 55, 76, .1);
}
.setup-disclosure > summary {
  min-height: 56px;
  padding: 0 16px;
  background: #465a74;
  color: #fff;
}
.setup-disclosure > summary:hover { background: #394b63; }
.setup-disclosure[open] > summary { background: #394b63; }
.setup-disclosure .add-button-icon {
  border-color: rgba(255, 255, 255, .68);
  background: rgba(255, 255, 255, .08);
  color: #fff;
}
.setup-form {
  gap: 16px;
  padding: 20px;
  border-color: var(--line);
  background: #fff;
}
.slug-field {
  border-color: var(--line-strong);
  background: #fff;
}
.slug-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.slug-field span {
  border-color: var(--line);
  color: #66758a;
  background: #f8fafc;
}
.endpoint-preview,
.dialog-server-address {
  border-color: #bfd3f7;
  background: var(--accent-soft);
}
.endpoint-preview span,
.dialog-server-address span { color: #5d7190; }
.endpoint-preview strong,
.dialog-server-address strong { color: #1f4f9d; }
.full-button { min-height: 46px; }

.role-option > span,
.permission-option,
.contact-type-options label > span {
  border-color: var(--line);
  background: #fff;
}
.role-option > span:hover,
.permission-option:hover,
.contact-type-options label > span:hover {
  border-color: #9db8e1;
  background: #f8fbff;
}
.role-option input:checked + span,
.permission-option:has(input:checked),
.contact-type-options input:checked + span {
  border-color: #80aaf0;
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .08);
}
.role-option input:focus-visible + span,
.permission-option:has(input:focus-visible),
.contact-type-options input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}
.permission-fieldset {
  padding: 16px;
  border-color: var(--line);
  background: #f8fafc;
}
.permission-title > strong { color: #26364b; }
.permission-mark {
  border-color: #9cacc0;
  background: #fff;
}
.permission-option input:checked + .permission-mark {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.permission-copy strong { font-size: 12px; }
.permission-copy small { color: #718096; font-size: 10px; }
.permission-empty strong { color: #43546a; }

.access-list,
.registered-list {
  gap: 12px;
  margin-top: 16px;
}
.access-card,
.managed-server-card {
  border-color: var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.access-card.has-changes {
  border-color: #8eb4f4;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .08);
}
.access-card-head {
  min-height: 72px;
  padding: 16px;
  border-color: var(--line);
  background: #fff;
}
.access-card-body {
  gap: 14px;
  padding: 16px;
}
.user-identity p { font-size: 11px; }
.access-head-actions { gap: 8px; }
.access-card.has-changes .save-access {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .18);
}
.compact-button {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 11px;
}

.user-avatar {
  background: #e8f0fd;
  color: #2454a6;
}
.identity-line h3 { color: #1f2a3d; }
.management-table-wrap {
  overflow-x: auto;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.management-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  color: #34445a;
  font-size: 11px;
}
.user-management-table { min-width: 1080px; }
.client-management-table { min-width: 1230px; }
.pending-client-table { min-width: 980px; }
.user-management-table th:nth-child(1) { width: 56px; }
.user-management-table th:nth-child(2) { width: 145px; }
.user-management-table th:nth-child(3) { width: 135px; }
.user-management-table th:nth-child(4) { width: 195px; }
.user-management-table th:nth-child(5) { width: 100px; }
.user-management-table th:nth-child(6) { width: 105px; }
.user-management-table th:nth-child(7) { width: 160px; }
.user-management-table th:nth-child(8) { width: 184px; }
.client-management-table th:nth-child(1) { width: 56px; }
.client-management-table th:nth-child(2) { width: 160px; }
.client-management-table th:nth-child(3) { width: 155px; }
.client-management-table th:nth-child(4) { width: 190px; }
.client-management-table th:nth-child(5) { width: 105px; }
.client-management-table th:nth-child(6) { width: 110px; }
.client-management-table th:nth-child(7) { width: 170px; }
.client-management-table th:nth-child(8) { width: 90px; }
.client-management-table th:nth-child(9) { width: 194px; }
.pending-client-table th:nth-child(1) { width: 56px; }
.pending-client-table th:nth-child(2) { width: 190px; }
.pending-client-table th:nth-child(3) { width: 110px; }
.pending-client-table th:nth-child(4) { width: 170px; }
.pending-client-table th:nth-child(5) { width: 170px; }
.pending-client-table th:nth-child(6) { width: 100px; }
.pending-client-table th:nth-child(7) { width: 184px; }
.management-table th {
  height: 46px;
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-strong);
  background: #f1f5f9;
  color: #52647a;
  font-size: 10px;
  font-weight: 800;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}
.management-table td {
  height: 62px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
.management-table tbody tr:last-child td { border-bottom: 0; }
.management-table tbody tr:hover { background: #f8fbff; }
.management-table tbody tr.is-disabled { background: #fbfcfd; color: #7c899a; }
.management-table tbody tr.is-disabled:hover { background: #f5f7fa; }
.management-table .table-no {
  text-align: center;
}
.user-management-table :is(th, td):nth-child(5),
.user-management-table :is(th, td):nth-child(6),
.user-management-table :is(th, td):nth-child(7),
.user-management-table :is(th, td):nth-child(8),
.client-management-table :is(th, td):nth-child(5),
.client-management-table :is(th, td):nth-child(6),
.client-management-table :is(th, td):nth-child(8),
.client-management-table :is(th, td):nth-child(9),
.pending-client-table :is(th, td):nth-child(3),
.pending-client-table :is(th, td):nth-child(4),
.pending-client-table :is(th, td):nth-child(5),
.pending-client-table :is(th, td):nth-child(6),
.pending-client-table :is(th, td):nth-child(7) {
  text-align: center;
}
.table-name-cell {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.table-name-cell > strong:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-name-cell > .table-status { flex: 0 0 auto; }
.table-primary,
.table-secondary {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.table-primary { color: #26364b; font-weight: 700; }
.table-secondary {
  margin-top: 4px;
  color: #758399;
  font-size: 9px;
}
.table-code {
  color: #40536b;
  font-weight: 700;
  white-space: nowrap;
}
.table-status {
  color: #52647a;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}
.table-status.admin { color: #2454a6; }
.table-status.pending { color: #9a5a08; }
.table-status.approved,
.table-status.active,
.table-status.online { color: #087452; }
.table-status.inactive,
.table-status.offline { color: #c33d46; }
.table-status.disabled { color: #6b7788; }
.table-placeholder { color: #9aa7b6; }
.table-permission-summary { color: #52647a; font-weight: 700; white-space: nowrap; }
.table-date { white-space: nowrap; }
.table-sequence { text-align: center; font-variant-numeric: tabular-nums; }
.table-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.table-empty {
  height: 120px !important;
  color: var(--muted);
  text-align: center;
}

.permission-dialog { width: min(680px, calc(100% - 30px)); }
.permission-dialog .form-card {
  max-height: calc(100vh - 48px);
  padding: 30px;
}
.permission-dialog-copy {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.permission-dialog-copy strong { color: #26364b; }
.permission-dialog-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 350px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}
.registration-dialog { width: min(620px, calc(100% - 30px)); }
.registration-dialog .form-card {
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 30px;
}
.registration-dialog select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--text);
  font: inherit;
}
.registration-dialog select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13);
}

.managed-server-card {
  position: relative;
  gap: 16px;
  padding: 16px;
  transition: border-color .18s, background .18s, box-shadow .18s;
}
.managed-server-card:hover {
  border-color: #a9bed9;
  background: #f8fbff;
  box-shadow: 0 8px 22px rgba(28, 48, 76, .1);
}
.server-card-edit {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
}
.server-card-edit:hover { background: transparent; }
.server-card-edit:focus-visible {
  outline: 0;
  box-shadow: inset 0 0 0 3px rgba(37, 99, 235, .2);
}
.managed-server-main,
.server-endpoint { pointer-events: none; }
.managed-server-actions { position: relative; z-index: 2; }
.server-status-icon {
  border-color: #7dd4ad;
  background: radial-gradient(circle, var(--state-on) 0 5px, var(--state-on-soft) 6px);
  box-shadow: inset 0 0 0 1px rgba(11, 143, 91, .08);
}
.server-status-icon.inactive {
  border-color: #f09a9f;
  background: radial-gradient(circle, var(--state-off) 0 5px, var(--state-off-soft) 6px);
  box-shadow: inset 0 0 0 1px rgba(220, 63, 71, .08);
}
.server-public-url {
  color: #2563a9;
  font-size: 11px;
}
.server-public-url:hover { color: var(--accent-strong); }
.server-endpoint span { font-size: 10px; }
code { color: #34445a; font-size: 12px; }
.managed-server-actions { gap: 8px; }
.managed-server-actions button { font-size: 12px; }
.server-pane .managed-server-actions .toggle-server {
  flex: 1;
  min-height: 78px;
}
.pause-button {
  border: 1px solid var(--state-off-strong);
  background: var(--state-off);
  color: #fff;
  box-shadow: 0 5px 13px rgba(220, 63, 71, .24);
}
.pause-button:hover {
  border-color: #9f252c;
  background: var(--state-off-strong);
}
.toggle-server.secondary {
  border-color: var(--state-on-strong);
  background: var(--state-on);
  color: #fff;
  box-shadow: 0 5px 13px rgba(11, 143, 91, .24);
}
.toggle-server.secondary:hover {
  border-color: #045f3a;
  background: var(--state-on-strong);
  color: #fff;
}

.admin-toast {
  border-color: #f0aaaa;
  background: #fff;
  color: var(--danger);
  box-shadow: 0 16px 45px rgba(15, 23, 42, .18);
}
.admin-toast.success {
  border-color: #8bd4b9;
  background: #f0fbf7;
  color: #087452;
}

.registration-brand { color: var(--text); }
.brand-mark {
  border-color: #abc5f1;
  background: var(--accent-soft);
  color: var(--accent);
}
.registration-guide li > span {
  border-color: #c7d6e8;
  background: #fff;
  color: var(--accent);
}
.privacy-contact {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.signup-card {
  border-color: var(--line);
  background: #fff;
}
.simple-signup-head,
.signup-card-head {
  border-color: var(--line);
  background: #f8fafc;
}
.signup-card-head > a {
  border-color: #c6d1de;
  background: #fff;
  color: #43546a;
}
.signup-section { border-color: var(--line); }
.signup-section > h2 { color: #26364b; }
.contact-notice {
  border: 1px solid #cfdef3;
  background: #f3f7fd;
  color: #596f8b;
}
.contact-notice > span {
  border-color: #9eb9e0;
  color: var(--accent);
}
#email-availability-note.warning { color: var(--warning); }
.verified-state {
  border-color: #a9dfcc;
  background: #eefaf5;
  color: #087452;
}
.verified-state > span {
  background: var(--success);
  color: #fff;
}
.consent-check {
  border-color: var(--line);
  background: #f8fafc;
}
.consent-check:hover {
  border-color: #aabbd0;
  background: #f4f8fc;
}
.consent-check em { color: var(--accent-strong); }
.privacy-detail-link { color: #3f5f89; }

.completion-icon {
  background: #e7f7f0;
  color: var(--success);
}
.approval-flow > span { color: #66758a; }
.approval-flow strong { color: #52647a; }
.approval-flow > span.done {
  border-color: #9fd8c3;
  background: #f0faf6;
  color: #087452;
}
.approval-flow > span.current {
  border-color: #edc985;
  background: #fff9ed;
  color: #9a5a08;
}

.privacy-document {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-md);
}
.privacy-version { color: #758399; }
.privacy-lead {
  background: var(--accent-soft);
  color: #43546a;
}
.privacy-document section p,
.privacy-document li { color: #52647a; }
.privacy-note { background: #f3f7fd; }
.privacy-footer-note {
  border-color: #edd19c;
  background: #fff9ed;
}
.privacy-footer-note strong { color: #8f570b; }

@media (max-width: 600px) {
  .login-layout,
  .content,
  .admin-content { width: min(100% - 24px, 1280px); }
  .topbar {
    min-height: 80px;
    padding: 13px 12px;
  }
  .content { padding: 28px 0 52px; }
  .admin-content { padding-top: 16px; }
  .admin-management-tabs { gap: 4px; padding: 4px; }
  .admin-management-tab { min-height: 48px; gap: 7px; padding: 10px 8px; }
  .admin-management-tab > span { font-size: 13px; }
  .admin-pane { padding: 16px; }
  .pane-heading { flex-wrap: wrap; margin-bottom: 14px; }
  .pane-heading h2 { flex: 1 0 calc(100% - 100px); }
  .setup-form,
  .access-card-head,
  .access-card-body,
  .managed-server-card { padding: 14px; }
  .registration-dialog .form-card,
  .permission-dialog .form-card { padding: 22px 18px; }
  .permission-dialog-list { grid-template-columns: 1fr; }
  .server-pane .managed-server-actions .toggle-server { min-height: 44px; }
  .section-heading {
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 14px;
  }
  .login-card { padding: 24px; }
}

/* Shared portal navigation */
.portal-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid #c6d1de;
  border-radius: 10px;
  background: #fff;
  color: #34445a;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .18s;
}
.portal-home-link:hover {
  border-color: #8aabdf;
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: 0 5px 14px rgba(37, 99, 235, .1);
}
.portal-home-link:active { transform: translateY(1px); }

/* Board kiosk login keyboard */
.login-virtual-keyboard[hidden] { display: none; }
.login-virtual-keyboard {
  position: fixed;
  z-index: 1000;
  right: 0;
  bottom: 0;
  left: 0;
  padding: 10px 20px 14px;
  border-top: 1px solid #b8c6d8;
  background: rgba(239, 244, 248, .98);
  box-shadow: 0 -12px 36px rgba(15, 23, 42, .18);
  backdrop-filter: blur(12px);
}
.login-keyboard-head {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 12px;
  min-height: 23px;
  color: #52647a;
  font-size: 10px;
}
.login-keyboard-head strong { color: #172033; font-size: 12px; }
.login-keyboard-rows {
  display: grid;
  width: min(1040px, 100%);
  margin: auto;
  gap: 6px;
}
.login-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
}
.login-keyboard-key {
  flex: 1 1 0;
  min-width: 0;
  max-width: 82px;
  min-height: 45px;
  padding: 6px;
  border: 1px solid #becada;
  border-radius: 8px;
  background: #fff;
  color: #223149;
  box-shadow: 0 2px 4px rgba(15, 23, 42, .08);
  font-size: 15px;
  font-weight: 800;
  touch-action: manipulation;
  user-select: none;
}
.login-keyboard-key:hover { border-color: #8aa4c5; background: #f8fbff; }
.login-keyboard-key:active { background: #e8eef7; transform: translateY(1px); }
.login-keyboard-key.is-wide { flex-grow: 1.35; max-width: 112px; font-size: 12px; }
.login-keyboard-key.is-space { flex-grow: 4; max-width: 310px; font-size: 11px; }
.login-keyboard-key.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.login-keyboard-key.is-submit {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}
.login-keyboard-open .login-layout {
  min-height: calc(100vh - 280px);
  transition: min-height .18s ease;
}

@media (max-width: 900px) {
  .login-keyboard-open .login-layout {
    grid-template-columns: minmax(0, 1fr) minmax(360px, .85fr);
    gap: 28px;
    width: min(100% - 36px, 1180px);
    padding: 12px 0;
  }
  .login-keyboard-open .brand-panel h1 { font-size: 37px; }
  .login-keyboard-open .brand-copy { font-size: 13px; }
  .login-keyboard-open .status-line { margin-top: 20px; }
}

@media (max-width: 680px) {
  .login-virtual-keyboard { padding: 8px 5px 10px; }
  .login-keyboard-head span { display: none; }
  .login-keyboard-row { gap: 3px; }
  .login-keyboard-rows { gap: 4px; }
  .login-keyboard-key { min-height: 42px; padding: 4px 2px; font-size: 13px; }
  .login-keyboard-key.is-wide { font-size: 10px; }
  .login-keyboard-open .login-layout {
    display: block;
    min-height: calc(100vh - 254px);
    padding: 12px 0;
  }
  .login-keyboard-open .brand-panel { display: none; }
}
.portal-home-arrow {
  width: 14px;
  height: 14px;
  overflow: visible;
  color: #52647a;
  transition: color .18s, transform .18s;
}
.portal-home-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portal-home-link:hover .portal-home-arrow {
  color: var(--accent-strong);
  transform: translateX(-1px);
}
.dashboard-home-link {
  width: fit-content;
}

/* Shared management page layout */
.management-page-content {
  width: min(1280px, calc(100% - 48px));
  padding: 34px 0 72px;
}
.management-page-panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.management-page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.management-page-copy {
  min-width: 280px;
}
.management-page-copy .eyebrow {
  margin: 0 0 5px;
}
.management-page-copy h2 {
  margin: 0 0 7px;
  color: #111b2e;
  font-size: 27px;
  letter-spacing: -.025em;
}
.management-page-copy > p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.management-page-side {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 14px;
}
.management-page-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(82px, 1fr));
  gap: 7px;
}
.management-page-summary > span {
  display: grid;
  min-width: 82px;
  gap: 3px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
}
.management-page-summary small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.management-page-summary strong {
  color: #172033;
  font-size: 18px;
}
.management-page-summary > .is-online {
  border-color: #a9dfcc;
  background: #eefaf5;
}
.management-page-summary > .is-online strong { color: #087452; }
.management-page-summary > .is-warning {
  border-color: #f2cf91;
  background: #fff9ed;
}
.management-page-summary > .is-warning strong { color: #9a5a08; }
.management-page-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.management-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 116px;
  min-height: 42px;
  padding: 0 14px;
  white-space: nowrap;
}
.management-create-button > span {
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
}
.management-page-panel > .management-table-wrap {
  margin-top: 20px;
}

/* Client PC registry */
.registry-list-section {
  margin-top: 20px;
}
.registry-list-section + .registry-list-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.registry-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}
.registry-section-heading h3 {
  margin: 0;
  color: #1f2a3d;
  font-size: 16px;
}
.registry-section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.registry-section-heading > strong {
  color: #52647a;
  font-size: 11px;
  white-space: nowrap;
}
.registry-section-heading > strong.has-pending { color: #9a5a08; }
.registry-table-wrap { margin-top: 14px; }
.client-sites {
  display: grid;
  gap: 18px;
}
.client-site-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--shadow-md);
}
.client-site-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 88px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}
.client-site-card > header h2 {
  margin: 3px 0 4px;
  color: #172033;
  font-size: 19px;
}
.client-site-card > header div > span {
  color: var(--muted);
  font-size: 10px;
}
.client-site-card > header > strong {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 10px;
}
.client-list {
  display: grid;
}
.client-card {
  display: grid;
  grid-template-columns: minmax(240px, .9fr) minmax(390px, 1.45fr) auto;
  align-items: center;
  gap: 22px;
  min-height: 102px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}
.client-card:last-child { border-bottom: 0; }
.client-card.is-disabled { background: #fbfcfd; }
.client-card-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}
.client-state-dot {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid #f0a6aa;
  border-radius: 11px;
  background: radial-gradient(circle, var(--state-off) 0 5px, var(--state-off-soft) 6px);
}
.client-state-dot.online {
  border-color: #80d3b3;
  background: radial-gradient(circle, var(--state-on) 0 5px, var(--state-on-soft) 6px);
}
.client-state-dot.disabled {
  border-color: #c8d0da;
  background: radial-gradient(circle, #7d8b9d 0 5px, #edf0f4 6px);
}
.client-name-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.client-name-line h3 {
  margin: 0;
  color: #1f2a3d;
  font-size: 15px;
}
.client-card-main code {
  display: block;
  margin-top: 5px;
  color: #52647a;
  font-size: 10px;
}
.client-metadata {
  display: grid;
  grid-template-columns: .7fr 1.5fr .6fr;
  gap: 8px;
  margin: 0;
}
.client-metadata > div {
  min-width: 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f5f7fa;
}
.client-metadata dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
}
.client-metadata dd {
  margin: 0;
  overflow: hidden;
  color: #34445a;
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.client-actions {
  display: flex;
  gap: 7px;
}
.client-actions button {
  min-height: 38px;
  padding: 8px 11px;
  font-size: 10px;
  white-space: nowrap;
}
.client-empty {
  display: grid;
  gap: 5px;
  margin: 16px;
  padding: 26px;
  border: 1px dashed var(--line-strong);
  border-radius: 11px;
  background: #fbfcfd;
  color: var(--muted);
  text-align: center;
}
.client-empty strong {
  color: #34445a;
  font-size: 12px;
}
.client-empty span { font-size: 10px; }
.client-empty-page {
  margin: 0;
  padding: 48px 24px;
  background: #fff;
}
.client-dialog { width: min(520px, calc(100% - 30px)); }

@media (max-width: 980px) {
  .site-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-client-grid { grid-template-columns: 1fr; }
  .management-page-header {
    align-items: stretch;
    flex-direction: column;
  }
  .management-page-side {
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }
  .client-card { grid-template-columns: 1fr auto; }
  .client-metadata { grid-column: 1; }
  .client-actions { grid-column: 2; grid-row: 1 / span 2; flex-direction: column; }
  .health-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .site-grid { grid-template-columns: 1fr; }
  .site-card { min-height: 220px; padding: 20px; }
  .site-client-card { padding: 18px; }
  .site-client-meta { grid-template-columns: 1fr; }
  .user-actions > button,
  .user-actions > .portal-home-link,
  .user-actions > .management-menu > summary {
    height: 38px;
    min-height: 38px;
    padding: 0 11px;
    font-size: 11px;
  }
  .management-menu-popover {
    position: fixed;
    top: 78px;
    right: 12px;
  }
  .management-page-content {
    width: min(100% - 24px, 1280px);
    padding-top: 18px;
  }
  .management-page-panel { padding: 16px; }
  .management-page-header { gap: 18px; padding-bottom: 16px; }
  .management-page-copy { min-width: 0; }
  .management-page-copy h2 { font-size: 23px; }
  .management-page-side {
    align-items: stretch;
    flex-direction: column;
  }
  .management-page-summary { grid-template-columns: repeat(3, 1fr); }
  .management-page-summary > span { min-width: 0; padding: 9px 10px; }
  .management-page-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  }
  .management-create-button { width: 100%; }
  .management-page-panel > .management-table-wrap { margin-top: 16px; }
  .registry-list-section + .registry-list-section {
    margin-top: 20px;
    padding-top: 20px;
  }
  .registry-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .client-site-card > header { align-items: flex-start; }
  .client-card { grid-template-columns: 1fr; gap: 14px; padding: 16px; }
  .client-metadata { grid-column: 1; grid-template-columns: 1fr; }
  .client-actions { grid-column: 1; grid-row: auto; flex-direction: row; }
  .client-actions button { flex: 1; }
  .central-offline-notice { align-items: flex-start; }
  .system-page-content { width: min(100% - 24px, 1280px); padding-top: 18px; }
  .system-tabs { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; }
  .system-tabs button { padding: 0 12px; }
  .system-panel { padding: 18px 15px; }
  .system-panel-heading { align-items: stretch; flex-direction: column; gap: 15px; }
  .system-panel-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .system-panel-actions > * { min-width: 0; }
  .system-overall { display: grid; place-items: center; }
  .health-card-grid { grid-template-columns: 1fr; }
  .health-card > p { min-height: 0; }
  .audit-pagination { align-items: stretch; flex-direction: column; }
  .audit-pagination > div { display: grid; grid-template-columns: 1fr 1fr; }
}

.login-shell{width:100%;max-width:760px;margin:24px auto;padding:16px}.signup-panel,.login-shell>.panel{padding:28px;background:rgba(255,255,255,.96);color:#173f69;border-radius:16px}.signup-panel h1{font-size:27px}.signup-panel p{line-height:1.6}.form-stack{display:grid;gap:16px}.form-stack label:not(.checkbox-label){display:grid;gap:7px;font-weight:600}.form-stack input:not([type=checkbox]),.form-stack textarea{width:100%;padding:12px;font:inherit;border:1px solid #a9bfd2;border-radius:7px;color:#173f69;background:white}.form-stack .checkbox-label{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.form-stack .checkbox-label input{width:auto}.board-admin>header h1{color:inherit}

@font-face{font-family:PortalKorean;src:url('/assets/NotoSansKR-Bold.ttf') format('truetype');font-weight:100 900;font-display:swap}body{font-family:PortalKorean,system-ui,sans-serif}.form-stack .checkbox-label input{height:20px;min-height:20px;width:20px;flex:none}
