/* OSIS Election System Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8fafc;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.header p {
    text-align: center;
    opacity: 0.9;
}

/* Navigation */
.nav {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav a {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav a:hover {
    background: #2563eb;
    color: white;
}

/* Candidate Cards */
.candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.candidate-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.candidate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.candidate-header {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.candidate-photos {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.candidate-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.candidate-info {
    padding: 1.5rem;
}

.candidate-info h3 {
    color: #2563eb;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.candidate-info p, .candidate-info ul {
    margin-bottom: 1rem;
    color: #666;
}

.candidate-info ul {
    padding-left: 1.5rem;
}

.candidate-info li {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-success {
    background: #16a34a;
}

.btn-success:hover {
    background: #15803d;
}

.btn-warning {
    background: #ea580c;
}

.btn-warning:hover {
    background: #dc2626;
}

.btn-center {
    display: block;
    width: fit-content;
    margin: 2rem auto;
}

/* Forms */
.form-container {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: #2563eb;
}

/* Alerts */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: #dcfce7;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

/* Progress Page */
.progress-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    margin: 2rem 0;
}

.results-list {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.result-info h4 {
    color: #2563eb;
    margin-bottom: 0.25rem;
}

.result-stats {
    text-align: right;
}

.vote-count {
    font-size: 1.5rem;
    font-weight: bold;
    color: #16a34a;
}

.vote-percentage {
    color: #666;
    font-size: 0.9rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

/* Voting Page */
.voting-container {
    max-width: 800px;
    margin: 2rem auto;
}

.vote-options {
    display: grid;
    gap: 1rem;
}

.vote-option {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vote-option:hover {
    border-color: #2563eb;
    transform: translateY(-2px);
}

.vote-option input[type="radio"] {
    margin-right: 1rem;
    transform: scale(1.2);
}

.vote-option-content {
    display: flex;
    align-items: center;
}

.vote-option-info h4 {
    color: #2563eb;
    margin-bottom: 0.5rem;
}

/* Admin Styles */
.admin-container {
    margin: 2rem 0;
}

.admin-nav {
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

.admin-nav a {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.admin-nav a:hover, .admin-nav a.active {
    background: #2563eb;
    color: white;
}

.data-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
}

.data-table tr:hover {
    background: #f8fafc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .candidates-grid {
        grid-template-columns: 1fr;
    }
    
    .candidate-photo {
        width: 100px;
        height: 100px;
    }
    
    .progress-container {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .candidate-photos {
        flex-direction: column;
        align-items: center;
    }
    
    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .admin-nav ul {
        flex-direction: column;
    }
    
    .data-table {
        overflow-x: auto;
    }
}

/* 2026 visual refresh */
:root {
    --navy: #0b1f3a;
    --blue: #1359c5;
    --cyan: #22b8cf;
    --gold: #f4b740;
    --surface: #ffffff;
    --muted: #64748b;
    --line: #dce5f0;
    --danger: #c83737;
}

html { scroll-behavior: smooth; }
body {
    color: var(--navy);
    background:
        radial-gradient(circle at 10% 0%, rgba(34,184,207,.12), transparent 30rem),
        linear-gradient(180deg, #f7fbff 0%, #eef4fa 100%);
    min-height: 100vh;
}
.container { max-width: 1240px; }
.header {
    position: relative;
    overflow: hidden;
    padding: 1.5rem 0;
    background: linear-gradient(125deg, #071a32, #0e438e 58%, #087b94);
    box-shadow: 0 12px 40px rgba(11,31,58,.2);
}
.header::after {
    content: "";
    position: absolute;
    width: 360px; height: 360px; border-radius: 50%;
    right: -100px; top: -230px;
    border: 55px solid rgba(255,255,255,.08);
}
.header h1 { letter-spacing: -.025em; }
.nav { position: sticky; top: 0; z-index: 20; padding: .65rem 0; backdrop-filter: blur(14px); background: rgba(255,255,255,.9); }
.nav a, .admin-nav a { border-radius: 999px; transition: transform .2s, background .2s, color .2s; }
.nav a:hover, .admin-nav a:hover { transform: translateY(-1px); }
.admin-nav { margin-top: 1.25rem; padding: .65rem; border: 1px solid rgba(220,229,240,.8); box-shadow: 0 10px 35px rgba(11,31,58,.08); }
.admin-nav ul { flex-wrap: wrap; }

.candidates-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.candidate-card {
    position: relative;
    border: 1px solid rgba(220,229,240,.9);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(11,31,58,.1);
    animation: riseIn .65s both;
    isolation: isolate;
}
.candidate-card:nth-child(2) { animation-delay: .08s; }
.candidate-card:nth-child(3) { animation-delay: .16s; }
.candidate-card:nth-child(4) { animation-delay: .24s; }
.candidate-card:hover { transform: translateY(-9px); box-shadow: 0 28px 65px rgba(11,31,58,.17); }
.candidate-header { position: relative; min-height: 315px; padding: 2rem 1.5rem 1.5rem; background: linear-gradient(145deg, #08294f, #116887); overflow: hidden; }
.candidate-header::before {
    content: ""; position: absolute; width: 230px; height: 230px; border-radius: 50%;
    right: -100px; top: -100px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
}
.candidate-decor { position: absolute; width: 70px; height: 5px; border-radius: 99px; right: 1.25rem; top: 1.35rem; background: linear-gradient(90deg, transparent, var(--gold)); opacity: .9; }
.candidate-number {
    display: inline-flex; align-items: center; width: fit-content;
    padding: .35rem .7rem; border-radius: 999px; font-size: .72rem; font-weight: 800; letter-spacing: .1em;
    color: #103059; background: var(--gold);
}
.candidate-header > .candidate-number { position: absolute; top: 1rem; left: 1rem; }
.candidate-photos { margin-top: 1rem; }
.candidate-photo { width: 132px; height: 158px; border-radius: 18px; border: 3px solid rgba(255,255,255,.9); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.candidate-card:hover .candidate-photo:first-child { transform: translateX(-5px) rotate(-1.5deg); }
.candidate-card:hover .candidate-photo:last-child { transform: translateX(5px) rotate(1.5deg); }
.candidate-names { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: .7rem; margin-top: .8rem; }
.candidate-names small { display: block; opacity: .72; font-size: .68rem; letter-spacing: .12em; }
.candidate-names h2, .candidate-names h3 { font-size: 1.05rem; margin: .2rem 0 0; color: white; }
.candidate-info { padding: 1.7rem 1.7rem .8rem; }
.candidate-info h3 { font-size: .75rem; letter-spacing: .12em; color: var(--blue); }
.candidate-vision { position: relative; padding: 1.15rem; border-radius: 16px; background: linear-gradient(145deg, #f5f9ff, #eef7f8); border: 1px solid #e0eaf3; }
.candidate-vision::before { content: "“"; position: absolute; right: .8rem; top: -.4rem; font: 700 4rem Georgia, serif; color: rgba(19,89,197,.12); }
.candidate-vision h3 { margin: .35rem 0 .65rem; font-size: .95rem; letter-spacing: 0; color: var(--navy); }
.candidate-vision p { margin: 0; color: #526276; line-height: 1.7; }
.section-kicker { color: var(--blue); font-size: .65rem; font-weight: 800; letter-spacing: .12em; }
.candidate-accordions { margin-top: .8rem; border-top: 1px solid var(--line); }
.candidate-accordions details { border-bottom: 1px solid var(--line); }
.candidate-accordions summary { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .95rem .15rem; cursor: pointer; list-style: none; color: var(--navy); font-weight: 750; }
.candidate-accordions summary::-webkit-details-marker { display: none; }
.candidate-accordions summary b { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: .55rem; border-radius: 50%; background: #e8f0fb; color: var(--blue); font-size: .7rem; }
.candidate-accordions summary i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; background: var(--navy); color: white; font-style: normal; transition: transform .25s, background .25s; }
.candidate-accordions details[open] summary i { transform: rotate(45deg); background: var(--blue); }
.accordion-content { padding: 0 .2rem 1rem 2.45rem; color: #526276; line-height: 1.7; animation: accordionIn .25s both; }
.candidate-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .85rem 1.7rem 1.3rem; }
.candidate-card-footer span { color: var(--muted); font-size: .7rem; letter-spacing: .04em; }
.candidate-card-footer a { color: var(--blue); text-decoration: none; font-size: .82rem; font-weight: 800; }
.candidate-card-footer a b { display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: .35rem; border-radius: 50%; background: var(--blue); color: white; transition: transform .2s; }
.candidate-card-footer a:hover b { transform: translateX(4px); }

.btn { border-radius: 999px; font-weight: 700; box-shadow: 0 7px 18px rgba(19,89,197,.2); }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(19,89,197,.28); }
.btn-secondary { background: #e8eef6; color: var(--navy); box-shadow: none; }
.btn-secondary:hover { background: #dce5f0; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #a92929; }
.form-container, .data-table, .results-list, .chart-container, .toolbar-card {
    border: 1px solid rgba(220,229,240,.9); border-radius: 20px; box-shadow: 0 16px 45px rgba(11,31,58,.09);
}
.form-group input, .form-group textarea, .form-group select, .inline-filter select { border: 1px solid var(--line); border-radius: 12px; background: #fbfdff; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { box-shadow: 0 0 0 4px rgba(19,89,197,.1); }
.toolbar-card { display: flex; justify-content: space-between; gap: 1.25rem; align-items: center; padding: 1.25rem; margin-bottom: 1rem; background: white; }
.toolbar-card p { color: var(--muted); }
.toolbar-actions, .inline-filter { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.inline-filter select { padding: .72rem; min-width: 150px; }
.file-input { max-width: 220px; padding: .55rem; border: 1px dashed var(--line); border-radius: 12px; background: #f8fbff; }
.form-group small { display: block; margin-top: .4rem; color: var(--muted); }

.vote-options { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.vote-option { border-radius: 20px; box-shadow: 0 10px 30px rgba(11,31,58,.07); position: relative; }
.vote-option.selected { border-color: var(--blue) !important; box-shadow: 0 0 0 4px rgba(19,89,197,.1), 0 16px 35px rgba(11,31,58,.12); transform: translateY(-3px); }
.vote-option-content { align-items: flex-start; gap: 1rem; }
.vote-option input { position: absolute; right: 1rem; top: 1rem; accent-color: var(--blue); }
.vote-candidate-photos { display: flex; min-width: 108px; }
.vote-candidate-photos img { width: 64px; height: 78px; object-fit: cover; border-radius: 12px; border: 2px solid white; box-shadow: 0 5px 15px rgba(11,31,58,.16); }
.vote-candidate-photos img + img { margin-left: -20px; margin-top: 14px; }
.vote-option-info h4 { margin-top: .6rem; }

.print-page { background: #edf2f7; }
.print-controls { max-width: 1100px; margin: 1rem auto; padding: .75rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.voter-card-sheet { max-width: 1100px; margin: 0 auto 2rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10mm; }
.voter-card { background: white; width: 100%; aspect-ratio: 1.586; border-radius: 12px; overflow: hidden; border: 1px solid #cbd6e3; box-shadow: 0 8px 25px rgba(11,31,58,.12); display: flex; flex-direction: column; break-inside: avoid; }
.voter-card-brand { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; align-items: center; padding: 10px 12px; color: white; background: linear-gradient(120deg, #071a32, #125dae); }
.voter-card-brand img { width: 32px; height: 32px; object-fit: contain; }
.voter-card-brand strong, .voter-card-brand span { display: block; line-height: 1.2; }
.voter-card-brand strong { font-size: 11px; letter-spacing: .08em; }
.voter-card-brand span { font-size: 7px; opacity: .76; margin-top: 2px; }
.voter-card-brand b { font-size: 10px; background: var(--gold); color: var(--navy); padding: 4px 7px; border-radius: 999px; }
.voter-card-body { padding: 12px; flex: 1; }
.voter-card-body h2 { font-size: 14px; margin-bottom: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.voter-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.voter-card dl div { background: #f0f5fa; border-radius: 7px; padding: 6px 8px; }
.voter-card dt { font-size: 7px; text-transform: uppercase; color: var(--muted); letter-spacing: .08em; }
.voter-card dd { font-size: 11px; font-weight: 800; margin: 1px 0 0; }
.voter-card footer { padding: 6px 12px; font-size: 7px; color: var(--muted); border-top: 1px solid #e5ebf2; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 3rem; }
.progress-results { display: grid; gap: 1rem; }
.result-candidate-card { position: relative; display: grid; grid-template-columns: 142px 1fr auto; gap: 1rem; overflow: hidden; border: 1px solid var(--line); border-left: 0; border-radius: 18px; background: white; padding: 1rem 1rem 1.35rem; }
.result-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; align-items: center; }
.result-photos img { width: 100%; height: 82px; object-fit: cover; object-position: center top; border-radius: 12px; border: 2px solid white; box-shadow: 0 5px 16px rgba(11,31,58,.18); }
.result-photos img + img { margin: 0; transform: none; }
.result-candidate-card .result-info { align-self: center; }
.result-candidate-card .result-info h4 { margin-top: .55rem; color: var(--navy); font-size: 1rem; }
.result-candidate-card .result-stats { align-self: center; }
.result-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #e7edf4; }
.result-progress span { display: block; width: var(--result-width); height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan)); transition: width .6s ease; }

@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: translateY(0); } }
@keyframes accordionIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (max-width: 900px) { .voter-card-sheet { grid-template-columns: repeat(2, 1fr); padding: 1rem; } .toolbar-card { align-items: flex-start; flex-direction: column; } }
@media (max-width: 600px) { .voter-card-sheet { grid-template-columns: 1fr; } .print-controls { flex-wrap: wrap; } .candidate-names { grid-template-columns: 1fr; } .candidate-names > span { display: none; } }
@media (max-width: 600px) { .result-candidate-card { grid-template-columns: 108px 1fr; gap: .75rem; } .result-photos { gap: 4px; } .result-photos img { height: 68px; border-radius: 9px; } .result-candidate-card .result-stats { grid-column: 2; text-align: left; display: flex; gap: .5rem; align-items: baseline; } }
@media print {
    @page { size: A4 portrait; margin: 10mm; }
    body.print-page { background: white; }
    .print-controls { display: none; }
    .voter-card-sheet { max-width: none; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6mm; }
    .voter-card { box-shadow: none; border-radius: 3mm; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}

.progress-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    margin: 2rem 0;
    align-items: start;
}

.chart-container {
    position: sticky;
    top: 20px;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.chart-wrapper {
    height: 300px;
    position: relative;
}

@media (max-width: 768px) {
    .progress-container {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        position: static;
    }
}

/* Live results: large chart + visual candidate cards */
.progress-container {
    grid-template-columns: minmax(360px, .85fr) minmax(0, 1.65fr);
    gap: 1.5rem;
}
.progress-container .chart-container {
    order: -1;
    width: 100%;
    min-height: 500px;
    top: 90px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
}
.progress-container .chart-wrapper {
    width: 100%;
    height: 410px;
}
.progress-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    padding: 1.25rem;
}
.progress-results > h3,
.progress-results > .no-results {
    grid-column: 1 / -1;
}
.result-candidate-card {
    display: flex;
    flex-direction: column;
    gap: .85rem;
    min-width: 0;
    padding: .85rem .85rem 1.25rem;
    border-left: 1px solid var(--line);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.result-candidate-card:hover {
    transform: translateY(-4px);
    border-color: #bfd2ea;
    box-shadow: 0 14px 30px rgba(11,31,58,.11);
}
.result-candidate-card .result-photos {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .6rem;
}
.result-candidate-card .result-photos img {
    width: 100%;
    height: 175px;
    border-radius: 15px;
    background: #e8eef5;
}
.result-candidate-card .result-info {
    width: 100%;
}
.result-candidate-card .result-info h4 {
    min-height: 2.8em;
    margin: .65rem 0 .25rem;
    line-height: 1.4;
}
.result-candidate-card .result-info p {
    font-size: .8rem;
}
.result-candidate-card .result-stats {
    width: 100%;
    display: flex;
    align-items: baseline;
    gap: .5rem;
    text-align: left;
    margin-top: auto;
}
.result-candidate-card .vote-count {
    font-size: 2rem;
}
.result-candidate-card .vote-count::after {
    content: " suara";
    font-size: .72rem;
    font-weight: 600;
    color: var(--muted);
}
.result-candidate-card .vote-percentage {
    margin-left: auto;
    font-weight: 800;
    color: var(--blue);
}

@media (max-width: 1050px) {
    .progress-container {
        grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr);
    }
    .progress-results {
        grid-template-columns: 1fr;
    }
    .result-candidate-card .result-photos img {
        height: 210px;
    }
}

@media (max-width: 768px) {
    .progress-container {
        grid-template-columns: 1fr;
    }
    .progress-container .chart-container {
        position: static;
        min-height: auto;
        padding: 1.25rem;
    }
    .progress-container .chart-wrapper {
        height: 340px;
    }
    .progress-results {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .result-candidate-card .result-photos img {
        height: 165px;
    }
}

@media (max-width: 560px) {
    .progress-results {
        grid-template-columns: 1fr;
    }
    .result-candidate-card .result-photos img {
        height: 190px;
    }
}

/* Full-screen kiosk for live election results */
body.kiosk-progress {
    --kiosk-header: clamp(120px, 18vh, 185px);
    height: 100vh;
    overflow: hidden;
}
.kiosk-progress .header {
    height: var(--kiosk-header);
    padding: .65rem 0;
    display: grid;
    place-items: center;
}
.kiosk-progress .header-content {
    padding: 0;
}
.kiosk-progress .school-logo {
    width: clamp(46px, 5vh, 62px);
    height: clamp(46px, 5vh, 62px);
    margin-bottom: .15rem;
}
.kiosk-progress .election-title {
    font-size: clamp(1rem, 2.3vh, 1.55rem);
    line-height: 1.25;
    margin: .12rem 0;
}
.kiosk-progress > main.container {
    height: calc(100vh - var(--kiosk-header));
    max-width: 1440px;
    padding-top: 0;
    padding-bottom: 10px;
}
.kiosk-progress #live-results {
    height: 100%;
    display: grid;
    grid-template-rows: 54px minmax(0, 1fr);
}
.kiosk-progress .total-votes-banner {
    display: grid;
    place-items: center;
    margin: 0;
}
.kiosk-progress .total-votes-banner h2 {
    color: var(--blue);
    font-size: clamp(1rem, 2.2vh, 1.35rem);
}
.kiosk-progress .progress-container {
    height: 100%;
    min-height: 0;
    margin: 0;
    grid-template-columns: minmax(0, 1.7fr) minmax(330px, .85fr);
    gap: 1rem;
    align-items: stretch;
}
.kiosk-progress .progress-results {
    height: 100%;
    min-height: 0;
    padding: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(var(--candidate-rows), minmax(0, 1fr));
    gap: .75rem;
    overflow: hidden;
}
.kiosk-progress .result-candidate-card {
    min-height: 0;
    height: 100%;
    padding: .65rem .65rem .9rem;
    gap: .45rem;
}
.kiosk-progress .result-candidate-card .result-photos {
    min-height: 0;
    height: clamp(110px, 19vh, 220px);
    gap: .45rem;
}
.kiosk-progress .result-candidate-card .result-photos img {
    height: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(145deg, #edf2f7, #dde7f0);
    border-radius: 12px;
}
.kiosk-progress .result-candidate-card .result-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
}
.kiosk-progress .result-candidate-card .candidate-number {
    white-space: nowrap;
    font-size: .62rem;
    padding: .3rem .55rem;
}
.kiosk-progress .result-candidate-card .result-info h4 {
    min-height: 0;
    margin: 0;
    font-size: clamp(.95rem, 1.8vh, 1.2rem);
    line-height: 1.3;
    font-weight: 800;
    letter-spacing: -.01em;
    text-wrap: balance;
}
.kiosk-progress .result-candidate-card .result-stats {
    margin-top: auto;
    line-height: 1;
}
.kiosk-progress .result-candidate-card .vote-count {
    font-size: clamp(1.25rem, 2.8vh, 1.8rem);
}
.kiosk-progress .chart-container {
    order: initial;
    position: static;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 1.2rem;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-items: center;
}
.kiosk-progress .chart-container h3 {
    margin-bottom: .4rem !important;
    font-size: clamp(.9rem, 1.8vh, 1.1rem);
}
.kiosk-progress .chart-wrapper {
    width: 100%;
    height: 100%;
    min-height: 0;
}

@media (max-width: 850px) {
    body.kiosk-progress {
        --kiosk-header: clamp(105px, 16vh, 140px);
    }
    .kiosk-progress .progress-container {
        grid-template-columns: minmax(0, 1.55fr) minmax(250px, .8fr);
        gap: .65rem;
    }
    .kiosk-progress .progress-results {
        padding: .55rem;
        gap: .5rem;
    }
    .kiosk-progress .result-candidate-card .result-photos {
        height: clamp(85px, 15vh, 150px);
    }
}

/* Mobile UX pass */
@media (max-width: 700px) {
    body {
        font-size: 15px;
        -webkit-text-size-adjust: 100%;
    }
    .container {
        width: 100%;
        padding-left: 14px;
        padding-right: 14px;
    }
    .header {
        padding: 1rem 0;
    }
    .header h1 {
        font-size: clamp(1.35rem, 6vw, 1.8rem);
        line-height: 1.2;
    }
    .header p {
        font-size: .9rem;
    }
    .front-page .headers-content {
        flex-wrap: wrap;
        gap: .35rem;
        padding: .2rem 0;
    }
    .front-page .school-logo {
        width: auto;
        height: 48px;
        margin: 0;
    }
    .front-page .headers-content:nth-child(2) {
        margin-top: .35rem;
    }
    .front-page .headers-content:nth-child(2) h2 {
        font-size: .75rem;
    }
    .front-page .header h1 {
        margin-top: .65rem;
        font-size: clamp(1.15rem, 5.5vw, 1.55rem);
    }

    .nav {
        top: 0;
        padding: .5rem 0;
    }
    .nav .container,
    .admin-nav {
        padding-left: .6rem;
        padding-right: .6rem;
    }
    .nav ul,
    .admin-nav ul {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: .4rem;
        overflow-x: auto;
        padding: .15rem;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }
    .nav ul::-webkit-scrollbar,
    .admin-nav ul::-webkit-scrollbar {
        display: none;
    }
    .nav li,
    .admin-nav li {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }
    .nav a,
    .admin-nav a {
        display: block;
        white-space: nowrap;
        min-height: 42px;
        padding: .65rem .9rem;
        font-size: .85rem;
    }
    .admin-nav {
        position: sticky;
        top: 0;
        z-index: 20;
        margin: .75rem 0 1rem;
        border-radius: 14px;
    }

    .intro-section {
        margin: 1.4rem 0 !important;
    }
    .intro-section h2 {
        font-size: 1.35rem;
    }
    .intro-section p {
        font-size: .92rem;
        line-height: 1.65;
    }
    .candidates-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1.25rem 0;
    }
    .candidate-card {
        border-radius: 18px;
    }
    .candidate-card:hover {
        transform: none;
    }
    .candidate-header {
        min-height: 0;
        padding: 1.5rem .9rem 1rem;
    }
    .candidate-photos {
        flex-direction: row;
        align-items: center;
        gap: .55rem;
        margin-top: 1.2rem;
    }
    .candidate-photo {
        width: calc(50% - .3rem);
        max-width: 145px;
        height: 170px;
        border-radius: 15px;
    }
    .candidate-names {
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: .4rem;
    }
    .candidate-names > span {
        display: block;
    }
    .candidate-names h2,
    .candidate-names h3 {
        font-size: .92rem;
        overflow-wrap: anywhere;
    }
    .candidate-info {
        padding: 1rem 1rem .5rem;
    }
    .candidate-vision {
        padding: 1rem;
    }
    .accordion-content {
        padding-left: .25rem;
    }
    .candidate-card-footer {
        padding: .7rem 1rem 1rem;
    }
    .candidate-card-footer span {
        display: none;
    }
    .candidate-card-footer a {
        margin-left: auto;
    }

    .form-container {
        width: calc(100% - 8px);
        max-width: 460px;
        margin: 1.25rem auto;
        padding: 1.25rem;
        border-radius: 18px;
    }
    .form-container h2 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem !important;
    }
    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 46px;
        font-size: 16px;
    }
    .btn,
    button {
        min-height: 44px;
        touch-action: manipulation;
    }

    .voting-container {
        width: 100%;
        margin: 1.25rem auto;
    }
    .voting-container > h2 {
        font-size: 1.3rem;
        margin-bottom: 1.25rem !important;
    }
    .vote-options {
        grid-template-columns: 1fr;
    }
    .vote-option {
        padding: 1rem;
        border-radius: 16px;
    }
    .vote-option-content {
        display: grid;
        grid-template-columns: 105px minmax(0, 1fr);
        gap: .7rem;
    }
    .vote-candidate-photos {
        min-width: 0;
    }
    .vote-candidate-photos img {
        width: 62px;
        height: 78px;
    }
    .vote-option-info h4 {
        font-size: .95rem;
        line-height: 1.35;
    }
    .vote-option-info p {
        font-size: .82rem;
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .admin-container {
        margin: 1rem 0;
    }
    .admin-container > h2 {
        font-size: 1.35rem;
        margin-bottom: 1rem !important;
    }
    .admin-container > div[style*="background: white"] {
        padding: 1rem !important;
        border-radius: 16px !important;
    }
    .admin-container form > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }
    .toolbar-card {
        padding: 1rem;
    }
    .toolbar-actions,
    .toolbar-actions form,
    .inline-filter {
        width: 100%;
        align-items: stretch;
    }
    .toolbar-actions .btn,
    .toolbar-actions select,
    .toolbar-actions .file-input {
        width: 100%;
        max-width: none;
    }
    .toolbar-actions a {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
    }
    .data-table {
        border-radius: 14px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table table {
        min-width: 720px;
    }
    .data-table th,
    .data-table td {
        padding: .75rem;
        font-size: .84rem;
        white-space: nowrap;
    }
    .data-table td form {
        display: inline-flex !important;
    }
    .results-container {
        gap: 1rem !important;
    }
    .summary-box,
    .results-card,
    .chart-card {
        border-radius: 16px;
    }

    body.kiosk-progress {
        height: auto;
        min-height: 100vh;
        overflow-y: auto;
    }
    .kiosk-progress .header {
        height: auto;
        min-height: 125px;
    }
    .kiosk-progress > main.container {
        height: auto;
        padding-bottom: 1rem;
    }
    .kiosk-progress #live-results {
        height: auto;
        display: block;
    }
    .kiosk-progress .total-votes-banner {
        min-height: 58px;
        text-align: center;
    }
    .kiosk-progress .progress-container {
        height: auto;
        grid-template-columns: 1fr;
    }
    .kiosk-progress .chart-container {
        order: -1;
        height: 330px;
        margin-bottom: 0;
    }
    .kiosk-progress .progress-results {
        height: auto;
        grid-template-columns: 1fr;
        grid-template-rows: none;
        overflow: visible;
    }
    .kiosk-progress .result-candidate-card {
        height: auto;
        min-height: 310px;
    }
    .kiosk-progress .result-candidate-card .result-photos {
        height: 190px;
    }
    .kiosk-progress .result-candidate-card .result-info h4 {
        font-size: 1.05rem;
    }
}

.settings-card {
    max-width: 820px;
    margin: 1rem auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    gap: 2rem;
    background: white;
    border: 1px solid var(--line);
    border-radius: 22px;
    box-shadow: 0 16px 45px rgba(11,31,58,.09);
}
.settings-intro h2 {
    margin: .55rem 0 .7rem;
    font-size: 1.45rem;
}
.settings-intro p {
    color: var(--muted);
}
@media (max-width: 700px) {
    .settings-card {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        padding: 1.1rem;
        border-radius: 16px;
    }
}
