/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Página de Login */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #333;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background-color: #667eea;
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #5a6fd8;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.alert {
    padding: 0.75rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.login-footer {
    text-align: center;
    color: #666;
    font-size: 0.8rem;
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    color: #333;
    font-size: 1.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-role {
    background: #e9ecef;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    color: #666;
}

.dashboard-nav {
    background: #2c3e50;
}

.dashboard-nav ul {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    list-style: none;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 1rem 1.5rem;
    display: block;
    transition: background-color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    background-color: #34495e;
}

.dashboard-main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h2 {
    margin-bottom: 1.5rem;
    color: #333;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
}

.quick-actions h3 {
    margin-bottom: 1rem;
    color: #333;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #667eea;
    color: white;
}

/* Estilos para el nuevo menú modular */
.menu-modular {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.menu-category {
    border-bottom: 1px solid #eee;
}

.menu-category:last-child {
    border-bottom: none;
}

.category-header {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s;
}

.category-header:hover {
    background: #e9ecef;
}

.category-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
}

.category-arrow {
    transition: transform 0.3s;
}

.category-arrow.rotated {
    transform: rotate(180deg);
}

.category-content {
    display: none;
    padding: 1rem 1.5rem;
    background: white;
}

.category-content.active {
    display: block;
}

.menu-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.5rem;
}

.menu-item {
    display: block;
    padding: 0.75rem 1rem;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    text-align: center;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
}

.menu-item:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Estilos para notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
    max-width: 300px;
    border-left: 4px solid;
}

.notification-info {
    background: #fff3cd;
    color: #856404;
    border-left-color: #ffc107;
}

.notification-success {
    background: #d1edff;
    color: #155724;
    border-left-color: #28a745;
}

.notification-error {
    background: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-content button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    margin-left: 10px;
}

/* Estilos simples para el modal de productos - CON EQUIS EN SUPERIOR DERECHA */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    padding: 2rem;
    position: relative;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #667eea;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.5rem;
    font-weight: 600;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1001;
}

.close-modal:hover {
    background: #f8f9fa;
    color: #333;
    transform: scale(1.1);
}

.modal-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-modal {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 120px;
}

.btn-registrar {
    background-color: #28a745;
    color: white;
}

.btn-registrar:hover {
    background-color: #218838;
}

.btn-consultar {
    background-color: #17a2b8;
    color: white;
}

.btn-consultar:hover {
    background-color: #138496;
}

.btn-modificar {
    background-color: #ffc107;
    color: #212529;
}

.btn-modificar:hover {
    background-color: #e0a800;
}

.btn-eliminar {
    background-color: #dc3545;
    color: white;
}

.btn-eliminar:hover {
    background-color: #c82333;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .dashboard-nav ul {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .menu-items {
        grid-template-columns: 1fr;
    }
    
    .category-header {
        padding: 0.75rem 1rem;
    }
    
    .category-content {
        padding: 0.75rem 1rem;
    }
    
    .notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }

    /* Responsive para modal */
    .modal-container {
        width: 95%;
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .modal-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-modal {
        width: 100%;
        max-width: 200px;
    }
    
    .close-modal {
        top: 10px;
        right: 10px;
        width: 30px;
        height: 30px;
        font-size: 1.3rem;
    }
}