/* ══════════════════════════════════════════════════════════════════
   MÓDULO REGISTROS DE PRODUCCIÓN — Estilos específicos
   Color primario: slate-blue  #334155 / #1e293b
   Acento:         ámbar        #d97706 / #f59e0b
   ══════════════════════════════════════════════════════════════════ */

:root {
  --p-primary:       #334155;
  --p-primary-dark:  #1e293b;
  --p-primary-light: #f1f5f9;
  --p-primary-bg:    #f8fafc;
  --p-accent:        #d97706;
  --p-accent-dark:   #b45309;
  --p-accent-light:  #fef3c7;
  --p-sidebar:       #0f172a;
  --p-sidebar2:      #1e293b;
  --p-text:          #0f172a;
  --p-muted:         #64748b;
  --p-line:          #e2e8f0;
  --p-bg:            #f8fafc;
  --p-success:       #15803d;
  --p-success-bg:    #dcfce7;
  --p-danger:        #dc2626;
  --p-danger-bg:     #fee2e2;
  --p-warning:       #d97706;
  --p-warning-bg:    #fef3c7;
  --p-info:          #1d4ed8;
  --p-info-bg:       #dbeafe;
  /* KPI colors */
  --kpi-green:       #16a34a;
  --kpi-green-bg:    #dcfce7;
  --kpi-amber:       #d97706;
  --kpi-amber-bg:    #fef3c7;
  --kpi-red:         #dc2626;
  --kpi-red-bg:      #fee2e2;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, Helvetica, sans-serif; background: var(--p-bg); color: var(--p-text); }

/* ── LOGIN ─────────────────────────────────────────────────────── */
.prod-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 55%, #334155 100%);
}
.prod-login .login-card {
  background: #fff;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.prod-login .login-logo {
  text-align: center;
  margin-bottom: 28px;
}
.prod-login .login-logo .icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-dark));
  border-radius: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 32px; margin-bottom: 12px;
}
.prod-login .login-logo h1 { font-size: 20px; font-weight: 800; color: var(--p-text); }
.prod-login .login-logo p  { font-size: 12px; color: var(--p-muted); margin-top: 2px; }
.prod-login .login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; color: var(--p-text); }
.prod-login .login-card input,
.prod-login .login-card select {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--p-line);
  border-radius: 9px; font-size: 14px; margin-bottom: 16px; outline: none;
  transition: border-color .15s; background: #fff;
}
.prod-login .login-card input:focus,
.prod-login .login-card select:focus { border-color: var(--p-accent); }
.btn-login {
  width: 100%; padding: 12px; border-radius: 10px;
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-dark));
  color: #fff; font-size: 15px; font-weight: 700; border: 0; cursor: pointer;
  transition: filter .15s;
}
.btn-login:hover { filter: brightness(1.08); }
.login-error { color: var(--p-danger); font-size: 13px; margin-top: 8px; text-align: center; }

/* ── LAYOUT ────────────────────────────────────────────────────── */
.prod-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.p-sidebar {
  width: 230px; min-height: 100vh; background: var(--p-sidebar);
  display: flex; flex-direction: column; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.p-sidebar-brand {
  padding: 20px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex; align-items: center; gap: 10px;
}
.p-sidebar-brand .s-icon {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--p-accent), var(--p-accent-dark));
  display: grid; place-items: center; font-size: 18px; flex-shrink: 0;
}
.p-sidebar-brand .s-title { font-size: 13px; font-weight: 700; color: #fff; line-height: 1.3; }
.p-sidebar-brand .s-sub   { font-size: 10px; color: #94a3b8; }

.p-nav { flex: 1; padding: 10px 0; }
.p-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 18px; font-size: 13px; color: #94a3b8;
  cursor: pointer; border-left: 3px solid transparent;
  transition: background .12s, color .12s;
  text-decoration: none; user-select: none;
}
.p-nav-item:hover  { background: rgba(255,255,255,.05); color: #e2e8f0; }
.p-nav-item.active { background: rgba(217,119,6,.12); color: var(--p-accent); border-left-color: var(--p-accent); }
.p-nav-group { font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #475569; padding: 14px 18px 5px; }

.p-sidebar-footer { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.07); }
.p-user-info { font-size: 12px; color: #94a3b8; margin-bottom: 8px; line-height: 1.4; }
.p-user-info strong { color: #e2e8f0; display: block; }
.btn-logout {
  width: 100%; padding: 7px 12px; border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(255,255,255,.06); color: #94a3b8; border: 1px solid rgba(255,255,255,.08);
  cursor: pointer; transition: background .12s;
}
.btn-logout:hover { background: rgba(220,38,38,.2); color: #fca5a5; }

/* Main content */
.p-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.p-topbar {
  height: 56px; background: #fff; border-bottom: 1px solid var(--p-line);
  display: flex; align-items: center; padding: 0 28px;
  gap: 10px; position: sticky; top: 0; z-index: 10;
}
.p-topbar h2 { font-size: 16px; font-weight: 700; color: var(--p-text); }
.p-topbar .badge {
  font-size: 11px; padding: 3px 9px; border-radius: 999px; font-weight: 600;
  background: var(--p-accent-light); color: var(--p-accent-dark);
}
.p-content { flex: 1; padding: 24px 28px; }

/* ── STAT GRID ─────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.stat-icon { width: 44px; height: 44px; border-radius: 11px; display: grid; place-items: center; font-size: 22px; flex-shrink: 0; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1; }
.stat-label { font-size: 12px; color: var(--p-muted); margin-top: 3px; }

/* ── TARJETERO GRID ────────────────────────────────────────────── */
.tarjetero-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 18px;
}
.tarjetero-header h3 { font-size: 16px; font-weight: 800; color: var(--p-text); }
.tarjetero-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.tarjetero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* ── TARJETA CARD ──────────────────────────────────────────────── */
.tarjeta-card {
  background: #fff;
  border: 1px solid var(--p-line);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow .15s, transform .1s;
}
.tarjeta-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.1); transform: translateY(-1px); }

.tarjeta-header {
  background: linear-gradient(135deg, var(--p-primary-dark), var(--p-primary));
  color: #fff;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.tarjeta-header .herramental-no {
  font-size: 15px; font-weight: 800; letter-spacing: .5px; font-family: monospace;
}
.tarjeta-header .folio {
  font-size: 10px; color: rgba(255,255,255,.5); font-family: monospace; align-self: flex-start;
}
.tarjeta-header-info {
  display: flex; flex-direction: column; gap: 4px; flex: 1;
}
.tarjeta-header-row {
  display: flex; flex-direction: column; gap: 1px;
}
.tarjeta-header-row .meta-label {
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px;
  color: rgba(255,255,255,.65);
}
.tarjeta-comp-no {
  font-size: 13px; font-weight: 700; color: #fff;
}

.tarjeta-body {
  padding: 14px 16px;
  flex: 1;
}
.tarjeta-componente {
  font-size: 14px; font-weight: 700; color: var(--p-text); margin-bottom: 2px;
}
.tarjeta-cliente {
  font-size: 12px; color: var(--p-muted); margin-bottom: 10px;
}
.tarjeta-meta {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 12px;
}
.tarjeta-meta-item { display: flex; flex-direction: column; gap: 1px; }
.tarjeta-meta-item .meta-label { font-size: 10px; font-weight: 700; color: var(--p-muted); text-transform: uppercase; letter-spacing: .5px; }
.tarjeta-meta-item .meta-val   { font-size: 13px; font-weight: 600; color: var(--p-text); }

.tarjeta-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--p-line);
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  flex-wrap: wrap;
}

/* ── STATUS BADGES ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
}
.badge-activo      { background: var(--p-accent-light);  color: var(--p-accent-dark); }
.badge-procesado   { background: var(--p-success-bg);    color: var(--p-success); }
.badge-defecto     { background: var(--p-danger-bg);     color: var(--p-danger); }
.badge-warn        { background: #fef9c3;                color: #854d0e; }
.badge-reprocesado { background: var(--p-info-bg);       color: var(--p-info); }

/* Turno badges */
.badge-t1 { background: #fef9c3; color: #854d0e; }
.badge-t2 { background: #dbeafe; color: #1e40af; }
.badge-t3 { background: #f3e8ff; color: #6b21a8; }

/* Role badges */
.badge-role { padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-admin    { background: #fde68a; color: #92400e; }
.badge-operador { background: #d1fae5; color: #065f46; }

/* ── PARO INDICATOR ────────────────────────────────────────────── */
.paro-banner {
  background: var(--p-danger-bg);
  border: 1.5px solid #fca5a5;
  border-radius: 10px;
  padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 14px; font-size: 13px; font-weight: 600;
  color: var(--p-danger);
}
.paro-banner .paro-info { display: flex; align-items: center; gap: 8px; }

/* ── BUTTONS ───────────────────────────────────────────────────── */
.btn { padding: 8px 16px; border-radius: 9px; font-size: 13px; font-weight: 600; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; transition: filter .12s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn-primary  { background: var(--p-accent);      color: #fff; }
.btn-dark     { background: var(--p-primary-dark); color: #fff; }
.btn-outline  { background: #fff; border: 1.5px solid var(--p-line); color: var(--p-text); }
.btn-danger   { background: var(--p-danger);       color: #fff; }
.btn-success  { background: var(--p-success);      color: #fff; }
.btn-info     { background: var(--p-info);         color: #fff; }
.btn-sm       { padding: 5px 10px; font-size: 12px; }
.btn-xs       { padding: 3px 8px; font-size: 11px; }
.btn-paro {
  background: var(--p-danger); color: #fff;
  padding: 5px 10px; font-size: 12px; font-weight: 700;
  border-radius: 8px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: filter .12s;
}
.btn-paro:hover { filter: brightness(1.12); }
.btn-descargar {
  background: var(--p-success); color: #fff;
  padding: 5px 10px; font-size: 12px; font-weight: 700;
  border-radius: 8px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 4px;
  transition: filter .12s;
}
.btn-descargar:hover { filter: brightness(1.08); }

/* ── PIZARRÓN KPI TABLE ────────────────────────────────────────── */
.pizarron-wrap {
  background: #fff; border: 1px solid var(--p-line);
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 20px;
}
.pizarron-header {
  padding: 16px 20px; border-bottom: 1px solid var(--p-line);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
}
.pizarron-header h3 { font-size: 15px; font-weight: 800; }
.pizarron-scroll { overflow-x: auto; }

.pizarron-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.pizarron-table thead th {
  background: var(--p-primary-dark); color: #f1f5f9;
  padding: 10px 14px; text-align: center; font-weight: 700; font-size: 12px;
  white-space: nowrap; position: sticky; top: 0;
}
.pizarron-table thead th:first-child { text-align: left; }
.pizarron-table tbody td {
  padding: 8px 14px; border-bottom: 1px solid #f1f5f5;
  text-align: center; font-weight: 600; font-size: 13px;
}
.pizarron-table tbody td:first-child { text-align: left; font-weight: 700; }
.pizarron-table tbody tr:hover { background: #f8fafc; }

/* Turno separator row */
.pizarron-table .turno-row td {
  background: #f1f5f9; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--p-muted);
  padding: 5px 14px;
}
/* Totals row */
.pizarron-table .totals-row td {
  background: var(--p-primary-bg); border-top: 2px solid var(--p-primary);
  font-weight: 800; font-size: 13px;
}
/* Day total */
.pizarron-table .day-total-row td {
  background: var(--p-primary-dark); color: #fff;
  font-weight: 800; font-size: 14px;
  border-top: 3px solid var(--p-accent);
}

/* KPI cell colors */
.kpi-green { background: var(--kpi-green-bg); color: var(--kpi-green); }
.kpi-amber { background: var(--kpi-amber-bg); color: var(--kpi-amber); }
.kpi-red   { background: var(--kpi-red-bg);   color: var(--kpi-red); }
.kpi-na    { color: var(--p-muted); font-size: 11px; }

/* ── TABLE CARD ────────────────────────────────────────────────── */
.table-card { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 20px; }
.table-header { padding: 16px 20px; border-bottom: 1px solid var(--p-line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.table-header h3 { font-size: 15px; font-weight: 700; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th { background: #f8fafc; padding: 10px 14px; text-align: left; font-weight: 700; font-size: 12px; color: var(--p-muted); border-bottom: 1px solid var(--p-line); white-space: nowrap; }
tbody td { padding: 10px 14px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fafc; }
.mono { font-family: monospace; font-size: 12px; }

/* ── FORM ──────────────────────────────────────────────────────── */
.form-card { background: #fff; border: 1px solid var(--p-line); border-radius: 14px; padding: 24px; box-shadow: 0 2px 8px rgba(0,0,0,.04); margin-bottom: 20px; }
.form-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--p-line); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--p-muted); }
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 11px; border: 1.5px solid var(--p-line); border-radius: 8px; font-size: 13px; outline: none;
  transition: border-color .12s; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--p-accent); }
.form-group.full { grid-column: 1 / -1; }
.form-hint { font-size: 11px; color: var(--p-muted); margin-top: 2px; }
.form-row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.form-row .form-group { flex: 1; min-width: 140px; }

/* Cantidad calculated display */
.cantidad-display {
  background: var(--p-accent-light); border: 1.5px solid var(--p-accent);
  border-radius: 8px; padding: 8px 12px;
  font-size: 18px; font-weight: 800; color: var(--p-accent-dark);
  text-align: center; min-width: 80px;
}

/* ── FILTERS ───────────────────────────────────────────────────── */
.filters-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; align-items: flex-end; }
.filters-bar input, .filters-bar select { padding: 7px 10px; border: 1.5px solid var(--p-line); border-radius: 8px; font-size: 13px; outline: none; background: #fff; }
.filters-bar input:focus, .filters-bar select:focus { border-color: var(--p-accent); }
.flabel { font-size: 12px; font-weight: 600; color: var(--p-muted); display: block; margin-bottom: 3px; }

/* ── MODAL ─────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px;
}
.modal-box {
  background: #fff; border-radius: 16px; padding: 28px; width: 100%;
  max-width: 560px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-box.modal-sm { max-width: 380px; }
.modal-box.modal-lg { max-width: 720px; }
.modal-box h3 { font-size: 16px; font-weight: 700; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--p-line); }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
.modal-question { font-size: 15px; font-weight: 600; text-align: center; margin: 10px 0 20px; color: var(--p-text); }
.modal-question-btns { display: flex; gap: 12px; justify-content: center; }
/* Modal alternativo (.modal) */
.modal {
  background: #fff; border-radius: 16px; width: 100%; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--p-line);
}
.modal-title { font-size: 16px; font-weight: 700; margin: 0; }
.modal-close {
  background: none; border: none; font-size: 18px; cursor: pointer;
  color: var(--p-muted); line-height: 1; padding: 4px 6px; border-radius: 6px;
}
.modal-close:hover { background: var(--p-bg-card); }
.modal-body { padding: 20px 24px; }
.modal-footer {
  display: flex; gap: 10px; justify-content: flex-end;
  padding: 14px 24px; border-top: 1px solid var(--p-line);
}
.form-control {
  width: 100%; padding: 8px 11px; border: 1.5px solid var(--p-line);
  border-radius: 8px; font-size: 13px; outline: none; background: #fff; box-sizing: border-box;
}
.form-control:focus { border-color: var(--p-accent); }

/* ── TABS ──────────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 0; flex-wrap: wrap; border-bottom: 2px solid var(--p-line); margin-bottom: 18px; }
.tab-btn {
  padding: 8px 20px; border: none; background: none; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--p-muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px;
  border-radius: 6px 6px 0 0; transition: color .15s, border-color .15s;
}
.tab-btn:hover { color: var(--p-accent); }
.tab-btn.tab-active { color: var(--p-accent); border-bottom-color: var(--p-accent); }

/* ── MISC ──────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; color: var(--p-muted); }
.empty-state .icon { font-size: 48px; margin-bottom: 10px; }
.alert { padding: 12px 16px; border-radius: 10px; font-size: 13px; margin-bottom: 16px; }
.alert-warn    { background: var(--p-warning-bg); color: var(--p-accent-dark); border: 1px solid #fde68a; }
.alert-info    { background: var(--p-info-bg);    color: var(--p-info);        border: 1px solid #bfdbfe; }
.alert-success { background: var(--p-success-bg); color: var(--p-success);     border: 1px solid #bbf7d0; }
.alert-danger  { background: var(--p-danger-bg);  color: var(--p-danger);      border: 1px solid #fca5a5; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.gap-8 { gap: 8px; display: flex; }

/* toggle switch */
.toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle-switch {
  width: 36px; height: 20px; background: #cbd5e1; border-radius: 10px;
  position: relative; transition: background .15s; flex-shrink: 0;
}
.toggle-switch.on { background: var(--p-success); }
.toggle-switch::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.toggle-switch.on::after { transform: translateX(16px); }

/* ── CONFIG ────────────────────────────────────────────────────── */
.config-section { max-width: 480px; }
.config-section h4 { font-size: 14px; font-weight: 700; margin-bottom: 14px; color: var(--p-text); }
.config-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; border-bottom: 1px solid var(--p-line);
  gap: 16px;
}
.config-item:last-child { border-bottom: 0; }
.config-item label { font-size: 13px; font-weight: 600; }
.config-item input {
  width: 90px; padding: 7px 10px; border: 1.5px solid var(--p-line);
  border-radius: 8px; font-size: 14px; font-weight: 700; text-align: center; outline: none;
}
.config-item input:focus { border-color: var(--p-accent); }

/* ── PIZARRÓN STANDALONE: layout y controles ─────────────────────── */
.pizarron-root { padding: 16px; max-width: 1400px; margin: 0 auto; }
.pizarron-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 12px;
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px;
  padding: 18px 24px; margin-bottom: 16px;
}
.pizarron-title-block .pizarron-title  { font-size: 22px; font-weight: 800; color: var(--p-text); }
.pizarron-title-block .pizarron-subtitle { font-size: 13px; color: var(--p-muted); margin-top: 2px; }
.pizarron-header-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.pizarron-datetime    { font-size: 13px; font-weight: 600; color: var(--p-text); }
.pizarron-turno-badge { font-size: 12px; color: var(--p-muted); }
.pizarron-refresh-info { font-size: 11px; color: var(--p-muted); }

.pizarron-controls {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: center;
  background: #fff; border: 1px solid var(--p-line); border-radius: 12px;
  padding: 12px 20px; margin-bottom: 16px;
}
.pizarron-control-group { display: flex; align-items: center; gap: 8px; }
.pizarron-label { font-size: 12px; font-weight: 600; color: var(--p-muted); }
.pizarron-turno-btns { display: flex; gap: 4px; }
.pizarron-btn-turno {
  padding: 5px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--p-line); background: #f8fafc; color: var(--p-muted); cursor: pointer;
}
.pizarron-btn-turno.active { background: var(--p-accent); color: #fff; border-color: var(--p-accent); }
.pizarron-date-input {
  padding: 6px 10px; border: 1.5px solid var(--p-line); border-radius: 8px;
  font-size: 13px; outline: none; background: #fff;
}
.pizarron-btn-refresh {
  padding: 6px 16px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--p-line); background: var(--p-primary-dark); color: #fff; cursor: pointer;
}
.pizarron-btn-refresh:hover { filter: brightness(1.1); }

.pizarron-linea-board {
  background: #fff; border: 1px solid var(--p-line); border-radius: 14px;
  margin-bottom: 16px; overflow: hidden;
}
.pizarron-linea-title {
  font-size: 16px; font-weight: 800; padding: 14px 20px;
  background: var(--p-primary-dark); color: #fff;
  border-bottom: 1px solid var(--p-line);
}
.pizarron-table-wrap { overflow-x: auto; }

.pizarron-table .turno-header-row td {
  background: #f1f5f9; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px; color: var(--p-muted); padding: 5px 14px;
}
.turno-actual td { background: #dbeafe !important; color: #1d4ed8 !important; }
.pizarron-table .subtotal-row td {
  background: var(--p-primary-bg); border-top: 2px solid var(--p-primary);
  font-weight: 800; font-size: 13px;
}
.pizarron-table .no-data-row td { color: var(--p-muted); text-align: center; padding: 12px; }

/* Tamaño de letra variable en tablas del pizarrón */
:root { --pz-font: 14px; }
.pizarron-table,
.pizarron-table thead th,
.pizarron-table tbody td { font-size: var(--pz-font) !important; }

.pizarron-loading,
.pizarron-empty,
.pizarron-error { text-align: center; padding: 40px; color: var(--p-muted); font-size: 15px; }
.pizarron-error { color: var(--p-danger); }

/* ── PIZARRÓN: botón de tema ─────────────────────────────────────── */
.pizarron-btn-theme {
  padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--p-line); background: #fff; color: var(--p-text);
  cursor: pointer; transition: background .15s, color .15s;
}
.pizarron-btn-theme:hover { background: var(--p-primary-light); }

/* ── DARK MODE (pizarrón standalone) ────────────────────────────── */
body.pizarron-dark {
  background: #0f172a;
  color: #e2e8f0;
}
body.pizarron-dark .pizarron-root { background: #0f172a; }

body.pizarron-dark .pizarron-header {
  background: #1e293b; border-color: #334155; color: #e2e8f0;
}
body.pizarron-dark .pizarron-title,
body.pizarron-dark .pizarron-subtitle { color: #e2e8f0; }
body.pizarron-dark .pizarron-datetime,
body.pizarron-dark .pizarron-refresh-info,
body.pizarron-dark .pizarron-turno-badge { color: #94a3b8; }

body.pizarron-dark .pizarron-controls {
  background: #1e293b; border-color: #334155;
}
body.pizarron-dark .pizarron-label { color: #94a3b8; }
body.pizarron-dark .pizarron-date-input {
  background: #0f172a; border-color: #334155; color: #e2e8f0;
}
body.pizarron-dark .pizarron-btn-turno {
  background: #1e293b; color: #cbd5e1; border-color: #334155;
}
body.pizarron-dark .pizarron-btn-turno.active {
  background: #d97706; color: #fff; border-color: #d97706;
}
body.pizarron-dark .pizarron-btn-refresh {
  background: #334155; color: #e2e8f0; border-color: #475569;
}
body.pizarron-dark .pizarron-btn-theme {
  background: #1e293b; color: #e2e8f0; border-color: #334155;
}

body.pizarron-dark .pizarron-linea-board {
  background: #1e293b; border-color: #334155;
}
body.pizarron-dark .pizarron-linea-title { color: #e2e8f0; }

body.pizarron-dark .pizarron-table thead th {
  background: #334155; color: #f1f5f9;
}
body.pizarron-dark .pizarron-table tbody td {
  border-bottom-color: #1e293b; color: #e2e8f0;
}
body.pizarron-dark .pizarron-table tbody tr:hover { background: #253347; }

body.pizarron-dark .pizarron-table .turno-header-row td {
  background: #253347; color: #94a3b8;
}
body.pizarron-dark .turno-actual td { background: #1c3a5e !important; color: #93c5fd; }
body.pizarron-dark .pizarron-table .subtotal-row td {
  background: #1e293b; border-top-color: #475569; color: #e2e8f0;
}
body.pizarron-dark .pizarron-table .day-total-row td {
  background: #1e3a5f; color: #fff; border-top-color: #d97706;
}
body.pizarron-dark .pizarron-table .no-data-row td { color: #64748b; }

body.pizarron-dark .pizarron-empty,
body.pizarron-dark .pizarron-error { color: #94a3b8; }

/* KPI colors retain semantic meaning in dark mode */
body.pizarron-dark .kpi-green { background: #14532d; color: #86efac; }
body.pizarron-dark .kpi-amber { background: #78350f; color: #fcd34d; }
body.pizarron-dark .kpi-red   { background: #7f1d1d; color: #fca5a5; }

/* ── BAKER ─────────────────────────────────────────────────────── */
.bk-cav-row {
  background: #f8fafc;
  border: 1px solid var(--p-line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}
.bk-cav-row input,
.bk-cav-row select {
  font-size: 12px;
  padding: 4px 8px;
}
.bk-desc-cav {
  background: #f8fafc;
  border: 1px solid var(--p-line);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}
.bk-desc-cav[data-estado="buena"]    { background: #f0fdf4; border-color: #86efac; }
.bk-desc-cav[data-estado="defecto"]  { background: #fef2f2; border-color: #fca5a5; }
.bk-desc-cav[data-estado="reproceso"]{ background: #fefce8; border-color: #fde047; }

/* ══════════════════════════════════════════════════════════════════
   PIZARRÓN DIGITAL — SLIDESHOW
   ══════════════════════════════════════════════════════════════════ */

/* Contenedor raíz */
.pzs-root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #f1f5f9;
  font-family: var(--p-font, system-ui, sans-serif);
  font-size: var(--pz-font, 14px);
}
body.pizarron-dark .pzs-root { background: #0f172a; color: #e2e8f0; }

/* Barra de progreso */
.pzs-progress-track {
  height: 4px;
  background: rgba(0,0,0,.08);
  flex-shrink: 0;
}
body.pizarron-dark .pzs-progress-track { background: rgba(255,255,255,.1); }
.pzs-progress-bar {
  height: 100%;
  background: var(--p-accent, #2563eb);
  transition: width .1s linear;
}

/* Header */
.pzs-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 24px 10px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}
body.pizarron-dark .pzs-header { background: #1e293b; border-color: #334155; }

.pzs-slide-title {
  font-size: 1.7em;
  font-weight: 800;
  color: #1e293b;
  line-height: 1.2;
}
body.pizarron-dark .pzs-slide-title { color: #f1f5f9; }

.pzs-clock {
  font-size: .85em;
  color: #64748b;
  margin-top: 3px;
}
body.pizarron-dark .pzs-clock { color: #94a3b8; }

.pzs-header-right { text-align: right; }
.pzs-slide-counter {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--p-accent, #2563eb);
}
.pzs-refresh-lbl { font-size: .75em; color: #94a3b8; margin-top: 2px; }

/* Content area */
.pzs-content {
  flex: 1;
  padding: 18px 24px;
  overflow: hidden;
}
.pzs-loading, .pzs-error, .pzs-empty {
  text-align: center;
  padding: 60px 0;
  font-size: 1.1em;
  color: #64748b;
}
.pzs-error { color: #dc2626; }
body.pizarron-dark .pzs-loading,
body.pizarron-dark .pzs-empty { color: #94a3b8; }

/* Controls bar */
.pzs-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 24px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  flex-shrink: 0;
  gap: 12px;
}
body.pizarron-dark .pzs-controls { background: #1e293b; border-color: #334155; }

.pzs-nav-group, .pzs-settings-group { display: flex; gap: 6px; align-items: center; }
.pzs-btn {
  padding: 6px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  font-size: .9em;
  font-weight: 600;
  color: #334155;
  transition: background .15s, border-color .15s;
  white-space: nowrap;
}
.pzs-btn:hover { background: #e2e8f0; }
.pzs-btn-active { background: var(--p-accent, #2563eb) !important; color: #fff !important; border-color: var(--p-accent, #2563eb) !important; }
body.pizarron-dark .pzs-btn { background: #334155; border-color: #475569; color: #e2e8f0; }
body.pizarron-dark .pzs-btn:hover { background: #475569; }

/* Dots */
.pzs-dots { display: flex; gap: 6px; align-items: center; }
.pzs-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.pzs-dot:hover { background: #94a3b8; }
.pzs-dot-active { background: var(--p-accent, #2563eb); transform: scale(1.3); }
body.pizarron-dark .pzs-dot { background: #475569; }
body.pizarron-dark .pzs-dot-active { background: #60a5fa; }

/* ── KPI Cards ── */
.pzs-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 12px;
}
.pzs-kpi-grid-compact { gap: 8px; }

.pzs-kpi-card {
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}
.pzs-kpi-big { padding: 22px 10px; }
.pzs-kpi-label { font-size: .8em; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; opacity: .75; margin-bottom: 6px; }
.pzs-kpi-value { font-size: 1.8em; font-weight: 800; line-height: 1; }
.pzs-kpi-big .pzs-kpi-value { font-size: 2.6em; }

/* KPI color states */
.pzs-kpi-card.kpi-green { background: #dcfce7; border-color: #86efac; color: #15803d; }
.pzs-kpi-card.kpi-amber { background: #fef3c7; border-color: #fcd34d; color: #b45309; }
.pzs-kpi-card.kpi-red   { background: #fee2e2; border-color: #fca5a5; color: #b91c1c; }
body.pizarron-dark .pzs-kpi-card            { background: #1e293b; border-color: #334155; color: #e2e8f0; }
body.pizarron-dark .pzs-kpi-card.kpi-green  { background: #14532d; border-color: #166534; color: #86efac; }
body.pizarron-dark .pzs-kpi-card.kpi-amber  { background: #78350f; border-color: #92400e; color: #fcd34d; }
body.pizarron-dark .pzs-kpi-card.kpi-red    { background: #7f1d1d; border-color: #991b1b; color: #fca5a5; }

.pzs-ciclos-badge {
  font-size: .95em;
  font-weight: 600;
  color: #475569;
  text-align: center;
  margin-bottom: 12px;
}
body.pizarron-dark .pzs-ciclos-badge { color: #94a3b8; }
.pzs-ciclos-badge-sm { font-size: .8em; color: #64748b; text-align: center; margin-top: 4px; }

/* ── Turno slide ── */
.pzs-turno-slide { display: flex; flex-direction: column; height: 100%; }

/* ── Hr×hr table ── */
.pzs-hr-table-wrap { overflow-x: auto; flex: 1; min-width: 0; }
.pzs-hr-table {
  width: 100%;
  min-width: 580px;
  border-collapse: collapse;
  font-size: var(--pz-font, 14px);
}
.pzs-hr-table thead th {
  background: #f1f5f9;
  padding: 6px 10px;
  text-align: center;
  font-size: .8em;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  border-bottom: 2px solid #e2e8f0;
}
.pzs-hr-table thead th:first-child { text-align: left; }
.pzs-hr-table tbody td {
  padding: 5px 10px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
  font-weight: 600;
}
.pzs-hr-table tbody td:first-child { text-align: left; font-weight: 700; }
.pzs-hr-table tbody td.kpi-green { background: #dcfce7; color: #15803d; }
.pzs-hr-table tbody td.kpi-amber { background: #fef3c7; color: #b45309; }
.pzs-hr-table tbody td.kpi-red   { background: #fee2e2; color: #b91c1c; }
.pzs-no-data { text-align: center; color: #94a3b8; padding: 20px; }
body.pizarron-dark .pzs-hr-table thead th { background: #1e293b; border-color: #334155; color: #94a3b8; }
body.pizarron-dark .pzs-hr-table tbody td { border-color: #1e293b; color: #e2e8f0; background: #0f172a; }
body.pizarron-dark .pzs-hr-table tbody td.kpi-green { background: #14532d; color: #86efac; }
body.pizarron-dark .pzs-hr-table tbody td.kpi-amber { background: #78350f; color: #fcd34d; }
body.pizarron-dark .pzs-hr-table tbody td.kpi-red   { background: #7f1d1d; color: #fca5a5; }

/* ── Slide "Todas las líneas" turno ── */
.pzs-all-slide {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  height: 100%;
}
.pzs-all-linea-block {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
}
body.pizarron-dark .pzs-all-linea-block { background: #1e293b; border-color: #334155; }
.pzs-all-linea-label {
  font-size: 1.1em;
  font-weight: 800;
  text-align: center;
  margin-bottom: 12px;
  color: #1e293b;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}
body.pizarron-dark .pzs-all-linea-label { color: #f1f5f9; border-color: #334155; }

/* ── Slide acumulado día ── */
.pzs-dia-slide { display: flex; flex-direction: column; gap: 14px; }

.pzs-dia-turnos {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
}
body.pizarron-dark .pzs-dia-turnos { background: #1e293b; border-color: #334155; }

.pzs-dia-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 1fr 1fr 100px;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid #f1f5f9;
  gap: 6px;
}
body.pizarron-dark .pzs-dia-row { border-color: #334155; }
.pzs-dia-header {
  background: #f1f5f9;
  font-size: .78em;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
}
body.pizarron-dark .pzs-dia-header { background: #0f172a; color: #94a3b8; }
.pzs-dia-row:last-child { border-bottom: none; }

.pzs-dia-turno-lbl { font-weight: 800; font-size: 1em; }
.pzs-dia-kpi-cell {
  text-align: center;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  font-size: .95em;
}
.pzs-dia-kpi-cell.kpi-green { background: #dcfce7; color: #15803d; }
.pzs-dia-kpi-cell.kpi-amber { background: #fef3c7; color: #b45309; }
.pzs-dia-kpi-cell.kpi-red   { background: #fee2e2; color: #b91c1c; }
body.pizarron-dark .pzs-dia-kpi-cell.kpi-green { background: #14532d; color: #86efac; }
body.pizarron-dark .pzs-dia-kpi-cell.kpi-amber { background: #78350f; color: #fcd34d; }
body.pizarron-dark .pzs-dia-kpi-cell.kpi-red   { background: #7f1d1d; color: #fca5a5; }
.pzs-dia-ciclos-cell { text-align: right; font-size: .85em; color: #64748b; }
body.pizarron-dark .pzs-dia-ciclos-cell { color: #94a3b8; }

.pzs-dia-total-label {
  font-size: 1em;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #1e293b;
  text-align: center;
  padding: 4px 0 2px;
}
body.pizarron-dark .pzs-dia-total-label { color: #f1f5f9; }

/* ── Pareto charts (pizarrón día) ─────────────────────────────── */
.pzs-pareto-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}
.pzs-pareto-col { display: flex; flex-direction: column; gap: 4px; }
.pzs-pareto-title {
  font-size: .75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  margin-bottom: 4px;
}
body.pizarron-dark .pzs-pareto-title { color: #94a3b8; }
.pzs-pareto-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: .78em;
}
.pzs-pareto-lbl {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
}
.pzs-pareto-bar-line {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pzs-pareto-bar-bg {
  flex: 1;
  background: #e2e8f0;
  border-radius: 3px;
  height: 10px;
  overflow: hidden;
}
body.pizarron-dark .pzs-pareto-bar-bg { background: #334155; }
.pzs-pareto-bar {
  height: 100%;
  border-radius: 3px;
  transition: width .4s ease;
}
.pzs-bar-amber { background: #d97706; }
.pzs-bar-red   { background: #dc2626; }
.pzs-pareto-val {
  flex-shrink: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: #64748b;
  font-size: .95em;
  min-width: 44px;
}
body.pizarron-dark .pzs-pareto-val { color: #94a3b8; }
.pzs-pareto-empty { font-size: .8em; color: #94a3b8; padding: 6px 0; }
.pzs-all-dia-slide { display: flex; flex-direction: column; gap: 12px; }

/* ── Paro programado banners ───────────────────────────────────── */
.pzs-paro-prog-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fffbeb;
  border: 2px solid #fcd34d;
  border-radius: 16px;
  padding: 40px 60px;
  color: #b45309;
  text-align: center;
}
body.pizarron-dark .pzs-paro-prog-banner {
  background: #292524;
  border-color: #78350f;
  color: #fcd34d;
}
.pzs-paro-prog-sm {
  font-size: .85em;
  font-weight: 800;
  color: #b45309;
  letter-spacing: .04em;
  padding: 8px 0;
  text-align: center;
}
body.pizarron-dark .pzs-paro-prog-sm { color: #fcd34d; }

/* ── Paros panel en turno slide ────────────────────────────────── */
.pzs-paros-panel {
  min-width: 180px;
  max-width: 220px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.pizarron-dark .pzs-paros-panel {
  background: #292524;
  border-color: #78350f;
}
.pzs-paro-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .78em;
  gap: 8px;
}
.pzs-paro-lbl {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}
.pzs-paro-min {
  flex-shrink: 0;
  font-weight: 700;
  color: #b45309;
}
body.pizarron-dark .pzs-paro-min { color: #fcd34d; }

/* Responsive */
@media (max-width: 1024px) {
  .pzs-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .pzs-all-slide { grid-template-columns: 1fr; }
  .pzs-dia-row { grid-template-columns: 50px 1fr 1fr 1fr 1fr; }
  .pzs-dia-ciclos-cell { display: none; }
}
@media (max-width: 600px) {
  .pzs-header { flex-direction: column; gap: 6px; }
  .pzs-controls { flex-wrap: wrap; justify-content: center; }
  .pzs-kpi-big .pzs-kpi-value { font-size: 1.8em; }
}

/* ── PRINT ─────────────────────────────────────────────────────── */
@media print {
  .p-sidebar, .p-topbar, .btn, .filters-bar, .modal-overlay { display: none !important; }
  .p-content { padding: 0; }
  .table-card, .form-card { box-shadow: none; border: 1px solid #ccc; }
}

/* ── PANEL ESTADÍSTICAS OPERADOR ───────────────────────────────── */
.tarjetero-con-panel {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.tarjetero-main { flex: 1; min-width: 0; }

.op-stats-sidebar {
  width: 252px;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
  overflow: hidden;
  font-size: 13px;
}
.op-stats-head {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: #f8fafc;
  padding: 14px 16px 12px;
}
.op-greeting {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 3px;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.op-name {
  font-size: 15px;
  font-weight: 800;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.op-stats-section {
  padding: 12px 16px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: #64748b;
  border-top: 1px solid #f1f5f9;
}
.op-week-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.op-week-table th {
  padding: 4px 10px;
  text-align: left;
  color: #94a3b8;
  font-weight: 600;
  font-size: 11px;
  border-bottom: 1px solid #f1f5f9;
}
.op-week-table th:last-child,
.op-week-table td:last-child { text-align: right; }
.op-week-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #f8fafc;
  color: #334155;
}
.op-week-table tr.op-today td {
  background: #f0f9ff;
  font-weight: 700;
}
.op-week-table tr.op-today td:first-child::after {
  content: ' ◀';
  font-size: 10px;
  color: #3b82f6;
}
.op-val-green  { color: #16a34a; font-weight: 700; }
.op-val-amber  { color: #d97706; font-weight: 700; }
.op-val-red    { color: #dc2626; font-weight: 700; }
.op-val-muted  { color: #cbd5e1; }

.op-recommendation {
  margin: 10px 12px 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.op-recommendation.op-rec-good {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #15803d;
}
.op-recommendation.op-rec-warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}
.op-recommendation .op-rec-icon {
  font-size: 14px;
  margin-right: 4px;
}

/* Solo visible en pantallas grandes */
@media (max-width: 1100px) { .op-stats-sidebar { display: none; } }

/* ── RESPONSIVE ────────────────────────────────────────────────── */
.p-sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:99}
.p-sidebar-overlay.open{display:block}
.p-mob-menu-btn{display:none;background:none;border:none;font-size:24px;cursor:pointer;padding:4px 8px;border-radius:8px;line-height:1;color:#e2e8f0}
@media (max-width: 1100px) {
  .tarjetero-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .p-sidebar { position:fixed;top:0;left:0;height:100vh;z-index:100;transform:translateX(-100%);transition:transform .25s ease;overflow-y:auto }
  .p-sidebar.open { transform:translateX(0) }
  .p-mob-menu-btn { display:inline-flex;align-items:center }
  .tarjetero-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .p-content { padding: 16px; }
}
