:root{--black: #111827;--black-2: #1f2937;--red: #dc2626;--red-dark: #b91c1c;--red-soft: #fef2f2;--bg: #f8fafb;--surface: #ffffff;--text: #111827;--muted: #6b7280;--border: #e5e7eb;--green: #16a34a;--green-bg: #dcfce7;--yellow: #d97706;--yellow-bg: #fef3c7;--red-bg: #fee2e2;--blue-bg: #e0e7ff;--radius: 16px;--radius-sm: 10px;--shadow-soft: 0 2px 10px rgba(17, 24, 39, .06);--shadow-medium: 0 8px 24px rgba(17, 24, 39, .1);--shadow-lg: 0 25px 60px rgba(17, 24, 39, .2);--font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;--sidebar-width: 260px;--header-height: 70px;--grad-header: linear-gradient(135deg, #111827 0%, #dc2626 100%);--grad-sidebar: linear-gradient(180deg, #111827 0%, #1f2937 100%)}*{box-sizing:border-box;margin:0;padding:0}html,body,#root{height:100%}body{font-family:var(--font);background:var(--bg);color:var(--text);font-size:14px;line-height:1.6;-webkit-font-smoothing:antialiased}a{color:var(--red);text-decoration:none}a:hover{text-decoration:underline}h1,h2,h3,h4{font-weight:700;line-height:1.25;color:var(--text)}h1{font-size:1.6rem}h2{font-size:1.15rem}h3{font-size:1.05rem}.topbar{position:fixed;top:0;left:0;right:0;height:var(--header-height);background:var(--surface);border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 26px;z-index:1000;box-shadow:var(--shadow-soft)}.topbar-left{display:flex;align-items:center;gap:12px}.logo-icon{width:40px;height:40px;background:var(--grad-header);border-radius:10px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800;font-size:16px;letter-spacing:0}.logo-text{font-size:17px;font-weight:700;color:var(--text)}.topbar-right{display:flex;align-items:center;gap:14px}.user-avatar{width:36px;height:36px;background:var(--grad-header);border-radius:50%;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:600;font-size:13px;text-transform:uppercase}.user-info{display:flex;flex-direction:column;align-items:flex-start;line-height:1.2}.user-name{font-size:14px;font-weight:600;color:var(--text)}.user-role{font-size:12px;color:var(--muted)}.sidebar{position:fixed;top:var(--header-height);left:0;width:var(--sidebar-width);height:calc(100vh - var(--header-height));background:var(--grad-sidebar);overflow-y:auto;z-index:900;padding:20px 0;box-shadow:var(--shadow-soft)}.sidebar-menu{display:flex;flex-direction:column;gap:2px}.menu-section-title{font-size:11px;font-weight:600;color:#ffffff73;text-transform:uppercase;letter-spacing:.7px;padding:18px 22px 8px}.nav-link{display:flex;align-items:center;gap:12px;padding:12px 22px;color:#ffffffd1;text-decoration:none;font-size:14px;font-weight:500;border-left:3px solid transparent;transition:all .2s ease}.nav-link:hover{background:#ffffff0f;color:#fff;text-decoration:none}.nav-link.active{background:#ffffff1f;color:#fff;border-left-color:var(--red)}.nav-link .ic{width:22px;display:flex;justify-content:center;flex-shrink:0}.list-link{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:10px;color:var(--text);text-decoration:none;font-weight:500;transition:all .15s ease;margin-bottom:6px}.list-link:hover{background:var(--red-soft);text-decoration:none}.list-link .ic{color:var(--red);display:flex;flex-shrink:0}.app{min-height:100vh}.main{margin-left:var(--sidebar-width);padding:calc(var(--header-height) + 26px) 30px 90px;min-height:100vh}.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:22px;flex-wrap:wrap}.page-head h1{font-size:26px;font-weight:700}.page-head .sub{color:var(--muted);font-size:15px;margin-top:3px}.bottomnav{display:none;position:fixed;bottom:0;left:0;right:0;background:var(--surface);border-top:1px solid var(--border);z-index:1000;padding-bottom:env(safe-area-inset-bottom);box-shadow:0 -2px 10px #1118270f}.bottomnav .bn-inner{display:flex;overflow-x:auto}.bottomnav a{flex:1;min-width:58px;text-align:center;padding:8px 4px 6px;color:var(--muted);font-size:.66rem;font-weight:500;text-decoration:none;display:flex;flex-direction:column;gap:3px;align-items:center}.bottomnav a.active{color:var(--red);font-weight:700}.bottomnav a .ic{font-size:1.2rem;line-height:1}.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:24px}.card+.card{margin-top:18px}.card .card-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}.card .card-head h2{font-size:18px}.grid{display:grid;gap:16px}.grid.stats{grid-template-columns:repeat(auto-fit,minmax(240px,1fr));margin-bottom:24px}.grid.two{grid-template-columns:1fr 1fr}.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);box-shadow:var(--shadow-soft);padding:22px 24px;position:relative;overflow:hidden;transition:all .25s ease}.stat-card:before{content:"";position:absolute;top:0;left:0;width:100%;height:4px;background:var(--grad-header)}.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow-medium)}.stat-card .label{color:var(--muted);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.6px}.stat-card .value{font-size:30px;font-weight:800;color:var(--text);margin-top:6px;line-height:1.15}.stat-card .hint{font-size:12px;color:var(--muted);margin-top:4px}.btn{display:inline-flex;align-items:center;gap:8px;padding:11px 20px;border-radius:var(--radius-sm);border:1px solid transparent;cursor:pointer;font-size:14px;font-weight:600;font-family:inherit;transition:all .2s ease;text-decoration:none;white-space:nowrap;line-height:1}.btn:hover{text-decoration:none}.btn:disabled{opacity:.6;cursor:not-allowed}.btn-primary{background:var(--red);color:#fff;border:none}.btn-primary:hover{background:var(--red-dark);transform:translateY(-1px);box-shadow:0 6px 18px #dc262647}.btn-outline{background:var(--surface);border:1.5px solid var(--border);color:var(--text)}.btn-outline:hover{border-color:var(--red);color:var(--red)}.btn-danger{background:var(--red);color:#fff}.btn-danger:hover{background:var(--red-dark)}.btn-ghost{background:var(--red-soft);color:var(--red-dark);border:none;width:32px;height:32px;padding:0;justify-content:center;align-items:center;border-radius:8px}.btn-ghost:hover{background:var(--red);color:#fff}.btn-sm{padding:7px 12px;font-size:13px;border-radius:8px}.btn-ghost.btn-sm{width:34px;height:34px;padding:0}.table-actions .btn svg{flex-shrink:0}.table-actions .btn-ghost svg{width:18px;height:18px}.btn-wa{background:#16a34a;color:#fff;border:none}.btn-wa:hover{background:#15803d}.btn-block{width:100%;justify-content:center}.field{margin-bottom:15px}.field label{display:block;font-size:13px;font-weight:600;margin-bottom:7px;color:var(--text)}.field .req{color:var(--red)}.input,.select,.textarea{width:100%;padding:11px 14px;border:1.5px solid var(--border);border-radius:var(--radius-sm);font-size:14px;font-family:inherit;background:var(--surface);color:var(--text);transition:all .2s ease}.input:focus,.select:focus,.textarea:focus{outline:none;border-color:var(--red);box-shadow:0 0 0 3px #dc26261a}.textarea{resize:vertical;min-height:80px}.select-sm{width:auto;max-width:170px;padding:7px 10px;font-size:13px;border-radius:8px}.select.estado-select{width:auto;max-width:140px;padding:5px 10px;font-size:12px;font-weight:600;border-radius:999px;border-color:transparent;cursor:pointer}.select.estado-select:focus{border-color:transparent}.estado-cell{display:flex;flex-wrap:wrap;align-items:center;gap:6px}.intento-info{display:flex;flex-direction:column;align-items:flex-start;gap:3px;margin-top:6px}.intento-obs{font-size:11.5px;line-height:1.3;color:var(--red-dark);max-width:210px}.repro-aviso{display:flex;align-items:flex-start;gap:10px;background:var(--red-soft);border:1px solid #fecaca;border-radius:var(--radius-sm);padding:12px 14px;margin-bottom:15px;color:var(--red-dark)}.repro-aviso svg{flex-shrink:0;margin-top:2px}.repro-historial{background:#fafafa;border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 14px;margin-bottom:15px;max-height:190px;overflow-y:auto}.repro-historial-title{font-size:12px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;margin-bottom:8px}.repro-historial-item{border-left:3px solid var(--red);padding:4px 0 4px 10px;margin-bottom:8px;font-size:13px;line-height:1.35}.repro-historial-item:last-child{margin-bottom:0}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.form-row.three{grid-template-columns:1fr 1fr 1fr}.table-wrap{overflow-x:auto}table.table{width:100%;border-collapse:collapse;font-size:14px}table.table thead{background:var(--bg)}table.table th{text-align:left;padding:13px 15px;font-size:12px;font-weight:600;color:var(--muted);text-transform:uppercase;letter-spacing:.5px;border-bottom:2px solid var(--border);white-space:nowrap}table.table td{padding:13px 15px;border-bottom:1px solid var(--border);vertical-align:middle;color:var(--text)}table.table tbody tr{transition:background .15s ease}table.table tbody tr:hover{background:#fafbfc}.table-actions{display:flex;gap:6px;justify-content:flex-end}.btn-ico{width:32px;height:32px;border:none;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:all .2s ease;background:var(--red-soft);color:var(--red-dark)}.btn-ico:hover{background:var(--red);color:#fff}.btn-ico.neutral{background:var(--bg);color:var(--muted)}.btn-ico.neutral:hover{background:#e5e7eb;color:var(--text)}.badge{display:inline-flex;align-items:center;gap:5px;padding:4px 11px;border-radius:999px;font-size:12px;font-weight:600}.badge-green{background:var(--green-bg);color:#15803d}.badge-yellow{background:var(--yellow-bg);color:#b45309}.badge-red{background:var(--red-bg);color:var(--red-dark)}.badge-blue{background:#f1f5f9;color:#334155}.badge-gray{background:#f1f2f4;color:var(--muted)}.semaforo{display:inline-flex;align-items:center;gap:7px;font-weight:600;font-size:13px}.semaforo .dot{width:11px;height:11px;border-radius:50%;flex-shrink:0;box-shadow:0 0 0 2px #fff,0 0 0 3px #11182714}.dot-cerrado{background:#cbd5e1}.dot-green{background:#4ade80}.dot-yellow{background:#f59e0b}.dot-red{background:var(--red)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#11182780;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:2000;padding:20px}.modal{background:var(--surface);border-radius:16px;width:100%;max-width:620px;max-height:92vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:var(--shadow-lg);animation:modalIn .2s ease}@keyframes modalIn{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:translateY(0)}}.modal .modal-head{flex-shrink:0;display:flex;align-items:center;justify-content:space-between;padding:20px 24px;background:var(--grad-header);color:#fff}.modal .modal-head h2{color:#fff;font-size:18px;font-weight:700}.modal-close{width:34px;height:34px;border-radius:50%;border:none;background:#ffffff29;color:#fff;font-size:1.3rem;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:all .2s ease}.modal-close:hover{background:#ffffff52}.modal-body-scroll{padding:24px;overflow-y:auto;flex:1 1 auto;min-height:0}.alert{padding:13px 16px;border-radius:var(--radius-sm);font-size:13.5px;margin-bottom:16px;font-weight:500}.alert-error{background:var(--red-bg);color:var(--red-dark);border-left:4px solid var(--red)}.alert-success{background:var(--green-bg);color:#15803d;border-left:4px solid var(--green)}.empty{text-align:center;color:var(--muted);padding:50px 10px}.empty .big{font-size:2.2rem;margin-bottom:8px;opacity:.4}.row{display:flex;align-items:center;gap:10px}.row.between{justify-content:space-between}.wrap{flex-wrap:wrap}.grow{flex:1}.muted{color:var(--muted)}.small{font-size:.8rem}.mt{margin-top:14px}.mb{margin-bottom:14px}.text-right{text-align:right}.thumb{width:42px;height:42px;border-radius:9px;object-fit:cover;background:#f1f2f4}.items-list{display:flex;flex-direction:column;gap:8px;margin-bottom:10px}.item-row{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:8px;align-items:end}.item-row.compra{grid-template-columns:2fr 1fr 1fr auto}.total-line{display:flex;justify-content:space-between;font-weight:700;font-size:1rem;padding:12px 0;border-top:2px solid var(--border);margin-top:10px}.modal-body-scroll.compra-body{display:flex;flex-direction:column;overflow-y:auto;padding:0}.compra-top{flex-shrink:0;padding:16px 24px 12px;border-bottom:1px solid var(--border)}.compra-items{flex:1 1 auto;min-height:64px;overflow-y:auto;padding:12px 24px}.compra-foot{flex-shrink:0;padding:4px 24px 18px;border-top:1px solid var(--border);background:var(--surface)}.compra-foot .field{margin-bottom:6px}.compra-foot .textarea{min-height:52px}.compra-foot .total-line{margin-top:4px;padding:8px 0}.compra-item-row{display:grid;grid-template-columns:1fr 92px 108px auto;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--border);border-radius:var(--radius-sm);background:#fbfcfd}.compra-item-row.with-cost{grid-template-columns:1fr 78px 96px 104px auto}.compra-item-row+.compra-item-row{margin-top:8px}.compra-item-name{font-size:14px;font-weight:600;min-width:0;overflow-wrap:anywhere}.compra-item-name .small{display:block;font-weight:400}.compra-item-amount{text-align:right;font-weight:700;font-size:14px;white-space:nowrap}.wa-preview{background:#dcf8c6;border-radius:12px;padding:13px 15px;font-size:13.5px;white-space:pre-wrap;color:#1f2937}.autocomplete-wrap{position:relative}.autocomplete-list{position:absolute;top:100%;left:0;right:0;background:var(--surface);border:1px solid var(--border);border-radius:10px;box-shadow:var(--shadow-medium);max-height:240px;overflow-y:auto;z-index:3000;margin-top:4px}.autocomplete-item{display:flex;flex-direction:column;align-items:flex-start;gap:2px;width:100%;padding:10px 12px;border:none;background:none;text-align:left;cursor:pointer;font-size:14px;font-family:inherit;border-bottom:1px solid var(--border)}.autocomplete-item:last-child{border-bottom:none}.autocomplete-item:hover{background:var(--red-soft)}.login-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:linear-gradient(135deg,var(--bg) 0%,#ffffff 100%);position:relative}.login-wrap:before{content:"";position:fixed;top:0;right:0;bottom:0;left:0;background-image:radial-gradient(circle at 25% 25%,#111827 1.5px,transparent 1.5px),radial-gradient(circle at 75% 75%,#dc2626 1px,transparent 1px);background-size:56px 56px;background-position:0 0,28px 28px;opacity:.04;pointer-events:none}.login-card{width:100%;max-width:420px;background:#fff;border-radius:20px;overflow:hidden;border:1px solid var(--border);box-shadow:var(--shadow-medium);animation:loginIn .5s ease-out}@keyframes loginIn{0%{opacity:0;transform:translateY(24px)}to{opacity:1;transform:translateY(0)}}.login-card .login-head{background:var(--grad-header);color:#fff;padding:38px 30px;text-align:center}.login-card .login-head .logo-badge{width:60px;height:60px;background:#ffffff2e;border-radius:15px;display:flex;align-items:center;justify-content:center;margin:0 auto 16px;font-size:26px;font-weight:800}.login-card .login-head h1{color:#fff;font-size:22px;font-weight:700}.login-card .login-head p{color:#ffffffd9;font-size:13.5px;margin-top:4px}.login-card .login-body{padding:32px 30px 28px}@media (max-width: 900px){.sidebar,.topbar .logo-text,.topbar .user-info{display:none}.main{margin-left:0;padding:calc(var(--header-height) + 18px) 16px 90px}.bottomnav{display:block}.grid.two,.form-row,.form-row.three{grid-template-columns:1fr}.item-row,.item-row.compra{grid-template-columns:1fr 1fr}.item-row .item-name{grid-column:1 / -1}.compra-top{padding:12px 16px 10px}.compra-top .field{margin-bottom:8px}.compra-top .field>.small.muted{display:none}.compra-items{padding:10px 16px}.compra-foot{padding:0 16px 12px}.compra-foot .field{margin-bottom:4px}.compra-foot .textarea{min-height:44px}.compra-foot .total-line{padding:6px 0;margin-top:2px}.compra-item-row,.compra-item-row.with-cost{grid-template-columns:1fr 1fr}.compra-item-name{grid-column:1 / -1}.compra-item-amount{text-align:left}.modal-backdrop{align-items:flex-end;padding:0}.modal{border-radius:16px 16px 0 0;max-width:100%;max-height:92vh}.modal:has(.compra-body){max-height:100dvh}}
