/* 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: 116px;
    height: 116px;
    object-fit: contain;
    border-radius: 50%;
    border: 2px solid rgba(192, 110, 50, 0.38);
    background: linear-gradient(145deg, #fff 0%, #fff8ed 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 10px 28px rgba(62, 42, 22, 0.14),
        0 0 0 1px rgba(0, 0, 0, 0.04);
    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);
}

.volver-menu {
    display: inline-block;
    font-size: 1.1rem;
    color: #F8F3E9;
    /* --- BRAND LOGO ESQUINA --- */
    padding: 10px 24px;
    border-radius: 999px;
    background: #000000;
    border: 1px solid #000000;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0,0,0,0.14);
    transition: background 0.2s, color 0.2s, transform 0.16s;
}
.volver-menu:hover {
    background: #C06E32;
    border-color: #C06E32;
    color: #F8F3E9;
    transform: translateY(-1px);
}
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 {
    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 .compact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px 16px;
    align-items: end;
}
@media (min-width: 720px) {
    #form-empaquetados .compact-grid .compact-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
#form-empaquetados .field label .field label {
    font-size: 1.1rem;
    margin: 0 0 6px 6px;
}
#form-empaquetados .inline .inline { display: flex; gap: 8px; align-items: center; }
#form-empaquetados .btn-small .btn-small {
    padding: 6px 12px;
    font-size: 0.95rem;
    background: #43e6b1;
    color: #23263a;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}
#form-empaquetados .hora-input .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 .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; }

/* Ajustes de contraste para Catálogo de Productos */
#page-productos .productos-admin h1,
#page-productos .productos-admin h3 {
    color: #f3f6ff;
}
#page-productos .productos-admin .volver-menu {
    color: #C06E32;
    border: 1px solid rgba(192, 110, 50, 0.35);
    box-shadow: 0 2px 8px rgba(192, 110, 50, 0.18);
}
#page-productos .productos-admin .volver-menu:hover {
    background: #C06E32;
    color: #111827;
}
#page-productos .productos-actions input,
#page-productos .nuevo-form input,
#page-productos .nuevo-form select {
    background: #1f2336;
    color: #f3f6ff;
    border: 1px solid #3a425f;
}
#page-productos .productos-actions input::placeholder,
#page-productos .nuevo-form input::placeholder {
    color: #a9b3d3;
}
#page-productos .nuevo-form small {
    color: #d8deef;
}
#page-productos table.tabla-productos th {
    color: #f3f6ff;
}
#page-productos table.tabla-productos td {
    color: #edf1ff;
}

.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;
    }
}

/* ===== UI Refresh (sin tocar lógica) ===== */
body {
    font-family: Arial, sans-serif;
    background: #f2f4f8;
    color: #1f2430;
}

.menu-page {
    max-width: 920px;
    min-height: 80vh;
    justify-content: center;
    gap: 6px;
    padding-top: 24px;
}

.menu-page h1 {
    font-size: 2.2rem;
    margin-bottom: 6px;
    color: #171d2f;
}

.bienvenida {
    font-size: 1.85rem;
    margin-bottom: 48px;
    color: #2f3a50;
}

.menu-buttons-horizontal {
    margin-top: 26px;
    gap: 28px;
}

.menu-btn {
    width: 280px;
    height: 74px;
    border-radius: 24px;
    font-size: 1.9rem;
    font-weight: 700;
}

#reg-search {
    background: #F8F3E9;
    border: 1px solid #d9c8ab;
    color: #000000;
    border-radius: 10px;
    padding: 10px 12px;
    min-height: 40px;
}

.reg-table-wrap {
    overflow: auto;
    max-height: 68vh;
}

.reg-table thead th {
    white-space: nowrap;
}

.reg-table td {
    white-space: nowrap;
}

@media (max-width: 960px) {
    .reg-toolbar-left {
        width: 100%;
    }

    #reg-search {
        width: 100%;
        min-width: 0 !important;
    }

    .menu-btn {
        width: 220px;
        font-size: 2.2rem;
    }
}

.menu-footer-corner {
    right: 24px;
    bottom: 24px;
    gap: 8px;
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.97) 0%, rgba(248, 243, 233, 0.96) 100%);
    border: 1px solid rgba(192, 110, 50, 0.42);
    border-radius: 16px;
    padding: 8px;
    backdrop-filter: blur(12px) saturate(1.05);
    -webkit-backdrop-filter: blur(12px) saturate(1.05);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.7) inset,
        0 12px 32px rgba(62, 42, 22, 0.12),
        0 4px 12px rgba(0, 0, 0, 0.06);
}

.footer-btn {
    padding: 9px 14px;
    font-size: 0.92rem;
    border-radius: 10px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(62, 42, 22, 0.12);
    transition: transform 0.18s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.footer-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(62, 42, 22, 0.18);
}

.footer-btn:focus-visible {
    outline: 2px solid var(--pdt-brown);
    outline-offset: 2px;
}

.apps-script-link {
    width: min(560px, calc(100vw - 48px));
    right: 24px;
    bottom: 82px;
    border: 1px solid rgba(192,110,50,0.45);
    box-shadow: 0 12px 30px rgba(0,0,0,0.22);
}

.container {
    width: min(940px, 94vw);
    margin: 24px auto 40px;
}

.container > h1 {
    font-size: 2.1rem;
    margin: 8px 0 22px;
    color: var(--pdt-black);
    letter-spacing: -0.02em;
    position: relative;
    padding-bottom: 14px;
}

.container > h1::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: min(200px, 45%);
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, transparent, var(--pdt-brown), #d4824a, var(--pdt-brown), transparent);
    opacity: 0.85;
}

.form-section {
    width: 100%;
    box-sizing: border-box;
    border-radius: 20px;
    padding: 24px 22px;
}

#form-empaquetados,
#form-merma {
    max-width: 820px;
    margin: 16px auto;
    padding: 26px 22px;
}

form {
    width: 100%;
    align-items: stretch;
    gap: 14px;
}

.compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

@media (max-width: 760px) {
    .compact-grid { grid-template-columns: 1fr; }
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ci-field-full {
    grid-column: 1 / -1;
}

label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    text-shadow: none;
}

input[type="text"], input[type="number"], input[type="date"], select {
    max-width: 100%;
    width: 100%;
    min-height: 42px;
    font-size: 1rem;
    border-radius: 10px;
}

.inline {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline input[type="date"] { flex: 1; }

.btn-small {
    width: auto;
    min-width: 86px;
    margin-top: 0;
    padding: 10px 12px;
    font-size: 0.95rem;
}

.productos-section {
    margin-top: 6px;
}

.productos-section > label {
    margin-bottom: 8px;
    display: inline-block;
}

.seleccionados {
    min-height: 4px;
    margin-top: 6px;
}

.form-actions {
    justify-content: center;
    margin-top: 8px;
}

.form-actions button {
    width: 200px;
    margin-top: 0;
    padding: 12px 14px;
    font-size: 1.05rem;
}

.prod-name {
    color: #000000;
}

/* ===== Tema Pan de Tata ===== */
:root {
    --pdt-black: #000000;
    --pdt-cream: #F8F3E9;
    --pdt-brown: #C06E32;
}

body {
    background-color: var(--pdt-cream);
    color: var(--pdt-black);
}

/* Fondo atmosférico en vistas de formularios (misma paleta que el menú) */
#page-forms {
    min-height: 100vh;
    position: relative;
    isolation: isolate;
    padding-bottom: 32px;
}

#page-forms::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(ellipse 90% 50% at 50% -5%, rgba(192, 110, 50, 0.1), transparent 55%),
        linear-gradient(170deg, rgba(248, 243, 233, 0.94) 0%, rgba(242, 232, 216, 0.98) 100%),
        url("bello-campo-tiendas.jpg"),
        url("bello-campo-tiendas.jpg");
    background-size:
        auto,
        auto,
        320px 320px,
        320px 320px;
    background-position:
        center,
        center,
        0 0,
        160px 160px;
    background-repeat:
        no-repeat,
        no-repeat,
        repeat,
        repeat;
    background-attachment: fixed;
}

@media (max-width: 860px) {
    #page-forms::before {
        background-size: auto, auto, 240px 240px, 240px 240px;
        background-position: center, center, 0 0, 120px 120px;
    }
}

#form-empaquetados,
#form-merma {
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(248, 243, 233, 0.99) 100%);
    color: var(--pdt-black);
    border: 1px solid rgba(192, 110, 50, 0.38);
    border-radius: 22px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 16px 40px rgba(62, 42, 22, 0.1),
        0 4px 14px rgba(0, 0, 0, 0.06);
}

#form-control-inventario-wrap {
    background: linear-gradient(180deg, rgba(255, 253, 248, 0.98) 0%, rgba(248, 243, 233, 0.99) 100%);
    color: var(--pdt-black);
    border: 1px solid rgba(192, 110, 50, 0.38);
    border-radius: 22px;
    max-width: 820px;
    margin: 16px auto;
    padding: 26px 22px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 16px 40px rgba(62, 42, 22, 0.1),
        0 4px 14px rgba(0, 0, 0, 0.06);
}

#form-empaquetados h2,
#form-merma h2,
#form-empaquetados label,
#form-merma label,
.productos-section label,
.field label {
    color: var(--pdt-black) !important;
    text-shadow: none;
}

#form-control-inventario-wrap h2,
#form-control-inventario-wrap label,
#form-control-inventario-wrap #ci-msg {
    color: var(--pdt-black) !important;
    text-shadow: none;
}

#form-empaquetados input[type="text"],
#form-merma input[type="text"],
#form-empaquetados input[type="number"],
#form-merma input[type="number"],
#form-empaquetados input[type="date"],
#form-merma input[type="date"],
#form-empaquetados select,
#form-merma select,
#form-empaquetados .hora-input,
#form-merma .hora-input {
    background: #fff;
    color: var(--pdt-black);
    border: 1px solid #d7c7a8;
}

#form-control-inventario-wrap input[type="text"],
#form-control-inventario-wrap input[type="number"],
#form-control-inventario-wrap input[type="date"],
#form-control-inventario-wrap select {
    background: #fff;
    color: var(--pdt-black);
    border: 1px solid #d7c7a8;
}

#form-control-inventario-wrap .ci-product-picker {
    background: #fff8ed;
    border: 1px solid #ead6b5;
    border-radius: 12px;
    padding: 10px;
    margin-top: 4px;
}

#form-control-inventario-wrap .ci-producto-seleccionado {
    min-height: 22px;
    font-weight: 700;
    color: #6c5848;
}

#form-control-inventario-wrap #ci-productos-seleccionados {
    margin-top: 6px;
    background: #fff8ed;
    border: 1px solid #ead6b5;
    border-radius: 12px;
    padding: 8px;
}

#form-control-inventario-wrap #ci-productos-seleccionados .producto-line {
    background: #fffdf8;
    border: 1px solid #ead6b5;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

#form-control-inventario-wrap #ci-productos-seleccionados .producto-line:last-child {
    margin-bottom: 0;
}

#form-control-inventario-wrap .ci-remove-item {
    width: 38px;
    min-width: 38px;
    padding: 6px;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: 0;
}

#form-control-inventario-wrap #ci-add-producto {
    min-width: 150px;
}

#form-control-inventario-wrap #ci-panel-buscar {
    width: 100%;
    margin-bottom: 8px;
}

#form-control-inventario-wrap #ci-panel-lista {
    max-height: 260px;
    overflow: auto;
    border: 1px solid #ead6b5;
    border-radius: 10px;
    background: #fffdf8;
}

#form-control-inventario-wrap .panel-item {
    color: #2a1f16;
    font-weight: 700;
    border-bottom: 1px solid #f0dfc7;
}

#form-control-inventario-wrap .panel-item:last-child {
    border-bottom: none;
}

#form-control-inventario-wrap .panel-item strong {
    color: #1a120c;
}

#form-control-inventario-wrap .panel-item:hover,
#form-control-inventario-wrap .panel-item:focus-visible,
#form-control-inventario-wrap .panel-item.active {
    background: #c06e32;
    color: #fff;
}

#form-control-inventario-wrap .panel-item:hover strong,
#form-control-inventario-wrap .panel-item:focus-visible strong,
#form-control-inventario-wrap .panel-item.active strong {
    color: #fff;
}

#form-control-inventario-wrap #ci-limpiar {
    background: var(--pdt-brown);
    color: #fff;
    box-shadow: 0 2px 8px rgba(67,230,177,0.12);
}

#form-control-inventario-wrap #ci-limpiar:hover,
#form-control-inventario-wrap #ci-limpiar:focus-visible {
    background: #000000;
    color: #fff;
    outline: none;
}

#form-empaquetados .seleccionados,
#form-merma .seleccionados,
#form-empaquetados .panel-productos,
#form-merma .panel-productos,
#form-empaquetados .producto-line,
#form-merma .producto-line {
    background: #fff8ed;
    border-color: #ead6b5;
}

#form-empaquetados .prod-name,
#form-merma .prod-name,
#form-empaquetados .cestas-est,
#form-merma .cestas-est {
    color: #3f2f24;
}

#form-empaquetados .panel-item,
#form-merma .panel-item {
    color: #2a1f16;
    font-weight: 700;
}

#form-empaquetados .panel-item strong,
#form-merma .panel-item strong {
    color: #1a120c;
}

#form-empaquetados .panel-item:hover,
#form-merma .panel-item:hover,
#form-empaquetados .panel-item:focus-visible,
#form-merma .panel-item:focus-visible {
    background: #c06e32;
    color: #fff;
}

#form-empaquetados .panel-item:hover strong,
#form-merma .panel-item:hover strong,
#form-empaquetados .panel-item:focus-visible strong,
#form-merma .panel-item:focus-visible strong {
    color: #fff;
}

button,
.btn-small,
.footer-btn,
.menu-primary-btn {
    background: var(--pdt-brown);
    color: #fff;
}

button:hover,
.btn-small:hover,
.footer-btn:hover,
.menu-primary-btn:hover {
    background: #000000;
    color: #fff;
}

button.secondary,
.btn-small.secondary {
    background: #f1d8bf;
    color: var(--pdt-black);
}

.volver-menu {
    color: var(--pdt-brown);
}

/* Variantes de footer */
.footer-btn--primary {
    background: var(--pdt-black) !important;
    color: var(--pdt-cream) !important;
}
.footer-btn--secondary {
    background: var(--pdt-brown) !important;
    color: var(--pdt-cream) !important;
}
.inicio-btn {
    background: var(--pdt-brown) !important;
    color: var(--pdt-cream) !important;
}

/* Panel protegido en paleta */
.apps-script-link {
    background: var(--pdt-cream);
    color: var(--pdt-black);
}
.apps-script-link a {
    color: var(--pdt-brown);
}

/* ===== Catálogo en paleta crema/naranja/negro ===== */
#page-productos .productos-admin {
    background: rgba(248, 243, 233, 0.96);
    color: #000000;
    border: 1px solid rgba(192, 110, 50, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

#page-productos .productos-admin h1,
#page-productos .productos-admin h3,
#page-productos .productos-admin th,
#page-productos .productos-admin td,
#page-productos .estado-carga,
#page-productos #p-msg {
    color: #000000;
}

#page-productos .productos-actions .btn-small,
#page-productos #p-guardar,
#page-productos .tabla-productos .btn-small {
    background: #C06E32;
    color: #F8F3E9;
    border: 1px solid #C06E32;
}

#page-productos .productos-actions .btn-small:hover,
#page-productos #p-guardar:hover,
#page-productos .tabla-productos .btn-small:hover,
#page-productos .productos-actions .btn-small:focus-visible,
#page-productos #p-guardar:focus-visible,
#page-productos .tabla-productos .btn-small:focus-visible {
    background: #000000;
    color: #F8F3E9;
    border-color: #000000;
    outline: none;
}

#page-productos .volver-menu {
    background: #C06E32;
    color: #F8F3E9;
    border: 1px solid #C06E32;
}

#page-productos .volver-menu:hover,
#page-productos .volver-menu:focus-visible {
    background: #000000;
    color: #F8F3E9;
    border-color: #000000;
    outline: none;
}

#page-productos .nuevo-form,
#page-productos .tabla-wrapper {
    background: #fff8ed;
    border: 1px solid #ead6b5;
}

#page-productos .tabla-productos thead {
    background: #f1dcc1;
}

#page-productos .tabla-productos tbody tr:nth-child(odd),
#page-productos .tabla-productos tbody tr:nth-child(even) {
    background: #fff8ed;
}

#page-productos .tabla-productos tbody tr:hover {
    background: #f7e7d1;
}

#page-productos .productos-actions input,
#page-productos .nuevo-form input,
#page-productos .nuevo-form select {
    background: #fffdf8;
    color: #000000;
    border: 1px solid #d9c8ab;
}

#page-productos .productos-actions input::placeholder,
#page-productos .nuevo-form input::placeholder {
    color: #6c5848;
}

/* Overwrite legacy dark-theme selectors in catalog */
#page-productos table.tabla-productos th,
#page-productos table.tabla-productos td,
#page-productos .tabla-wrapper,
#page-productos .tabla-productos tbody tr,
#page-productos .tabla-productos tbody tr td {
    color: #000000;
}

#page-productos .productos-admin .volver-menu {
    background: #C06E32;
    color: #F8F3E9;
    border: 1px solid #C06E32;
    font-weight: 700;
}

#page-productos .productos-admin .volver-menu:hover,
#page-productos .productos-admin .volver-menu:focus-visible {
    background: #000000;
    color: #F8F3E9;
    border-color: #000000;
    outline: none;
}

/* ===== Draft Almacen09 Salidas ===== */
.salidas-brand-corner {
    top: 14px;
    left: 14px;
    z-index: 45;
}

.salidas09-wrap {
    width: min(1320px, 96vw);
}

.salidas09-top-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.salidas09-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 14px;
    align-items: start;
}

.salidas09-card {
    background: #fff;
    border: 1px solid #d9c8ab;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 14px;
}

.salidas09-card h3 {
    margin: 0 0 10px;
    color: #000000;
    font-size: 1.2rem;
}

.salidas09-card label {
    color: #000000;
    font-size: 0.95rem;
    margin-bottom: 6px;
}

.salidas09-filter-row {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.salidas09-filter {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid #d9c8ab;
    background: #fff;
    color: #000000;
    padding: 8px;
}

.salidas09-product-list {
    border: 1px solid #ead6b5;
    background: #fff8ed;
    border-radius: 10px;
    max-height: 250px;
    overflow: auto;
    padding: 8px;
    display: grid;
    gap: 8px;
}

.salidas09-product-item {
    width: 100%;
    text-align: left;
    border: 1px solid #dfccad;
    background: #fff;
    color: #000000;
    border-radius: 10px;
    padding: 8px 10px;
    display: grid;
    gap: 2px;
    cursor: pointer;
    box-shadow: none;
    margin: 0;
}

.salidas09-product-item strong {
    font-size: 0.98rem;
}

.salidas09-product-item span {
    font-size: 0.9rem;
}

.salidas09-product-item em {
    font-size: 0.82rem;
    font-style: normal;
    color: #6c5848;
}

.salidas09-product-item.active,
.salidas09-product-item:hover,
.salidas09-product-item:focus-visible {
    background: #C06E32;
    color: #F8F3E9;
    border-color: #C06E32;
    outline: none;
}

.salidas09-product-item.active em,
.salidas09-product-item:hover em,
.salidas09-product-item:focus-visible em {
    color: #F8F3E9;
}

.salidas09-detail-box {
    margin-top: 10px;
    border: 1px solid #ead6b5;
    background: #fff8ed;
    border-radius: 12px;
    padding: 10px;
}

.salidas09-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #ead6b5;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.salidas09-detail-header strong {
    font-size: 1.05rem;
}

.salidas09-detail-header span {
    font-size: 0.9rem;
    background: #f1dcc1;
    color: #000000;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
}

.salidas09-lote-list {
    display: grid;
    gap: 8px;
}

.salidas09-lote-row {
    display: grid;
    grid-template-columns: minmax(130px, 1fr) auto minmax(170px, 220px);
    gap: 8px;
    align-items: center;
}

.salidas09-lote-tag {
    background: #fff;
    border: 1px solid #e3cfb0;
    border-radius: 8px;
    padding: 8px;
    font-weight: 700;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.salidas09-lote-qty {
    color: #3f2f24;
    font-size: 0.88rem;
    font-weight: 700;
}

.salidas09-lote-select {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid #d9c8ab;
    padding: 8px;
    width: 100%;
    background: #fff;
    color: #000000;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.salidas09-lote-check {
    width: 18px;
    height: 18px;
    accent-color: #C06E32;
}

.salidas09-factura-field {
    margin-bottom: 10px;
    display: grid;
    gap: 6px;
}

.salidas09-correlativo-input {
    min-height: 38px;
    border-radius: 8px;
    border: 1px solid #d9c8ab;
    padding: 8px;
    width: 100%;
    background: #fff;
    color: #000000;
}

.salidas09-card-footer {
    margin-top: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.salidas09-counter {
    font-weight: 700;
    color: #000000;
    font-size: 0.9rem;
}

.salidas09-factura-name {
    background: #000000;
    color: #F8F3E9;
    border-radius: 999px;
    display: inline-block;
    padding: 8px 14px;
    font-weight: 700;
    margin-bottom: 10px;
}

.salidas09-lines {
    border: 1px solid #ead6b5;
    background: #fff8ed;
    border-radius: 12px;
    padding: 8px;
    min-height: 92px;
    display: grid;
    gap: 8px;
}

.salidas09-line-row {
    background: #fff;
    border: 1px solid #e3cfb0;
    border-radius: 10px;
    padding: 8px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
}

.salidas09-line-main {
    display: grid;
    gap: 2px;
}

.salidas09-line-main span,
.salidas09-line-main small {
    color: #4c3b2c;
}

.salidas09-line-side {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.salidas09-qty-input {
    width: 88px;
    min-height: 34px;
    border-radius: 8px;
    border: 1px solid #d9c8ab;
    background: #fff;
    color: #000000;
    padding: 6px 8px;
}

.salidas09-remove {
    border: 1px solid #000000;
    background: #fff;
    color: #000000;
    border-radius: 8px;
    padding: 7px 10px;
    cursor: pointer;
    font-weight: 700;
}

.salidas09-remove:hover,
.salidas09-remove:focus-visible {
    background: #000000;
    color: #F8F3E9;
    outline: none;
}

.salidas09-machines {
    display: grid;
    gap: 8px;
}

.salidas09-machine-box {
    border: 1px solid #ead6b5;
    background: #fff8ed;
    border-radius: 10px;
    padding: 9px;
}

.salidas09-machine-box h5 {
    margin: 0 0 6px;
    font-size: 0.95rem;
}

.salidas09-machine-box ul {
    margin: 0;
    padding-left: 18px;
}

.salidas09-machine-box li {
    color: #2f241a;
    margin-bottom: 2px;
}

.salidas09-send-row {
    margin-top: 12px;
    display: grid;
    gap: 8px;
}

.salidas09-msg {
    font-size: 0.9rem;
    min-height: 20px;
    font-weight: 700;
}

.salidas09-drawer {
    margin-top: 12px;
    background: #fff;
    border: 1px solid #d9c8ab;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 12px;
}

.salidas09-drawer h3 {
    margin: 0 0 8px;
}

.salidas09-table-wrap {
    border: 1px solid #e7d5b8;
    border-radius: 10px;
    overflow: auto;
    max-height: 360px;
}

.salidas09-table {
    width: 100%;
    border-collapse: collapse;
}

.salidas09-table th,
.salidas09-table td {
    border-bottom: 1px solid #ead6b5;
    padding: 8px 10px;
    text-align: left;
    font-size: 0.9rem;
    color: #000000;
    vertical-align: top;
}

.salidas09-table thead th {
    position: sticky;
    top: 0;
    background: #f2e7d7;
    z-index: 1;
}

.salidas09-empty {
    border: 1px dashed #d3b88f;
    background: #fff;
    border-radius: 10px;
    padding: 12px;
    color: #4b3a2c;
    font-size: 0.9rem;
}

@media (max-width: 1020px) {
    .salidas09-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .salidas09-lote-row {
        grid-template-columns: 1fr;
    }

    .salidas09-line-row {
        grid-template-columns: 1fr;
    }

    .salidas09-line-side {
        justify-content: flex-start;
    }
}
