:root {
    --ffcv-primary: #0B1F3A;
    --ffcv-secondary: #F57C00;
    --ffcv-accent: #C62828;
    --ffcv-white: #ffffff;
}

.ffcv-ca-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
    font-family: 'Open Sans', Arial, sans-serif;
    color: var(--ffcv-primary);
}

.ffcv-ca-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.ffcv-ca-logo {
    max-height: 60px;
    width: auto;
}

.ffcv-ca-title {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
}

.ffcv-ca-card {
    background: var(--ffcv-white);
    border: 1px solid #e2e2e2;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.05);
}

.ffcv-ca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ffcv-qr-reader {
    max-width: 360px;
}

.ffcv-ca-result {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
}

.ffcv-ca-result.success {
    background: #e7f8ef;
    color: #1d7a3a;
    border: 1px solid #bfe8cc;
}

.ffcv-ca-result.error {
    background: #ffe8e8;
    color: #a32828;
    border: 1px solid #f5bcbc;
}

.ffcv-ca-list {
    list-style: none;
    padding-left: 0;
}

.ffcv-ca-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.ffcv-ca-list button {
    background: var(--ffcv-primary);
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
}

.ffcv-ca-primary-btn {
    background: var(--ffcv-primary);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
}

.ffcv-ca-accent {
    color: var(--ffcv-secondary);
}

.ffcv-ca-offline {
    background: #fff7e6;
    border: 1px solid #ffd9a0;
    color: #a85a00;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 12px;
    display: none;
}

.ffcv-ca-list button[disabled] {
    background: #aaa;
    cursor: not-allowed;
}

.ffcv-ca-summary {
    margin-top: 12px;
    background: #f6f8ff;
    border: 1px solid #dce3ff;
    padding: 10px 12px;
    border-radius: 8px;
}

.ffcv-ca-summary ul {
    margin: 0;
    padding-left: 18px;
}

.ffcv-vote-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 12px;
}

.ffcv-vote-buttons button {
    margin-right: 8px;
    padding: 6px 12px;
}

@media (max-width: 600px) {
    .ffcv-ca-wrap {
        padding: 12px;
    }

    .ffcv-ca-list li {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Panel ejecutivo */
.ffcv-ceo {
    background: #f6f7fb;
    min-height: 100vh;
    padding: 24px 0;
}

.ffcv-ceo .ffcv-ca-wrap {
    max-width: 1200px;
}

.ffcv-ceo-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f2f6ff 55%, #e9f1ff 100%);
    color: var(--ffcv-primary);
    padding: 28px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e5eaf3;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
    margin-bottom: 24px;
}

.ffcv-ceo-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ffcv-ceo-brand img {
    height: 56px;
    width: auto;
}

.ffcv-ceo-brand h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
}

.ffcv-ceo-kicker {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #5b6b82;
    margin: 0 0 6px;
}

.ffcv-ceo-subtitle {
    margin: 6px 0 0;
    color: #5b6b82;
}

.ffcv-ceo-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.ffcv-ceo-btn {
    background: var(--ffcv-primary);
    color: #ffffff;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.ffcv-ceo-btn--ghost {
    background: #ffffff;
    color: var(--ffcv-primary);
    border: 1px solid #cfd8e3;
    box-shadow: none;
}

.ffcv-ceo-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.ffcv-ceo-stat {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ffcv-ceo-stat strong {
    font-size: 22px;
    color: #0b1f3a;
}

.ffcv-ceo-stat small {
    color: #64748b;
}

.ffcv-ceo-message {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-weight: 600;
}

.ffcv-ceo-message--success {
    background: #e7f8ef;
    color: #1d7a3a;
    border: 1px solid #cdeed9;
}

.ffcv-ceo-message--error {
    background: #ffe8e8;
    color: #a32828;
    border: 1px solid #f3c3c3;
}

.ffcv-ceo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.ffcv-ceo-card,
.ffcv-ceo-section {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #eef2f7;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.ffcv-ceo-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.ffcv-ceo-pill {
    background: #eef4ff;
    color: #1e40af;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.ffcv-ceo-pill--accent {
    background: #fff3e6;
    color: #b45309;
}

.ffcv-ceo-highlight {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
}

.ffcv-ceo-meta {
    color: #64748b;
    margin: 0;
}

.ffcv-ceo-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.ffcv-ceo-form--inline {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    align-items: end;
}

.ffcv-ceo-form label {
    display: block;
    font-size: 12px;
    color: #475569;
    margin-bottom: 4px;
}

.ffcv-ceo-form input,
.ffcv-ceo-form select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d7dde7;
    border-radius: 10px;
    background: #ffffff;
}

.ffcv-ceo-form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ffcv-ceo-section {
    margin-bottom: 24px;
}

.ffcv-ceo-section-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.ffcv-ceo-section-head p {
    margin: 0;
    color: #64748b;
}

.ffcv-ceo-table {
    display: grid;
    gap: 10px;
}

.ffcv-ceo-table-head,
.ffcv-ceo-table-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    align-items: center;
}

.ffcv-ceo-table-head {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
}

.ffcv-ceo-table-row {
    background: #f9fafc;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #eef2f7;
}

.ffcv-ceo-table-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ffcv-ceo-report {
    display: grid;
    gap: 16px;
}

.ffcv-ceo-report-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}

.ffcv-ceo-report-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ffcv-ceo-report-card strong {
    font-size: 22px;
    color: var(--ffcv-primary);
}

.ffcv-ceo-progress {
    background: #e2e8f0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.ffcv-ceo-progress-bar {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
}

.ffcv-ceo-link {
    background: none;
    border: none;
    color: var(--ffcv-primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .ffcv-ceo-hero {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Pantalla grande de votaciones */
.ffcv-votes-screen {
    min-height: 100vh;
    background: radial-gradient(circle at top, #1b2b46 0%, #0b1526 40%, #070d18 100%);
    color: #ffffff;
    padding: 48px 24px;
    font-family: 'Open Sans', Arial, sans-serif;
}

.ffcv-votes-screen__inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.ffcv-votes-screen__header {
    display: flex;
    align-items: center;
    gap: 20px;
}

.ffcv-votes-screen__header img {
    height: 72px;
    width: auto;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.3));
}

.ffcv-votes-screen__kicker {
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 12px;
    margin: 0 0 8px;
    color: rgba(255, 255, 255, 0.7);
}

.ffcv-votes-screen__header h1 {
    margin: 0;
    font-size: 36px;
}

.ffcv-votes-screen__card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.35);
}

.ffcv-votes-screen__card h2 {
    margin: 0 0 12px;
    font-size: 34px;
}

.ffcv-votes-screen__status {
    margin: 0 0 24px;
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
}

.ffcv-votes-screen__status.is-error {
    color: #ffb4b4;
}

.ffcv-votes-screen__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.ffcv-votes-screen__result {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ffcv-votes-screen__result span {
    display: block;
    font-size: 18px;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.7);
}

.ffcv-votes-screen__result strong {
    font-size: 48px;
}

.ffcv-votes-screen__result--favor {
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(34, 197, 94, 0.4);
}

.ffcv-votes-screen__result--contra {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.45);
}

.ffcv-votes-screen__result--abstencion {
    background: rgba(251, 191, 36, 0.18);
    border-color: rgba(251, 191, 36, 0.4);
}

.ffcv-votes-screen__footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    text-align: center;
    font-size: 18px;
}

.ffcv-votes-screen__footer span {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 6px;
}

.ffcv-votes-screen__footer strong {
    font-size: 30px;
}

.ffcv-votes-screen__hint {
    text-align: center;
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

@media (max-width: 900px) {
    .ffcv-votes-screen__header {
        flex-direction: column;
        align-items: flex-start;
    }

    .ffcv-votes-screen__card h2 {
        font-size: 26px;
    }

    .ffcv-votes-screen__result strong {
        font-size: 36px;
    }
}