/* =============================================================================
   PQRS SaaS — self-contained stylesheet. No external framework, no CDN, no
   web font: every class the views use (grid, buttons, forms, cards, tables,
   badges, alerts, spacing/text utilities) is defined right here, and typography
   uses the OS's own UI font. This app must render correctly with nothing but
   this one file and the browser's defaults.
   ============================================================================= */

*, *::before, *::after { box-sizing: border-box; }

:root {
    --pqrs-primary: #4338ca;
    --pqrs-primary-dark: #362f9e;
    --pqrs-primary-light: #e8e6fb;
    --pqrs-ink: #14121f;
    --pqrs-muted: #4b5262;
    --pqrs-border: #d7dae2;
    --pqrs-surface: #ffffff;
    --pqrs-bg: #f3f4f8;
    --pqrs-radius: 0.75rem;
    --pqrs-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    --pqrs-shadow-lg: 0 8px 24px rgba(16, 24, 40, 0.14), 0 2px 6px rgba(16, 24, 40, 0.1);

    --pqrs-danger: #b91c1c;
    --pqrs-warning: #92400e;
    --pqrs-warning-bg: #fef3c7;
    --pqrs-info: #075985;
    --pqrs-info-bg: #cffafe;
    --pqrs-success: #166534;
    --pqrs-success-bg: #dcfce7;
    --pqrs-danger-bg: #fee2e2;

    --pqrs-sidebar-bg: #181330;
    --pqrs-sidebar-bg-active: #262048;
    --pqrs-sidebar-text: #c3c4dc;
    --pqrs-sidebar-text-active: #ffffff;
    --pqrs-sidebar-border: rgba(255, 255, 255, 0.1);
    --pqrs-sidebar-width: 17rem;

    --sa-accent: #8b5cf6;
    --sa-accent-dark: #6d28d9;
    --sa-sidebar-bg: #2e1065;
    --sa-sidebar-bg-active: #4c1d95;
    --sa-sidebar-text: #e3d6fc;

    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background-color: var(--pqrs-bg);
    color: var(--pqrs-ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--pqrs-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
hr { border: none; border-top: 1px solid var(--pqrs-border); margin: 1rem 0; }
img { max-width: 100%; }

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.25; }
h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.4rem; }
h4, .h4 { font-size: 1.2rem; }
h5, .h5 { font-size: 1.05rem; }
h6, .h6 { font-size: 0.95rem; }
.display-5 { font-size: clamp(1.9rem, 4vw, 2.75rem); font-weight: 800; line-height: 1.15; }
.display-6 { font-size: clamp(1.5rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.15; }
.lead { font-size: 1.15rem; color: var(--pqrs-muted); }
small, .small { font-size: 0.875em; }
.fw-bold { font-weight: 700; }
.fw-semibold, .fw-medium { font-weight: 600; }

/* ---- Layout: container + a simple responsive grid (flex + gap, not CSS Grid, so
   an "auto" column can still size to its own content like a Bootstrap col-auto) ---- */
.container { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 1rem; }

.row { display: flex; flex-wrap: wrap; }
.row.g-2 { gap: 0.5rem; }
.row.g-3 { gap: 1rem; }
.row.g-4 { gap: 1.5rem; }
.col-12 { flex: 1 1 100%; max-width: 100%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-sm-3, .col-sm-6, .col-md-3, .col-md-6, .col-lg-3, .col-lg-4, .col-lg-8 {
    flex: 1 1 100%;
    max-width: 100%;
}
@media (min-width: 576px) {
    .col-sm-3 { flex-basis: 25%; max-width: 25%; }
    .col-sm-6 { flex-basis: 50%; max-width: 50%; }
}
@media (min-width: 768px) {
    .col-md-3 { flex-basis: 25%; max-width: 25%; }
    .col-md-6 { flex-basis: 50%; max-width: 50%; }
}
@media (min-width: 992px) {
    .col-lg-3 { flex-basis: 25%; max-width: 25%; }
    .col-lg-4 { flex-basis: 33.3333%; max-width: 33.3333%; }
    .col-lg-8 { flex-basis: 66.6667%; max-width: 66.6667%; }
}

/* ---- Flex / display utilities ---- */
.d-flex { display: flex; }
.d-inline { display: inline; }
.d-none { display: none; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-grow-1 { flex-grow: 1; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.justify-content-end { justify-content: flex-end; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.align-self-start { align-self: flex-start; }
.align-middle { vertical-align: middle; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
@media (min-width: 768px) {
    .d-md-none { display: none; }
    .d-md-table-cell { display: table-cell; }
    .flex-md-row { flex-direction: row; }
}
@media (min-width: 992px) {
    .d-lg-inline { display: inline; }
}

/* ---- Spacing utilities (0=0, 1=.25rem, 2=.5rem, 3=1rem, 4=1.5rem, 5=3rem) ---- */
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: 1rem; } .mb-4 { margin-bottom: 1.5rem; } .mb-5 { margin-bottom: 3rem; }
.mt-1 { margin-top: .25rem; } .mt-4 { margin-top: 1.5rem; } .mt-5 { margin-top: 3rem; }
.me-1 { margin-right: .25rem; } .me-2 { margin-right: .5rem; }
.ms-1 { margin-left: .25rem; }
.mx-1 { margin-left: .25rem; margin-right: .25rem; }
.p-0 { padding: 0; } .p-4 { padding: 1.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }
.pb-2 { padding-bottom: .5rem; } .pb-5 { padding-bottom: 3rem; }
.pt-4 { padding-top: 1.5rem; }
.ps-0 { padding-left: 0; } .ps-4 { padding-left: 1.5rem; }
@media (min-width: 768px) {
    .p-md-5 { padding: 3rem; }
}

/* ---- Text utilities ---- */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-nowrap { white-space: nowrap; }
.text-wrap { white-space: normal !important; }
.text-muted { color: var(--pqrs-muted); }
.text-danger { color: var(--pqrs-danger); }
.text-success { color: #15803d; }
.text-warning { color: #b45309; }
.text-info { color: var(--pqrs-info); }
.text-primary { color: var(--pqrs-primary); }
.text-white { color: #fff; }
.text-white-50 { color: rgba(255, 255, 255, 0.7); }

.w-100 { width: 100%; }
.h-100 { height: 100%; }
.border { border: 1px solid var(--pqrs-border); }
.rounded { border-radius: 0.5rem; }
.bg-white { background-color: #fff; }
.bg-primary-subtle { background-color: var(--pqrs-primary-light); }
.bg-warning-subtle { background-color: var(--pqrs-warning-bg); }
.bg-info-subtle { background-color: var(--pqrs-info-bg); }
.bg-success-subtle { background-color: var(--pqrs-success-bg); }
.sticky-top { position: sticky; top: 0; z-index: 100; }

/* ---- Icons (inline SVG from IconHelpers) ---- */
.icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    vertical-align: -0.15em;
    flex-shrink: 0;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    font: inherit;
    font-weight: 600;
    font-size: 0.925rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.3;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 0.3rem 0.65rem; font-size: 0.825rem; }
.btn-lg { padding: 0.7rem 1.4rem; font-size: 1.05rem; }

.btn-primary { background-color: var(--pqrs-primary); border-color: var(--pqrs-primary); color: #fff; }
.btn-primary:hover, .btn-primary:focus { background-color: var(--pqrs-primary-dark); border-color: var(--pqrs-primary-dark); color: #fff; }

.btn-outline-primary { color: var(--pqrs-primary); border-color: var(--pqrs-primary); background: transparent; }
.btn-outline-primary:hover { background-color: var(--pqrs-primary); border-color: var(--pqrs-primary); color: #fff; }

.btn-outline-secondary { color: var(--pqrs-ink); border-color: var(--pqrs-border); background: #fff; }
.btn-outline-secondary:hover { background-color: var(--pqrs-bg); color: var(--pqrs-ink); }

.btn-outline-danger { color: var(--pqrs-danger); border-color: #f3b4b4; background: #fff; }
.btn-outline-danger:hover { background-color: var(--pqrs-danger-bg); color: var(--pqrs-danger); }

.btn-outline-warning { color: var(--pqrs-warning); border-color: #f2cf8b; background: #fff; }
.btn-outline-warning:hover { background-color: var(--pqrs-warning-bg); color: var(--pqrs-warning); }

.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, 0.4); background: transparent; }
.btn-outline-light:hover { background-color: rgba(255, 255, 255, 0.12); color: #fff; }

.btn-light { background-color: #fff; border-color: #fff; color: var(--pqrs-primary-dark); }
.btn-light:hover { background-color: #f1f1f6; color: var(--pqrs-primary-dark); }

.btn-link { color: var(--pqrs-primary); background: transparent; border-color: transparent; padding-left: 0.25rem; padding-right: 0.25rem; font-weight: 600; }
.btn-link:hover { text-decoration: underline; }

.btn-sa { background-color: var(--sa-accent); border-color: var(--sa-accent); color: #fff; }
.btn-sa:hover { background-color: var(--sa-accent-dark); border-color: var(--sa-accent-dark); color: #fff; }

/* ---- Filter pills ---- */
.filter-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.filter-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    border: 1px solid var(--pqrs-border);
    background: #fff;
    color: var(--pqrs-muted);
    font-size: 0.825rem;
    font-weight: 600;
    cursor: pointer;
    line-height: 1.2;
}
.filter-pill:hover { background: var(--pqrs-bg); color: var(--pqrs-ink); }
.filter-pill.active { background: var(--pqrs-primary); border-color: var(--pqrs-primary); color: #fff; }

/* ---- Forms ---- */
.form-label { display: block; font-weight: 600; font-size: 0.875rem; margin-bottom: 0.35rem; }
.form-control, .form-select {
    display: block;
    width: 100%;
    font: inherit;
    font-size: 0.95rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--pqrs-border);
    border-radius: 0.5rem;
    background-color: #fff;
    color: var(--pqrs-ink);
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--pqrs-primary);
    box-shadow: 0 0 0 3px var(--pqrs-primary-light);
}
.form-control-sm, .form-select-sm { padding: 0.35rem 0.6rem; font-size: 0.85rem; }
textarea.form-control { resize: vertical; min-height: 3rem; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%234b5262' d='M6 8 0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 0.7rem; padding-right: 2rem; }

/* ---- Cards ---- */
.card {
    background-color: var(--pqrs-surface);
    border: 1px solid var(--pqrs-border);
    border-radius: var(--pqrs-radius);
    box-shadow: var(--pqrs-shadow);
}
.card-body { padding: 1.25rem; }
.card-footer { padding: 0.85rem 1.25rem; border-top: 1px solid var(--pqrs-border); border-radius: 0 0 var(--pqrs-radius) var(--pqrs-radius); }
.card:hover.card-interactive {
    box-shadow: var(--pqrs-shadow-lg);
    transform: translateY(-1px);
    transition: box-shadow .15s ease, transform .15s ease;
}

.stat-card { border-left: 4px solid var(--pqrs-border); }
.stat-card.accent-primary { border-left-color: var(--pqrs-primary); }
.stat-card.accent-warning { border-left-color: #b45309; }
.stat-card.accent-info { border-left-color: #0369a1; }
.stat-card.accent-success { border-left-color: #15803d; }
.stat-card .stat-icon {
    width: 2.5rem; height: 2.5rem; border-radius: 0.65rem;
    display: inline-flex; align-items: center; justify-content: center;
}
.stat-card .display-6 { font-weight: 800; }

/* ---- Tables ---- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--pqrs-border); text-align: left; }
.table thead th { border-bottom-width: 2px; }
.table-hover tbody tr:hover { background-color: var(--pqrs-bg); }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
/* Wrapping table cell text on a narrow screen squishes every column into a couple of
   characters instead of scrolling; nowrap + horizontal scroll reads far better. */
.table-clean { white-space: nowrap; }
.table-clean thead th {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    color: var(--pqrs-muted);
    font-weight: 700;
}
.table-clean tbody tr.row-clickable { cursor: pointer; }
.table-clean tbody tr.row-clickable:hover { background-color: var(--pqrs-primary-light); }
.table-danger td { background-color: var(--pqrs-danger-bg); }

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.3;
}
.text-bg-secondary { background-color: #e2e4ea; color: #33384a; }
.text-bg-dark { background-color: #1f2333; color: #fff; }
.text-bg-warning { background-color: #fde68a; color: #713f12; }
.text-bg-info { background-color: #a5e9f7; color: #075985; }
.text-bg-success { background-color: #bbf0cd; color: #14532d; }
.text-bg-danger { background-color: #fca5a5; color: #7f1d1d; }
.text-bg-primary { background-color: var(--pqrs-primary); color: #fff; }

/* ---- Alerts ---- */
.alert {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.85rem 2.5rem 0.85rem 1rem;
    border-radius: 0.6rem;
    border: 1px solid transparent;
    margin-bottom: 1rem;
    font-size: 0.925rem;
}
.alert-success { background-color: var(--pqrs-success-bg); border-color: #86efac; color: var(--pqrs-success); }
.alert-danger { background-color: var(--pqrs-danger-bg); border-color: #fca5a5; color: var(--pqrs-danger); }
.alert-light { background-color: #f8f9fb; border-color: var(--pqrs-border); color: var(--pqrs-ink); }
.btn-close {
    position: absolute;
    top: 0.5rem;
    right: 0.6rem;
    border: none;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0.15rem 0.4rem;
}
.btn-close:hover { opacity: 1; }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--pqrs-muted); }
.empty-state .icon { width: 2rem; height: 2rem; display: block; margin: 0 auto 0.75rem; opacity: 0.6; }

/* =============================================================================
   App shell: sidebar + content, used by both the staff and superadmin layouts.
   Sidebar colors come from --pqrs-sidebar-* / --sa-sidebar-* (set per layout via a
   theme class on .pqrs-shell) so the two portals share structure but keep distinct
   accents. Sidebar is fixed and always visible at >=992px; below that it's an
   off-canvas panel toggled by the topbar's hamburger button.
   ============================================================================= */
.pqrs-shell { display: flex; min-height: 100vh; }
.pqrs-sidebar {
    position: fixed;
    top: 0; bottom: 0; left: 0;
    width: min(var(--pqrs-sidebar-width), 85vw);
    background-color: var(--sidebar-bg, var(--pqrs-sidebar-bg));
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform .2s ease;
    z-index: 1045;
}
.pqrs-shell.sidebar-open .pqrs-sidebar { transform: translateX(0); box-shadow: var(--pqrs-shadow-lg); }
.pqrs-sidebar-brand {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 1.25rem 1.25rem 1rem;
    color: #fff; font-weight: 700; font-size: 1.05rem;
}
.pqrs-sidebar-brand:hover { color: #fff; text-decoration: none; }
.pqrs-sidebar-nav { flex: 1; overflow-y: auto; padding: 0.5rem 0.75rem; display: flex; flex-direction: column; gap: 0.15rem; }
.pqrs-sidebar-nav .nav-link {
    color: var(--sidebar-text, var(--pqrs-sidebar-text));
    font-weight: 600;
    font-size: 0.925rem;
    border-radius: 0.55rem;
    padding: 0.6rem 0.85rem;
    display: flex; align-items: center; gap: 0.65rem;
}
.pqrs-sidebar-nav .nav-link:hover { color: #fff; background-color: rgba(255, 255, 255, 0.08); text-decoration: none; }
.pqrs-sidebar-nav .nav-link.active {
    color: var(--sidebar-text-active, var(--pqrs-sidebar-text-active));
    background-color: var(--sidebar-bg-active, var(--pqrs-sidebar-bg-active));
}
.pqrs-sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--sidebar-border, var(--pqrs-sidebar-border));
    display: flex; align-items: center; gap: 0.65rem;
}
.pqrs-sidebar-footer .name { color: #fff; font-weight: 700; line-height: 1.15; }
.pqrs-sidebar-footer .role { color: var(--sidebar-text, var(--pqrs-sidebar-text)); }

.pqrs-backdrop { position: fixed; inset: 0; background: rgba(15, 12, 30, 0.55); z-index: 1040; display: none; }
.pqrs-shell.sidebar-open .pqrs-backdrop { display: block; }

.pqrs-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pqrs-topbar {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1rem;
    background-color: var(--pqrs-surface);
    border-bottom: 1px solid var(--pqrs-border);
    position: sticky; top: 0; z-index: 1020;
}
.pqrs-topbar .brand-icon {
    width: 1.9rem; height: 1.9rem; border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--pqrs-primary), #818cf8);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.pqrs-sidebar-toggle {
    border: 1px solid var(--pqrs-border);
    background: #fff;
    border-radius: 0.5rem;
    width: 2.25rem; height: 2.25rem;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--pqrs-ink);
    cursor: pointer;
}
.pqrs-content { padding: 1.25rem 1rem 3rem; flex: 1; max-width: 100%; overflow-x: hidden; }
@media (min-width: 992px) {
    .pqrs-sidebar { transform: none; }
    .pqrs-backdrop { display: none !important; }
    .pqrs-main { margin-left: var(--pqrs-sidebar-width); }
    .pqrs-topbar { display: none; }
    .pqrs-content { padding: 2rem 2.5rem 3rem; }
}

.pqrs-avatar {
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.85rem; flex-shrink: 0;
}
/* Same idea as .pqrs-avatar but for light (card/table) backgrounds, not the dark sidebar. */
.avatar-chip {
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background-color: var(--pqrs-primary-light);
    color: var(--pqrs-primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.7rem; flex-shrink: 0;
}

/* ---- Landing page ---- */
.pqrs-hero { background: linear-gradient(180deg, #eef0fc 0%, var(--pqrs-bg) 100%); border-bottom: 1px solid var(--pqrs-border); }
.pqrs-hero .badge-pill {
    background-color: var(--pqrs-primary);
    color: #fff;
    border-radius: 999px;
    padding: 0.35rem 0.9rem;
    font-weight: 700;
    font-size: 0.8rem;
    display: inline-block;
}
.feature-card { height: 100%; border-radius: var(--pqrs-radius); }
.feature-card .feature-icon {
    width: 2.75rem; height: 2.75rem; border-radius: 0.65rem;
    background-color: var(--pqrs-primary-light);
    color: var(--pqrs-primary-dark);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 0.75rem;
}
.feature-card .feature-icon .icon { width: 1.4rem; height: 1.4rem; }
.pqrs-public-nav { background-color: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--pqrs-border); }
.pqrs-public-nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 0; }
.navbar-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; color: var(--pqrs-ink); }
.navbar-brand:hover { color: var(--pqrs-ink); text-decoration: none; }
.brand-icon {
    width: 2rem; height: 2rem; border-radius: 0.5rem;
    background: linear-gradient(135deg, var(--pqrs-primary), #818cf8);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.pqrs-public-footer { border-top: 1px solid var(--pqrs-border); color: var(--pqrs-muted); padding: 1.5rem 0; margin-top: 2rem; }
.pqrs-public-footer-inner { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center; }
.pqrs-public-footer a { color: var(--pqrs-muted); }
@media (min-width: 768px) {
    .pqrs-public-footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* ---- Auth cards (staff + superadmin login) ---- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    background: linear-gradient(180deg, #eef0fc 0%, var(--pqrs-bg) 100%);
}
.auth-card { width: 100%; max-width: 24rem; border-radius: 1rem; box-shadow: var(--pqrs-shadow-lg); }
.auth-logo {
    width: 3rem; height: 3rem; border-radius: 0.85rem;
    background: linear-gradient(135deg, var(--pqrs-primary), #818cf8);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    margin: 0 auto 1rem;
}
.auth-logo .icon { width: 1.5rem; height: 1.5rem; }

/* ---- Superadmin theme (distinct accent so it reads as a different privilege plane).
   Set as a class on .pqrs-shell so the shared sidebar CSS above picks up these vars. ---- */
.pqrs-shell.sa-theme {
    --sidebar-bg: var(--sa-sidebar-bg);
    --sidebar-bg-active: var(--sa-sidebar-bg-active);
    --sidebar-text: var(--sa-sidebar-text);
    --sidebar-text-active: #ffffff;
    --sidebar-border: rgba(255, 255, 255, 0.14);
}
.pqrs-shell.sa-theme .pqrs-topbar .brand-icon { background: linear-gradient(135deg, var(--sa-accent), #c4b5fd); }
.sa-badge {
    background-color: rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.auth-logo.sa-logo { background: linear-gradient(135deg, var(--sa-accent), #a78bfa); }

.key-chip {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    background-color: var(--pqrs-bg);
    border: 1px solid var(--pqrs-border);
    border-radius: 0.4rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    display: inline-block;
}
