:root {
    --primary: #068fff;
    --dark-primary: #134fa3;
    --glass-text: #eaf4ff;
    --glass-muted: #a9bed6;
    --glass-line: #ffffff20;
    --glass-panel: #0c2d50a8;
    --glass-panel-strong: #0b2747d9;
    --glass-shadow: 0 18px 55px #03152b55;
}

html { min-height: 100%; scroll-behavior: smooth; }
body {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--glass-text);
    animation: body-fade .4s ease both;
    background:
        radial-gradient(ellipse at 10% 12%, #068fff38 0, transparent 38rem),
        radial-gradient(ellipse at 88% 40%, #134fa348 0, transparent 42rem),
        linear-gradient(145deg, #061528 0%, #0a2340 48%, #07172b 100%);
}
body::before, body::after {
    position: fixed;
    z-index: -1;
    width: 31rem;
    height: 31rem;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    filter: blur(100px);
    opacity: .21;
    animation: glow-drift 17s ease-in-out infinite alternate;
}
body::before { top: -13rem; left: -10rem; background: #068fff; }
body::after { right: -14rem; bottom: -16rem; background: #315fe8; animation-delay: -8s; }
main { flex: 1; }
.app-navbar {
    position: sticky;
    z-index: 1030;
    top: 0;
    border-bottom: 1px solid #ffffff13;
    background: #06172bbd;
    box-shadow: 0 8px 26px #020d1b32;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    transition: background .25s ease, box-shadow .25s ease;
}
.app-navbar.navbar-scrolled { background: #06172be8; box-shadow: 0 10px 32px #020d1b60; }
.app-navbar .navbar-brand { letter-spacing: -.04em; }
.app-navbar .nav-link, .app-navbar .navbar-text { color: #d7e8fb; font-size: .91rem; }
.app-navbar .nav-link:hover { color: #fff !important; }
.navbar-toggler { border-color: #ffffff45; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem #068fff55; }
main.container { padding-top: clamp(1.7rem, 4vw, 3.5rem) !important; padding-bottom: 4rem !important; }
.app-footer {
    border-top: 1px solid #ffffff14;
    color: #a9bed6;
    background: #061528aa;
    backdrop-filter: blur(14px);
}
.surface-card, .candidate-card, .stat-card, .vote-card, .glass-panel {
    border: 1px solid var(--glass-line);
    border-radius: 1.35rem;
    color: var(--glass-text);
    background: linear-gradient(145deg, #ffffff12, #ffffff06);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}
.surface-card, .candidate-card, .stat-card, .vote-card, .btn, .candidate-detail-button {
    transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background-color .28s ease;
}
.text-secondary, .stat-label, .vote-total-label, .vote-total-caption, .vote-step-label, .vote-card-status { color: var(--glass-muted) !important; }
.text-dark, .text-body { color: var(--glass-text) !important; }
.text-primary { color: #75c4ff !important; }
.eyebrow { color: #91d0ff !important; }
.section-title { color: #f2f8ff; }
.hero {
    position: relative;
    overflow: hidden;
    border: 1px solid #ffffff27;
    background: linear-gradient(120deg, #134fa3dd, #068fff9c 65%, #315fe899);
    box-shadow: 0 22px 65px #068fff24;
    backdrop-filter: blur(14px);
}
.hero .eyebrow { color: #d7efff !important; }
.hero .stat-value { color: #134fa3; }
.hero .live-pill { border-color: #9fd9b6; color: #146b3c; background: #e8fff1; }
.hero .live-pill .live-dot { background: #24a45f; box-shadow: 0 0 0 4px #24a45f20; }
.hero::after {
    position: absolute;
    top: -8rem;
    right: -6rem;
    width: 22rem;
    height: 22rem;
    border: 1px solid #ffffff2a;
    border-radius: 50%;
    content: "";
    box-shadow: 0 0 0 2.5rem #ffffff08, 0 0 0 5rem #ffffff05;
}
.hero > .row { position: relative; z-index: 1; }
.stat-value { color: #fff; }
.brand-light { color: #8bd1ff; }
.candidate-card { overflow: hidden; height: 100%; }
.candidate-card:hover, .vote-card:hover, .stat-card:hover { transform: translateY(-5px); border-color: #68baff6b; box-shadow: 0 25px 60px #068fff24; }
.candidate-photo-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: linear-gradient(145deg, #164b7b, #0d2b4d);
}
.candidate-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s cubic-bezier(.2,.8,.2,1);
}
.candidate-card:hover .candidate-photo { transform: scale(1.045); }
.candidate-photo-frame::after {
    position: absolute;
    inset: 40% 0 0;
    background: linear-gradient(transparent, #06172be8);
    content: "";
    pointer-events: none;
}
.candidate-photo-frame .candidate-number {
    position: absolute;
    z-index: 1;
    top: 1rem;
    left: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid #ffffff6b;
    color: #fff;
    background: #068fffce;
    box-shadow: 0 8px 25px #03152b6b;
    font-size: 1.05rem;
}
.candidate-photo-frame .candidate-photo-name {
    position: absolute;
    z-index: 1;
    right: 1.2rem;
    bottom: 1.15rem;
    left: 1.2rem;
    color: #fff;
    font-size: clamp(1.2rem, 2vw, 1.65rem);
    font-weight: 750;
    letter-spacing: -.035em;
    line-height: 1.15;
    text-shadow: 0 3px 20px #0009;
}
.candidate-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    color: #d7edff;
    background: radial-gradient(circle at 50% 30%, #1a69a6, #0b2747 70%);
    font-size: 5rem;
    font-weight: 800;
}
.candidate-photo-frame .candidate-placeholder, .candidate-detail-hero .candidate-placeholder { height: 100%; }
.candidate-number {
    display: inline-flex;
    min-width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    background: var(--primary);
    font-weight: 750;
}
.candidate-card .candidate-meta { padding: 1rem 1.2rem 1.25rem; }
.candidate-detail-button {
    width: 100%;
    border: 1px solid #8ccfff58;
    border-radius: .85rem;
    color: #dcf1ff;
    background: #068fff18;
}
.candidate-detail-button:hover { transform: translateY(-2px); border-color: #80caff; color: #fff; background: #068fff36; box-shadow: 0 8px 24px #068fff24; }
.surface-card { background: linear-gradient(145deg, #ffffff12, #ffffff08); }
.surface-card .table { --bs-table-color: #eaf4ff; --bs-table-bg: transparent; --bs-table-hover-color: #fff; --bs-table-hover-bg: #ffffff0b; }
.surface-card .table > :not(caption) > * > * { border-bottom-color: #ffffff16; }
.table thead { color: #a9d9ff; }
.candidate-card .border-top, .vote-card .border-top { border-color: #ffffff20 !important; }
.chart-wrap { min-height: 280px; }
.form-control, .form-select {
    border-color: #ffffff2b;
    border-radius: .8rem;
    color: #f1f7ff;
    background: #03172b75;
}
.form-control::placeholder { color: #9ab0c9; }
.form-control:focus, .form-select:focus {
    border-color: #068fff;
    color: #fff;
    background: #03172bc9;
    box-shadow: 0 0 0 .22rem #068fff30;
}
.form-control:disabled { color: #a9bed6; background: #ffffff09; }
.form-select option { color: #17324d; }
.form-label { color: #e0efff; font-weight: 600; }
.btn { border-radius: .8rem; }
.btn-primary { border-color: #068fff; background: #068fff; box-shadow: 0 7px 22px #068fff35; }
.btn-primary:hover { transform: translateY(-2px); border-color: #3caaff; background: #087cda; box-shadow: 0 12px 30px #068fff55; }
.btn-outline-primary { border-color: #63baff; color: #a9ddff; }
.btn-outline-primary:hover { color: #fff; background: #068fff; }
.btn-outline-light:hover { color: #123457; }
.alert { border: 1px solid #ffffff20; border-radius: 1rem; backdrop-filter: blur(14px); }
.alert-success { color: #d1ffe5; background: #107f4b65; }
.alert-danger { color: #ffe1e6; background: #a92c4565; }
.alert-warning { color: #fff1c8; background: #8e682765; }
.alert-info { color: #d8f1ff; background: #17618d65; }
.modal-backdrop.show { opacity: .72; backdrop-filter: blur(6px); }
.modal-content {
    overflow: hidden;
    border: 1px solid #ffffff38;
    border-radius: 1.35rem;
    color: #edf6ff;
    background: linear-gradient(145deg, #102d4beF, #091d34f5);
    box-shadow: 0 30px 90px #0008;
    backdrop-filter: blur(22px);
}
.modal-header, .modal-footer { border-color: #ffffff1b; }
.modal .btn-close { filter: invert(1); }
.candidate-detail-hero { position: relative; overflow: hidden; aspect-ratio: 3 / 4; border-radius: 1rem; background: #0d2b4d; }
.candidate-detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.candidate-detail-hero .candidate-placeholder { font-size: 4rem; }
.candidate-detail-block { padding: 1rem 0; border-bottom: 1px solid #ffffff17; }
.candidate-detail-block:last-child { border-bottom: 0; }
.page-enter { animation: glass-enter .55s cubic-bezier(.2,.75,.25,1) both; }
.page-enter-delay-1 { animation-delay: .08s; }
.page-enter-delay-2 { animation-delay: .16s; }
.page-enter-delay-3 { animation-delay: .24s; }
.vote-pulse { animation: vote-pulse .42s ease; }
.vote-card { background: linear-gradient(145deg, #ffffff14, #ffffff08); }
.vote-total { color: #eff8ff; }
.vote-minus { color: #e0efff; background: #ffffff19; }
.vote-minus:hover:not(:disabled) { color: #fff; background: #ffffff2c; }
.vote-card-footer { border-color: #ffffff20; }
.app-footer { color: #b7cde4; }
.live-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .38rem .7rem;
    border: 1px solid #45d99b59;
    border-radius: 999px;
    color: #b7ffdf;
    background: #45d99b13;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
}
.live-pill .live-dot { width: .45rem; height: .45rem; box-shadow: 0 0 0 4px #45d99b21; }
.empty-state { display: grid; min-height: 150px; place-content: center; gap: .6rem; color: var(--glass-muted); text-align: center; }
.empty-state-icon { color: #80caff; font-size: 2rem; }
.upload-icon { margin-inline: auto; width: 2.5rem; height: 2.5rem; border: 1px solid #75c4ff7a; border-radius: .8rem; color: #8bd1ff; font-size: 1.6rem; line-height: 2.2rem; }
.interaction-pulse { animation: interaction-pulse .35s ease; }
.place-items-center { place-items: center; }
.login-page { display: grid; min-height: calc(100vh - 150px); place-items: center; }
.login-shell {
    width: min(100%, 510px);
    padding: clamp(1.5rem, 5vw, 2.8rem);
    border: 1px solid #ffffff34;
    border-radius: 1.6rem;
    background: linear-gradient(145deg, #ffffff18, #ffffff09);
    box-shadow: 0 30px 90px #020d1b70, inset 0 1px #ffffff18;
    backdrop-filter: blur(22px);
    animation: glass-enter .65s cubic-bezier(.2,.75,.25,1) both;
}
.login-mark {
    display: grid;
    width: 3.4rem;
    height: 3.4rem;
    place-items: center;
    border: 1px solid #ffffff3b;
    border-radius: 1.1rem;
    color: #fff;
    background: linear-gradient(145deg, #068fff, #134fa3);
    box-shadow: 0 12px 28px #068fff4a;
    font-size: 1.1rem;
    font-weight: 800;
}
.login-subtitle { color: #b6cae0; }
.password-control { position: relative; }
.password-control .form-control { padding-right: 3.2rem; }
.password-toggle {
    position: absolute;
    top: 50%;
    right: .75rem;
    display: grid;
    width: 2rem;
    height: 2rem;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: .5rem;
    color: #b7cde4;
    background: transparent;
    transition: color .2s, background .2s, transform .2s;
}
.password-toggle:hover { transform: translateY(-50%) scale(1.08); color: #fff; background: #ffffff14; }
.password-toggle svg { width: 1.15rem; height: 1.15rem; }
.login-footnote { color: #91a9c2; }
.admin-candidate-photo { width: 3.5rem; height: 4.65rem; border-radius: .65rem; object-fit: cover; background: #143658; }
.upload-dropzone {
    display: grid;
    min-height: 210px;
    place-items: center;
    padding: 1.5rem;
    border: 1px dashed #8acbff7d;
    border-radius: 1.15rem;
    color: #d9edff;
    background: #068fff0b;
    cursor: pointer;
    transition: border-color .25s, background .25s, transform .25s;
}
.upload-dropzone:hover, .upload-dropzone.is-dragging { transform: scale(1.01); border-color: #068fff; background: #068fff1c; }
.upload-preview { max-width: 100%; max-height: 210px; border-radius: .85rem; object-fit: contain; }
.admin-candidate-row { transition: background .2s; }
.admin-candidate-row:hover { background: #ffffff09; }
.text-white-50 { color: #bdcfe2 !important; }

@keyframes glass-enter { from { opacity: 0; transform: translateY(18px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes body-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes vote-pulse { 0% { transform: scale(1); } 45% { transform: scale(1.16); color: #69c3ff; } 100% { transform: scale(1); } }
@keyframes interaction-pulse { 50% { transform: scale(.96); } }
@keyframes glow-drift { from { transform: translate3d(0,0,0) scale(.95); } to { transform: translate3d(35px,25px,0) scale(1.08); } }

@media (max-width: 575.98px) {
    .candidate-meta { padding: .9rem !important; }
    .candidate-photo-frame .candidate-photo-name { left: .9rem; right: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
    color: #17324d;
    background:
        radial-gradient(ellipse at 9% 9%, #068fff19 0, transparent 38rem),
        radial-gradient(ellipse at 88% 36%, #134fa314 0, transparent 42rem),
        linear-gradient(145deg, #f8fbff 0%, #edf5fd 52%, #f6f9fd 100%);
}
body::before, body::after { opacity: .09; filter: blur(115px); }
.app-navbar { background: #134fa3e8; box-shadow: 0 8px 26px #123e7226; }
.app-navbar.navbar-scrolled { background: #134fa3f5; }
.app-footer { color: #dceaff; background: #134fa3; }
.surface-card, .candidate-card, .stat-card, .vote-card, .glass-panel {
    border-color: #ffffffd9;
    color: #17324d;
    background: #ffffffbd;
    box-shadow: 0 12px 36px #134fa310, inset 0 1px #ffffffd9;
}
.surface-card:hover, .candidate-card:hover, .stat-card:hover, .vote-card:hover { border-color: #068fff4a; box-shadow: 0 18px 42px #134fa31c; }
.surface-card, .vote-card { backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.section-title, .text-dark, .text-body { color: #17324d !important; }
.text-secondary, .stat-label, .vote-total-label, .vote-total-caption, .vote-step-label, .vote-card-status { color: #61758b !important; }
.eyebrow, .text-primary { color: #0876c9 !important; }
.surface-card .table {
    --bs-table-color: #17324d;
    --bs-table-bg: transparent;
    --bs-table-hover-color: #123457;
    --bs-table-hover-bg: #068fff0b;
}
.surface-card .table > :not(caption) > * > * { border-bottom-color: #dce7f2; }
.table thead { color: #134fa3; }
.stat-value, .vote-total { color: #134fa3; }
.candidate-meta { color: #17324d; }
.candidate-meta .small.fw-semibold { color: #134fa3; }
.candidate-card .candidate-meta { color: #17324d; }
.candidate-detail-button { border-color: #068fff48; color: #134fa3; background: #068fff0a; }
.candidate-detail-button:hover { border-color: #068fff; color: #0c5ba7; background: #068fff17; box-shadow: 0 8px 24px #068fff18; }
.candidate-number { box-shadow: 0 4px 12px #068fff30; }
.candidate-photo-frame .candidate-number { color: #fff; }
.form-control, .form-select {
    border-color: #cfdeed;
    color: #17324d;
    background: #ffffffd9;
}
.form-control::placeholder { color: #8293a5; }
.form-control:focus, .form-select:focus { border-color: #068fff; color: #17324d; background: #fff; }
.form-control:disabled { color: #718198; background: #edf3fa; }
.form-label { color: #23415e; }
.form-select option { color: #17324d; }
.login-shell {
    border-color: #ffffff;
    color: #17324d;
    background: #ffffffc7;
    box-shadow: 0 25px 70px #134fa31b, inset 0 1px #fff;
}
.login-shell .display-6 { color: #17324d; }
.login-subtitle, .login-footnote { color: #657b93; }
.login-shell .form-label { color: #23415e; }
.login-shell .form-control { background: #f8fbff; }
.modal-content {
    border-color: #ffffff;
    color: #17324d;
    background: linear-gradient(145deg, #fffffffa, #f4f8fdf5);
    box-shadow: 0 30px 90px #08284938;
}
.modal-header, .modal-footer, .candidate-detail-block { border-color: #dce7f2 !important; }
.modal .btn-close { filter: none; }
.modal .text-white-50 { color: #526a82 !important; }
.modal .text-info { color: #0876c9 !important; }
.vote-card { background: #ffffffc7; }
.vote-candidate-number { color: #0876c9; }
.vote-candidate-avatar { color: #134fa3; background: linear-gradient(135deg, #dceeff, #f1f7ff); }
.vote-minus { color: #134fa3; background: #e7f1fc; }
.vote-minus:hover:not(:disabled) { color: #134fa3; background: #d9eafd; }
.vote-card-footer { border-color: #e2ebf5; }
.operator-live-badge { border-color: #b6e3cb; color: #167747; background: #f3fff8; }
.upload-dropzone { border-color: #83b9e8; color: #23415e; background: #edf6ffad; }
.upload-dropzone:hover, .upload-dropzone.is-dragging { border-color: #068fff; background: #e5f3ff; }
.upload-icon { border-color: #068fff85; color: #0876c9; }
.admin-candidate-row:hover { background: #068fff08; }
.empty-state { color: #61758b; }
.empty-state-icon { color: #068fff; }
.alert-success { color: #145a37; background: #dcf8e9dc; }
.alert-danger { color: #86293a; background: #fde7ebdc; }
.alert-warning { color: #72521e; background: #fff3d4dc; }
.alert-info { color: #155071; background: #dff4ffdc; }
.alert .btn-close { filter: none; }
.text-white-50 { color: #61758b !important; }
.vote-total-caption { color: #61758b; }
.vote-card-status { color: #61758b; }
.vote-card-footer { border-color: #e2ebf5; }
.app-navbar .account-pill { color: #fff; }
.live-pill { border-color: #45d99b59; }
.surface-card .text-secondary { color: #61758b !important; }
.candidate-detail-block .text-white-50 { color: #526a82 !important; }
