@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Source+Sans+3:wght@400;600;700&display=swap');

:root {
    --navy: #0d1b34;
    --navy-dark: #081226;
    --navy-light: #16294a;
    --gold: #cbaa66;
    --gold-light: #e6d4a8;
    --cream: #f5f1e6;
    --text-muted: #b9c2d6;
    --success: #4caf7d;
    --danger: #e0736b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--navy-dark);
    color: var(--cream);
    font-family: 'Source Sans 3', Arial, sans-serif;
    min-height: 100vh;
}

a { color: var(--gold-light); }

.wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

/* ---------- Header / logo ---------- */
.site-header {
    background: var(--navy);
    border-bottom: 1px solid rgba(203,170,102,0.3);
    padding: 22px 20px;
    margin-bottom: 36px;
}

.logo {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.logo-img {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
}

.header-meta {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}

.header-meta a {
    color: var(--gold-light);
    font-weight: 600;
}

.header-meta a { color: var(--gold-light); text-decoration: none; }
.header-meta a:hover { text-decoration: underline; }

/* ---------- Cards / boxes ---------- */
.card {
    background: var(--navy);
    border: 1px solid rgba(203,170,102,0.25);
    border-radius: 10px;
    padding: 28px;
}

.page-title {
    font-family: 'Playfair Display', serif;
    color: var(--gold-light);
    font-size: 26px;
    margin: 0 0 8px;
}

.page-subtitle {
    color: var(--text-muted);
    margin: 0 0 24px;
    font-size: 15px;
}

/* ---------- Forms ---------- */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--gold-light);
    font-size: 14px;
}

input[type=text],
input[type=password] {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid rgba(203,170,102,0.4);
    background: var(--navy-light);
    color: var(--cream);
    font-size: 16px;
    margin-bottom: 18px;
}

input[type=text]:focus,
input[type=password]:focus {
    outline: none;
    border-color: var(--gold);
}

.btn {
    display: inline-block;
    background: var(--gold);
    color: var(--navy-dark);
    border: none;
    padding: 13px 28px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover { background: var(--gold-light); }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold-light);
}

.btn-outline:hover { background: rgba(203,170,102,0.15); }

/* ---------- Flash messages ---------- */
.flash {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 22px;
    font-size: 15px;
}

.flash.info { background: rgba(203,170,102,0.15); border: 1px solid rgba(203,170,102,0.4); color: var(--gold-light); }
.flash.success { background: rgba(76,175,125,0.15); border: 1px solid rgba(76,175,125,0.5); color: var(--success); }
.flash.error { background: rgba(224,115,107,0.15); border: 1px solid rgba(224,115,107,0.5); color: var(--danger); }

/* ---------- Categorias list ---------- */
.categoria-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.categoria-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--navy);
    border: 1px solid rgba(203,170,102,0.25);
    border-radius: 10px;
    padding: 20px 24px;
}

.categoria-item.votada {
    border-color: rgba(76,175,125,0.5);
}

.categoria-item h3 {
    margin: 0 0 4px;
    font-family: 'Playfair Display', serif;
    color: var(--gold-light);
    font-size: 19px;
}

.categoria-item .status {
    font-size: 13px;
    color: var(--text-muted);
}

.categoria-item .status.ok { color: var(--success); }

/* ---------- Candidatos (voting) ---------- */
.candidatos-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 26px;
}

.candidato-option {
    display: block;
    cursor: pointer;
}

.candidato-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.candidato-card {
    border: 1px solid rgba(203,170,102,0.3);
    background: var(--navy-light);
    border-radius: 8px;
    padding: 16px 18px;
    transition: border-color .15s, background .15s;
}

.candidato-option input:checked + .candidato-card {
    border-color: var(--gold);
    background: rgba(203,170,102,0.18);
}

.candidato-nome {
    font-weight: 700;
    color: var(--cream);
    font-size: 16px;
    margin-bottom: 2px;
}

.candidato-detalhe {
    color: var(--text-muted);
    font-size: 13.5px;
}

/* ---------- Misc ---------- */
.center { text-align: center; }
.mt-24 { margin-top: 24px; }
.small-muted { color: var(--text-muted); font-size: 13.5px; }

table.resultados {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 34px;
    font-size: 14.5px;
}

table.resultados th, table.resultados td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid rgba(203,170,102,0.2);
}

table.resultados th {
    color: var(--gold-light);
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table.resultados tr.lider td { color: var(--success); font-weight: 700; }

.badge-total {
    display: inline-block;
    background: rgba(203,170,102,0.2);
    color: var(--gold-light);
    border-radius: 20px;
    padding: 3px 12px;
    font-size: 13px;
    font-weight: 700;
}
