/* Ciantic Night — one shared visual system for member and staff workspaces. */
:root {
  --bg:#08080b; --surface:#121216; --surface2:#1a191f; --border:#2b2933;
  --text:#f4f2f7; --muted:#aaa6b5; --blue:#a183ff; --blue-light:#c1acff;
  --accent:#a183ff; --accent-soft:rgba(161,131,255,.12); --green:#8bd3ac;
  --danger:#ff9fa8; --line:var(--border);
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  color-scheme:dark; background:var(--bg);
}
body {background:#08080b;isolation:isolate;}
body::before {content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(110deg,rgba(8,8,11,.97) 10%,rgba(8,8,11,.91) 70%,rgba(15,11,24,.94)),url('/static/media/department-1.jpg') center/cover no-repeat;}
.shell {background:transparent;}
.sidebar {width:250px;padding:26px 16px 20px;background:rgba(12,12,16,.97);border-right:1px solid #25232c;backdrop-filter:blur(20px);overflow-y:auto;scrollbar-width:thin;scrollbar-color:#3a334e transparent;}
.shell>main {margin-left:250px;}
.brand {gap:11px;padding:0 10px 26px;letter-spacing:2.2px;font-size:21px;}
.brand img {width:38px;height:46px;filter:drop-shadow(0 0 14px #a183ff12);}
.brand small {color:#9e98ac;font-size:8px;letter-spacing:1.9px;}
.nav-label {color:#777181;font-size:9px;font-weight:650;letter-spacing:1.6px;margin:14px 12px 15px;}
.nav-button {position:relative;gap:11px;padding:11px 13px;min-height:42px;border-radius:12px;color:#aaa5b5;border:1px solid transparent;margin-bottom:5px;transition:background .18s,border-color .18s,color .18s;}
.nav-button .icon {width:18px;height:18px;flex-shrink:0;stroke-width:1.7;}
.nav-button:hover {background:#1a1821;color:#efebf6;}
.nav-button.active {background:linear-gradient(100deg,#292039,#1b1726);border-color:#453357;color:#ddceff;}
.nav-button.active::before {content:"";position:absolute;left:-1px;top:13px;bottom:13px;width:3px;background:#b397ff;border-radius:3px;}
.nav-count {background:#493361;color:#eadbff;}
.sidebar-bottom {padding:24px 12px 0;color:#b9b3c5;}
.sidebar-bottom p,.sidebar-bottom .muted {color:#7d778b;}
.connection-dot {box-shadow:0 0 10px #8bd3ac30;}
.topbar {height:76px;padding:0 34px;background:rgba(8,8,11,.78);border-bottom:1px solid #26232d;backdrop-filter:blur(22px);}
.topbar-location {display:flex;align-items:center;gap:14px;min-width:0;}
.topbar-logo {width:25px;height:29px;object-fit:contain;}
.breadcrumb {color:#777181!important;font-size:9px;letter-spacing:1.6px;}
#breadcrumb-current {font-size:9px;letter-spacing:1.6px;color:#c5bdd2;}
.account {gap:10px;color:#d5cede;}
.account img {border:1px solid #4b3e5c;padding:2px;background:#17121e;}
#logout {border-left:1px solid #39303f;padding-left:14px;margin-left:4px;color:#b3a5cb;}
.content {max-width:1540px;padding:34px;}
.page-heading {margin-bottom:26px;}
.page-heading h1 {font-size:31px;line-height:1.2;font-weight:650;letter-spacing:-1px;margin-bottom:8px;}
.page-heading .eyebrow {font-size:9px;color:#ab8dd7;letter-spacing:2px;margin-bottom:9px;}
.page-heading .muted {font-size:12px;color:#9c96a8;}
.button {border-radius:11px;background:#1e1b25;border:1px solid #3b3447;color:#ded7e9;padding:10px 16px;min-height:40px;font-size:12px;font-weight:600;transition:background .16s,border-color .16s,transform .16s;}
.button:hover {background:#2a2434;border-color:#645174;}
.button.primary {color:#f6efff;background:linear-gradient(135deg,#7950b8,#654292);border-color:#a683ce70;box-shadow:0 4px 15px #35204435;}
.button.primary:hover {background:linear-gradient(135deg,#8e62ca,#7550a5);border-color:#b79ad9;}
.button.danger {background:#3d2028;border-color:#76404d;color:#ffbcc7;}
.button.danger:hover {background:#572b36;border-color:#b36577;}
.button:disabled {opacity:.45;cursor:not-allowed;box-shadow:none;}
.button .icon,.icon-button .icon {width:17px;height:17px;}
.text-button {color:#c2a4eb;}
.icon-button {color:#b6abc7;}
:focus-visible {outline:2px solid #c5a5f5!important;outline-offset:3px;}
.card,.stat {border-radius:17px;background:rgba(19,18,24,.97);border:1px solid #2d2836;box-shadow:0 4px 18px #00000015;}
.card.padded {padding:25px;}
.section-heading h2,.card h2 {font-weight:600;font-size:17px;letter-spacing:-.3px;}
.hero {min-height:280px;height:auto;padding:38px;border-radius:21px;border:1px solid #51415e;isolation:isolate;background:#17121c;overflow:hidden;}
.hero::before {content:"";position:absolute;inset:0;z-index:-2;background:url('/static/media/department-2.jpg') 70% 42%/cover no-repeat;}
.hero::after {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#0e0c14fa 0%,#14101de8 32%,#15101c66 70%,#0c0b1244),linear-gradient(0deg,#09080dc2,transparent 65%);}
.hero-copy {position:relative;z-index:1;max-width:540px;}
.hero .hero-label {font-size:9px;letter-spacing:2px;color:#d7b7f8;margin-bottom:18px;}
.hero h2 {font-size:36px;font-weight:650;line-height:1.12;letter-spacing:-1.1px;color:#faf7ff;}
.hero p {color:#c1b6cc;font-size:12px;line-height:1.8;}
.hero>img {width:68px;height:84px;align-self:flex-start;margin:0 0 0 20px;opacity:.9;filter:drop-shadow(0 4px 12px #000a);}
.stats-grid {gap:14px;}
.stat {padding:23px;position:relative;overflow:hidden;}
.stat::before {content:"";position:absolute;top:0;left:22px;right:22px;height:1px;background:linear-gradient(90deg,transparent,#bd9de124,transparent);}
.stat>span {font-size:9px;font-weight:600;letter-spacing:1px;color:#a49aad;}
.stat strong {font-size:28px;font-weight:600;color:#f0e7fa;letter-spacing:-.7px;}
.stat small {color:#94899f;}
.system-stats strong {font-size:23px;overflow-wrap:anywhere;}
.system-strip {border-color:#2e2836;color:#94889f;font-size:10px;}
.system-strip .icon {color:#ad8bd0;}
.workflow-stats .card {border-radius:15px;background:linear-gradient(125deg,#18131e,#121116);}
.workflow-stats .card strong {color:#e9d9fa;}
.data-table th {background:#1a161f;color:#a497b2;font-size:9px;letter-spacing:1.1px;font-weight:600;}
.data-table td,.data-table th {padding:17px 19px;border-color:#2b2533;}
.data-table td {color:#d4cada;font-size:12px;}
.data-table td strong {color:#ece4f3;font-weight:550;}
.data-table td small {color:#92839f;}
.data-table tbody tr:hover {background:#211a2a;}
.tabs {background:#100f14;border:1px solid #322b3c;border-radius:11px;padding:4px;}
.tabs button {color:#a99bb9;padding:9px 14px;border-radius:8px;}
.tabs button.active {background:#33283f;color:#eee0ff;box-shadow:0 2px 5px #0003;}
.badge {border-radius:6px;font-weight:550;letter-spacing:.1px;padding:5px 9px;background:#2b2335;border-color:#51405f;color:#dac4ef;}
.badge.pending,.badge.scheduled,.badge.processing {color:#e5c68e;background:#30271d;border-color:#58452e;}
.badge.approved,.badge.assigned,.badge.enabled,.badge.completed {color:#a3dbb5;background:#1b2e24;border-color:#33513d;}
.badge.rejected,.badge.blocked,.badge.needsattention {color:#eeb3bf;background:#331f28;border-color:#61404d;}
.badge.retired,.badge.resigned,.badge.cancelled {color:#c0b2ce;background:#27222f;border-color:#443950;}
.badge.on.leave {color:#d6bcf1;background:#2f2340;border-color:#5a426e;}
input,select,textarea {background:#100e15!important;border:1px solid #3d3249!important;border-radius:10px!important;color:#eee5f6;font-size:13px;}
input::placeholder,textarea::placeholder {color:#7d708b;}
input:focus,select:focus,textarea:focus {border-color:#a783cf!important;box-shadow:0 0 0 3px #a183ff17;}
input[type=checkbox] {accent-color:#9e73cd;}
label {color:#c4b8d1;}
.builder-toggle {color:#c9b9d8;}
.builder-toolbar,.builder-grid {border-color:#3b2e47;}
.code-input,.file-editor-content {background:#0a090f!important;color:#d4c3e5;font-family:"SFMono-Regular",Consolas,monospace;}
.info-strip {background:#17121d;border-color:#3c2d49;border-radius:14px;}
.info-strip>.icon {color:#b999d7;}
.notice {border-radius:11px;background:#292219;border-color:#5c4830;color:#e6c48f;}
.notice.error {background:#2e1b25;border-color:#653748;color:#f1b5c7;}
.feedback {border-radius:13px;}
.feedback-success {background:#17281f;border-color:#36513f;color:#c6e8d2;}
.feedback-error {background:#2e1b25;border-color:#653748;color:#f1b5c7;}
.empty strong {font-weight:550;color:#ddd0e9;}
.empty p {color:#9d8cae;}
.tool-icon,.confirmation-symbol {background:#2a1e36;border:1px solid #543866;color:#c9a2eb;}
.member-note {background:#141019;border-color:#3b2d47;border-radius:12px;}
.member-note small {color:#a28bb4;}
.member-section {border-color:#33273e;}
.notification-unread {border-left:3px solid #ae81dc;}
.profile-summary {position:relative;isolation:isolate;overflow:hidden;border-radius:12px;padding:18px;margin:-5px -5px 18px;background:#18121e;border:1px solid #3c2c49;}
.profile-summary::before {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(90deg,#18121ef5,#18121ecc),url('/static/media/department-1.jpg') center 37%/cover;}
.profile-avatar {border-color:#6d4b83;border-radius:20px;box-shadow:0 8px 24px #0005;}
.profile-summary h2 {font-size:23px;margin-bottom:10px;}
.detail-grid small {font-size:10px;letter-spacing:.25px;color:#9b87ac;}
.detail-grid span {color:#e3d5ee;overflow-wrap:anywhere;}
.answer {border-color:#3b2b47;}
dialog {background:#17121e;border:1px solid #56415f;border-radius:20px;box-shadow:0 32px 120px #000b;}
dialog::backdrop {background:#040306c9;backdrop-filter:blur(8px);}
.dialog-heading {border-color:#3d2e49;}
.dialog-heading .eyebrow {color:#b790d6;}
.confirmation-dialog .dialog-actions {border-color:#3c2d48;}
.permission-choices {background:#110e17;border-color:#3d2e48;border-radius:12px;}
.danger-text {color:#f2a6b8;}
.file-breadcrumb {background:#15101c;border-color:#3b2b48;color:#cab2dc;}
.console-list {background:#0b0910;border-color:#3b2d47;border-radius:14px;}
.console-event {border-color:#2a2133;}
.console-event strong {color:#bd9cd3;}
.console-event pre {color:#dacbe4;}
.page-footer {color:#81718e;border-color:#302639;}
.login-screen {position:relative;min-height:100svh;display:grid;grid-template-columns:minmax(0,1fr) minmax(380px,480px);align-items:center;gap:60px;padding:58px clamp(28px,6vw,110px);background:linear-gradient(90deg,#08070db3,#08070de6 58%,#08070df7),url('/static/media/department-1.jpg') center 40%/cover fixed;}
.login-scene {align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;min-height:600px;max-width:650px;padding:10px 0;}
.scene-wordmark {display:flex;align-items:center;gap:12px;letter-spacing:3px;font-size:23px;font-weight:700;}
.scene-wordmark img {width:40px;height:52px;object-fit:contain;}
.scene-wordmark small {display:block;font-size:8px;letter-spacing:2.5px;color:#bdaecc;margin-top:6px;}
.scene-kicker {font-size:9px;font-weight:600;letter-spacing:2.5px;color:#d2b3ee;display:block;margin-bottom:24px;}
.scene-copy h2 {font-size:clamp(34px,4.7vw,68px);line-height:1.08;letter-spacing:-2.3px;color:#faf5ff;font-weight:650;margin-bottom:24px;}
.scene-copy p {font-size:14px;line-height:1.9;color:#bcb0c7;}
.scene-pills {display:flex;flex-wrap:wrap;gap:8px;margin-top:28px;}
.scene-pills span {padding:9px 13px;background:#1b152188;border:1px solid #78618c50;border-radius:25px;font-size:10px;color:#d3bce5;backdrop-filter:blur(12px);}
.scene-footer {font-size:8px;letter-spacing:2.5px;color:#9f8caf;}
.login-card {width:100%;max-width:480px;min-width:0;background:linear-gradient(145deg,#19131fe8,#100d16f5);border:1px solid #6c50784d;border-radius:24px;padding:42px;box-shadow:0 25px 100px #0006;backdrop-filter:blur(24px);}
.login-logo {height:62px;width:62px;object-fit:contain;margin:0 0 28px;}
.login-card h1 {font-size:34px;font-weight:600;line-height:1.17;letter-spacing:-1px;}
.login-card .eyebrow {font-size:8px;letter-spacing:2px;color:#c2a2df;}
.login-card>.muted {font-size:13px;color:#b0a1bd;}
.login-card #login-link {width:100%;margin:14px 0 18px;min-height:48px;border-radius:12px;justify-content:space-between;}
.login-card .small {font-size:10px;color:#9b86ad;}
.access-denied {margin-top:22px;text-align:left;border-radius:14px;border-color:#694053;background:#281822;}
.access-denied h2 {font-size:17px;}
.access-denied p {font-size:12px;color:#dfb5c6;}
.access-denied-icon {background:#482535;border-color:#724356;color:#f0b7ce;}
@media(min-width:1500px){.hero{min-height:310px;}.hero h2{font-size:42px}.hero>img{height:84px;}}
@media(max-width:1150px){.sidebar{width:218px}.shell>main{margin-left:218px}.content{padding:26px}.topbar{padding:0 26px}.login-screen{gap:35px;padding:40px;grid-template-columns:1fr 420px}.scene-copy h2{font-size:45px;}.login-card{padding:32px}.hero{padding:30px;}}
@media(max-width:900px){.login-screen{display:flex;justify-content:center;padding:28px;background-attachment:scroll}.login-scene{display:none}.login-card{max-width:480px}.login-card h1{font-size:33px}.hero h2{font-size:31px;}.hero>img{width:50px;height:65px}.hero-copy{max-width:70%;}}
@media(max-width:760px){.sidebar{width:100%;position:sticky;top:0;padding:14px 16px;overflow-y:visible;z-index:5;background:#0d0b12f5}.shell>main{margin-left:0}.brand{padding:0 0 13px;font-size:18px}.brand img{width:28px;height:34px}.sidebar nav{display:flex;gap:5px;overflow-x:auto;padding:0 0 4px;scrollbar-width:thin}.nav-button{width:auto;flex-shrink:0;padding:10px 13px;margin:0;font-size:11px}.nav-button.active::before{display:none}.topbar{height:65px;padding:0 18px}.topbar-location{gap:9px}.topbar-logo{height:23px;width:21px}.breadcrumb{display:none}.account{font-size:11px;gap:7px}.account img{width:26px;height:26px}#logout{font-size:10px;margin:0;padding-left:9px}.content{padding:23px 16px}.page-heading h1{font-size:27px}.page-heading .muted{font-size:11px}.page-heading>.button{font-size:11px;padding:10px 12px}.hero{padding:28px 24px;min-height:260px}.hero h2{font-size:30px;}.hero-copy{max-width:90%}.hero>img{display:none}.hero::before{background-position:65% 40%}.hero::after{background:linear-gradient(90deg,#100c16f2,#100c1680),linear-gradient(0deg,#09080dc2,transparent)}.stat{padding:18px}.stat strong{font-size:25px}.system-stats strong{font-size:20px}.data-table td,.data-table th{padding:15px}.card.padded{padding:20px}.button{min-height:43px}.tabs{max-width:100%;overflow-x:auto;flex-shrink:0}.tabs button{white-space:nowrap}input,select,textarea{font-size:16px}.profile-summary{padding:16px}.profile-summary h2{font-size:21px}.login-card{padding:30px 26px;border-radius:20px}.login-logo{width:50px;height:55px;margin-bottom:24px}.login-card h1{font-size:30px}.file-toolbar .button{font-size:11px;white-space:normal}dialog{padding:23px;border-radius:18px}.scene-pills{gap:6px}.page-footer{letter-spacing:1px;font-size:8px;}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important;}}

/* Department Manual: member reference chapters in the shared Ciantic Night theme. */
.manual-card {margin-top:24px!important;border-color:#43314f;background:linear-gradient(135deg,#18121e,#111015);}
.manual-heading {display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:16px;}
.manual-heading-copy {display:flex;align-items:center;gap:14px;}
.manual-heading .eyebrow {font-size:8px;letter-spacing:1.8px;margin-bottom:7px;color:#b895d5;}
.manual-heading h2 {margin:0;font-size:19px!important;letter-spacing:1px!important;}
.manual-book {width:44px;height:48px;border:1px solid #594064;border-radius:12px;background:#2b1d36;color:#d8b4f5;display:grid;place-items:center;flex-shrink:0;}
.manual-book .icon {width:23px;height:23px;}
.manual-intro {font-size:12px;max-width:750px;}
.manual-search-label {display:block;font-size:11px;color:#b7a2c7;margin:22px 0;}
#manual-search {display:block;width:100%;margin-top:9px;max-width:none;}
.manual-chapter {border:1px solid #382b42;border-radius:12px;background:#15101b;margin-top:10px;overflow:hidden;}
.manual-chapter>summary {display:flex;align-items:center;gap:12px;padding:17px 18px;cursor:pointer;list-style:none;color:#e5d5f0;}
.manual-chapter>summary::-webkit-details-marker {display:none;}
.manual-chapter>summary:hover {background:#24182e;}
.manual-chapter>summary>.icon {width:16px;height:16px;color:#a386b7;flex-shrink:0;transition:transform .18s;margin-left:auto;}
.manual-chapter[open]>summary {background:#201627;border-bottom:1px solid #3c2a48;}
.manual-chapter[open]>summary>.icon {transform:rotate(90deg);}
.manual-chapter-label {display:flex;gap:14px;align-items:center;min-width:0;}
.manual-chapter-number {font-size:10px;color:#a884c1;letter-spacing:1px;font-variant-numeric:tabular-nums;}
.manual-chapter h3 {font-size:13px;font-weight:600;letter-spacing:.1px;margin:0;}
.manual-chapter-body {padding:21px;}
.manual-chapter-body h4 {font-size:12px;letter-spacing:.3px;margin:0 0 14px;color:#d4b7e9;}
.manual-chapter-body>.muted {font-size:12px;}
.manual-steps {list-style:none;padding:0;margin:0;}
.manual-steps li {display:flex;align-items:flex-start;gap:14px;padding:15px 0;border-bottom:1px solid #302039;}
.manual-steps li:last-child {border-bottom:0;padding-bottom:0;}
.manual-steps li:first-child {padding-top:0;}
.manual-step-number {width:28px;height:28px;background:#2a1c35;border:1px solid #50305e;border-radius:8px;display:grid;place-items:center;flex-shrink:0;color:#c9a3e2;font-size:10px;font-variant-numeric:tabular-nums;}
.manual-steps strong {font-size:12px;color:#e9d9f4;display:block;margin:3px 0 7px;font-weight:600;}
.manual-steps p {font-size:12px;color:#b8a4c6;line-height:1.8;margin:0;}
.manual-radio-group+ .manual-radio-group {margin-top:24px;padding-top:22px;border-top:1px solid #3b2846;}
.manual-radio-group .table-wrap,.manual-chapter-body>.table-wrap {border:1px solid #36263f;border-radius:10px;}
.manual-code {display:inline-block;white-space:nowrap;font-family:"SFMono-Regular",Consolas,monospace;font-size:11px;font-weight:600;padding:5px 8px;border-radius:6px;background:#2a1b34;border:1px solid #51335e;color:#ddc4ee;}
.manual-code-blue {background:#152534;border-color:#2d4b64;color:#9bc6ef;}
.manual-code-red {background:#321b25;border-color:#643445;color:#edb0bf;}
.manual-code-purple {background:#2a1b38;border-color:#573969;color:#d2b5ee;}
.manual-rank-level {width:82px;color:#c39ddd!important;font-variant-numeric:tabular-nums;font-weight:600;}
.manual-pending {margin-left:auto;font-size:9px;color:#bdabc9;white-space:nowrap;background:#27202e;border-color:#463650;}
.manual-chapter .data-table {min-width:0;}
.manual-chapter .data-table th {font-size:9px;}
.manual-chapter .data-table td {font-size:12px;line-height:1.65;}
#manual-empty {margin:16px 0 0;}
@media(max-width:760px){.manual-heading{align-items:flex-start;gap:10px}.manual-heading h2{font-size:15px!important;letter-spacing:.6px!important}.manual-heading-copy{gap:10px}.manual-heading>.badge{font-size:8px;padding:5px 7px}.manual-book{width:35px;height:40px;border-radius:10px}.manual-book .icon{width:19px;height:19px}.manual-heading .eyebrow{font-size:7px;letter-spacing:1px}.manual-chapter>summary{padding:15px 13px;gap:8px}.manual-chapter-label{gap:9px}.manual-chapter h3{font-size:12px}.manual-chapter-body{padding:17px 13px}.manual-pending{font-size:8px;padding:4px 6px}.manual-chapter .data-table td,.manual-chapter .data-table th{padding:12px 10px}.manual-code{font-size:10px;padding:4px 6px}.manual-steps li{gap:10px}.manual-steps p{font-size:12px}.manual-radio-group+ .manual-radio-group{margin-top:20px;padding-top:18px;}}

/* Member profile and staff panel are separate workspaces. */
#shell[data-workspace="profile"] .sidebar { display: none; }
#shell[data-workspace="profile"] > main { margin-left: 0; }
#shell[data-workspace="profile"] .content { max-width: 1200px; margin-inline: auto; }
.workspace-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
@media (max-width: 760px) {
  .workspace-actions { width: 100%; }
  .topbar { height: auto; min-height: 65px; padding-block: 12px; flex-wrap: wrap; }
  .topbar .account { flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
  #back-profile { font-size: 12px; padding: 8px 10px; }
}

.access-community-links {display:flex;flex-wrap:wrap;gap:10px;margin:18px 0;}
.access-community-links .button {white-space:normal;}

.promotion-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin:20px 0;}
.promotion-metric {background:#19171f;border:1px solid var(--border);padding:18px;border-radius:14px;}
.promotion-metric span {display:block;color:var(--muted);font-size:12px;}
.promotion-metric strong {display:block;font-size:21px;margin:10px 0;}
.promotion-metric progress {width:100%;height:8px;accent-color:var(--accent);}
#promotion-member-audit {margin-top:18px;overflow-wrap:anywhere;}

.manual-gallery {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;margin-top:24px;}
.manual-gallery figure {margin:0;border:1px solid var(--border);border-radius:14px;overflow:hidden;background:#141219;}
.manual-gallery img {display:block;width:100%;height:auto;aspect-ratio:16/9;object-fit:contain;}
.manual-gallery figcaption {font-size:12px;color:var(--muted);padding:14px;line-height:1.6;}
/* Responsive sign-in and access-denied screens. Brand belongs to the page corner. */
.login-screen {
  box-sizing:border-box;
  width:100%;min-height:100svh;
  grid-template-columns:minmax(0,1fr) minmax(0,460px);
  align-items:center;gap:clamp(28px,5vw,88px);
  padding:calc(100px + env(safe-area-inset-top,0px)) clamp(20px,5vw,80px) calc(32px + env(safe-area-inset-bottom,0px));
  overflow-x:clip;
}
.login-brand {
  position:absolute;z-index:2;
  top:calc(clamp(20px,3vh,36px) + env(safe-area-inset-top,0px));
  left:calc(clamp(20px,3vw,48px) + env(safe-area-inset-left,0px));
  max-width:calc(100% - 40px);gap:11px;
  font-size:clamp(17px,1.4vw,23px);letter-spacing:clamp(1.2px,.18vw,3px);
  text-align:left;
}
.login-brand img {width:clamp(30px,2.5vw,40px);height:clamp(39px,3.2vw,52px);flex-shrink:0;}
.login-brand small {font-size:clamp(7px,.55vw,9px);letter-spacing:clamp(1.2px,.14vw,2.5px);white-space:nowrap;}
.login-scene {min-height:0;max-width:720px;justify-content:center;gap:42px;padding:12px 0;}
.scene-copy {min-width:0;}
.scene-copy h2 {font-size:clamp(32px,4.3vw,64px);line-height:1.1;letter-spacing:-1.8px;overflow-wrap:break-word;}
.scene-copy p {font-size:clamp(12px,1vw,14px);}
.scene-kicker {margin-bottom:20px;}
.scene-footer {line-height:1.8;}
.login-screen .login-card {
  min-width:0;max-width:460px;justify-self:end;align-self:center;
  padding:clamp(24px,3vw,38px);border-radius:22px;
}
.login-intro {text-align:left;}
.login-intro>.muted {font-size:13px;color:#b0a1bd;}
.login-intro #login-link {margin:14px 0 18px;}
.login-screen[data-auth="denied"] .login-card {background:linear-gradient(145deg,#19131ff5,#100d16fa);}
.login-card .access-denied {margin:0;padding:0;border:0;background:transparent;text-align:left;}
.access-denied-icon {
  display:grid;place-items:center;width:52px;height:52px;min-width:52px;
  padding:0;border:1px solid #724356;border-radius:15px;background:#482535;
  margin:0 0 24px;
}
.access-denied-icon .icon {display:block;width:25px;height:25px;flex:none;}
.access-denied>.eyebrow {margin:0 0 12px;color:#c9a3d8;font-size:9px;}
.login-card #login-denied-title {font-size:clamp(24px,2.2vw,30px);line-height:1.18;margin:0 0 16px;letter-spacing:-.65px;}
.access-denied>p:not(.eyebrow) {margin:0 0 18px;font-size:13px;line-height:1.75;color:#d7c6df;}
.access-denied>p.small {font-size:11px;color:#a99ab7;}
.access-community-links {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:24px 0 12px;}
.access-community-links .button {white-space:normal;text-align:center;min-width:0;padding:12px;line-height:1.5;}
.access-denied>a.button {width:100%;margin:0;white-space:normal;text-align:center;line-height:1.5;}
@media(max-width:1000px) {
  .login-screen {grid-template-columns:minmax(0,1fr) minmax(0,400px);gap:28px;}
  .scene-copy h2 {font-size:clamp(30px,4vw,43px);}
  .scene-pills span {font-size:9px;padding:8px 10px;}
}
@media(max-width:900px) {
  .login-screen {display:grid;grid-template-columns:minmax(0,480px);justify-content:center;background-attachment:scroll;}
  .login-screen .login-card {justify-self:center;max-width:480px;}
  .login-brand {display:flex;}
}
@media(max-width:480px) {
  .login-screen {padding-inline:16px;padding-top:calc(94px + env(safe-area-inset-top,0px));padding-bottom:24px;}
  .login-brand {left:calc(20px + env(safe-area-inset-left,0px));}
  .login-screen .login-card {padding:24px 20px;border-radius:18px;}
  .login-intro h1 {font-size:clamp(25px,7.5vw,32px);}
  .login-card #login-denied-title {font-size:25px;}
  .access-community-links {grid-template-columns:1fr;gap:10px;}
  .access-community-links .button,.access-denied>a.button {min-height:46px;font-size:12px;}
}
@media(max-height:650px) and (min-width:901px) {
  .login-screen {padding-top:88px;padding-bottom:24px;}
  .login-scene {gap:24px;}
  .scene-copy h2 {font-size:clamp(30px,3.7vw,48px);margin-bottom:18px;}
  .scene-pills {margin-top:20px;}
}
/* Department photography: retain the layout, with restrained depth and accents. */
.login-screen {
  background-image:linear-gradient(90deg,#08070db8,#08070dce 48%,#08070df5),url('/static/media/department.jpg');
  background-position:center,center 42%;
}
.hero::before {background-image:url('/static/media/patrol.jpg');background-position:70% 52%;}
.hero {box-shadow:inset 0 1px 0 #d4baff16,0 16px 40px #0003;}
.hero::after {background:linear-gradient(90deg,#0d0b13f7 5%,#100d18dc 36%,#0c0b1255 80%),linear-gradient(0deg,#09080dc2,transparent 70%);}
.hero-label::before {content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:#b59cfa;box-shadow:0 0 14px #a183ff70;margin-right:10px;vertical-align:middle;}
.login-card {box-shadow:inset 0 1px 0 #e0caff15,0 28px 80px #0006;}
.scene-pills span {background:#17121dbf;border-color:#b39ad52c;backdrop-filter:blur(12px);}
.card {box-shadow:inset 0 1px 0 #ffffff05,0 6px 22px #0002;}
.member-profile-card {overflow:hidden;}
.profile-cover {height:155px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin:-25px -25px 22px;padding:22px 25px;background:linear-gradient(0deg,#121216f5,transparent 85%),linear-gradient(90deg,#100d1888,#100d1822),url('/static/media/team.jpg') center 35%/cover;border-bottom:1px solid #a58ac42a;}
.profile-cover span {font-size:9px;letter-spacing:2px;line-height:1.8;font-weight:600;color:#dfd3ee;text-shadow:0 1px 8px #000;}
.profile-cover span:last-child {color:#bba9ce;font-size:8px;text-align:right;}
.profile-summary::before {background:linear-gradient(110deg,#18121efb,#18121ee8),url('/static/media/department.jpg') center 42%/cover;}
.department-gallery {margin-top:24px;overflow:hidden;}
.department-gallery>summary {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:22px 24px;cursor:pointer;list-style:none;}
.department-gallery>summary::-webkit-details-marker {display:none;}
.gallery-heading {display:flex;align-items:center;gap:13px;min-width:0;}
.gallery-heading>.icon {width:20px;height:20px;color:#b69ad9;flex:none;}
.gallery-heading strong {display:block;font-size:14px;font-weight:600;color:#ece4f5;}
.gallery-heading small {display:block;margin-top:5px;font-size:11px;color:var(--muted);}
.gallery-toggle {display:grid;place-items:center;width:28px;height:28px;flex:none;border:1px solid #493950;border-radius:9px;color:#c3a5e4;font-size:19px;transition:transform .2s;}
.department-gallery[open] .gallery-toggle {transform:rotate(45deg);}
.department-photos {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 24px 24px;}
.department-photos figure {margin:0;min-width:0;border:1px solid #39303f;border-radius:12px;overflow:hidden;background:#141018;}
.department-photos img {display:block;width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;object-position:center 38%;}
.department-photos figcaption {padding:16px;}
.department-photos figcaption span {display:block;font-size:8px;letter-spacing:1.4px;color:#aa8fcc;line-height:1.7;}
.department-photos figcaption strong {display:block;font-size:12px;font-weight:550;color:#e0d6e9;margin-top:7px;line-height:1.5;}
@media(hover:hover) {
  .department-gallery>summary:hover {background:#a183ff06;}
  .department-photos figure:hover {border-color:#695077;}
  .button:not(:disabled):hover {box-shadow:0 4px 14px #0003;}
}
@media(max-width:760px) {
  .profile-cover {margin:-20px -20px 18px;padding:18px 20px;height:135px;}
  .profile-cover span {font-size:8px;letter-spacing:1.2px;}
  .profile-cover span:last-child {font-size:7px;}
  .department-photos {grid-template-columns:1fr;padding:0 18px 18px;gap:16px;}
  .department-photos img {aspect-ratio:16/9;}
  .department-gallery>summary {padding:20px 18px;}
}
.topbar-home {display:inline-flex;align-items:center;justify-content:center;flex:none;border-radius:8px;min-width:36px;min-height:36px;}
.topbar-home:hover {background:#a183ff10;}
/* Community links below the front-page sign-in button. */
.front-community {margin-top:22px;padding-top:20px;border-top:1px solid #a183ff24;}
.front-community>p {margin:0 0 12px;color:var(--muted);font-size:11px;}
.front-community .access-community-links {margin:0;}
.front-community .button {font-size:11px;}
.member-promotion .toolbar {align-items:center;justify-content:space-between;gap:12px;}
#member-title+.badge {display:inline-flex;margin-top:10px;}
#members-list td .badge {display:inline-flex;margin-top:8px;white-space:normal;color:#a3dbb5;background:#1b2e24;border-color:#33513d;}
.member-promotion .promotion-grid {grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;}
.member-promotion .promotion-metric {padding:14px;}
.member-promotion .promotion-metric strong {font-size:18px;}
#member-task-form {border-top:1px solid var(--border);padding-top:18px;margin-top:18px;}
#member-task-form>.toolbar {justify-content:flex-start;margin-top:16px;}
/* Rank Tasks stays inside each officer profile. */
#member-dialog {width:min(850px,calc(100vw - 32px));padding:0;overflow:auto;max-height:90svh;background:#100e15;}
#member-dialog>.dialog-heading {padding:27px 28px 24px;margin:0;background:linear-gradient(90deg,#100c17f2,#120e19ad),url('/static/media/department.jpg') center 38%/cover;border-bottom:1px solid #63507350;}
#member-dialog>#member-details,#member-dialog>.member-section,#member-dialog>.dialog-actions,#member-dialog>p {margin:24px 28px;}
#member-dialog .member-section {border:1px solid #342b3e;border-radius:15px;padding:20px;background:#17121d80;}
#member-task-toggle {display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;padding:18px 20px;text-align:left;border-radius:12px;background:linear-gradient(100deg,#292035,#1c1726);border:1px solid #625071;color:#eee5f7;}
#member-task-toggle strong {font-size:15px;}
#member-task-toggle small {display:block;color:#b7a6c8;font-size:11px;margin-top:6px;line-height:1.6;}
#member-task-toggle .icon {width:19px;height:19px;flex:none;transition:transform .2s;}
#member-task-toggle[aria-expanded="true"] .icon {transform:rotate(180deg);}
#member-task-panel {padding-top:22px;animation:rank-tasks-reveal .22s ease-out;}
#member-task-panel h3 {font-size:17px;line-height:1.5;margin:0 0 12px;}
#member-task-panel .promotion-metric {background:#100d16;border-color:#3d3048;border-radius:12px;}
#member-task-panel .promotion-metric progress {height:7px;}
.task-remaining {display:block;color:#bca7ce;font-size:11px;line-height:1.6;margin-top:9px;}
#member-task-fields>label {display:flex;flex-direction:column;gap:10px;border:1px solid #493753;border-radius:12px;background:#17111e;padding:16px;}
#member-task-fields>label.builder-toggle {flex-direction:row;align-items:center;justify-content:space-between;}
#member-task-fields input[type="checkbox"] {width:21px;height:21px;flex:none;}
#member-task-fields input[type="number"] {width:100%;box-sizing:border-box;}
#member-task-fields .task-remaining {margin:0;}
@keyframes rank-tasks-reveal {from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:600px){#member-dialog>.dialog-heading{padding:22px 18px}#member-dialog>#member-details,#member-dialog>.member-section,#member-dialog>.dialog-actions,#member-dialog>p{margin:18px}#member-dialog .member-section{padding:14px}#member-task-toggle{padding:15px}#member-task-panel .promotion-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){#member-task-panel{animation:none}#member-task-toggle .icon{transition:none}}
