/* =========================================================
   CLINICAL PRECISION / NEO-MEDICAL GLASS — KEMENKES RS SARDJITO
   ========================================================= */
:root {
    --bg-canvas: #F4F8F8;
    --surface: rgba(255, 255, 255, 0.82);
    --surface-strong: rgba(255, 255, 255, 0.94);

    --petrol: #00686E;
    --petrol-dark: #004E53;
    --teal: #00B5A5;
    --cyan: #00B6C7;
    --lime: #C4D62E;
    --lime-soft: rgba(196, 214, 46, 0.18);

    --ink: #0B2528;
    --ink-muted: #526B6D;
    --ink-soft: #7B9294;
    --danger: #D93848;

    --border: rgba(0, 104, 110, 0.12);
    --border-strong: rgba(0, 104, 110, 0.24);
    --shadow-soft: 0 12px 40px -12px rgba(0, 78, 83, 0.10);
    --shadow-lift: 0 22px 48px -16px rgba(0, 104, 110, 0.22);

    --ease-expo: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 12px;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-canvas);
    color: var(--ink);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.55;
}

.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-variant-numeric: tabular-nums;
}

.is-hidden {
    display: none !important;
}

/* =========================================================
   AMBIENT NEO-MEDICAL BACKGROUND
   ========================================================= */
.ambient-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.ambient-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(0, 104, 110, 0.045) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 104, 110, 0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(circle at 50% 35%, black 35%, transparent 88%);
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.42;
    animation: orbFloat 18s ease-in-out infinite alternate;
}

.orb-teal {
    width: 440px;
    height: 440px;
    top: -120px;
    left: -100px;
    background: radial-gradient(circle, rgba(0, 181, 165, 0.42), transparent 70%);
}

.orb-lime {
    width: 360px;
    height: 360px;
    top: 12%;
    right: -110px;
    background: radial-gradient(circle, rgba(196, 214, 46, 0.34), transparent 70%);
    animation-delay: -6s;
}

.orb-petrol {
    width: 480px;
    height: 480px;
    bottom: -180px;
    left: 35%;
    background: radial-gradient(circle, rgba(0, 182, 199, 0.25), transparent 70%);
    animation-delay: -11s;
}

@keyframes orbFloat {
    0%   { transform: translate3d(0, 0, 0) scale(1); }
    100% { transform: translate3d(28px, 22px, 0) scale(1.08); }
}

/* =========================================================
   LAYOUT & STAGE TRANSITIONS
   ========================================================= */
.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.glass-panel {
    background: var(--surface);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-soft);
}

.stage {
    display: none;
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.55s var(--ease-expo), transform 0.65s var(--ease-expo);
}

.stage.is-active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.stage.is-leaving {
    opacity: 0;
    transform: scale(0.97);
}

/* =========================================================
   STAGE 1: ENTRY GATE & LOCKED STATE
   ========================================================= */
#stage-entry {
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 18px;
    gap: 20px;
}

.entry-card {
    width: 100%;
    max-width: 490px;
    border-radius: var(--radius-xl);
    padding: 34px 32px 28px;
    position: relative;
    overflow: hidden;
    animation: cardEnter 0.8s var(--ease-expo) both;
}

.entry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--petrol), var(--teal), var(--lime));
}

@keyframes cardEnter {
    from { opacity: 0; transform: translateY(22px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 26px;
}

.brand-logo {
    height: 40px;
    width: auto;
    max-width: 185px;
    object-fit: contain;
    display: block;
}

.logo-svg-fallback {
    display: none;
    align-items: center;
    gap: 10px;
}

.logo-wrap.logo-fallback .brand-logo {
    display: none;
}

.logo-wrap.logo-fallback .logo-svg-fallback {
    display: flex;
}

.fallback-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.ft-top {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--cyan);
    letter-spacing: -0.02em;
}

.ft-bot {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--petrol);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--petrol);
    background: rgba(0, 181, 165, 0.10);
    border: 1px solid rgba(0, 181, 165, 0.22);
    padding: 6px 11px;
    border-radius: 999px;
    white-space: nowrap;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 0 rgba(196, 214, 46, 0.7);
    animation: limePulse 2s infinite;
    flex-shrink: 0;
}

@keyframes limePulse {
    0%   { box-shadow: 0 0 0 0 rgba(196, 214, 46, 0.75); }
    70%  { box-shadow: 0 0 0 8px rgba(196, 214, 46, 0); }
    100% { box-shadow: 0 0 0 0 rgba(196, 214, 46, 0); }
}

.entry-copy h1 {
    font-size: 1.68rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--petrol-dark);
    line-height: 1.22;
    margin-bottom: 6px;
}

.entry-copy p {
    font-size: 0.92rem;
    color: var(--ink-muted);
    margin-bottom: 24px;
}

.field-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--petrol);
    margin-bottom: 8px;
    letter-spacing: 0.01em;
}

.input-frame {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 15px;
    color: var(--ink-soft);
    pointer-events: none;
    transition: color 0.25s ease;
}

.input-frame input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.92);
    font-family: inherit;
    font-size: 0.96rem;
    font-weight: 500;
    color: var(--ink);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.input-frame input::placeholder {
    color: var(--ink-soft);
    font-weight: 400;
}

.input-frame input:focus {
    border-color: var(--teal);
    background: #FFFFFF;
    box-shadow: 0 0 0 4px rgba(0, 181, 165, 0.14);
}

.input-frame:focus-within .input-icon {
    color: var(--teal);
}

.field-error {
    min-height: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--danger);
    margin-top: 7px;
}

/* Primary Button */
.btn-primary {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 52px;
    padding: 0 26px;
    border: none;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--petrol) 0%, #00858A 100%);
    color: #FFFFFF;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    overflow: hidden;
    box-shadow: 0 10px 24px -8px rgba(0, 104, 110, 0.45);
    transition: transform 0.25s var(--ease-expo), box-shadow 0.25s ease, opacity 0.25s ease, filter 0.25s ease;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 16px 30px -10px rgba(0, 104, 110, 0.55);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-primary:disabled {
    background: #C7D7D8;
    color: #6B8284;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
    margin-top: 10px;
}

.btn-arrow {
    transition: transform 0.3s var(--ease-expo);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(4px);
}

.btn-primary.just-unlocked::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255, 255, 255, 0.48) 50%, transparent 80%);
    transform: translateX(-120%);
    animation: shimmerSweep 0.95s var(--ease-expo) forwards;
}

@keyframes shimmerSweep {
    to { transform: translateX(120%); }
}

.entry-meta {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.meta-sep {
    opacity: 0.4;
}

/* Locked View */
.locked-view {
    text-align: center;
    padding: 8px 0 4px;
    animation: cardEnter 0.6s var(--ease-expo) both;
}

.locked-icon-ring {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: var(--petrol);
    background: linear-gradient(145deg, rgba(0, 181, 165, 0.14), rgba(196, 214, 46, 0.18));
    border: 1.5px solid rgba(0, 181, 165, 0.35);
}

.locked-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: var(--petrol-dark);
    background: var(--lime-soft);
    border: 1px solid rgba(196, 214, 46, 0.55);
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.locked-view h2 {
    font-size: 1.38rem;
    font-weight: 800;
    color: var(--petrol-dark);
    letter-spacing: -0.02em;
    margin-bottom: 10px;
}

.locked-desc {
    font-size: 0.9rem;
    color: var(--ink-muted);
    margin-bottom: 22px;
}

.locked-signature {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    background: rgba(0, 104, 110, 0.05);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.locked-signature span {
    font-size: 0.75rem;
    color: var(--ink-muted);
}

.locked-signature strong {
    font-size: 0.92rem;
    color: var(--petrol);
    letter-spacing: 0.02em;
}

.micro-footer {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.admin-link {
    color: var(--petrol);
    text-decoration: none;
    font-weight: 600;
    opacity: 0.78;
    transition: opacity 0.2s ease;
}

.admin-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* =========================================================
   STAGE 2: WELCOME CINEMATIC TRANSITION + VOICE WAVE AI
   ========================================================= */
#stage-welcome {
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
}

.welcome-wrap {
    max-width: 680px;
}

.voice-wave {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 28px;
    margin-bottom: 14px;
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.voice-wave.is-speaking {
    opacity: 1;
}

.voice-wave span {
    display: block;
    width: 4px;
    height: 8px;
    border-radius: 99px;
    background: linear-gradient(180deg, var(--teal), var(--lime));
}

.voice-wave.is-speaking span {
    animation: voiceBounce 0.9s var(--ease-expo) infinite ease-in-out;
}

.voice-wave.is-speaking span:nth-child(1) { animation-delay: 0.00s; }
.voice-wave.is-speaking span:nth-child(2) { animation-delay: 0.14s; }
.voice-wave.is-speaking span:nth-child(3) { animation-delay: 0.28s; }
.voice-wave.is-speaking span:nth-child(4) { animation-delay: 0.14s; }
.voice-wave.is-speaking span:nth-child(5) { animation-delay: 0.00s; }

@keyframes voiceBounce {
    0%, 100% { height: 7px; }
    50%      { height: 26px; }
}

.reveal-mask {
    overflow: hidden;
}

.reveal-mask > span {
    display: inline-block;
    transform: translateY(110%);
    opacity: 0;
}

#stage-welcome.is-active .reveal-mask > span {
    animation: maskReveal 0.75s var(--ease-expo) forwards;
}

#stage-welcome.is-active .welcome-name > span {
    animation-delay: 0.14s;
}

#stage-welcome.is-active .welcome-sub > span {
    animation-delay: 0.28s;
}

@keyframes maskReveal {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.welcome-kicker {
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    color: var(--teal);
    margin-bottom: 10px;
}

.welcome-name {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--petrol-dark);
    line-height: 1.15;
    margin-bottom: 14px;
}

.welcome-sub {
    font-size: 1rem;
    color: var(--ink-muted);
    margin-bottom: 28px;
}

.welcome-loader {
    width: 180px;
    height: 3px;
    margin: 0 auto;
    border-radius: 99px;
    background: rgba(0, 104, 110, 0.12);
    overflow: hidden;
}

.welcome-loader-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--teal), var(--lime));
    border-radius: 99px;
}

#stage-welcome.is-active .welcome-loader-bar {
    animation: welcomeProgress 2.2s var(--ease-expo) forwards;
}

@keyframes welcomeProgress {
    from { width: 0%; }
    to   { width: 100%; }
}

/* =========================================================
   STAGE 3: VOTING CONSOLE
   ========================================================= */
#stage-voting {
    flex-direction: column;
    max-width: 1180px;
    margin: 0 auto;
    padding: 20px 18px 40px;
    gap: 24px;
    min-height: 100vh;
}

.voting-topbar {
    position: sticky;
    top: 14px;
    z-index: 20;
    border-radius: var(--radius-lg);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 13px;
}

.mini-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(0, 181, 165, 0.10);
    border: 1px solid rgba(0, 181, 165, 0.2);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 1.08rem;
    font-weight: 800;
    color: var(--petrol-dark);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.topbar-sub {
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.voter-chip {
    display: flex;
    flex-direction: column;
    padding: 5px 13px;
    border-radius: 11px;
    background: rgba(0, 104, 110, 0.06);
    border: 1px solid var(--border);
    line-height: 1.2;
}

.chip-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-soft);
    font-weight: 700;
}

.voter-chip strong {
    font-size: 0.84rem;
    color: var(--petrol-dark);
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clock-capsule {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 12px;
    background: var(--petrol-dark);
    color: #FFFFFF;
}

.clock-data {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

#live-clock-time {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.clock-date {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.74);
}

/* Step Intro */
.voting-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    margin-top: 4px;
}

.step-pills {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.step-pill {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--ink-soft);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    padding: 6px 13px;
    border-radius: 999px;
    transition: all 0.35s var(--ease-expo);
}

.step-pill.is-current {
    color: var(--petrol-dark);
    background: #FFFFFF;
    border-color: var(--teal);
    box-shadow: 0 4px 14px -4px rgba(0, 181, 165, 0.28);
}

.step-pill.is-done {
    color: var(--petrol-dark);
    background: var(--lime-soft);
    border-color: rgba(196, 214, 46, 0.65);
}

.step-connector {
    width: 24px;
    height: 2px;
    background: var(--border-strong);
    border-radius: 2px;
}

.intro-hint {
    font-size: 0.92rem;
    color: var(--ink-muted);
}

/* =========================================================
   CANDIDATES GRID & SPOTLIGHT ANIMATION
   ========================================================= */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.candidate-card {
    position: relative;
    border-radius: var(--radius-lg);
    background: var(--surface-strong);
    border: 1.5px solid var(--border);
    overflow: hidden;
    cursor: pointer;
    outline: none;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
    transition:
        transform 0.45s var(--ease-expo),
        opacity 0.4s ease,
        border-color 0.35s ease,
        box-shadow 0.45s var(--ease-expo),
        filter 0.4s ease;
    opacity: 0;
    transform: translateY(24px);
}

#stage-voting.is-active .candidate-card {
    animation: cardStagger 0.7s var(--ease-expo) forwards;
    animation-delay: var(--stagger);
}

@keyframes cardStagger {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.candidate-card:hover,
.candidate-card:focus-visible {
    transform: translateY(-6px);
    border-color: rgba(0, 181, 165, 0.48);
    box-shadow: var(--shadow-lift);
}

.candidates-grid.has-selection .candidate-card:not(.is-selected) {
    opacity: 0.58;
    transform: scale(0.97);
    filter: saturate(0.75);
}

.candidates-grid.has-selection .candidate-card:not(.is-selected):hover {
    opacity: 0.92;
    transform: translateY(-4px) scale(0.99);
    filter: saturate(1);
}

.candidate-card.is-selected {
    border-color: transparent;
    background:
        linear-gradient(#FFFFFF, #FFFFFF) padding-box,
        linear-gradient(135deg, var(--teal), var(--lime)) border-box;
    border: 2.5px solid transparent;
    transform: translateY(-8px) scale(1.015) !important;
    box-shadow: 0 24px 48px -14px rgba(0, 181, 165, 0.34);
    z-index: 2;
}

.card-media {
    position: relative;
    aspect-ratio: 3 / 3.6;
    background: linear-gradient(160deg, #E4F2F1 0%, #D4EAE8 100%);
    overflow: hidden;
}

.candidate-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.65s var(--ease-expo);
}

.candidate-photo.is-broken {
    display: none;
}

.candidate-card:hover .candidate-photo,
.candidate-card.is-selected .candidate-photo {
    transform: scale(1.05);
}

.photo-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: linear-gradient(145deg, rgba(0, 104, 110, 0.12), rgba(0, 181, 165, 0.2));
    color: var(--petrol);
}

.photo-fallback.is-visible {
    display: flex;
}

.photo-fallback span {
    font-size: 2.4rem;
    font-weight: 700;
    opacity: 0.55;
}

.photo-fallback small {
    font-size: 0.76rem;
    font-weight: 600;
    opacity: 0.7;
}

.media-gradient {
    position: absolute;
    inset: auto 0 0 0;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 46, 50, 0.25), transparent);
    pointer-events: none;
}

.candidate-no {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    color: var(--petrol-dark);
    border: 1px solid rgba(0, 104, 110, 0.12);
}

.selected-check {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--lime));
    color: #FFFFFF;
    display: grid;
    place-items: center;
    transform: scale(0.4);
    opacity: 0;
    box-shadow: 0 6px 16px rgba(0, 181, 165, 0.4);
    transition: transform 0.42s var(--ease-spring), opacity 0.28s ease;
}

.candidate-card.is-selected .selected-check {
    transform: scale(1);
    opacity: 1;
}

.check-path {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
    transition: stroke-dashoffset 0.45s var(--ease-expo) 0.12s;
}

.candidate-card.is-selected .check-path {
    stroke-dashoffset: 0;
}

.card-body {
    padding: 16px 16px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.candidate-name {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--petrol-dark);
    letter-spacing: -0.015em;
    line-height: 1.3;
    margin-bottom: 4px;
}

.candidate-role {
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-bottom: 14px;
}

.select-cta {
    margin-top: auto;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 0.82rem;
    font-weight: 700;
    background: rgba(0, 104, 110, 0.07);
    color: var(--petrol);
    transition: all 0.3s var(--ease-expo);
}

.select-cta .cta-active {
    display: none;
}

.candidate-card:hover .select-cta {
    background: rgba(0, 181, 165, 0.15);
}

.candidate-card.is-selected .select-cta {
    background: var(--petrol);
    color: #FFFFFF;
}

.candidate-card.is-selected .cta-idle {
    display: none;
}

.candidate-card.is-selected .cta-active {
    display: inline;
}

/* =========================================================
   ASPIRATION PANEL (PROGRESSIVE UNLOCK)
   ========================================================= */
.aspiration-panel {
    border-radius: var(--radius-xl);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transform: translateY(18px);
    pointer-events: none;
    border-color: transparent;
    transition:
        max-height 0.7s var(--ease-expo),
        opacity 0.5s ease,
        transform 0.6s var(--ease-expo),
        border-color 0.4s ease;
}

.aspiration-panel.is-open {
    max-height: 1200px;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    border-color: var(--border-strong);
}

.aspiration-inner {
    padding: 28px 28px 26px;
}

.aspiration-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border);
}

.aspiration-eyebrow {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--teal);
    display: block;
    margin-bottom: 4px;
}

.aspiration-head h3 {
    font-size: 1.28rem;
    font-weight: 800;
    color: var(--petrol-dark);
    letter-spacing: -0.02em;
}

.selected-summary {
    font-size: 0.88rem;
    color: var(--ink-muted);
    margin-top: 4px;
}

.selected-summary strong {
    color: var(--petrol);
}

.completion-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    background: rgba(0, 104, 110, 0.08);
    color: var(--petrol);
    border: 1px solid var(--border);
    transition: all 0.35s var(--ease-expo);
}

.completion-badge.is-ready {
    background: var(--lime-soft);
    color: var(--petrol-dark);
    border-color: rgba(196, 214, 46, 0.75);
}

.aspiration-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.label-row label {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--petrol-dark);
}

.req {
    color: var(--danger);
}

.field-status {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ink-soft);
    transition: color 0.25s ease;
}

.textarea-group.is-filled .field-status {
    color: var(--teal);
}

.textarea-group textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border-strong);
    background: rgba(255, 255, 255, 0.94);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--ink);
    resize: vertical;
    min-height: 112px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.textarea-group textarea:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 4px rgba(0, 181, 165, 0.14);
}

.textarea-group.is-filled textarea {
    border-color: rgba(0, 181, 165, 0.55);
}

.submit-bar {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.submit-note {
    font-size: 0.82rem;
    color: var(--ink-muted);
}

.btn-submit {
    min-width: 230px;
}

.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.btn-submit.is-loading .btn-label {
    opacity: 0.8;
}

.btn-submit.is-loading .btn-spinner {
    display: inline-block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =========================================================
   POPUP PANITIA 5 DETIK
   ========================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(6, 38, 41, 0.56);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s var(--ease-expo), visibility 0.4s ease;
}

.modal-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    width: 100%;
    max-width: 460px;
    border-radius: var(--radius-xl);
    padding: 30px 26px 24px;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
    transform: translateY(24px) scale(0.94);
    transition: transform 0.55s var(--ease-spring);
}

.modal-overlay.is-open .modal-card {
    transform: translateY(0) scale(1);
}

.success-ring {
    width: 62px;
    height: 62px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal), var(--lime));
    color: #FFFFFF;
    display: grid;
    place-items: center;
    box-shadow: 0 12px 28px -8px rgba(0, 181, 165, 0.55);
}

.modal-check-path {
    stroke-dasharray: 32;
    stroke-dashoffset: 32;
}

.modal-overlay.is-open .modal-check-path {
    animation: drawCheck 0.55s var(--ease-expo) 0.2s forwards;
}

@keyframes drawCheck {
    to { stroke-dashoffset: 0; }
}

.modal-title {
    font-size: 1.38rem;
    font-weight: 800;
    color: var(--petrol-dark);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.modal-subtitle {
    font-size: 0.86rem;
    color: var(--ink-muted);
    margin-bottom: 18px;
}

.panitia-photo-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(0, 104, 110, 0.12), rgba(0, 181, 165, 0.16));
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.panitia-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.panitia-photo.is-broken {
    display: none;
}

.panitia-fallback {
    position: absolute;
    inset: 0;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--petrol);
}

.panitia-fallback.is-visible {
    display: flex;
}

.panitia-fallback span {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
    font-weight: 700;
    opacity: 0.7;
}

.panitia-fallback strong {
    font-size: 1.25rem;
    font-weight: 800;
}

.panitia-sign {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 20px;
}

.sign-label {
    font-size: 0.78rem;
    color: var(--ink-muted);
}

.sign-names {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--petrol);
    letter-spacing: 0.02em;
}

.countdown-box {
    text-align: left;
}

.countdown-text {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--ink-muted);
    margin-bottom: 8px;
}

.countdown-text strong {
    color: var(--petrol-dark);
}

.countdown-track {
    width: 100%;
    height: 6px;
    border-radius: 99px;
    background: rgba(0, 104, 110, 0.12);
    overflow: hidden;
}

.countdown-bar {
    width: 100%;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--teal), var(--lime));
    transform-origin: left center;
}

/* =========================================================
   COPYRIGHT FOOTER
   ========================================================= */
.site-footer {
    width: 100%;
    text-align: center;
    padding: 18px 14px 8px;
    margin-top: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.footer-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-copyright {
    font-size: 0.77rem;
    color: var(--ink-muted);
}

.footer-copyright a {
    color: var(--petrol);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px dashed rgba(0, 104, 110, 0.35);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.footer-copyright a:hover {
    color: var(--teal);
    border-bottom-color: var(--teal);
}

/* =========================================================
   RESPONSIVE DESIGN (TABLET & SMARTPHONE)
   ========================================================= */
@media (max-width: 980px) {
    .candidates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .entry-card {
        padding: 26px 20px 22px;
    }

    .voting-topbar {
        position: static;
        padding: 14px 16px;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
    }

    .candidates-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .card-body {
        padding: 12px;
    }

    .candidate-name {
        font-size: 0.88rem;
    }

    .aspiration-inner {
        padding: 20px 16px;
    }

    .aspiration-grid {
        grid-template-columns: 1fr;
    }

    .btn-submit {
        width: 100%;
    }
}

@media (max-width: 390px) {
    .candidates-grid {
        grid-template-columns: 1fr;
    }
}