* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f4f6f4;
    color: #1f2a1f;
}

.pantalla {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pantalla-inicio {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    max-width: 420px;
    margin: 0 auto;
}

.opcion-inicio {
    display: block;
    background: #fff;
    border-radius: 10px;
    padding: 16px 18px;
    border: 2px solid transparent;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    text-decoration: none;
    color: inherit;
}

.opcion-inicio-principal {
    border-color: #2f7d32;
    box-shadow: 0 2px 8px rgba(47, 125, 50, 0.16);
}

.opcion-inicio-titulo {
    display: block;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1f2a1f;
}

.opcion-inicio-detalle {
    display: block;
    font-size: 0.85rem;
    color: #8a9a8a;
    margin-top: 4px;
}

.opcion-inicio-deshabilitada {
    opacity: 0.6;
}

.opcion-inicio-lista {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opcion-inicio-sublista {
    display: block;
    padding: 8px 12px;
    background: #f4f6f4;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #2f7d32;
    text-decoration: none;
    font-weight: 600;
}

.tarjeta {
    width: 100%;
    max-width: 360px;
    background: #fff;
    border-radius: 12px;
    padding: 32px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.logo {
    display: block;
    width: 100%;
    max-width: 220px;
    margin: 0 auto 24px;
}

.logo-chica {
    display: block;
    height: 32px;
    width: auto;
}

label {
    display: block;
    font-size: 0.9rem;
    margin: 16px 0 6px;
    font-weight: 600;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
    font-size: 1rem;
}

button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: #2f7d32;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: #276b2a;
}

.boton-cafe {
    background: #6f4e37;
}

.boton-cafe:hover {
    background: #5a3e2c;
}

.error {
    margin-top: 16px;
    padding: 10px 14px;
    background: #fdecea;
    color: #b3261e;
    border-radius: 8px;
    font-size: 0.9rem;
}

.encabezado {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.encabezado-marca {
    display: flex;
    align-items: center;
    gap: 12px;
}

.encabezado a {
    color: #b3261e;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.contenido {
    padding: 20px;
}

.titulo-pantalla {
    margin: 0 0 16px;
}

.resumen-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.resumen-item {
    background: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.resumen-item-nombre {
    font-weight: 600;
}

.resumen-item-cantidad {
    font-size: 0.9rem;
    color: #556b55;
}

.resumen-item-conversion {
    margin-left: 8px;
    color: #2f7d32;
}

.resumen-item-comentario {
    margin-top: 4px;
    font-size: 0.85rem;
    font-style: italic;
    color: #556b55;
}

.pedido-historial {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.boton-repetir {
    width: auto;
    margin: 0;
    padding: 8px 16px;
    font-size: 0.85rem;
}

input[type="date"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
    font-size: 1rem;
}

.confirmacion-icono {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.confirmacion-titulo {
    text-align: center;
    margin: 0 0 20px;
}

.confirmacion-dato {
    margin: 0 0 8px;
}

.boton-enlace {
    display: block;
    text-align: center;
    margin-top: 16px;
    padding: 14px;
    border-radius: 8px;
    background: #2f7d32;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
}

.boton-enlace-secundario {
    background: #fff;
    color: #2f7d32;
    border: 1px solid #2f7d32;
}

.barra-busqueda {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 20px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
}

.barra-busqueda input[type="text"] {
    border: none;
    padding: 0;
}

.enlace-buscador-completo {
    display: block;
    margin: -8px 20px 12px;
    font-size: 0.82rem;
    color: #2f7d32;
    text-decoration: none;
    font-weight: 600;
}

.ayuda-buscador {
    padding: 0 14px;
    font-size: 0.85rem;
    color: #8a9a8a;
}

@keyframes destacarAviso {
    0% { transform: translateY(-4px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.aviso-exito {
    margin: 0 14px 12px;
    padding: 10px 14px;
    background: #e5f0e6;
    color: #2f7d32;
    border-radius: 8px;
    font-size: 0.9rem;
    animation: destacarAviso 0.35s ease-out;
}

.producto-busqueda {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
}

.ya-en-catalogo {
    flex: 0 0 auto;
    font-size: 0.8rem;
    font-weight: 600;
    color: #2f7d32;
    white-space: nowrap;
}

.boton-agregar-lista {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
}

.barra-busqueda input[type="text"]:focus {
    outline: none;
}

.icono-lupa {
    font-size: 1rem;
}

.chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 20px 12px;
}

.chip {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid #ccd3cc;
    background: #fff;
    color: #1f2a1f;
    font-size: 0.85rem;
    font-weight: 600;
}

.chip.activo {
    background: #2f7d32;
    border-color: #2f7d32;
    color: #fff;
}

.productos {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 14px 100px;
}

.producto {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    border-left: 3px solid transparent;
}

.producto.tiene-cantidad {
    border-left-color: #2f7d32;
}

.producto-fila {
    width: 100%;
    margin: 0;
    padding: 10px 14px;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    text-align: left;
    font-weight: 400;
    font-size: 1rem;
}

.producto-fila:hover {
    background: #f9faf9;
}

.producto-info {
    min-width: 0;
}

.producto-nombre {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
}

.producto-badge {
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #e5f0e6;
    color: #2f7d32;
    font-size: 0.72rem;
    font-weight: 700;
}

.producto-presentacion {
    font-size: 0.78rem;
    color: #8a9a8a;
    margin-top: 1px;
}

.producto-flecha {
    flex: 0 0 auto;
    color: #8a9a8a;
    font-size: 1.2rem;
    transition: transform 0.15s ease;
}

.producto-flecha.abierta {
    transform: rotate(90deg);
}

.producto-detalle {
    padding: 0 14px 12px;
    border-top: 1px solid #eef1ee;
    padding-top: 10px;
}

.producto-controles {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.pildoras-unidad {
    display: flex;
    gap: 4px;
}

.pildora-unidad,
.pildora-comentario {
    width: auto;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #ccd3cc;
    background: #f4f6f4;
    color: #556b55;
    font-size: 0.75rem;
    font-weight: 600;
}

.pildora-unidad.activa {
    background: #2f7d32;
    border-color: #2f7d32;
    color: #fff;
}

.producto-unidad-fija {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4f6f4;
    color: #556b55;
}

.producto-conversion {
    min-height: 1em;
    font-size: 0.75rem;
    color: #2f7d32;
    margin-bottom: 4px;
}

.producto-comentario-caja {
    margin-bottom: 6px;
}

.producto-comentario-caja input {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
    font-size: 0.85rem;
}

.producto-stepper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stepper-boton {
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #ccd3cc;
    background: #f4f6f4;
    color: #1f2a1f;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.producto-stepper input.stepper-valor {
    width: 64px;
    min-width: 64px;
    flex: 0 0 auto;
    text-align: center;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 6px 4px;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
}

.separador-letras {
    padding: 6px 14px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #a15c00;
    background: #fdf1de;
}

.ventana-horaria {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

.pie-fijo {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 20px;
    background: #fff;
    box-shadow: 0 -1px 6px rgba(0, 0, 0, 0.1);
}

.pie-fijo span {
    font-size: 0.9rem;
    font-weight: 600;
}

.pie-fijo button {
    width: auto;
    margin-top: 0;
    padding: 12px 24px;
}

.pie-fijo button:disabled {
    background: #b6c4b6;
    cursor: not-allowed;
}

.admin-nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #eef1ee;
}

.admin-nav a {
    color: #2f7d32;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}

.admin-nav a.activo {
    color: #1f2a1f;
    text-decoration: underline;
}

.admin-buscador input[type="text"] {
    max-width: 320px;
}

.admin-tabla-wrap {
    padding: 0 20px 40px;
    overflow-x: auto;
}

.admin-tabla {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
}

.admin-tabla th,
.admin-tabla td {
    padding: 10px 12px;
    text-align: left;
    font-size: 0.85rem;
    border-bottom: 1px solid #eef1ee;
    white-space: nowrap;
}

.admin-tabla th {
    background: #f4f6f4;
    font-weight: 700;
    color: #556b55;
}

.admin-badge-activo {
    color: #2f7d32;
    font-weight: 700;
}

.admin-badge-inactivo {
    color: #b3261e;
    font-weight: 700;
}

.admin-form-inline {
    display: flex;
    gap: 6px;
    align-items: center;
    margin: 0;
}

.admin-form-inline input[type="text"],
.admin-form-inline input[type="password"] {
    width: auto;
    padding: 6px 8px;
    font-size: 0.8rem;
    margin: 0;
}

.admin-tabla button,
.admin-form-inline button {
    width: auto;
    margin: 0;
    padding: 6px 10px;
    font-size: 0.8rem;
}

.admin-boton-peligro {
    background: #b3261e;
}

.admin-boton-peligro:hover {
    background: #8f1e18;
}

.admin-mensaje {
    margin: 12px 20px 0;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
}

.admin-mensaje-exito {
    background: #e5f0e6;
    color: #2f7d32;
    animation: destacarAviso 0.35s ease-out;
}

.admin-mensaje-error {
    background: #fdecea;
    color: #b3261e;
}

.admin-tarjeta-carga {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin: 16px 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    max-width: 520px;
}

.admin-tarjeta-carga h3 {
    margin-top: 0;
}

.admin-tarjeta-carga p {
    font-size: 0.85rem;
    color: #556b55;
}

.admin-tarjeta-carga code {
    background: #f4f6f4;
    padding: 2px 6px;
    border-radius: 4px;
}

.admin-resumen-carga {
    margin: 16px 20px 40px;
    padding: 14px 16px;
    background: #fff;
    border-radius: 10px;
    font-size: 0.9rem;
}

.admin-resumen-carga ul {
    margin: 8px 0 0;
    padding-left: 20px;
    font-size: 0.82rem;
    color: #8a9a8a;
}

.admin-buscador {
    margin: 16px 20px 0;
}

.admin-filtro-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
}

.admin-filtro-form label {
    margin: 0 0 4px;
    font-size: 0.8rem;
}

.admin-filtro-form input,
.admin-filtro-form select {
    width: auto;
    padding: 8px 10px;
    border: 1px solid #ccd3cc;
    border-radius: 8px;
    font-size: 0.85rem;
}

.admin-filtro-form button {
    width: auto;
    margin: 0;
    padding: 10px 18px;
}

.pedido-activo-fila {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    background: #f4f6f4;
    border-radius: 8px;
    font-size: 0.9rem;
}

.pedido-activo-info {
    color: #2f7d32;
    font-weight: 600;
}

.pedido-activo-acciones {
    display: flex;
    gap: 6px;
    flex: 0 0 auto;
}

.pedido-activo-acciones form {
    margin: 0;
}

.boton-chico {
    display: inline-block;
    width: auto;
    margin: 0;
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #2f7d32;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.boton-chico-peligro {
    background: #b3261e;
}

.resumen-despacho {
    padding: 0 14px 40px;
    max-width: 480px;
    margin: 0 auto;
}

.resumen-despacho-categoria {
    margin: 18px 0 8px;
    padding: 6px 4px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #2f7d32;
    border-bottom: 2px solid #2f7d32;
}

.resumen-despacho-producto {
    border-bottom: 1px solid #eef1ee;
}

.resumen-despacho-producto.par {
    background: #fdf6ec;
}

.resumen-despacho-fila {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0;
    padding: 1px 4px;
    background: none;
    border: none;
    border-radius: 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
    line-height: 1.1;
    min-height: 0;
}

.resumen-despacho-flecha {
    display: inline-block;
    margin-left: 6px;
    color: #8a9a8a;
    transition: transform 0.15s ease;
}

.resumen-despacho-flecha.abierta {
    transform: rotate(90deg);
}

.resumen-despacho-detalle {
    padding: 2px 4px 12px;
}

.resumen-despacho-cliente {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    padding: 6px 10px;
    margin: 0 0 4px;
    background: #f4f6f4;
    border-radius: 7px;
    font-size: 0.82rem;
}

.resumen-despacho-cliente-nombre {
    font-weight: 700;
    color: #b3261e;
    flex: 1 1 auto;
    min-width: 0;
}

.resumen-despacho-cliente-cantidad {
    font-weight: 700;
    color: #b3261e;
    white-space: nowrap;
}

.resumen-despacho-cliente-nota {
    font-weight: 400;
    color: #8a9a8a;
}

.resumen-despacho-cliente-comentario {
    flex-basis: 100%;
    color: #6b5d4f;
    font-style: italic;
    font-size: 0.78rem;
}

.resumen-despacho-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.resumen-despacho-nombre {
    font-size: 0.82rem;
    font-weight: 600;
}

.resumen-despacho-total {
    flex: 0 0 auto;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2f7d32;
    white-space: nowrap;
}
