/* ===== VARIABLES Y ESTILOS BASE ===== */
:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #388e3c;
    --danger-color: #d32f2f;
    --warning-color: #f57c00;
    --info-color: #0097a7;
    --light-bg: #f8f9fa;
    --dark-text: #2c3e50;
    --border-color: #e0e0e0;
    --sidebar-width: 260px;
    --transition: all 0.3s ease;
    --navbar-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    background: var(--light-bg);
    line-height: 1.6;
}

/* ===== LAYOUT PRINCIPAL ===== */
.dashboard-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    height: 100vh;
}

.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 100;
    gap: 1rem;
    flex-wrap: nowrap;
    height: var(--navbar-height);
    flex-shrink: 0;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex: 0 0 auto;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    justify-content: flex-end;
    flex-wrap: nowrap;
}

.navbar-menu span {
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-logout {
    color: white;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    flex-grow: 0;
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
}

.btn-logout:hover {
    color: #cccccc;
}

.dashboard-wrapper {
    display: flex;
    flex: 1;
    width: 100%;
    overflow: hidden;
    height: calc(100vh - var(--navbar-height));
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 5px rgba(0,0,0,0.05);
    position: relative;
    z-index: 50;
    flex-shrink: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1.25rem;
    border-bottom: 2px solid var(--border-color);
    background: var(--light-bg);
    flex-shrink: 0;
}

.sidebar-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    word-break: break-word;
}

.sidebar-menu {
    list-style: none;
    padding: 0.75rem 0;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.7rem 1.25rem;
    color: var(--dark-text);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem;
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding-left: 1.75rem;
}

.sidebar-menu li.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-color);
    border-radius: 0 4px 4px 0;
}

.sidebar-menu i {
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.sidebar-menu span:not(.badge) {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-menu .badge {
    background: var(--primary-color);
    color: white;
    border-radius: 12px;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
}

.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.75rem 0 !important;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--light-bg);
    flex-shrink: 0;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: 200px;
}

.system-status h4 {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: #7f8c8d;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    color: #7f8c8d;
    word-break: break-word;
    overflow: hidden;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #bdc3c7;
    flex-shrink: 0;
}

.status-indicator.active {
    background: #27ae60;
    box-shadow: 0 0 8px rgba(39, 174, 96, 0.5);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    background: var(--light-bg);
    width: 100%;
    height: 100%;
}

.content-header {
    margin-bottom: 2rem;
}

.content-header h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

.breadcrumb {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.breadcrumb span {
    margin-right: 0.5rem;
}

/* ===== TARJETAS DE ESTADÍSTICAS ===== */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    width: 100%;
}

.stat-card {
    background: white;
    padding: 1.25rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-left: 4px solid var(--primary-color);
    width: 100%;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 2rem;
    color: var(--primary-color);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    flex-shrink: 0;
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    color: var(--dark-text);
}

.stat-info p {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

.stat-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    align-self: flex-start;
}

.stat-link:hover {
    gap: 0.75rem;
}

/* ===== GRID DE CONTENIDO ===== */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
}

.content-column {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    min-width: 0;
}

/* ===== CAJAS DE CONTENIDO ===== */
.content-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: var(--transition);
    width: 100%;
}

.content-box:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.box-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--light-bg);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.box-header h2 {
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    flex: 1 1 auto;
    min-width: 150px;
    word-break: break-word;
}

.box-content {
    padding: 1.25rem;
    overflow-x: hidden;
    overflow-y: auto;
    max-height: 500px;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline:hover {
    background: rgba(102, 126, 234, 0.1);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
}

/* ===== TABLAS ===== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: var(--light-bg);
}

.data-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #7f8c8d;
    border-bottom: 2px solid var(--border-color);
    font-size: 0.8rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    word-break: break-word;
}

.data-table tbody tr:hover {
    background: var(--light-bg);
}

.player-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.player-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.badge-position {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
}

.action-buttons {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.btn-view {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
}

.btn-view:hover {
    background: var(--primary-color);
    color: white;
}

.btn-edit {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.btn-edit:hover {
    background: #ffc107;
    color: white;
}

.btn-stats {
    background: rgba(56, 142, 60, 0.1);
    color: var(--success-color);
}

.btn-stats:hover {
    background: var(--success-color);
    color: white;
}

/* ===== ENTRENAMIENTOS ===== */
.training-item {
    padding: 0.75rem;
    border-radius: 8px;
    background: var(--light-bg);
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
    cursor: pointer;
    word-break: break-word;
}

.training-item:hover {
    transform: translateX(5px);
    background: #edf2f7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.training-title {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.training-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    flex-shrink: 0;
}

.badge-tactico { background: #e3f2fd; color: #1976d2; }
.badge-fisico { background: #f3e5f5; color: #7b1fa2; }
.badge-tecnico { background: #e8f5e9; color: #388e3c; }
.badge-general { background: #fff3e0; color: #f57c00; }
.badge-partido { background: #ffebee; color: #d32f2f; }
.badge-recuperacion { background: #e0f7fa; color: #0097a7; }

.training-item.tactico { border-left-color: #1976d2; }
.training-item.fisico { border-left-color: #7b1fa2; }
.training-item.tecnico { border-left-color: #388e3c; }
.training-item.general { border-left-color: #f57c00; }
.training-item.partido { border-left-color: #d32f2f; }
.training-item.recuperacion { border-left-color: #0097a7; }

.training-team {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    word-break: break-word;
}

.training-time {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.training-status {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-programado { background: #e3f2fd; color: #1976d2; }
.status-en-curso { background: #fff3cd; color: #856404; }
.status-completado { background: #d4edda; color: #155724; }
.status-cancelado { background: #f8d7da; color: #721c24; }

.upcoming-training {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.25rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    word-break: break-word;
}

.upcoming-training::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
    pointer-events: none;
}

.upcoming-training h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

.upcoming-training p {
    margin: 0.4rem 0;
    font-size: 0.9rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

.training-countdown {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 0.75rem;
    font-family: 'Courier New', monospace;
    position: relative;
    z-index: 1;
}

/* ===== PERFIL ===== */
.profile-info {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.profile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.profile-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.profile-details p {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-bottom: 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    word-break: break-word;
}

/* ===== ACCIONES RÁPIDAS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    text-decoration: none;
    color: var(--dark-text);
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
    word-break: break-word;
}

.quick-action:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.action-icon {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.action-text h4 {
    font-size: 0.8rem;
    margin-bottom: 0.2rem;
    word-break: break-word;
}

.action-text p {
    font-size: 0.7rem;
    color: #7f8c8d;
    word-break: break-word;
}

/* ===== ESTADÍSTICAS RESUMIDAS ===== */
.summary-stats {
    display: grid;
    gap: 1rem;
    width: 100%;
}

.summary-item {
    padding: 0.75rem;
    background: var(--light-bg);
    border-radius: 8px;
}

.summary-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    color: var(--dark-text);
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

.tag {
    background: white;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.tag-count {
    background: var(--primary-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.bar-item {
    margin-bottom: 0.75rem;
}

.bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
    color: var(--dark-text);
    gap: 1rem;
}

.bar-container {
    background: white;
    border-radius: 10px;
    height: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.empty-state,
.empty-trainings {
    text-align: center;
    padding: 1.5rem;
    color: #7f8c8d;
}

.empty-state i,
.empty-trainings i {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    color: #bdc3c7;
    display: block;
}

.empty-state p,
.empty-trainings p {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    word-break: break-word;
}

/* ===== MENÚ HAMBURGUESA ===== */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0.5rem;
    flex-shrink: 0;
    line-height: 1;
}

/* ===== MEDIA QUERIES - RESPONSIVO ===== */

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .main-content {
        padding: 1rem;
    }
    
    .content-grid {
        gap: 1rem;
    }
    
    .stats-cards {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.75rem;
    }
}

/* Tablets (768px) */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex;
    }
    
    .sidebar {
        position: fixed;
        left: -260px;
        top: var(--navbar-height);
        bottom: 0;
        width: 260px;
        height: calc(100vh - var(--navbar-height));
        z-index: 99;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .dashboard-wrapper {
        height: calc(100vh - var(--navbar-height));
    }
    
    .main-content {
        padding: 0.75rem;
    }
    
    .content-header h1 {
        font-size: 1.4rem;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }
    
    .stat-info h3 {
        font-size: 1.3rem;
    }
    
    .stat-info p {
        font-size: 0.8rem;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .navbar {
        padding: 0.5rem 0.75rem;
        height: var(--navbar-height);
    }
    
    .navbar-brand {
        font-size: 1rem;
    }
    
    .navbar-menu {
        gap: 0.5rem;
    }
    
    .navbar-menu span {
        display: none;
    }
    
    .box-header {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .box-header h2 {
        font-size: 0.95rem;
        min-width: auto;
    }
    
    .box-content {
        padding: 0.75rem;
        max-height: 400px;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }
    
    .player-info {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .player-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.75rem;
    }
    
    .profile-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    
    .upcoming-training {
        padding: 1rem;
    }
    
    .upcoming-training h3 {
        font-size: 1rem;
        margin-bottom: 0.4rem;
    }
    
    .upcoming-training p {
        font-size: 0.85rem;
        margin: 0.2rem 0;
    }
    
    .training-countdown {
        font-size: 1rem;
        margin-top: 0.5rem;
    }
}

/* Móviles (600px) */
@media (max-width: 600px) {
    :root {
        --navbar-height: 50px;
    }
    
    .navbar {
        padding: 0.4rem 0.6rem;
        height: var(--navbar-height);
        gap: 0.4rem;
    }
    
    .navbar-brand {
        font-size: 0.95rem;
    }
    
    .navbar-brand i {
        display: none;
    }
    
    .btn-logout {
        padding: 0.35rem 0.5rem;
        font-size: 0.7rem;
    }
    
    .btn-logout span {
        display: none;
    }
    
    .hamburger-menu {
        font-size: 1.1rem;
        padding: 0.3rem;
    }
    
    .sidebar {
        width: 250px;
        left: -250px;
    }
    
    .sidebar-header {
        padding: 0.75rem;
    }
    
    .sidebar-header h3 {
        font-size: 0.9rem;
    }
    
    .sidebar-header h3 i {
        display: none;
    }
    
    .sidebar-menu a {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .sidebar-footer {
        max-height: 150px;
        padding: 0.75rem;
    }
    
    .system-status h4 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }
    
    .status-item {
        font-size: 0.75rem;
        margin-bottom: 0.4rem;
    }
    
    .content-header h1 {
        font-size: 1.2rem;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
        gap: 0.4rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-card {
        padding: 0.6rem;
        flex-direction: column;
    }
    
    .stat-icon {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }
    
    .stat-info h3 {
        font-size: 1.2rem;
    }
    
    .stat-info p {
        font-size: 0.75rem;
    }
    
    .stat-link {
        font-size: 0.7rem;
    }
    
    .box-header {
        padding: 0.6rem;
        gap: 0.4rem;
    }
    
    .box-header h2 {
        font-size: 0.9rem;
    }
    
    .box-content {
        padding: 0.6rem;
        max-height: 350px;
    }
    
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .quick-action {
        padding: 0.8rem;
        gap: 0.4rem;
    }
    
    .action-icon {
        font-size: 1.5rem;
    }
    
    .action-text h4 {
        font-size: 0.75rem;
    }
    
    .action-text p {
        font-size: 0.65rem;
    }
    
    .data-table {
        font-size: 0.7rem;
    }
    
    .data-table th {
        font-size: 0.65rem;
        padding: 0.4rem 0.2rem;
    }
    
    .data-table td {
        padding: 0.4rem 0.2rem;
    }
    
    .training-item {
        padding: 0.6rem;
        margin-bottom: 0.4rem;
    }
    
    .training-title {
        font-size: 0.85rem;
    }
    
    .btn {
        padding: 0.45rem 0.6rem;
        font-size: 0.75rem;
    }
    
    .btn-sm {
        padding: 0.3rem 0.5rem;
        font-size: 0.65rem;
    }
}

/* Móviles muy pequeños (máximo 400px) */
@media (max-width: 400px) {
    .navbar {
        flex-direction: row;
        gap: 0.2rem;
    }
    
    .sidebar {
        width: 240px;
        left: -240px;
    }
    
    .sidebar-menu a {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .stat-card {
        padding: 0.5rem;
    }
    
    .stat-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .profile-avatar {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .tag {
        padding: 0.3rem 0.6rem;
        font-size: 0.65rem;
    }
}

/* Print styles */
@media print {
    .navbar,
    .sidebar,
    .hamburger-menu,
    .btn,
    .action-buttons {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .dashboard-wrapper {
        overflow: visible;
    }
    
    .stat-card,
    .content-box {
        page-break-inside: avoid;
    }
}

/* ===== LOGIN PAGE STYLES ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    animation: slideUp 0.5s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 28px;
    font-weight: 700;
}

.login-box h2 {
    text-align: center;
    color: var(--secondary-color);
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 500;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    background: #f8f9fa;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-error {
    background-color: #ffebee;
    color: var(--danger-color);
    border-left-color: var(--danger-color);
}

.alert-success {
    background-color: #e8f5e9;
    color: var(--success-color);
    border-left-color: var(--success-color);
}

.error-message {
    display: block;
    color: var(--danger-color);
    font-size: 12px;
    margin-top: 5px;
    min-height: 18px;
}

.security-info {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.security-info p {
    color: #999;
    font-size: 12px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h1 {
        font-size: 24px;
    }
    
    .login-box h2 {
        font-size: 16px;
    }
}