:root {
  --ink: #f4f7ff;
  --muted: #8e9bb2;
  --bg: #070b12;
  --panel: rgba(15, 23, 38, .93);
  --panel-2: #131d30;
  --line: rgba(131, 157, 203, .18);
  --blue: #7da7ff;
  --blue-2: #477edb;
  --gold: #d2aa52;
  --green: #52c996;
  --red: #e67777;
  --radius: 18px;
  --shadow: 0 24px 70px rgba(0, 0, 0, .4);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: Inter, sans-serif; animation: pageEnter .55s cubic-bezier(.2,.8,.2,1) both; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: radial-gradient(circle at 12% 0%, rgba(53,92,157,.22), transparent 32%), radial-gradient(circle at 90% 92%, rgba(210,170,82,.09), transparent 27%); }
.background-seal { position: fixed; z-index: -1; width: min(78vw, 820px); aspect-ratio: 1; left: 50%; top: 50%; transform: translate(-50%, -50%); background: url('../lspd-logo.png') center/contain no-repeat; opacity: .045; filter: grayscale(.2); }
.page-shell { width: min(1240px, calc(100% - 40px)); margin: 0 auto; padding: 54px 0 80px; }
@keyframes pageEnter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar { height: 74px; padding: 0 max(24px, calc((100vw - 1240px)/2)); display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: rgba(7,11,18,.84); backdrop-filter: blur(18px); position: sticky; top: 0; z-index: 20; animation: topbarDrop .55s .08s cubic-bezier(.2,.8,.2,1) both; }
@keyframes topbarDrop { from { opacity: 0; transform: translateY(-18px); } }
.brand { display: flex; align-items: center; gap: 11px; }
.brand img { width: 43px; height: 43px; object-fit: contain; }
.brand span { display: grid; }
.brand strong { font: 700 20px/1 Barlow Condensed, sans-serif; letter-spacing: .12em; }
.brand small { color: var(--muted); margin-top: 4px; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.topbar nav { display: flex; align-items: center; gap: 22px; color: #b7c0d1; font-size: 13px; }
.topbar nav form { margin: 0; }
.user-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; background: rgba(125,167,255,.08); border: 1px solid var(--line); border-radius: 99px; }
.user-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.link-button { background: none; color: inherit; border: 0; cursor: pointer; padding: 4px; }

.eyebrow { margin: 0 0 7px; color: var(--blue); font: 700 12px/1 Barlow Condensed, sans-serif; letter-spacing: .19em; text-transform: uppercase; }
.muted { color: var(--muted); }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 32px; }
.hero-row h1 { font: 700 clamp(36px, 5vw, 54px)/.95 Barlow Condensed, sans-serif; letter-spacing: .02em; text-transform: uppercase; margin: 0 0 12px; }
.hero-row p:last-child { color: var(--muted); margin: 0; }
.role-badge { min-width: 220px; display: grid; padding: 4px 0; border: 0; background: transparent; }
.role-badge span { font-weight: 700; color: #e8d3a3; }
.role-badge small { color: var(--muted); margin-top: 5px; }
.marcel-badge { border: 0; background: transparent; }
.rainbow-text { display: inline-block; color: transparent !important; background-image: linear-gradient(90deg, #ff2d55 0%, #ff9f0a 7%, #ffe600 14%, #30d158 21%, #00c7ff 28%, #0a84ff 35%, #bf5af2 42%, #ff375f 48%, #ff2d55 50%, #ff9f0a 57%, #ffe600 64%, #30d158 71%, #00c7ff 78%, #0a84ff 85%, #bf5af2 92%, #ff375f 98%, #ff2d55 100%); background-size: 200% 100%; background-repeat: repeat-x; -webkit-background-clip: text; background-clip: text; animation: rgbFlow 4s linear infinite; }
@keyframes rgbFlow { from { background-position: 0% 50%; } to { background-position: -200% 50%; } }

.workspace-grid { display: grid; grid-template-columns: 248px 1fr; gap: 24px; align-items: start; }
.stepper-card, .flow-card, .history-section { border: 1px solid var(--line); background: var(--panel); border-radius: var(--radius); box-shadow: var(--shadow); }
.stepper-card { padding: 25px; position: sticky; top: 98px; }
.stepper { list-style: none; padding: 4px 0 0; margin: 0; }
.stepper li { position: relative; display: flex; align-items: center; gap: 13px; min-height: 67px; color: #67738a; }
.stepper li:not(:last-child)::after { content: ""; position: absolute; width: 1px; height: 25px; left: 15px; bottom: -1px; background: var(--line); }
.stepper b { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; border: 1px solid var(--line); font-size: 12px; flex: none; }
.stepper span { font-size: 13px; font-weight: 600; }
.stepper small { display: block; font-size: 10px; margin-top: 3px; font-weight: 400; }
.stepper li.active { color: var(--ink); }
.stepper li.active b { background: var(--blue-2); border-color: var(--blue); box-shadow: 0 0 18px rgba(86,132,224,.35); }
.stepper li.done { color: #9fb6dc; }
.stepper li.done b { border-color: var(--green); color: var(--green); }
.security-note { border-top: 1px solid var(--line); margin-top: 17px; padding-top: 18px; }
.security-note strong { color: var(--gold); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.security-note p { color: var(--muted); font-size: 11px; line-height: 1.55; margin: 7px 0 0; }

.flow-card { position: relative; overflow: hidden; padding: 36px; min-height: 570px; animation: cardRise .6s .12s cubic-bezier(.2,.8,.2,1) both; }
@keyframes cardRise { from { opacity: 0; transform: translateY(22px) scale(.985); } }
.module-label { position: absolute; right: 24px; top: 20px; display: flex; align-items: center; gap: 7px; color: #aebbd1; font: 700 10px Barlow Condensed, sans-serif; letter-spacing: .13em; text-transform: uppercase; }
.module-label span { width: 18px; height: 18px; display: grid; place-items: center; border-radius: 5px; background: rgba(125,167,255,.12); color: var(--blue); }
.flow-progress { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: rgba(255,255,255,.04); }
.flow-progress span { display: block; width: 25%; height: 100%; background: linear-gradient(90deg, var(--blue-2), var(--blue)); transition: width .3s ease; }
.section-heading { display: flex; gap: 17px; align-items: start; margin-bottom: 28px; }
.section-heading > span { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 12px; background: rgba(125,167,255,.09); color: var(--blue); border: 1px solid var(--line); font: 700 14px Barlow Condensed, sans-serif; }
.section-heading h2 { font: 700 28px/1 Barlow Condensed, sans-serif; text-transform: uppercase; letter-spacing: .03em; margin: 0; }
.section-heading p:last-child { color: var(--muted); font-size: 13px; margin: 8px 0 0; }
.section-heading.compact { margin-bottom: 20px; }
.form-step { display: none; animation: rise .25s ease; }
.form-step.active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
label { color: #aeb9cc; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; }
input, textarea, select { width: 100%; color: var(--ink); background: #111a2b; border: 1px solid rgba(130,157,204,.23); border-radius: 9px; padding: 14px 15px; margin-top: 8px; outline: none; transition: border .2s, box-shadow .2s; text-transform: none; letter-spacing: 0; }
textarea { min-height: 92px; resize: vertical; line-height: 1.5; }
input:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(125,167,255,.1); }
input.invalid { border-color: var(--red); }
.preview-box { position: relative; margin-top: 24px; padding: 20px; border-radius: 12px; background: rgba(6,11,19,.67); border: 1px solid var(--line); }
.copyable-box { cursor: copy; transition: border-color .2s, background .2s; }
.copyable-box:hover { border-color: rgba(125,167,255,.48); background: rgba(12,22,38,.8); }
.preview-box > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
pre { color: #d9e4f6; font: 500 13px/1.7 Inter, sans-serif; white-space: pre-wrap; margin: 12px 0 0; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; padding-top: 25px; border-top: 1px solid var(--line); }
.primary-button, .ghost-button { border: 0; min-height: 44px; border-radius: 9px; padding: 0 19px; display: inline-flex; align-items: center; justify-content: center; gap: 25px; cursor: pointer; font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; }
.primary-button { color: #07101e; background: linear-gradient(120deg, #8cb5ff, #4b7fd3); box-shadow: 0 10px 24px rgba(64,111,191,.22); transition: transform .2s ease, filter .2s ease, box-shadow .2s ease; }
.primary-button:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(64,111,191,.3); }
.primary-button:active { transform: translateY(0) scale(.98); }
.ghost-button { color: #b8c4d8; background: rgba(124,150,193,.07); border: 1px solid var(--line); }
.form-actions #nextButton { margin-left: auto; }
.clear-button { align-self: center; padding: 8px 11px; border: 0; background: transparent; color: #78869d; font-size: 10px; text-transform: uppercase; letter-spacing: .08em; cursor: pointer; transition: color .2s; }
.clear-button:hover { color: var(--red); }

.check-list { display: grid; gap: 11px; }
.check-row { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7,12,21,.4); cursor: pointer; color: #c9d3e3; font-size: 13px; letter-spacing: 0; text-transform: none; line-height: 1.4; }
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.custom-check { display: grid; place-items: center; width: 22px; height: 22px; flex: none; border: 1px solid #475570; border-radius: 5px; color: transparent; transition: .2s; }
.check-row:has(input:checked) { border-color: rgba(82,201,150,.34); background: rgba(82,201,150,.055); }
.check-row input:checked + .custom-check { background: var(--green); border-color: var(--green); color: #07130e; }
.check-row.attention { border-color: var(--red); animation: shake .25s; }
@keyframes shake { 33% { transform: translateX(-3px); } 66% { transform: translateX(3px); } }

.question-list { display: grid; gap: 13px; }
.question-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(8,14,24,.52); }
.question-head { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 16px; }
.question-head > b { color: #66748c; font: 700 12px Barlow Condensed, sans-serif; }
.question-head p { margin: 0; color: #dbe3f1; font-size: 13px; line-height: 1.45; }
.answer-check { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; text-transform: uppercase; white-space: nowrap; }
.answer-check input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); }
.answer-body { display: block; padding: 0 16px 18px 62px; }
.answer-body .official { border-left: 2px solid var(--gold); padding: 10px 13px; background: rgba(210,170,82,.05); color: #c8b687; font-size: 12px; line-height: 1.5; }
.response-field { display: block; margin-top: 13px; }
.response-field textarea { min-height: 76px; }
.cannot-answer { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; color: var(--muted); font-size: 10px; }
.cannot-answer input { width: 15px; height: 15px; margin: 0; accent-color: var(--red); }

.score-card { display: flex; align-items: center; gap: 22px; padding: 20px; border: 1px solid var(--line); border-radius: 13px; background: rgba(7,12,21,.52); }
.score-ring { width: 78px; height: 78px; flex: none; border: 5px solid rgba(125,167,255,.16); border-top-color: var(--blue); border-radius: 50%; display: flex; align-items: baseline; justify-content: center; padding-top: 22px; }
.score-ring strong { font: 700 28px/1 Barlow Condensed, sans-serif; }
.score-ring small { color: var(--muted); font-size: 10px; }
.score-card span { font-weight: 700; }
.score-card p { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.service-number { display: block; max-width: 280px; margin: 22px 0; }
.decision-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.decision { border-radius: 12px; border: 1px solid var(--line); background: #111a2a; color: var(--ink); padding: 18px; display: grid; grid-template-columns: 34px 1fr; text-align: left; cursor: pointer; transition: transform .22s ease, border-color .22s ease, background .22s ease; }
.decision:hover { transform: translateY(-3px); background: #152137; }
.decision > span { grid-row: 1 / 3; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; }
.decision b { font-size: 14px; }
.decision small { color: var(--muted); margin-top: 4px; }
.decision.accept:hover { border-color: var(--green); }
.decision.accept > span { background: rgba(82,201,150,.13); color: var(--green); }
.decision.reject:hover { border-color: var(--red); }
.decision.reject > span { background: rgba(230,119,119,.13); color: var(--red); }
.result-panel { margin-top: 20px; padding: 20px; border: 1px solid rgba(125,167,255,.28); border-radius: 12px; background: #080f1b; }
.result-panel > div { display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.result-panel button, .copy-inline { background: none; color: var(--blue); border: 0; cursor: pointer; font-size: 11px; }
.result-actions { display: flex; gap: 13px; }
.result-actions #newApplication { color: var(--green); }
#saveState { color: var(--green); font-size: 11px; margin-bottom: 0; }

.history-section { margin-top: 24px; padding: 25px; }
.history-list { display: grid; }
.history-list a { display: grid; grid-template-columns: 14px 1.5fr 1fr 60px 100px 20px; align-items: center; gap: 12px; padding: 13px 5px; border-top: 1px solid var(--line); font-size: 12px; }
.history-list a:hover { background: rgba(125,167,255,.035); }
.history-list small, .history-list time { color: var(--muted); }
.history-list em { color: var(--blue); font-style: normal; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.status-dot.accepted { background: var(--green); }

.login-body { overflow: hidden; background: radial-gradient(circle at 50% 45%, #111a2a 0, #080d15 45%, #05080d 100%); }
.login-body .background-seal { width: min(78vw, 660px); opacity: .035; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 28px; }
.login-card { width: min(430px, 100%); position: relative; padding: 35px 36px 28px; text-align: center; background: rgba(14,22,37,.94); border: 1px solid rgba(124,153,204,.23); border-radius: 18px; box-shadow: 0 40px 100px rgba(0,0,0,.55); animation: loginReveal .7s cubic-bezier(.2,.8,.2,1) both; }
@keyframes loginReveal { from { opacity: 0; transform: translateY(24px) scale(.96); filter: blur(7px); } }
.login-card::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(125,167,255,.35), transparent 40%, rgba(210,170,82,.15)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; pointer-events: none; }
.login-emblem { width: 86px; height: 86px; padding: 5px; margin: 0 auto 16px; border-radius: 50%; border: 1px solid rgba(210,170,82,.3); background: rgba(3,8,14,.6); }
.login-emblem img { width: 100%; height: 100%; object-fit: contain; }
.login-card h1 { font: 700 31px/1 Barlow Condensed, sans-serif; letter-spacing: .11em; text-transform: uppercase; margin: 8px 0 6px; }
.login-card h1 span { color: var(--blue); }
.login-card > .muted { margin: 0 0 27px; font-size: 12px; }
.login-form { display: grid; gap: 16px; text-align: left; }
.login-form .primary-button { margin-top: 7px; }
.remember-login { position: relative; display: grid; gap: 3px; min-height: 42px; padding: 5px 0 5px 31px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.remember-login input { position: absolute; left: 0; top: 5px; width: 19px; height: 19px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.remember-login span { color: #d8e1f1; font-size: 12px; }
.remember-login small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.login-card footer { display: flex; align-items: center; gap: 12px; color: #667187; font-size: 9px; text-transform: uppercase; letter-spacing: .11em; margin-top: 24px; }
.login-card footer span { height: 1px; background: var(--line); flex: 1; }
.toast { margin-bottom: 18px; padding: 13px 16px; border-radius: 9px; border: 1px solid var(--line); font-size: 12px; }
.toast.error { color: #ffc0c0; background: rgba(160,49,49,.12); border-color: rgba(230,119,119,.25); }
.toast.success { color: #a8f0cf; background: rgba(39,135,93,.12); border-color: rgba(82,201,150,.25); }

.admin-grid { display: grid; grid-template-columns: minmax(300px, .8fr) 1.2fr; gap: 24px; }
.admin-card { min-height: 0; }
.stack-form { display: grid; gap: 16px; }
.toggle-row { display: flex; align-items: center; gap: 10px; cursor: pointer; text-transform: none; letter-spacing: 0; }
.toggle-row input { position: absolute; opacity: 0; }
.toggle-row span { width: 35px; height: 20px; border-radius: 20px; background: #29344a; position: relative; }
.toggle-row span::after { content: ""; position: absolute; width: 14px; height: 14px; border-radius: 50%; background: #8994a8; left: 3px; top: 3px; transition: .2s; }
.toggle-row input:checked + span { background: var(--blue-2); }
.toggle-row input:checked + span::after { transform: translateX(15px); background: white; }
.user-list { display: grid; }
.user-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 13px 0; border-top: 1px solid var(--line); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px; color: var(--blue); background: rgba(125,167,255,.09); font-weight: 700; }
.user-row div { display: grid; gap: 4px; }
.user-row strong { font-size: 13px; }
.user-row small { color: var(--muted); font-size: 10px; }
.role-toggle, .locked { padding: 7px 10px; border-radius: 7px; border: 1px solid var(--line); background: rgba(125,167,255,.06); color: #aebbd1; font-size: 10px; cursor: pointer; }
.role-toggle.active { color: var(--green); border-color: rgba(82,201,150,.25); }
.delete-user-button { padding: 7px 10px; border-radius: 7px; border: 1px solid rgba(230,119,119,.28); background: rgba(230,119,119,.07); color: #f09898; font-size: 10px; cursor: pointer; transition: background .2s, border-color .2s; }
.delete-user-button:hover { background: rgba(230,119,119,.14); border-color: rgba(230,119,119,.5); }
.locked { cursor: default; color: var(--gold); }
.user-actions { display: grid !important; justify-items: end; gap: 7px !important; }
.inline-rank-form { display: flex; gap: 6px; }
.inline-rank-form input, .rank-request-list input { width: 62px; margin: 0; padding: 7px 8px; font-size: 11px; }
.request-card { min-height: 0; margin-top: 24px; }
.rank-request-list { display: grid; gap: 10px; }
.rank-request-list article { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(8,14,24,.5); }
.rank-request-list article > div { display: grid; gap: 4px; }
.rank-request-list small { color: var(--muted); font-size: 10px; }
.rank-request-list form { display: grid; grid-template-columns: minmax(130px, 1.2fr) 70px repeat(3, minmax(100px, 1fr)) 70px auto; align-items: end; gap: 8px; }
.rank-request-list form label { font-size: 9px; }
.rank-request-list form input, .rank-request-list form select { width: 100%; min-width: 0; }
.request-person p { color: #c7d2e5; font-size: 11px; margin: 8px 0 0; }
.rank-request-list .primary-button { min-height: 34px; padding: 0 12px; }
.request-arrow { color: var(--blue); }

.onboarding-body { overflow-x: hidden; overflow-y: auto; }
.onboarding-body .topbar { display: none; }
.onboarding-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px 24px; }
.onboarding-card { width: min(500px, 100%); max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(125,167,255,.32) transparent; text-align: center; padding: 36px 42px; border: 1px solid var(--line); border-radius: 22px; background: rgba(13,21,36,.94); box-shadow: var(--shadow); animation: onboardingReveal .8s cubic-bezier(.16,1,.3,1) both; }
@keyframes onboardingReveal { from { opacity: 0; transform: translateY(32px) scale(.94); filter: blur(8px); } }
.setup-orbit { width: 112px; height: 112px; position: relative; display: grid; place-items: center; margin: 0 auto 24px; }
.setup-orbit::before, .setup-orbit::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(125,167,255,.28); border-radius: 50%; animation: orbitSpin 7s linear infinite; }
.setup-orbit::after { inset: 10px; border-color: transparent var(--gold) transparent rgba(125,167,255,.45); animation-duration: 4.5s; animation-direction: reverse; }
.setup-orbit img { width: 77px; height: 77px; object-fit: contain; }
.setup-orbit i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); top: 4px; box-shadow: 0 0 13px var(--blue); }
.setup-orbit i:last-child { background: var(--gold); top: auto; bottom: 14px; right: 14px; box-shadow: 0 0 13px var(--gold); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.onboarding-card h1 { margin: 8px 0 10px; font: 700 clamp(36px,7vw,52px)/1 Barlow Condensed,sans-serif; text-transform: uppercase; }
.onboarding-lead { color: var(--muted); margin: 0; }
.setup-line { display: flex; justify-content: center; gap: 5px; margin: 20px 0 28px; }
.setup-line span { width: 24px; height: 3px; border-radius: 3px; background: var(--blue); animation: setupPulse 1.3s ease-in-out infinite; }
.setup-line span:nth-child(2) { animation-delay: .15s; }
.setup-line span:nth-child(3) { animation-delay: .3s; }
@keyframes setupPulse { 50% { opacity: .25; transform: scaleX(.65); } }
.rank-setup-form { display: grid; gap: 15px; text-align: left; }
.onboarding-data-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.ni-access-field { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; border: 0; }
.ni-access-field legend { grid-column: 1 / -1; margin-bottom: 8px; color: #aeb9cc; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; font-weight: 600; }
.ni-access-field label { position: relative; display: grid; gap: 4px; padding: 13px 14px 13px 40px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,10,18,.5); cursor: pointer; text-transform: none; letter-spacing: 0; }
.ni-access-field input { position: absolute; left: 14px; top: 13px; width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.ni-access-field label:has(input:checked) { border-color: var(--blue); background: rgba(125,167,255,.08); }
.ni-access-field span { color: var(--ink); font-size: 12px; }
.ni-access-field small { color: var(--muted); font-size: 9px; line-height: 1.35; }
.onboarding-intro { max-height: 430px; overflow: hidden; transition: opacity .45s ease, transform .45s ease, max-height .6s cubic-bezier(.2,.8,.2,1); }
.rank-setup-form { max-height: 0; opacity: 0; overflow: hidden; transform: translateY(18px); transition: max-height .65s cubic-bezier(.2,.8,.2,1), opacity .45s .1s ease, transform .55s .08s cubic-bezier(.2,.8,.2,1); }
.onboarding-card.rank-stage .onboarding-intro { max-height: 0; opacity: 0; transform: scale(.9) translateY(-8px); pointer-events: none; }
.onboarding-card.rank-stage .setup-orbit { width: 76px; height: 76px; margin-bottom: 13px; transition: width .5s ease, height .5s ease, margin .5s ease; }
.onboarding-card.rank-stage .setup-orbit img { width: 52px; height: 52px; transition: width .5s ease, height .5s ease; }
.onboarding-card.rank-stage .setup-line { display: none; }
.onboarding-card.rank-stage .rank-setup-form { max-height: 720px; opacity: 1; overflow: hidden; transform: none; }
.rank-form-heading { display: grid; gap: 4px; padding-top: 4px; }
.rank-form-heading small { color: var(--blue); font: 700 10px Barlow Condensed,sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.rank-form-heading strong { font: 700 23px Barlow Condensed,sans-serif; text-transform: uppercase; }
.rank-live-preview { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,10,18,.5); }
.rank-live-preview small { color: var(--muted); font-size: 9px; text-transform: uppercase; letter-spacing: .12em; }
.rank-live-preview strong { color: #76839a; transition: color .2s; }
.rank-live-preview strong.valid { color: var(--green); }

@media (max-height: 700px) and (min-width: 481px) {
  .onboarding-card { padding: 22px 34px; }
  .rank-setup-form { gap: 10px; }
  .rank-setup-form input { padding-top: 11px; padding-bottom: 11px; margin-top: 6px; }
  .rank-live-preview { padding: 10px 14px; }
  .ni-access-field legend { margin-bottom: 5px; }
  .ni-access-field label { padding-top: 10px; padding-bottom: 10px; }
  .ni-access-field input { top: 10px; }
}

.rank-fab { position: fixed; z-index: 35; right: 25px; bottom: 24px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(125,167,255,.4); color: var(--blue); background: #111b2d; box-shadow: 0 12px 35px rgba(0,0,0,.45); cursor: pointer; font: 700 22px Inter,sans-serif; transition: transform .25s ease, box-shadow .25s ease; }
.rank-fab:hover { transform: rotate(18deg) scale(1.08); box-shadow: 0 14px 38px rgba(62,111,195,.26); }
.modal-backdrop { position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 22px; background: rgba(2,5,10,.72); backdrop-filter: blur(8px); opacity: 0; transition: opacity .22s ease; }
.modal-backdrop[hidden] { display: none; }
.modal-backdrop.visible { opacity: 1; }
.rank-modal { position: relative; width: min(620px,100%); max-height: calc(100vh - 44px); overflow-y: auto; padding: 30px; border-radius: 18px; border: 1px solid var(--line); background: #111a2a; box-shadow: var(--shadow); transform: translateY(18px) scale(.96); transition: transform .25s cubic-bezier(.2,.8,.2,1); }
.modal-backdrop.visible .rank-modal { transform: none; }
.rank-modal h2 { font: 700 30px/1 Barlow Condensed,sans-serif; text-transform: uppercase; margin: 0 0 10px; }
.rank-modal > p:not(.eyebrow) { color: var(--muted); font-size: 12px; }
.rank-modal form { display: grid; gap: 14px; margin-top: 22px; }
.request-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compact-ni label { padding-top: 11px; padding-bottom: 11px; }
.modal-close { position: absolute; right: 15px; top: 13px; border: 0; background: none; color: var(--muted); font-size: 24px; cursor: pointer; }
.detail-card { min-height: 0; }
.detail-meta { display: flex; gap: 16px; align-items: center; color: var(--muted); font-size: 11px; }
.detail-status { padding: 7px 10px; border-radius: 99px; background: rgba(230,119,119,.1); color: var(--red); }
.detail-status.accepted { background: rgba(82,201,150,.1); color: var(--green); }
.copy-inline { position: absolute; right: 17px; top: 17px; }

@media (max-width: 800px) {
  .page-shell { width: min(100% - 24px, 680px); padding-top: 32px; }
  .topbar { padding: 0 14px; }
  .topbar nav > a, .user-pill { display: none; }
  .hero-row { align-items: start; flex-direction: column; }
  .role-badge { width: 100%; }
  .workspace-grid, .admin-grid { grid-template-columns: 1fr; }
  .stepper-card { position: static; padding: 14px 16px; }
  .stepper-card > .eyebrow, .security-note { display: none; }
  .stepper { display: flex; justify-content: space-between; }
  .stepper li { min-height: 44px; gap: 6px; }
  .stepper li:not(:last-child)::after { width: 20px; height: 1px; left: auto; right: -13px; bottom: auto; }
  .stepper li small { display: none; }
  .stepper li span { font-size: 10px; }
  .flow-card { padding: 24px 18px; min-height: 0; }
  .module-label { right: 16px; top: 15px; }
  .field-grid, .decision-grid { grid-template-columns: 1fr; }
  .question-head { grid-template-columns: 28px 1fr; }
  .answer-check { grid-column: 2; }
  .answer-body { padding-left: 56px; }
  .history-list a { grid-template-columns: 12px 1fr 55px 15px; }
  .history-list small, .history-list time { display: none; }
  .detail-meta { flex-wrap: wrap; }
  .rank-request-list article { grid-template-columns: 1fr; }
  .rank-request-list form { grid-template-columns: 1fr 1fr; }
  .request-arrow { transform: rotate(90deg); }
  .user-row { grid-template-columns: 38px 1fr; }
  .user-actions { grid-column: 2; justify-items: start; }
}

@media (max-width: 480px) {
  .login-card { padding: 28px 22px 24px; }
  .stepper li span { display: none; }
  .stepper { justify-content: space-around; }
  .stepper li:not(:last-child)::after { width: 28px; right: -30px; }
  .section-heading > span { width: 37px; height: 37px; }
  .section-heading h2 { font-size: 24px; }
  .score-card { align-items: flex-start; }
  .onboarding-shell { padding: 12px; }
  .onboarding-card { max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); padding: 28px 20px; }
  .onboarding-data-grid { grid-template-columns: 1fr; }
  .ni-access-field { grid-template-columns: 1fr; }
  .request-form-grid { grid-template-columns: 1fr; }
  .rank-request-list form { grid-template-columns: 1fr; }
}

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