:root {
    --primary: #1a365d;
    --primary-dark: #0d1b2a;
    --primary-light: #2d4a7a;
    --primary-tint: #e8edf3;
    --secondary: #4a6fa5;
    --secondary-light: #7a9bc7;
    --accent: #c8102e;

    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f0f2f5;
    --gray-200: #e2e6ea;
    --gray-300: #c9cfd6;
    --gray-400: #a8b2bf;
    --gray-500: #7a8798;
    --gray-600: #5a6a7a;
    --gray-700: #3d4a5a;
    --gray-800: #2a3545;
    --gray-900: #1a2535;
    --black: #0d121c;

    --success: #2d7d46;
    --success-bg: #e6f2ea;
    --warning: #b8860b;
    --warning-bg: #fef7e6;
    --danger: #b33a3a;
    --danger-bg: #fce8e8;
    --info: #2a6b8a;
    --info-bg: #e4f0f5;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-sm: 0 1px 3px rgba(26, 54, 93, 0.08);
    --shadow-md: 0 4px 16px rgba(26, 54, 93, 0.10);
    --shadow-lg: 0 8px 32px rgba(26, 54, 93, 0.12);

    --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
    --font-mono: "JetBrains Mono", "Courier New", monospace;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--gray-50);
    min-height: 100vh;
    height: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    z-index: -1;
    transition: background 0.3s ease;
}

@media (max-width: 640px) {
    body::before {
        height: 320px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
    }
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
}

/* ===== TOPBAR ===== */
.topbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--white);
    flex-wrap: wrap;
    gap: 12px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand__mark {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.5px;
}

.brand__sub {
    font-family: var(--font-mono);
    font-size: 11px;
    opacity: 0.7;
    letter-spacing: 0.5px;
    font-weight: 400;
}

.brand__divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 4px;
}

.topbar__nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.topbar__home {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--white);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 14px;
    border-radius: 100px;
    opacity: 0.85;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar__home:hover {
    background: rgba(255, 255, 255, 0.12);
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.3);
}

/* ===== MAIN ===== */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 80px;
    min-height: calc(100vh - 120px);
}

.view {
    display: none;
}

.view.active {
    display: block;
    animation: rise 0.35s ease both;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hidden {
    display: none !important;
}

/* ===== HERO ===== */
.hero {
    text-align: center;
    color: var(--white);
    padding: 20px 0 40px;
}

.hero h1 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 34px;
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.hero h1 span {
    opacity: 0.7;
    font-weight: 400;
}

.hero p {
    font-family: var(--font-mono);
    font-size: 13px;
    opacity: 0.8;
    margin: 0;
}

.hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 11px;
    font-family: var(--font-mono);
    letter-spacing: 0.5px;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ===== ROLE CARDS ===== */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 8px;
}

.role-grid--single {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.hero-note {
    text-align: center;
    color: var(--white);
    opacity: 0.75;
    font-size: 13px;
    max-width: 480px;
    margin: 24px auto 0;
    line-height: 1.6;
}

@media (max-width: 620px) {
    .role-grid {
        grid-template-columns: 1fr;
    }
}

.role-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px 26px;
    box-shadow: var(--shadow-md);
    text-align: left;
    cursor: pointer;
    border: 1px solid var(--gray-200);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.role-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.role-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.role-card__eyebrow {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    font-weight: 700;
}

.role-card h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 21px;
    margin: 6px 0 8px;
    color: var(--gray-900);
}

.role-card p {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px;
}

.role-card .btn {
    width: 100%;
}

/* ===== LOGIN ===== */
.login-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 220px);
    padding: 20px;
}

.login-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-tint);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
}

.login-header h1 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 24px;
    margin: 0 0 4px;
    color: var(--gray-900);
}

.login-header p {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* ===== PANELS ===== */
.panel {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    border: 1px solid var(--gray-200);
}

.panel-full {
    overflow: visible;
    max-width: 100%;
}

.section-title {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 4px;
    color: var(--gray-900);
}

.section-sub {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-500);
    margin: 0 0 18px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 100px;
    padding: 12px 22px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary-tint);
}

.btn-ghost {
    background: var(--gray-100);
    color: var(--gray-700);
}

.btn-ghost:hover {
    background: var(--gray-200);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #1e6b3a;
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #8f2e2e;
    box-shadow: var(--shadow-md);
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ===== VIEW HEADER ===== */
.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}

.view-header h1 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 24px;
    color: var(--white);
    margin: 0;
}

/* ===== EVENT GRID ===== */
.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.event-card {
    background: var(--white);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    padding: 20px;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.event-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

.event-card__index {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-500);
}

.event-card h3 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 17px;
    margin: 0;
    line-height: 1.3;
    color: var(--gray-900);
}

.event-card p {
    font-size: 13px;
    color: var(--gray-600);
    margin: 0;
    line-height: 1.5;
}

.event-card__meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: auto;
}

/* ===== BADGES ===== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.badge--primary {
    background: var(--primary-tint);
    color: var(--primary);
    border-color: #c5d4e6;
}

.badge--primary::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
}

.badge--success {
    background: var(--success-bg);
    color: var(--success);
    border-color: #b8d5c4;
}

.badge--success::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
}

.badge--warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: #eddba6;
}

.badge--warning::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warning);
    display: inline-block;
}

/* ===== BACK BUTTON ===== */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 12px;
    cursor: pointer;
    margin-bottom: 10px;
    padding: 4px 0;
    opacity: 0.85;
    transition: opacity 0.2s ease;
}

.back-btn:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ===== DETAIL HEAD ===== */
.detail-head {
    color: var(--white);
    margin-bottom: 22px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.detail-head__main {
    flex: 1;
}

.detail-head h1 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 26px;
    margin: 4px 0 6px;
    word-break: break-word;
}

.detail-head p {
    font-family: var(--font-mono);
    font-size: 12px;
    opacity: 0.8;
    margin: 0;
    word-break: break-word;
}

.detail-head__stats {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-mini {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 4px;
}

.stat-mini__value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.stat-mini__label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.7;
    font-weight: 600;
}

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--white);
    padding: 4px;
    border-radius: 100px;
    border: 1px solid var(--gray-200);
    width: fit-content;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}

.tab-btn {
    border: none;
    background: transparent;
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s ease;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

.tab-btn:hover:not(.active) {
    background: var(--gray-100);
    color: var(--gray-700);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ===== PHASE LIST ===== */
.phase-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.phase-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

.phase-row__name {
    font-weight: 600;
    font-size: 14px;
    color: var(--gray-800);
}

.phase-row__meta {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--gray-500);
}

.phase-row--clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.phase-row--clickable:hover {
    border-color: var(--primary);
    background: var(--white);
}

.phase-row--clickable:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* ===== FORMS ===== */
.field {
    margin-bottom: 16px;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .field-row {
        grid-template-columns: 1fr;
    }

    .login-box {
        padding: 28px 20px;
    }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
textarea,
select,
input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: var(--font-body);
    background: var(--white);
    color: var(--gray-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%235a6a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}

.field-hint {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 5px;
}

/* ============================================================
   TABLE TOOLBAR - BUSCADOR Y FILTRO EN LA MISMA FILA
   ============================================================ */

.table-toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* El contenedor del filtro y buscador ocupa todo el ancho */
.filter-group {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    flex-wrap: wrap;
    width: 100%;
}

/* El buscador ocupa todo el espacio disponible */
.filter-group .search-input {
    flex: 1;
    min-width: 200px;
}

/* El filtro tiene tamaño fijo */
.filter-group #asistencia-filter-mode {
    width: 200px;
    flex-shrink: 0;
    flex-grow: 0;
}

/* El badge de conteo se alinea a la derecha */
.table-toolbar .badge {
    flex-shrink: 0;
    margin-left: auto;
}

/* ============================================================
   RESPONSIVE - PANTALLAS PEQUEÑAS
   ============================================================ */

@media (max-width: 768px) {
    .table-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .filter-group .search-input {
        min-width: unset;
        flex: unset;
        width: 100%;
    }

    .filter-group #asistencia-filter-mode {
        width: 100%;
        flex-shrink: unset;
        flex-grow: unset;
    }

    .table-toolbar .badge {
        margin-left: 0;
        text-align: center;
        justify-content: center;
    }
}

/* ===== TABLE ===== */
.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
}

table.att-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1100px;
}

.att-table thead th {
    text-align: left;
    background: var(--gray-50);
    color: var(--gray-600);
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
    white-space: nowrap;
}

.att-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
    vertical-align: middle;
}

.att-table tbody tr:last-child td {
    border-bottom: none;
}

.att-table tbody tr:hover {
    background: var(--gray-50);
}

/* ===== TABLE CELLS ===== */
.student-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-800);
}

.student-email {
    font-family: var(--font-mono);
    color: var(--gray-500);
    font-size: 12px;
}

.student-phone {
    font-family: var(--font-mono);
    color: var(--gray-400);
    font-size: 11px;
    margin-top: 2px;
}

.fecha-asignacion {
    font-family: var(--font-mono);
    font-size: 11px;
    line-height: 1.4;
}

.fecha-asignacion .fecha {
    font-weight: 600;
    color: var(--gray-800);
}

.fecha-asignacion .hora {
    color: var(--gray-500);
    font-size: 10px;
}

/* ===== PILLS ===== */
.count-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 100px;
    display: inline-block;
    text-align: center;
    min-width: 30px;
}

.count-pill--zero {
    background: var(--gray-100);
    color: var(--gray-500);
}

.count-pill--some {
    background: var(--primary-tint);
    color: var(--primary);
}

.faltas-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 100px;
    display: inline-block;
    text-align: center;
    min-width: 30px;
}

.faltas-pill--zero {
    background: var(--gray-100);
    color: var(--gray-500);
}

.faltas-pill--some {
    background: var(--warning-bg);
    color: var(--warning);
}

.puntaje-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 12px;
    color: var(--gray-800);
    white-space: nowrap;
}

/* ============================================================
   ESTILOS PARA ACCIONES - COLUMNA MÁS ANCHA
   ============================================================ */

/* Columna de acciones - más ancha para que quepan los botones */
.att-table thead th:last-child,
.att-table tbody td:last-child {
    min-width: 200px;
    white-space: nowrap;
    padding: 12px 16px;
    text-align: center;
}

/* Contenedor de acciones en horizontal */
.acciones-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: center;
}

/* Botones de acciones con tamaño normal */
.acciones-container .edit-btn,
.acciones-container .delete-btn,
.acciones-container .asistencia-manual-btn {
    font-size: 11px;
    padding: 6px 14px;
    min-height: 34px;
    white-space: nowrap;
    border-radius: 100px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.acciones-container .edit-btn i,
.acciones-container .delete-btn i,
.acciones-container .asistencia-manual-btn i {
    font-size: 12px;
}

.edit-btn {
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.edit-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
    color: var(--primary);
}

.delete-btn {
    border: 1.5px solid #e8c8c8;
    background: var(--danger-bg);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-btn:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.asistencia-manual-btn {
    border: 1.5px solid var(--success);
    background: var(--success-bg);
    color: var(--success);
    cursor: pointer;
    transition: all 0.2s ease;
}

.asistencia-manual-btn:hover {
    background: var(--success);
    color: var(--white);
    border-color: #1e6b3a;
    box-shadow: 0 2px 8px rgba(45, 125, 70, 0.3);
    transform: translateY(-1px);
}

.asistencia-manual-btn:active {
    transform: translateY(0);
}

.asistencia-manual-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-detalle {
    font-size: 11px;
    padding: 6px 14px;
    min-height: 34px;
    white-space: nowrap;
    border-radius: 100px;
    font-weight: 600;
    border: 1.5px solid var(--gray-300);
    background: var(--white);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-detalle:hover {
    background: var(--primary-tint);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-detalle i {
    font-size: 12px;
}

/* ============================================================
   BOTÓN ELIMINAR PARTICIPANTE (EN TABLA)
   ============================================================ */
.btn-eliminar-participante {
    font-size: 11px;
    padding: 6px 14px;
    min-height: 34px;
    white-space: nowrap;
    border-radius: 100px;
    font-weight: 600;
    border: 1.5px solid #e8c8c8;
    background: var(--danger-bg);
    color: var(--danger);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-eliminar-participante:hover {
    background: var(--danger);
    color: var(--white);
    border-color: var(--danger);
}

.btn-eliminar-participante:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-eliminar-participante i {
    font-size: 12px;
}

/* ============================================================
   FILAS EDITABLES (MODO EDICIÓN)
   ============================================================ */
.fila-editable {
    cursor: pointer;
    transition: background 0.2s ease;
}

.fila-editable:hover {
    background: var(--primary-tint) !important;
}

/* ============================================================
   RESPONSIVE - MANTENER TAMAÑO DE LETRAS
   ============================================================ */

@media (max-width: 1024px) {
    table.att-table {
        min-width: 1000px;
    }

    .att-table thead th:last-child,
    .att-table tbody td:last-child {
        min-width: 180px;
    }
}

@media (max-width: 768px) {
    table.att-table {
        min-width: 850px;
    }

    .att-table thead th:last-child,
    .att-table tbody td:last-child {
        min-width: 160px;
    }

    /* En móviles, los botones se envuelven pero mantienen tamaño */
    .acciones-container {
        flex-wrap: wrap;
        gap: 4px;
    }

    .acciones-container .edit-btn,
    .acciones-container .delete-btn,
    .acciones-container .asistencia-manual-btn,
    .btn-eliminar-participante {
        font-size: 11px;
        padding: 5px 12px;
        min-height: 30px;
    }

    .btn-detalle {
        font-size: 11px;
        padding: 5px 12px;
        min-height: 30px;
    }
}

@media (max-width: 480px) {
    table.att-table {
        min-width: 750px;
    }

    .att-table thead th:last-child,
    .att-table tbody td:last-child {
        min-width: 150px;
    }

    .acciones-container .edit-btn,
    .acciones-container .delete-btn,
    .acciones-container .asistencia-manual-btn,
    .btn-eliminar-participante {
        font-size: 11px;
        padding: 4px 10px;
        min-height: 28px;
    }

    .btn-detalle {
        font-size: 11px;
        padding: 4px 10px;
        min-height: 28px;
    }
}

/* ============================================================
   ESTILOS PARA MODAL DE ASISTENCIA MANUAL
   ============================================================ */
#asistencia-manual-overlay .modal-box {
    max-width: 480px;
}

#asistencia-manual-overlay .modal-box-md {
    max-width: 480px;
}

#asistencia-manual-form .field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

#asistencia-manual-form .field-row .field {
    margin-bottom: 0;
}

#asistencia-manual-form .field {
    margin-bottom: 14px;
}

#asistencia-manual-form label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

#asistencia-manual-form input[type="date"],
#asistencia-manual-form input[type="time"] {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--white);
    color: var(--gray-900);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#asistencia-manual-form input[type="date"]:focus,
#asistencia-manual-form input[type="time"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

#asistencia-manual-form input[type="date"]:disabled,
#asistencia-manual-form input[type="time"]:disabled {
    background: var(--gray-100);
    cursor: not-allowed;
}

#asistencia-manual-error {
    margin-top: 0;
    margin-bottom: 12px;
    display: none;
}

#asistencia-manual-error.show {
    display: block;
}

#asistencia-manual-form .modal-box__actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 8px;
}

#asistencia-manual-form .modal-box__actions .btn {
    min-width: 120px;
    flex: 1;
}

/* ============================================================
   RESPONSIVE ASISTENCIA MANUAL
   ============================================================ */
@media (max-width: 480px) {
    #asistencia-manual-form .field-row {
        grid-template-columns: 1fr;
    }

    #asistencia-manual-form .modal-box__actions {
        flex-direction: column;
    }

    #asistencia-manual-form .modal-box__actions .btn {
        width: 100%;
        min-width: unset;
    }
}

/* ============================================================
   INDICADOR DE ASISTENCIA MANUAL EN DETALLES
   ============================================================ */
.asistencia-manual-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    background: var(--warning-bg);
    color: var(--warning);
    padding: 1px 8px;
    border-radius: var(--radius-sm);
    margin-left: 4px;
    border: 1px solid #eddba6;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================================
   ENLACES CARDS
   ============================================================ */
.enlaces-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 768px) {
    .enlaces-grid {
        grid-template-columns: 1fr;
    }
}

.enlace-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.2s ease;
}

.enlace-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.enlace-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 0;
}

.enlace-card__icon {
    font-size: 28px;
    line-height: 1;
    color: var(--primary);
    width: 44px;
    text-align: center;
}

.enlace-card__header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-900);
}

.enlace-card__body {
    padding: 12px 24px 0;
}

.enlace-card__desc {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.enlace-card__desc strong {
    color: var(--gray-800);
}

.enlace-card__features {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.feature-tag {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 4px 12px;
    border-radius: 100px;
    background: var(--gray-100);
    color: var(--gray-600);
    border: 1px solid var(--gray-200);
}

.feature-tag--primary {
    background: var(--primary-tint);
    color: var(--primary);
    border-color: #c5d4e6;
}

.enlace-card__actions {
    padding: 16px 24px;
}

.enlace-card__actions .btn {
    width: 100%;
}

/* ===== QR DETAIL ===== */
.qr-detail-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 250px);
    padding: 20px 0;
}

.qr-detail-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
    padding: 36px;
    max-width: 800px;
    width: 100%;
}

.qr-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.qr-detail-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.qr-detail-header h1 {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--gray-900);
}

.qr-detail-header p {
    margin: 4px 0 0 0;
    font-size: 14px;
    color: var(--gray-500);
}

.qr-detail-body {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.qr-detail-box {
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-detail-box canvas {
    max-width: 100%;
    height: auto;
}

.qr-detail-info {
    flex: 1;
    min-width: 250px;
}

.qr-detail-link {
    margin-bottom: 16px;
}

.qr-detail-link label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.qr-detail-link .qr-link-row {
    display: flex;
    gap: 8px;
}

.qr-detail-link .qr-link-row input {
    flex: 1;
    font-size: 13px;
    padding: 10px 14px;
    background: var(--gray-50);
}

.qr-detail-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.qr-detail-actions .btn {
    flex: 1;
    min-width: 120px;
}

#qr-detail-hint {
    margin-top: 8px;
    font-size: 12px;
}

@media (max-width: 640px) {
    .qr-detail-card {
        padding: 20px;
    }

    .qr-detail-body {
        flex-direction: column;
        align-items: center;
    }

    .qr-detail-box {
        width: 100%;
        max-width: 320px;
    }

    #qr-detail-box {
        width: 250px !important;
        height: 250px !important;
    }

    .qr-detail-actions .btn {
        flex: 1;
        min-width: 100px;
    }
}

/* ===== QR LAYOUT (legacy) ===== */
.qr-layout {
    display: flex;
    gap: 26px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.qr-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-side {
    flex: 1;
    min-width: 240px;
}

.qr-link-row {
    display: flex;
    gap: 8px;
    margin: 14px 0;
}

.qr-link-row input {
    flex: 1;
}

/* ===== STUDENT ===== */
.student-shell {
    max-width: 440px;
    margin: 0 auto;
}

.event-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 100px;
    margin-bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== INLINE MESSAGES ===== */
.inline-msg {
    font-size: 13px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    display: none;
}

.inline-msg.show {
    display: block;
}

.inline-msg--warn {
    background: var(--warning-bg);
    color: var(--warning);
    border: 1px solid #eddba6;
}

.inline-msg--error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #e8c8c8;
}

.inline-msg--success {
    background: var(--success-bg);
    color: var(--success);
    border: 1px solid #b8d5c4;
}

/* ===== VERDICT ===== */
.verdict-card {
    text-align: center;
    padding: 40px 26px;
}

.verdict-stamp {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: var(--success);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin: 0 auto 18px;
    animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes pop {
    from {
        transform: scale(0.4);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.verdict-title {
    font-family: var(--font-mono);
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--success);
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.verdict-card h2 {
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 22px;
    margin: 0 0 8px;
    line-height: 1.35;
    color: var(--gray-900);
}

.verdict-card p {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0 0 4px;
}

.verdict-ticket {
    margin-top: 20px;
    border-top: 1.5px dashed var(--gray-300);
    padding-top: 16px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--gray-500);
    text-align: left;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
}

.verdict-ticket b {
    color: var(--gray-800);
}

/* ===== VERDICT RESUMEN ===== */
.verdict-resumen {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    border: 1px solid var(--gray-200);
    margin-top: 16px;
    text-align: left;
}

.verdict-resumen-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.verdict-resumen-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-800);
}

.verdict-resumen-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.resumen-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: var(--white);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    flex: 1;
    min-width: 60px;
}

.resumen-stat-value {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-800);
}

.resumen-stat-label {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.resumen-stat-asistio .resumen-stat-value {
    color: var(--success);
}

.resumen-stat-falta .resumen-stat-value {
    color: var(--danger);
}

.verdict-detalles-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 150px;
    overflow-y: auto;
}

.verdict-detalles-list li {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--gray-100);
}

.verdict-detalles-list li:last-child {
    border-bottom: none;
}

.verdict-detalles-list li.asistio {
    color: var(--success);
}

.verdict-detalles-list li.falta {
    color: var(--danger);
}

.verdict-detalles-list .empty-msg {
    color: var(--gray-400);
    font-style: italic;
    padding: 8px;
}

/* ===== STATE MESSAGES ===== */
.state-msg {
    text-align: center;
    padding: 40px 10px;
    color: var(--gray-500);
    font-size: 14px;
}

.spinner {
    width: 26px;
    height: 26px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto 12px;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== TOAST ===== */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--gray-900);
    color: var(--white);
    padding: 12px 24px;
    border-radius: 100px;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 50;
    max-width: 90vw;
    text-align: center;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 30px 20px 10px;
    color: var(--gray-400);
    font-family: var(--font-mono);
    font-size: 11px;
}

/* ===== MODALS ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 18, 28, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.show {
    display: flex;
}

.modal-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px 26px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-box-lg {
    max-width: 560px;
}

.modal-box__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.modal-box__header h3 {
    margin: 0;
    font-size: 17px;
    color: var(--gray-900);
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: var(--gray-400);
    padding: 0;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--gray-800);
}

.modal-box__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.modal-box__actions .btn {
    flex: 1;
}

/* ============================================================
   MODAL DETALLES - MÁS GRANDE, ANCHO Y CON ALTURA FIJA
   ============================================================ */
#asistencia-detalle-overlay .modal-box {
    max-width: 820px;
    width: 100%;
    max-height: 90vh;
    height: auto;
    min-height: 500px;
    padding: 32px 36px;
    display: flex;
    flex-direction: column;
}

#asistencia-detalle-overlay .modal-box-lg {
    max-width: 820px;
    min-height: 500px;
}

#asistencia-detalle-overlay .asistencia-detalle-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    flex: 1;
}

#asistencia-detalle-overlay .asistencia-detalle-col {
    max-height: 380px;
    min-height: 280px;
    overflow-y: auto;
    padding: 18px 20px;
    flex: 1;
}

#asistencia-detalle-overlay .asistencia-detalle-col h4 {
    position: sticky;
    top: 0;
    background: var(--gray-50);
    padding-bottom: 8px;
    margin-bottom: 8px;
    z-index: 1;
}

#asistencia-detalle-overlay .asistencia-detalle-col li {
    font-size: 13px;
    padding: 8px 0;
}

#asistencia-detalle-overlay .modal-box__header {
    flex-shrink: 0;
}

#asistencia-detalle-overlay .modal-box__actions {
    flex-shrink: 0;
    margin-top: 16px;
}

@media (max-width: 768px) {
    #asistencia-detalle-overlay .modal-box {
        max-width: 95vw;
        padding: 20px;
        max-height: 95vh;
        min-height: 400px;
    }

    #asistencia-detalle-overlay .asistencia-detalle-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    #asistencia-detalle-overlay .asistencia-detalle-col {
        max-height: 220px;
        min-height: 150px;
    }
}

@media (max-width: 480px) {
    #asistencia-detalle-overlay .modal-box {
        padding: 16px;
        min-height: 350px;
    }

    #asistencia-detalle-overlay .asistencia-detalle-col {
        max-height: 180px;
        min-height: 120px;
        padding: 12px 14px;
    }

    #asistencia-detalle-overlay .asistencia-detalle-col li {
        font-size: 12px;
        padding: 6px 0;
    }
}

/* ============================================================
   BOTÓN MARCAR ASISTENCIA EN MODAL - SOLO ÍCONO TRANSPARENTE
   ============================================================ */
.btn-marcar-asistencia {
    padding: 4px 8px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
}

.btn-marcar-asistencia:hover {
    background: color-mix(in srgb, var(--accent) 25%, transparent);
}

.btn-marcar-asistencia i {
    font-size: 14px;
}

/* ===== QR EXPAND ===== */
#qr-expand-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 18, 28, 0.85);
    backdrop-filter: blur(8px);
    z-index: 999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#qr-expand-container {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#qr-expand-box {
    width: 400px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#qr-expand-box canvas,
#qr-expand-box img {
    max-width: 100%;
    max-height: 100%;
}

@media (max-width: 500px) {
    #qr-expand-box {
        width: 280px;
        height: 280px;
    }
}

#qr-expand-close {
    margin-top: 20px;
    padding: 10px 30px;
    border: none;
    border-radius: 100px;
    background: var(--primary);
    color: var(--white);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

#qr-expand-close:hover {
    background: var(--primary-dark);
}

/* ===== ASISTENCIA DETALLE ===== */
.asistencia-detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

@media (max-width: 600px) {
    .asistencia-detalle-grid {
        grid-template-columns: 1fr;
    }
}

.asistencia-detalle-col {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.asistencia-detalle-col h4 {
    font-size: 13px;
    margin: 0 0 10px 0;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background: var(--gray-50);
    padding-bottom: 6px;
    border-bottom: 1px solid var(--gray-200);
}

.asistencia-detalle-col ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.asistencia-detalle-col li {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 6px 0;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 8px;
}

.asistencia-detalle-col li:last-child {
    border-bottom: none;
}

.asistencia-detalle-col .empty-msg {
    color: var(--gray-400);
    font-size: 12px;
    font-style: italic;
}

.asistencia-detalle-col li.asistio {
    color: var(--success);
}

.asistencia-detalle-col li.falta {
    color: var(--danger);
}

/* ============================================================
   SOLICITUDES
   ============================================================ */
.solicitud-card {
    border-left: 4px solid var(--warning);
}

.solicitud-card .btn-success {
    background: var(--success);
    color: var(--white);
}

.solicitud-card .btn-success:hover {
    background: #1e6b3a;
}

.solicitud-card .btn-danger {
    background: var(--danger);
    color: var(--white);
}

.solicitud-card .btn-danger:hover {
    background: #8f2e2e;
}

/* ===== UBICACION ===== */
#estado-ubicacion {
    transition: all 0.3s ease;
    min-height: 45px;
    display: flex;
    align-items: center;
}

#estado-ubicacion.verificado {
    background: var(--success-bg);
    border-color: var(--success);
    color: var(--success);
}

#estado-ubicacion.error {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
}

#estado-ubicacion.cargando {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: var(--warning);
}

/* ===== FILTROS ===== */
.filter-range {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: -4px 0 14px;
}

.filter-range .field {
    margin-bottom: 0;
    min-width: 160px;
    flex: 1;
}

.brand__logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    flex-shrink: 0;
}

.brand__logo img,
.brand__logo-img {
    width: 200%;
    height: 200%;
    object-fit: contain;
    display: block;
}

/* ============================================================
   ESTILOS PARA LOGIN CON 2FA - ENVIANDO CÓDIGO
   ============================================================ */

.btn-sending {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-sending .spinner-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

#admin-login-form .btn-sending {
    background: var(--primary-dark);
}

/* ============================================================
   ESTILOS PARA INPUTS DE CÓDIGO (2FA)
   ============================================================ */

.codigo-inputs-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.codigo-inputs {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.codigo-input {
    width: 56px;
    height: 64px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    font-family: var(--font-mono);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--gray-900);
    transition: all 0.2s ease;
    padding: 0;
    caret-color: var(--primary);
}

.codigo-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
    transform: scale(1.02);
}

.codigo-input:not(:placeholder-shown) {
    border-color: var(--primary);
    background: var(--primary-tint);
}

.codigo-input.codigo-input--error {
    border-color: var(--danger);
    background: var(--danger-bg);
    animation: shake 0.4s ease;
}

.codigo-input::-webkit-outer-spin-button,
.codigo-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.codigo-input[type="number"] {
    -moz-appearance: textfield;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

/* ============================================================
   ICONO DE CÓDIGO
   ============================================================ */

.codigo-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--warning-bg);
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto;
}

/* ============================================================
   TEMPORIZADOR
   ============================================================ */

#codigo-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--primary);
}

#codigo-timer.expirado {
    color: var(--danger) !important;
}

/* ============================================================
   BOTONES DE VERIFICACIÓN
   ============================================================ */

#btn-verificar-codigo:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#btn-verificar-codigo .spinner-dot {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

#btn-reenviar-codigo {
    transition: all 0.2s ease;
}

#btn-reenviar-codigo:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#btn-reenviar-codigo:hover:not(:disabled) {
    background: var(--gray-200);
}

#btn-reenviar-codigo .spinner-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: var(--gray-700);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

/* ============================================================
   ESTILOS PARA EL SELECTOR DE PALETA DE COLORES
   ============================================================ */

#solicitar-proyecto-form input[type="color"] {
    padding: 4px;
    height: 42px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--gray-300);
    background: var(--white);
}

#solicitar-proyecto-form input[type="color"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-tint);
}

.paleta-preview-item {
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.3px;
    border-radius: var(--radius-sm);
}

.paleta-preview-item:hover {
    transform: scale(1.05);
}

/* ============================================================
   RESPONSIVE - 2FA
   ============================================================ */

@media (max-width: 480px) {
    .codigo-input {
        width: 48px;
        height: 56px;
        font-size: 24px;
    }

    .codigo-inputs {
        gap: 8px;
    }

    .codigo-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
}

@media (max-width: 360px) {
    .codigo-input {
        width: 40px;
        height: 48px;
        font-size: 20px;
    }

    .codigo-inputs {
        gap: 6px;
    }
}

/* ============================================================
   WIZARD DE 3 PASOS - FORMULARIO "SOLICITAR PROYECTO"
   ============================================================ */

.stepper {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 0;
    margin: 8px 0 28px;
}

.stepper__step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 84px;
}

.stepper__circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-500);
    background: var(--white);
    border: 1.5px solid var(--gray-300);
    transition: all 0.25s ease;
}

.stepper__label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--gray-500);
    transition: color 0.25s ease;
}

.stepper__step.is-active .stepper__circle {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 0 0 4px var(--primary-tint);
}

.stepper__step.is-active .stepper__label {
    color: var(--primary);
}

.stepper__step.is-done .stepper__circle {
    background: var(--primary-tint);
    border-color: var(--primary);
    color: var(--primary);
}

.stepper__step.is-done .stepper__circle::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 13px;
}

.stepper__line {
    flex: 1;
    height: 1.5px;
    background: var(--gray-300);
    margin-top: 17px;
    max-width: 60px;
}

.form-step {
    display: none;
    animation: form-step-in 0.25s ease;
}

.form-step.is-active {
    display: block;
}

@keyframes form-step-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step__actions {
    display: flex;
    margin-top: 8px;
}

.form-step__actions--split {
    gap: 12px;
}

.form-step__actions--split .btn {
    flex: 1;
}

@media (max-width: 480px) {
    .stepper__label {
        display: none;
    }

    .stepper__step {
        min-width: 44px;
    }

    .stepper__line {
        max-width: 32px;
    }
}

/* ============================================================
   COLUMNA # Y FOTO EN TABLA DE PARTICIPANTES
   ============================================================ */

.att-table td.col-num {
    text-align: center;
    font-weight: 700;
    color: var(--gray-500);
    font-size: 13px;
}

.btn-foto-participante {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1.5px solid var(--gray-300);
    background: var(--gray-100);
    color: var(--gray-500);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn-foto-participante:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: scale(1.08);
}

.btn-foto-participante img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.btn-foto-participante i {
    font-size: 14px;
}

/* ============================================================
   MODAL FLOTANTE - FOTO DE PERFIL DEL PARTICIPANTE
   ============================================================ */

.foto-participante-overlay {
    background: rgba(13, 18, 28, 0.72);
    backdrop-filter: blur(10px);
}

.foto-participante-box {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 28px;
    width: 100%;
    max-width: 340px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    animation: foto-participante-in 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes foto-participante-in {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.foto-participante-box__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.foto-participante-box__close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
}

.foto-participante-box__img-wrap {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-tint);
    box-shadow: var(--shadow-md);
    background: var(--gray-100);
}

.foto-participante-box__img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.foto-participante-box__nombre {
    font-size: 16px;
    font-weight: 700;
    color: var(--gray-900);
    text-align: center;
}

@media (max-width: 480px) {
    .foto-participante-box {
        max-width: 280px;
        padding: 22px;
    }

    .foto-participante-box__img-wrap {
        width: 160px;
        height: 160px;
    }
}

/* ============================================================
   MODAL AGREGAR COLABORADOR
   ============================================================ */

#agregar-colaborador-overlay .modal-box {
    max-width: 600px;
    min-height: 400px;
}

.colaborador-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: background 0.2s ease;
    border-radius: var(--radius-sm);
}

.colaborador-item:hover {
    background: var(--gray-50);
}

.colaborador-item.selected {
    background: var(--primary-tint);
}

.colaborador-item:last-child {
    border-bottom: none;
}

.colaborador-item__info {
    flex: 1;
    min-width: 0;
}

.colaborador-item__nombre {
    font-weight: 600;
    font-size: 13px;
    color: var(--gray-800);
}

.colaborador-item__email {
    font-size: 12px;
    color: var(--gray-500);
    font-family: var(--font-mono);
}

.colaborador-item__telefono {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 2px;
}

.colaborador-item__checkbox {
    flex-shrink: 0;
    margin-left: 12px;
}

.colaborador-item__checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

#agregar-colaborador-lista {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 12px;
}

#agregar-colaborador-lista::-webkit-scrollbar {
    width: 6px;
}

#agregar-colaborador-lista::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: 3px;
}

#agregar-colaborador-lista::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

#agregar-colaborador-lista::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

#agregar-colaborador-seleccionados {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    #agregar-colaborador-overlay .modal-box {
        max-width: 95vw;
        padding: 18px;
        min-height: 350px;
    }

    .colaborador-item {
        padding: 8px 10px;
    }

    .colaborador-item__nombre {
        font-size: 12px;
    }

    .colaborador-item__email {
        font-size: 11px;
    }
}

/* ============================================================
   TOOLTIP DE COLABORADORES - ESTILO LABEL FLOTANTE
   ============================================================ */

/* Wrapper para contener el trigger y tooltip - POSITION RELATIVE */
.colaboradores-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
}

/* Trigger - el contador que activa el tooltip */
.colaboradores-trigger {
    font-size: 11px;
    color: var(--gray-500);
    cursor: pointer;
    border-bottom: 1.5px dashed var(--gray-400);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-weight: 500;
    user-select: none;
    background: transparent;
}

.colaboradores-trigger:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
    background: var(--primary-tint);
}

.colaboradores-trigger:active {
    transform: scale(0.95);
}

.tooltip-indicator {
    font-size: 9px;
    opacity: 0.6;
    font-weight: 700;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.colaboradores-trigger:hover .tooltip-indicator {
    color: var(--primary);
}

/* Tooltip flotante - POSITION ABSOLUTE relativo al wrapper */
.colaboradores-tooltip {
    display: none;
    position: absolute;
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    border: 1px solid var(--gray-200);
    min-width: 220px;
    max-width: 300px;
    max-height: 260px;
    overflow-y: auto;
    z-index: 99999;
    padding: 0;
    pointer-events: auto;
    transform: translateX(-50%);
    margin-top: 0;
    left: 50%;
}

.colaboradores-tooltip.show {
    display: block;
    animation: tooltip-pop 0.12s ease;
}

/* Flecha del tooltip apuntando hacia arriba */
.colaboradores-tooltip::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 7px solid var(--gray-200);
    z-index: 1;
}

.colaboradores-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--white);
    z-index: 2;
}

@keyframes tooltip-pop {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.92) translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) scale(1) translateY(0);
    }
}

.colaboradores-tooltip__header {
    font-size: 10px;
    font-weight: 700;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    gap: 6px;
}

.colaboradores-tooltip__header i {
    color: var(--primary);
}

.colaboradores-tooltip__list {
    padding: 4px 0;
}

.colaborador-tooltip-item {
    display: flex;
    flex-direction: column;
    padding: 6px 14px;
    border-bottom: 1px solid var(--gray-50);
    gap: 1px;
}

.colaborador-tooltip-item:last-child {
    border-bottom: none;
}

.colaborador-tooltip-item .colab-nombre {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-800);
}

.colaborador-tooltip-item .colab-email {
    font-size: 11px;
    color: var(--gray-500);
    font-family: var(--font-mono);
    display: flex;
    align-items: center;
    gap: 4px;
    word-break: break-all;
}

.colaborador-tooltip-item .colab-email i {
    font-size: 10px;
    color: var(--gray-400);
    flex-shrink: 0;
}

/* Scroll del tooltip */
.colaboradores-tooltip::-webkit-scrollbar {
    width: 4px;
}

.colaboradores-tooltip::-webkit-scrollbar-track {
    background: var(--gray-50);
    border-radius: 2px;
}

.colaboradores-tooltip::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 2px;
}

.colaboradores-tooltip::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ============================================================
   RESPONSIVE - TOOLTIP COLABORADORES
   ============================================================ */

@media (max-width: 768px) {
    .colaboradores-tooltip {
        min-width: 200px;
        max-width: 250px;
        max-height: 200px;
    }
    
    .colaborador-tooltip-item {
        padding: 5px 12px;
    }
    
    .colaborador-tooltip-item .colab-nombre {
        font-size: 12px;
    }
    
    .colaborador-tooltip-item .colab-email {
        font-size: 10px;
    }
    
    .colaboradores-tooltip__header {
        font-size: 9px;
        padding: 8px 12px 6px;
    }
}

@media (max-width: 480px) {
    .colaboradores-tooltip {
        min-width: 180px;
        max-width: 220px;
        max-height: 180px;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .colaborador-tooltip-item {
        padding: 4px 10px;
    }
    
    .colaborador-tooltip-item .colab-nombre {
        font-size: 11px;
    }
    
    .colaborador-tooltip-item .colab-email {
        font-size: 9px;
    }
}