/* ========================================
   ADMIN PANEL - ESTILOS UNIFICADOS
   Diseño Responsive para Móvil, Tablet y Desktop
   Versión 2.0
   ======================================== */

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background: #f4f4f4;
    min-height: 100vh;
    line-height: 1.6;
    color: #333;
}

/* ===== SIDEBAR (Menú lateral) ===== */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #1a365d 0%, #0f2744 100%);
    color: white;
    height: 100vh;
    padding: 20px;
    position: fixed;
    left: 0;
    top: 0;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar h2 {
    margin-bottom: 30px;
    font-size: 1.2rem;
    padding-bottom: 15px;
    border-bottom: 2px solid #2a4a7a;
    color: #fff;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar h2 i {
    margin-right: 10px;
    color: #28a745;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ddd;
    text-decoration: none;
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.sidebar a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.sidebar a:hover {
    background: #2a4a7a;
    color: white;
    transform: translateX(5px);
}

.sidebar a.activo {
    background: #2a4a7a;
    color: white;
    font-weight: 600;
    border-left: 4px solid #28a745;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sidebar .rol-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: #aaa;
    font-size: 0.8rem;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Botón toggle para móvil */
.menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #1a365d;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* ===== CONTENIDO PRINCIPAL ===== */
.main {
    flex: 2;
    padding: 30px;
    margin-left: 250px;
    width: calc(100% - 250px);
    transition: margin-left 0.3s ease;
}

/* ===== HEADER / BARRA SUPERIOR ===== */
.header {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    flex-wrap: wrap;
    gap: 15px;
}

.header h1 {
    color: #1a365d;
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header h1 i {
    color: #28a745;
    font-size: 1.6rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    line-height: 1;
}

.btn i {
    font-size: 1.1rem;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,123,255,0.3);
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(40,167,69,0.3);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220,53,69,0.3);
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn.disabled, .btn:disabled {
    background: #6c757d;
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* Botones pequeños */
.btn-small {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    margin: 0 2px;
}

.btn-small i {
    font-size: 0.9rem;
}

.btn-small.primary {
    background: #007bff;
    color: white;
}

.btn-small.primary:hover {
    background: #0056b3;
}

.btn-small.success {
    background: #28a745;
    color: white;
}

.btn-small.success:hover {
    background: #218838;
}

.btn-small.danger {
    background: #dc3545;
    color: white;
}

.btn-small.danger:hover {
    background: #c82333;
}

.btn-small.warning {
    background: #ffc107;
    color: #333;
}

.btn-small.warning:hover {
    background: #e0a800;
}

.btn-small.secondary {
    background: #6c757d;
    color: white;
}

.btn-small.secondary:hover {
    background: #5a6268;
}

.btn-small.disabled {
    background: #6c757d;
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== TABLAS ===== */
.table-container {
    background: white;
    border-radius: 12px;
    overflow-x: auto;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* Forzar scroll horizontal en móvil si es necesario */
}

th {
    background: #1a365d;
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
}

th i {
    margin-right: 8px;
    color: #28a745;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-size: 0.95rem;
}

tr:hover {
    background: #f8f9fa;
}

tr:last-child td {
    border-bottom: none;
}

/* ===== TARJETAS (Cards) ===== */
.card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card .card-sub{
    width: 20%;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h2, .card-header h3 {
    color: #1a365d;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header i {
    color: #28a745;
}

/* Grid de cards */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
}

.stat-card .stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #1a365d, #2a4a7a);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-card .stat-icon i {
    font-size: 24px;
    color: white;
}

.stat-card .stat-label {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #1a365d;
    line-height: 1.2;
}

/* ===== FORMULARIOS ===== */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
}

.form-container h1 {
    color: #1a365d;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group label i {
    margin-right: 8px;
    color: #28a745;
    width: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-control.error {
    border-color: #dc3545;
}

.form-control.error:focus {
    box-shadow: 0 0 0 3px rgba(220,53,69,0.1);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

/* ===== MENSAJES ===== */
.mensaje {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.mensaje i {
    font-size: 1.2rem;
}

.mensaje.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.mensaje.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.mensaje.info {
    background: #e7f1ff;
    color: #004085;
    border: 1px solid #b8daff;
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

.badge-primary {
    background: #e7f1ff;
    color: #004085;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Badge para roles */
.rol-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.rol-admin {
    background: #dc3545;
    color: white;
}

.rol-editor {
    background: #007bff;
    color: white;
}

.rol-visitante {
    background: #6c757d;
    color: white;
}

/* Estado activo/inactivo */
.estado-activo {
    color: #28a745;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.estado-inactivo {
    color: #dc3545;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== LOGIN ===== */
    .login-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
        padding: 20px;
    }

    .login-box {
        background: white;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        width: 100%;
        max-width: 400px;
    }

    .login-box h2 {
        color: #1a365d;
        text-align: center;
        margin-bottom: 30px;
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box h2 i {
        color: #28a745;
    }

    .login-box .form-group {
        margin-bottom: 20px;
    }

    .login-box label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .login-box input[type="text"],
    .login-box input[type="password"] {
        width: 100%;
        padding: 14px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .login-box input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
    }

    .login-box button {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #28a745, #218838);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(40,167,69,0.3);
    }

    .login-box button i {
        font-size: 1.2rem;
    }

    .login-box .error {
        background: #f8d7da;
        color: #721c24;
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 20px;
        text-align: center;
        border-left: 4px solid #dc3545;
        font-size: 0.95rem;
    }

/* ===== PAGINACIÓN ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 8px;
    background: white;
    color: #1a365d;
    text-decoration: none;
    border: 1px solid #ddd;
    transition: all 0.3s;
}

.pagination a:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination .active {
    background: #1a365d;
    color: white;
    border-color: #1a365d;
}

/* ===== MODALES ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #1a365d;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ===== RESPONSIVE ===== */
/* Tablets y pantallas medianas */
@media screen and (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .main {
        margin-left: 200px;
        width: calc(100% - 200px);
        padding: 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Móviles y pantallas pequeñas */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 2px 0 20px rgba(0,0,0,0.3);
    }
    
    .main {
        margin-left: 0;
        width: 100%;
        padding: 70px 15px 20px;
    }
    
    .header {
        flex-direction: column;
        align-items: stretch;
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.3rem;
    }
    
    .header h1 i {
        font-size: 1.3rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .btn-small {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .form-container h1 {
        font-size: 1.5rem;
    }
    
    /* ===== LOGIN ===== */
    .login-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
        padding: 20px;
    }

    .login-box {
        background: white;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        width: 100%;
        max-width: 400px;
    }

    .login-box h2 {
        color: #1a365d;
        text-align: center;
        margin-bottom: 30px;
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box h2 i {
        color: #28a745;
    }

    .login-box .form-group {
        margin-bottom: 20px;
    }

    .login-box label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .login-box input[type="text"],
    .login-box input[type="password"] {
        width: 100%;
        padding: 14px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .login-box input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
    }

    .login-box button {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #28a745, #218838);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(40,167,69,0.3);
    }

    .login-box button i {
        font-size: 1.2rem;
    }

    .login-box .error {
        background: #f8d7da;
        color: #721c24;
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 20px;
        text-align: center;
        border-left: 4px solid #dc3545;
        font-size: 0.95rem;
    }

    
    td .btn-small {
        display: inline-flex;
        margin: 2px;
    }
    
    /* Scroll horizontal para tablas */
    .table-container {
        border-radius: 8px;
        margin: 0 -15px;
        width: calc(100% + 30px);
    }
    
    table {
        min-width: 500px;
    }
    
    th, td {
        padding: 12px;
        font-size: 0.9rem;
    }
    
    /* Ajustes para cards en móvil */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    /* Mejorar touch targets */
    .sidebar a {
        padding: 15px;
        font-size: 1rem;
    }
    
    .pagination a, .pagination span {
        min-width: 44px;
        height: 44px;
    }
}

/* Móviles muy pequeños */
@media screen and (max-width: 480px) {
    .header {
        padding: 12px;
    }
    
    .header h1 {
        font-size: 1.2rem;
    }
    
    .form-control {
        padding: 10px 12px;
        font-size: 16px; /* Evita zoom en iOS */
    }
    
    .btn {
        padding: 12px;
        font-size: 1rem;
    }
    
    .btn-small {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
    
     .login-box {
        padding: 2rem;
        margin: 15px;
    }
    
    .login-box h2 {
        font-size: 1.5rem;
    }
    
    .login-box input,
    .login-box button {
        padding: 12px 15px;
    }
    
    .mensaje {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    /* Ajustes para modales en móvil */
    .modal-content {
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body, .modal-footer {
        padding: 15px;
    }

    /* ===== FORMULARIOS ===== */
    .form-container {
        max-width: 600px;
        margin: 30px auto;
        background: white;
        padding: 30px;
        border-radius: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    }

    .form-container h1 {
        color: #1a365d;
        margin-bottom: 10px;
        font-size: 1.8rem;
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 20px;
    }

    .form-container h1 i {
        color: #28a745;
    }

    /* Grupos de formulario */
    .form-container form {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .form-container label {
        font-weight: 600;
        color: #333;
        margin-bottom: 5px;
        display: block;
        font-size: 0.95rem;
    }

    .form-container input[type="text"],
    .form-container input[type="email"],
    .form-container input[type="password"],
    .form-container input[type="number"],
    .form-container select,
    .form-container textarea {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 10px;
        font-size: 1rem;
        font-family: inherit;
        transition: all 0.3s ease;
        background: white;
    }

    .form-container input:focus,
    .form-container select:focus,
    .form-container textarea:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
    }

    .form-container input.error,
    .form-container select.error {
        border-color: #dc3545;
    }

    /* Mensajes de información */
    .form-container .info {
        background: #e7f1ff;
        color: #004085;
        padding: 10px 15px;
        border-radius: 8px;
        font-size: 0.9rem;
        margin-top: 5px;
        border-left: 4px solid #007bff;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .form-container .info::before {
        content: "ℹ️";
        font-size: 1.1rem;
    }

    /* Checkbox personalizado */
    .form-container .checkbox {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 15px 0;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 10px;
        border: 1px solid #e0e0e0;
    }

    .form-container .checkbox input[type="checkbox"] {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: #28a745;
    }

    .form-container .checkbox label {
        margin: 0;
        cursor: pointer;
        font-weight: normal;
        color: #333;
    }

    /* Grupo de botones */
    .form-container .button-group {
        display: flex;
        gap: 15px;
        margin-top: 25px;
        padding-top: 20px;
        border-top: 2px solid #f0f0f0;
    }

    /* Botones del formulario */
    .form-container .btn-guardar,
    .form-container .btn-cancelar {
        padding: 12px 25px;
        border: none;
        border-radius: 10px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        flex: 1;
    }

    .form-container .btn-guardar {
        background: #28a745;
        color: white;
    }

    .form-container .btn-guardar:hover {
        background: #218838;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(40,167,69,0.3);
    }

    .form-container .btn-guardar::before {
        content: "💾";
        font-size: 1.1rem;
    }

    .form-container .btn-cancelar {
        background: #6c757d;
        color: white;
    }

    .form-container .btn-cancelar:hover {
        background: #5a6268;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(108,117,125,0.3);
    }

    .form-container .btn-cancelar::before {
        content: "❌";
        font-size: 1rem;
    }

    /* Mensajes de error */
    .form-container .error {
        background: #f8d7da;
        color: #721c24;
        padding: 15px;
        border-radius: 10px;
        margin-bottom: 20px;
        border-left: 4px solid #dc3545;
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 0.95rem;
    }

    .form-container .error::before {
        content: "⚠️";
        font-size: 1.2rem;
    }

    /* ===== LOGIN ===== */
    .login-container {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #1a365d 0%, #0f2744 100%);
        padding: 20px;
    }

    .login-box {
        background: white;
        padding: 40px;
        border-radius: 20px;
        box-shadow: 0 20px 40px rgba(0,0,0,0.2);
        width: 100%;
        max-width: 400px;
    }

    .login-box h2 {
        color: #1a365d;
        text-align: center;
        margin-bottom: 30px;
        font-size: 2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box h2 i {
        color: #28a745;
    }

    .login-box .form-group {
        margin-bottom: 20px;
    }

    .login-box label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .login-box input[type="text"],
    .login-box input[type="password"] {
        width: 100%;
        padding: 14px 15px;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .login-box input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 4px rgba(0,123,255,0.1);
    }

    .login-box button {
        width: 100%;
        padding: 14px;
        background: linear-gradient(135deg, #28a745, #218838);
        color: white;
        border: none;
        border-radius: 12px;
        font-size: 1.1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        margin-top: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
    }

    .login-box button:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(40,167,69,0.3);
    }

    .login-box button i {
        font-size: 1.2rem;
    }

    .login-box .error {
        background: #f8d7da;
        color: #721c24;
        padding: 12px;
        border-radius: 10px;
        margin-bottom: 20px;
        text-align: center;
        border-left: 4px solid #dc3545;
        font-size: 0.95rem;
    }
}

/* Orientación horizontal en móviles */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 240px;
    }
    
    .sidebar .rol-info {
        position: static;
        margin-top: 20px;
    }
    
    .main {
        padding-top: 20px;
    }
    .form-container {
        margin: 15px;
        padding: 20px;
    }
    
    .form-container h1 {
        font-size: 1.5rem;
    }
    
    .form-container .button-group {
        flex-direction: column;
    }
    
    .form-container .btn-guardar,
    .form-container .btn-cancelar {
        width: 100%;
    }
    
    .login-box {
        padding: 30px 20px;
    }
    
    .login-box h2 {
        font-size: 1.8rem;
    }
}


/* ===== UTILIDADES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }
.mt-5 { margin-top: 30px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }
.mb-5 { margin-bottom: 30px; }

.ml-1 { margin-left: 5px; }
.ml-2 { margin-left: 10px; }
.mr-1 { margin-right: 5px; }
.mr-2 { margin-right: 10px; }

.p-1 { padding: 5px; }
.p-2 { padding: 10px; }
.p-3 { padding: 15px; }
.p-4 { padding: 20px; }
.p-5 { padding: 30px; }

.w-100 { width: 100%; }
.w-50 { width: 50%; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 5px; }
.gap-2 { gap: 10px; }
.gap-3 { gap: 15px; }

.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }

/* ===== ANIMACIONES ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease;
}

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

.slide-in {
    animation: slideIn 0.3s ease;
}

/* ===== IMPRESIÓN ===== */
@media print {
    .sidebar, .menu-toggle, .btn, .footer {
        display: none !important;
    }
    
    .main {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    
    table {
        border: 1px solid #000;
    }
    
    th {
        background: #f0f0f0;
        color: #000;
    }
}