/* Reset basico y tipografia */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #1a1a1a;
}

/* ---------- LOGIN ---------- */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-titulo {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    color: #2c5f2d;
    margin-bottom: 4px;
}

.login-subtitulo {
    text-align: center;
    color: #888;
    margin-bottom: 32px;
    font-size: 15px;
}

/* ---------- FORMULARIOS ---------- */
.form-grupo {
    margin-bottom: 20px;
}

.form-grupo label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-grupo input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.form-grupo input:focus {
    outline: none;
    border-color: #2c5f2d;
}

/* ---------- BOTONES ---------- */
.btn-principal {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    color: white;
    background-color: #2c5f2d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-principal:hover {
    background-color: #234a24;
}

.btn-principal:disabled {
    background-color: #9bbf9c;
    cursor: not-allowed;
}

/* ---------- MENSAJES ---------- */
.mensaje-error {
    background-color: #fdecea;
    color: #c0392b;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

/* ---------- APP BOCA ---------- */
.barra-superior {
    background: #2c5f2d;
    color: white;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.barra-info {
    display: flex;
    flex-direction: column;
}

.barra-titulo {
    font-size: 20px;
    font-weight: 700;
}

.barra-boca {
    font-size: 14px;
    opacity: 0.85;
}

.barra-acciones {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-tab {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-tab.activo {
    background: white;
    color: #2c5f2d;
}

.btn-salir {
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    cursor: pointer;
}

.contenido {
    padding: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.placeholder-texto {
    text-align: center;
    color: #888;
    font-size: 18px;
    padding: 60px 20px;
}

/* ---------- PANTALLA VENTA ---------- */
.venta-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.catalogo {
    flex: 2;
}

.carrito {
    flex: 1;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-width: 300px;
}

.seccion-titulo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #333;
}

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}

.producto-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 16px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s;
}

.producto-card:hover:not(:disabled) {
    border-color: #2c5f2d;
    transform: translateY(-2px);
}

.producto-card.sin-stock {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f5f5f5;
}

.producto-nombre {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.producto-precio {
    font-size: 18px;
    font-weight: 700;
    color: #2c5f2d;
}

.producto-stock {
    font-size: 13px;
    color: #888;
}

.texto-info, .texto-info {
    color: #999;
    font-size: 15px;
}

/* Responsive: en pantallas angostas, apilar */
@media (max-width: 768px) {
    .venta-layout {
        flex-direction: column;
    }
    .carrito {
        width: 100%;
    }
}
/* ---------- CARRITO ---------- */
.carrito-item {
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
}

.item-cabecera {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.item-nombre {
    font-weight: 600;
    font-size: 15px;
}

.btn-quitar {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
}

.item-controles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.cantidad-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cant {
    width: 38px;
    height: 38px;
    font-size: 20px;
    font-weight: 700;
    background: #f0f2f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.btn-cant:hover {
    background: #e0e3e8;
}

.cantidad-valor {
    font-size: 18px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.precio-control {
    display: flex;
    align-items: center;
    gap: 2px;
}

.precio-signo {
    font-weight: 600;
    color: #555;
}

.precio-input {
    width: 80px;
    padding: 8px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: right;
}

.item-pie {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.aviso-precio {
    font-size: 12px;
    color: #e67e22;
    font-weight: 600;
}

.item-subtotal {
    font-size: 14px;
    color: #555;
    text-align: right;
}

.carrito-total {
    display: flex;
    justify-content: space-between;
    font-size: 22px;
    font-weight: 700;
    color: #2c5f2d;
    padding: 16px 4px;
    border-top: 2px solid #e8e8e8;
    margin-top: 8px;
}

.pago-seccion {
    margin: 12px 0;
}

.pago-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.pago-botones {
    display: flex;
    gap: 10px;
}

.btn-pago {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
}

.btn-pago.activo {
    border-color: #2c5f2d;
    background: #2c5f2d;
    color: white;
}

.btn-confirmar {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 700;
    color: white;
    background: #2c5f2d;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 8px;
}

.btn-confirmar:disabled {
    background: #9bbf9c;
    cursor: not-allowed;
}

.btn-cancelar {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    color: #888;
    background: none;
    border: none;
    cursor: pointer;
    margin-top: 8px;
}
/* ---------- CIERRE DE CAJA ---------- */
.cierre-card {
    background: white;
    border-radius: 12px;
    padding: 28px;
    max-width: 520px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.cierre-dato {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px;
    background: #f0f2f5;
    border-radius: 10px;
    margin-bottom: 10px;
}

.dato-label {
    color: #555;
    font-size: 15px;
}

.dato-valor {
    font-weight: 700;
    font-size: 17px;
    color: #2c5f2d;
}

.form-grupo textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-family: inherit;
    resize: vertical;
}

.form-grupo textarea:focus {
    outline: none;
    border-color: #2c5f2d;
}

.resumen-cierre {
    background: #f9f9f9;
    border-radius: 10px;
    padding: 16px;
}

.resumen-fila {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.resumen-sep {
    border: none;
    border-top: 1px solid #ddd;
    margin: 8px 0;
}

.dif-ok {
    color: #27ae60;
    font-weight: 700;
}

.dif-mal {
    color: #c0392b;
    font-weight: 700;
}

.resumen-obs {
    margin-top: 16px;
    padding: 12px;
    background: #fffbea;
    border-radius: 8px;
    font-size: 14px;
}

/* ---------- BUSCADOR ---------- */
.buscador {
    position: relative;
    margin-bottom: 16px;
}
.buscador-input {
    width: 100%;
    padding: 14px 44px 14px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
}
.buscador-input:focus {
    outline: none;
    border-color: #2c5f2d;
}
.buscador-limpiar {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: #e0e0e0;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 14px;
    cursor: pointer;
    color: #555;
}

/* 5 medios de pago en grilla */
.pago-botones-5 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.pago-botones-5 .btn-pago {
    padding: 12px 8px;
    font-size: 14px;
}

.cierre-subtitulo {
    font-size: 15px;
    font-weight: 700;
    color: #2c5f2d;
    margin: 20px 0 10px;
    padding-bottom: 6px;
    border-bottom: 2px solid #eee;
}
.electronico-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.electronico-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.electronico-nombre {
    font-weight: 600;
    font-size: 15px;
}
.electronico-esperado {
    font-size: 13px;
    color: #888;
}
.electronico-input {
    width: 120px;
    padding: 10px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    text-align: right;
}

.electronico-nota {
    font-size: 13px;
    color: #888;
    margin-bottom: 10px;
    font-style: italic;
}
.electronico-monto {
    font-weight: 700;
    color: #2c5f2d;
    font-size: 15px;
}

.combos-seccion {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 2px dashed #ddd;
}
.combos-titulo {
    font-size: 16px;
    font-weight: 700;
    color: #2c5f2d;
    margin-bottom: 12px;
}
.combo-card {
    border-color: #2c5f2d;
    background: #f7fdf7;
}

/* ---------- ANULAR VENTAS ---------- */
.ventas-lista { display: flex; flex-direction: column; gap: 10px; }
.venta-fila {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    padding: 14px 16px;
    gap: 12px;
}
.venta-anulada { opacity: 0.6; background: #f9f9f9; }
.venta-info { flex: 1; }
.venta-linea1 {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 4px;
}
.venta-items { font-weight: 600; font-size: 15px; }
.venta-total { font-weight: 700; color: #2c5f2d; white-space: nowrap; }
.venta-linea2 {
    display: flex;
    gap: 12px;
    align-items: center;
    font-size: 13px;
    color: #888;
    flex-wrap: wrap;
}
.venta-badge-anulada {
    color: #c0392b;
    font-weight: 700;
    font-size: 12px;
}
.btn-anular {
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
}
.btn-anular:hover { background: #c0392b; color: white; }

/* Modal */
.modal-fondo {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.modal-caja {
    background: white;
    border-radius: 16px;
    padding: 28px;
    max-width: 420px;
    width: 100%;
}
.modal-titulo { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.modal-detalle { font-size: 15px; color: #555; margin-bottom: 4px; }
.modal-total { font-size: 22px; font-weight: 700; color: #2c5f2d; margin-bottom: 20px; }
.modal-label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 14px; }
.modal-select {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    margin-bottom: 16px;
}
.modal-botones { display: flex; gap: 10px; }
.btn-cancelar-modal {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: #f0f2f5;
    color: #555;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.btn-confirmar-anular {
    flex: 1;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    background: #c0392b;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.btn-confirmar-anular:disabled { background: #d99; }

.combos-arriba {
    margin-top: 0;
    margin-bottom: 24px;
    padding: 0 0 24px 0;
    border-top: none;
    border-bottom: 2px dashed #ccc;
}
.combos-arriba .combos-titulo {
    margin-top: 0;
    margin-bottom: 12px;
}

/* ---------- CARRITO BARRA FIJA (tablet vertical) ---------- */
.venta-layout-vertical {
    display: block;
    padding-bottom: 80px; /* espacio para que la barra no tape el ultimo producto */
}
.carrito-barra {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 500;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}
.carrito-resumen {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    cursor: pointer;
    background: #2c5f2d;
    color: white;
    flex-shrink: 0;
}
.resumen-izq {
    display: flex;
    align-items: center;
    gap: 12px;
}
.resumen-flecha { font-size: 14px; }
.resumen-items { font-size: 16px; font-weight: 600; }
.resumen-total { font-size: 20px; font-weight: 700; }
.carrito-detalle {
    padding: 20px;
    overflow-y: auto;
}