/* 
 * Proyecto: JagDOS - Delivery & Payroll OS
 * Archivo: styles.css
 * Descripción: Estilos globales. Implementación de modo claro/oscuro, 
 *              dashboard, sidebar, topbar y tarjetas corporativas.
 *
 * Autores: Jorge García (JAG) + Adriana Montgomery (AI)
 * Fecha: 2025-11-27
 */

/* ==========================================================
   PALETA CORPORATIVA
   ========================================================== */
:root {
    --dark-bg: #0b1e33;
    --dark-box: #112a45;
    --dark-text: #ffffff;
    --dark-sidebar: #0a1726;
    --dark-topbar: #0a1d33;
    --dark-button: #1d4d80;
    --dark-button-hover: #23629f;

    --light-bg: #e6f1fc;
    --light-box: #ffffff;
    --light-text: #001e3c;
    --light-sidebar: #cfe0f5;
    --light-topbar: #d8e8fa;
    --light-button: #003366;
    --light-button-hover: #00234d;
}

/* ==========================================================
   MODO OSCURO Y CLARO
   ========================================================== */
body.dark {
    background: var(--dark-bg);
    color: var(--dark-text);
}

body.light {
    background: var(--light-bg);
    color: var(--light-text);
}

/* ==========================================================
   SIDEBAR
   ========================================================== */
.sidebar {
    width: 240px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 80px;
}

body.dark .sidebar {
    background: var(--dark-sidebar);
}

body.light .sidebar {
    background: var(--light-sidebar);
}

.sidebar-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo img {
    width: 38px;
    height: 38px;
}

.sidebar-logo h2 {
    margin: 0;
    font-size: 22px;
    color: var(--dark-text);
}

body.light .sidebar-logo h2 {
    color: var(--light-text);
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li a {
    display: block;
    padding: 14px 22px;
    font-size: 16px;
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

body.dark .sidebar-menu li a { color: #cfd9e6; }
body.light .sidebar-menu li a { color: #003366; }

.sidebar-menu li a:hover {
    background: rgba(255,255,255,0.05);
}

/* Link activo */
.sidebar-menu li a.active {
    font-weight: bold;
    border-left: 4px solid #ffffff;
    padding-left: 18px;
}

body.light .sidebar-menu li a.active {
    border-left: 4px solid #003366;
}

/* ==========================================================
   TOPBAR
   ========================================================== */
.topbar {
    width: 100%;
    padding: 18px 25px;
    font-size: 20px;
    font-weight: bold;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
}

body.dark .topbar {
    background: var(--dark-topbar);
    color: white;
}

body.light .topbar {
    background: var(--light-topbar);
    color: #001e3c;
}

/* ==========================================================
   MAIN CONTENT
   ========================================================== */
.main-content {
    margin-left: 240px;
    padding: 110px 40px 40px 40px;
    min-height: 100vh;
}

/* ==========================================================
   TARJETAS DEL DASHBOARD
   ========================================================== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.card {
    padding: 25px;
    border-radius: 14px;
    text-align: center;
    transition: 0.25s ease;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: bold;
}

.card .value {
    font-size: 32px;
    font-weight: 700;
    margin-top: 10px;
}

body.dark .card {
    background: var(--dark-box);
    color: var(--dark-text);
    box-shadow: 0 4px 8px rgba(0,0,0,0.35);
}

body.light .card {
    background: var(--light-box);
    color: var(--light-text);
    box-shadow: 0 3px 6px rgba(0,0,0,0.16);
}

.card:hover {
    transform: translateY(-4px);
}

/* ==========================================================
   BOTONES
   ========================================================== */
.btn {
    padding: 12px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: bold;
}

body.dark .btn {
    background: var(--dark-button);
    color: white;
}

body.dark .btn:hover {
    background: var(--dark-button-hover);
}

body.light .btn {
    background: var(--light-button);
    color: white;
}

body.light .btn:hover {
    background: var(--light-button-hover);
}

/* ==========================================================
   BOTÓN DE CAMBIO DE TEMA
   ========================================================== */
.theme-toggle {
    position: fixed;
    top: 18px;
    right: 25px;
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    z-index: 20;
    border: 2px solid;
}

body.dark .theme-toggle {
    background: transparent;
    color: white;
    border-color: white;
}

body.light .theme-toggle {
    background: transparent;
    color: #003366;
    border-color: #003366;
}
