/* --- CHIMERA TACTICAL INTERFACE v7.0 --- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700;900&family=Roboto+Mono:wght@500;700&display=swap');

:root {
    --bg: #080808;
    --card: #121212;
    --neon: #00ce7c;
    --glow: rgba(0, 206, 124, 0.2);
    --danger: #ff4d4d;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; }

body { background-color: var(--bg); color: #fff; padding: 20px; padding-bottom: 480px; }

/* PANEL DEUDA (Separado) */
#debtPanel {
    display: none; 
    background: rgba(255, 77, 77, 0.1); 
    border: 1px solid #ff4d4d; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    align-items: center; 
    justify-content: space-between;
}

/* STOCK VISUALS */
.item-row.out-of-stock { opacity: 0.5 !important; background-color: #1a1a1a !important; border: 1px dashed #444 !important; pointer-events: none; }
.item-row.out-of-stock .item-price { text-decoration: line-through; color: #666 !important; }
.stock-badge { background: var(--danger); color: #fff; font-size: 9px; padding: 2px 6px; border-radius: 3px; font-weight: 800; margin-left: 8px; vertical-align: middle; }
.discount-badge { color: var(--neon); font-size: 10px; border: 1px solid var(--neon); padding: 1px 4px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }

/* AUDITORÍA ESTILOS */
.audit-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #333; }
.audit-info { flex: 2; }
.audit-prod-name { font-size: 13px; display: block; color: #fff; font-weight: bold; text-transform: uppercase; }
.audit-prod-price { font-size: 11px; color: var(--neon); font-family: 'Roboto Mono'; display: block; margin-top: 4px; font-weight: bold; }
.audit-qty-box { flex: 0.6; text-align: center; background: #1a1a1a; padding: 5px; border-radius: 4px; margin-right: 5px; }
.audit-qty-label { display: block; font-size: 7px; color: #888; letter-spacing: 1px; }
.audit-qty-val { color: #fff; font-weight: bold; font-family: 'Roboto Mono'; font-size: 14px; }
.audit-input-box { flex: 0.8; text-align: right; }
.audit-input-calc { width: 60px; background: #000; border: 1px solid var(--neon); color: #fff; text-align: center; padding: 8px; font-family: 'Roboto Mono'; font-size: 16px; border-radius: 4px; }

/* Botón Cobrar en Auditoría */
#auditPayBtn { background: var(--neon); color: #000; border: none; padding: 12px 20px; font-weight: 900; cursor: pointer; border-radius: 4px; font-size: 12px; text-transform: uppercase; width: 100%; margin-top: 10px; box-shadow: 0 0 15px var(--glow); }
#auditPayBtn:disabled { background: #555; cursor: not-allowed; box-shadow: none; }

/* Botón Buscar Audit */
#searchOrderBtn { background: var(--neon); color: #000; border: none; padding: 0 20px; font-weight: bold; cursor: pointer; }

/* RESTO DEL SITIO */
.audit-launcher { position: absolute; top: 15px; right: 15px; background: #000; border: 1px solid #333; color: #666; font-family: 'Roboto Mono', monospace; font-size: 10px; padding: 8px 12px; border-radius: 4px; cursor: pointer; z-index: 1001; }
.audit-launcher:hover { border-color: var(--neon); color: var(--neon); box-shadow: 0 0 10px var(--glow); }
.header { text-align: center; margin: 30px 0; }
h1 { font-weight: 900; font-size: clamp(22px, 6vw, 32px); letter-spacing: 3px; text-shadow: 0 0 15px var(--neon); text-transform: uppercase; }
.subtitle { color: var(--neon); font-size: 10px; letter-spacing: 4px; font-weight: bold; text-transform: uppercase; }
.items-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 15px; max-width: 1200px; margin: 0 auto; }
.item-row { background: var(--card); border: 1px solid #222; padding: 15px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; border-left: 4px solid #333; transition: 0.2s; }
.item-row.selected { border-color: var(--neon); border-left-color: var(--neon); background: linear-gradient(90deg, rgba(0,206,124,0.05) 0%, transparent 100%); }
.item-name { font-weight: 700; font-size: 13px; text-transform: uppercase; color: #eee; }
.item-price { color: var(--neon); font-family: 'Roboto Mono', monospace; font-size: 13px; margin-top: 4px; display: block; font-weight: bold; }
.qty-controls { display: flex; align-items: center; background: #000; border: 1px solid #333; border-radius: 4px; }
.qty-btn { width: 38px; height: 38px; border: none; background: #1a1a1a; color: #fff; font-size: 20px; cursor: pointer; }
.qty-input { width: 50px; text-align: center; background: transparent; border: none; color: #fff; font-weight: bold; font-family: 'Roboto Mono'; font-size: 16px; -moz-appearance: textfield; }
.form-section { position: fixed; bottom: 0; left: 0; width: 100%; background: rgba(10, 10, 10, 0.98); backdrop-filter: blur(15px); border-top: 2px solid var(--neon); padding: 20px; z-index: 1000; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; max-width: 1200px; margin: 0 auto; }
@media (max-width: 900px) { .form-grid { grid-template-columns: 1fr; } .form-section { padding: 15px; } }
label { font-size: 9px; color: var(--neon); letter-spacing: 2px; margin-bottom: 5px; display: block; font-weight: bold; }
input, textarea { width: 100%; padding: 10px; background: #000; border: 1px solid #333; color: #fff; border-radius: 4px; outline: none; }
.sig-wrapper { background: #fff; height: 140px; border-radius: 4px; margin-bottom: 10px; position: relative; touch-action: none; }
canvas { width: 100%; height: 100%; display: block; }
#clearPad { background: transparent; border: 1px solid var(--danger); color: var(--danger); padding: 8px; font-size: 10px; border-radius: 4px; width: 100%; cursor: pointer; font-weight: 800; text-transform: uppercase; }
#sendBtn { grid-column: span 2; background: var(--neon); color: #000; font-weight: 900; padding: 16px; border: none; border-radius: 4px; cursor: pointer; margin-top: 15px; text-transform: uppercase; font-size: 14px; box-shadow: 0 0 15px var(--glow); }
@media (max-width: 900px) { #sendBtn { grid-column: span 1; } }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; align-items: center; justify-content: center; }
.modal-box { background: #111; width: 90%; max-width: 500px; padding: 25px; border: 1px solid var(--neon); }
.close { color: var(--danger); float: right; font-size: 30px; cursor: pointer; line-height: 0.5; }
.toast { position: fixed; bottom: 130px; left: 50%; transform: translateX(-50%); background: #111; border: 1px solid var(--neon); padding: 12px 24px; color: #fff; border-radius: 4px; z-index: 3000; font-family: 'Roboto Mono'; font-size: 12px; }
