/* ==========================================================================
   LottoCuadre Pro - Executive Design System
   Paleta descansada, profesional y ergonómica para jornadas de caja
   ========================================================================== */

:root {
  /* Dark Mode Ejecutivo (Default) */
  --bg-main: #0b0f19;
  --bg-card: #131b2e;
  --bg-card-hover: #17223b;
  --bg-surface: #1e293b;
  --bg-input: #0f172a;
  --border: #2e3b52;
  --border-focus: #10b981;
  
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --teal: #14b8a6;
  --teal-bg: rgba(20, 184, 166, 0.12);
  --cyan: #06b6d4;
  --cyan-bg: rgba(6, 182, 212, 0.12);
  --amber: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.12);
  --rose: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.12);
  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.12);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Consolas, monospace;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.35);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.5);
}

/* Modo Suave / Día (Descansado, nada de blanco puro chillón) */
body.light-theme {
  --bg-main: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-surface: #e2e8f0;
  --bg-input: #f8fafc;
  --border: #cbd5e1;
  --border-focus: #059669;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;

  --emerald-bg: rgba(16, 185, 129, 0.15);
  --rose-bg: rgba(244, 63, 94, 0.15);
  --cyan-bg: rgba(6, 182, 212, 0.15);
  --amber-bg: rgba(245, 158, 11, 0.15);
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s ease, color 0.2s ease;
  overflow-x: hidden;
}

/* Scrollbar sutil */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.top-navbar {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
  gap: 12px;
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-info h1 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.3px;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-info .badge-version {
  font-size: 10px;
  background: var(--bg-surface);
  color: var(--teal);
  padding: 1px 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.brand-info p {
  font-size: 11px;
  color: var(--text-muted);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Selector de Agencia & Caja */
.agency-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px 8px;
  height: 32px;
  box-sizing: border-box;
}

.agency-pill.pill-compact {
  padding: 2px 7px;
  gap: 5px;
}

.agency-pill label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.3px;
  white-space: nowrap;
}

.agency-select {
  background: transparent;
  border: none;
  color: var(--emerald);
  font-weight: 600;
  font-size: 12px;
  outline: none;
  cursor: pointer;
  max-width: 120px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.agency-select.select-compact {
  max-width: 105px;
}

.btn-icon-pill {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  width: 22px;
  height: 22px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}

.btn-icon-pill:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
}

.agency-select option {
  background: var(--bg-card);
  color: var(--text-primary);
}

/* Selector de Rol */
.role-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  transition: all 0.2s;
}

.role-badge.superadmin {
  background: rgba(168, 85, 247, 0.16);
  border-color: #a855f7;
  color: #c084fc;
}

/* Botones de Selección Tipo de Pago Móvil */
.btn-tipo-pago {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.btn-tipo-pago:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-tipo-pago.active-entrada {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--emerald);
  color: var(--emerald);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

.btn-tipo-pago.active-premio {
  background: rgba(244, 63, 94, 0.16);
  border-color: var(--rose);
  color: var(--rose);
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.25);
}

/* Botones de Selección de Método de Pago para Abonos */
.metodos-pago-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.btn-metodo-pago {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 700;
  font-size: 13px;
}

.btn-metodo-pago:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-metodo-pago.active-metodo-efectivo {
  background: rgba(16, 185, 129, 0.16);
  border-color: var(--emerald);
  color: var(--emerald);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.25);
}

.btn-metodo-pago.active-metodo-pagomovil {
  background: rgba(20, 184, 166, 0.16);
  border-color: var(--teal);
  color: var(--teal);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.25);
}

.btn-metodo-pago.active-metodo-puntoventa {
  background: rgba(59, 130, 246, 0.16);
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.25);
}

.btn-metodo-pago.active-metodo-transferencia {
  background: rgba(168, 85, 247, 0.16);
  border-color: #a855f7;
  color: #c084fc;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.25);
}

/* Badges de Métodos de Pago */
.badge-metodo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
}

.badge-metodo.efectivo {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
  border: 1px solid var(--emerald);
}

.badge-metodo.pagomovil {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid var(--teal);
}

.badge-metodo.puntoventa {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid var(--blue);
}

.badge-metodo.transferencia {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid #a855f7;
}

.role-badge.admin {
  background: var(--amber-bg);
  border-color: var(--amber);
  color: var(--amber);
}

.role-badge.supervisor {
  background: var(--blue-bg);
  border-color: var(--blue);
  color: var(--blue);
}

.role-badge.cajera {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* Botones de Barra */
.btn-nav-icon {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-nav-icon:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  border-color: var(--text-muted);
}

/* ==========================================================================
   NAVIGATION TABS
   ========================================================================== */
.main-nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  display: flex;
  overflow-x: auto;
  padding: 0 16px;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 18px;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: var(--text-primary);
}

.nav-tab.active {
  color: var(--emerald);
  border-bottom-color: var(--emerald);
  background: linear-gradient(180deg, transparent 80%, var(--emerald-bg) 100%);
}

/* ==========================================================================
   APP CONTENT CONTAINER
   ========================================================================== */
.app-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 20px 16px 80px 16px;
  flex: 1;
}

.view-section {
  display: none;
  animation: fadeIn 0.25s ease-out;
}
.view-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   TARJETAS & PANELES EJECUTIVOS
   ========================================================================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}

/* ==========================================================================
   CUADRE HEADER TOOLBAR (Fecha, Responsable, Fondos)
   ========================================================================== */
.cuadre-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1 1 140px;
  min-width: 120px;
}

.toolbar-date-block {
  flex: 0 0 auto !important;
  min-width: 0 !important;
  width: auto !important;
}

.toolbar-date-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.input-date-compact {
  width: 135px !important;
  min-width: 135px !important;
  max-width: 135px !important;
  height: 38px !important;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 8px;
  cursor: pointer;
  box-sizing: border-box;
  text-align: center;
}

.toolbar-field-resp {
  flex: 1.2 1 200px;
  min-width: 170px;
}

.toolbar-field-fondo {
  flex: 0.8 1 125px;
  min-width: 110px;
}

.toolbar-field-tasa {
  flex: 1 1 160px;
  min-width: 155px;
}

.toolbar-field-estado {
  flex: 0.9 1 145px;
  min-width: 135px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.85);
  padding: 4px;
  border-radius: 4px;
  opacity: 0.9;
  transition: transform 0.15s ease;
}
input[type="date"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.15);
  opacity: 1;
}

.toolbar-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toolbar-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
}

.input-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  outline: none;
  font-family: var(--font-sans);
  transition: border-color 0.2s;
  width: 100%;
}

.input-box:focus {
  border-color: var(--border-focus);
}

.input-box[readonly] {
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: not-allowed;
}

.input-num {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: right;
}

/* ==========================================================================
   TERMÓMETRO DE ARQUEO / ESTADO DE CAJA (SUPER VISIBLE)
   ========================================================================== */
.thermometer-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.status-banner {
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.status-banner.balanced {
  background: var(--emerald-bg);
  border-color: var(--emerald);
  color: var(--emerald);
}

.status-banner.surplus {
  background: var(--cyan-bg);
  border-color: var(--cyan);
  color: var(--cyan);
}

.status-banner.deficit {
  background: var(--rose-bg);
  border-color: var(--rose);
  color: var(--rose);
}

.banner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.banner-title {
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.banner-values {
  margin-top: 10px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.banner-main-val {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
}

.banner-subtitle {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ==========================================================================
   GRID PRINCIPAL DEL CUADRE (Tablas e Ingreso)
   ========================================================================== */
.cuadre-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
}

@media (min-width: 1025px) {
  .cuadre-grid > div:first-child {
    position: sticky;
    top: 75px;
    align-self: start;
  }
}

@media (max-width: 1024px) {
  .cuadre-grid {
    grid-template-columns: 1fr;
  }
  .thermometer-card {
    grid-template-columns: 1fr;
  }
}

/* Tablas Financieras */
.table-responsive {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.financial-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.financial-table th {
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
}

.financial-table th.num-col,
.financial-table td.num-col {
  text-align: right;
  font-family: var(--font-mono);
}

.financial-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
}

.financial-table tr:last-child td {
  border-bottom: none;
}

.financial-table tr:hover {
  background: var(--bg-card-hover);
}

.financial-table tr.total-row {
  background: var(--bg-surface);
  font-weight: 700;
  color: var(--emerald);
  border-top: 2px solid var(--border);
}

.financial-table tr.highlight-row {
  background: rgba(16, 185, 129, 0.06);
  font-weight: 600;
}

.table-input {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  color: var(--text-primary);
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  width: 100%;
  min-width: 90px;
  max-width: 130px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  outline: none;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.15);
}

.table-input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25);
  background: var(--bg-card);
}

.table-input::placeholder {
  color: var(--text-muted);
  font-weight: 400;
  opacity: 0.6;
}

/* Casillas con códigos de color para cajeras */
.prog-input-ventas-bs {
  border-color: rgba(16, 185, 129, 0.4);
}
.prog-input-ventas-bs:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
}

.prog-input-premios-bs {
  border-color: rgba(244, 63, 94, 0.4);
}
.prog-input-premios-bs:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.25);
}

.prog-input-ventas-dls {
  border-color: rgba(20, 184, 166, 0.4);
}
.prog-input-ventas-dls:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}

.prog-input-premios-dls {
  border-color: rgba(245, 158, 11, 0.4);
}
.prog-input-premios-dls:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.25);
}

/* ==========================================================================
   RELOJ DIGITAL EN TIEMPO REAL
   ========================================================================== */
.digital-clock {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 12px;
  border-radius: var(--radius-md);
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.12);
  user-select: none;
}

.clock-icon {
  font-size: 16px;
  animation: pulse-clock 2s infinite ease-in-out;
}

@keyframes pulse-clock {
  0%, 100% { opacity: 0.8; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.1); }
}

.clock-content {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: right;
}

.clock-time {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  color: #fbbf24;
  letter-spacing: 0.5px;
}

.clock-date {
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: capitalize;
}

/* ==========================================================================
   LISTAS DINÁMICAS (Flujos Bs, Flujos $, Pagos Móviles, Gastos)
   ========================================================================== */
.flow-summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.flow-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 13px;
  color: var(--text-secondary);
}

.flow-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 14px;
}

.badge-tag {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-tag.plus {
  background: var(--emerald-bg);
  color: var(--emerald);
}
.badge-tag.minus {
  background: var(--rose-bg);
  color: var(--rose);
}

/* ==========================================================================
   CALCULADORA DE BILLETES (ARQUEO FÍSICO)
   ========================================================================== */
.bill-counter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.bill-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bill-item-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.bill-subtotal {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  text-align: right;
  font-weight: 600;
}

/* ==========================================================================
   BOTONES Y ACCIONES
   ========================================================================== */
.actions-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s;
  outline: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--teal));
  color: #fff;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--rose-bg);
  border-color: var(--rose);
  color: var(--rose);
}
.btn-danger:hover {
  background: var(--rose);
  color: #fff;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* ==========================================================================
   CUADRE SEMANAL & BANQUERO
   ========================================================================== */
.kpi-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}
.kpi-card.emerald::before { background: var(--emerald); }
.kpi-card.blue::before { background: var(--blue); }
.kpi-card.amber::before { background: var(--amber); }
.kpi-card.teal::before { background: var(--teal); }

.kpi-title {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 6px;
}

.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
}

.kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Caja de Liquidación Banquero (Destacada) */
.banker-settlement-card {
  background: linear-gradient(145deg, var(--bg-card), var(--bg-surface));
  border: 2px solid var(--teal);
  border-radius: var(--radius-xl);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(20, 184, 166, 0.15);
}

.banker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
}

.banker-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.banker-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.banker-box-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
}

.banker-box-amount {
  font-family: var(--font-mono);
  font-size: 28px;
  font-weight: 900;
  color: var(--teal);
  margin: 6px 0;
}

/* ==========================================================================
   MODAL / POPUPS (Pago Móvil, Gastos, Celular QR, Conectar)
   ========================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: modalScale 0.2s ease-out;
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN MÓVIL (INFERIOR - TOUCH)
   ========================================================================== */
.mobile-bottom-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 6px 12px;
  z-index: 40;
  box-shadow: 0 -4px 12px rgba(0,0,0,0.3);
}

.mobile-bottom-bar .bottom-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  padding: 6px 0;
  cursor: pointer;
}

.mobile-bottom-bar .bottom-nav-btn.active {
  color: var(--emerald);
}

.mobile-bottom-bar .bottom-nav-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .top-navbar {
    padding: 10px 14px;
  }
  .main-nav {
    display: none; /* Se usa la barra inferior en móvil */
  }
  .mobile-bottom-bar {
    display: flex;
  }
  .app-container {
    padding-bottom: 90px;
  }
  .actions-bar {
    flex-direction: column;
  }
  .actions-bar .btn {
    width: 100%;
    justify-content: center;
  }
  .banker-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   COMISIÓN DE VENTAS DE LAS CAJERAS (CASILLAS SELECCIONABLES Y TARJETAS)
   ========================================================================== */
.comisiones-section-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cajeras-selection-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.selection-step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-step-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.checkbox-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  transition: all 0.15s ease;
  user-select: none;
}

.checkbox-chip:hover {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.05);
}

.checkbox-chip.active,
.checkbox-chip:has(input:checked) {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.checkbox-chip input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.checkbox-chip-wrapper {
  position: relative;
  display: flex;
  align-items: stretch;
}

.checkbox-chip-wrapper .checkbox-chip {
  flex: 1;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.checkbox-chip-wrapper .chip-delete-btn {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-left: 1px dashed var(--border);
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
}

.checkbox-chip-wrapper .chip-delete-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: var(--rose);
  border-color: var(--rose);
}

.btn-preset-pct {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-preset-pct:hover,
.btn-preset-pct.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}

.moneda-toggle-group {
  display: flex;
  gap: 8px;
}

.btn-moneda-toggle {
  flex: 1;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.btn-moneda-toggle.active {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
}

.cajeras-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.cajera-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.cajera-card:hover {
  border-color: var(--teal);
}

.cajera-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}

.cajera-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.cajera-programas-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  align-items: center;
}

.cajera-program-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
}

.cajera-program-pill .pct-badge {
  background: var(--teal);
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 800;
  font-size: 11px;
}

.cajera-card-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

/* ==========================================================================
   LOGO OFICIAL & MARCA
   ========================================================================== */
.main-app-logo {
  height: 46px;
  max-width: 150px;
  object-fit: contain;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
  transition: transform 0.2s ease, filter 0.2s ease;
}

.main-app-logo:hover {
  transform: scale(1.03);
}

body.light-theme .main-app-logo {
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.2));
}

/* ==========================================================================
   DIRECTORIO Y PERFILES DE CAJERAS (SECCIÓN COMPLETA)
   ========================================================================== */
.cajeras-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.cajera-profile-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.cajera-profile-card:hover {
  border-color: var(--teal);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.cajera-profile-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cajera-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
  border: 2px solid var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.cajera-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cajera-avatar-placeholder {
  font-size: 34px;
}

.cajera-profile-info {
  flex: 1;
  min-width: 0;
}

.cajera-profile-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 4px;
  word-break: break-word;
}

.cajera-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.cajera-badge-pill {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cajera-badge-cedula {
  background: rgba(59, 130, 246, 0.15);
  color: var(--blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.cajera-badge-edad {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.cajera-details-list {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 13px;
  border: 1px solid var(--border);
}

.cajera-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
}

.cajera-detail-label {
  font-weight: 700;
  color: var(--text-muted);
  min-width: 70px;
}

.cajera-detail-val {
  color: var(--text-primary);
  font-weight: 600;
  word-break: break-word;
}

.cajera-shift-banner {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cajera-shift-24x48 {
  background: rgba(20, 184, 166, 0.15);
  color: var(--teal);
  border: 1px solid rgba(20, 184, 166, 0.3);
}

.cajera-shift-7am7pm {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cajera-shift-custom {
  background: rgba(148, 163, 184, 0.15);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.cajera-comisiones-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.cajera-profile-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: auto;
}

/* Selector de Turno con botones táctiles */
.turno-selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-turno-opt {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-turno-opt:hover {
  border-color: var(--teal);
}

.btn-turno-opt.active {
  border-color: var(--teal);
  background: rgba(20, 184, 166, 0.12);
  color: var(--teal);
  box-shadow: 0 0 0 1px var(--teal);
}

.photo-upload-container {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border);
}

.photo-preview-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--teal);
  background: var(--bg-card);
}

/* ==========================================================================
   TICKET DE IMPRESIÓN (80mm / 58mm POS TÉRMICO)
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
    font-size: 12px;
  }
  .top-navbar, .main-nav, .mobile-bottom-bar, .actions-bar, .btn, .cuadre-toolbar, .no-print, .login-screen-overlay {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .card {
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .table-input {
    border: none !important;
    background: transparent !important;
    color: #000 !important;
  }
}

/* ==========================================================================
   PANTALLA DE ACCESO / LOGIN OVERLAY (GRUPO ANIMAÑÍA)
   ========================================================================== */
.login-screen-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: radial-gradient(circle at 50% 18%, #1e1b4b 0%, #0d121f 55%, #030712 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.login-screen-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: rgba(17, 24, 39, 0.94);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 35px rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  text-align: center;
  position: relative;
  animation: loginCardSlideUp 0.35s ease-out;
}

@keyframes loginCardSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.login-logo-wrap {
  margin-bottom: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-logo-img {
  max-width: 180px;
  height: auto;
  filter: drop-shadow(0 0 16px rgba(245, 158, 11, 0.45));
}

.login-title {
  font-size: 21px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.login-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-field label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.login-input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  color: #fff;
  font-size: 14px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.login-input:focus {
  outline: none;
  border-color: var(--amber);
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.login-input-icon {
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: var(--text-muted);
  pointer-events: none;
}

.login-btn-toggle-eye {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  font-size: 14px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.login-btn-toggle-eye:hover {
  color: #fff;
}

.login-btn-submit {
  margin-top: 8px;
  padding: 13px 18px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #111827;
  font-weight: 800;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.35);
  transition: all 0.2s ease;
}

.login-btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
}

.login-btn-submit:active {
  transform: translateY(0);
}

.login-error-alert {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 12px;
  display: none;
  align-items: center;
  gap: 8px;
  text-align: left;
}

.login-error-alert.show {
  display: flex;
}

.login-quick-roles {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.login-quick-roles-title {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 10px;
  letter-spacing: 0.04em;
}

.login-pills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.login-pill-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  font-size: 11px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
}

.login-pill-btn:hover {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fff;
}

.login-pill-name {
  font-weight: 700;
}

.login-pill-creds {
  font-size: 10px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ==========================================================================
   RESTRICCIONES DE ACCESO POR ROL (CAJERA / SUPERADMIN)
   ========================================================================== */
body.role-cajera .admin-only,
body.role-cajera .superadmin-only,
body.role-cajera #panelComisionCajeraDiaria,
body.role-cajera #panelPerdidasBancariasDiarias,
body.role-cajera #panelPerdidasBancariasSemanales,
body.role-cajera #agencySelectorTopPill,
body.role-cajera #view-cajeras,
body.role-cajera #view-comisiones,
body.role-cajera #view-agencias,
body.role-cajera #view-sync {
  display: none !important;
}

body.role-supervisor .admin-only,
body.role-supervisor .superadmin-only,
body.role-supervisor #view-cajeras,
body.role-supervisor #view-comisiones,
body.role-supervisor #view-agencias,
body.role-supervisor #view-sync {
  display: none !important;
}

body.role-admin .superadmin-only,
body.role-cajera .superadmin-only,
body.role-supervisor .superadmin-only,
.superadmin-only {
  display: none !important;
}

body.role-superadmin .agency-pill.superadmin-only {
  display: flex !important;
}

body.role-superadmin button.superadmin-only,
body.role-superadmin .nav-tab.superadmin-only {
  display: inline-flex !important;
}

#view-saas {
  display: none;
  width: 100%;
}

#view-saas.active,
section#view-saas.active {
  display: block !important;
  width: 100%;
}

/* ==========================================================================
   SINCRONIZACIÓN EN TIEMPO REAL - PROGRAMA MATRIX / MATRIX B
   ========================================================================== */
.badge-matrix-live {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-left: 6px;
  vertical-align: middle;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.input-prog-matrix {
  border-color: rgba(16, 185, 129, 0.35) !important;
  background: rgba(16, 185, 129, 0.04) !important;
}

.input-prog-matrix:focus {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25) !important;
}

@keyframes pulseHighlightMatrix {
  0% {
    background-color: rgba(16, 185, 129, 0.45);
    outline: 2px solid #10b981;
  }
  50% {
    background-color: rgba(16, 185, 129, 0.20);
    outline: 1px solid rgba(16, 185, 129, 0.5);
  }
  100% {
    background-color: transparent;
    outline: none;
  }
}

.pulse-highlight-matrix {
  animation: pulseHighlightMatrix 3.5s ease-out;
}

@keyframes spinRefresh {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#btnRefrescarCuadre:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.35), rgba(16, 185, 129, 0.35)) !important;
  border-color: rgba(56, 189, 248, 0.8) !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.35);
  transform: translateY(-1px);
}
#btnRefrescarCuadre:active {
  transform: translateY(1px);
}

