/* =========================================================
   GLOBAL.CSS - Colores, Menú y Base para todo Ruta Express
========================================================= */
:root {
    --bg-main: #f8fafc;
    --sidebar-bg: #0f172a;
    --sidebar-border: #334155;
    --text-white: #ffffff;
    --text-slate-300: #cbd5e1;
    --text-slate-400: #94a3b8;
    --text-slate-500: #64748b;
    --text-slate-800: #1e293b;
    
    --brand-orange: #f97316;
    --brand-orange-dark: #ea580c;
    --brand-orange-light: #ffedd5;
    
    --success-green: #22c55e;
    --success-green-light: #dcfce7;
    --success-green-text: #15803d;
    
    --info-blue: #3b82f6;
    --info-blue-light: #dbeafe;
    --info-blue-text: #1d4ed8;
    
    --danger-red: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-slate-800);
}

/* --- Botones e Inputs Globales --- */
.input-text {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--text-slate-300);
    border-radius: 6px;
    font-size: 1rem;
}

.input-text:focus {
    outline: 2px solid var(--brand-orange);
}

.btn-primary {
    background-color: var(--brand-orange);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--brand-orange-dark);
}

/* --- Layout Principal (Menú y Barra Superior) --- */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    flex: 1;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-btn {
    width: 100%;
    text-align: left;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-slate-300);
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.nav-btn:hover { background-color: #1e293b; }
.nav-btn.active {
    background-color: var(--brand-orange-dark);
    color: var(--text-white);
    font-weight: 600;
}

.badge {
    background-color: var(--danger-red);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 99px;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background-color: var(--text-white);
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 40px;
    height: 40px;
    background-color: var(--brand-orange-light);
    border: 2px solid var(--brand-orange);
    color: var(--brand-orange-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =========================================================
   DISEÑO RESPONSIVO GLOBAL (MENÚ EN CELULARES)
========================================================= */
@media screen and (max-width: 768px) {
    .dashboard-container { flex-direction: column; }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        bottom: 0;
        left: 0;
        z-index: 1000;
        padding: 10px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
    }
    
    .sidebar-header { display: none; }
    
    .sidebar-nav {
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        margin: 0;
        padding: 0;
    }
    
    .nav-btn {
        width: auto !important;
        text-align: center !important;
        font-size: 0.8rem;
        padding: 8px 10px;
    }

    .main-content { padding-bottom: 80px; /* Espacio para el menú abajo */ }
    
    .topbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-profile { justify-content: center; width: 100%; }
}