:root {
    --sidebar-bg: #1a252f;
    --sidebar-hover: #34495e;
    --accent: #3498db;
    --text-white: #ffffff;
    --bg-light: #f4f6f9;
    --sidebar-width: 260px;
}

/* =========================
   BODY
========================= */




/* =========================
   CONTENEDOR GENERAL
========================= */

.orden-container {
    max-width: 1300px;
    margin: auto;
    padding: 30px;
}

.titulo {
    font-size: 34px;
    margin-bottom: 30px;
    color: #222;
    font-weight: bold;
}


/* =========================
   CARDS
========================= */

.card-section {
    background: white;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    .card-section h2 {
        margin-top: 0;
        margin-bottom: 25px;
        color: #222;
    }


/* =========================
   GRIDS
========================= */

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}


/* =========================
   INPUTS
========================= */

.form-control {
    width: 100%;
    padding: 13px;
    border-radius: 12px;
    border: 1px solid #dcdcdc;
    box-sizing: border-box;
    font-size: 15px;
    transition: 0.2s ease;
}

    .form-control:focus {
        border-color: var(--accent);
        outline: none;
        box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
    }

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #444;
}


/* =========================
   SCANNER
========================= */

.barcode-box {
    display: flex;
    gap: 10px;
}

.btn-scan {
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;
}

    .btn-scan:hover {
        transform: scale(1.03);
        opacity: 0.95;
    }


/* =========================
   CHECKBOXES
========================= */

.checks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

    .checks-grid label {
        background: #f8f9fa;
        padding: 14px;
        border-radius: 12px;
        cursor: pointer;
        transition: 0.2s ease;
    }

        .checks-grid label:hover {
            background: #eef4f8;
        }


/* =========================
   UPLOAD
========================= */

.upload-box {
    border: 2px dashed var(--accent);
    padding: 40px;
    border-radius: 16px;
    text-align: center;
    background: #fafcff;
}

    .upload-box input {
        width: 100%;
    }


/* =========================
   PREVIEW
========================= */

.preview-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.preview-img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}


/* =========================
   BOTONES
========================= */

.acciones {
    display: flex;
    gap: 20px;
    justify-content: end;
    margin-bottom: 60px;
}

.btn-guardar,
.btn-whatsapp {
    border: none;
    padding: 15px 24px;
    border-radius: 14px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: 0.2s ease;
}

.btn-guardar {
    background: #27ae60;
}

.btn-whatsapp {
    background: #25D366;
}

    .btn-guardar:hover,
    .btn-whatsapp:hover {
        transform: translateY(-2px);
    }


/* =========================
   MODAL SCANNER
========================= */

.reader-container {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 999999;
}

.reader-box {
    background: white;
    width: 90%;
    max-width: 500px;
    border-radius: 18px;
    padding: 20px;
}

.reader-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

    .reader-header h3 {
        margin: 0;
    }

    .reader-header button {
        border: none;
        background: red;
        color: white;
        border-radius: 10px;
        padding: 8px 12px;
        cursor: pointer;
    }

#reader {
    width: 100%;
}


/* =========================
   RESPONSIVE
========================= */

@media(max-width: 768px) {

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .acciones {
        flex-direction: column;
    }

    .btn-guardar,
    .btn-whatsapp {
        width: 100%;
    }

    .barcode-box {
        flex-direction: column;
    }
}


.input-search {
    display: flex;
    gap: 10px;
}

.btn-search {
    border: none;
    background: #34495e;
    color: white;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    white-space: nowrap;
}