:root {
    --sidebar-bg: #1a252f;
    --sidebar-hover: #34495e;
    --accent: #3498db;
    --text-white: #ffffff;
    --bg-light: #f8f9fa;
    --sidebar-width: 260px; /* Definimos un ancho fijo ideal */
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background-color: var(--bg-light);
    overflow-x: hidden;
}

/* --- BOTÓN DE CONTROL (TOGGLE) --- */
.toggle-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: var(--sidebar-bg);
    color: white;
    border: none;
    padding: 10px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 20px;
    transition: left 0.3s ease, background 0.3s ease; /* Transición suave de posición */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

    .toggle-btn:hover {
        background: var(--accent);
    }

     /*Cuando el menú se abre, el botón se desplaza junto con él */
    .toggle-btn.shifted {
        left: calc(var(--sidebar-width) - 60px);
    }

/* --- MENÚ LATERAL (SIDEBAR) --- */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--text-white);
    position: fixed;
    top: 0;
    left: 0;
    transition: transform 0.3s ease;
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
}

    /* Estado oculto: Se desplaza completamente a la izquierda */
    .sidebar.hidden {
        transform: translateX(-100%);
    }

/* --- CONTENIDO PRINCIPAL --- */
.main-content {
    padding: 40px;
    padding-top: 80px;
    box-sizing: border-box;
    /*transform: translateX(-20%);*/
    /* Por defecto, como el menú inicia oculto (.hidden), el contenido toma todo el ancho */
    width: 100%;
    margin-left: 100PX;
    /* Esta transición es la que creará el efecto visual suave (slide) */
    transition: margin-left 0.3s ease, width 0.3s ease;
}

    /* CUANDO EL MENÚ ESTÁ VISIBLE: 
   Aplicamos esta clase al contenedor principal para encogerlo y moverlo */
    /*.main-content.shifted {
        margin-left: var(--sidebar-width);
        width: calc(100% - var(--sidebar-width));
    }*/

/* ==========================================
   ADAPTACIÓN PARA MÓVILES (Media Queries)
   ========================================== */
@media (max-width: 768px) {
    .sidebar {
        width: 280px; /* Un poco más ancho en móviles para facilitar el toque */
    }

    /* En móviles no queremos empujar el contenido; el menú debe flotar por encima */
    .main-content.shifted {
        margin-left: 0;
        width: 100%;
    }

    .toggle-btn.shifted {
        left: calc(280px + 15px);
    }
}

/* ===== HEADER SIDEBAR ===== */
.sidebar-header {
    padding: 25px 20px;
    font-size: 22px;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* ===== LINKS MENU ===== */
.nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 15px 20px;
        color: var(--text-white);
        text-decoration: none;
        transition: background 0.3s ease;
        font-size: 16px;
    }

        .nav-links a:hover {
            background-color: var(--sidebar-hover);
        }

/* ===== HEADER CONTENIDO ===== */
.content-header h1 {
    margin: 0;
    font-size: 32px;
    color: #222;
}

.content-header p {
    color: #666;
    margin-top: 10px;
}

/* ===== SHORTCUTS ===== */
.shortcuts {
    display: flex;
    gap: 20px;
    margin-top: 40px;
    flex-wrap: wrap;
}

/* ===== BOTONES ===== */
.btn-shortcut {
    background: white;
    border-radius: 12px;
    padding: 20px;
    width: 250px;
    text-decoration: none;
    color: #222;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .btn-shortcut:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    }

    .btn-shortcut .icon {
        font-size: 35px;
    }

    .btn-shortcut .text {
        display: flex;
        flex-direction: column;
    }

    .btn-shortcut strong {
        font-size: 18px;
    }

    /*BOTONES DE NUEVA ORDEN*/
    .orden-container {
    border-radius: 10px;
    border: 1px solid #dcdcdc;
}

.barcode-box {
    display: flex;
    gap: 10px;
}

.btn-scan {
    border: none;
    background: #3498db;
    color: white;
    border-radius: 10px;
    padding: 10px 15px;
}

.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.upload-box {
    border: 2px dashed #3498db;
    padding: 40px;
    border-radius: 15px;
    text-align: center;
}

.preview-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.acciones {
    display: flex;
    gap: 20px;
    justify-content: end;
    margin-bottom: 50px;
}

.btn-guardar,
.btn-whatsapp {
    border: none;
    padding: 15px 25px;
    border-radius: 12px;
    font-size: 16px;
    color: white;
    cursor: pointer;
}

.btn-guardar {
    background: #27ae60;
}

.btn-whatsapp {
    background: #25D366;
}

@media(max-width:768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .acciones {
        flex-direction: column;
    }

}