/* Footer en esquina inferior derecha */
.menu-footer-corner {
    position: fixed;
    right: 40px;
    bottom: 40px;
    display: flex;
    gap: 16px;
    z-index: 100;
}
.apps-script-link {
    position: fixed;
    right: 40px;
    bottom: 90px;
    background: #23263a;
    color: #bfc8e2;
    padding: 14px 24px;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    font-size: 1rem;
    font-family: Arial, sans-serif;
    transition: opacity 0.2s;
}
.apps-script-link a {
    color: #43e6b1;
    text-decoration: underline;
    font-weight: 500;
}
/* Footer del menú principal */
.menu-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-top: 64px;
}
.footer-btn {
    background: #23263a;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 16px 32px;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, color 0.2s;
    cursor: pointer;
}
.footer-btn:hover {
    background: #2196f3;
    color: #fff;
}
.apps-script-link {
    color: #bfc8e2;
    font-size: 1rem;
    font-family: Arial, sans-serif;
}
.apps-script-link a {
    color: #43e6b1;
    text-decoration: underline;
    font-weight: 500;
}
.brand-corner {
    position: absolute;
    top: 32px;
    left: 32px;
    z-index: 10;
}
.brand-logo-large {
    width: 180px;
    margin-bottom: 0;
}
body {
    font-family: 'Arial Black', Arial, sans-serif;
    background: #181818;
    margin: 0;
    padding: 0;
}
.menu-buttons-horizontal {
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
}
.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 340px;
    height: 110px;
    padding: 0;
    font-size: 2.2rem;
    font-weight: 400;
    color: #222;
    background: #f4f4f4;
    border: none;
    border-radius: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    text-align: center;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.1s, background 0.2s, color 0.2s;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    font-family: Arial, sans-serif;
}
.empa-btn {
    background: #f4f4f4;
    border-bottom: 8px solid #2196f3;
}
.empa-btn:hover {
    box-shadow: 0 8px 32px rgba(33,150,243,0.18);
    transform: translateY(-2px) scale(1.04);
    color: #1565c0;
}
.empa-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(33,150,243,0.10);
}
.merma-btn {
    background: #f4f4f4;
    border-bottom: 8px solid #ff9800;
}
.merma-btn:hover {
    box-shadow: 0 8px 32px rgba(255,152,0,0.18);
    transform: translateY(-2px) scale(1.04);
    color: #e65100;
}
.merma-btn:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(255,152,0,0.10);
}
.volver-menu {
    display: inline-block;
    font-size: 1.1rem;
    color: #4285f4;
    /* --- BRAND LOGO ESQUINA --- */
    padding: 10px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(66,133,244,0.08);
    transition: background 0.2s, color 0.2s;
}
.volver-menu:hover {
    background: #4285f4;
    color: #fff;
}
body {
    font-family: Arial, sans-serif;
    background: #f7f7f7;
    margin: 0;
    padding: 0;
}
.menu-page {
    max-width: 600px;
    margin: 40px auto;
    padding: 32px 0 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.brand-logo {
    width: 120px;
    margin-bottom: 16px;
}
.bienvenida {
    font-size: 2.2rem;
    color: #333;
    margin-bottom: 64px;
    /* --- BRAND LOGO ESQUINA --- */
    font-family: 'Arial Black', Arial, sans-serif;
}
h1 {
    text-align: center;
    margin-bottom: 32px;
    font-family: 'Arial Black', Arial, sans-serif;
}
/* Pestañas */
.tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    gap: 8px;
}
.tab-btn {
    background: #e0e0e0;
    border: none;
    padding: 24px 0;
    width: 50%;
    border-radius: 16px 16px 0 0;
    cursor: pointer;
    font-size: 1.5rem;
    font-weight: bold;
    color: #333;
    transition: background 0.2s, color 0.2s;
    margin: 0 4px;
}
.tab-btn.active {
    background: #4285f4;
    color: #fff;
    box-shadow: 0 2px 8px rgba(66,133,244,0.12);
}
.form-section {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 32px 24px;
}
#form-empaquetados, #form-merma {
    background: #181c2f;
    color: #fff;
    border-radius: 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
    padding: 40px 32px;
    margin: 40px auto;
    max-width: 600px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}
label {
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
    align-self: flex-start;
    margin-left: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
input[type="text"], input[type="number"], input[type="date"] {
    padding: 12px 16px;
    border: 1px solid #444;
    border-radius: 10px;
    font-size: 1.1rem;
    background: #333;
    color: #fff;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
}
button {
    background: #43e6b1;
    color: #181c2f;
    border: none;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 16px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
    width: 100%;
    box-shadow: 0 2px 8px rgba(67,230,177,0.12);
}
button:hover {
    background: #2196f3;
    color: #fff;
}
button.secondary:not(.btn-small) {
    background: #ff8a65;
    color: #181c2f;
}
button.secondary:not(.btn-small):hover {
    background: #ff7043;
    color: #fff;
}
#mensaje {
    text-align: center;
    margin-top: 16px;
    color: green;
    font-weight: bold;
}

/* --- Layout compacto para EMPAQUETADOS y MERMA --- */
#form-empaquetados .compact-grid, #form-merma .compact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 16px;
    align-items: end;
}
@media (min-width: 720px) {
    #form-empaquetados .compact-grid, #form-merma .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
#form-empaquetados .field label, #form-merma .field label {
    font-size: 1.1rem;
    margin: 0 0 6px 6px;
}
#form-empaquetados .inline, #form-merma .inline { display: flex; gap: 8px; align-items: center; }
#form-empaquetados .btn-small, #form-merma .btn-small {
    padding: 6px 12px;
    font-size: 0.95rem;
    background: #43e6b1;
    color: #23263a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#form-empaquetados .hora-input, #form-merma .hora-input {
    width: 140px;
    background: #23263a;
    color: #43e6b1;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.95rem;
    margin-top: 6px;
}
#form-empaquetados .select, #form-merma .select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: #333;
    color: #fff;
    border: 1px solid #444;
    font-size: 1.05rem;
}

/* --- Productos: lista con cantidades --- */
.productos-section label {
    font-size: 1.2rem;
}
.producto-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-bottom: 1px solid #2b2f45;
}
.producto-line:last-child { border-bottom: none; }
.prod-name { color: #bfc8e2; font-size: 0.95rem; }
.prod-qty {
    width: 90px;
    padding: 8px 10px;
    background: #333;
    color: #fff;
    border: 1px solid #444;
    border-radius: 8px;
    text-align: right;
}

/* Panel desplegable para agregar productos */
.agregar-wrapper { position: relative; width: 100%; margin-top: 10px; }
.panel-productos {
    position: absolute;
    left: 0; right: 0; top: calc(100% + 8px);
    background: #23263a;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    padding: 12px;
    z-index: 20;
}
.panel-productos input[type="text"] {
    width: 100%;
    margin-bottom: 8px;
}
.panel-lista {
    max-height: 360px;
    overflow: auto;
}
.panel-item {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #bfc8e2;
}
.panel-item:hover { background: #2b2f45; color: #fff; }

.seleccionados { 
    margin-top: 10px; 
    background: #23263a; 
    border-radius: 12px; 
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.qty-actions { display: flex; align-items: center; gap: 8px; }
.cestas-est { color: #bfc8e2; font-size: 0.85rem; }
.btn-small.secondary { background: #43e6b1; color: #23263a; }

/* --- Gestión de Productos (productos.html) --- */
.productos-admin { max-width: 960px; margin: 40px auto; background:#181c2f; color:#fff; padding:40px 32px; border-radius:24px; box-shadow:0 4px 24px rgba(0,0,0,0.18); }
.productos-actions { display:flex; gap:12px; flex-wrap:wrap; margin-bottom:16px; }
.productos-actions .btn-small { padding:8px 16px; font-size:0.9rem; }
.nuevo-form { background:#23263a; padding:16px 16px 20px; border-radius:16px; margin-bottom:24px; box-shadow:0 2px 8px rgba(0,0,0,0.25); }
.nuevo-form h3 { margin:0 0 12px 0; font-size:1.1rem; }
.nuevo-form input, .nuevo-form select { max-width:200px; }
.tabla-wrapper { overflow:auto; border:1px solid #2b2f45; border-radius:16px; background:#23263a; }
table.tabla-productos { width:100%; border-collapse:collapse; font-size:0.9rem; }
table.tabla-productos thead { background:#2b2f45; position:sticky; top:0; }
table.tabla-productos th, table.tabla-productos td { padding:10px 12px; text-align:left; }
table.tabla-productos tbody tr:nth-child(odd){ background:#1f2336; }
table.tabla-productos tbody tr:hover { background:#313954; }
.estado-carga { margin-top:12px; font-size:0.8rem; color:#bfc8e2; }

.confirm-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 200;
}

.confirm-modal.open {
    display: flex;
}

.confirm-modal__dialog {
    width: min(980px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: #181c2f;
    color: #fff;
    border-radius: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.35);
    padding: 18px;
}

.confirm-modal__dialog h3 {
    margin: 0 0 12px 0;
    font-size: 1.2rem;
}

.confirm-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.confirm-meta-item {
    background: #23263a;
    border-radius: 8px;
    padding: 8px 10px;
}

.confirm-table-wrap {
    border: 1px solid #2b2f45;
    border-radius: 10px;
    overflow: auto;
    margin-bottom: 12px;
}

.confirm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.confirm-table th,
.confirm-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #2b2f45;
    text-align: left;
    vertical-align: top;
}

.confirm-table thead {
    position: sticky;
    top: 0;
    background: #2b2f45;
}

.confirm-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.95rem;
    margin: 6px 0 12px;
}

.confirm-check input[type="checkbox"] {
    margin-top: 2px;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@media (max-width: 680px) {
    .confirm-meta {
        grid-template-columns: 1fr;
    }
}
