/* ===============================================
   STYLE.CSS - Sistema de Facturación ADW
   Estilos globales y del sidebar
   =============================================== */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
    display: flex;
    min-height: 100vh;
}

/* ===============================================
   SIDEBAR - Menú Lateral
   =============================================== */

.sidebar {
    width: 250px;
    background-color: #343a40;
    color: white;
    height: 100vh;
    padding: 20px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.2);
    transition: transform 0.3s;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #fff;
    font-size: 1.5em;
    padding: 0 10px;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: #adb5bd;
    text-decoration: none;
    transition: background-color 0.3s, color 0.3s;
}

.sidebar .nav-link:hover {
    background-color: #495057;
    color: #fff;
}

.sidebar .nav-link img {
    margin-right: 10px;
    width: 24px;
    height: 24px;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #343a40;
    color: #fff;
    border: none;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 6px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    line-height: 1;
}

.sidebar-toggle:hover {
    background: #495057;
}

/* Sidebar Overlay (para móvil) */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.sidebar-overlay.active {
    display: block;
}

/* ===============================================
   MAIN CONTENT
   =============================================== */

.main-content {
    flex-grow: 1;
    margin-left: 250px;
    padding: 0;
    width: calc(100% - 250px);
    min-height: 100vh;
    background: #f4f7f6;
}

.main-content .container {
    padding: 30px;
    background: white;
    min-height: 100vh;
}

/* ===============================================
   CONTAINERS
   =============================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
}

/* ===============================================
   RESPONSIVE
   =============================================== */

/* Tablet y Móvil */
@media (max-width: 1023px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.sidebar-visible {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 0;
    }
    
    .main-content .container {
        padding: 70px 15px 20px 15px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .sidebar-toggle {
        display: none;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}
