:root {
  --ink: #182534;
  --muted: #61707c;
  --canvas: #eaf0ed;
  --paper: #ffffff;
  --line: #cbd6d1;
  --teal: #006d68;
  --teal-dark: #005551;
  --sun: #f4c95d;
  --danger: #a5332b;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  color: var(--ink);
  background-color: var(--canvas);
  background-image: linear-gradient(135deg, rgb(255 255 255 / 38%) 25%, transparent 25%), linear-gradient(225deg, rgb(255 255 255 / 38%) 25%, transparent 25%);
  background-size: 34px 34px;
  font-family: Georgia, "Times New Roman", serif;
}

button, input { font: inherit; }

.workspace { width: min(100% - 32px, 1000px); margin: 0 auto; padding: 48px 0 64px; }
.topbar { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 7px; color: var(--teal); font: 700 12px/1.2 Verdana, sans-serif; letter-spacing: 1.2px; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(32px, 5vw, 48px); font-weight: 400; }
h2 { margin-bottom: 5px; font-size: 22px; font-weight: 400; }
.docs-link { color: var(--teal-dark); font: 700 14px Verdana, sans-serif; }

.setup, .panel, .response-panel, .auth-panel, .welcome-panel { background: var(--paper); border: 1px solid var(--line); box-shadow: 5px 5px 0 rgb(24 37 52 / 9%); }
.auth-panel { display: grid; gap: 18px; width: min(100%, 460px); padding: 28px; }
.auth-workspace { display: grid; min-height: 100vh; align-content: center; }
.auth-panel h2 { margin: 0; }
.message { min-height: 21px; margin: 0; color: var(--muted); font-size: 14px; }
.message.success { color: var(--teal-dark); }
.message.error { color: var(--danger); }
.setup { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; padding: 22px; margin-bottom: 24px; }
label { display: grid; gap: 7px; font: 700 13px Verdana, sans-serif; }
input { width: 100%; min-height: 43px; padding: 9px 11px; border: 1px solid #aebbb5; border-radius: 3px; color: var(--ink); background: #fcfdfa; }
input:focus { outline: 3px solid rgb(244 201 93 / 55%); border-color: var(--teal); }
.hint { grid-column: 1 / -1; margin: -5px 0 0; color: var(--muted); font-size: 14px; }

.flow { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px; align-items: stretch; }
.flow.totp-only { grid-template-columns: minmax(0, 460px); justify-content: center; }
.panel { padding: 28px; }
.panel-heading { display: flex; gap: 13px; align-items: start; margin-bottom: 23px; }
.panel-heading p, .note { color: var(--muted); font-size: 14px; line-height: 1.5; margin-bottom: 0; }
.step { display: grid; place-items: center; flex: 0 0 30px; width: 30px; height: 30px; color: #1d2e36; background: var(--sun); border-radius: 50%; font: 700 15px Verdana, sans-serif; }
button { min-height: 43px; padding: 10px 15px; border: 1px solid transparent; border-radius: 3px; cursor: pointer; font: 700 13px Verdana, sans-serif; }
.button-link { display: grid; min-height: 43px; padding: 10px 15px; border: 1px solid transparent; border-radius: 3px; place-items: center; text-decoration: none; font: 700 13px Verdana, sans-serif; }
button:disabled { cursor: wait; opacity: .65; }
.primary { color: white; background: var(--teal); }
.primary:hover { background: var(--teal-dark); }
.secondary { color: var(--teal-dark); border-color: var(--teal); background: transparent; }
.qr-empty { display: grid; place-items: center; min-height: 230px; margin-top: 22px; border: 1px dashed #9aa9a2; color: var(--muted); font-size: 15px; }
.qr-result { margin-top: 22px; text-align: center; }
.qr-result img { display: block; width: min(100%, 250px); margin: 0 auto 13px; border: 10px solid white; box-shadow: 0 0 0 1px var(--line); image-rendering: pixelated; }
.qr-result p { font-size: 14px; color: var(--muted); }
details { margin-top: 18px; text-align: left; font-size: 14px; }
summary { cursor: pointer; color: var(--teal-dark); font-family: Verdana, sans-serif; font-weight: 700; }
details p { margin: 13px 0 0; }
code { overflow-wrap: anywhere; }
#recovery-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin: 8px 0 0; padding-left: 20px; }
.validation label { margin-bottom: 18px; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { margin-top: 18px; }

.response-panel { margin-top: 24px; overflow: hidden; }
.response-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.response-heading h2 { margin: 0; font-size: 18px; }
.status { color: var(--muted); font: 700 12px Verdana, sans-serif; }
.status.success { color: var(--teal-dark); }
.status.error { color: var(--danger); }
pre { min-height: 90px; margin: 0; padding: 20px; overflow: auto; color: #d9f8ee; background: #182534; font: 13px/1.55 Consolas, monospace; }
.welcome-workspace { display: grid; min-height: 100vh; place-items: center; padding: 32px 0; }
.welcome-panel { width: min(100%, 520px); padding: 38px; }
.welcome-panel h1 { margin-bottom: 14px; }
.welcome-panel > p:not(.eyebrow) { color: var(--muted); line-height: 1.5; }
.welcome-panel button { margin-top: 14px; }

@media (max-width: 700px) {
  .workspace { width: min(100% - 24px, 1000px); padding-top: 28px; }
  .topbar, .response-heading { align-items: start; flex-direction: column; }
  .setup, .flow { grid-template-columns: 1fr; }
  .setup { gap: 15px; }
  .panel { padding: 22px; }
}

.login-page {
  min-width: 320px;
  color: #10294c;
  background: #edf7ff;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

.login-layout { display: grid; grid-template-columns: minmax(360px, 32%) 1fr; min-height: 100vh; }
.brand-pane { position: relative; display: grid; place-items: center; overflow: hidden; color: #fff; background: #00555a; }
.brand-pane::after { position: absolute; right: -56px; bottom: -61px; width: 330px; height: 330px; content: ""; opacity: .16; background-image: radial-gradient(circle, #46a5a0 2px, transparent 2.6px); background-size: 18px 18px; }
.brand-content { position: relative; z-index: 1; text-align: center; }
.brand-mark { display: block; width: 91px; height: 102px; margin: 0 auto 23px; object-fit: contain; filter: invert(1); }
.brand-name { margin: 0; font-size: 45px; font-weight: 700; }
.brand-subtitle { margin: 15px 0 0; color: #b8e2e2; font-size: 18px; }
.login-pane { display: grid; place-items: center; padding: 36px 28px; background: radial-gradient(circle at 47% 44%, #fff 0, #f7fbff 35%, #e9f5ff 100%); }
.login-card { width: min(100%, 538px); padding: 27px 35px 19px; border: 1px solid #e4e8ed; border-radius: 10px; background: #fff; box-shadow: 0 13px 22px rgb(38 86 113 / 16%); }
.login-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 33px; padding: 0; list-style: none; }
.login-steps li { position: relative; display: grid; justify-items: center; gap: 9px; color: #607089; font-size: 12px; }
.login-steps li:not(:last-child)::after { position: absolute; top: 16px; left: calc(50% + 18px); width: calc(100% - 36px); height: 2px; content: ""; background: #dbe2ec; }
.login-steps span { z-index: 1; display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid #dbe2ec; border-radius: 50%; background: #fff; font-size: 15px; }
.login-steps strong { font-weight: 500; white-space: nowrap; }
.login-steps .is-current { color: #17404f; }
.login-steps .is-current span { color: #fff; border-color: #00585d; background: #00585d; }
.login-steps .is-current strong { font-weight: 700; }
.login-heading h1 { margin: 0; color: #102b51; font-size: 32px; font-weight: 700; }
.login-heading p { margin: 10px 0 26px; color: #52627b; font-size: 16px; }
.login-field { display: grid; gap: 8px; margin-top: 16px; color: #172f54; font: 700 14px/1.2 "Trebuchet MS", "Segoe UI", sans-serif; }
.input-shell { position: relative; display: block; }
.login-field input, .login-field select { width: 100%; min-height: 45px; padding: 10px 44px; border: 1px solid #83aef0; border-radius: 6px; color: #243b5d; background: #fff; font: 16px "Trebuchet MS", "Segoe UI", sans-serif; }
.login-field input::placeholder { color: #a3b1c7; }
.login-field input:focus, .login-field select:focus { outline: 3px solid rgb(62 133 229 / 17%); border-color: #356fc9; }
.login-field select { appearance: none; color: #a3b1c7; }
.login-field .input-shell:has(select)::after { position: absolute; top: 17px; right: 18px; width: 8px; height: 8px; border-right: 2px solid #435675; border-bottom: 2px solid #435675; content: ""; pointer-events: none; transform: rotate(45deg); }
.field-icon { position: absolute; z-index: 1; top: 13px; left: 17px; width: 18px; height: 18px; color: #53657e; pointer-events: none; }
.visibility-toggle { position: absolute; top: 6px; right: 8px; display: grid; width: 33px; min-height: 32px; padding: 0; place-items: center; border: 0; color: #53657e; background: transparent; font-size: 19px; }
.visibility-toggle svg { width: 19px; height: 19px; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 19px 0 22px; font-size: 14px; }
.remember-option { display: flex; align-items: center; gap: 10px; color: #3f4f68; }
.remember-option input { width: 18px; height: 18px; margin: 0; accent-color: #00585d; }
.login-options a { color: #1762c5; text-decoration: none; }
.login-options a:hover { text-decoration: underline; }
.login-submit { width: 100%; min-height: 49px; border-radius: 6px; color: #fff; background: #00575b; font: 700 16px "Trebuchet MS", "Segoe UI", sans-serif; }
.login-submit:hover { background: #00474b; }
.login-card .message { min-height: 19px; margin: 9px 0 0; font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.login-create-account { margin: 15px 0 0; color: #52627b; font-size: 14px; text-align: center; }
.login-create-account a { color: #1762c5; font-weight: 700; text-decoration: none; }
.login-create-account a:hover { text-decoration: underline; }
.login-security { display: flex; align-items: center; justify-content: center; gap: 13px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e2e8ef; color: #69768b; font-size: 13px; }
.login-security b { font-size: 11px; font-weight: 400; }
.security-icon { width: 18px; height: 18px; color: #63738a; }

@media (max-width: 800px) {
  .login-layout { grid-template-columns: 1fr; }
  .brand-pane { min-height: 225px; }
  .brand-name { font-size: 36px; }
  .brand-subtitle { margin-top: 7px; font-size: 16px; }
  .brand-mark { margin-bottom: 9px; transform: scale(.74); }
  .login-pane { padding: 27px 16px; }
}

@media (max-width: 480px) {
  .login-card { padding: 24px 19px 16px; }
  .login-steps { gap: 2px; }
  .login-steps strong { font-size: 10px; }
  .login-options, .login-security { align-items: flex-start; flex-direction: column; }
  .login-security { gap: 7px; }
}

.mfa-page { min-width: 320px; color: #112b54; background: radial-gradient(circle at 48% 35%, #fff 0, #eff8ff 48%, #e3f2fc 100%); font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.mfa-main { min-height: 100vh; padding: 23px 26px 40px; }.mfa-page-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 25px; color: #07595c; text-decoration: none; font-size: 20px; font-weight: 700; }.mfa-page-brand img { width: 29px; height: 29px; object-fit: contain; }.mfa-header h1 { margin: 0; color: #102a50; font-size: 27px; font-weight: 700; }.mfa-header p { display: flex; align-items: center; gap: 10px; margin: 10px 0 26px; color: #536987; font-size: 14px; }.mfa-header p svg { width: 17px; }.mfa-header b { font-weight: 400; }
.mfa-steps { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 990px; margin: 0 auto 29px; padding: 0; list-style: none; }.mfa-steps li { position: relative; display: grid; justify-items: center; gap: 9px; color: #4e607c; font-size: 14px; }.mfa-steps li:not(:last-child)::after { position: absolute; top: 18px; left: calc(50% + 23px); width: calc(100% - 46px); height: 1px; content: ""; background: #9eafc6; }.mfa-steps span { z-index: 1; display: grid; width: 37px; height: 37px; place-items: center; border: 1px solid #94a9c5; border-radius: 50%; background: #eef8ff; font-size: 18px; font-weight: 700; }.mfa-steps .is-current { color: #0759dc; }.mfa-steps .is-current span { border: 2px solid #0759dc; color: #0759dc; background: #fff; }.mfa-steps .is-complete span { border-color: #073d80; color: #fff; background: #073d80; }
.mfa-stage { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(295px, .9fr); gap: 18px; max-width: 1100px; margin: 0 auto; }.mfa-card, .mfa-help-card, .mfa-verification { border: 1px solid #d9e1ec; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgb(35 70 110 / 9%); }.qr-card { padding: 25px 27px 20px; }.qr-card h2, .mfa-help-card h2 { margin: 0; color: #093477; font-size: 24px; }.qr-card > p { margin: 10px 0 16px; color: #314d75; font-size: 15px; }
.mfa-qr { width: 238px; margin: 0 auto 18px; padding: 10px; border: 1px solid #ccd8e8; border-radius: 7px; text-align: center; }.mfa-qr img { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; }.mfa-qr figcaption { margin-top: 7px; color: #577096; font-size: 11px; }.manual-key { max-width: 440px; margin: 0 auto 16px; color: #315179; }.manual-key summary { cursor: pointer; color: #0759dc; font-weight: 700; }.manual-key p { margin: 10px 0; font-size: 13px; }.manual-key code { display: block; padding: 12px; border: 1px solid #b7c7dc; border-radius: 5px; background: #f7fbff; letter-spacing: 2px; }.manual-key button { margin-top: 8px; color: #0759dc; border: 1px solid #0759dc; background: #fff; }.mfa-warning { display: flex; align-items: center; gap: 9px; margin: 0; padding: 10px 14px; border: 1px solid #ffc88d; border-radius: 6px; color: #c45512 !important; background: #fff8ef; font-size: 13px !important; }.mfa-warning svg { width: 18px; }
.mfa-card-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 18px; padding-top: 18px; border-top: 1px solid #e1e7ef; }.mfa-primary, .mfa-outline { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 40px; padding: 9px 20px; border-radius: 5px; font: 700 14px "Trebuchet MS", "Segoe UI", sans-serif; }.mfa-primary { color: #fff; background: #0759dc; }.mfa-outline { min-width: 139px; border: 1px solid #0759dc; color: #0759dc; background: #fff; }.mfa-help-card { padding: 24px; }.mfa-help-card h2 { font-size: 19px; }.mfa-help-card ol { display: grid; gap: 20px; margin: 23px 0 0; padding: 0; list-style: none; }.mfa-help-card li { display: flex; align-items: center; gap: 15px; color: #2a4772; font-size: 14px; }.mfa-help-card li span { display: grid; flex: 0 0 31px; width: 31px; height: 31px; place-items: center; border-radius: 50%; color: #0759dc; background: #ecf4ff; font-weight: 700; }
.mfa-verification { width: min(100%, 645px); margin: 0 auto; overflow: hidden; padding: 25px 52px 0; text-align: center; }.mfa-verification > header > svg { width: 41px; height: 41px; padding: 8px; border-radius: 50%; color: #0759dc; background: #e8f4ff; }.mfa-verification h2 { margin: 15px 0 5px; color: #102a50; font-size: 22px; }.mfa-verification header p { margin: 0; color: #677891; font-size: 14px; }.mfa-digits { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin: 24px 0; }.mfa-digit { width: 100%; min-height: 61px; padding: 0; border: 1px solid #b8c6d7; border-radius: 7px; color: #102a50; background: #fff; text-align: center; font-size: 28px; }.mfa-digit:focus { outline: 2px solid #0759dc; border-color: #0759dc; }.mfa-code-expiry { margin: 0 0 20px; padding-bottom: 15px; border-bottom: 6px solid #e5ebf1; color: #536986; font-size: 14px; text-align: left; }.mfa-code-expiry strong { color: #0759dc; }.mfa-verification .message { text-align: left; }.mfa-verification .mfa-card-actions { margin-right: -52px; margin-left: -52px; padding: 17px 52px; background: #fbfdff; }
.mfa-recovery { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(295px, .9fr); gap: 18px; max-width: 1100px; margin: 0 auto; }.mfa-recovery-card { padding: 27px 36px 22px; border: 1px solid #d9e1ec; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgb(35 70 110 / 9%); }.mfa-recovery-card h2 { margin: 0 0 14px; color: #093477; font-size: 24px; }.mfa-recovery-card > p:not(.mfa-warning) { color: #314d75; line-height: 1.5; }.mfa-recovery-codes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 18px 0; }.mfa-recovery-codes code { display: grid; min-height: 51px; place-items: center; border: 1px solid #c7d5e7; border-radius: 6px; color: #314969; background: #fbfdff; font: 16px Consolas, monospace; }.mfa-recovery-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid #e1e7ef; }.mfa-recovery-tools button { width: 100%; }.mfa-recovery-confirm { display: flex; align-items: center; gap: 10px; margin-top: 20px; color: #3e5274; font-size: 14px; }.mfa-recovery-confirm input { width: 18px; min-height: 18px; margin: 0; accent-color: #0759dc; }.mfa-recovery-confirm b { color: #cc4c18; }

.method-card { max-width: 780px; margin: 0 auto; padding: 27px 32px 22px; }.method-card h2 { margin: 0; color: #093477; font-size: 24px; }.method-card > p { margin: 8px 0 20px; color: #314d75; font-size: 15px; }
.method-options { display: grid; gap: 14px; }
.method-option { display: flex; align-items: flex-start; gap: 15px; padding: 16px 18px; border: 1px solid #d3ddec; border-radius: 8px; cursor: pointer; }
.method-option.is-selected { border: 2px solid #0759dc; background: #f2f7ff; }
.method-option input { width: 19px; min-height: 19px; margin-top: 2px; accent-color: #0759dc; }
.method-option svg { width: 24px; height: 24px; margin-top: 1px; color: #0759dc; }
.method-option span { color: #2a4772; font-size: 14px; line-height: 1.5; }
.method-option strong { color: #102a50; font-size: 15px; }
.method-badge { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 99px; color: #0a7a3d; background: #e4f7ea; font-size: 11px; font-weight: 700; }
.mfa-recovery-input { max-width: 340px; margin: 24px auto; text-align: left; }
.mfa-recovery-input label { display: block; margin-bottom: 8px; color: #172f54; font-weight: 700; font-size: 14px; }
.mfa-recovery-input input { width: 100%; min-height: 49px; padding: 0 15px; border: 1px solid #b8c6d7; border-radius: 7px; color: #102a50; background: #fff; font: 18px Consolas, monospace; letter-spacing: 2px; text-align: center; }
.mfa-recovery-input input:focus { outline: 2px solid #0759dc; border-color: #0759dc; }
.mfa-app-choice { grid-template-columns: 1fr 1fr; max-width: 440px; margin: 0 auto 20px; gap: 10px; }
.mfa-app-choice .method-option { align-items: center; padding: 10px 12px; }
.mfa-app-choice .method-option svg { width: 18px; height: 18px; }
.mfa-app-choice .method-option strong { font-size: 13px; }
@media (max-width: 850px) { .mfa-main { padding: 22px 16px; }.mfa-stage, .mfa-recovery { grid-template-columns: 1fr; }.mfa-help-card { display: none; } }
@media (max-width: 560px) { .mfa-steps strong { font-size: 10px; text-align: center; }.mfa-steps li:not(:last-child)::after { left: calc(50% + 19px); width: calc(100% - 38px); }.mfa-steps span { width: 32px; height: 32px; }.qr-card { padding: 22px 16px; }.mfa-verification { padding: 23px 19px 0; }.mfa-verification .mfa-card-actions { margin-right: -19px; margin-left: -19px; padding: 15px 19px; }.mfa-digits { gap: 7px; }.mfa-digit { min-height: 51px; }.mfa-card-actions { flex-direction: column-reverse; }.mfa-primary, .mfa-outline { width: 100%; } }

.admin-page { min-width: 320px; color: #112b54; background: radial-gradient(circle at 48% 35%, #fff 0, #eff8ff 48%, #e3f2fc 100%); font-family: "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-sidebar { position: fixed; inset: 0 auto 0 0; display: flex; width: 216px; flex-direction: column; padding: 20px 10px; color: #fff; background: #07595c; }
.admin-brand { display: flex; align-items: center; gap: 10px; padding: 0 7px 24px; font-size: 18px; font-weight: 700; }
.admin-brand img { width: 25px; height: 25px; object-fit: contain; filter: invert(1); }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 14px; min-height: 46px; padding: 11px 10px; border-radius: 6px; color: #eafafa; text-decoration: none; font-size: 15px; }
.admin-sidebar nav a.is-active { background: #07475c; color: #fff; font-weight: 700; }
.admin-sidebar svg { width: 19px; height: 19px; }
.admin-account { margin-top: auto; padding-top: 14px; border-top: 1px solid rgb(255 255 255 / 18%); }
.admin-account-summary { display: flex; align-items: center; gap: 11px; padding: 6px; font-size: 13px; }
.admin-avatar { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 50%; background: #0a7a7e; font-weight: 700; }
.admin-account-summary strong { display: block; font-size: 14px; }
.admin-account-summary small { color: #b7dcdc; }
.admin-logout { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 42px; margin-top: 6px; padding: 10px; border: 0; border-radius: 6px; color: #eafafa; background: transparent; cursor: pointer; font-size: 15px; }
.admin-main { min-height: 100vh; margin-left: 216px; padding: 24px 28px 46px; }
.admin-header h1 { margin: 0; color: #102a50; font-size: 27px; font-weight: 700; }
.admin-header p { display: flex; align-items: center; gap: 9px; margin: 9px 0 22px; color: #536987; font-size: 14px; }
.admin-header p svg { width: 16px; }
.admin-header b { font-weight: 400; }
.admin-greeting { margin: 0; color: #093477; font-size: 24px; font-weight: 700; }
.admin-subgreeting { margin: 8px 0 22px; color: #4d6489; font-size: 14px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.admin-card { display: flex; align-items: center; gap: 14px; padding: 20px; border: 1px solid #d9e1ec; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgb(35 70 110 / 8%); }
.admin-card svg { width: 34px; height: 34px; padding: 7px; border-radius: 50%; color: #0759dc; background: #e8f0ff; }
.admin-card svg.is-good { color: #0a7a3d; background: #e3f7ea; }
.admin-card span { display: block; color: #67789a; font-size: 13px; }
.admin-card strong { color: #10294c; font-size: 16px; }
.admin-panels { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, .85fr); gap: 18px; }
.admin-panel { padding: 22px 24px; border: 1px solid #d9e1ec; border-radius: 10px; background: #fff; box-shadow: 0 2px 4px rgb(35 70 110 / 8%); }
.admin-panel h2 { margin: 0 0 16px; color: #093477; font-size: 18px; }
.admin-filters { display: flex; flex-wrap: wrap; gap: 14px; margin: 0 0 20px; padding-bottom: 18px; border-bottom: 1px solid #e6edf5; }
.admin-filters label { min-width: 210px; color: #526987; font: 700 12px "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-filters select { width: 100%; min-height: 39px; margin-top: 6px; padding: 8px 32px 8px 10px; border: 1px solid #b8c6d7; border-radius: 5px; color: #17365f; background: #fbfdff; font: 14px "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-filters input { width: 100%; min-height: 39px; margin-top: 6px; padding: 8px 10px; border: 1px solid #b8c6d7; border-radius: 5px; color: #17365f; background: #fbfdff; font: 14px "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-filters select:focus, .admin-filters input:focus { outline: 3px solid rgb(7 89 220 / 16%); border-color: #0759dc; }
.audit-filters label, .history-filters label { flex: 1 1 150px; min-width: 130px; max-width: 220px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table-scroll { width: 100%; overflow-x: auto; }
.history-table { min-width: 1080px; }
.admin-table th { padding: 0 10px 10px 0; color: #7787a3; font-weight: 700; text-align: left; }
.admin-table td { padding: 12px 10px 12px 0; color: #2a4772; border-top: 1px solid #eef2f7; }
.admin-user-row { cursor: pointer; }
.admin-user-row:hover td, .admin-user-row:focus td { background: #f5f9ff; }
.admin-user-row:focus { outline: 0; }
.admin-user-name { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; }
.admin-user-name svg { width: 15px; height: 15px; }
.admin-user-actions-row td { padding: 0; background: #f7fbff; }
.admin-user-actions { padding: 16px 18px 18px; border-left: 3px solid #0759dc; }
.admin-user-actions label { display: grid; gap: 6px; color: #526987; font-size: 12px; font-weight: 700; }
.admin-user-actions input { width: 100%; min-height: 39px; padding: 8px 10px; border: 1px solid #b8c6d7; border-radius: 5px; color: #17365f; background: #fff; font: 14px "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-user-actions input:focus { outline: 3px solid rgb(7 89 220 / 16%); border-color: #0759dc; }
.admin-user-action-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.admin-action-button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 13px; border: 1px solid #0759dc; border-radius: 5px; color: #0759dc; background: #fff; cursor: pointer; font: 700 13px "Trebuchet MS", "Segoe UI", sans-serif; }
.admin-action-button svg { width: 16px; height: 16px; }
.admin-action-button.is-warning { border-color: #b9660c; color: #9a5208; }
.admin-action-button.is-danger { border-color: #bd2b2b; color: #a52323; }
.admin-action-button.is-admin { color: #fff; background: #0759dc; }
.admin-action-button:disabled { cursor: not-allowed; opacity: .5; }
.csv-export-button { align-self: flex-end; white-space: nowrap; }
.admin-user-action-help, .admin-user-action-status { margin: 9px 0 0; color: #67789a; font-size: 12px; }
.admin-user-action-status { min-height: 15px; color: #087443; font-weight: 700; }
.admin-user-action-status.is-error { color: #a52323; }
.admin-table td.history-empty-state { padding: 22px 12px; color: #67789a; text-align: center; }
.history-session-duration { display: inline-block; max-width: 170px; font-weight: 700; line-height: 1.35; }
.history-session-active { color: #087443; }
.history-session-closed { color: #245d9b; }
.history-session-expired { color: #68778e; }
.history-session-replaced { color: #8a5b0a; }
.history-access-source { display: inline-block; padding: 5px 8px; border-radius: 5px; color: #07595c; background: #e8f6f5; font-weight: 700; white-space: nowrap; }
.admin-link { display: inline-block; margin-top: 14px; color: #0759dc; font-size: 13px; font-weight: 700; text-decoration: none; }
.admin-security { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.admin-security svg { width: 40px; height: 40px; padding: 8px; border-radius: 50%; color: #0a7a3d; background: #e3f7ea; }
.admin-security strong { color: #10294c; }
.admin-security p { margin: 2px 0 0; color: #67789a; font-size: 13px; }
.admin-checklist { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; color: #2a4772; font-size: 13px; }
.admin-checklist li { display: flex; align-items: center; gap: 9px; }
.admin-checklist svg { width: 16px; height: 16px; padding: 2px; border-radius: 50%; color: #fff; background: #0a7a3d; }
.admin-security-btn { width: 100%; }
.admin-audit-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; color: #2a4772; font-size: 14px; }
.audit-row { display: grid; grid-template-columns: minmax(150px, .8fr) minmax(130px, .7fr) minmax(190px, 1fr) minmax(260px, 1.8fr); gap: 18px; align-items: start; padding: 17px 18px; border: 1px solid #d9e1ec; border-left: 4px solid #07595c; border-radius: 9px; background: #fff; box-shadow: 0 2px 5px rgb(35 70 110 / 7%); }
.audit-row-field, .audit-change { display: grid; gap: 5px; min-width: 0; }
.audit-row-field > span, .audit-change > span { color: #7787a3; font-size: 11px; font-weight: 700; letter-spacing: .35px; text-transform: uppercase; }
.audit-row-field > strong, .audit-change > strong { color: #17365f; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.audit-row-type > strong { color: #07595c; }
.audit-row-changes { display: flex; flex-wrap: wrap; gap: 9px; min-width: 0; }
.audit-change { flex: 1 1 150px; padding: 9px 11px; border-radius: 6px; background: #f2f7fb; }
.audit-empty-state { padding: 22px; border: 1px dashed #c8d5e4; border-radius: 8px; color: #67789a; background: #f8fbfd; text-align: center; }

/* Timeline (admin-history) styles */
#timeline-list { list-style: none; margin: 0; padding: 0; }
#timeline-list li { margin-bottom: 12px; }
.timeline-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid #dfe8ef;
  border-radius: 10px;
  background: #fff;
  color: #15304d;
  font-size: 15px;
  box-shadow: 0 1px 0 rgb(29 45 64 / 4%);
}
.timeline-btn:hover { background: #f7fbff; border-color: #cfe6fb; }
.timeline-btn:focus { outline: 3px solid rgba(7,89,220,0.14); border-color: #0759dc; }
.timeline-btn .time { color: #546b7a; font-weight: 700; margin-right: 8px; }
.timeline-btn .label { color: #0f2d4a; }
.timeline-btn .session-duration { display: block; width: fit-content; margin-top: 10px; padding: 6px 9px; border-radius: 6px; color: #07595c; background: #e8f6f5; font-size: 12px; }
.timeline-btn .session-duration strong { font-weight: 700; }

/* Back button fixed in top-right */
#history-back, .history-back-btn {
  position: fixed !important;
  top: 28px;
  right: 28px;
  z-index: 1200;
  padding: 10px 14px;
  border: 1px solid #dbeef8;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(15,34,55,0.08);
  color: #0f2d4a;
  font-weight: 700;
  cursor: pointer;
}
#history-back:hover, .history-back-btn:hover { background: #f7fbff; }

@media (max-width: 700px) {
  #history-back, .history-back-btn { top: 18px; right: 12px; padding: 8px 12px; }
}


@media (max-width: 1050px) { .audit-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }.audit-row-changes { grid-column: 1 / -1; } }
@media (max-width: 850px) { .admin-sidebar { position: static; width: 100%; min-height: auto; flex-direction: row; align-items: center; padding: 12px; }.admin-brand { padding: 0; }.admin-sidebar nav, .admin-account { display: none; }.admin-main { margin-left: 0; padding: 22px 16px; }.admin-cards { grid-template-columns: repeat(2, 1fr); }.admin-panels { grid-template-columns: 1fr; }.admin-filters label { flex: 1 1 210px; } }
@media (max-width: 620px) { .audit-row { grid-template-columns: 1fr; gap: 13px; }.audit-row-changes { grid-column: auto; }.audit-change { flex-basis: 100%; } }
@media (max-width: 480px) { .admin-cards { grid-template-columns: 1fr; } }

/* admin-access: failure badge */
.badge-fail { display: inline-block; background: #ff4d4f; color: #fff; padding: 6px 10px; border-radius: 25px; font-weight: 600; font-size: 13px; }
