:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --bg-card-hover: rgba(31, 41, 55, 0.9);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-active: rgba(16, 185, 129, 0.4);

  --emerald-500: #10b981;
  --emerald-400: #34d399;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.25);

  --amber-500: #f59e0b;
  --amber-400: #fbbf24;
  --amber-glow: rgba(245, 158, 11, 0.25);

  --rose-500: #f43f5e;
  --rose-600: #e11d48;
  --rose-glow: rgba(244, 63, 94, 0.25);

  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
}

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

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.08) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(59, 130, 246, 0.06) 0px, transparent 50%);
  color: var(--text-main);
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* App Header Consolidado (1 sola barra superior de 56px, Balanceada en 3 Columnas) */
.app-header {
  height: 56px;
  min-height: 56px;
  max-height: 56px;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(11, 15, 25, 0.92);
  backdrop-filter: blur(20px);
  position: relative;
  z-index: 100;
  flex-shrink: 0;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--emerald-500), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 4px 14px var(--emerald-glow);
}

.brand-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-tag {
  font-size: 0.65rem;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--emerald-400);
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Centro Operativo: Selector de Sucursal + Selector de Modo */
.header-center-cockpit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.parking-select {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #ffffff;
  padding: 0 12px;
  height: 36px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  transition: all 0.2s ease;
  max-width: 250px;
  min-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parking-select:focus {
  border-color: var(--emerald-500);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.view-mode-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.8);
  padding: 3px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 3px;
  flex-shrink: 0;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mode-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.4);
}

/* Acciones Derechas */
.header-right-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.hdr-btn {
  height: 38px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.hdr-btn:active {
  transform: scale(0.96);
}

.hdr-btn-shift {
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.38);
  color: #fef08a;
}

.hdr-btn-adjust {
  background: rgba(99, 102, 241, 0.14);
  border: 1px solid rgba(99, 102, 241, 0.38);
  color: #c7d2fe;
}

.hdr-btn .tool-svg {
  width: 15px;
  height: 15px;
}

.hdr-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hdr-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.hdr-icon-btn:active {
  transform: scale(0.94);
}

.hdr-icon-btn .tool-svg {
  width: 17px;
  height: 17px;
}

.icon-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.icon-btn.active {
  color: var(--emerald-400);
  border-color: var(--emerald-500);
}

/* Status Pill */
.status-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--emerald-500);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Main Container (Exact Viewport Fill - 100vh Lock) */
.main-content {
  flex: 1;
  min-height: 0;
  height: calc(100vh - 56px);
  max-height: calc(100vh - 56px);
  max-width: 1060px;
  width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0.85rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#cashierView {
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

#ownerView {
  height: 100%;
  overflow-y: auto;
}

/* Hero Gauge Card */
.gauge-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(16px);
}

.parking-info-banner {
  text-align: center;
  margin-bottom: 1.5rem;
}

.parking-name {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.parking-address {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Circular Gauge Container */
.gauge-container {
  position: relative;
  width: 250px;
  height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gauge-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.gauge-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.05);
  stroke-width: 14;
}

.gauge-fill {
  fill: none;
  stroke: var(--emerald-500);
  stroke-width: 14;
  stroke-linecap: round;
  stroke-dasharray: 691;
  stroke-dashoffset: 200;
  transition: stroke-dashoffset 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), stroke 0.4s ease;
  filter: drop-shadow(0 0 10px var(--emerald-glow));
}

.gauge-center-content {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.spots-available-number {
  font-size: 4.5rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--text-main);
  transition: transform 0.2s ease;
}

.spots-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

.occupancy-badge {
  margin-top: 1.5rem;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.occupancy-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.occupancy-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: var(--amber-400);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.occupancy-badge.full {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-500);
  border: 1px solid rgba(244, 63, 94, 0.3);
  animation: pulse-full 1.5s infinite;
}

@keyframes pulse-full {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.stats-subtext {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.stats-subtext strong {
  color: var(--text-main);
}

/* Mega Action Buttons Grid */
.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.mega-btn {
  height: 130px;
  border-radius: var(--radius-xl);
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.mega-btn:active {
  transform: scale(0.96);
}

.mega-btn-entry {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
}

.mega-btn-entry:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 12px 30px var(--emerald-glow);
}

.mega-btn-exit {
  background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  color: #ffffff;
}

.mega-btn-exit:hover {
  background: linear-gradient(135deg, #fb7185 0%, #f43f5e 100%);
  box-shadow: 0 12px 30px var(--rose-glow);
}

.mega-btn-icon {
  font-size: 2.25rem;
  line-height: 1;
}

.mega-btn-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.mega-btn-hotkey {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.25);
  border-radius: 999px;
  letter-spacing: 0.05em;
  opacity: 0.85;
}

/* Secondary Actions Bar */
.secondary-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.chip-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.chip-btn:hover {
  background: var(--bg-card-hover);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.chip-btn:active {
  transform: scale(0.95);
}

/* Turn Summary & Live Log Card */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.metric-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 10px;
  text-align: center;
}

.metric-val {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 2px;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 600;
}

/* Activity Log */
.log-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.log-list::-webkit-scrollbar {
  width: 4px;
}
.log-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  animation: slide-in 0.25s ease-out;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.log-time {
  color: var(--text-dim);
  font-family: monospace;
}

.log-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.log-badge.entry {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
}

.log-badge.exit {
  background: rgba(244, 63, 94, 0.15);
  color: var(--rose-500);
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 1.2rem;
  font-weight: 800;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 1rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--emerald-500);
}

.modal-btn-submit {
  width: 100%;
  background: var(--emerald-500);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.modal-btn-submit:hover {
  background: var(--emerald-600);
}

/* Responsiveness */
@media (max-width: 768px) {
  .actions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .mega-btn {
    height: 110px;
  }
  .mega-btn-title {
    font-size: 1.1rem;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
  }
  .app-header {
    padding: 0 1rem;
  }
  .parking-select {
    max-width: 160px;
  }
}

/* ==========================================================================
   NUEVOS MÓDULOS DE CASETA: TICKET QR, COBRO Y CORTE DE CAJA
   ========================================================================== */

/* Botón con Texto en Header */
.icon-btn-text {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn-text:hover {
  background: rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

/* Selector de Tipo de Vehículo */
.vehicle-type-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 1.2rem;
}
.vehicle-radio input {
  display: none;
}
.vehicle-btn {
  display: block;
  text-align: center;
  padding: 10px 4px;
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.vehicle-radio input:checked + .vehicle-btn {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--emerald-500);
  color: var(--emerald-400);
}

/* Input de Placas de Alto Impacto */
.plate-input {
  font-size: 1.5rem !important;
  font-weight: 900 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase !important;
  text-align: center !important;
  color: #fff !important;
  background: #000 !important;
  border: 2px solid var(--emerald-500) !important;
}

.quick-plate-chips {
  display: flex;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.tag-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  cursor: pointer;
}
.tag-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.mega-submit-btn {
  padding: 16px !important;
  font-size: 1.1rem !important;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* ==========================================================================
   TICKET TÉRMICO VISUAL & IMPRESIÓN (58mm / 80mm)
   ========================================================================== */
.ticket-modal-card {
  max-width: 380px !important;
  background: #1e293b !important;
}

.thermal-ticket {
  background: #ffffff;
  color: #000000;
  padding: 16px 14px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  border-radius: 6px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
}

.ticket-header {
  text-align: center;
  margin-bottom: 8px;
}
.ticket-brand {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
}
.ticket-parking-name {
  font-weight: 700;
  font-size: 13px;
}
.ticket-parking-address {
  font-size: 10px;
  color: #333;
}
.ticket-divider {
  text-align: center;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -1px;
  margin: 6px 0;
  color: #666;
}
.ticket-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3px;
}
.ticket-plate {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 1px;
}
.ticket-time {
  font-size: 14px;
  font-weight: 800;
}
.ticket-rates {
  text-align: center;
  margin: 4px 0;
}
.ticket-small {
  font-size: 10px;
  color: #444;
}
.ticket-qr-section {
  text-align: center;
  margin: 10px 0;
}
.ticket-qr-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
}
.ticket-qr-container img,
.ticket-qr-container canvas {
  margin: 0 auto;
  border: 4px solid #fff;
  border-radius: 4px;
}
.ticket-qr-legend {
  font-size: 10px;
  line-height: 1.25;
  color: #222;
}
.ticket-footer {
  text-align: center;
  margin-top: 8px;
  font-weight: 600;
}

.ticket-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.btn-primary-action {
  background: var(--emerald-500);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary-action:hover {
  background: var(--emerald-600);
}
.btn-secondary-action {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  padding: 10px;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary-action:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   CHECKOUT / SALIDA Y CALCULADORA DE CAMBIO
   ========================================================================== */
.checkout-details-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}
.checkout-plate-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 8px;
  margin-bottom: 10px;
}
.checkout-plate {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--emerald-400);
  letter-spacing: 1px;
}
.checkout-folio {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.checkout-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
  text-align: center;
}
.checkout-metric {
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 4px;
  border-radius: var(--radius-sm);
}
.metric-title {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}
.highlight-text {
  color: #38bdf8;
  font-size: 1rem;
}
.checkout-breakdown {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 12px;
}
.breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.breakdown-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 6px;
}
.checkout-total-number {
  font-size: 1.5rem;
  color: var(--emerald-400);
}

.payment-method-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}
.pay-method-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}
.pay-method-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-500);
  color: var(--emerald-400);
}

.quick-cash-buttons {
  display: flex;
  gap: 6px;
  margin: 6px 0 10px;
}
.cash-chip {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 4px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
.cash-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--amber-400);
}
.change-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: #fbbf24;
  font-weight: 800;
}
.change-display strong {
  font-size: 1.3rem;
}

/* Banner de Cambio de Vehículo */
.change-vehicle-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(6, 78, 59, 0.25));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-top: 14px;
  margin-bottom: 4px;
}
.change-vehicle-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.change-vehicle-icon {
  font-size: 1.5rem;
}
.change-vehicle-title {
  font-size: 0.88rem;
  color: var(--text-primary);
}
.change-vehicle-title strong {
  color: var(--emerald-400);
  letter-spacing: 0.5px;
}
.change-vehicle-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.btn-change-vehicle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}
.btn-change-vehicle:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: var(--emerald-400);
  color: var(--emerald-400);
}

/* Sección de Lista de Vehículos Activos */
.active-stays-list-section {
  margin-top: 12px;
  transition: all 0.3s ease;
}
.active-stays-list-section.collapsed {
  display: none;
}
.active-stays-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.active-stays-title-box {
  display: flex;
  align-items: center;
  gap: 6px;
}
.active-stays-icon {
  font-size: 1rem;
}
.active-stays-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}
.active-stays-badge {
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-400);
  border: 1px solid rgba(16, 185, 129, 0.35);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 12px;
}
.active-stays-summary-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Chips de Filtrado Rápido */
.stays-filter-chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 8px;
  scrollbar-width: none;
}
.stays-filter-chips::-webkit-scrollbar {
  display: none;
}
.stay-filter-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}
.stay-filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}
.stay-filter-chip.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald-500);
  color: var(--emerald-400);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

/* Contenedor con Scroll Delimitado */
.active-stays-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: rgba(0, 0, 0, 0.25);
}
.active-stays-container::-webkit-scrollbar {
  width: 6px;
}
.active-stays-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.active-stays-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.18);
  border-radius: 3px;
}
.active-stays-container::-webkit-scrollbar-thumb:hover {
  background: rgba(16, 185, 129, 0.5);
}

.active-stays-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
  padding: 2px;
}

/* Tarjeta Física de Vehículo Adentro */
.stay-chip-card {
  background: #141c2e;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 4px solid var(--accent-border, #38bdf8);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.stay-chip-card:hover {
  border-color: var(--emerald-400);
  background: #1a253d;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}
.stay-chip-card.selected {
  border-color: var(--emerald-400);
  background: rgba(16, 185, 129, 0.2);
  box-shadow: 0 0 0 2px var(--emerald-400), 0 6px 18px rgba(16, 185, 129, 0.35);
}

/* Tipos de Vehículo */
.stay-chip-card.type-auto {
  --accent-border: #38bdf8;
}
.stay-chip-card.type-suv {
  --accent-border: #2dd4bf;
}
.stay-chip-card.type-moto {
  --accent-border: #c084fc;
}
.stay-chip-card.is-noplate,
.stay-chip-card.type-noplate {
  --accent-border: #f59e0b;
  border-color: rgba(245, 158, 11, 0.5);
  background: #1f1d24;
}
.stay-chip-card.is-noplate:hover {
  border-color: #fbbf24;
  background: #2a2529;
}

.stay-chip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.stay-plate-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 3px 8px;
  border-radius: 6px;
}
.plate-box-warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.15);
}
.stay-plate-icon {
  font-size: 0.95rem;
}
.stay-plate-number {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  letter-spacing: 0.8px;
}
.plate-box-warning .stay-plate-number {
  color: #fbbf24;
}
.stay-type-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  letter-spacing: 0.5px;
}

.stay-chip-middle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 0.76rem;
}
.stay-entry-time {
  color: var(--text-dim);
}
.stay-chip-time-pill {
  font-weight: 700;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 2px 7px;
  border-radius: 12px;
}
.stay-chip-time-pill.time-urgent {
  color: #f43f5e;
  background: rgba(244, 63, 94, 0.15);
  border-color: rgba(244, 63, 94, 0.35);
}

.stay-chip-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 6px;
}
.stay-folio-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
}
.stay-select-hint {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-400);
  opacity: 0.85;
  transition: opacity 0.2s;
}
.stay-chip-card:hover .stay-select-hint {
  opacity: 1;
}

/* Toast HUD de Notificación de Cobro Exitoso */
.toast-checkout-hud {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  min-width: 380px;
  max-width: 92vw;
  background: #0f172a;
  border: 1px solid rgba(16, 185, 129, 0.6);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75), 0 0 24px rgba(16, 185, 129, 0.35);
  overflow: hidden;
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(14px);
}
.toast-checkout-hud.closing {
  animation: toastSlideUp 0.25s ease forwards;
}
@keyframes toastSlideDown {
  from {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
}
@keyframes toastSlideUp {
  from {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
  }
  to {
    opacity: 0;
    transform: translate(-50%, -24px) scale(0.95);
  }
}
.toast-hud-inner {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  gap: 14px;
}
.toast-hud-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 78, 59, 0.5));
  border: 1px solid rgba(16, 185, 129, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}
.toast-hud-content {
  flex: 1;
}
.toast-hud-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.toast-hud-title {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 800;
}
.toast-hud-barrier-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  letter-spacing: 0.5px;
}
.toast-hud-details {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--text-secondary);
}
.toast-hud-plate {
  font-weight: 800;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
}
.toast-hud-sep {
  color: var(--text-dim);
}
.toast-money {
  color: #34d399;
  font-weight: 800;
}
.toast-hud-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s;
  line-height: 1;
}
.toast-hud-close:hover {
  color: #fff;
}
.toast-hud-progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
}
.toast-hud-progress-bar {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #10b981, #34d399);
  transition: width linear;
}

/* Universal Toast HUD para notificaciones no bloqueantes */
.universal-toast-hud {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 999999;
  min-width: 320px;
  max-width: 440px;
  background: #0f172a;
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  animation: toastSlideDown 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.universal-toast-hud.toast-success {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(16, 185, 129, 0.25);
}
.universal-toast-hud.toast-warning {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(245, 158, 11, 0.25);
}
.universal-toast-hud.toast-error {
  border-color: rgba(239, 68, 68, 0.6);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(239, 68, 68, 0.25);
}
.universal-toast-hud.toast-info {
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6), 0 0 16px rgba(56, 189, 248, 0.25);
}
.universal-toast-hud.closing {
  animation: toastSlideUp 0.2s ease forwards;
}
.universal-toast-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}
.universal-toast-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}
.universal-toast-content {
  flex: 1;
}
.universal-toast-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 2px;
}
.universal-toast-message {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.35;
}
.universal-toast-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.universal-toast-close:hover {
  color: #fff;
}

/* Modal de Confirmación Estilizado */
.custom-confirm-card {
  max-width: 420px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.85);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.custom-confirm-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.custom-confirm-icon {
  font-size: 1.8rem;
}
.custom-confirm-body {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}
.custom-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.confirm-accent-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  font-weight: 700;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.confirm-accent-btn:hover {
  filter: brightness(1.1);
}

/* Corte de Turno */
.report-box {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 12px;
}
.report-row, .financial-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.9rem;
}
.report-financial-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
}
.total-highlight {
  border-top: 1px solid rgba(245, 158, 11, 0.3);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 1.1rem;
  font-weight: 900;
  color: #fbbf24;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.badge-count {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald-400);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
}

/* Reglas de Impresión Térmica ESC/POS (58mm / 80mm) */
@media print {
  body * {
    visibility: hidden;
  }
  .no-print {
    display: none !important;
  }
  #printableThermalTicket,
  #printableThermalTicket * {
    visibility: visible;
  }
  #printableThermalTicket {
    position: absolute;
    left: 0;
    top: 0;
    width: 58mm !important;
    max-width: 58mm !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
  }
}

/* ==========================================================================
   IMPRESORA VIRTUAL APPARKA POS (58mm / 80mm)
   ========================================================================== */
.virtual-printer-modal-card {
  max-width: 440px !important;
  background: #0f172a !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7) !important;
  padding: 1.25rem !important;
}

.printer-badge-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.printer-status-led {
  width: 9px;
  height: 9px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 10px #10b981;
  animation: pulse-led 2s infinite;
}

@keyframes pulse-led {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

.printer-model-name {
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #94a3b8;
}

/* Carcasa de Impresora POS */
.virtual-printer-housing {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px 14px 0 0;
  padding: 12px 14px 0 14px;
  margin-bottom: 0;
}

.printer-controls-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.printer-paper-toggle {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 3px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.paper-toggle-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.paper-toggle-btn.active {
  background: #f59e0b;
  color: #0f172a;
}

.btn-icon-subtle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-icon-subtle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Ranura de Salida con Dientes de Guillotina */
.printer-slot-opening {
  height: 8px;
  background: #000;
  border-radius: 4px;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.9);
  position: relative;
  overflow: hidden;
}

.printer-slot-teeth {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(90deg, #334155, #334155 3px, transparent 3px, transparent 6px);
}

/* Visor y Animación de Expulsión del Ticket */
.ticket-viewport {
  max-height: 440px;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-top: none;
  padding: 12px 10px;
  margin-bottom: 12px;
}

.thermal-ticket.paper-58mm {
  width: 290px;
  font-size: 11px;
}

.thermal-ticket.paper-80mm {
  width: 360px;
  font-size: 12.5px;
}

/* Animación de Salida Milimétrica */
.thermal-ticket.feeding {
  animation: feedPaper 1.2s cubic-bezier(0.15, 0.85, 0.35, 1) forwards;
}

@keyframes feedPaper {
  0% {
    transform: translateY(-80%);
    opacity: 0.2;
    clip-path: inset(0 0 90% 0);
  }
  30% {
    clip-path: inset(0 0 60% 0);
  }
  70% {
    clip-path: inset(0 0 20% 0);
  }
  100% {
    transform: translateY(0);
    opacity: 1;
    clip-path: inset(0 0 0 0);
  }
}

.ticket-business-name {
  font-size: 10px;
  color: #475569;
  font-weight: 600;
}
.ticket-rfc, .ticket-phone {
  font-size: 9.5px;
  color: #64748b;
}
.ticket-slogan {
  font-size: 10px;
  font-style: italic;
  color: #334155;
  margin-top: 3px;
}
.ticket-legal-section {
  font-size: 9px;
  color: #475569;
  text-align: justify;
  line-height: 1.3;
  margin: 6px 0;
}
.ticket-lost-notice {
  font-weight: 800;
  color: #000;
  margin-top: 4px;
}
.ticket-closing-notice {
  font-style: italic;
  margin-top: 3px;
  color: #334155;
}

.ticket-quick-actions-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 10px;
}

.btn-action-outline {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-action-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* ==========================================================================
   CONFIGURACIÓN DE TICKET (MODAL 7)
   ========================================================================== */
.config-modal-card {
  max-width: 580px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.config-tabs {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.config-tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.config-tab-btn.active {
  background: #f59e0b;
  color: #0f172a;
}

.config-tab-pane {
  display: none;
}
.config-tab-pane.active {
  display: block;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
  margin-top: 4px;
}

.radio-cards-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}
.radio-card:has(input:checked) {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}
.radio-card-content strong {
  display: block;
  font-size: 0.85rem;
  color: #fff;
  margin-bottom: 2px;
}
.radio-card-content .text-dim {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.checkbox-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: #e2e8f0;
  cursor: pointer;
}
.checkbox-option input {
  width: 16px;
  height: 16px;
  accent-color: #f59e0b;
  cursor: pointer;
}

.config-actions-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 1.25rem;
}

.btn-text-danger {
  background: none;
  border: none;
  color: var(--rose-500);
  font-size: 0.8rem;
  padding: 6px;
  cursor: pointer;
  text-decoration: underline;
}

/* ==========================================================================
   ESCÁNER DE CÁMARA (MODAL 8)
   ========================================================================== */
.camera-scanner-modal-card {
  max-width: 440px !important;
  padding: 1.25rem !important;
}

.camera-viewfinder-container {
  position: relative;
  width: 100%;
  height: 280px;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.15);
}

#scannerVideo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Retícula de Enfoque */
.scanner-reticle {
  position: absolute;
  inset: 35px;
  pointer-events: none;
}

.reticle-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border-color: #10b981;
  border-style: solid;
}
.reticle-corner.top-left { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.reticle-corner.top-right { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.reticle-corner.bottom-left { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.reticle-corner.bottom-right { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.scanner-laser-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #ef4444;
  box-shadow: 0 0 12px 2px #ef4444;
  animation: scanLaser 2s ease-in-out infinite alternate;
}

@keyframes scanLaser {
  0% { top: 5%; }
  100% { top: 95%; }
}

.scanner-overlay-status {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9);
  background: rgba(0, 0, 0, 0.5);
  padding: 4px 0;
}

.camera-controls-bar {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.camera-control-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: all 0.2s;
}
.camera-control-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}
.camera-control-btn.highlight {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

.manual-scan-fallback {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* Indicadores de hardware e interacción */
.checkout-search-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.btn-scan-camera-chip {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
.btn-scan-camera-chip:hover {
  background: rgba(56, 189, 248, 0.25);
}

.scanner-live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}
.scanner-live-dot {
  width: 7px;
  height: 7px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
}

.btn-scanner-highlight {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
  color: #38bdf8 !important;
}

/* Modal QR Gigante */
.qr-preview-modal-card {
  max-width: 360px !important;
  text-align: center;
}
.big-qr-box {
  background: #fff;
  padding: 16px;
  border-radius: 12px;
  display: inline-block;
  margin: 10px 0;
}
.big-qr-box img, .big-qr-box canvas {
  margin: 0 auto;
  display: block;
}
.big-qr-plate {
  font-size: 1.4rem;
  font-weight: 900;
  color: #10b981;
  letter-spacing: 1.5px;
}
.big-qr-folio {
  font-size: 0.85rem;
  color: var(--text-dim);
}
.big-qr-instructions {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* ==========================================================================
   PORTAL DEL DUEÑO (MULTI-SUCURSAL) & SWITCHER DE ROLES
   ========================================================================== */

/* Switcher de Modo en Header */
.view-mode-toggle {
  display: flex;
  background: rgba(15, 23, 42, 0.8);
  padding: 3px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  gap: 3px;
}

.mode-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 6px;
}

.mode-tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.mode-tab-btn.active {
  background: #0284c7;
  color: #fff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

/* Header Ejecutivo del Dueño */
.owner-header-card {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.owner-badge {
  display: inline-block;
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(2, 132, 199, 0.3);
  margin-bottom: 6px;
}

.owner-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.4px;
}

.owner-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Ocultar acciones físicas de caseta cuando el dueño está en su portal */
.cashier-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.owner-mode-active .cashier-nav-actions {
  display: none !important;
}

body.owner-mode-active #brandTagRole {
  background: rgba(2, 132, 199, 0.2);
  color: #38bdf8;
  border-color: rgba(2, 132, 199, 0.45);
}

.owner-header-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Filtro de Rango Temporal Directivo */
.owner-time-filters {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 3px;
  gap: 2px;
}

.time-filter-btn {
  background: transparent;
  color: var(--text-muted);
  border: none;
  padding: 7px 14px;
  border-radius: 9px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.time-filter-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.time-filter-btn.active {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.4);
}

.owner-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.owner-branch-select {
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.btn-owner-action {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 9px 15px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-owner-action:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

.btn-owner-refresh {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.btn-owner-refresh:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn-owner-export {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.35);
}

.btn-owner-export:hover {
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
}

/* Fila 1: KPIs Ejecutivos Simétricos (4 Columnas) */
.owner-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1100px) {
  .owner-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .owner-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.owner-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.owner-kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.kpi-icon {
  font-size: 1.5rem;
}

.kpi-pill {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 12px;
}

.kpi-pill-green {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-pill-blue {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(2, 132, 199, 0.3);
}

.kpi-pill-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.kpi-pill-emerald {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.kpi-val {
  font-size: 1.75rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.1;
  margin-bottom: 4px;
}

.kpi-title {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 12px;
}

.kpi-breakdown {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.kpi-breakdown strong {
  color: var(--text-main);
}

.owner-progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  overflow: hidden;
  margin: 6px 0;
}

.owner-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0284c7, #10b981);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.kpi-caption {
  font-size: 0.72rem;
  color: var(--text-dim);
}

/* Cajas de Sección del Dueño */
.owner-section-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin-bottom: 24px;
}

.owner-section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 8px;
}

.owner-section-heading {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.3px;
}

.owner-section-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

.owner-section-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Grid de Tarjetas de Sucursal (3 Columnas Simétricas) */
.owner-branches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) {
  .owner-branches-grid {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  }
}

.owner-branch-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.owner-branch-card:hover {
  border-color: rgba(2, 132, 199, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Botón Modificar Tarifas con Estilo Dark Glassmorphism */
.btn-branch-edit-rates {
  width: 100%;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.btn-branch-edit-rates:hover {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.4);
  color: #34d399;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
}

/* Auditoría de Cortes Interactivas */
.owner-audit-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.owner-audit-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.14) !important;
}

/* Modales Directivos de Expediente */
.modal-card-wide {
  max-width: 650px;
  width: 95%;
}

.audit-modal-body,
.antifraud-modal-body {
  padding: 20px 24px;
}

.audit-summary-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.audit-row-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.88rem;
  color: var(--text-muted);
}

.audit-row-stat strong {
  color: #fff;
  font-size: 0.95rem;
}

.audit-row-stat:last-child {
  border-bottom: none;
}

.audit-diff-banner {
  border-radius: 12px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.92rem;
  font-weight: 700;
}

.audit-diff-banner.exact {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.audit-diff-banner.shortage {
  background: rgba(244, 63, 94, 0.15);
  border: 1px solid rgba(244, 63, 94, 0.35);
  color: #fb7185;
}

.audit-diff-banner.surplus {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
}

.audit-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.btn-audit-approve {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-audit-approve:hover {
  background: rgba(16, 185, 129, 0.3);
}

.btn-audit-deduct {
  background: rgba(244, 63, 94, 0.2);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-audit-deduct:hover {
  background: rgba(244, 63, 94, 0.3);
}

.branch-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.branch-name {
  font-size: 1.05rem;
  font-weight: 900;
  color: #fff;
}

.branch-address {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.branch-badge {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
}

.branch-badge.available {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.branch-badge.warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.branch-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: rgba(0, 0, 0, 0.25);
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.branch-m-box {
  text-align: center;
}

.branch-m-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
}

.branch-m-lbl {
  font-size: 0.68rem;
  color: var(--text-dim);
  text-transform: uppercase;
  font-weight: 700;
}

.branch-footer-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.btn-branch-action {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 7px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease;
}

.btn-branch-action:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-branch-action.primary {
  background: #0284c7;
  border-color: #0284c7;
}

.btn-branch-action.primary:hover {
  background: #0369a1;
}

/* Tabla de Auditoría */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.owner-audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.owner-audit-table th {
  text-align: left;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-muted);
  font-weight: 700;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.owner-audit-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.owner-audit-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.dictamen-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 800;
}

.dictamen-cuadrado {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
}

.dictamen-faltante {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
}

.dictamen-sobrante {
  background: rgba(2, 132, 199, 0.15);
  color: #38bdf8;
}

/* Monitor Antifraude Logs */
.owner-antifraud-logs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.owner-log-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
}

.owner-log-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.owner-log-icon {
  font-size: 1.1rem;
}

.owner-log-text strong {
  color: #fff;
}

.owner-log-time {
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Estilos Corte Ciego Casetero */
.chip-btn-amber {
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border-color: rgba(245, 158, 11, 0.3) !important;
}

.chip-btn-amber:hover {
  background: rgba(245, 158, 11, 0.25) !important;
}

.blind-shift-body {
  padding: 10px 0;
}

.blind-shift-alert {
  background: rgba(2, 132, 199, 0.12);
  border: 1px solid rgba(2, 132, 199, 0.3);
  color: #bae6fd;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.82rem;
  line-height: 1.4;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Balance de Turno: 4 métricas */
.metrics-row-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 600px) {
  .metrics-row-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Modal de Autenticación de Bóveda (PIN Dueño) */
.modal-card-pin {
  max-width: 360px !important;
  width: 90% !important;
  text-align: center;
}

.pin-auth-body {
  padding: 16px 20px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-lock-icon {
  font-size: 2.5rem;
  margin-bottom: 8px;
}

.pin-auth-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.4;
  text-align: center;
}

.pin-display {
  margin-bottom: 16px;
}

.pin-input-field {
  width: 170px;
  letter-spacing: 14px;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 900;
  background: rgba(15, 23, 42, 0.9);
  border: 2px solid rgba(2, 132, 199, 0.4);
  color: #38bdf8;
  border-radius: 12px;
  padding: 8px 12px;
  outline: none;
}

.pin-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 220px;
  margin-bottom: 14px;
}

.pin-key {
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-key:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: scale(1.04);
}

.pin-key:active {
  transform: scale(0.95);
}

.pin-clear {
  color: #f87171;
  background: rgba(244, 63, 94, 0.1);
}

.pin-enter {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  font-weight: 800;
}

.pin-auth-footer {
  font-size: 0.72rem;
  color: var(--text-dim);
}

.btn-owner-logout {
  background: rgba(244, 63, 94, 0.15) !important;
  color: #fb7185 !important;
  border-color: rgba(244, 63, 94, 0.35) !important;
}

.btn-owner-logout:hover {
  background: rgba(244, 63, 94, 0.25) !important;
  color: #fca5a5 !important;
}

/* Badges de Pensión */
.badge-pension-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-pension-warning {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-pension-expired {
  background: rgba(244, 63, 94, 0.15);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.35);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 700;
}

/* ==========================================================================
/* ==========================================================================
   BARRA DE HERRAMIENTAS PREMIUM DE CASETA (COMMAND TOOLBAR CON ICONOS SVG)
   ========================================================================== */

.caseta-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 8px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  margin-bottom: 1.25rem;
}

.command-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.command-group-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.12);
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s ease;
  user-select: none;
}

.toolbar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.toolbar-btn:active {
  transform: scale(0.96);
}

/* Candado Premium para Cierre de Turno */
.toolbar-btn-shift {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  box-shadow: 0 2px 10px rgba(245, 158, 11, 0.15);
}

.toolbar-btn-shift:hover {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(245, 158, 11, 0.55);
  color: #fff;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.toolbar-btn-shift .tool-svg {
  stroke: #fbbf24;
}

/* Autos en Patio */
.toolbar-btn-vehicles {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.28);
  color: #38bdf8;
}

.toolbar-btn-vehicles:hover {
  background: rgba(56, 189, 248, 0.18);
  border-color: rgba(56, 189, 248, 0.45);
  color: #fff;
}

.toolbar-btn-vehicles .tool-svg {
  stroke: #38bdf8;
}

.toolbar-badge {
  background: #38bdf8;
  color: #0f172a;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: -0.01em;
}

/* Ajuste Aforo */
.toolbar-btn-adjust {
  background: rgba(148, 163, 184, 0.08);
  border-color: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.toolbar-pin-dot {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
  letter-spacing: 0.04em;
}

/* Icon Buttons en Toolbar */
.toolbar-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.toolbar-icon-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.toolbar-icon-btn:active {
  transform: scale(0.94);
}

.toolbar-icon-btn.active {
  color: var(--emerald-400);
  border-color: rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.1);
}

.tool-svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.toolbar-btn:hover .tool-svg,
.toolbar-icon-btn:hover .tool-svg {
  transform: scale(1.08);
}

/* ==========================================================================
   TABLERO DE AFORO MINIMALISTA Y PRECISO (TOUCH-FIRST COCKPIT)
   ========================================================================== */
.hud-pure-card {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.95) 0%, rgba(10, 15, 29, 0.98) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl, 22px);
  padding: 1rem 1.4rem;
  position: relative;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(20px);
  margin-bottom: 0;
  flex-shrink: 0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Semáforo Atmosférico Limpio */
.hud-pure-card.status-available {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: 0 14px 44px -8px rgba(16, 185, 129, 0.2), 0 0 0 1px rgba(16, 185, 129, 0.15);
}
.hud-pure-card.status-warning {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 14px 44px -8px rgba(245, 158, 11, 0.22), 0 0 0 1px rgba(245, 158, 11, 0.2);
}
.hud-pure-card.status-full {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 14px 48px -8px rgba(239, 68, 68, 0.3), 0 0 0 1px rgba(239, 68, 68, 0.3);
}

/* Cabecera Interior del Card */
.hud-card-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.hud-clock-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'SF Mono', 'Roboto Mono', 'Fira Code', monospace;
  font-size: 0.86rem;
  font-weight: 800;
  color: #f1f5f9;
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.inline-clock-svg {
  width: 14px;
  height: 14px;
  color: #38bdf8;
  flex-shrink: 0;
}

.hud-clock-badge .clock-ampm {
  font-size: 0.7rem;
  color: #38bdf8;
  font-weight: 900;
}

.hud-clock-badge .clock-date-inline {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
  margin-left: 4px;
}

/* Badge de Estado Semafórico */
.hud-card-topbar .occupancy-badge {
  margin: 0;
  padding: 5px 16px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid transparent;
}

.hud-card-topbar .occupancy-badge.available {
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.hud-card-topbar .occupancy-badge.warning {
  background: rgba(245, 158, 11, 0.18);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.hud-card-topbar .occupancy-badge.full {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.45);
  color: #f87171;
}

/* Chip de Tarifa Integrado */
.hud-rate-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
}

.hud-rate-badge .rate-badge-lbl {
  font-weight: 800;
  color: #fbbf24;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}

.hud-rate-badge .rate-badge-val {
  color: #ffffff;
  font-weight: 900;
  font-size: 0.82rem;
}

/* Hero Monumental */
.hud-hero-stage {
  padding: 0.4rem 0 0.35rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hud-monumental-number {
  font-size: clamp(4.5rem, 10.5vh, 6.8rem);
  font-weight: 950;
  letter-spacing: -0.06em;
  color: #ffffff;
  line-height: 0.92;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  margin: 0;
  transition: all 0.2s ease;
}

.hud-pure-card.status-warning .hud-monumental-number {
  color: #fef08a;
  text-shadow: 0 4px 24px rgba(245, 158, 11, 0.3);
}

.hud-pure-card.status-full .hud-monumental-number {
  color: #fca5a5;
  text-shadow: 0 4px 24px rgba(239, 68, 68, 0.4);
}

.hud-hero-label {
  font-size: 0.88rem;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-top: 4px;
}

/* Barra de Capacidad Interactiva */
.hud-capacity-pure {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 16px;
  margin-top: 0.25rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}

.hud-capacity-pure:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.18);
}

.hud-capacity-pure:active {
  transform: scale(0.99);
}

.hud-capacity-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
  margin-bottom: 6px;
}

.hud-capacity-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
}

.inline-car-svg {
  width: 16px;
  height: 16px;
  color: #38bdf8;
  flex-shrink: 0;
}

.hud-capacity-info-row strong {
  color: #ffffff;
  font-weight: 850;
}

.hud-capacity-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #38bdf8;
  font-weight: 800;
}

.hud-capacity-chevron {
  font-size: 1.15rem;
  line-height: 1;
  color: #94a3b8;
  font-weight: 700;
}

.hud-capacity-track {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.hud-capacity-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #38bdf8 100%);
  border-radius: 999px;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
}

/* ==========================================================================
   BOTONES TÁCTILES GIGANTES DE CASETA (LLENAN EL 100% DEL ESPACIO RESTANTE)
   ========================================================================== */
.tablet-mega-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin: 0;
}

.tablet-mega-grid .mega-btn {
  height: 100%;
  min-height: 0;
  width: 100%;
  padding: 1.25rem 1rem;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
  transition: transform 0.12s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.12s ease, filter 0.12s ease;
}

.mega-btn-halo {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 25%, rgba(255, 255, 255, 0.22), transparent 70%);
  pointer-events: none;
}

.mega-btn-icon-disc {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 6px 16px rgba(0, 0, 0, 0.25);
}

.mega-svg {
  width: 32px;
  height: 32px;
  stroke: #ffffff;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tablet-mega-grid .mega-btn-title {
  font-size: clamp(1.35rem, 2.7vh, 2.1rem);
  font-weight: 950;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mega-btn-badge {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 4px;
}

.tablet-mega-grid .mega-btn-entry {
  background: linear-gradient(145deg, #059669 0%, #10b981 50%, #059669 100%);
  border: 1px solid rgba(52, 211, 153, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 16px 36px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(16, 185, 129, 0.25);
}

.tablet-mega-grid .mega-btn-exit {
  background: linear-gradient(145deg, #e11d48 0%, #f43f5e 50%, #be123c 100%);
  border: 1px solid rgba(251, 113, 133, 0.6);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.35), 0 16px 36px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(244, 63, 94, 0.25);
}

.tablet-mega-grid .mega-btn:active {
  transform: scale(0.975);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.35), 0 6px 16px rgba(0, 0, 0, 0.5);
  filter: brightness(0.94);
}

/* Tool option hover effect */
.btn-tool-option {
  transition: all 0.18s ease;
}

.btn-tool-option:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

.btn-tool-option:active {
  transform: scale(0.98);
}

/* Responsive adjustments for smaller screens */
@media (max-width: 640px) {
  .app-header {
    padding: 0 8px;
    gap: 6px;
  }

  .parking-select {
    max-width: 140px;
    font-size: 0.78rem;
  }

  .mode-tab-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
  }

  .hdr-btn-text {
    display: none;
  }

  .tablet-mega-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}



/* ==========================================================================
   Sesión: pantalla de inicio, panel de sincronización y seguridad del dueño
   ========================================================================== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: var(--bg-primary);
}
.login-screen[hidden] { display: none; }
.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem 1.75rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.login-loading {
  color: var(--text-muted);
  text-align: center;
  padding: 1rem 0;
}
.login-screen[data-state="loading"] .login-form { display: none; }
.login-screen[data-state="login"] .login-loading { display: none; }
.login-error {
  min-height: 1.2em;
  margin: 0 0 0.75rem;
  color: var(--rose-500);
  font-size: 0.85rem;
  font-weight: 600;
}
.login-error:empty { min-height: 0; margin: 0; }
.login-hint {
  margin-top: 1rem;
  color: var(--text-dim);
  font-size: 0.78rem;
  text-align: center;
}
.modal-btn-submit:disabled { opacity: 0.6; cursor: wait; }

.session-panel { display: flex; flex-direction: column; gap: 10px; }
.session-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.9rem;
}
.session-label { color: var(--text-muted); }
.session-value { color: var(--text-main); font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.session-failed {
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
}
.session-failed[hidden] { display: none; }
.session-failed-title { color: var(--rose-500); font-weight: 700; font-size: 0.85rem; margin-bottom: 6px; }
.session-failed-list {
  margin: 0 0 10px 18px;
  color: var(--text-muted);
  font-size: 0.8rem;
  max-height: 140px;
  overflow-y: auto;
}
.session-logout {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.45);
  color: var(--rose-500);
}

.owner-login-desc { color: var(--text-muted); font-size: 0.85rem; margin-bottom: 1rem; }
.owner-security-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.owner-security-note:empty { display: none; }
.owner-security-note { color: var(--amber-400); font-size: 0.85rem; margin: 0 0 10px; }
.owner-table-scroll { overflow-x: auto; }
.owner-empty-cell { text-align: center; padding: 24px; color: var(--text-dim); }
.owner-cell-sub { color: var(--text-dim); font-size: 0.75rem; margin-top: 2px; }
.owner-actions-cell { white-space: nowrap; }
.btn-owner-mini { display: inline-flex; vertical-align: middle; padding: 6px 10px; font-size: 0.78rem; }
.btn-owner-mini + .btn-owner-mini { margin-left: 6px; }
.badge-audit-ok,
.badge-audit-warn {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}
.badge-audit-ok { background: rgba(16, 185, 129, 0.15); color: var(--emerald-400); }
.badge-audit-warn { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }

@media (max-width: 600px) {
  .owner-security-actions { width: 100%; }
  .owner-security-actions .btn-owner-action { flex: 1; }
}

/* ==========================================================================
   Encabezado compacto: en tablet vertical los botones ya no se enciman
   ========================================================================== */
.parking-select { flex: 0 1 250px; }

@media (max-width: 1100px) {
  .header-right-actions .hdr-btn-text { display: none; }
  .header-right-actions .hdr-btn { padding: 0 10px; }
  .header-center-cockpit { gap: 8px; }
  .parking-select { min-width: 110px; }
}

@media (max-width: 900px) {
  .brand-title { display: none; }
  .mode-tab-label { display: none; }
  .mode-tab-btn { padding: 5px 10px; font-size: 1rem; }
  .app-header { gap: 8px; }
}

@media (max-width: 600px) {
  .app-header { padding: 0 8px; gap: 6px; }
  .brand-icon { width: 30px; height: 30px; font-size: 1rem; }
  .status-pill { padding: 4px 8px; }
  .parking-select { min-width: 0; padding: 0 8px; }
  .header-right-actions { gap: 4px; }
  .header-right-actions .hdr-btn { padding: 0 8px; }
  .header-right-actions .toolbar-pin-dot { display: none; }
}

/* Celular: el encabezado baja a dos renglones (marca + acciones / sucursal + modo) */
@media (max-width: 520px) {
  .app-header {
    height: auto;
    max-height: none;
    flex-wrap: wrap;
    row-gap: 6px;
    padding: 6px 8px;
  }
  .header-center-cockpit {
    order: 3;
    flex: 1 1 100%;
    justify-content: space-between;
  }
  .parking-select { flex: 1 1 auto; max-width: none; }
}

/* Píldora de conexión: el color acompaña al estado, no solo el punto */
.status-pill[data-state="offline"],
.status-pill[data-state="sync"] {
  background: rgba(245, 158, 11, 0.12);
  color: var(--amber-400);
  border-color: rgba(245, 158, 11, 0.3);
}
.status-pill[data-state="error"] {
  background: rgba(244, 63, 94, 0.12);
  color: var(--rose-500);
  border-color: rgba(244, 63, 94, 0.3);
}

/* ==========================================================================
   Portal del dueño: monitor antifraude, auditoría y pensiones
   (estas clases se usaban sin estilos definidos)
   ========================================================================== */
.owner-antifraud-logs { display: flex; flex-direction: column; gap: 8px; max-height: 420px; overflow-y: auto; }
.owner-antifraud-item {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  transition: background 0.15s ease;
}
.owner-antifraud-item:hover { background: rgba(255, 255, 255, 0.06); }
.antifraud-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.antifraud-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}
.antifraud-time { color: var(--text-dim); font-size: 0.75rem; }
.antifraud-text { color: var(--text-muted); font-size: 0.85rem; line-height: 1.4; margin: 0; }
.log-badge-rose { background: rgba(244, 63, 94, 0.15); color: var(--rose-500); }
.log-badge-amber { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }
.log-badge-blue { background: rgba(56, 189, 248, 0.15); color: #7dd3fc; }

.badge-audit-danger,
.badge-audit-warning {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
}
.badge-audit-danger { background: rgba(244, 63, 94, 0.15); color: var(--rose-500); }
.badge-audit-warning { background: rgba(245, 158, 11, 0.15); color: var(--amber-400); }

.pension-plate-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.btn-table-action {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  margin: 2px 0;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.btn-table-action:hover { background: rgba(255, 255, 255, 0.14); }

/* Boleto perdido en el desglose de cobro */
.lost-ticket-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: var(--amber-400);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}
.lost-ticket-toggle input { width: 18px; height: 18px; accent-color: var(--amber-500); }

/* Acciones de modal: botón secundario junto al principal (se usaban sin estilos) */
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
  align-items: stretch;
}
.modal-actions .modal-btn-submit { margin-top: 0; }
.modal-btn-cancel {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.modal-btn-cancel:hover { background: rgba(255, 255, 255, 0.1); color: var(--text-main); }
