/* Ace Tennis — Panel de gestión privado */

:root {
    --color-primary: #1a3a2a;
    --color-primary-light: #2d5a3d;
    --color-accent: #c8e600;
    --color-bg: #f4f5f7;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-muted: #6b7280;
    --color-border: #e5e7eb;
    --color-error: #dc2626;
    --color-success: #16a34a;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 3px rgba(0,0,0,.06);
    --transition: .2s ease;
    --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--color-primary-light); text-decoration: none; }
a:hover { color: var(--color-primary); }

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--color-text);
}

.logo-icon { color: var(--color-accent); font-size: 1.4rem; line-height: 1; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-family: var(--font);
    font-size: .875rem;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.2;
    white-space: nowrap;
}

.btn-primary { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.btn-primary:hover { background: var(--color-primary-light); border-color: var(--color-primary-light); color: #fff; }
.btn-outline { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-outline:hover { border-color: var(--color-primary); }
.btn-ghost { background: transparent; color: var(--color-text-muted); border: none; padding: 6px 10px; }
.btn-ghost:hover { background: var(--color-bg); color: var(--color-text); }
.btn-danger { background: var(--color-error); color: #fff; border-color: var(--color-error); }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.btn-danger:disabled,
.btn-danger[disabled],
.btn-danger.btn-muted { opacity: .5; }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-block { width: 100%; }

/* Login */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0f2419 100%);
    padding: 24px;
}

.login-box {
    background: var(--color-surface);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

.login-box h1 {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.login-sub {
    text-align: center;
    font-size: .85rem;
    color: var(--color-text-muted);
    margin-bottom: 28px;
}

/* Admin layout */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--color-primary);
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 50;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.sidebar-brand strong { display: block; font-size: .95rem; }
.sidebar-brand small { font-size: .75rem; opacity: .6; }
.sidebar-brand .logo-icon { color: var(--color-accent); font-size: 1.6rem; }

.sidebar-user {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    font-size: .875rem;
}

.sidebar-user span { display: block; font-weight: 600; }
.sidebar-user small { opacity: .6; font-size: .75rem; }

.admin-nav { flex: 1; padding: 12px 0; overflow-y: auto; }

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 20px;
    color: rgba(255,255,255,.7);
    font-size: .875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.admin-nav a:hover,
.admin-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.admin-nav .badge {
    margin-left: auto;
    background: var(--color-accent);
    color: var(--color-primary);
    font-size: .7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 100px;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255,255,255,.1);
}

.btn-logout {
    width: 100%;
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.25);
}

.btn-logout:hover {
    background: rgba(255,255,255,.1);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.header-session {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 12px;
    border-left: 1px solid var(--color-border);
}

.header-session-user {
    line-height: 1.25;
    text-align: right;
}

.header-session-user strong {
    display: block;
    font-size: .8rem;
    font-weight: 600;
}

.header-session-user small {
    font-size: .72rem;
    color: var(--color-text-muted);
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-width: 0;
}

.admin-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 20px 32px;
    position: sticky;
    top: 0;
    z-index: 40;
}

.admin-header h1 { font-size: 1.35rem; font-weight: 600; }

.admin-content { padding: 28px 32px; }

/* Stats */
.admin-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.admin-stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 20px;
}

.admin-stat-card strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.2;
}

.admin-stat-card span { font-size: .8rem; color: var(--color-text-muted); }

/* Panels */
.panel-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.panel-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.panel-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.panel-card-header h2,
.form-panel h2 {
    font-size: 1rem;
    font-weight: 600;
}

.form-panel { margin-bottom: 24px; }

/* Tables */
.table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.data-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--color-bg);
    font-weight: 600;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-text-muted);
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfc; }

.empty-cell {
    text-align: center;
    color: var(--color-text-muted);
    padding: 32px !important;
}

.actions-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.actions-inline form { display: inline; }

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 100px;
    white-space: nowrap;
}

.status-activo { background: #d1fae5; color: #065f46; }
.status-pendiente { background: #fef3c7; color: #92400e; }
.status-espera { background: #e0e7ff; color: #3730a3; }
.status-baja { background: #fee2e2; color: #991b1b; }
.status-pagado { background: #d1fae5; color: #065f46; }
.status-parcial { background: #ffedd5; color: #9a3412; }
.status-anulado { background: #f3f4f6; color: #4b5563; }

/* Schedule list */
.schedule-list { display: flex; flex-direction: column; gap: 0; }

.schedule-list-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.schedule-list-item:last-child { border-bottom: none; }

.schedule-time {
    display: block;
    font-size: .75rem;
    font-weight: 600;
    color: var(--color-primary-light);
}

.schedule-list-item strong { display: block; font-size: .875rem; }
.schedule-list-item small { color: var(--color-text-muted); font-size: .75rem; }

/* Forms */
.form-group { margin-bottom: 16px; }

.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: var(--font);
    font-size: .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(45,90,61,.1);
    background: #fff;
}

.form-group textarea { resize: vertical; min-height: 72px; }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 { grid-template-columns: repeat(3, 1fr); }

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}

.form-check label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
    cursor: pointer;
}

.form-check input { width: auto; }

.form-section-title {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--color-text-muted);
    margin: 20px 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--color-border);
}

.form-section-title:first-of-type { margin-top: 0; }

code {
    font-size: .8rem;
    background: var(--color-bg);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    margin-bottom: 20px;
}

.alert-success { background: #f0fdf4; color: var(--color-success); border: 1px solid #bbf7d0; }
.alert-error { background: #fef2f2; color: var(--color-error); border: 1px solid #fecaca; }

/* Grupos — tablero drag & drop */
.grupos-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.grupos-toolbar .cal-view-tabs {
    display: flex;
    gap: 8px;
}

.grupos-hint {
    font-size: .875rem;
    color: var(--color-text-muted);
}

.grupos-toolbar-actions {
    display: flex;
    gap: 8px;
}

.grupos-board {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 16px;
    min-height: 420px;
    align-items: flex-start;
}

.grupo-column {
    flex: 0 0 280px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 220px);
}

.grupo-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--color-border);
}

.grupo-header strong {
    display: block;
    font-size: .9rem;
    line-height: 1.3;
}

.grupo-nivel {
    display: block;
    font-size: .75rem;
    color: var(--color-text-muted);
    font-weight: 500;
    margin-top: 2px;
}

.grupo-count {
    font-size: .75rem;
    font-weight: 700;
    background: var(--color-bg);
    padding: 4px 10px;
    border-radius: 100px;
    white-space: nowrap;
}

.grupo-count-full {
    background: #fef3c7;
    color: #92400e;
}

.grupo-meta {
    padding: 0 16px 10px;
    font-size: .75rem;
    color: var(--color-text-muted);
}

.grupo-dropzone {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    min-height: 120px;
    transition: background var(--transition);
}

.grupo-dropzone.drag-over {
    background: rgba(200, 230, 0, .12);
    outline: 2px dashed var(--color-accent);
    outline-offset: -4px;
    border-radius: 0 0 var(--radius) var(--radius);
}

.grupo-empty {
    text-align: center;
    padding: 24px 12px;
    font-size: .8rem;
    color: var(--color-text-muted);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-sm);
}

.alumno-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: grab;
    transition: box-shadow var(--transition), transform var(--transition), opacity var(--transition);
}

.alumno-card:last-child { margin-bottom: 0; }

.alumno-card:hover {
    box-shadow: var(--shadow);
    border-color: var(--color-primary-light);
}

.alumno-card.dragging {
    opacity: .5;
    cursor: grabbing;
    transform: rotate(2deg);
}

.alumno-card[draggable="false"] {
    cursor: default;
}

.alumno-card.status-pendiente {
    border-left: 3px solid #f59e0b;
}

.alumno-card.status-espera {
    border-left: 3px solid #6366f1;
}

.alumno-card.status-baja {
    opacity: .6;
    border-left: 3px solid var(--color-error);
}

.alumno-card-name {
    font-weight: 600;
    font-size: .875rem;
    margin-bottom: 4px;
}

.alumno-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    font-size: .75rem;
    color: var(--color-text-muted);
}

.alumno-card-meta span {
    background: var(--color-surface);
    padding: 1px 6px;
    border-radius: 4px;
}

.alumno-card-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 100px;
    background: #fef3c7;
    color: #92400e;
}

.alumno-card-tutor {
    margin-top: 6px;
    font-size: .7rem;
    color: var(--color-text-muted);
}

.alumno-card-admitir { margin-top: 8px; }

.alumno-card.status-espera .alumno-card-badge {
    background: #e0e7ff;
    color: #3730a3;
}

.grupo-espera {
    border-top: 1px dashed var(--color-border);
    padding: 10px 12px 12px;
    background: #f5f6ff;
}

.grupo-espera-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .75rem;
    font-weight: 600;
    color: #3730a3;
    margin-bottom: 8px;
}

.grupo-espera-empty {
    font-size: .75rem;
    color: var(--color-text-muted);
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    transform: translateY(80px);
    opacity: 0;
    transition: all .3s ease;
    z-index: 999;
    pointer-events: none;
}

.toast-visible {
    transform: translateY(0);
    opacity: 1;
}

.toast-success {
    background: var(--color-primary);
    color: #fff;
}

.toast-error {
    background: var(--color-error);
    color: #fff;
}

/* Responsive */
@media (max-width: 900px) {
    .panel-grid { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: static;
        width: 100%;
    }

    .admin-layout { flex-direction: column; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 20px 16px; }
    .form-row, .form-row-3 { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .header-tools { flex-direction: column; width: 100%; align-items: stretch; }
    .global-search-wrap { width: 100%; }
    .header-session {
        border-left: none;
        padding-left: 0;
        justify-content: space-between;
    }
    .header-session-user { text-align: left; }
}

/* Header tools: búsqueda + notificaciones */
.admin-header-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 12px;
}

.global-search-wrap {
    position: relative;
    width: 280px;
}

.global-search-wrap input {
    width: 100%;
    padding: 8px 12px;
    font-size: .875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.global-search-results {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    max-height: 320px;
    overflow-y: auto;
    z-index: 200;
}

.global-search-results.open { display: block; }

.search-item {
    display: block;
    padding: 10px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.search-item:hover { background: var(--color-bg); }
.search-item strong { display: block; font-size: .875rem; }
.search-item span { font-size: .75rem; color: var(--color-text-muted); }
.search-empty { padding: 16px; text-align: center; font-size: .85rem; color: var(--color-text-muted); }

.notif-wrap { position: relative; }

.notif-btn {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--color-error);
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-panel {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    width: 320px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    z-index: 200;
}

.notif-panel.open { display: block; }

.notif-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
}

.notif-list { max-height: 360px; overflow-y: auto; }

.notif-item {
    display: block;
    padding: 12px 14px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
}

.notif-item.unread { background: #f0fdf4; }
.notif-item strong { display: block; font-size: .85rem; }
.notif-item span { display: block; font-size: .8rem; color: var(--color-text-muted); margin-top: 2px; }
.notif-item small { font-size: .7rem; color: var(--color-text-muted); }

/* Filtros y acciones masivas */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
}

.filter-bar input[type="text"] {
    flex: 1;
    min-width: 180px;
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
}

.filter-bar select {
    padding: 8px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .875rem;
    background: var(--color-bg);
}

.filter-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .875rem;
    white-space: nowrap;
}

.filter-check input { width: auto; }

.bulk-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius);
    font-size: .875rem;
}

.bulk-bar select, .bulk-bar input {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: .85rem;
}

.table-meta {
    margin-top: 8px;
    font-size: .8rem;
    color: var(--color-text-muted);
}

/* Calendario de horarios */
.cal-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cal-view-tabs {
    display: flex;
    gap: 6px;
}

.cal-pista-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .875rem;
}

.cal-pista-filter select {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
}

.cal-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.cal-conflicts-banner ul {
    margin: 8px 0 0;
    padding-left: 20px;
}

.cal-conflicts-list li {
    margin-bottom: 4px;
    font-size: .875rem;
}

.cal-week-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cal-week-header {
    display: grid;
    grid-template-columns: 56px repeat(7, 1fr);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-bg);
}

.cal-day-head {
    padding: 10px 8px;
    font-weight: 600;
    font-size: .8rem;
    text-align: center;
    border-left: 1px solid var(--color-border);
}

.cal-week-body {
    display: grid;
    grid-template-columns: 56px 1fr;
    position: relative;
    max-height: 70vh;
    overflow-y: auto;
}

.cal-time-col {
    border-right: 1px solid var(--color-border);
    background: var(--color-bg);
}

.cal-time-label {
    font-size: .7rem;
    color: var(--color-text-muted);
    padding: 2px 6px;
    text-align: right;
    border-bottom: 1px solid var(--color-border);
    box-sizing: border-box;
}

.cal-grid-slots {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    position: relative;
}

.cal-slot {
    border-left: 1px solid var(--color-border);
    border-bottom: 1px solid rgba(0,0,0,.04);
    box-sizing: border-box;
}

.cal-slot:nth-child(7n+1) { border-left: none; }

.cal-slot.drag-over {
    background: rgba(5, 150, 105, .12);
    outline: 2px dashed var(--color-primary);
}

.cal-slot.conflict-hover {
    background: rgba(220, 38, 38, .12);
    outline: 2px dashed #dc2626;
}

.cal-events-layer {
    position: absolute;
    top: 0;
    left: 56px;
    right: 0;
    pointer-events: none;
}

.cal-event {
    position: absolute;
    pointer-events: auto;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    border-left: 3px solid var(--color-primary);
    border-radius: 4px;
    padding: 4px 6px;
    font-size: .72rem;
    line-height: 1.3;
    overflow: hidden;
    cursor: grab;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    z-index: 2;
}

.cal-event strong {
    display: block;
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event span,
.cal-event small {
    display: block;
    color: var(--color-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cal-event.dragging {
    opacity: .6;
    cursor: grabbing;
    z-index: 10;
}

.cal-event-conflict {
    background: #fef2f2 !important;
    border-color: #fca5a5 !important;
    border-left-color: #dc2626 !important;
}

.cal-event-month {
    position: static;
    margin-bottom: 4px;
    cursor: grab;
    width: 100%;
    box-sizing: border-box;
}

.cal-month-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
}

.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.cal-month-dow {
    padding: 8px;
    text-align: center;
    font-weight: 600;
    font-size: .75rem;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.cal-month-cell {
    min-height: 100px;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: 4px;
    vertical-align: top;
}

.cal-month-cell:nth-child(7n) { border-right: none; }

.cal-month-empty {
    background: var(--color-bg);
    min-height: 80px;
}

.cal-month-daynum {
    font-size: .8rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-muted);
}

.cal-today .cal-month-daynum {
    color: var(--color-primary);
    background: #ecfdf5;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-month-cell.drag-over {
    background: rgba(5, 150, 105, .08);
    outline: 2px dashed var(--color-primary);
}

.cal-form-panel {
    margin-top: 20px;
}

.row-conflict {
    background: #fef2f2;
}

.backup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.backup-info ul {
    margin: 0;
    padding-left: 20px;
    font-size: .9rem;
    color: var(--color-text-muted);
}

.backup-info li {
    margin-bottom: 6px;
}

.text-muted {
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .cal-week-header { grid-template-columns: 40px repeat(7, 1fr); }
    .cal-week-body { grid-template-columns: 40px 1fr; }
    .cal-events-layer { left: 40px; }
    .cal-event { font-size: .65rem; padding: 2px 4px; }
    .cal-month-cell { min-height: 72px; }
}

.login-forgot {
    margin-top: 16px;
    text-align: center;
    font-size: .875rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.pagination-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.hoy-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.hoy-date input {
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
}

.hoy-dia { font-size: .95rem; }

.hoy-sesiones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.hoy-sesion {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    color: var(--color-text);
    min-height: 88px;
}

.hoy-sesion.is-active {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(26, 58, 42, .15);
}

.hoy-sesion-hora {
    font-size: .8rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.asistencia-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.asistencia-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.asistencia-info { min-width: 0; }
.asistencia-info small { display: block; color: var(--color-text-muted); }

.asistencia-btns {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.asist-btn {
    min-width: 72px;
    min-height: 44px;
    padding: 8px 10px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-bg);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
}

.asist-btn.is-presente { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
.asist-btn.is-ausente { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.asist-btn.is-justificada { background: #e0e7ff; border-color: #a5b4fc; color: #3730a3; }

.hoy-sesion.is-now {
    background: #ecfdf5;
}

.hoy-chip {
    display: inline-block;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--color-primary);
    background: #ecfdf5;
    border-radius: 100px;
    padding: 2px 8px;
    width: fit-content;
}

.hoy-chip-now { background: var(--color-accent); color: #1a3a2a; }

.hoy-sesion-count { color: var(--color-text-muted); }

.hoy-lista-head {
    align-items: flex-start;
}

.hoy-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    font-size: .85rem;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}

.hoy-resumen span { font-weight: 600; }

@media (max-width: 768px) {
    body.page-hoy .global-search-wrap { display: none; }
    body.page-hoy .sidebar-user { display: none; }
    body.page-hoy .admin-nav a:not(.nav-pista) { display: none; }
    body.page-hoy .admin-nav {
        display: flex;
        overflow-x: auto;
        gap: 0;
    }
    body.page-hoy .admin-nav a { white-space: nowrap; }
    body.page-hoy .sidebar-footer { display: block; padding-top: 4px; }
    body.page-hoy .admin-header h1 { font-size: 1.15rem; }
    .hoy-sesiones { grid-template-columns: 1fr 1fr; }
    .asistencia-row { flex-direction: column; align-items: stretch; }
    .asistencia-btns { width: 100%; }
    .asist-btn { flex: 1; min-height: 48px; font-size: .9rem; }
    .hoy-lista-head { flex-direction: column; }
    .hoy-lista-head .btn { width: 100%; min-height: 48px; }
}
