:root {
    --bg: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f7fafc;
    --surface-strong: #d8e3f0;
    --text: #162033;
    --muted: #5f7088;
    --primary: #0f4c81;
    --primary-soft: #dceefe;
    --accent: #11a39d;
    --success: #157347;
    --warning: #b45309;
    --danger: #b91c1c;
    --draft: #475569;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
    --radius-lg: 1.25rem;
    --radius-md: 0.9rem;
}

body {
    background: radial-gradient(circle at top left, #eef4ff 0%, var(--bg) 40%, #eef2f7 100%);
    color: var(--text);
    font-family: "Manrope", "Aptos", "Segoe UI", sans-serif;
    overflow-x: hidden;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -3.5rem;
    z-index: 1000;
    padding: 0.8rem 1rem;
    border-radius: 0.85rem;
    background: #10213f;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.skip-link:focus {
    top: 1rem;
    color: #fff;
}

.app-backdrop {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 8% 10%, rgba(15, 76, 129, 0.12), transparent 24%),
        radial-gradient(circle at 92% 16%, rgba(17, 163, 157, 0.08), transparent 18%),
        radial-gradient(circle at 86% 84%, rgba(45, 104, 180, 0.08), transparent 20%);
    z-index: -1;
}

img {
    max-width: 100%;
    height: auto;
}

.main-shell {
    min-height: calc(100vh - 84px);
}

.main-shell--premium {
    position: relative;
}

.main-shell--public {
    min-height: calc(100vh - 92px);
}

.content-stage {
    display: grid;
    gap: 1.25rem;
}

.app-footer {
    margin-top: 1.5rem;
    padding: 0 0 1.5rem;
}

.app-footer--public {
    margin-top: 0;
}

.app-footer__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border: 1px solid rgba(191, 219, 254, 0.56);
    border-radius: 1.15rem;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
    flex-wrap: wrap;
    backdrop-filter: blur(12px);
}

.app-footer__brand-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.app-footer__logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

.app-footer__title {
    font-size: 1rem;
    font-weight: 700;
    color: #10213f;
    margin-bottom: 0.15rem;
}

.app-footer__copy {
    color: var(--muted);
    font-size: 0.88rem;
    max-width: 34rem;
}

.app-footer__meta {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.app-footer__pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.45rem 0.82rem;
    background: rgba(219, 234, 254, 0.8);
    color: #16345f;
    font-weight: 700;
    font-size: 0.8rem;
    border: 1px solid rgba(147, 197, 253, 0.5);
}

.app-footer__credit {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.9rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(17, 163, 157, 0.14));
    border: 1px solid rgba(148, 197, 253, 0.45);
    color: #10213f;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.app-shell {
    max-width: 1440px;
}

.app-shell,
.container-fluid,
.row,
.col,
[class*="col-"] {
    min-width: 0;
}

.app-shell .row > * {
    min-width: 0;
}

.topbar-shell {
    position: relative;
    z-index: 20;
    background: linear-gradient(135deg, #10213f 0%, #1e3a5f 50%, #234b79 100%);
    color: #fff;
    box-shadow: var(--shadow);
    border-bottom: 1px solid rgba(191, 219, 254, 0.15);
}

.topbar-main {
    min-height: 76px;
    flex-wrap: nowrap;
}

.brand-lockup {
    min-width: 0;
    flex: 1 1 auto;
}

.brand-link {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
    max-width: 100%;
    width: fit-content;
}

.brand-link:hover {
    color: #fff;
}

.brand-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 4px;
    border-radius: 0.9rem;
}

.brand-logo {
    width: 52px;
    height: 52px;
    min-width: 52px;
    max-width: 52px;
    max-height: 52px;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    padding: 0.18rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}

.brand-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.12rem;
    min-width: 0;
}

.brand-title,
.brand-subtitle {
    display: block;
    min-width: 0;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    text-wrap: balance;
}

.brand-subtitle {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.76rem;
    line-height: 1.2;
    max-width: 24rem;
}

.topbar-userbar {
    flex: 0 0 auto;
    align-items: center;
    row-gap: 0.6rem;
    margin-left: 1rem;
}

.public-topbar {
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.1), transparent 24%),
        linear-gradient(135deg, #0b2241 0%, #133761 45%, #1c5a7d 100%);
}

.public-topbar__actions {
    flex: 0 0 auto;
    margin-left: 1rem;
}

.topbar-logout {
    margin: 0;
}

.topbar-logout .btn {
    min-width: 6.25rem;
}

.text-muted-soft {
    color: rgba(255, 255, 255, 0.72);
}

.topbar-subtitle {
    letter-spacing: 0.04em;
}

.user-chip {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border-radius: 999px;
    padding: 0.42rem 0.8rem;
    font-size: 0.82rem;
    max-width: 100%;
    white-space: normal;
    text-align: center;
}

.user-chip.subtle {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-card,
.app-card,
.card {
    border: 0;
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.sidebar-card {
    padding: 0.95rem;
    position: sticky;
    top: 1rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
    border: 1px solid #dbe4ef;
}

.sidebar-card__header {
    margin-bottom: 0.7rem;
}

.sidebar-section-label {
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.45rem;
}

.sidebar-link {
    display: block;
    color: var(--text);
    text-decoration: none;
    padding: 0.68rem 0.82rem;
    border-radius: 0.85rem;
    margin-bottom: 0.35rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease, color 0.16s ease;
}

.sidebar-link:hover {
    background: var(--surface-soft);
    color: var(--primary);
    border-color: #dbeafe;
    transform: translateX(2px);
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.12), rgba(17, 163, 157, 0.1));
    border-color: rgba(15, 76, 129, 0.18);
    color: #0e3e6b;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.table-responsive {
    border-radius: 1rem;
    -webkit-overflow-scrolling: touch;
}

.table-responsive .table {
    margin-bottom: 0;
    min-width: 640px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.hero-panel {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    padding: 1.55rem;
    border-radius: 1.5rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.14), transparent 28%),
        radial-gradient(circle at bottom left, rgba(15, 76, 129, 0.18), transparent 30%),
        linear-gradient(135deg, rgba(10, 31, 58, 0.98), rgba(15, 76, 129, 0.96));
    color: #f8fbff;
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
}

.hero-panel__content {
    flex: 1 1 520px;
}

.hero-panel__title {
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
    margin-bottom: 0.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-panel__copy {
    color: rgba(240, 247, 255, 0.82);
    max-width: 52rem;
}

.hero-panel__actions {
    align-items: flex-start;
}

.hero-panel .section-kicker {
    color: rgba(222, 240, 255, 0.76);
}

.premium-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.99));
}

.premium-card::after {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(15, 76, 129, 0.9), rgba(17, 163, 157, 0.82));
}

.public-shell-body {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 20%),
        radial-gradient(circle at 88% 12%, rgba(17, 163, 157, 0.12), transparent 18%),
        linear-gradient(180deg, #f6fbff 0%, #eef4fb 54%, #f8fbff 100%);
}

.public-backdrop {
    background:
        radial-gradient(circle at 10% 12%, rgba(15, 76, 129, 0.12), transparent 24%),
        radial-gradient(circle at 90% 16%, rgba(17, 163, 157, 0.1), transparent 18%),
        radial-gradient(circle at 84% 82%, rgba(56, 189, 248, 0.08), transparent 18%);
}

.public-shell {
    max-width: 1240px;
}

.public-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
    gap: 1.4rem;
    align-items: stretch;
}

.public-hero__content,
.public-hero__panel,
.public-access-card,
.public-access-aside__card {
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.08);
}

.public-hero__content {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 24%),
        radial-gradient(circle at 18% 82%, rgba(15, 76, 129, 0.16), transparent 30%),
        radial-gradient(circle at 74% 34%, rgba(17, 163, 157, 0.14), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(245, 250, 255, 0.98));
    position: relative;
    overflow: hidden;
}

.public-hero__content::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(120deg, rgba(255, 255, 255, 0.16), transparent 26%, transparent 72%, rgba(255, 255, 255, 0.2));
}

.public-hero__title {
    font-size: clamp(2.1rem, 4vw, 3.3rem);
    line-height: 1.02;
    margin-bottom: 0.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #10213f;
}

.public-hero__copy {
    color: var(--muted);
    max-width: 44rem;
    font-size: 1rem;
    margin-bottom: 1.2rem;
}

.public-hero__eyebrow {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.public-hero__eyebrow-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: rgba(255, 255, 255, 0.82);
    color: #12345a;
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.public-hero__actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.public-hero__actions .btn {
    min-width: min(100%, 20rem);
}

.public-hero__secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.95rem;
}

.public-hero__text-link {
    color: #0f4c81;
    font-weight: 700;
    text-decoration: none;
}

.public-hero__text-link:hover {
    color: #0b3b64;
    text-decoration: underline;
}

.public-trust-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.1rem;
    padding: 0;
    list-style: none;
}

.public-trust-strip__item {
    display: grid;
    gap: 0.22rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.88));
}

.public-trust-strip__item strong {
    color: #10213f;
}

.public-trust-strip__item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.public-hero__panel {
    padding: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 26%),
        radial-gradient(circle at bottom left, rgba(17, 163, 157, 0.1), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 252, 0.97));
}

.public-hero__card {
    height: 100%;
    border-radius: 1.15rem;
    padding: 1.35rem;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(219, 228, 239, 0.95);
}

.public-hero__panel-heading {
    margin-bottom: 0.95rem;
}

.public-hero__panel-title {
    font-size: 1.18rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
    color: #10213f;
    font-weight: 800;
    margin-bottom: 0.3rem;
}

.public-hero__panel-copy {
    color: var(--muted);
    margin-bottom: 0;
    font-size: 0.92rem;
}

.public-portal-list {
    display: grid;
    gap: 0.85rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.public-portal-list__item {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid #dbe4ef;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.95));
}

.public-portal-list__item strong {
    color: #10213f;
}

.public-portal-list__item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.public-portal-highlight {
    margin-top: 1rem;
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    border: 1px solid rgba(191, 219, 254, 0.92);
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(248, 250, 252, 0.96));
}

.public-portal-highlight__label {
    color: #1d4ed8;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 0.22rem;
}

.public-portal-highlight__title {
    color: #10213f;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0.3rem;
}

.public-portal-highlight__copy {
    color: #475569;
    font-size: 0.91rem;
    margin-bottom: 0;
}

.public-access-card {
    position: relative;
    padding: 1.7rem;
    background:
        radial-gradient(circle at top right, rgba(251, 191, 36, 0.14), transparent 24%),
        radial-gradient(circle at bottom left, rgba(15, 76, 129, 0.12), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 251, 255, 0.98));
    overflow: hidden;
}

.public-access-shell {
    display: grid;
    gap: 1.1rem;
}

.public-access-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
    gap: 1.2rem;
    align-items: stretch;
}

.public-access-hero__content {
    padding: 1.95rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 1.5rem;
    box-shadow: 0 24px 56px rgba(15, 23, 42, 0.08);
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.12), transparent 28%),
        radial-gradient(circle at 14% 84%, rgba(15, 76, 129, 0.16), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(245, 250, 255, 0.98));
}

.public-access-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.public-access-hero__meta-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.48rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.95);
    background: rgba(255, 255, 255, 0.86);
    color: #12345a;
    font-size: 0.82rem;
    font-weight: 700;
}

.public-access-hero__title {
    font-size: clamp(2rem, 4vw, 3.15rem);
    line-height: 1.02;
    letter-spacing: -0.03em;
    font-weight: 800;
    color: #10213f;
    margin-bottom: 0.65rem;
}

.public-access-hero__copy {
    color: var(--muted);
    font-size: 1rem;
    max-width: 42rem;
    margin-bottom: 1.25rem;
}

.public-access-hero__assurance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.public-access-hero__assurance {
    display: grid;
    gap: 0.22rem;
    padding: 1rem 1rem 1.05rem;
    border-radius: 1.05rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
}

.public-access-hero__assurance-label {
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 800;
}

.public-access-hero__assurance-value {
    color: #10213f;
    font-size: 1.05rem;
    line-height: 1.08;
    font-weight: 800;
}

.public-access-hero__assurance-copy {
    color: var(--muted);
    font-size: 0.9rem;
}

.public-access-status {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.35rem;
}

.public-access-status__item {
    display: grid;
    gap: 0.24rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.9));
}

.public-access-status__item strong {
    color: #10213f;
}

.public-access-status__item span {
    color: var(--muted);
    font-size: 0.91rem;
}

.public-access-form {
    border: 1px solid #dbe4ef;
    border-radius: 1.2rem;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
}

.public-access-form--elevated {
    position: relative;
    z-index: 1;
    height: 100%;
    display: grid;
    align-content: start;
    gap: 0;
    padding: 1.35rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.public-access-form__header {
    margin-bottom: 1rem;
}

.public-access-form__title {
    font-size: 1.4rem;
    line-height: 1.06;
    font-weight: 800;
    color: #10213f;
    letter-spacing: -0.02em;
    margin-bottom: 0.3rem;
}

.public-access-form__copy {
    color: var(--muted);
    margin-bottom: 0;
    font-size: 0.93rem;
}

.public-access-form__fields .form-control {
    min-height: 3.35rem;
    border-radius: 0.95rem;
    border-color: #d6e2ef;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.96));
    padding-inline: 0.95rem;
}

.public-access-form__fields .form-control:focus {
    border-color: rgba(17, 163, 157, 0.55);
    box-shadow: 0 0 0 0.28rem rgba(17, 163, 157, 0.12);
}

.public-access-form__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.public-access-form__actions .btn-primary {
    min-width: min(100%, 16rem);
}

.public-access-note {
    border: 1px solid #bfdbfe;
    border-radius: 1rem;
    background: linear-gradient(180deg, #eff6ff, #f8fbff);
    color: #1d4ed8;
    padding: 0.9rem 1rem;
    font-size: 0.94rem;
}

.public-access-helper {
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.95));
    padding: 0.9rem 1rem;
}

.public-access-helper__title {
    color: #10213f;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.public-access-helper__copy {
    color: var(--muted);
    font-size: 0.92rem;
}

.public-access-aside {
    display: grid;
    gap: 1rem;
}

.public-access-aside__card {
    padding: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
        linear-gradient(180deg, #ffffff, #f8fbff);
}

.public-access-aside__footer {
    display: flex;
    gap: 0.55rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.public-access-guidance {
    display: grid;
}

.public-access-guidance__card {
    padding: 1.2rem 1.3rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    border-radius: 1.35rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.97));
}

.public-access-guidance__title {
    font-size: 1.12rem;
    line-height: 1.08;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: #10213f;
    margin-bottom: 0.9rem;
}

.public-access-guidance__list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.public-access-guidance__item {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border-radius: 1rem;
    border: 1px solid #dbe4ef;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.95));
}

.public-access-guidance__item strong {
    color: #10213f;
}

.public-access-guidance__item span {
    color: var(--muted);
    font-size: 0.92rem;
}

.roster-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 1.35rem 1.45rem;
    border-radius: 1.35rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(15, 76, 129, 0.14), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 251, 255, 0.98));
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.roster-hero__content {
    max-width: 48rem;
}

.roster-hero__title {
    font-size: clamp(1.5rem, 2.4vw, 2.15rem);
    line-height: 1.06;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.55rem;
    color: #10213f;
}

.roster-hero__copy {
    color: var(--muted);
    margin-bottom: 0;
}

.roster-hero__meta {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.roster-action-note {
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.86rem;
}

.control-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    border-radius: 1.1rem;
    border: 1px solid #dbe4ef;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
}

.control-strip__field {
    min-width: 0;
}

.public-hero__actions .btn:focus-visible,
.public-access-form .btn:focus-visible,
.public-topbar__actions .btn:focus-visible,
.roster-hero .btn:focus-visible,
.control-strip .btn:focus-visible,
.control-strip .form-control:focus-visible,
.control-strip .form-select:focus-visible,
.voters-table-wrap .form-check-input:focus-visible,
.voters-table-wrap button:focus-visible,
.voters-table-wrap a:focus-visible {
    outline: 3px solid rgba(17, 163, 157, 0.32);
    outline-offset: 3px;
}

.public-hero__content :is(a, button):focus-visible,
.public-hero__panel :is(a, button):focus-visible,
.public-access-card :is(a, button, input):focus-visible,
.public-access-aside__card :is(a, button):focus-visible,
.roster-hero :is(a, button):focus-visible,
.card :is(a, button, input, select):focus-visible {
    box-shadow: 0 0 0 0.28rem rgba(17, 163, 157, 0.18);
}

.public-trust-strip__item:focus-within,
.public-portal-list__item:focus-within,
.public-access-status__item:focus-within,
.public-access-helper:focus-within,
.roster-hero:focus-within,
.voters-table__row:focus-within {
    border-color: rgba(17, 163, 157, 0.68);
    box-shadow: 0 0 0 0.22rem rgba(17, 163, 157, 0.1);
}

.lookup-hero {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.section-kicker,
.summary-label {
    color: var(--muted);
    font-size: 0.78rem;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.section-copy {
    color: var(--muted);
    max-width: 60rem;
}

.summary-box,
.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem;
    height: 100%;
}

.summary-value,
.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
}

.remote-dispatch-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.98));
    border: 1px solid #dbe4ef;
}

.remote-dispatch-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.remote-dispatch-card__metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-top: 1.25rem;
}

.remote-dispatch-metric {
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
}

.remote-dispatch-card__notes {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.remote-dispatch-note {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #16345f;
    font-size: 0.84rem;
    border: 1px solid #bfdbfe;
}

.remote-dispatch-note strong {
    font-size: 0.95rem;
}

.remote-dispatch-form {
    margin-top: 1rem;
}

.display-6 {
    font-weight: 700;
    font-size: clamp(1.9rem, 4vw, 3.5rem);
}

.btn {
    border-radius: 999px;
    padding: 0.7rem 1.15rem;
    font-weight: 600;
    white-space: normal;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    background-image: linear-gradient(135deg, #0f4c81, #11a39d);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: #0f4c81;
    background-image: linear-gradient(135deg, #0d446f, #0d908b);
}

.btn-outline-secondary {
    border-color: #cbd5e1;
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
}

.form-control,
.form-select {
    border-radius: 0.95rem;
    border-color: #cbd5e1;
    min-height: 3rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
}

.form-control:focus,
.form-select:focus {
    border-color: #7aa2d6;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.15);
}

.app-alert {
    border: 0;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.app-alert--rich {
    padding: 1rem 1.1rem;
    border: 1px solid transparent;
}

.app-alert__eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.3rem;
}

.app-alert__body {
    font-weight: 600;
}

.alert-success.app-alert--rich {
    background: linear-gradient(180deg, #f0fdf4, #ecfdf5);
    border-color: #bbf7d0;
    color: #166534;
}

.alert-error.app-alert--rich,
.alert-danger.app-alert--rich {
    background: linear-gradient(180deg, #fef2f2, #fff1f2);
    border-color: #fecaca;
    color: #991b1b;
}

.alert-warning.app-alert--rich {
    background: linear-gradient(180deg, #fff7ed, #fffbeb);
    border-color: #fed7aa;
    color: #9a3412;
}

.alert-info.app-alert--rich {
    background: linear-gradient(180deg, #eff6ff, #f0f9ff);
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.table {
    --bs-table-bg: transparent;
}

.table thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom-width: 1px;
}

.table tbody tr {
    transition: background 0.14s ease;
}

.table tbody tr:hover {
    background: rgba(248, 250, 252, 0.9);
}

.voters-table-wrap {
    border: 1px solid #e2e8f0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.95));
}

.voters-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.voters-list-header__eyebrow {
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
}

.voters-list-header__title {
    color: #10213f;
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.voters-list-header__copy {
    color: var(--muted);
    max-width: 44rem;
}

.voters-list-header__stat {
    display: grid;
    gap: 0.2rem;
    min-width: 8rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(191, 219, 254, 0.72);
    border-radius: 1rem;
    background: linear-gradient(145deg, rgba(220, 238, 254, 0.72), rgba(255, 255, 255, 0.96));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.voters-list-header__stat-label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.voters-list-header__stat-value {
    color: #10213f;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.voters-table {
    min-width: 1180px;
}

.voters-table thead th {
    padding-top: 1rem;
    padding-bottom: 1rem;
    background: rgba(248, 250, 252, 0.88);
}

.voters-table tbody td {
    padding-top: 1rem;
    padding-bottom: 1rem;
    vertical-align: top;
}

.voters-table__row + .voters-table__row td {
    border-top-color: rgba(226, 232, 240, 0.9);
}

.voter-cell-id__pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(17, 163, 157, 0.12));
    color: #123a62;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.voter-cell-primary,
.voter-cell-secondary {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.voter-cell-primary__name,
.voter-cell-secondary__value {
    font-weight: 700;
    color: #10213f;
    overflow-wrap: anywhere;
}

.voter-cell-primary__meta,
.voter-cell-secondary__label,
.voter-actions-panel__eyebrow,
.voter-actions-panel__hint {
    color: var(--muted);
    font-size: 0.78rem;
}

.voter-cell-secondary__label,
.voter-actions-panel__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.voter-channel-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #eef4ff;
    color: #16345f;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.voter-status-badge {
    min-width: 5.75rem;
    justify-content: center;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-weight: 700;
}

.voter-actions-panel {
    width: min(100%, 18rem);
    padding: 0.85rem;
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.voter-actions-panel--form {
    display: grid;
    gap: 0.7rem;
}

.voters-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.35rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
    flex-wrap: wrap;
}

.voters-pagination__summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.voters-pagination__summary-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.12), rgba(17, 163, 157, 0.12));
    color: #123a62;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.voters-pagination__controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-left: auto;
}

.voters-pagination__pages {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.voters-pagination__nav,
.voters-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.7rem;
    min-height: 2.7rem;
    padding: 0.7rem 0.95rem;
    border-radius: 0.95rem;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #fff;
    color: #16345f;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.voters-pagination__nav--next {
    background: linear-gradient(135deg, #0f4c81, #1d6ba6);
    border-color: rgba(15, 76, 129, 0.85);
    color: #fff;
    box-shadow: 0 18px 32px rgba(15, 76, 129, 0.18);
}

.voters-pagination__nav--next::after {
    content: "->";
    margin-left: 0.55rem;
    font-size: 0.88rem;
    font-weight: 800;
}

.voters-pagination__nav:hover,
.voters-pagination__page:hover {
    transform: translateY(-1px);
    border-color: rgba(17, 163, 157, 0.48);
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
    color: #10213f;
}

.voters-pagination__nav--next:hover {
    color: #fff;
    border-color: rgba(15, 76, 129, 0.92);
    box-shadow: 0 22px 36px rgba(15, 76, 129, 0.24);
}

.voters-pagination__page--active {
    border-color: rgba(15, 76, 129, 0.85);
    background: linear-gradient(135deg, #0f4c81, #1d6ba6);
    color: #fff;
    box-shadow: 0 18px 32px rgba(15, 76, 129, 0.24);
}

.voters-pagination__nav--disabled {
    color: #94a3b8;
    background: rgba(248, 250, 252, 0.9);
    box-shadow: none;
    pointer-events: none;
}

.voters-pagination__nav--disabled::after {
    opacity: 0.42;
}

.voters-pagination__ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    color: var(--muted);
    font-weight: 700;
}

.voter-actions-panel--review {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.voter-review-btn {
    border: 1px solid rgba(15, 76, 129, 0.16);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.34), transparent 42%),
        linear-gradient(135deg, #123b66, #0f4c81 48%, #11a39d);
    color: #f8fbff;
    font-weight: 700;
    letter-spacing: 0.01em;
    min-height: 2.75rem;
    box-shadow:
        0 14px 28px rgba(15, 76, 129, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.voter-review-btn:hover,
.voter-review-btn:focus {
    color: #f8fbff;
    border-color: rgba(15, 76, 129, 0.24);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.4), transparent 42%),
        linear-gradient(135deg, #10355c, #0d446f 48%, #0d908b);
    box-shadow:
        0 18px 32px rgba(15, 76, 129, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.voter-actions-panel__fields {
    display: grid;
    gap: 0.6rem;
}

.voter-actions-panel__inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.voter-actions-panel .btn {
    box-shadow: none;
}

.empty-state {
    min-height: 240px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(248,250,252,0.85));
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-weight: 700;
    font-size: 0.78rem;
}

.status-open { background: #dcfce7; color: var(--success); }
.status-paused { background: #ffedd5; color: var(--warning); }
.status-closed, .status-declared { background: #e2e8f0; color: #334155; }
.status-draft { background: #e0e7ff; color: #334155; }
.status-success { background: #dcfce7; color: var(--success); }
.status-warning { background: #ffedd5; color: var(--warning); }
.status-danger { background: #fee2e2; color: var(--danger); }
.status-active { background: #dcfce7; color: var(--success); }
.status-idle { background: #ffedd5; color: var(--warning); }
.status-offline { background: #e2e8f0; color: #334155; }

.option-card {
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    padding: 1rem;
    height: 100%;
    background: #fff;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.option-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: #93c5fd;
}

.option-card.is-selected {
    border-color: #2563eb;
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.option-photo {
    width: 72px;
    height: 72px;
    border-radius: 1rem;
    object-fit: cover;
    background: #e2e8f0;
}

.system-status-banner {
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    background: #0f172a;
    color: #e2e8f0;
}

.system-status-pill {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-online { background: #14532d; color: #dcfce7; }
.status-degraded { background: #78350f; color: #fef3c7; }
.status-server-unavailable { background: #7f1d1d; color: #fee2e2; }

.login-page-shell {
    min-height: calc(100vh - 140px);
    display: grid;
    align-items: center;
}

.login-card-shell {
    position: relative;
    padding: 1.1rem;
    border-radius: 1.9rem;
    background:
        radial-gradient(circle at top, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.25) 52%, transparent 72%),
        linear-gradient(145deg, rgba(15, 76, 129, 0.12), rgba(17, 163, 157, 0.08));
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.12);
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 460px);
    gap: 1.5rem;
    align-items: stretch;
}

.login-showcase,
.login-card {
    border: 1px solid #dbe4ef;
    border-radius: 1.5rem;
    box-shadow: var(--shadow);
}

.login-showcase {
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.14), transparent 32%),
        linear-gradient(145deg, #f8fbff 0%, #eef4ff 52%, #ffffff 100%);
}

.login-brand-mark {
    margin-bottom: 1rem;
}

.login-brand-mark__logo {
    width: 78px;
    height: 78px;
    object-fit: contain;
    object-position: center;
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.7rem;
    border: 1px solid rgba(219, 228, 239, 0.95);
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
}

.login-card-wrap {
    display: grid;
    align-items: center;
}

.login-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.08), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
    padding: 2.25rem;
}

.login-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(15, 76, 129, 0.95), rgba(17, 163, 157, 0.9));
}

.login-title {
    font-size: clamp(1.9rem, 4vw, 2.5rem);
    line-height: 1.08;
    margin-bottom: 0.75rem;
    font-weight: 800;
    color: #10213f;
    letter-spacing: -0.03em;
}

.login-copy {
    font-size: 0.98rem;
    color: var(--muted);
    max-width: 28rem;
    margin: 0 auto 1.75rem;
}

.login-feature-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.login-feature-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.72);
    padding: 1rem 1.1rem;
    backdrop-filter: blur(10px);
}

.login-feature-title {
    font-weight: 700;
    color: #10213f;
    margin-bottom: 0.35rem;
}

.login-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.login-trust-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.5rem 0.85rem;
    background: rgba(21, 59, 115, 0.08);
    color: #153b73;
    font-weight: 700;
    font-size: 0.83rem;
}

.login-form .form-control {
    min-height: 3.35rem;
}

.login-input {
    background: #fbfdff;
    border-width: 1px;
}

.login-label {
    font-weight: 700;
    color: #22304b;
}

.login-note {
    border: 1px solid #dbe4ef;
    border-radius: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(241, 245, 249, 0.88));
    color: var(--muted);
    padding: 0.9rem 1rem;
    font-size: 0.92rem;
}

.results-hero {
    border: 1px solid #dbe4ef;
    border-radius: var(--radius-lg);
    padding: 1.4rem;
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.08), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: var(--shadow);
}

.results-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.results-meta-pill,
.results-inline-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    background: #eef4ff;
    color: #16345f;
    font-weight: 600;
    font-size: 0.84rem;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.results-summary-box {
    min-height: 100%;
}

.results-position-card {
    overflow: hidden;
    border: 1px solid rgba(219, 228, 239, 0.92);
    background:
        radial-gradient(circle at top right, rgba(17, 163, 157, 0.09), transparent 26%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(248, 250, 252, 0.97));
}

.results-position-card .card-body {
    position: relative;
}

.results-metric-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.results-chart-list {
    display: grid;
    gap: 1rem;
}

.results-toolbar {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
    align-items: center;
}

.results-chart-row {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1rem 1.05rem;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.results-chart-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.75fr) minmax(240px, 0.9fr);
    gap: 1rem;
    align-items: stretch;
}

.results-chart-card,
.results-aside-card {
    border: 1px solid rgba(219, 228, 239, 0.96);
    border-radius: 1.2rem;
    background:
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 24%),
        linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.results-chart-card {
    padding: 1.1rem 1.15rem 0.95rem;
}

.results-chart-stage {
    position: relative;
    min-height: 340px;
    padding: 0.35rem 0.2rem 0;
}

.results-chart-caption {
    margin-top: 0.85rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.results-position-aside {
    display: grid;
    gap: 0.9rem;
}

.results-aside-card {
    padding: 1rem 1.05rem;
}

.results-aside-label {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
}

.results-aside-value {
    color: #10213f;
    font-size: clamp(1.05rem, 2vw, 1.4rem);
    font-weight: 800;
    line-height: 1.15;
}

.results-chart-identity,
.results-table-contestant {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.results-table-contestant__body {
    min-width: 0;
}

.results-table-contestant__meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.results-chart-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 0.7rem;
}

.results-contestant-photo,
.results-contestant-avatar {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1.15rem;
    flex-shrink: 0;
}

.results-contestant-photo {
    object-fit: cover;
    object-position: center top;
    background: linear-gradient(180deg, #f8fafc, #e2e8f0);
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.results-contestant-avatar {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0f4c81, #11a39d);
    color: #f8fbff;
    font-weight: 800;
    letter-spacing: 0.04em;
    border: 2px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}

.results-contestant-photo--sm,
.results-contestant-avatar--sm {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.8rem;
}

.results-rank-table td {
    vertical-align: middle;
}

.results-rank-table tbody tr:first-child {
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.75), rgba(240, 249, 255, 0.55));
}

.results-rank-table tbody tr:first-child:hover {
    background: linear-gradient(90deg, rgba(219, 234, 254, 0.92), rgba(240, 249, 255, 0.72));
}

.results-contestant-score {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    background: #eef4ff;
    color: #16345f;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1.2;
}

.results-chart-name {
    font-size: 1rem;
    font-weight: 700;
}

.results-chart-meta {
    color: var(--muted);
    font-size: 0.87rem;
    overflow-wrap: anywhere;
}

.results-chart-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.results-bar-track {
    height: 1rem;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.results-bar-fill {
    height: 100%;
    min-width: 0.35rem;
    border-radius: 999px;
    background: linear-gradient(90deg, #64748b, #475569);
}

.results-bar-fill.is-leader {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
}

.results-bar-fill.is-winner {
    background: linear-gradient(90deg, #16a34a, #15803d);
}

@media (max-width: 991px) {
    .sidebar-card { position: static; }
    .section-title { font-size: 1.55rem; }
    .login-layout { grid-template-columns: 1fr; }
    .results-chart-header { flex-direction: column; }
    .remote-dispatch-card__metrics { grid-template-columns: 1fr; }
    .results-chart-shell {
        grid-template-columns: 1fr;
    }
    .app-shell {
        max-width: 100%;
    }
    .public-hero {
        grid-template-columns: 1fr;
    }
    .public-access-hero,
    .public-hero__status-grid,
    .public-trust-strip,
    .public-access-status,
    .public-access-guidance__list,
    .public-access-hero__assurance-grid {
        grid-template-columns: 1fr;
    }
    .control-strip {
        grid-template-columns: 1fr;
    }
    .sidebar-shell {
        overflow-x: auto;
        padding-bottom: 0.25rem;
    }
    .sidebar-card {
        display: flex;
        gap: 0.65rem;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.85rem;
        white-space: nowrap;
    }
    .sidebar-section-label {
        margin: 0;
        flex: 0 0 auto;
    }
    .sidebar-link {
        margin-bottom: 0;
        flex: 0 0 auto;
    }
}

@media (max-width: 767px) {
    .topbar-shell .py-3,
    .main-shell .py-4 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    .brand-link {
        gap: 0.7rem;
        width: 100%;
    }

    .brand-logo {
        width: 42px;
        height: 42px;
        min-width: 42px;
        max-width: 42px;
        max-height: 42px;
    }

    .brand-title {
        font-size: 1.1rem;
    }

    .brand-subtitle {
        font-size: 0.76rem;
    }

    .topbar-main {
        align-items: flex-start !important;
        flex-direction: column;
        flex-wrap: wrap;
        min-height: 0;
    }

    .topbar-userbar {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start !important;
    }

    .public-topbar__actions {
        width: 100%;
        margin-left: 0;
        justify-content: flex-start !important;
    }

    .page-header {
        margin-bottom: 1rem;
    }

    .page-header > * {
        width: 100%;
    }

    .hero-panel {
        padding: 1.2rem;
    }

    .voters-list-header {
        flex-direction: column;
        align-items: stretch;
    }

    .voters-list-header__stat {
        min-width: 0;
    }

    .voters-pagination__controls {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
    }

    .voters-pagination__pages {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .app-footer__inner {
        align-items: flex-start;
        padding: 1.1rem;
    }

    .app-footer__brand-row {
        align-items: center;
    }

    .app-footer__meta {
        margin-left: 0;
        justify-content: flex-start;
    }

    .section-title,
    .login-title {
        line-height: 1.15;
    }

    .public-hero__content,
    .public-access-card {
        padding: 1.25rem;
    }

    .roster-hero {
        padding: 1.15rem;
    }

    .login-card-shell {
        padding: 0.8rem;
        border-radius: 1.4rem;
    }

    .btn,
    .btn-sm {
        width: 100%;
    }

    .d-flex.gap-2.flex-wrap > .btn,
    .d-flex.gap-2.flex-wrap > form,
    .page-header .btn,
    .page-header form,
    .quick-action-grid form,
    .quick-action-grid .btn {
        width: 100%;
    }

    .user-chip {
        text-align: left;
        width: 100%;
    }

    .display-6 {
        font-size: clamp(1.6rem, 8vw, 2.4rem);
    }

    .hero-panel__title {
        font-size: clamp(1.7rem, 8vw, 2.4rem);
    }

    .summary-box,
    .stat-card,
    .metric-card,
    .status-panel,
    .results-chart-row {
        padding: 0.9rem;
    }

    .results-chart-identity,
    .results-table-contestant {
        align-items: flex-start;
    }

    .results-chart-stage {
        min-height: 290px;
    }

    .results-table-contestant__meta {
        gap: 0.4rem;
    }

    .results-meta-row,
    .results-metric-inline,
    .login-trust-row,
    .results-toolbar,
    .public-hero__actions {
        gap: 0.5rem;
    }

    .results-meta-pill,
    .results-inline-stat,
    .login-trust-pill {
        width: 100%;
        justify-content: center;
    }

    .app-footer__pill {
        width: auto;
        justify-content: center;
    }

    .table-responsive .table {
        min-width: 560px;
    }

    .voters-table {
        min-width: 980px;
    }
}

@media (max-width: 575px) {
    .sidebar-card,
    .card,
    .app-card,
    .login-showcase,
    .login-card,
    .results-hero,
    .login-card-shell {
        border-radius: 1rem;
    }

    .login-showcase,
    .login-card,
    .results-hero {
        padding: 1.25rem;
    }

    .container-fluid.app-shell {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .topbar-shell .container-fluid,
    .app-footer .container-fluid {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .small,
    .text-muted,
    .results-chart-meta {
        overflow-wrap: anywhere;
    }

    .results-contestant-photo,
    .results-contestant-avatar {
        width: 3rem;
        height: 3rem;
    }

    .results-meta-pill,
    .results-inline-stat {
        font-size: 0.8rem;
    }

    .table-responsive .table {
        min-width: 520px;
    }

    .voter-actions-panel {
        width: 100%;
    }

    .voter-actions-panel__inline {
        grid-template-columns: 1fr;
    }
}
