:root {
  color-scheme: light;
  --bg: #edf3f8;
  --header: #f7f9fc;
  --card: #fbfdff;
  --card-2: #f2f6fa;
  --border: #cbd6e2;
  --border-2: #d9e2ec;
  --blue: #2563eb;
  --blue-2: #3b82f6;
  --cyan: #0891b2;
  --green: #047857;
  --orange: #92400e;
  --red: #991b1b;
  --text: #172033;
  --muted: #64748b;
  --dim: #475569;
  --shadow: 0 18px 45px rgba(29, 48, 73, .10);
  --radius: 18px;
  --sidebar: 276px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.theme-dark {
  color-scheme: dark;
  --bg: #05091b;
  --header: #071027;
  --card: #0d142d;
  --card-2: #101833;
  --border: #1b315b;
  --border-2: #294574;
  --blue: #246bfd;
  --blue-2: #3d82ff;
  --cyan: #00c2ff;
  --green: #00c56a;
  --orange: #ff9700;
  --red: #f04444;
  --text: #f1f5ff;
  --muted: #9aafd2;
  --dim: #58709a;
  --shadow: 0 22px 60px rgba(0, 0, 0, .28);
}

.theme-dark body {
  background: var(--bg);
  color: var(--text);
}

.theme-dark .login-visual {
  background: linear-gradient(145deg, rgba(7,16,39,.96), rgba(5,9,27,.82)), radial-gradient(circle at 30% 30%, rgba(0,194,255,.18), transparent 30%);
  border-right: 1px solid rgba(255,255,255,.06);
}

.theme-dark .login-panel {
  background: rgba(13,20,45,.86);
}

.theme-bw body {
  background: var(--bg);
}

.theme-bw .app-shell,
.theme-bw .sidebar,
.theme-bw .topbar,
.theme-bw .panel,
.theme-bw .table-panel,
.theme-bw .metric-card,
.theme-bw .module-card,
.theme-bw .form-panel,
.theme-bw .qr-paper,
.theme-bw .profile-card,
.theme-bw .profile-info-card,
.theme-bw .app-state,
.theme-bw .check-card,
.theme-bw .tool-card,
.theme-bw .success-card,
.theme-bw .scan-success,
.theme-bw .round-intro,
.theme-bw .detail-grid > div,
.theme-bw .detail-list > div,
.theme-bw .report-zones article,
.theme-bw .activity-list article,
.theme-bw .schedule-day,
.theme-bw .schedule-day-toggle.check-line,
.theme-bw .audit-card,
.theme-bw .audit-meta div,
.theme-bw .security-question,
.theme-bw .password-rules--security,
.theme-bw .input-group,
.theme-bw .photo-field,
.theme-bw .search-box input,
.theme-bw .date-filter input,
.theme-bw .qr-display,
.theme-bw .toast {
  background: var(--card);
  border-color: var(--border);
  color: var(--text);
}
.theme-bw .schedule-time-field input[type="time"] { background: #eef4fa; color: var(--text); color-scheme: light; }
.theme-bw .audit-card__icon { background: #eef4fa; color: #2563eb; }
.theme-bw .security-panel__icon,
.theme-bw .security-question b { background: #eef4fa; color: #2563eb; }

.theme-bw .sidebar { background: #f4f7fb; }
.theme-bw .topbar { background: rgba(251,253,255,.92); border-bottom-color: #d9e2ec; }
.theme-bw .nav-item { color: #334155; }
.theme-bw .nav-icon {
  background: #eef4fa;
  color: #3b82f6;
  box-shadow: inset 0 0 0 1px #d9e2ec;
}
.theme-bw .nav-item:hover { background: rgba(37, 99, 235, .08); }
.theme-bw .nav-item:hover .nav-icon { color: #1d4ed8; box-shadow: inset 0 0 0 1px #bcd0ee; }
.theme-bw .nav-item.is-active { color: #1d4ed8; border-color: rgba(37,99,235,.28); background: rgba(37,99,235,.10); }
.theme-bw .nav-item.is-active .nav-icon { background: #2563eb; color: #ffffff; box-shadow: none; }
.theme-bw .button { background: #f2f6fa; border-color: #cbd6e2; color: var(--text); }
.theme-bw .button--primary { background: linear-gradient(135deg,#2563eb,#1d4ed8); border-color: #2563eb; color: #ffffff; box-shadow: 0 10px 24px rgba(37,99,235,.18); }
.theme-bw .button--success { background: rgba(4, 120, 87, .14); color: #065f46; }
.theme-bw .button--warning { background: rgba(146, 64, 14, .14); color: #92400e; }
.theme-bw .button--danger { background: rgba(153, 27, 27, .12); color: #991b1b; }
.theme-bw .sidebar-user { border-top-color: #e5e7eb; }
.theme-bw .status-pill { background: rgba(16, 185, 129, .12); border-color: rgba(16, 185, 129, .25); color: #065f46; }
.theme-bw .metric-icon { background: rgba(37,99,235,.10); color: #2563eb; }
.theme-bw .topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: 16px; }
.theme-bw .login-page { background: #edf3f8; color: var(--text); }
.theme-bw .login-panel { background: #f7f9fc; }
.theme-bw .login-panel::before { border-color: rgba(17, 24, 39, .08); }
.theme-bw .login-card {
  border-color: #d1d5db;
  background: #fbfdff;
  color: var(--text);
  box-shadow: 0 30px 70px rgba(15, 23, 42, .12);
}
.theme-bw .login-card::after { opacity: 0; }
.theme-bw .login-visual { background: linear-gradient(145deg, #eef4fa, #fbfdff); border-right: 1px solid #d9e2ec; }
.theme-bw .login-visual::before { opacity: .45; background-image: linear-gradient(rgba(15,23,42,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(15,23,42,.07) 1px, transparent 1px); }
.theme-bw .login-visual::after { opacity: 0; }
.theme-bw .login-orb { opacity: 0; }
.theme-bw .login-features article {
  border-color: #e5e7eb;
  background: #fbfdff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.theme-bw .login-copy h1,
.theme-bw .login-features strong,
.theme-bw .login-card__brand strong,
.theme-bw .login-card__head h2,
.theme-bw .access-request-panel strong { color: var(--text); }
.theme-bw .login-description,
.theme-bw .login-features small,
.theme-bw .login-card__head p:last-child,
.theme-bw .security-note,
.theme-bw .access-request-panel p,
.theme-bw .access-request-panel ol { color: var(--muted); }
.theme-bw .login-kicker,
.theme-bw .login-card__head .eyebrow { color: #1d4ed8; }
.theme-bw .login-card__brand span { color: var(--muted); }
.theme-bw .login-field > span { color: var(--dim); }
.theme-bw .login-field input { border-color: var(--border); background: #ffffff; color: var(--text); }
.theme-bw .login-field input::placeholder { color: #94a3b8; }
.theme-bw .password-field button { background: var(--card-2); }
.theme-bw .login-theme-switch {
  border-color: rgba(148, 163, 184, .42);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 14px 34px rgba(15, 23, 42, .08);
}
.theme-bw .login-theme-switch button {
  color: #475569;
}
.theme-bw .login-theme-switch button.is-active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.theme-bw .access-request-panel { background: #eef4fa; color: var(--text); }
.theme-bw .access-request-panel .button { background: #fbfdff; color: var(--text); }
.theme-bw .agent-hero { background: #fbfdff; }
.theme-bw .agent-hero__meta small,
.theme-bw .shift-card small,
.theme-bw .profile-info-card__details small { background: #eef4fa; }
.theme-bw .check-card > span { background: var(--card-2); }
.theme-bw .login-brand img { box-shadow: 0 12px 30px rgba(148, 163, 184, .22); }
.theme-bw .tool-card > span,
.theme-bw .avatar,
.theme-bw .report-zones article > div:first-child i,
.theme-bw .activity-icon {
  background: rgba(56, 114, 255, .12);
}
.theme-bw .progress-bar { background: rgba(17, 24, 39, .06); }
.theme-bw .zone-admin-card {
  background: color-mix(in srgb, var(--zone), var(--card) 94%);
  color: var(--text);
}
.theme-bw .zone-admin-card h3 { color: var(--text); }
.theme-bw .zone-admin-card p { color: var(--muted); }
.theme-bw .zone-admin-card .zone-code {
  background: color-mix(in srgb, var(--zone), var(--card) 86%);
  color: color-mix(in srgb, var(--zone), var(--text) 22%);
}
.theme-bw .zone-admin-card .level-chips span {
  background: var(--card-2);
  color: var(--dim);
}
.theme-bw .zone-admin-card .badge {
  background: var(--card-2);
  color: var(--dim);
}
.theme-bw .zone-admin-card .badge--success {
  border-color: color-mix(in srgb, var(--green), transparent 65%);
  background: color-mix(in srgb, var(--green), var(--card) 90%);
  color: var(--green);
}
.theme-bw .zone-admin-card .icon-button {
  background: var(--card);
  color: var(--text);
}
.theme-bw .zone-admin-card .icon-button:hover,
.theme-bw .zone-admin-card .icon-button:focus-visible {
  border-color: color-mix(in srgb, var(--zone), var(--border) 35%);
  background: color-mix(in srgb, var(--zone), var(--card) 88%);
}
.theme-bw .zone-admin-card .icon-button:active {
  background: color-mix(in srgb, var(--zone), var(--card) 82%);
}
.theme-bw .zone-admin-card .icon-button:disabled {
  color: var(--muted);
}
.theme-bw .zone-admin-card .icon-button--danger { color: var(--red); }
.theme-bw .panel,
.theme-bw .table-panel,
.theme-bw .metric-card,
.theme-bw .module-card,
.theme-bw .profile-card,
.theme-bw .profile-info-card,
.theme-bw .agent-hero {
  box-shadow: 0 16px 36px rgba(29,48,73,.08);
}
.theme-bw th { background: #eef4fa; }
.theme-bw .detail-grid > div,
.theme-bw .detail-list > div,
.theme-bw .scan-details > div,
.theme-bw .audit-meta div,
.theme-bw .security-question,
.theme-bw .password-rules--security,
.theme-bw .agent-hero__meta small,
.theme-bw .shift-card small,
.theme-bw .profile-info-card__details small,
.theme-bw .schedule-day,
.theme-bw .schedule-day-toggle.check-line {
  background: #eef4fa;
}
.theme-bw .shift-card {
  background: linear-gradient(145deg,#f8fbfe,#eef4fa);
}
.theme-bw .segmented--buttons,
.theme-bw .check-card > span,
.theme-bw .search-box input,
.theme-bw .date-filter input,
.theme-bw .field input,
.theme-bw .field select,
.theme-bw .field textarea {
  background: #f8fbfe;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
code { overflow-wrap: anywhere; color: #b8c9ff; }
[hidden], .is-hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Login */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(430px, .88fr);
  background: #05091b;
  color: #f1f5ff;
}
.login-visual {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 42px clamp(34px, 5vw, 76px) 34px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 18% 18%, rgba(36,107,253,.30), transparent 32%),
    radial-gradient(circle at 85% 70%, rgba(0,197,106,.17), transparent 34%),
    linear-gradient(145deg, #07142d 0%, #05091b 58%, #071a2f 100%);
  border-right: 1px solid rgba(139,174,236,.16);
  isolation: isolate;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: .22;
  background-image:
    linear-gradient(rgba(155,181,255,.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(155,181,255,.10) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, transparent, black 16%, black 84%, transparent);
}
.login-visual::after {
  content: "";
  position: absolute;
  z-index: -1;
  left: -8%;
  right: -4%;
  bottom: -2px;
  height: 31%;
  opacity: .28;
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(36,107,253,.48) 3% 9%, transparent 9% 12%, rgba(12,43,82,.85) 12% 18%, transparent 18% 21%, rgba(0,194,255,.36) 21% 27%, transparent 27% 31%, rgba(17,53,93,.85) 31% 40%, transparent 40% 45%, rgba(0,197,106,.28) 45% 52%, transparent 52% 56%, rgba(14,48,87,.90) 56% 67%, transparent 67% 72%, rgba(36,107,253,.32) 72% 80%, transparent 80% 84%, rgba(14,48,87,.82) 84% 94%, transparent 94%);
  clip-path: polygon(0 67%, 4% 67%, 4% 38%, 10% 38%, 10% 52%, 15% 52%, 15% 18%, 22% 18%, 22% 61%, 28% 61%, 28% 43%, 35% 43%, 35% 71%, 41% 71%, 41% 35%, 48% 35%, 48% 56%, 55% 56%, 55% 27%, 64% 27%, 64% 64%, 70% 64%, 70% 42%, 77% 42%, 77% 18%, 86% 18%, 86% 56%, 93% 56%, 93% 31%, 100% 31%, 100% 100%, 0 100%);
}
.login-orb { position: absolute; border-radius: 50%; filter: blur(8px); pointer-events: none; }
.login-orb--one { width: 260px; height: 260px; top: -120px; right: 12%; background: rgba(0,194,255,.12); }
.login-orb--two { width: 340px; height: 340px; right: -180px; bottom: 10%; background: rgba(0,197,106,.10); }
.login-brand-card {
  position: relative;
  z-index: 2;
  width: clamp(175px, 19vw, 255px);
  padding: 9px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 24px 65px rgba(0,0,0,.30), 0 0 0 8px rgba(255,255,255,.025);
  transform: none;
}
.login-brand-card img { display: block; width: 100%; border-radius: 18px; }
.login-copy { position: relative; z-index: 2; max-width: 760px; margin: clamp(28px, 5vh, 62px) 0 auto; }
.login-kicker { margin: 0 0 13px; color: #7fd4ff; font-size: 11px; font-weight: 850; letter-spacing: .18em; }
.login-copy h1 {
  margin: 0;
  max-width: 760px;
  font-size: clamp(43px, 5.1vw, 74px);
  line-height: .98;
  letter-spacing: -.052em;
  color: #ffffff;
}
.login-copy h1 span {
  display: inline-block;
  margin-top: 8px;
  background: linear-gradient(90deg, #3185ff, #00c2ff 48%, #10d577 94%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-description { max-width: 670px; margin: 22px 0 0; color: #b5c6e4; font-size: 16px; line-height: 1.72; }
.login-features { max-width: 760px; margin-top: 28px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 11px; }
.login-features article {
  min-height: 105px;
  padding: 15px;
  display: grid;
  grid-template-columns: auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(133,170,231,.17);
  border-radius: 16px;
  background: rgba(10,26,56,.62);
  box-shadow: inset 0 1px rgba(255,255,255,.03);
  backdrop-filter: blur(10px);
}
.login-feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(73,147,255,.42);
  border-radius: 13px;
  background: rgba(36,107,253,.15);
  color: #63adff;
  font-size: 22px;
  font-weight: 900;
}
.login-features article:nth-child(2) .login-feature-icon { border-color: rgba(0,197,106,.35); background: rgba(0,197,106,.12); color: #53e9a4; }
.login-feature-icon--warning { border-color: rgba(255,151,0,.38); background: rgba(255,151,0,.12); color: #ffb23d; }
.login-features strong, .login-features small { display: block; }
.login-features strong { color: #f8fbff; font-size: 12px; letter-spacing: .09em; }
.login-features small { margin-top: 5px; color: #91a7ca; font-size: 10px; line-height: 1.45; }
.login-site-note { position: relative; z-index: 2; margin-top: 26px; color: #6f88b0; font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.login-site-note span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #00c56a; box-shadow: 0 0 0 5px rgba(0,197,106,.10); }
.login-theme-switch {
  position: absolute;
  z-index: 5;
  top: 24px;
  right: 24px;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(86px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(139,174,236,.24);
  border-radius: 16px;
  background: rgba(4,13,32,.58);
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
}
.login-theme-switch button {
  min-height: 38px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #a7b9d7;
  cursor: pointer;
  font-size: 12px;
  font-weight: 850;
}
.login-theme-switch button.is-active {
  background: linear-gradient(90deg, #246bfd, #00a8e8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(0, 131, 214, .22);
}
.login-theme-switch button:focus-visible {
  outline: 3px solid rgba(61,130,255,.35);
  outline-offset: 2px;
}
.theme-choice-icon,
.button-icon,
.button-inline-icon,
.scanner-placeholder-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}
.theme-choice-icon { width: 16px; height: 16px; }
.button-icon { width: 20px; height: 20px; }
.button-inline-icon { width: 18px; height: 18px; margin-right: 7px; }
.scanner-placeholder-icon { width: 54px; height: 54px; color: #6d8dd6; }
.tool-card__svg { width: 48px; height: 48px; color: #86aaff; }
.theme-choice-icon svg,
.button-icon svg,
.button-inline-icon svg,
.scanner-placeholder-icon svg,
.tool-card__svg svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (min-width: 901px) {
  .login-visual { align-items: center; justify-content: center; }
  .login-copy { width: min(100%, 760px); margin: clamp(28px, 5vh, 62px) 0 0; text-align: center; }
  .login-description { margin-left: auto; margin-right: auto; }
  .login-features { width: 100%; text-align: left; }
}

.login-panel {
  position: relative;
  display: grid;
  place-items: center;
  padding: 44px clamp(28px, 4vw, 64px);
  background:
    radial-gradient(circle at 85% 18%, rgba(0,197,106,.08), transparent 30%),
    linear-gradient(155deg, #071126, #05091b 78%);
}
.login-panel::before { content: ""; position: absolute; inset: 7% 7%; border: 1px solid rgba(117,156,220,.06); border-radius: 38px; pointer-events: none; }
.login-card {
  position: relative;
  width: min(100%, 500px);
  padding: clamp(28px, 4vw, 40px);
  border: 1px solid rgba(94,144,226,.28);
  border-radius: 28px;
  background: linear-gradient(155deg, rgba(15,34,70,.92), rgba(8,20,45,.94));
  box-shadow: 0 30px 85px rgba(0,0,0,.42), inset 0 1px rgba(255,255,255,.04);
  backdrop-filter: blur(18px);
}
.login-card::after { content: ""; position: absolute; inset: -1px; z-index: -1; border-radius: inherit; background: linear-gradient(135deg, rgba(36,107,253,.32), transparent 42%, rgba(0,197,106,.25)); filter: blur(14px); opacity: .5; }
.login-card__brand { margin-bottom: 25px; display: flex; align-items: center; gap: 12px; }
.login-card__brand img { width: 54px; height: 54px; object-fit: cover; border-radius: 16px; box-shadow: 0 12px 30px rgba(36,107,253,.20); }
.login-card__brand strong, .login-card__brand span { display: block; }
.login-card__brand strong { color: #ffffff; font-size: 23px; line-height: 1; }
.login-card__brand span { margin-top: 5px; color: #7f96ba; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.login-card__head { margin-bottom: 27px; }
.login-card__head .eyebrow { color: #66b4ff; }
.login-card__head h2 { margin: 7px 0 8px; color: #ffffff; font-size: clamp(27px, 3vw, 34px); letter-spacing: -.025em; }
.login-card__head p:last-child { margin: 0; color: #93a8ca; font-size: 13px; line-height: 1.55; }
.login-field > span { color: #c3d0e8; letter-spacing: .08em; }
.login-field input { height: 50px; border-color: rgba(119,153,211,.29); background: rgba(4,13,32,.64); color: #f1f5ff; }
.login-field input::placeholder { color: #5f7396; }
.login-field input:focus { border-color: #3d82ff; box-shadow: 0 0 0 4px rgba(36,107,253,.13); }
.login-field .password-field button { width: 52px; border-color: rgba(119,153,211,.29); background: rgba(4,13,32,.78); color: #8fa7ca; }
.login-submit { min-height: 50px; margin-top: 4px; display: flex; align-items: center; justify-content: center; gap: 12px; border: 0; background: linear-gradient(90deg, #246bfd, #00a8e8 52%, #00c56a); box-shadow: 0 14px 34px rgba(0,131,214,.25); font-weight: 850; }
.login-submit:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,131,214,.33); }
.login-submit span { font-size: 18px; }
.access-request-panel { margin-top: 15px; padding: 15px; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px; border: 1px solid rgba(102,180,255,.30); border-radius: 16px; background: linear-gradient(145deg, rgba(36,107,253,.14), rgba(0,197,106,.08)); color: #dbeafe; }
.access-request-panel[hidden] { display: none; }
.access-request-panel__icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 11px; background: rgba(102,180,255,.18); color: #8fc7ff; font-weight: 900; font-family: Georgia, serif; }
.access-request-panel strong { display: block; color: #fff; font-size: 13px; }
.access-request-panel p { margin: 4px 0 8px; color: #9fb2d2; font-size: 11px; line-height: 1.45; }
.access-request-panel ol { margin: 0 0 12px 18px; padding: 0; color: #c7d6ee; font-size: 11px; line-height: 1.55; }
.access-request-panel li + li { margin-top: 3px; }
.access-request-panel .button { border-color: rgba(102,180,255,.30); background: rgba(8,20,45,.58); color: #eaf2ff; }
.security-note { margin: 16px 0 0; color: #60779c; font-size: 10px; line-height: 1.55; }
.theme-dark .login-page { background: #05091b; color: #f1f5ff; }
.theme-dark .login-visual { background: radial-gradient(circle at 18% 18%, rgba(36,107,253,.30), transparent 32%), radial-gradient(circle at 85% 70%, rgba(0,197,106,.17), transparent 34%), linear-gradient(145deg, #07142d 0%, #05091b 58%, #071a2f 100%); border-right-color: rgba(139,174,236,.16); }
.theme-dark .login-visual::after { opacity: .28; }
.theme-dark .login-panel { background: radial-gradient(circle at 85% 18%, rgba(0,197,106,.08), transparent 30%), linear-gradient(155deg, #071126, #05091b 78%); }
.theme-dark .login-card { background: linear-gradient(155deg, rgba(15,34,70,.92), rgba(8,20,45,.94)); color: #f1f5ff; }
.theme-dark .login-brand-card img { box-shadow: none; }
.theme-dark .login-field .password-field button { background: rgba(4,13,32,.78); }

/* Layout */
.app-shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.app-shell.menu-collapsed { grid-template-columns: minmax(0,1fr); }
.app-shell.menu-collapsed .sidebar { display: none; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; z-index: 30; display: flex; flex-direction: column; padding: 24px 18px; background: rgba(7,16,39,.97); border-right: 1px solid var(--border); }
.brand { width: 100%; display: flex; align-items: center; gap: 12px; padding: 0 8px 24px; border: 0; border-bottom: 1px solid var(--border); background: transparent; color: inherit; cursor: pointer; text-align: left; }
.brand:hover img, .brand:focus-visible img { box-shadow: 0 0 0 3px rgba(61,130,255,.22); }
.brand:focus-visible { outline: 3px solid rgba(61,130,255,.35); outline-offset: 3px; border-radius: 14px; }
.brand img { width: 44px; height: 44px; border-radius: 13px; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: 16px; }
.brand span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.nav-list { flex: 1; overflow-y: auto; padding: 20px 0; display: grid; align-content: start; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 12px 14px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; text-align: left; font-weight: 680; }
.nav-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: rgba(36,107,253,.10);
  color: #83a5eb;
  transition: .18s ease;
}
.nav-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.035); }
.nav-item:hover .nav-icon {
  background: rgba(36,107,253,.18);
  color: #b7ceff;
}
.nav-item.is-active { color: white; border-color: rgba(61,130,255,.35); background: linear-gradient(90deg, rgba(36,107,253,.26), rgba(36,107,253,.08)); }
.nav-item.is-active .nav-icon {
  background: linear-gradient(145deg, #246bfd, #00a8e8);
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(36,107,253,.24);
}
.sidebar-user { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 15px 8px 0; border-top: 1px solid var(--border); }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 13px; }
.sidebar-user span { color: var(--muted); font-size: 10px; margin-top: 3px; }
.shell-main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; height: 74px; padding: 0 30px; display: flex; align-items: center; gap: 14px; background: rgba(5,9,27,.82); border-bottom: 1px solid rgba(27,49,91,.75); backdrop-filter: blur(18px); }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title strong, .topbar-title span { display: block; }
.topbar-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-title span { margin-top: 2px; color: var(--muted); font-size: 11px; }
.status-pill { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid rgba(0,197,106,.25); border-radius: 999px; background: rgba(0,197,106,.08); color: #70eeb0; font-size: 10px; font-weight: 850; letter-spacing: .08em; }
.status-pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(0,197,106,.10); }
.content { width: min(100%, 1550px); margin: 0 auto; padding: 34px clamp(20px,3vw,46px) 80px; }
.system-footer {
  margin-top: 34px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 720;
}
.system-footer a {
  color: var(--text);
  text-decoration: none;
  font-weight: 820;
}
.system-footer a:hover,
.system-footer a:focus-visible {
  color: var(--blue-2);
  text-decoration: underline;
  outline: none;
}
.login-panel .system-footer {
  position: relative;
  z-index: 1;
  width: min(100%, 480px);
  margin: 18px auto 0;
}
.app-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  text-align: center;
}
.app-state h2 { margin: 0; }
.app-state p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
}
.loading-spinner {
  width: 42px;
  height: 42px;
  border: 4px solid rgba(88, 112, 154, .25);
  border-top-color: var(--blue-2);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; min-width: 0; margin-bottom: 28px; }
.page-heading > div { min-width: 0; }
.page-heading h1 { margin: 4px 0 7px; font-size: clamp(28px,3vw,42px); letter-spacing: 0; overflow-wrap: anywhere; }
.page-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.page-actions, .button-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.eyebrow { margin: 0; color: #7ea5ff; font-size: 11px; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.mobile-only, .menu-overlay { display: none; }

/* Common components */
.button { min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 16px; border: 1px solid var(--border-2); border-radius: 11px; background: var(--card-2); color: var(--text); cursor: pointer; font-weight: 750; transition: .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); border-color: #486ba7; filter: brightness(1.08); }
.button:disabled { opacity: .45; cursor: not-allowed; }
.button--primary { border-color: var(--blue); background: linear-gradient(135deg,var(--blue),#174ed1); color: white; box-shadow: 0 10px 24px rgba(36,107,253,.2); }
.button--success { border-color: var(--green); background: rgba(0,197,106,.15); color: #83f2bd; }
.button--warning { border-color: rgba(255,151,0,.5); background: rgba(255,151,0,.14); color: #ffc76f; }
.button--danger { border-color: var(--red); background: rgba(240,68,68,.18); color: #ffaaaa; }
.button--danger-ghost { border-color: rgba(240,68,68,.45); color: #ff9d9d; }
.button--block { width: 100%; }
.button--small { min-height: 34px; padding: 0 11px; border-radius: 9px; font-size: 12px; }
.button--large { min-height: 52px; padding: 0 24px; font-size: 16px; }
.icon-button { width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: var(--card-2); cursor: pointer; }
.icon-button:hover { border-color: var(--blue-2); }
.icon-button--danger { color: #ff9292; }
.avatar { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(61,130,255,.4); border-radius: 13px; background: linear-gradient(145deg,rgba(36,107,253,.35),rgba(0,194,255,.12)); color: white; font-weight: 850; text-transform: uppercase; }
.avatar--large { width: 66px; height: 66px; border-radius: 18px; font-size: 21px; }
.avatar--xl { width: 112px; height: 112px; margin: 0 auto; border-radius: 30px; font-size: 34px; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-height: 24px; max-width: 100%; padding: 0 9px; border: 1px solid var(--border); border-radius: 999px; background: rgba(88,112,154,.12); color: #b3c1db; font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; text-align: center; }
.badge--success { border-color: rgba(0,197,106,.3); background: rgba(0,197,106,.10); color: #77edb4; }
.badge--danger { border-color: rgba(240,68,68,.35); background: rgba(240,68,68,.12); color: #ff9f9f; }
.badge--warning { border-color: rgba(255,151,0,.35); background: rgba(255,151,0,.12); color: #ffc06a; }
.badge--info { border-color: rgba(61,130,255,.35); background: rgba(61,130,255,.12); color: #a8c2ff; }
.panel, .table-panel { border: 1px solid var(--border); border-radius: var(--radius); background: linear-gradient(145deg,rgba(16,24,51,.96),rgba(13,20,45,.96)); box-shadow: 0 18px 45px rgba(0,0,0,.13); }
.panel { padding: 24px; }
.panel-title { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; min-width: 0; }
.panel-title span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.panel-title h2 { min-width: 0; margin: 3px 0 0; font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.dashboard-tables { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 24px; }
.dashboard-tables .table-panel { margin-top: 0; border-radius: 16px; }
.dashboard-table-title { min-height: 72px; margin-bottom: 0; padding: 18px 18px 16px; border-bottom: 1px solid var(--border); }
.dashboard-table-title > div { min-width: 0; }
.dashboard-table-title h2 { font-size: 18px; line-height: 1.25; }
.table-label { display: inline-flex; align-items: center; width: fit-content; min-height: 22px; padding: 0 8px; border: 1px solid var(--border); border-radius: 999px; background: rgba(61,130,255,.10); color: #9db8fa; font-size: 9px; line-height: 1; white-space: nowrap; }
.dashboard-table-action { min-width: 78px; min-height: 32px; flex: 0 0 auto; border-radius: 999px; background: transparent; }
.dashboard-table { min-width: 780px; table-layout: fixed; }
.dashboard-table th { padding: 11px 18px; background: rgba(5,9,27,.22); }
.dashboard-table td { height: 64px; padding: 13px 18px; line-height: 1.35; }
.dashboard-table td:first-child { color: var(--dim); font-weight: 700; }
.dashboard-table tbody tr { transition: background .16s ease; }
.dashboard-table tbody tr:hover { background: rgba(61,130,255,.06); }
.dashboard-table .badge { justify-content: center; min-width: 76px; }
.dashboard-table .button { box-shadow: none; }
.dashboard-table--access th:nth-child(1), .dashboard-table--access td:nth-child(1) { width: 22%; }
.dashboard-table--access th:nth-child(2), .dashboard-table--access td:nth-child(2) { width: 15%; }
.dashboard-table--access th:nth-child(3), .dashboard-table--access td:nth-child(3) { width: 23%; }
.dashboard-table--access th:nth-child(4), .dashboard-table--access td:nth-child(4) { width: 23%; }
.dashboard-table--access th:nth-child(5), .dashboard-table--access td:nth-child(5) { width: 17%; }
.dashboard-table--incidents th:nth-child(1), .dashboard-table--incidents td:nth-child(1) { width: 28%; }
.dashboard-table--incidents th:nth-child(2), .dashboard-table--incidents td:nth-child(2) { width: 13%; }
.dashboard-table--incidents th:nth-child(3), .dashboard-table--incidents td:nth-child(3) { width: 14%; }
.dashboard-table--incidents th:nth-child(4), .dashboard-table--incidents td:nth-child(4) { width: 20%; }
.dashboard-table--incidents th:nth-child(5), .dashboard-table--incidents td:nth-child(5) { width: 15%; }
.dashboard-table--incidents th:nth-child(6), .dashboard-table--incidents td:nth-child(6) { width: 10%; text-align: right; }
.table-action-cell { width: 1%; white-space: nowrap; }
.dashboard-row-action { min-width: 54px; min-height: 30px; border-radius: 999px; }
.empty-state--compact { min-height: 120px; padding: 24px; }
.empty-state--compact h3 { margin-top: 0; font-size: 15px; }
.empty-state--compact p { margin-bottom: 0; font-size: 12px; }
.section-block { margin-top: 34px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 17px; }
.section-title span { color: #7599e6; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.section-title h2 { margin: 5px 0 0; font-size: 22px; }
.section-title > b { color: var(--muted); font-size: 12px; }
.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metrics-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.metric-card { min-height: 132px; display: flex; align-items: center; gap: 17px; padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: linear-gradient(145deg,var(--card-2),var(--card)); }
.metric-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; background: rgba(61,130,255,.13); color: #9ab8ff; font-size: 22px; }
.metric-card--green .metric-icon { background: rgba(0,197,106,.11); color: #77edb4; }
.metric-card--orange .metric-icon { background: rgba(255,151,0,.11); color: #ffc06a; }
.metric-card--cyan .metric-icon { background: rgba(0,194,255,.11); color: #75e3ff; }
.metric-card span, .metric-card strong, .metric-card small { display: block; }
.metric-card span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; }
.metric-card strong { margin: 5px 0 1px; font-size: 28px; }
.metric-card small { color: var(--dim); }
.access-metrics { margin-bottom: 24px; }
.module-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.module-grid--agent { grid-template-columns: repeat(2,minmax(0,1fr)); }
.module-card { min-height: 155px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 14px; align-items: start; padding: 20px; border: 1px solid var(--border); border-radius: 17px; background: linear-gradient(145deg,var(--card-2),var(--card)); color: var(--text); cursor: pointer; text-align: left; transition: .18s ease; }
.module-card:hover { transform: translateY(-3px); border-color: #33588f; box-shadow: 0 20px 34px rgba(0,0,0,.16); }
.module-card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: rgba(36,107,253,.15); color: #91aff8; font-size: 20px; }
.module-card h3 { margin: 2px 0 8px; font-size: 15px; }
.module-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.module-card > b { color: #729cff; }
.protected-banner, .alert-banner { margin-top: 24px; display: flex; gap: 14px; align-items: flex-start; padding: 17px 19px; border: 1px solid rgba(36,107,253,.3); border-radius: 14px; background: rgba(36,107,253,.08); }
.protected-banner > span, .alert-banner > span { width: 30px; height: 30px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 9px; background: rgba(36,107,253,.18); color: #8fb1ff; font-weight: 900; }
.protected-banner p, .alert-banner p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.alert-banner--warning { border-color: rgba(255,151,0,.34); background: rgba(255,151,0,.08); }
.alert-banner--warning > span { background: rgba(255,151,0,.16); color: #ffc05e; }
.alert-banner--error { border-color: rgba(240,68,68,.38); background: rgba(240,68,68,.09); }
.alert-banner--error > span { background: rgba(240,68,68,.16); color: #ffabab; }
.alert-banner--compact { margin: 0 0 16px; }
.empty-state { min-height: 240px; display: grid; place-items: center; align-content: center; padding: 32px; text-align: center; }
.empty-state__icon { font-size: 34px; color: var(--dim); }
.empty-state h3 { margin: 12px 0 6px; }
.empty-state p { max-width: 480px; margin: 0 0 17px; color: var(--muted); }

/* Forms */
.form-panel { max-width: 1100px; }
.form-section { margin-bottom: 22px; }
.form-section > span, .photo-field > div > span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.field { display: grid; gap: 8px; margin-bottom: 17px; }
.field > span { color: #b7c5df; font-size: 11px; font-weight: 760; }
.field input, .field select, .field textarea, .search-box input, .date-filter input { width: 100%; border: 1px solid var(--border); border-radius: 11px; outline: none; background: var(--card-2); color: var(--text); }
.field input, .field select { height: 45px; padding: 0 13px; }
.field textarea { padding: 13px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .search-box input:focus { border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(36,107,253,.12); }
.field input[type=color] { padding: 5px; }
.password-field { display: grid; grid-template-columns: minmax(0,1fr) auto; }
.password-field input { border-radius: 11px 0 0 11px; }
.password-field button { width: 46px; border: 1px solid var(--border); border-left: 0; border-radius: 0 11px 11px 0; background: #0d1630; cursor: pointer; }
.form-error { padding: 10px 12px; border: 1px solid rgba(240,68,68,.35); border-radius: 10px; background: rgba(240,68,68,.08); color: #ffabab; font-size: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--border); }
button:disabled, .button:disabled { cursor: not-allowed; opacity: .58; transform: none !important; }
.segmented { display: inline-flex; gap: 7px; }
.segmented label { cursor: pointer; }
.segmented label input { position: absolute; opacity: 0; }
.segmented label span, .segmented--buttons button { min-width: 112px; height: 40px; display: grid; place-items: center; padding: 0 13px; border: 1px solid var(--border); border-radius: 10px; background: #0a1229; color: var(--muted); cursor: pointer; font-weight: 750; }
.segmented input:checked + span, .segmented--buttons button.is-active { border-color: var(--blue); background: rgba(36,107,253,.18); color: white; }
.photo-field { min-height: 110px; margin-bottom: 20px; padding: 17px; display: flex; align-items: center; gap: 18px; border: 1px dashed var(--border-2); border-radius: 14px; background: rgba(7,16,39,.55); }
.photo-field > div { flex: 1; }
.photo-field p { margin: 0; color: var(--muted); font-size: 12px; }
.photo-field img { width: 78px; height: 78px; object-fit: cover; border-radius: 10px; }
.photo-field--evidence { align-items: stretch; }
.photo-carousel { position: relative; width: min(100%, 440px); min-height: 200px; overflow: hidden; flex: 0 1 440px; border-radius: 11px; background: #070d1f; }
.photo-field .photo-carousel__image { width: 100%; height: 100%; min-height: 200px; display: block; object-fit: contain; border-radius: 0; }
.photo-carousel__image.is-hidden { display: none; }
.photo-carousel__control { position: absolute; z-index: 1; top: 50%; width: 34px; height: 34px; transform: translateY(-50%); border: 0; border-radius: 50%; background: rgba(4, 9, 24, .78); color: white; font-size: 27px; line-height: 1; cursor: pointer; }
.photo-carousel__control:hover { background: var(--blue); }
.photo-carousel__control[data-direction="previous"] { left: 10px; }
.photo-carousel__control[data-direction="next"] { right: 10px; }
.photo-carousel__count { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(4, 9, 24, .78); color: white; font-size: 11px; font-weight: 750; }
.photo-preview-list:empty { display: none; }
.photo-preview-list { width: min(100%, 420px); }
.photo-preview-list .photo-carousel { width: 100%; min-height: 180px; }
.photo-preview-list .photo-carousel__image { min-height: 180px; }
.check-line { display: flex; gap: 12px; align-items: center; margin: 10px 0 24px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; }
.check-line input { accent-color: var(--blue); }
.check-line strong, .check-line small { display: block; }
.check-line small { margin-top: 3px; color: var(--muted); }

/* Agent pages */
.agent-hero { display: grid; grid-template-columns: auto minmax(0,1fr) minmax(330px,.72fr); align-items: center; gap: 20px; margin-bottom: 18px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.agent-hero span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .12em; }
.agent-hero h2 { margin: 4px 0 12px; overflow-wrap: anywhere; }
.agent-hero p { margin: 0; color: var(--muted); }
.agent-hero__body { min-width: 0; }
.agent-hero__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.agent-hero__meta small { min-height: 28px; display: inline-flex; align-items: center; max-width: 100%; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: rgba(5,9,27,.28); color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.shift-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: linear-gradient(145deg,rgba(5,9,27,.48),rgba(16,24,51,.88)); }
.shift-card strong, .shift-card small { display: block; }
.shift-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.shift-card strong { margin: 0 0 11px; font-size: 16px; line-height: 1.25; overflow-wrap: anywhere; }
.shift-card__details { display: grid; gap: 7px; }
.shift-card small { padding: 8px 10px; border: 1px solid var(--border); border-radius: 11px; background: rgba(5,9,27,.26); color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.shift-card .badge { flex: 0 0 auto; }
.shift-card--empty { border-color: rgba(255,151,0,.32); background: rgba(255,151,0,.08); }
.zone-strip { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.zone-strip article { position: relative; overflow: hidden; min-height: 130px; padding: 20px; border: 1px solid color-mix(in srgb,var(--zone),transparent 65%); border-radius: 16px; background: color-mix(in srgb,var(--zone),transparent 92%); }
.zone-strip article i { position: absolute; width: 6px; inset: 0 auto 0 0; background: var(--zone); }
.zone-strip strong, .zone-strip span, .zone-strip small { display: block; }
.zone-strip strong { color: var(--zone); font-size: 11px; text-transform: uppercase; }
.zone-strip span { margin: 10px 0 4px; font-size: 20px; font-weight: 800; }
.zone-strip small { color: var(--muted); }
.profile-layout { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 18px; }
.profile-card { padding: 34px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); text-align: center; }
.profile-card h2 { margin: 20px 0 5px; }
.profile-card p { margin: 0 0 17px; color: var(--muted); }
.profile-overview { display: grid; grid-template-columns: 320px repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 18px; align-items: stretch; }
.profile-card--compact { display: grid; align-content: start; min-width: 0; padding: 26px; }
.profile-card__badges { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.profile-card--compact dl { display: grid; gap: 10px; margin: 0; text-align: left; }
.profile-card--compact dl div,
.profile-info-card { min-width: 0; padding: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.profile-card--compact dt,
.profile-info-card__head span { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.profile-card--compact dd { margin: 5px 0 0; font-weight: 760; overflow-wrap: anywhere; }
.profile-info-card { display: flex; flex-direction: column; gap: 12px; }
.profile-info-card__head { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 26px; }
.profile-info-card > strong { font-size: 18px; line-height: 1.25; overflow-wrap: anywhere; }
.profile-info-card__details { display: grid; gap: 8px; margin-top: auto; }
.profile-info-card__details small { padding: 9px 10px; border: 1px solid var(--border); border-radius: 11px; background: rgba(5,9,27,.26); color: var(--muted); line-height: 1.45; overflow-wrap: anywhere; }
.profile-info-card--shift { border-left: 4px solid var(--green); }
.profile-extra { margin-bottom: 18px; }
.profile-actions { margin-top: 26px; }
.profile-overview--calm { grid-template-columns: 1fr; gap: 18px; }
.profile-card--wide { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 24px; padding: 30px; text-align: left; }
.profile-card--wide .avatar { margin: 0; }
.profile-card--wide span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.profile-card--wide h2 { margin: 5px 0 6px; font-size: 28px; line-height: 1.12; overflow-wrap: anywhere; }
.profile-card--wide p { margin-bottom: 14px; }
.profile-card--wide .profile-card__badges { justify-content: flex-start; margin-bottom: 0; }
.profile-card--wide dl { display: grid; gap: 10px; min-width: 0; margin: 0; }
.profile-card--wide dl div { min-width: 0; }
.profile-card--wide dd { white-space: normal; overflow-wrap: anywhere; }
.profile-summary-row { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(0,.85fr); gap: 18px; }
.profile-overview--calm .profile-info-card { padding: 22px; min-height: 185px; }
.profile-overview--calm .profile-info-card > strong { font-size: 22px; }
.profile-overview--calm .profile-info-card__details { grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin: 0; }
.detail-grid > div { padding: 15px; border: 1px solid var(--border); border-radius: 12px; background: rgba(5,9,27,.34); }
.detail-grid dt, .detail-list dt, .scan-details dt { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.detail-grid dd, .detail-list dd, .scan-details dd { margin: 6px 0 0; font-weight: 760; }
.success-card, .scan-success { max-width: 780px; margin: 20px auto; padding: 38px; border: 1px solid rgba(0,197,106,.30); border-radius: 22px; background: linear-gradient(145deg,rgba(0,197,106,.09),var(--card)); text-align: center; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 50%; background: rgba(0,197,106,.16); color: #75eeb4; font-size: 36px; }
.success-card > p, .scan-success > p { color: var(--muted); }
.success-card .detail-grid { margin: 26px 0; text-align: left; }
.success-card .button-row, .scan-success .button-row { justify-content: center; margin-top: 24px; }
.timeline { display: grid; gap: 0; }
.timeline > article { position: relative; display: grid; grid-template-columns: 20px minmax(0,1fr); gap: 12px; padding: 19px 0; border-bottom: 1px solid var(--border); }
.timeline > article:last-child { border-bottom: 0; }
.timeline-dot { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: var(--blue-2); box-shadow: 0 0 0 6px rgba(36,107,253,.1); }
.timeline-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.timeline p { margin: 8px 0; color: var(--muted); line-height: 1.6; }
.timeline small { color: var(--dim); }

/* Rounds and scanning */
.round-intro { max-width: 760px; margin: 20px auto; padding: 46px; border: 1px solid var(--border); border-radius: 24px; background: var(--card); text-align: center; }
.round-symbol { width: 90px; height: 90px; margin: 0 auto 24px; display: grid; place-items: center; border: 1px solid rgba(16, 185, 129, .2); border-radius: 50%; background: rgba(16, 185, 129, .08); color: var(--green); font-size: 42px; }
.round-intro h2 { margin: 9px 0; font-size: 30px; }
.round-intro > p:not(.eyebrow) { max-width: 580px; margin: 0 auto; color: var(--muted); line-height: 1.7; }
.round-preview { margin: 25px 0; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.round-preview span { padding: 7px 10px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 11px; }
.round-progress { margin-bottom: 18px; }
.progress-summary { display: flex; justify-content: space-between; align-items: center; }
.progress-summary span, .progress-summary strong, .progress-summary small { display: block; }
.progress-summary span { color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.progress-summary strong { margin: 3px 0; font-size: 34px; }
.progress-summary small { color: var(--muted); }
.progress-ring { width: 86px; height: 86px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, .05); }
.progress-ring::before { content: ""; position: absolute; width: 67px; height: 67px; border-radius: 50%; background: var(--card); }
.progress-ring b { z-index: 1; font-size: 16px; color: var(--text); }
.progress-bar { height: 7px; overflow: hidden; margin-top: 17px; border-radius: 999px; background: rgba(0,0,0,.06); }
.progress-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--green),rgba(16, 185, 129, .7)); }
.stop-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.stop-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); }
.stop-card > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; background: rgba(88,112,154,.12); color: var(--muted); font-weight: 800; }
.stop-card strong, .stop-card small { display: block; }
.stop-card strong { font-size: 12px; }
.stop-card small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.stop-card > b { color: var(--dim); }
.stop-card.is-complete { border-color: rgba(0,197,106,.32); background: rgba(0,197,106,.07); }
.stop-card.is-complete > span { background: rgba(0,197,106,.15); color: #81efbb; }
.stop-card.is-complete > b { color: #6fedb1; }
.sticky-actions { position: sticky; z-index: 10; bottom: 15px; margin-top: 20px; display: flex; justify-content: flex-end; gap: 10px; padding: 13px; border: 1px solid var(--border); border-radius: 15px; background: rgba(7,16,39,.92); box-shadow: var(--shadow); backdrop-filter: blur(14px); }
.sticky-actions--wide { align-items: center; flex-wrap: wrap; }
.sticky-actions--wide > div { margin-right: auto; }
.sticky-actions--wide span, .sticky-actions--wide strong { display: block; }
.sticky-actions--wide span { color: var(--muted); font-size: 9px; }
.sticky-actions--wide strong { font-size: 22px; }
.scanner-card { max-width: 820px; margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: 22px; background: var(--card); }
.scanner-status { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .11em; }
.video-frame { position: relative; overflow: hidden; aspect-ratio: 4/3; display: grid; place-items: center; border-radius: 17px; background: #02040c; }
.video-frame video { width: 100%; height: 100%; object-fit: cover; }
#scanner-placeholder { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 10px; padding: 30px; background: radial-gradient(circle,rgba(36,107,253,.12),transparent 50%); text-align: center; }
#scanner-placeholder p { max-width: 400px; color: var(--muted); }
.scan-corners { position: absolute; width: min(62%,340px); aspect-ratio: 1; pointer-events: none; }
.scan-corners i { position: absolute; width: 45px; height: 45px; border-color: var(--cyan); }
.scan-corners i:nth-child(1){top:0;left:0;border-top:4px solid;border-left:4px solid;border-radius:10px 0 0 0}.scan-corners i:nth-child(2){top:0;right:0;border-top:4px solid;border-right:4px solid;border-radius:0 10px 0 0}.scan-corners i:nth-child(3){bottom:0;left:0;border-bottom:4px solid;border-left:4px solid;border-radius:0 0 0 10px}.scan-corners i:nth-child(4){bottom:0;right:0;border-bottom:4px solid;border-right:4px solid;border-radius:0 0 10px 0}
.scanner-message { margin: 16px 0; color: var(--muted); text-align: center; }
.scanner-card .button-row { justify-content: center; }
.scan-details { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; margin: 25px 0; }
.scan-details > div { padding: 14px 10px; border: 1px solid var(--border); border-radius: 11px; background: rgba(5,9,27,.36); }

/* Admin entities */
.data-grid { display: grid; gap: 12px; margin-top: 18px; }
.person-card, .qr-list-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 16px; padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: var(--card); }
.person-card__body h3, .person-card__body p, .person-card__body small { margin: 0; }
.person-card__body > div { display: flex; align-items: center; gap: 10px; }
.person-card__body p { margin-top: 7px; color: var(--muted); }
.person-card__body small { display: block; margin-top: 3px; color: var(--dim); }
.card-actions, .table-actions { display: flex; align-items: center; gap: 7px; }
.table-actions { justify-content: flex-end; flex-wrap: nowrap; white-space: nowrap; }
.table-actions .button,
.table-actions .icon-button,
.table-action-cell .button,
.table-action-cell .icon-button { flex: 0 0 auto; }
.zone-admin-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; margin-top: 18px; }
.zone-admin-card { position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 18px; padding: 21px; border: 1px solid color-mix(in srgb,var(--zone),transparent 70%); border-radius: 17px; background: color-mix(in srgb,var(--zone),#0d142d 92%); }
.zone-admin-card::before { content:""; position:absolute; inset:0 auto 0 0; width:5px; background:var(--zone); }
.zone-code { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 15px; background: color-mix(in srgb,var(--zone),transparent 83%); color: var(--zone); font-size: 22px; font-weight: 900; }
.zone-admin-card h3 { margin: 0; }
.zone-admin-card p { margin: 8px 0 12px; color: var(--muted); }
.level-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.level-chips span { padding: 5px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: 9px; }
.table-panel { overflow: hidden; margin-top: 18px; padding: 0; }
.table-panel .panel-title { padding: 24px 24px 0; margin-bottom: 16px; }
.table-scroll { overflow-x: auto; padding: 0 0 4px; }
.table-panel table { width: 100%; }
.table-panel table:not(.dashboard-table):not(.shift-upcoming-table) { min-width: 720px; }
.table-panel thead th:first-child,
.table-panel tbody td:first-child { padding-left: 24px; }
.table-panel thead th:last-child,
.table-panel tbody td:last-child { padding-right: 24px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 17px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); background: rgba(5,9,27,.35); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
td { min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
td strong, td small { display: block; }
td small { margin-top: 4px; color: var(--muted); }
tbody tr:last-child td { border-bottom: 0; }
.tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; margin-top: 24px; }
.tool-card { min-height: 140px; display: flex; gap: 15px; align-items: flex-start; padding: 21px; border: 1px solid var(--border); border-radius: 17px; background: var(--card); cursor: pointer; text-align: left; }
.tool-card:hover { border-color: var(--blue-2); }
.tool-card > span { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: rgba(36,107,253,.15); color: #9db8fa; font-size: 21px; }
.tool-card h3 { margin: 2px 0 8px; }
.tool-card p { margin: 0; color: var(--muted); line-height: 1.55; }
.selection-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.selection-toolbar h2 { margin: 5px 0; }
.selection-toolbar p:last-child { margin: 0; color: var(--muted); }
.qr-stop-groups { display: grid; gap: 15px; }
.checkbox-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.check-card { cursor: pointer; }
.check-card > input { position: absolute; opacity: 0; }
.check-card > span { min-height: 64px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 11px; background: rgba(5,9,27,.4); }
.check-card input:checked + span { border-color: var(--blue-2); background: rgba(36,107,253,.15); box-shadow: inset 0 0 0 1px rgba(61,130,255,.14); }
.check-card b { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; background: rgba(88,112,154,.12); color: var(--muted); }
.check-card strong, .check-card small { display: block; }
.check-card strong { font-size: 11px; }
.check-card small { color: var(--muted); font-size: 9px; margin-top: 3px; }
.check-card i { color: var(--green); }
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 17px; }
.segmented--buttons { padding: 4px; border: 1px solid var(--border); border-radius: 12px; background: rgba(5,9,27,.45); }
.segmented--buttons button { min-width: auto; height: 34px; border: 0; background: transparent; }
.search-box { min-width: min(100%,330px); display: grid; grid-template-columns: minmax(0,1fr) auto; }
.search-box input { height: 42px; padding: 0 13px; border-radius: 11px 0 0 11px; }
.search-box button { width: 44px; border: 1px solid var(--border); border-left: 0; border-radius: 0 11px 11px 0; background: var(--card-2); cursor: pointer; }
.qr-list { display: grid; gap: 12px; }
.qr-mini { width: 84px; height: 84px; display: grid; place-items: center; padding: 4px; border-radius: 10px; background: white; }
.qr-mini canvas { width: 76px; height: 76px; image-rendering: pixelated; }
.qr-list-card__body h3 { margin: 0; }
.qr-list-card__body p { margin: 6px 0; color: var(--muted); }
.qr-list-card__body small, .qr-list-card__body code { display: block; }
.qr-list-card__body small { color: var(--dim); }
.qr-list-card__body code { margin-top: 5px; font-size: 9px; }
.qr-view-layout { display: grid; grid-template-columns: minmax(380px,.9fr) minmax(0,1.1fr); gap: 18px; }
.qr-display { padding: 25px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.qr-paper { width: min(100%,500px); margin: auto; padding: 34px; border-radius: 16px; background: white; color: #091024; text-align: center; }
.qr-paper canvas { width: min(100%,360px); height: auto; image-rendering: pixelated; }
.qr-paper h2 { margin: 18px 0 4px; }
.qr-paper p { margin: 0; color: #536078; }
.qr-display .button-row { justify-content: center; margin-top: 18px; }
.detail-list { margin: 0; }
.detail-list > div { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.detail-list > div:last-child { border-bottom: 0; }
.history-metrics { margin-bottom: 18px; }
.history-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; padding: 16px; }
.audit-search { flex: 1 1 460px; max-width: 620px; min-width: 0; }
.audit-list { display: grid; gap: 12px; }
.audit-card { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr); gap: 14px; padding: 17px; border: 1px solid var(--border); border-left: 4px solid var(--blue-2); border-radius: 16px; background: var(--card); }
.audit-card--success { border-left-color: var(--green); }
.audit-card--danger { border-left-color: var(--red); }
.audit-card--info { border-left-color: var(--cyan); }
.audit-card__icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: rgba(61,130,255,.13); color: #9db8fa; font-weight: 900; }
.audit-card--success .audit-card__icon { background: rgba(0,197,106,.12); color: #77edb4; }
.audit-card--danger .audit-card__icon { background: rgba(240,68,68,.13); color: #ff9f9f; }
.audit-card__body { min-width: 0; }
.audit-card__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.audit-card__head strong { min-width: 0; overflow-wrap: anywhere; font-size: 14px; letter-spacing: .03em; }
.audit-meta { display: grid; grid-template-columns: 1.1fr 1fr auto; gap: 12px; margin: 0; }
.audit-meta div { min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: rgba(5,9,27,.26); }
.audit-meta dt { color: var(--muted); font-size: 9px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.audit-meta dd { margin: 5px 0 0; color: var(--text); font-size: 12px; font-weight: 760; overflow-wrap: anywhere; }

/* Reports and incidents */
.incident-list, .activity-list { display: grid; gap: 12px; }
.incident-card { padding: 20px; border: 1px solid var(--border); border-left: 5px solid var(--blue-2); border-radius: 15px; background: var(--card); }
.incident-card--media { border-left-color: var(--orange); }
.incident-card--alta, .incident-card--critica { border-left-color: var(--red); }
.incident-card__head { display: flex; justify-content: space-between; gap: 16px; }
.incident-card__head span { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.incident-card h3 { margin: 5px 0; }
.incident-card > p { color: var(--muted); line-height: 1.6; }
.incident-meta { display: flex; gap: 18px; color: var(--dim); font-size: 11px; }
.incident-card .card-actions { justify-content: flex-end; margin-top: 15px; }
.split-layout { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; align-items: start; }
.split-layout > .panel,
.split-layout > .table-panel { min-width: 0; height: 100%; }
.split-layout > .table-panel { display: flex; flex-direction: column; }
.split-layout > .table-panel .table-scroll { flex: 1 1 auto; }
.shift-live-layout { margin-top: 22px; grid-template-columns: 1fr; gap: 22px; }
.shift-live-layout > .panel { padding: 24px; }
.shift-live-layout > .panel .panel-title { margin-bottom: 16px; }
.shift-live-layout .activity-list article { grid-template-columns: auto minmax(0,1fr); align-items: start; }
.shift-live-layout .activity-list time { grid-column: 2; white-space: normal; line-height: 1.45; }
.shift-upcoming-table { min-width: 760px; table-layout: fixed; }
.shift-upcoming-table th:nth-child(1),
.shift-upcoming-table td:nth-child(1) { width: 26%; }
.shift-upcoming-table th:nth-child(2),
.shift-upcoming-table td:nth-child(2) { width: 21%; }
.shift-upcoming-table th:nth-child(3),
.shift-upcoming-table td:nth-child(3),
.shift-upcoming-table th:nth-child(4),
.shift-upcoming-table td:nth-child(4) { width: 19%; }
.shift-upcoming-table th:nth-child(5),
.shift-upcoming-table td:nth-child(5) { width: 15%; }
.shift-upcoming-table th,
.shift-upcoming-table td { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.shift-upcoming-table .badge { white-space: nowrap; }
.shift-schedules-table { margin-top: 42px; }
.date-filter { display: flex; align-items: end; gap: 10px; }
.date-filter label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 760; }
.date-filter input { height: 36px; padding: 0 10px; color-scheme: dark; }
.report-zones { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.report-zones article { padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--card); }
.report-zones article > div:first-child { position: relative; }
.report-zones article > div:first-child i { display: block; width: 26px; height: 4px; margin-bottom: 10px; border-radius: 99px; background: var(--zone); }
.report-zones span { color: var(--zone); font-size: 10px; font-weight: 850; }
.report-zones h3 { margin: 5px 0 14px; }
.report-zones > article > strong { font-size: 26px; }
.report-zones small { display: block; margin-top: 8px; color: var(--muted); }
.activity-list article { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 13px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 13px; background: var(--card); }
.activity-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 10px; background: rgba(0,197,106,.12); color: #77edb4; }
.activity-list strong, .activity-list p { margin: 0; }
.activity-list p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.activity-list time { color: var(--muted); font-size: 11px; }
.danger-zone p { color: var(--muted); line-height: 1.65; }
.danger-zone hr { margin: 26px 0; border: 0; border-top: 1px solid var(--border); }
.danger-zone code { display: block; margin: 9px 0; padding: 12px; border-radius: 9px; background: #070d1f; }

/* Toasts */
.toast-root { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 10px; pointer-events: none; }
.toast { min-width: 280px; max-width: 430px; padding: 14px 17px; border: 1px solid var(--border); border-radius: 12px; background: #111a35; box-shadow: var(--shadow); color: var(--text); opacity: 0; transform: translateY(12px); transition: .2s ease; }
.toast.is-visible { opacity: 1; transform: none; }
.toast--success { border-color: rgba(0,197,106,.45); }
.toast--error { border-color: rgba(240,68,68,.5); }
.toast--info { border-color: rgba(61,130,255,.45); }

@media (max-width: 1180px) {
  .module-grid, .checkbox-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .stop-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .profile-overview { grid-template-columns: 1fr 1fr; }
  .profile-card--compact { grid-row: span 2; }
  .profile-overview--calm { grid-template-columns: 1fr; }
  .profile-card--wide { grid-template-columns: auto minmax(0,1fr); }
  .profile-card--wide dl { grid-column: 1/-1; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .profile-summary-row { grid-template-columns: 1fr; }
  .shift-live-layout { grid-template-columns: 1fr; }
  .login-copy h1 { font-size: 52px; }
}

@media (max-width: 900px) {
  :root { --sidebar: 275px; }
  .app-shell { display: block; }
  .app-shell.menu-collapsed .sidebar { display: flex; }
  .sidebar { position: fixed; left: 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: var(--shadow); }
  .menu-open .sidebar { transform: translateX(0); }
  .menu-overlay { position: fixed; z-index: 25; inset: 0; border: 0; background: rgba(0,0,0,.5); }
  .menu-open .menu-overlay { display: block; }
  .mobile-only { display: inline-grid; }
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 380px; padding: 30px; }
  .login-copy { margin: 50px 0 0; }
  .login-copy h1 { font-size: clamp(36px,8vw,58px); }
  .building-graphic { position: absolute; right: 20px; bottom: 0; opacity: .3; }
  .login-panel { padding: 28px 18px 50px; }
  .topbar { padding: 0 18px; }
  .profile-layout, .qr-view-layout, .split-layout { grid-template-columns: 1fr; }
  .profile-layout { grid-template-columns: 1fr; }
  .profile-overview { grid-template-columns: 1fr; }
  .profile-card--compact { grid-row: auto; }
  .profile-card { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 18px; text-align: left; }
  .profile-card .avatar { margin: 0; }
  .profile-card--wide { grid-template-columns: 1fr; text-align: center; }
  .profile-card--wide .avatar { margin: auto; }
  .profile-card--wide .profile-card__badges { justify-content: center; }
  .profile-card--wide dl { grid-template-columns: 1fr; text-align: left; }
  .profile-overview--calm .profile-info-card__details { grid-template-columns: 1fr; }
  .zone-admin-grid { grid-template-columns: 1fr; }
  .tool-grid { grid-template-columns: 1fr; }
  .stop-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .content { padding: 24px 14px 72px; }
  .topbar { height: 66px; }
  .topbar-title span { display: none; }
  .status-pill { padding: 7px 9px; font-size: 8px; }
  .page-heading { display: grid; align-items: start; }
  .page-heading h1 { font-size: 29px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .metrics-grid, .metrics-grid--three, .module-grid, .module-grid--agent, .zone-strip, .report-zones, .checkbox-grid, .form-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 105px; }
  .module-card { min-height: 120px; }
  .agent-hero { grid-template-columns: auto minmax(0,1fr); align-items: start; }
  .shift-card { grid-column: 1/-1; min-width: 0; }
  .selection-toolbar { display: grid; }
  .filter-bar { align-items: stretch; flex-direction: column; }
  .segmented--buttons { overflow-x: auto; }
  .segmented--buttons button { white-space: nowrap; }
  .search-box { min-width: 0; }
  .person-card, .qr-list-card { align-items: start; grid-template-columns: auto minmax(0,1fr); }
  .person-card .card-actions, .qr-list-card .card-actions { grid-column: 1/-1; justify-content: flex-end; }
  .zone-admin-card { grid-template-columns: auto minmax(0,1fr); }
  .zone-admin-card .card-actions { grid-column: 1/-1; justify-content: flex-end; }
  .stop-grid { grid-template-columns: 1fr; }
  .sticky-actions { position: static; flex-direction: column; }
  .sticky-actions .button { width: 100%; }
  .sticky-actions--wide > div { width: 100%; }
  .scan-details { grid-template-columns: repeat(2,1fr); }
  .scanner-card { padding: 14px; }
  .video-frame { aspect-ratio: 3/4; }
  .profile-card { grid-template-columns: 1fr; text-align: center; }
  .profile-card .avatar { margin: auto; }
  .detail-grid { grid-template-columns: 1fr; }
  .dashboard-table-title { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 10px; }
  .dashboard-table-action { width: auto; align-self: start; }
  .dashboard-table { min-width: 720px; }
  .dashboard-table th, .dashboard-table td { padding-left: 14px; padding-right: 14px; }
  .photo-field { align-items: stretch; flex-direction: column; }
  .photo-field .button { width: 100%; }
  .form-actions { flex-direction: column-reverse; }
  .form-actions .button { width: 100%; }
  .qr-paper { padding: 20px; }
  .detail-list > div { grid-template-columns: 1fr; gap: 5px; }
  .incident-card__head { flex-direction: column; }
  .activity-list article { grid-template-columns: auto minmax(0,1fr); }
  .activity-list time { grid-column: 2; }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .audit-search { width: 100%; max-width: none; flex-basis: auto; }
  .audit-meta { grid-template-columns: 1fr; }
  .login-card { padding: 25px 20px; }
  .login-visual { min-height: 320px; }
  .login-copy > p:last-child { font-size: 15px; }
  .building-graphic { height: 150px; }
}


@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: auto; padding: 30px 30px 34px; }
  .login-theme-switch { position: relative; top: auto; right: auto; width: min(100%, 260px); margin: 0 0 24px auto; }
  .login-brand-card { width: 190px; }
  .login-copy { margin: 28px 0 0; }
  .login-copy h1 { font-size: clamp(38px, 8vw, 58px); }
  .login-features { max-width: none; }
  .login-site-note { margin-top: 24px; }
  .login-panel { padding: 36px 18px 50px; }
}

@media (max-width: 620px) {
  .login-visual { min-height: auto; padding: 22px 18px 28px; }
  .login-theme-switch { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 18px; }
  .login-theme-switch button { min-height: 36px; }
  .login-brand-card { width: 152px; padding: 6px; border-radius: 18px; }
  .login-brand-card img { border-radius: 14px; }
  .login-copy { margin-top: 24px; }
  .login-kicker { font-size: 9px; }
  .login-copy h1 { font-size: clamp(36px, 12vw, 48px); }
  .login-description { margin-top: 17px; font-size: 14px; }
  .login-features { grid-template-columns: 1fr; margin-top: 22px; }
  .login-features article { min-height: 76px; }
  .login-site-note { line-height: 1.6; }
  .login-panel { padding: 25px 12px 38px; }
  .login-panel::before { display: none; }
  .login-card { padding: 25px 19px; border-radius: 22px; }
  .login-card__brand img { width: 48px; height: 48px; }
  .login-card__head h2 { font-size: 27px; }
  .system-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
    font-size: 11px;
  }
}

@media print {
  body { background: white; }
  .sidebar, .topbar, .page-heading, .qr-display .button-row, .qr-view-layout > .panel, .toast-root { display: none !important; }
  .app-shell, .shell-main, .content, .qr-view-layout { display: block; padding: 0; margin: 0; }
  .qr-display { border: 0; box-shadow: none; background: white; }
  .qr-paper { width: 100%; max-width: 620px; color: black; }
}

/* Módulos añadidos en la versión web 3.0.3. Se reutiliza la paleta existente. */
.recovery-panel { width:min(100%, 520px); margin-top:18px; }
.recovery-panel form { display:grid; gap:16px; }
.password-rules { margin:8px 0 4px; padding:10px 12px; border:1px solid var(--border); border-radius:12px; color:var(--muted); font-size:.82rem; line-height:1.45; }
.security-layout { align-items: stretch; }
.security-panel { position: relative; overflow: hidden; padding: 0; }
.security-panel::before { content:""; position:absolute; inset:0 0 auto; height:4px; background:linear-gradient(90deg,var(--blue-2),var(--cyan)); opacity:.9; }
.security-panel--password::before { background:linear-gradient(90deg,var(--green),var(--blue-2)); }
.security-panel__head { display:flex; align-items:center; gap:14px; padding:24px 24px 18px; border-bottom:1px solid var(--border); }
.security-panel__head span:not(.security-panel__icon) { color:var(--muted); font-size:10px; font-weight:850; letter-spacing:.12em; }
.security-panel__head h2 { margin:4px 0 0; font-size:20px; line-height:1.25; }
.security-panel__icon { width:42px; height:42px; display:grid; place-items:center; flex:0 0 auto; border-radius:13px; background:rgba(61,130,255,.13); color:#9db8fa; font-weight:900; }
.security-panel--password .security-panel__icon { background:rgba(0,197,106,.12); color:#77edb4; }
.security-panel > .field,
.security-panel > .password-rules,
.security-panel > .security-question-list { margin-left:24px; margin-right:24px; }
.security-panel > .field:first-of-type,
.security-panel > .security-question-list { margin-top:22px; }
.password-rules--security { display:flex; align-items:center; min-height:48px; padding:13px 15px; background:rgba(5,9,27,.26); }
.security-question-list { display:grid; gap:12px; }
.shift-program-panel { max-width: 1180px; }
.shift-program-panel .panel-title { padding-bottom: 14px; border-bottom: 1px solid var(--border); }
.weekly-schedule { display:grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap:14px; margin:20px 0 22px; }
.schedule-day { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; align-items:stretch; min-width:0; padding:14px; border:1px solid var(--border); border-radius:18px; background:linear-gradient(145deg,rgba(5,9,27,.28),rgba(16,24,51,.72)); }
.schedule-day-toggle.check-line { grid-column:1/-1; min-width:0; height:100%; margin:0; padding:13px 14px; border-radius:15px; background:rgba(61,130,255,.08); }
.schedule-day-toggle input { flex:0 0 auto; }
.schedule-day-toggle span { min-width:0; }
.schedule-day-toggle strong { overflow-wrap:anywhere; }
.schedule-time-field { min-width:0; display:grid; gap:7px; margin:0; }
.schedule-time-field span { color:var(--muted); font-size:9px; font-weight:850; letter-spacing:.12em; text-transform:uppercase; }
.schedule-time-field input[type="time"] { width:100%; min-width:0; min-height:48px; padding:0 14px; border:1px solid var(--border); border-radius:999px; outline:none; background:rgba(5,9,27,.45); color:var(--text); color-scheme:dark; font-size:15px; font-weight:760; }
.schedule-time-field input[type="time"]:focus { border-color:var(--blue-2); box-shadow:0 0 0 3px rgba(36,107,253,.14); }
.recipient-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; max-height:280px; overflow:auto; margin:14px 0; padding:4px; }
.security-question { display:grid; grid-template-columns:auto minmax(0,1.2fr) minmax(0,1fr); gap:12px; align-items:start; padding:14px; border:1px solid var(--border); border-radius:15px; background:rgba(5,9,27,.26); }
.security-question b { width:30px; height:30px; display:grid; place-items:center; border-radius:10px; background:rgba(61,130,255,.12); color:#9db8fa; font-size:12px; }
.security-question .field { margin-bottom:0; }
.security-question:last-of-type { border-bottom:1px solid var(--border); }
.evidence-audit-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; }
.evidence-audit-card { display:grid; grid-template-columns:112px 1fr; gap:14px; align-items:start; }
.evidence-audit-card > img,.evidence-placeholder { width:112px; height:112px; border-radius:14px; object-fit:cover; border:1px solid var(--border); }
.evidence-placeholder { display:grid; place-items:center; color:var(--muted); font-size:.72rem; text-align:center; }
.evidence-audit-card .card-actions { grid-column:1/-1; justify-content:flex-end; }
.person-card .button { white-space:nowrap; }
.form-panel .weekly-schedule input[type="time"] { min-height:48px; }

@media (max-width:760px) {
  .weekly-schedule { grid-template-columns:1fr; }
  .schedule-day { padding:12px; }
  .recipient-grid { grid-template-columns:1fr; }
  .security-question { grid-template-columns:auto minmax(0,1fr); }
  .security-question .field { grid-column:1/-1; }
  .evidence-audit-card { grid-template-columns:84px 1fr; }
  .evidence-audit-card > img,.evidence-placeholder { width:84px; height:84px; }
}

@media (max-width:460px) {
  .schedule-day { grid-template-columns:1fr; }
}
