:root {
    --bg: #f4f6f8;
    --surface: #ffffff;
    --ink: #1f2933;
    --muted: #6b7785;
    --line: #dde3e8;
    --brand: #14532d;
    --brand-2: #1f7a43;
    --brand-soft: #e8f3ec;
    --brand-ink: var(--brand);
    --brand-hover: var(--brand-2);
    --on-brand: #ffffff;
    --sidebar-bg: #0f2e1d;
    --sidebar-text: #d7e5dc;
    --sidebar-muted: #b9cdc1;
    --sidebar-label: #8fae9c;
    --sidebar-brand: #ffffff;
    --sidebar-brand-mark: var(--brand);
    --sidebar-brand-mark-ink: var(--on-brand);
    --sidebar-hover: rgba(255, 255, 255, .08);
    --sidebar-border: rgba(255, 255, 255, .12);
    --danger: #b42318;
    --danger-soft: #fef3f2;
    --warning: #b54708;
    --warning-soft: #fffaeb;
    --info: #175cd3;
    --info-soft: #eff8ff;
    --radius: 10px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
}

/* ------------------------------------------------------------------ */
/* Temas institucionales                                               */
/* ------------------------------------------------------------------ */
[data-theme="morena"] {
    --bg: #f7f4f5;
    --ink: #2b2b2b;
    --muted: #6b6b6b;
    --line: #e6dfe1;
    --brand: #9b2242;
    --brand-2: #a61c2d;
    --brand-soft: #f7e9ee;
    --sidebar-bg: #5e1327;
    --sidebar-text: #f5e9ed;
    --sidebar-muted: #d8b5c0;
    --sidebar-label: #c492a2;
    --sidebar-hover: rgba(255, 255, 255, .1);
    --sidebar-border: rgba(255, 255, 255, .16);
}

[data-theme="pvem"] {
    --bg: #f8fbf6;
    --ink: #242424;
    --muted: #5f6f5a;
    --line: #dbe8d4;
    --brand: #abd79e;
    --brand-2: #3f6d27;
    --brand-soft: #eef7ea;
    --brand-ink: #2f5b22;
    --brand-hover: #bde4b1;
    --on-brand: #242424;
    --sidebar-bg: #abd79e;
    --sidebar-text: #242424;
    --sidebar-muted: #3f4a3a;
    --sidebar-label: #4a5a44;
    --sidebar-brand: #242424;
    --sidebar-brand-mark: #242424;
    --sidebar-brand-mark-ink: #abd79e;
    --sidebar-hover: rgba(0, 0, 0, .08);
    --sidebar-border: rgba(0, 0, 0, .18);
}

[data-theme="pri"] {
    --bg: #f5faf7;
    --ink: #232b26;
    --muted: #5f6b64;
    --line: #dbe7df;
    --brand: #0b6b3a;
    --brand-2: #1f8a4f;
    --brand-soft: #e7f3ec;
    --sidebar-bg: #0a4426;
    --sidebar-text: #e4f1e9;
    --sidebar-muted: #aecdbd;
    --sidebar-label: #83b398;
    --sidebar-hover: rgba(255, 255, 255, .1);
    --sidebar-border: rgba(255, 255, 255, .16);
}

[data-theme="pan"] {
    --bg: #f5f7fc;
    --ink: #1c2433;
    --muted: #5f6b80;
    --line: #dbe2ef;
    --brand: #003da5;
    --brand-2: #2f62c4;
    --brand-soft: #e8eef9;
    --sidebar-bg: #00286b;
    --sidebar-text: #e4ebf8;
    --sidebar-muted: #aebfdd;
    --sidebar-label: #8199c7;
    --sidebar-hover: rgba(255, 255, 255, .1);
    --sidebar-border: rgba(255, 255, 255, .16);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0 0 .5rem; line-height: 1.2; }
p { margin: 0 0 .75rem; }
small { color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Acceso (login, MFA, activación)                                     */
/* ------------------------------------------------------------------ */
.guest-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at top left, var(--brand-soft), var(--bg) 45%);
}

.guest-shell {
    width: min(440px, calc(100% - 2rem));
    padding: 2rem 0;
}

.guest-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.guest-brand strong { display: block; font-size: 1.05rem; }
.guest-brand small { display: block; }

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--brand);
    color: var(--on-brand);
    font-weight: 800;
    font-size: 1.15rem;
}

.auth-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.auth-card h1 { font-size: 1.35rem; }
.auth-card .auth-sub { color: var(--muted); margin-bottom: 1.25rem; }

.auth-footer {
    margin-top: 1rem;
    font-size: .85rem;
    color: var(--muted);
    text-align: center;
}

/* ------------------------------------------------------------------ */
/* Instalador                                                          */
/* ------------------------------------------------------------------ */
.install-body { align-items: start; justify-items: center; }

.install-shell {
    width: min(620px, calc(100% - 2rem));
    padding: 2rem 0;
}

.install-steps {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1rem;
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    font-size: .8rem;
    color: var(--muted);
}

.install-steps li { display: flex; align-items: center; gap: .35rem; }

.install-steps li span {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e3e8ec;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 700;
}

.install-steps li.active { color: var(--ink); font-weight: 600; }
.install-steps li.active span { background: var(--brand); color: var(--on-brand); }
.install-steps li.done span { background: var(--brand-soft); color: var(--brand-ink); }

.install-shell .card { margin-bottom: 1rem; }

.req-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: .55rem;
}

.req-list li { display: flex; align-items: flex-start; gap: .6rem; }

.req-mark {
    flex: none;
    width: 20px;
    height: 20px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
}

.req-ok .req-mark { background: var(--brand-soft); color: var(--brand-ink); }
.req-fail .req-mark { background: var(--danger-soft); color: var(--danger); }

.check-line {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .75rem;
    font-size: .85rem;
}

.check-line input { width: auto; }

/* Paletas del módulo de sistema */
.theme-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.theme-swatch {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 6px;
}

.theme-swatch span {
    width: 18px;
    height: 18px;
    display: block;
}

/* Marca del portal */
.branding-preview {
    display: block;
    max-width: 100%;
    max-height: 90px;
    margin: .5rem 0 .75rem;
    padding: .5rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    object-fit: contain;
}

.branding-preview.square {
    width: 96px;
    height: 96px;
}

.secret-box {
    margin: .75rem 0;
    padding: .9rem 1rem;
    border: 1px dashed var(--brand-2);
    border-radius: 8px;
    background: var(--brand-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92rem;
    line-height: 1.6;
    letter-spacing: .1em;
    word-break: break-all;
    user-select: all;
    cursor: text;
}

/* La URI otpauth es muy larga: se envuelve en un bloque sin desbordar la tarjeta */
.auth-card a.mono.small,
.card a.mono.small {
    display: block;
    max-width: 100%;
    margin-top: .4rem;
    padding: .55rem .65rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: .72rem;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.auth-card a.mono.small:hover,
.card a.mono.small:hover {
    border-color: var(--brand-2);
    text-decoration: none;
}

/* QR con la misma URI otpauth */
.mfa-qr {
    display: grid;
    place-items: center;
    margin-top: .4rem;
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
}

.mfa-qr img {
    display: block;
    width: min(220px, 100%);
    height: auto;
}

/* Campo del código de 6 dígitos */
#code {
    padding: .6rem .7rem .6rem calc(.7rem + .4em);
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 1.35rem;
    letter-spacing: .4em;
}

/* En pantallas angostas la clave cabe completa en una línea */
@media (max-width: 420px) {
    .secret-box {
        padding: .8rem;
        font-size: .8rem;
        letter-spacing: 0;
    }
}

/* ------------------------------------------------------------------ */
/* Estructura principal                                                */
/* ------------------------------------------------------------------ */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 240px 1fr;
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1rem .75rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--sidebar-brand);
    font-weight: 700;
    padding: .25rem .5rem 1rem;
}

.sidebar-brand:hover { text-decoration: none; }
.sidebar-brand .brand-mark {
    width: 34px;
    height: 34px;
    font-size: .95rem;
    background: var(--sidebar-brand-mark);
    color: var(--sidebar-brand-mark-ink);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding-right: .15rem;
}

.nav-link {
    display: block;
    padding: .5rem .65rem;
    border-radius: 8px;
    color: var(--sidebar-text);
    font-size: .88rem;
    line-height: 1.3;
}

.nav-link:hover { background: var(--sidebar-hover); text-decoration: none; }
.nav-link.active { background: var(--sidebar-hover); color: var(--sidebar-brand); font-weight: 600; }
.nav-sub { padding-left: 1.4rem; font-size: .88rem; color: var(--sidebar-text); }
.nav-sub.active { color: var(--sidebar-brand); }
.nav-label {
    display: block;
    margin: .9rem .65rem .3rem;
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--sidebar-label);
}

.sidebar-nav > .nav-label:first-child { margin-top: .15rem; }

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding-top: .75rem;
}

.sidebar-footer .nav-label { margin: 0 .65rem .3rem; }

.main-wrap { min-width: 0; display: flex; flex-direction: column; }

.topbar {
    min-height: 60px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: .65rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 40;
}

.topbar-user { display: flex; align-items: center; gap: .75rem; }
.topbar-user span { font-weight: 600; }
.topbar-user small { display: block; }
.topbar-user form { margin: 0; }

.content { padding: 1.25rem; max-width: 1400px; width: 100%; }

/* ------------------------------------------------------------------ */
/* Tarjetas y grids                                                    */
/* ------------------------------------------------------------------ */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
}

.card h2, .card h3 { font-size: 1.05rem; }

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.page-head h1 { font-size: 1.35rem; margin: 0; }
.page-head p { color: var(--muted); margin: .2rem 0 0; }

.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 1.7rem; font-weight: 700; }
.stat-note { font-size: .8rem; color: var(--muted); }

/* ------------------------------------------------------------------ */
/* Formularios                                                         */
/* ------------------------------------------------------------------ */
.form-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-field.full { grid-column: 1 / -1; }

label { font-weight: 600; font-size: .88rem; }
label .req { color: var(--danger); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: .6rem .7rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid rgba(31, 122, 67, .25);
    border-color: var(--brand-2);
}

textarea { min-height: 120px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }

.check-row { display: flex; align-items: center; gap: .55rem; }
.check-row input { width: auto; }
.check-row label { font-weight: 500; }

.field-error { color: var(--danger); font-size: .82rem; }
.form-actions { display: flex; gap: .6rem; align-items: center; margin-top: 1.1rem; }

.error-list {
    margin: 0 0 1rem;
    padding: .75rem 1rem .75rem 1.5rem;
    background: var(--danger-soft);
    border: 1px solid #fecdca;
    border-radius: 8px;
    color: var(--danger);
    font-size: .88rem;
}

/* ------------------------------------------------------------------ */
/* Botones                                                             */
/* ------------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem .85rem;
    border-radius: 8px;
    border: 1px solid transparent;
    background: var(--brand);
    color: var(--on-brand);
    font: inherit;
    font-weight: 600;
    font-size: .88rem;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover { background: var(--brand-hover); text-decoration: none; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { background: #f7f9fa; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #8f1c13; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #8f3a06; }
.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}
.btn-ghost:hover { background: #f7f9fa; }
.btn-sm { padding: .35rem .6rem; font-size: .8rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ */
/* Tablas                                                              */
/* ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }

table.data {
    width: 100%;
    border-collapse: collapse;
    font-size: .9rem;
}

table.data th,
table.data td {
    text-align: left;
    padding: .6rem .55rem;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

table.data th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    background: #f8fafb;
}

table.data tr:hover td { background: #fbfcfd; }
.table-actions { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }

/* ------------------------------------------------------------------ */
/* Badges y estados                                                    */
/* ------------------------------------------------------------------ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .5rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    background: #eef2f5;
    color: #475467;
    white-space: nowrap;
}

.badge-success { background: var(--brand-soft); color: var(--brand-ink); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-info { background: var(--info-soft); color: var(--info); }

/* ------------------------------------------------------------------ */
/* Mensajes flash                                                      */
/* ------------------------------------------------------------------ */
.flash {
    padding: .7rem .9rem;
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: .9rem;
    font-size: .9rem;
}

.flash-success { background: var(--brand-soft); border-color: #bfe3cc; color: var(--brand-ink); }
.flash-error { background: var(--danger-soft); border-color: #fecdca; color: var(--danger); }
.flash-warning { background: var(--warning-soft); border-color: #fedf89; color: var(--warning); }
.flash-info { background: var(--info-soft); border-color: #b2ddff; color: var(--info); }

/* ------------------------------------------------------------------ */
/* Paginación                                                          */
/* ------------------------------------------------------------------ */
.pagination { display: flex; gap: .25rem; list-style: none; padding: 0; margin: 1rem 0 0; flex-wrap: wrap; }
.pagination li a,
.pagination li span {
    display: inline-block;
    padding: .35rem .6rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    font-size: .85rem;
    color: var(--ink);
    background: #fff;
}
.pagination li.active a,
.pagination li.active span { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* ------------------------------------------------------------------ */
/* Calendario                                                          */
/* ------------------------------------------------------------------ */
.calendar-summary { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.calendar-summary div { font-size: .88rem; color: var(--muted); }
.calendar-summary strong { display: block; color: var(--ink); font-size: 1.15rem; }

.calendar-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }

.month-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .75rem;
    box-shadow: var(--shadow);
}

.month-card h3 { font-size: .95rem; margin-bottom: .5rem; text-align: center; }
.month-weekdays,
.month-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.month-weekdays span {
    text-align: center;
    font-size: .68rem;
    color: var(--muted);
    text-transform: uppercase;
    padding: .15rem 0;
}

.day-cell {
    position: relative;
    min-height: 30px;
    border: 1px solid transparent;
    border-radius: 6px;
    display: grid;
    place-items: center;
    font-size: .78rem;
    background: #fff;
}

.day-cell.business { background: var(--brand-soft); }
.day-cell.non-business { background: #f1f3f5; color: #98a2b3; }
.day-cell.blank { background: transparent; }
.day-cell form { margin: 0; width: 100%; height: 100%; }
.day-cell button {
    width: 100%;
    height: 100%;
    min-height: 30px;
    border: 0;
    background: transparent;
    font: inherit;
    color: inherit;
    cursor: pointer;
    border-radius: 6px;
}
.day-cell button:hover { outline: 2px solid var(--brand-2); }
.day-cell .holiday-dot {
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--danger);
}

/* ------------------------------------------------------------------ */
/* Varios                                                              */
/* ------------------------------------------------------------------ */
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 1rem; }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }

details.inline-form summary { cursor: pointer; color: var(--brand-2); font-size: .82rem; }
details.inline-form form { display: flex; gap: .4rem; margin-top: .35rem; }
details.inline-form input { padding: .3rem .45rem; font-size: .8rem; }

/* ------------------------------------------------------------------ */
/* Responsive                                                          */
/* ------------------------------------------------------------------ */
@media (max-width: 1100px) {
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .calendar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar {
        flex-direction: column;
        padding: .75rem;
        position: static;
        height: auto;
        overflow: visible;
    }
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-height: auto;
        overflow: visible;
        padding-right: 0;
    }
    .nav-label { grid-column: 1 / -1; }
    .sidebar-footer { display: flex; gap: .5rem; flex-wrap: wrap; }
    .sidebar-footer .nav-label { flex-basis: 100%; margin-left: 0; }
    .grid-2, .grid-3, .grid-4, .form-grid, .calendar-grid { grid-template-columns: 1fr; }
    .topbar { flex-direction: column; align-items: flex-start; }
    .content { padding: .9rem; }
}

@media (max-width: 520px) {
    .page-head { flex-direction: column; }
    .sidebar-nav { grid-template-columns: 1fr; }
    .table-actions { justify-content: flex-start; }
}

/* ------------------------------------------------------------------ */
/* M1 — Sesiones y votación                                            */
/* ------------------------------------------------------------------ */
.agenda-list {
    margin: 0;
    padding-left: 1.25rem;
}

.agenda-list li {
    margin-bottom: .65rem;
}

.agenda-list li:last-child {
    margin-bottom: 0;
}

.agenda-row {
    display: grid;
    grid-template-columns: 2fr 1fr 2fr;
    gap: .75rem;
    align-items: end;
    padding: .75rem 0;
    border-bottom: 1px dashed var(--line);
}

.agenda-row:last-of-type {
    border-bottom: 0;
}

.vote-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.vote-option {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    align-items: center;
    justify-content: center;
    min-height: 110px;
    padding: 1rem;
    border: 2px solid var(--line);
    border-radius: 12px;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-weight: 700;
    font-size: 1rem;
}

.vote-option input {
    width: 20px;
    height: 20px;
    accent-color: var(--brand);
}

.vote-option:has(input:checked) {
    border-color: var(--brand);
    background: var(--brand-soft);
    box-shadow: 0 0 0 3px rgba(31, 122, 67, .12);
}

.qr-holder {
    text-align: center;
    padding: 1rem;
}

@media (max-width: 820px) {
    .agenda-row {
        grid-template-columns: 1fr;
    }

    .vote-options {
        grid-template-columns: 1fr;
    }

    .vote-option {
        min-height: 80px;
        flex-direction: row;
        justify-content: flex-start;
    }
}

/* ------------------------------------------------------------------ */
/* M3 — CRM ciudadano y SLA                                            */
/* ------------------------------------------------------------------ */
.sla-bar {
    display: block;
    height: 7px;
    background: #e5e7eb;
    border-radius: 999px;
    overflow: hidden;
    min-width: 120px;
}

.sla-bar > span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #1f7a43, #f79009);
    border-radius: 999px;
}

.sla-mini {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 90px;
    font-size: .78rem;
}

.timeline {
    list-style: none;
    margin: 0;
    padding: 0 0 0 1rem;
    border-left: 2px solid var(--line);
}

.timeline li {
    position: relative;
    padding: 0 0 1rem 1rem;
}

.timeline li:last-child {
    padding-bottom: 0;
}

.timeline li::before {
    content: "";
    position: absolute;
    left: -1.4rem;
    top: .25rem;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--brand-2);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--brand-2);
}

.timeline strong {
    display: block;
}

input[type="month"] {
    padding: .5rem .6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
    background: #fff;
}

.ticket-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1rem;
    font-size: .85rem;
    color: var(--muted);
}

.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-2);
    margin-right: .35rem;
}

/* ------------------------------------------------------------------ */
/* M2 — Iniciativas legislativas                                       */
/* ------------------------------------------------------------------ */
.kanban {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 1 0 220px;
    max-width: 300px;
    background: #f8fafb;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: .75rem;
    min-height: 220px;
}

.kanban-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
    font-size: .9rem;
}

.kanban-card {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .65rem;
    margin-bottom: .55rem;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    box-shadow: var(--shadow);
}

.kanban-card:hover {
    text-decoration: none;
    border-color: var(--brand-2);
}

.kanban-card strong {
    font-size: .9rem;
    line-height: 1.3;
}
