/* frontend/css/costeo.css -- Admin -> Costeo (costo de produccion, food cost, historial, multiplicadores). */
.cos-root { position: relative; }
.cos-head-note { color: var(--text-muted); font-size: .85rem; }
.cos-tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 2px solid var(--border-color); margin: 4px 0 18px; }
.cos-tab { border: 0; background: transparent; padding: 10px 14px; font-weight: 700; color: var(--text-secondary); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; font-size: .92rem; }
.cos-tab:hover { color: var(--text-primary); }
.cos-tab.on { color: var(--text-primary); border-bottom-color: #F2B230; }
.cos-loading, .cos-empty { padding: 26px; text-align: center; color: var(--text-muted); }
.cos-err { padding: 18px; color: #E14448; background: #E144481a; border-radius: var(--radius-md); }
.cos-muted { color: var(--text-muted); font-size: .8rem; font-weight: 500; }
.cos-up { color: #E14448; font-weight: 700; } .cos-down { color: #257C4D; font-weight: 700; }
.cos-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 16px; }
.cos-kpis-s { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cos-kpi { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.cos-kpi-l { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; color: var(--text-secondary); }
.cos-kpi-v { font-size: 1.7rem; font-weight: 800; line-height: 1.2; margin-top: 4px; }
.cos-kpis-s .cos-kpi-v { font-size: 1.3rem; }
.cos-kpi-d { font-size: .95rem; color: var(--text-muted); font-weight: 600; }
.cos-kpi-s { font-size: .78rem; color: var(--text-muted); margin-top: 4px; }
.cos-kpi-s input { width: 56px; padding: 2px 6px; border: 1px solid var(--border-color); border-radius: 6px; }
.cos-note { background: var(--bg-main); border: 1px solid var(--border-color); border-left: 4px solid #F2B230; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 14px; font-size: .88rem; line-height: 1.55; color: var(--text-secondary); }
.cos-note .cos-inline { display: inline-flex; gap: 6px; align-items: center; margin-left: 10px; }
.cos-note input { width: 60px; padding: 3px 6px; border: 1px solid var(--border-color); border-radius: 6px; }
.cos-refs { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 8px; }
.cos-link { border: 0; background: none; color: var(--primary-hover, #257C4D); font-weight: 700; cursor: pointer; text-decoration: underline; padding: 0; }
.cos-card { background: var(--surface); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.cos-card-h { font-weight: 800; margin-bottom: 10px; }
.cos-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1150px) { .cos-grid2 { grid-template-columns: minmax(0, 1fr); } }
.cos-chart { width: 100%; height: 360px; }
.cos-chart-s { height: 280px; }
.cos-filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cos-filtros select, .cos-filtros input, .cos-sim-form select, .cos-sim-form input { padding: 9px 12px; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--surface); font-size: .9rem; }
.cos-filtros input[type=search] { min-width: 220px; }
.cos-btn { padding: 7px 12px; border: 1px solid var(--border-color); background: var(--surface); border-radius: var(--radius-sm); font-weight: 700; cursor: pointer; font-size: .82rem; color: var(--text-primary); }
.cos-btn:hover { border-color: #F2B230; }
.cos-btn.primary { background: #257C4D; color: #DDE2D2; border-color: #257C4D; }
.cos-seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.cos-seg button { border: 0; background: var(--surface); padding: 8px 16px; font-weight: 700; cursor: pointer; }
.cos-seg button.on { background: #257C4D; color: #DDE2D2; }
.cos-tablewrap { overflow-x: auto; padding: 0; }
.cos-tablewrap .cos-card-h { padding: 12px 16px 0; }
.cos-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.cos-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); padding: 10px 12px; background: var(--bg-main); border-bottom: 1px solid var(--border-color); white-space: nowrap; }
.cos-table td { padding: 9px 12px; border-bottom: 1px solid var(--border-color); vertical-align: middle; }
.cos-table tbody tr:hover { background: rgba(242,178,48, .06); }
.cos-table .r { text-align: right; } .cos-table .c { text-align: center; }
.cos-table a, .cos-list a, .cos-kpi-s a { color: var(--text-primary); cursor: pointer; text-decoration: none; border-bottom: 1px dotted #F2B230; }
.cos-table a:hover { color: #257C4D; }
.cos-grp { background: #F2B23014; font-size: .78rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #257C4D; }
.cos-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.cos-tag { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .68rem; font-weight: 800; background: #F7D18322; color: #1D1D1B; margin-left: 4px; }
.cos-list { margin: 0; padding-left: 18px; line-height: 1.9; }
.cos-bar { height: 8px; border-radius: 999px; background: #0000000d; overflow: hidden; }
.cos-bar i { display: block; height: 100%; background: #F2B230; border-radius: 999px; }
.cos-bar.alt i { background: #257C4D; }
/* tabla de multiplicadores */
.cos-tprecios td.cos-mult { text-align: center; min-width: 96px; background: var(--surface); }
.cos-mult.actual { background: #F2B23022 !important; outline: 2px solid #F2B230; outline-offset: -2px; }
.cos-mult-p { font-weight: 800; font-size: 1rem; }
.cos-mult-fc { font-size: .74rem; font-weight: 800; }
.cos-mult-d { font-size: .7rem; font-weight: 600; }
.cos-usar { margin-top: 4px; border: 1px solid #257C4D; background: #257C4D; color: #DDE2D2; border-radius: 999px; padding: 2px 12px; font-size: .72rem; font-weight: 800; cursor: pointer; }
.cos-usar:hover { background: #F2B230; border-color: #1D1D1B; color: #1D1D1B; }
/* simulador */
.cos-sim-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cos-sim-form select#simIns { min-width: 280px; }
.cos-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.cos-chip { background: var(--bg-main); border: 1px solid var(--border-color); border-radius: 999px; padding: 5px 6px 5px 12px; font-size: .82rem; }
.cos-chip button { border: 0; background: #E144481f; color: #E14448; border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-weight: 800; margin-left: 4px; }
/* panel lateral */
.cos-panel-bg { position: fixed; inset: 0; background: rgba(29,29,27, .45); opacity: 0; pointer-events: none; transition: opacity .18s; z-index: 4000; }
.cos-panel-bg.open { opacity: 1; pointer-events: auto; }
.cos-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(980px, 100vw); background: var(--bg-main); z-index: 4001; transform: translateX(102%); transition: transform .2s; border-left: 3px solid #1D1D1B; display: flex; flex-direction: column; }
.cos-panel.open { transform: none; }
.cos-panel-h { display: flex; align-items: center; gap: 12px; padding: 14px 18px; background: #257C4D; color: #DDE2D2; border-bottom: 4px solid #F2B230; }
.cos-panel-h .cos-btn { background: transparent; color: #DDE2D2; border-color: rgba(221,226,210,.5); }
.cos-panel-h .cos-muted { color: #DDE2D2; }
.cos-panel-t { flex: 1; min-width: 0; }
.cos-panel-tt { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.cos-x { border: 0; background: #E14448; color: #fff; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.cos-panel-b { flex: 1; overflow-y: auto; padding: 18px; }

/* Clasificacion contable (K3a, cap. 26 §26.15): solo paleta */
.cl-chip { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; border: 2px solid var(--marca-negro); }
.cl-inv { background: var(--marca-crema); color: var(--marca-negro); }
.cl-gas { background: var(--marca-dorado); color: var(--marca-negro); }
.cl-revisar td { background: rgba(242, 178, 48, 0.12); }
.cl-sel { max-width: 240px; font-size: .82rem; }

/* Conteo de inventario (K3b, cap. 26 §26.16): pasos del flujo y filas */
.ct-pasos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ct-paso { flex: 1 1 120px; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border: 2px solid var(--border-color); border-radius: var(--radius-sm); font-size: .82rem; font-weight: 700; color: var(--text-muted); background: var(--surface); }
.ct-paso span { display: inline-flex; width: 22px; height: 22px; border-radius: 50%; align-items: center; justify-content: center; background: var(--bg-main); border: 2px solid var(--marca-negro); color: var(--marca-negro); font-size: .75rem; }
.ct-paso.hecho { color: var(--marca-verde); border-color: var(--marca-verde); }
.ct-paso.hecho span { background: var(--marca-verde); color: #fff; border-color: var(--marca-verde); }
.ct-paso.activo { color: var(--marca-negro); border-color: var(--marca-negro); box-shadow: 3px 3px 0 var(--marca-negro); }
.ct-paso.activo span { background: var(--marca-dorado); }
.cn-zona td { font-weight: 800; text-transform: uppercase; font-size: .75rem; letter-spacing: .5px; background: var(--bg-main); }
.cn-fuera td { background: rgba(225, 68, 72, 0.08); }
/* «Otro precio» (cap. 17 §17.7): precio propio con su food cost al instante */
.cos-otro-in { width: 84px; padding: 4px 6px; border: 1px solid var(--border-color); border-radius: 6px; text-align: center; font-weight: 700; }
.cos-otro-r { margin-top: 4px; }
/* Punto de equilibrio (cap. 17 §17.13) */
.cos-ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.cos-ap-f { display: flex; flex-direction: column; gap: 4px; font-size: .8rem; font-weight: 600; }
.cos-ap-f input { padding: 6px 8px; border: 1px solid var(--border-color); border-radius: 6px; }
/* Capas del plato: mesa y condimentos, kits de empaque (cap. 17 §17.14) */
.cos-kits { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cos-kit { border: 1px solid var(--border-color); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.cos-kit-l { display: flex; flex-direction: column; gap: 6px; }
.cos-kit-f { display: flex; gap: 6px; align-items: center; }
.cos-kit-f select { flex: 1; min-width: 0; padding: 4px 6px; border: 1px solid var(--border-color); border-radius: 6px; }
.cos-kit-f input { width: 90px; padding: 4px 6px; border: 1px solid var(--border-color); border-radius: 6px; }
/* Editor de recetas desde Costeo (§17.16) */
.cos-receta-bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:14px; padding:10px 12px; border:1.5px solid var(--marca-negro); border-radius:12px; background:var(--marca-crema); }
.cos-lapiz { border:1.5px solid var(--marca-negro); background:var(--marca-blanco); border-radius:999px; width:26px; height:26px; margin-left:6px; cursor:pointer; font-size:.7rem; color:var(--text-main); vertical-align:middle; }
.cos-lapiz:hover { background:var(--marca-dorado); }
