/* =========================================================================
   Cumbre Minera - Estilos
   Reutiliza la línea gráfica del Ministerio de Minería y Metalurgia.
   ========================================================================= */

:root {
    --oro: #C9A751;
    --oro-dark: #8B6914;
    --negro: #242732;
    --gris: #363534;
    --blanco: #ffffff;
    --bg-body: #f8f9fa;
    --surface: #e9ecef;
    --text-main: #242732;
    --text-muted: #6c757d;
    --card-bg: #ffffff;
    --border: rgba(36, 39, 50, 0.1);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 18px 40px rgba(0, 0, 0, 0.15);
    --success: #15592F;
    --danger: #B82227;
    --warning: #FFCC18;
    --info: #1d6db1;
    --tricolor: linear-gradient(to right,
        #B82227 0%, #B82227 33.33%,
        #FFCC18 33.33%, #FFCC18 66.66%,
        #15592F 66.66%, #15592F 100%);
}

[data-theme="dark"] {
    --bg-body: #1a1c23;
    --text-main: #e0e0e0;
    --text-muted: #9aa0ad;
    --card-bg: #242732;
    --border: rgba(201, 167, 81, 0.2);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

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

html, body { height: 100%; }
html { overflow-x: hidden; }
body { max-width: 100%; overflow-x: hidden; }

body {
    font-family: var(--font-ubuntu);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    transition: background 0.4s ease, color 0.4s ease;
}

a { color: var(--oro); text-decoration: none; }
a:hover { color: var(--oro-dark); }

button { font-family: inherit; }

/* =========================================================================
   Página de Login
   ========================================================================= */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background: var(--surface);
    color: var(--text-main);
}

.login-hero {
    flex: 1.1;
    background:
        radial-gradient(circle at 30% 30%, rgba(201,167,81,0.16), transparent 60%),
        linear-gradient(135deg, #eef0f3 0%, #e4e7eb 100%);
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-right: 4px solid var(--oro);
}

.login-hero img { max-height: 44vh; width: auto; max-width: 100%; align-self: center; object-fit: contain; margin-bottom: 1.5rem; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.18)); }
.login-hero h1 {
    font-family: var(--font-ubuntu);
    font-size: 3rem;
    color: var(--oro-dark);
    line-height: 1.1;
    margin-bottom: 0.5rem;
}
.login-hero h2 {
    font-family: var(--font-ubuntu);
    font-size: 1.5rem;
    color: var(--negro);
    letter-spacing: 4px;
    font-weight: 400;
}
.login-hero p { color: var(--text-muted); margin-top: 1rem; max-width: 480px; margin-left: auto; margin-right: auto; }

.login-form-wrap {
    flex: 0.9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--bg-body);
    color: var(--text-main);
}

.login-card {
    width: 100%;
    max-width: 400px;
}
.login-card h3 {
    font-family: var(--font-ubuntu);
    font-size: 1.6rem;
    border-left: 4px solid var(--oro);
    padding-left: 12px;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .login-page { flex-direction: column; }
    .login-hero { padding: 2.5rem; border-right: none; border-bottom: 4px solid var(--oro); }
    .login-hero h1 { font-size: 2rem; }
}

/* =========================================================================
   Dashboard layout
   ========================================================================= */
.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 70px 6px 1fr;
    grid-template-areas:
        "topbar topbar"
        "tricolor tricolor"
        "sidebar main";
    min-height: 100vh;
}

.topbar {
    grid-area: topbar;
    background: var(--surface);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    z-index: 10;
}

.topbar-left { display: flex; align-items: center; gap: 12px; }
.icon-btn.menu-toggle { display: none; }
.topbar-brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.topbar-brand img { height: 50px; width: auto; }
.topbar-brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.topbar-brand .brand-short { color: var(--oro-dark); font-size: 0.7rem; letter-spacing: 2px; }
.topbar-brand .brand-long { font-family: var(--font-ubuntu); font-weight: 600; font-size: 1.05rem; }

.topbar-actions { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.topbar-user {
    display: flex; align-items: center; gap: 8px;
    background: rgba(201,167,81,0.15);
    padding: 6px 12px; border-radius: 999px;
    font-size: 0.85rem; color: var(--oro-dark);
    max-width: 220px;
}
.topbar-user i { font-size: 0.9rem; }
.topbar-user .user-email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
    background: none; border: 1px solid var(--oro);
    color: var(--oro); width: 38px; height: 38px;
    border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    transition: 0.25s;
}
.icon-btn:hover { background: var(--oro); color: var(--negro); }

.tricolor-line {
    grid-area: tricolor;
    background: var(--tricolor);
    height: 6px;
}

.sidebar {
    grid-area: sidebar;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    padding: 1.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar h4 {
    color: var(--text-muted);
    font-size: 0.7rem;
    letter-spacing: 2px;
    padding: 0 12px 8px;
    text-transform: uppercase;
}

.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px;
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
.nav-item i { color: var(--oro); width: 22px; text-align: center; }
.nav-item:hover { background: rgba(201,167,81,0.1); }
.nav-item.active {
    background: rgba(201,167,81,0.15);
    border-left-color: var(--oro);
    color: var(--oro-dark);
    font-weight: 600;
}
[data-theme="dark"] .nav-item.active { color: var(--oro); }

.main-content {
    grid-area: main;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    min-width: 0;
}

.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem;
}
.page-header h2 {
    font-family: var(--font-ubuntu);
    font-size: 1.6rem;
    border-left: 5px solid var(--oro);
    padding-left: 14px;
}
.page-header .subtitle { color: var(--text-muted); font-size: 0.9rem; margin-top: 4px; }

.sidebar-backdrop { display: none; }

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
        grid-template-areas: "topbar" "tricolor" "main";
        grid-template-rows: 70px 6px 1fr;
    }
    .icon-btn.menu-toggle { display: inline-flex; }
    .sidebar {
        position: fixed;
        top: 76px;
        left: 0;
        width: 260px;
        max-width: 82vw;
        height: calc(100vh - 76px);
        transform: translateX(-100%);
        transition: transform 0.28s ease;
        z-index: 60;
        box-shadow: var(--shadow-lg);
        overflow-y: auto;
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.show {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.45);
        z-index: 55;
    }
    .main-content { padding: 1.5rem; }
}

@media (max-width: 640px) {
    .topbar { padding: 0 0.9rem; }
    .topbar-actions { gap: 0.4rem; }
    .topbar-user { max-width: none; padding: 6px 10px; }
    .topbar-user .user-email { display: none; }
    .topbar-brand img { height: 42px; }
    .main-content { padding: 1.25rem 1rem; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-toolbar .form-field { width: 100%; min-width: 0; }
    .pagination { flex-wrap: wrap; justify-content: center; }
    .page-header h2 { font-size: 1.35rem; }
}

/* =========================================================================
   Cards, Forms, Inputs
   ========================================================================= */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    border-top: 4px solid var(--oro);
    margin-bottom: 1.5rem;
}
.card h3 {
    font-family: var(--font-ubuntu);
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}
.card .helper { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.form-field label .req { color: var(--danger); margin-left: 2px; }

.form-field input,
.form-field select,
.form-field textarea {
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: 0.2s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--oro);
    box-shadow: 0 0 0 3px rgba(201,167,81,0.18);
}
.form-field input.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(184,34,39,0.15);
}

.form-actions { display: flex; gap: 10px; margin-top: 1.25rem; flex-wrap: wrap; }

.btn {
    border: none;
    padding: 11px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: 0.25s;
}
.btn-primary { background: var(--oro); color: var(--negro); }
.btn-primary:hover { background: var(--oro-dark); color: var(--blanco); }
.btn-ghost { background: transparent; color: var(--text-main); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg-body); }
.btn-danger { background: var(--danger); color: white; }
.btn-success { background: var(--success); color: white; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* =========================================================================
   Tables
   ========================================================================= */
.table-wrapper {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--oro);
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
table.data-table th,
table.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
table.data-table th {
    background: var(--bg-body);
    color: var(--text-muted);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}
table.data-table tbody tr:hover { background: rgba(201,167,81,0.06); }
table.data-table tbody tr:last-child td { border-bottom: none; }

.empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}
.empty-state i { font-size: 2.5rem; color: var(--oro); margin-bottom: 1rem; }

.table-toolbar {
    display: flex; flex-wrap: wrap; gap: 10px;
    align-items: end;
    margin-bottom: 1rem;
}

/* =========================================================================
   Chips, badges, status
   ========================================================================= */
.chip {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(201,167,81,0.15);
    color: var(--oro-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
[data-theme="dark"] .chip { color: var(--oro); }
.chip.success { background: rgba(21,89,47,0.12); color: var(--success); }
.chip.danger  { background: rgba(184,34,39,0.12); color: var(--danger); }
.chip.info    { background: rgba(29,109,177,0.12); color: var(--info); }

/* =========================================================================
   Toasts
   ========================================================================= */
.toast-stack {
    position: fixed;
    top: 90px; right: 20px;
    display: flex; flex-direction: column; gap: 10px;
    z-index: 9999;
}
.toast {
    background: var(--card-bg);
    color: var(--text-main);
    padding: 12px 16px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--oro);
    min-width: 280px;
    display: flex; align-items: center; gap: 10px;
    animation: slideIn 0.25s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.danger  { border-left-color: var(--danger); }
.toast.info    { border-left-color: var(--info); }
.toast i { font-size: 1.1rem; }
.toast.success i { color: var(--success); }
.toast.danger i  { color: var(--danger); }
.toast.info i    { color: var(--info); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* =========================================================================
   Stats cards & charts
   ========================================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--oro);
}
.stat-card .label { color: var(--text-muted); font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; }
.stat-card .value { font-family: var(--font-ubuntu); font-size: 2rem; color: var(--oro); margin-top: 4px; }

.chart-container {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--oro);
    min-height: 380px;
    position: relative;
}

/* =========================================================================
   Estadísticas: switch de vistas, controles y detalle por aula
   ========================================================================= */
.view-switch { display: flex; flex-wrap: wrap; gap: 8px; }

.stats-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.basis-toggle { display: flex; gap: 8px; }
.date-field {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.date-field input {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--card-bg);
    color: var(--text-main);
    font-family: inherit;
}

.aula-detail { margin-top: 1.25rem; }
.aula-hint {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 0.75rem;
}
.aula-detail-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.aula-detail-head h3 { font-size: 1.1rem; margin: 0; color: var(--text-main); }
.aula-detail-total { margin-left: auto; font-weight: 700; color: var(--oro-dark); }
.eje-badge {
    background: var(--oro);
    color: #242732;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 3px 8px;
    border-radius: 6px;
}
.aula-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.85rem;
}
.aula-card {
    background: var(--card-bg);
    border-radius: 10px;
    border-top: 4px solid var(--oro);
    box-shadow: var(--shadow);
    padding: 0.9rem;
    text-align: center;
}
.aula-card .aula-code {
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: 1px;
}
.aula-card .aula-count {
    font-family: var(--font-ubuntu);
    font-size: 1.8rem;
    color: var(--oro);
    line-height: 1.1;
}
.aula-card .aula-cap { font-size: 0.72rem; color: var(--text-muted); }

/* =========================================================================
   Pagination
   ========================================================================= */
.pagination {
    display: flex; gap: 8px;
    align-items: center; justify-content: flex-end;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
}
.pagination button {
    background: transparent; border: 1px solid var(--border);
    color: var(--text-main); padding: 6px 14px;
    border-radius: 6px; cursor: pointer; font-weight: 600;
}
.pagination button:hover:not(:disabled) { background: var(--oro); color: var(--negro); border-color: var(--oro); }
.pagination button:disabled { opacity: 0.4; cursor: not-allowed; }
.pagination span { color: var(--text-muted); font-size: 0.85rem; }

/* =========================================================================
   Loading
   ========================================================================= */
.loading {
    display: flex; align-items: center; justify-content: center;
    padding: 2rem; gap: 10px; color: var(--text-muted);
}
.spinner {
    width: 22px; height: 22px;
    border: 3px solid var(--border);
    border-top-color: var(--oro);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Footer */
.event-footer {
    background: var(--surface);
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
    border-top: 3px solid var(--oro);
    width: 100%;
}
.event-footer strong { color: var(--oro-dark); }

/* =========================================================================
   Ubuntu (línea gráfica oficial de Cumbre Minera) + Credencial con QR
   ========================================================================= */
@font-face {
    font-family: 'Ubuntu';
    src: url('../assets/Ubuntu-Regular.ttf') format('truetype');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Ubuntu';
    src: url('../assets/Ubuntu-Medium.ttf') format('truetype');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Ubuntu';
    src: url('../assets/Ubuntu-Bold.ttf') format('truetype');
    font-weight: 700;
    font-display: swap;
}
:root { --font-ubuntu: 'Ubuntu', system-ui, -apple-system, sans-serif; }

/* Acciones de fila (editar/eliminar) en las tablas de administración */
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.btn-sm { padding: 6px 10px; font-size: 0.85rem; }

/* =========================================================================
   Modal de edición de participante + disponibilidad de aulas
   ========================================================================= */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(20, 22, 30, 0.72);
}
.modal-overlay.is-open { display: flex; }
.modal-box {
    position: relative;
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    max-height: 92vh;
    overflow: auto;
}
.modal-form { width: min(640px, 96vw); }
.modal-form h3 { margin-bottom: 0.25rem; }
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.08);
    color: var(--text-main);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}
.modal-close:hover { background: var(--oro); color: #fff; }
.edit-subject { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

.avail-hint {
    margin-top: 8px;
    font-size: 0.8rem;
    background: rgba(201, 167, 81, 0.08);
    border-left: 3px solid var(--oro);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
}
.avail-hint.avail-empty { border-left-color: var(--rojo, #B82227); color: var(--text-main); }
.avail-intro { font-weight: 700; color: var(--oro-dark); margin-bottom: 4px; }
.avail-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    padding: 3px 0;
    color: var(--text-main);
}
.avail-row .avail-axis { font-weight: 600; }
.avail-row .avail-free { color: var(--oro-dark); }
.avail-row .avail-aulas { color: var(--text-muted); }

/* Institución: campo a todo el ancho de la grilla + pista de rol */
.form-field-wide { grid-column: 1 / -1; }
.role-hint {
    margin-top: 4px;
    font-size: 0.82rem;
    color: var(--text-muted);
    min-height: 1.1rem;
}
.role-hint strong { color: var(--oro-dark); }

/* Credencial imprimible */
.credential { font-family: var(--font-ubuntu); margin-top: 1.5rem; }
.credential-head {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 2px solid var(--oro);
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.cred-logo { height: 64px; width: auto; }
.cred-title { font-weight: 700; font-size: 1.15rem; color: var(--negro); }
.cred-sub { font-size: 0.85rem; color: var(--text-muted); letter-spacing: 0.5px; }

.credential-body {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
}
.cred-info { flex: 1 1 240px; }
.cred-name { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; }
.cred-line { font-size: 0.95rem; margin: 2px 0; }
.cred-line span {
    display: inline-block;
    min-width: 84px;
    color: var(--text-muted);
    font-weight: 500;
}
.cred-seat {
    margin-top: 12px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.cred-seat > div {
    background: rgba(201, 167, 81, 0.12);
    border: 1px solid var(--oro);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 1.1rem;
    font-weight: 700;
}
.cred-seat > div span {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--oro-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cred-seat-rotating {
    margin-top: 12px;
    color: var(--text-muted);
    font-style: italic;
}
/* Seated participants: the thematic axis is the headline, the aula goes below. */
.cred-seat-fixed {
    margin-top: 12px;
    background: rgba(201, 167, 81, 0.12);
    border: 1px solid var(--oro);
    border-radius: 10px;
    padding: 12px 16px;
    text-align: center;
}
.cred-eje {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--negro);
    line-height: 1.25;
}
.cred-aula {
    margin-top: 6px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--oro-dark);
}
.cred-aula span {
    display: block;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--oro-dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.cred-qr { text-align: center; flex: 0 0 auto; }
.cred-qr canvas { border: 1px solid var(--border); border-radius: 8px; }
.cred-qr-caption {
    margin-top: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Aula pivote (disposición libre) y ayudas de formulario */
.pivote-badge {
    display: inline-block;
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    border: 1px solid var(--oro);
    color: var(--oro-dark);
    background: rgba(201, 167, 81, 0.12);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.field-hint {
    display: block;
    margin-top: 0.3rem;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* Mostrar/ocultar contraseña */
.pass-wrap { position: relative; }
.pass-wrap input { width: 100%; padding-right: 42px; }
.pass-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px 8px;
    font-size: 1rem;
    line-height: 1;
}
.pass-toggle:hover { color: var(--oro); }

/* Combobox con búsqueda (registro) y filtros de reportes */
.combo { position: relative; }
.combo-list {
    position: absolute;
    z-index: 30;
    left: 0;
    right: 0;
    top: calc(100% + 2px);
    max-height: 240px;
    overflow-y: auto;
    background: var(--card-bg, #fff);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: var(--shadow);
}
.combo-list[hidden] { display: none; }
.combo-option { padding: 8px 12px; cursor: pointer; font-size: 0.9rem; }
.combo-option:hover, .combo-option.active { background: rgba(201, 167, 81, 0.15); }
.combo-empty { padding: 8px 12px; color: var(--text-muted); font-size: 0.85rem; }

/* Lector QR con cámara (página de Asistencia) */
.qr-scan {
    margin-top: 1rem;
    max-width: 340px;
}
.qr-scan #qr-reader {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 0.6rem;
}
