/* ============================================================================
   PANDY MODERN · FINTECH DESIGN & MULTI-SEDES SYSTEM
   Integración del diseño Fintech (DOC. Diseño) + Soporte Multi-Sedes
   ============================================================================ */

:root {
  --pm-ink: #14142b;
  --pm-ink-soft: #4f5572;
  --pm-muted: #8990a8;
  --pm-line: #e8e8f1;
  --pm-line-strong: #dcdae9;
  --pm-canvas: #f6f7fb;
  --pm-surface: #ffffff;
  --pm-purple: #6A1B9A;
  --pm-purple-dark: #4e21c9;
  --pm-purple-light: #7c4de6;
  --pm-purple-soft: #f3ecff;
  --pm-purple-softer: #fbf9ff;
  --pm-green: #07996a;
  --pm-green-soft: #e6f8f1;
  --pm-amber: #d97706;
  --pm-amber-soft: #fef3c7;
  --pm-nav: #171327;
  --pm-nav-soft: #211b36;
  --pm-nav-muted: #9c95b5;
  --pm-shadow: 0 10px 30px rgba(40, 30, 80, 0.06);
  --pm-shadow-lg: 0 18px 45px rgba(23, 19, 39, 0.14);
}

body {
  font-family: 'DM Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  background-color: var(--pm-canvas) !important;
  color: var(--pm-ink);
}

/* ============================================================================
   SIDEBAR MODERNO (Dark Fintech)
   ============================================================================ */

.pm-sidebar {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  width: 236px;
  background: radial-gradient(circle at 20% 5%, rgba(116, 76, 230, 0.28), transparent 16rem), var(--pm-nav);
  color: white;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  padding: 24px 18px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.pm-sidebar.hidden,
body:not(.authenticated) .pm-sidebar,
body:not(.authenticated) .app-header,
body.not-logged-in .pm-sidebar,
body.not-logged-in .app-header,
body:has(#login-container:not(.hidden)) .pm-sidebar,
body:has(#login-container:not(.hidden)) .app-header,
body:has(#loading-container:not(.hidden)) .pm-sidebar,
body:has(#loading-container:not(.hidden)) .app-header {
  display: none !important;
}

body:not(.authenticated) .main-container,
body:has(#login-container:not(.hidden)) .main-container,
body:has(#loading-container:not(.hidden)) .main-container {
  margin-left: 0 !important;
  width: 100% !important;
}

.brand-mark-logo {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  object-fit: contain;
  box-shadow: 0 8px 20px rgba(102, 56, 232, 0.32);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.brand-mark-logo:hover {
  transform: scale(1.05);
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  padding: 48px 40px;
  border-radius: 28px;
  box-shadow: 0 32px 80px rgba(78, 33, 201, 0.28), 0 12px 35px rgba(0, 0, 0, 0.08);
  text-align: center;
  max-width: 460px;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.login-logo-container {
  width: 104px;
  height: 104px;
  margin: 0 auto 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-logo {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  object-fit: contain;
  box-shadow: 0 16px 36px rgba(106, 27, 154, 0.35);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease;
}

.login-logo:hover {
  transform: scale(1.06) rotate(-2deg);
  box-shadow: 0 22px 48px rgba(106, 27, 154, 0.48);
}

.login-title {
  font-family: 'Manrope', sans-serif !important;
  font-size: 28px !important;
  font-weight: 800 !important;
  color: var(--pm-ink) !important;
  letter-spacing: -0.6px !important;
  margin-bottom: 6px !important;
}

.login-brand-tagline {
  font-size: 11px;
  font-weight: 800;
  color: var(--pm-purple);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.login-subtitle {
  color: var(--pm-ink-soft) !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  margin-bottom: 28px !important;
}

.pm-sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1990;
  border: none;
}

.pm-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(145deg, #8c68f5, var(--pm-purple));
  box-shadow: 0 8px 20px rgba(102, 56, 232, 0.32);
  color: white;
  font-family: "Manrope", sans-serif;
  font-size: 21px;
  font-weight: 800;
  flex-shrink: 0;
}

.pm-brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
}

.pm-brand-name {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white;
  line-height: 1;
}

.pm-brand-tag {
  font-size: 11px;
  color: var(--pm-nav-muted);
  margin-top: 4px;
  font-weight: 500;
}

.pm-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 24px;
}

.pm-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 0;
  color: var(--pm-nav-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  text-align: left;
}

.pm-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  transform: translateX(2px);
}

.pm-nav-item.active {
  background: rgba(116, 76, 230, 0.22);
  color: white;
  box-shadow: none;
  font-weight: 700;
}

/* Estado del botón de Lectura por voz en el Sidebar */
#pm-toggle-voice {
  position: relative;
  transition: all 0.2s ease;
}

.pm-voice-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.08);
  color: #9c95b5;
  transition: all 0.2s ease;
}

.pm-voice-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #64748b;
  transition: all 0.2s ease;
}

#pm-toggle-voice.voice-enabled {
  background: rgba(16, 185, 129, 0.14) !important;
  color: #ffffff !important;
}

#pm-toggle-voice.voice-enabled .pm-voice-icon,
#pm-toggle-voice.voice-enabled svg {
  color: #34d399 !important;
  stroke: #34d399 !important;
}

#pm-toggle-voice.voice-enabled .pm-voice-status {
  background: rgba(16, 185, 129, 0.24);
  color: #34d399;
}

#pm-toggle-voice.voice-enabled .pm-voice-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.pm-sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.secondary-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  padding-bottom: 8px;
}

.account-card {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  padding: 8px 6px;
  text-align: left;
  cursor: pointer;
  color: white;
  transition: 160ms ease;
}

.account-card:hover {
  background: rgba(255, 255, 255, 0.06);
}

.account-card .avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8c68f5, #6a1b9a);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}

.account-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.account-copy strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.account-copy small {
  margin-top: 2px;
  color: var(--pm-nav-muted);
  font-size: 11px;
}

.plan-card {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  margin-top: 4px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  color: #d8ccff;
}

.plan-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #bda9fb;
  flex-shrink: 0;
}

.plan-card > span:last-child {
  display: flex;
  flex-direction: column;
}

.plan-card strong {
  font-size: 12px;
}

.plan-card small {
  margin-top: 2px;
  font-size: 10px;
  color: var(--pm-nav-muted);
}

.pm-sede-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  width: 100%;
}

.pm-sede-card:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(168, 127, 251, 0.4);
}

.pm-sede-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c4de6, #6a1b9a);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-sede-card-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.pm-sede-card-copy small {
  font-size: 10px;
  color: var(--pm-nav-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pm-sede-card-copy strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f3ecff;
}

.pm-logout {
  color: #fca5a5 !important;
}

.pm-logout:hover {
  background: rgba(239, 68, 68, 0.15) !important;
  color: #fecaca !important;
}

.pm-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 6px;
  cursor: pointer;
  border-radius: 8px;
  color: var(--pm-ink);
  margin-right: 8px;
}

/* ============================================================================
   AJUSTE DE LAYOUT CON SIDEBAR
   ============================================================================ */

@media (min-width: 960px) {
  .main-header,
  .app-header {
    display: none !important;
  }
  .app-view {
    margin-left: 236px !important;
    margin-right: 0 !important;
    width: calc(100% - 236px) !important;
    max-width: none !important;
    padding: 28px 28px 100px !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 959px) {
  /* Header fijo moderno en pantallas móviles */
  .app-header {
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #f1f5f9 !important;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
    height: 58px !important;
    min-height: 58px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 14px !important;
    z-index: 990 !important;
  }

  .app-header .navbar {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
  }

  /* Ocultar elementos redundantes en pantallas móviles (celular):
     El badge de días restantes y el menú de 3 puntos ya no son necesarios
     porque la información del plan y todas las opciones están integradas
     en el menú lateral (drawer) que se abre con el botón de menú */
  .app-header .user-menu,
  .app-header #days-remaining-badge,
  .app-header .dropdown,
  .app-header #menu-button,
  .app-header #dropdown-menu,
  .app-header #subscription-shield-container,
  .app-header #subscription-text {
    display: none !important;
  }

  .app-header .nav-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .app-header .logo-container {
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .app-header .nav-logo {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  .app-header .nav-brand span {
    font-size: 18px !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #0f172a !important;
    font-family: 'Plus Jakarta Sans', var(--pm-font-sans) !important;
  }

  .pm-sidebar {
    transform: translateX(-100%);
  }
  .pm-sidebar.open {
    transform: translateX(0);
  }
  .pm-sidebar.open + .pm-sidebar-backdrop,
  .pm-sidebar-backdrop.show {
    display: block;
  }
  .pm-menu-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    color: #0f172a !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin-right: 4px !important;
    transition: all 0.15s ease !important;
  }
  .pm-menu-toggle:active {
    background: #ede9fe !important;
    transform: scale(0.96) !important;
  }

  .app-view {
    padding-top: 12px !important;
    padding-bottom: 36px !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
    margin-left: 0 !important;
    width: 100% !important;
  }

  /* Reducción de espacios en blanco en móviles */
  .topbar {
    gap: 10px !important;
    margin-bottom: 10px !important;
  }

  .eyebrow {
    margin-bottom: 2px !important;
    font-size: 9px !important;
  }

  .page-title {
    font-size: 20px !important;
    letter-spacing: -0.5px !important;
  }

  .heading-block p {
    margin-top: 2px !important;
    font-size: 12px !important;
  }

  .header-actions {
    gap: 6px !important;
  }

  .connection-status,
  .date-button,
  .export-button {
    padding: 5px 9px !important;
    font-size: 11px !important;
    border-radius: 8px !important;
  }

  #notify-device {
    display: none !important;
  }

  .stats-grid {
    margin-bottom: 10px !important;
    border-radius: 12px !important;
  }

  .stat-card {
    padding: 10px 14px !important;
    gap: 10px !important;
  }

  .stat-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  .stat-card strong {
    font-size: 18px !important;
  }

  .pm-sede-toolbar {
    margin: 10px 0 10px !important;
    padding: 10px 12px !important;
    gap: 8px !important;
    border-radius: 12px !important;
  }

  /* Drawer de detalle de cobro en pantallas móviles (pantalla completa y sobre el header) */
  .pm-drawer-backdrop {
    z-index: 2100 !important;
  }

  .pm-drawer {
    width: 100% !important;
    max-width: 100% !important;
    top: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: max(20px, env(safe-area-inset-top, 20px)) 18px max(24px, env(safe-area-inset-bottom, 24px)) !important;
    z-index: 2200 !important;
  }
}

/* ============================================================================
   TOPBAR MODERNA (PANEL DE OPERACIONES)
   ============================================================================ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

@media (min-width: 992px) {
  .topbar {
    flex-wrap: nowrap;
  }
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--pm-purple);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.page-title {
  font-family: "Manrope", sans-serif;
  font-size: clamp(26px, 2.4vw, 36px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.05;
  margin: 0;
  color: var(--pm-ink);
}

.heading-block p {
  margin: 6px 0 0;
  color: var(--pm-ink-soft);
  font-size: 13px;
}

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

@media (min-width: 992px) {
  .header-actions {
    flex-wrap: nowrap;
  }
}

.connection-status {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--pm-line);
  padding: 8px 14px;
  border-radius: 10px;
  color: var(--pm-ink-soft);
  font-size: 12px;
  font-weight: 600;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b981;
  box-shadow: 0 0 0 4px rgba(18, 185, 129, 0.15);
}

.date-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pm-line-strong);
  border-radius: 10px;
  background: white;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: 160ms ease;
  color: var(--pm-ink);
}

.date-button:hover {
  background: var(--pm-purple-softer);
  border-color: var(--pm-purple);
}

.export-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #14142b;
  border-radius: 10px;
  background: #14142b;
  color: white;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: 160ms ease;
}

.export-button:hover {
  background: #28283e;
  transform: translateY(-1px);
}

/* ============================================================================
   STATS GRID UNIFICADA (3 métricas continuas con mini-chart)
   ============================================================================ */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--pm-line);
  border-radius: 15px;
  margin-bottom: 14px;
  background: var(--pm-surface);
  box-shadow: var(--pm-shadow);
}

@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.stat-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 24px;
  transition: background 0.15s ease;
}

.stat-card:not(:last-child)::after {
  position: absolute;
  top: 18px;
  right: 0;
  bottom: 18px;
  width: 1px;
  background: var(--pm-line);
  content: "";
}

@media (max-width: 860px) {
  .stat-card:not(:last-child)::after {
    top: auto;
    right: 24px;
    bottom: 0;
    left: 24px;
    width: auto;
    height: 1px;
  }
}

.stat-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  background: var(--pm-purple-soft);
  color: var(--pm-purple);
  flex-shrink: 0;
}

.stat-card > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.stat-card small {
  margin-bottom: 3px;
  color: var(--pm-muted);
  font-size: 11px;
  font-weight: 600;
}

.stat-card strong {
  font-family: "Manrope", sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--pm-ink);
}

.stat-trend {
  margin-top: 4px;
  color: var(--pm-green);
  font-size: 9px;
  font-weight: 700;
}

.stat-card:nth-child(2) .stat-trend,
.stat-card.accent .stat-trend {
  color: var(--pm-muted);
}

.mini-chart {
  display: flex;
  height: 30px;
  align-items: flex-end;
  gap: 3px;
  margin-left: auto;
  padding-right: 10px;
}

.mini-chart i {
  display: block;
  width: 4px;
  border-radius: 4px;
  background: #dcd4fa;
}

.mini-chart i:nth-child(1) { height: 10px; }
.mini-chart i:nth-child(2) { height: 17px; }
.mini-chart i:nth-child(3) { height: 13px; }
.mini-chart i:nth-child(4) { height: 23px; }
.mini-chart i:nth-child(5) { height: 28px; background: var(--pm-purple); }

.stat-card.accent .mini-chart i { background: #bfe9da; }
.stat-card.accent .mini-chart i:last-child { background: var(--pm-green); }
.stat-card.accent .stat-icon { background: var(--pm-green-soft); color: var(--pm-green); }

.stat-card.accent > .live-dot {
  position: absolute;
  top: 24px;
  right: 25px;
}

/* ============================================================================
   DAILY INSIGHT (RESUMEN INTELIGENTE)
   ============================================================================ */

.daily-insight {
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) minmax(180px, 0.75fr) minmax(210px, 0.8fr);
  align-items: center;
  gap: 24px;
  overflow: hidden;
  border: 1px solid var(--pm-line);
  border-radius: 15px;
  margin-bottom: 16px;
  background: var(--pm-surface);
  padding: 17px 20px;
  box-shadow: var(--pm-shadow);
}

@media (max-width: 960px) {
  .daily-insight {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.insight-lead {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 13px;
}

.insight-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: var(--pm-purple);
  box-shadow: 0 8px 18px rgba(102, 56, 232, 0.22);
  color: white;
}

.insight-lead > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.insight-label {
  margin-bottom: 2px;
  color: var(--pm-purple);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.insight-lead strong {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--pm-ink);
}

.insight-lead p {
  margin: 4px 0 0;
  color: var(--pm-ink-soft);
  font-size: 10.5px;
  line-height: 1.45;
}

.insight-lead b {
  color: var(--pm-green);
}

.hourly-chart {
  position: relative;
  display: flex;
  height: 58px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 5px;
  border-bottom: 1px solid #d9d2ef;
  padding: 0 0 13px;
}

.hourly-chart > span {
  width: 100%;
  height: var(--bar-height, 35%);
  max-width: 12px;
  border-radius: 4px 4px 2px 2px;
  background: #d7cef5;
  transition: 180ms ease;
}

.hourly-chart > span:hover,
.hourly-chart > span.peak {
  background: var(--pm-purple);
  transform: translateY(-2px);
}

.hourly-chart small {
  position: absolute;
  bottom: -2px;
  color: var(--pm-muted);
  font-size: 7.5px;
  font-weight: 700;
}

.hourly-chart small:nth-last-child(3) { left: 0; }
.hourly-chart small:nth-last-child(2) { left: 46%; }
.hourly-chart small:last-child { right: 0; }

.goal-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  border-left: 1px solid var(--pm-line);
  padding-left: 22px;
}

@media (max-width: 960px) {
  .goal-summary {
    border-left: none;
    padding-left: 0;
  }
}

.goal-ring {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--pm-purple) var(--goal-pct, 83%), #e1dbf4 0);
}

.goal-ring::before {
  position: absolute;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #f8f6ff;
  content: "";
}

.goal-ring span {
  z-index: 1;
  color: var(--pm-purple-dark);
  font-size: 9.5px;
  font-weight: 800;
}

.goal-summary > div:last-child {
  display: flex;
  flex-direction: column;
}

.goal-summary small {
  margin-bottom: 2px;
  color: var(--pm-muted);
  font-size: 8.5px;
  font-weight: 700;
  text-transform: uppercase;
}

.goal-summary strong {
  font-size: 11px;
  font-weight: 800;
  color: var(--pm-ink);
}

.goal-summary > div:last-child > span {
  margin-top: 3px;
  color: var(--pm-purple);
  font-size: 8.5px;
  font-weight: 700;
}

/* ============================================================================
   SEDE TOOLBAR (Pestañas, Búsqueda y Selector rápido estilo Fintech)
   ============================================================================ */

.pm-sede-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 20px;
  padding: 12px 18px;
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.section-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-title {
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--pm-ink);
  white-space: nowrap;
}

.count-badge {
  display: grid;
  min-width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 9px;
  background: var(--pm-purple-soft);
  color: var(--pm-purple);
  font-size: 11px;
  font-weight: 800;
  padding: 0 6px;
}

.search-box {
  display: flex;
  width: min(280px, 26vw);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--pm-line-strong);
  border-radius: 10px;
  padding: 8px 12px;
  color: var(--pm-muted);
  background: white;
  transition: 160ms ease;
}

.search-box:focus-within {
  border-color: var(--pm-purple);
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.12);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--pm-ink);
  font-size: 12px;
  font-family: inherit;
}

.search-box input::placeholder {
  color: var(--pm-muted);
}

.pm-sede-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pm-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--pm-ink-soft);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.pm-tab-btn:hover {
  background: var(--pm-purple-softer);
  color: var(--pm-purple);
}

.pm-tab-btn.active {
  background: var(--pm-purple-soft);
  color: var(--pm-purple);
  border-color: rgba(106, 27, 154, 0.2);
  font-weight: 700;
}

.pm-tab-badge {
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(106, 27, 154, 0.15);
  font-size: 11px;
  font-weight: 800;
}

.pm-sede-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--pm-line-strong);
  background: var(--pm-surface);
  color: var(--pm-ink);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pm-action-btn:hover {
  background: var(--pm-purple-softer);
  border-color: var(--pm-purple);
  color: var(--pm-purple);
}

.pm-action-btn.primary {
  background: var(--pm-purple);
  border-color: var(--pm-purple);
  color: white;
}

.pm-action-btn.primary:hover {
  background: #5a1680;
}

/* ============================================================================
   ESTILOS DE TRANSACCIÓN MEJORADOS (Badges de Sede)
   ============================================================================ */

.pm-tx-sede-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--pm-line);
}

.pm-badge-sede {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
}

.pm-badge-sede.mine {
  background: var(--pm-green-soft);
  color: var(--pm-green);
  border: 1px solid rgba(7, 153, 106, 0.25);
}

.pm-badge-sede.other {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.pm-badge-sede.reported {
  background: #f8fafc;
  color: #94a3b8;
  border: 1px dashed #cbd5e1;
}

.pm-btn-claim {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border-radius: 8px;
  border: 1px solid var(--pm-purple);
  background: white;
  color: var(--pm-purple);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pm-btn-claim:hover {
  background: var(--pm-purple);
  color: white;
}

.pm-btn-claim.release {
  border-color: #ef4444;
  color: #ef4444;
}

.pm-btn-claim.release:hover {
  background: #ef4444;
  color: white;
}

/* ============================================================================
   CÓDIGO DE SEGURIDAD DESTACADO (Confirmación de cobro rápida)
   ============================================================================ */

.tx-security-code {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: var(--pm-purple-soft, #f3ecff) !important;
  color: var(--pm-purple, #6a1b9a) !important;
  border: 1px solid rgba(106, 27, 154, 0.22) !important;
  padding: 4px 10px !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.03em !important;
  box-shadow: 0 1px 3px rgba(106, 27, 154, 0.08) !important;
  transition: all 0.15s ease !important;
}

.tx-security-code:hover {
  background: #ede9fe !important;
  border-color: var(--pm-purple, #6a1b9a) !important;
  transform: translateY(-1px) !important;
}

.tx-security-code .tx-sec-label {
  font-size: 10px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  color: var(--pm-purple-light, #7c4de6) !important;
  opacity: 0.9 !important;
}

.tx-security-code .tx-sec-num {
  font-family: 'DM Sans', 'Manrope', -apple-system, sans-serif !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: var(--pm-purple-dark, #4e21c9) !important;
  letter-spacing: 0.04em !important;
}

.tx-security-code.empty {
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
  font-weight: 600 !important;
  font-size: 12px !important;
}

/* ============================================================================
   PANEL LATERAL FLOTANTE DE DETALLE (ESTILO FIGMA MAKE FINTECH)
   ============================================================================ */

/* Backdrop (solo visible en pantallas móviles) */
.pm-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 2100;
  border: none;
  transition: opacity 0.2s ease;
}

.pm-drawer-backdrop.hidden {
  display: none !important;
}

/* Panel de Detalle - Mobile por defecto (Full-screen bottom drawer) */
.pm-drawer {
  position: fixed;
  width: 100%;
  max-width: 100%;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  z-index: 2200;
  display: flex;
  flex-direction: column;
  padding: max(20px, env(safe-area-inset-top, 20px)) 20px max(24px, env(safe-area-inset-bottom, 24px));
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.16);
}

.pm-drawer.open {
  transform: translateY(0);
}

/* Panel de Detalle - Desktop Grande (>= 1200px): Columna paralela elegante fija */
@media (min-width: 1200px) {
  .pm-drawer-backdrop {
    display: none !important;
  }

  .pm-drawer {
    top: 24px !important;
    right: 28px !important;
    bottom: 24px !important;
    left: auto !important;
    width: 350px !important;
    max-width: 350px !important;
    height: auto !important;
    max-height: calc(100vh - 48px) !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 1px solid #eaeaec !important;
    box-shadow: 0 16px 45px rgba(23, 19, 39, 0.08) !important;
    z-index: 100 !important;
    padding: 24px 22px !important;
    transform: translateX(calc(100% + 40px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  }

  .pm-drawer.open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* El contenido se separa exactamente 28px antes del borde del panel (350px + 28px margen + 28px gap) */
  body.pm-drawer-open .app-view {
    padding-right: 406px !important;
    transition: padding-right 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }
}

/* Panel de Detalle - Tablets / Laptops Compactas (768px a 1199px): Overlay flotante con backdrop para no estrangular el feed */
@media (min-width: 768px) and (max-width: 1199px) {
  .pm-drawer-backdrop {
    display: block !important;
    z-index: 2150 !important;
  }

  .pm-drawer-backdrop.hidden {
    display: none !important;
  }

  .pm-drawer {
    top: 20px !important;
    right: 20px !important;
    bottom: 20px !important;
    left: auto !important;
    width: 380px !important;
    max-width: calc(100vw - 40px) !important;
    height: auto !important;
    max-height: calc(100vh - 40px) !important;
    border-radius: 24px !important;
    background: #ffffff !important;
    border: 1px solid #eaeaec !important;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25) !important;
    z-index: 2200 !important;
    padding: 24px 22px !important;
    transform: translateX(calc(100% + 40px)) !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease !important;
  }

  .pm-drawer.open {
    transform: translateX(0) !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  body.pm-drawer-open .app-view {
    padding-right: 28px !important;
  }
}

/* Regla Maestra para el Grid de Transacciones en cualquier resolución */
.date-group .transactions-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 14px !important;
}

@media (max-width: 767px) {
  .date-group .transactions-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }
}

/* Header del panel */
.pm-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.pm-detail-kicker {
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #7c3aed;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.pm-detail-title {
  margin: 0;
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.pm-detail-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f8fafc;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.pm-detail-close-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: scale(1.05);
}

.pm-detail-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 16px 0;
  border: none;
}

/* Brand & Monto */
.pm-detail-hero {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pm-detail-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-detail-brand-badge {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: #6a1b9a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pm-detail-brand-icon {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-detail-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.pm-detail-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.pm-detail-amount {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.03em;
  line-height: 1;
}

.pm-detail-currency {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin-right: 2px;
}

.pm-detail-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: #dcfce7;
  color: #047857;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

/* Tarjeta del cliente */
.pm-detail-customer-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fafafc;
  border: 1px solid #f1f1f7;
  border-radius: 14px;
}

.pm-detail-avatar {
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: #f3e8ff;
  color: #6b21a8;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.pm-detail-customer-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pm-detail-customer-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #94a3b8;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.pm-detail-customer-name {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Lista clave-valor */
.pm-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.pm-detail-label {
  color: #94a3b8;
  font-weight: 500;
}

.pm-detail-val {
  color: #0f172a;
  font-weight: 700;
}

.pm-detail-code {
  font-family: 'SF Mono', Monaco, Consolas, monospace;
  letter-spacing: 0.03em;
}

/* Timeline */
.pm-detail-timeline {
  display: flex;
  flex-direction: column;
}

.pm-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.pm-timeline-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #dcfce7;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.pm-timeline-content {
  display: flex;
  flex-direction: column;
}

.pm-timeline-content strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.pm-timeline-content time {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 1px;
}

.pm-timeline-connector {
  width: 2px;
  height: 18px;
  background: #bbf7d0;
  margin-left: 10px;
  margin-top: 2px;
  margin-bottom: 2px;
}

/* Acciones */
.pm-detail-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

.pm-detail-copy-btn {
  width: 100%;
  padding: 11px 16px;
  border-radius: 12px;
  border: 1.5px solid #d8b4fe;
  background: #ffffff;
  color: #6b21a8;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pm-detail-copy-btn:hover {
  background: #faf5ff;
  border-color: #c084fc;
}

.pm-detail-notification-link {
  background: none;
  border: none;
  color: #7c3aed;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  transition: opacity 0.15s;
}

.pm-detail-notification-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.pm-detail-footer-note {
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
  display: block;
}

/* Sede box dentro del detalle */
.pm-detail-sede-box {
  margin: 10px 0;
}

.pm-detail-sede-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 8px;
  margin-bottom: 8px;
  text-align: center;
}

.pm-detail-sede-box.mine .pm-detail-sede-tag {
  background: #f3e8ff;
  color: #7c3aed;
}

.pm-detail-sede-box.other .pm-detail-sede-tag {
  background: #f1f5f9;
  color: #64748b;
}

.pm-detail-sede-box.reported .pm-detail-sede-tag {
  background: #f1f5f9;
  color: #94a3b8;
}

/* Highlight de la tarjeta seleccionada en la lista */
.transaction-card.is-selected {
  border-color: #7c3aed !important;
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2), 0 8px 24px rgba(124, 58, 237, 0.08) !important;
}

/* ============================================================================
   BARRA INTEGRADA DE CONTROL DE TURNO Y CAJA (TOPBAR)
   ============================================================================ */

.pm-turn-bar {
  position: static;
  background: linear-gradient(135deg, #151124 0%, #251b47 100%);
  color: white;
  padding: 3px 4px 3px 10px;
  border-radius: 999px;
  height: 34px;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(23, 19, 39, 0.12);
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
  min-width: 0;
  transition: all 0.2s ease;
  animation: fadeIn 0.25s ease;
}

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

.pm-turn-info {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  cursor: pointer;
  user-select: none;
}

.pm-turn-info:hover .pm-turn-sede-name {
  color: #ffffff;
}

.pm-turn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.pm-turn-dot.open {
  background: #10b981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

.pm-turn-dot.closed {
  background: #94a3b8;
}

.pm-turn-sede-name {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: #f1f5f9;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-turn-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #c4b5fd;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.pm-turn-badge.closed {
  background: rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
}

.pm-turn-total {
  font-family: 'Manrope', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #34d399;
  white-space: nowrap;
  margin-left: 2px;
}

.pm-btn-close-turn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 9px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.3);
  transition: all 0.15s ease;
  white-space: nowrap;
  margin: 0;
}

.pm-btn-close-turn:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(239, 68, 68, 0.45);
}

.pm-btn-close-turn.open-btn {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 1px 4px rgba(5, 150, 105, 0.3);
}

.pm-btn-close-turn.open-btn:hover {
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.45);
}

@media (max-width: 640px) {
  .pm-turn-bar {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================================
   MODALES (Gestión de Sedes y Reportes)
   ============================================================================ */

.pm-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  z-index: 2300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pm-modal.hidden {
  display: none !important;
}

.pm-modal-card {
  background: var(--pm-surface);
  border-radius: 20px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--pm-shadow-lg);
  padding: 24px;
  border: 1px solid var(--pm-line);
}

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

.pm-modal-title {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 800;
  color: var(--pm-ink);
  letter-spacing: -0.5px;
}

.pm-modal-close {
  background: var(--pm-canvas);
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--pm-muted);
}

.pm-input-group {
  margin-bottom: 16px;
}

.pm-input-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--pm-ink);
  margin-bottom: 6px;
}

.pm-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--pm-line-strong);
  font-size: 14px;
  font-family: inherit;
  color: var(--pm-ink);
  transition: all 0.16s ease;
  box-sizing: border-box;
}

.pm-input:focus {
  outline: none;
  border-color: var(--pm-purple);
  box-shadow: 0 0 0 3px rgba(106, 27, 154, 0.12);
}

.pm-sedes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  margin: 14px 0 20px;
}

.pm-sede-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--pm-canvas);
  border: 1px solid var(--pm-line);
  transition: all 0.15s ease;
}

.pm-sede-item.active {
  border-color: var(--pm-purple);
  background: var(--pm-purple-softer);
}

/* ============================================================================
   MODAL DE CONFIGURACIÓN GENERAL
   ============================================================================ */

.pm-settings-card {
  max-width: 580px !important;
}

.pm-settings-sections {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 16px 0;
}

.pm-settings-section {
  background: var(--pm-canvas);
  border: 1px solid var(--pm-line);
  border-radius: 16px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pm-settings-sec-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pm-settings-sec-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--pm-ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.pm-settings-sec-desc {
  font-size: 12px;
  color: var(--pm-ink-soft);
  margin: -4px 0 4px;
  line-height: 1.4;
}

.pm-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.pm-settings-row:first-of-type {
  border-top: none;
  padding-top: 0;
}

.pm-settings-label {
  font-size: 13px;
  color: var(--pm-ink);
  font-weight: 600;
}

.pm-settings-sublabel {
  font-size: 11px;
  color: var(--pm-muted);
  display: block;
  font-weight: normal;
  margin-top: 2px;
}

/* Modern Toggle Switch */
.pm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.pm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.pm-switch-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 24px;
}

.pm-switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pm-switch input:checked + .pm-switch-slider {
  background-color: #10b981;
}

.pm-switch input:checked + .pm-switch-slider:before {
  transform: translateX(20px);
}

.pm-settings-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--pm-line);
  margin-top: 8px;
}

/* ============================================================================
   VISTA DE REPORTES (#pm-view-reports)
   ============================================================================ */

.pm-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.pm-eyebrow {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--pm-purple);
}

.pm-page-title {
  font-family: 'Manrope', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 4px 0;
  color: var(--pm-ink);
}

.pm-page-sub {
  font-size: 13px;
  color: var(--pm-ink-soft);
  margin: 0;
}

.pm-reports-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.pm-report-card {
  background: var(--pm-surface);
  border: 1px solid var(--pm-line);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--pm-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all 0.2s ease;
}

.pm-report-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.06);
}

.pm-report-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.pm-report-folio {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--pm-ink);
}

.pm-report-sede {
  font-size: 12px;
  color: var(--pm-purple);
  font-weight: 700;
}

.pm-report-total {
  font-family: 'Manrope', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--pm-green);
}

/* ============================================================================
   ESTILOS DE IMPRESIÓN (TICKET 80mm & HOJA A4)
   ============================================================================ */

#pm-print-root {
  display: none;
}

body.pm-printing * {
  visibility: hidden;
}

body.pm-printing #pm-print-root,
body.pm-printing #pm-print-root * {
  visibility: visible;
}

#pm-print-root {
  display: none;
}

body.pm-printing #pm-print-root {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  margin: 0;
  padding: 0;
  background: white;
  z-index: 999999;
}

@media print {
  html, body {
    background: white !important;
    color: black !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Ocultar toda la interfaz de la web para dejar únicamente el documento */
  .pm-sidebar,
  .pm-sidebar-backdrop,
  .app-header,
  #main-header,
  .main-container,
  #app-container,
  #login-container,
  #loading-container,
  .pm-turn-bar,
  .pm-drawer,
  .pm-drawer-backdrop,
  .pm-modal,
  #pm-modal-root,
  #pm-toast,
  .pm-chat-widget,
  .notification-dialog {
    display: none !important;
    visibility: hidden !important;
  }

  #pm-print-root {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: white !important;
  }

  #pm-print-root * {
    visibility: visible !important;
  }
}

.pm-print {
  color: black;
  background: white;
  font-family: 'Inter', -apple-system, sans-serif;
}

/* Ticket Térmico 80mm */
.pm-print-ticket {
  width: 76mm;
  margin: 0 auto;
  padding: 4mm;
  font-size: 12px;
  line-height: 1.4;
}

.pp-brand {
  font-family: 'Manrope', sans-serif;
  font-size: 18px;
  font-weight: 900;
  text-align: center;
  letter-spacing: -0.5px;
}

.pp-title {
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  margin-top: 2px;
}

.pp-sep {
  border-top: 1px dashed #000;
  margin: 8px 0;
}

.pp-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 12px;
  margin: 3px 0;
}

.pp-row span {
  flex-shrink: 0;
  color: #333;
}

.pp-row b {
  text-align: right;
  word-break: break-word;
}

.pp-row.pp-total {
  font-size: 15px;
  font-weight: 900;
  margin-top: 6px;
}

.pp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 6px 0;
  font-size: 11px;
}

.pp-table th {
  border-bottom: 1px solid #000;
  text-align: left;
  padding: 4px 2px;
}

.pp-table td {
  padding: 4px 2px;
  border-bottom: 1px dotted #ccc;
}

.pp-amt {
  text-align: right;
  font-weight: 700;
}

.pp-sign {
  margin-top: 24px;
  text-align: center;
}

.pp-sign div {
  width: 80%;
  border-top: 1px solid #000;
  margin: 0 auto 4px;
}

.pp-sign span {
  font-size: 10px;
}

.pp-foot {
  text-align: center;
  font-size: 9px;
  margin-top: 14px;
  color: #666;
}

/* Reporte A4 */
.pm-print-a4 {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-size: 13px;
}

.pp-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #000;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.pp-head .pp-brand {
  font-size: 28px;
  text-align: left;
}

.pp-sub {
  font-size: 13px;
  color: #444;
}

.pp-folio {
  text-align: right;
}

.pp-folio span {
  font-size: 11px;
  color: #666;
  display: block;
}

.pp-folio b {
  font-size: 16px;
}

.pp-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
}

.pp-grid span {
  color: #64748b;
  font-size: 11px;
  display: block;
}

.pp-summary {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 2px solid #000;
}

.pp-totalbox {
  text-align: right;
}

.pp-totalbox span {
  font-size: 12px;
  color: #666;
  display: block;
}

.pp-totalbox b {
  font-size: 24px;
}

.pp-signs {
  display: flex;
  justify-content: space-around;
  margin-top: 60px;
}

.pp-signs div {
  text-align: center;
  width: 200px;
}

.pp-signs i {
  display: block;
  border-top: 1px solid #000;
  margin-bottom: 6px;
}

/* ============================================================================
   TOAST NOTIFICATIONS
   ============================================================================ */

.pm-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--pm-ink);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  z-index: 400;
  animation: toastIn 0.25s ease-out;
}

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

/* ============================================================================
   REDISEÑO TOTAL DEL LOGIN (Fintech Split-Screen Premium)
   ============================================================================ */

.pm-login-view {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  min-height: 100vh !important;
  padding: 0 !important;
  margin: 0 !important;
  background: #0d0b1a !important;
  z-index: 200 !important;
  overflow-y: auto !important;
  display: flex !important;
  align-items: stretch !important;
  justify-content: stretch !important;
}

.pm-login-view.hidden {
  display: none !important;
}

.pm-login-view::before,
.pm-login-view::after {
  display: none !important;
}

.pm-login-container {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  width: 100%;
  min-height: 100vh;
}

/* --- Columna Izquierda: Hero & Showcase --- */
.pm-login-hero {
  position: relative;
  background: radial-gradient(circle at 15% 15%, rgba(131, 83, 232, 0.28), transparent 28rem),
              radial-gradient(circle at 85% 85%, rgba(83, 25, 138, 0.35), transparent 26rem),
              #0d0b1a;
  padding: 48px 56px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pm-login-hero-glow {
  position: absolute;
  top: -150px;
  right: -150px;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(131, 83, 232, 0.2), transparent 70%);
  pointer-events: none;
}

.pm-login-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: relative;
  z-index: 2;
}

.pm-login-brand-badge-box {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-login-brand-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(105, 48, 195, 0.35);
  flex-shrink: 0;
}

.pm-login-brand-name {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.pm-login-brand-tag {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #a78bfa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

.pm-login-system-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(7, 153, 106, 0.14);
  border: 1px solid rgba(7, 153, 106, 0.3);
  color: #34d399;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
}

.pm-pill-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pmPulse 2s infinite;
}

@keyframes pmPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.pm-login-hero-body {
  position: relative;
  z-index: 2;
  margin: 36px 0;
  max-width: 620px;
}

.pm-hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #c084fc;
  margin-bottom: 14px;
}

.pm-hero-title {
  font-size: 38px;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.22;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

.pm-title-accent {
  background: linear-gradient(135deg, #c084fc 0%, #a855f7 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pm-hero-description {
  font-size: 15px;
  line-height: 1.6;
  color: #94a3b8;
  margin: 0 0 30px;
}

.pm-hero-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 32px;
}

.pm-feature-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 14px 18px;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.pm-feature-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(167, 139, 250, 0.3);
  transform: translateX(4px);
}

.pm-feature-icon-wrapper {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(131, 83, 232, 0.25), rgba(83, 25, 138, 0.3));
  border: 1px solid rgba(167, 139, 250, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  flex-shrink: 0;
}

.pm-feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-feature-text strong {
  font-size: 14px;
  font-weight: 700;
  color: #f1f5f9;
}

.pm-feature-text span {
  font-size: 13px;
  color: #94a3b8;
  line-height: 1.4;
}

.pm-hero-metrics {
  display: flex;
  align-items: center;
  gap: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pm-metric-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-metric-num {
  font-size: 24px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.pm-metric-lbl {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.pm-metric-sep {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.1);
}

.pm-login-hero-footer {
  font-size: 12px;
  color: #64748b;
  position: relative;
  z-index: 2;
}

/* --- Columna Derecha: Tarjeta de Acceso Seguro --- */
.pm-login-action-side {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
}

.pm-auth-box {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  padding: 44px 38px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.03);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
}

.pm-auth-header {
  margin-bottom: 28px;
}

.pm-auth-brand-mobile {
  display: none;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.pm-auth-mobile-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.pm-auth-mobile-name {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.pm-auth-mobile-sub {
  display: block;
  font-size: 11px;
  color: #64748b;
}

.pm-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f3e8ff;
  color: #6b21a8;
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 14px;
}

.pm-auth-title {
  font-size: 28px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

.pm-auth-subtitle {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.pm-auth-actions {
  margin-bottom: 24px;
}

.pm-btn-google-auth {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 14px 18px !important;
  background: #ffffff !important;
  color: #1e293b !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 14px !important;
  cursor: pointer !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.pm-btn-google-auth:hover {
  border-color: #7c3aed !important;
  background: #faf5ff !important;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.16) !important;
  transform: translateY(-2px) !important;
}

.pm-btn-google-auth:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12) !important;
}

.pm-google-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-btn-google-label {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.pm-btn-google-arrow {
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.pm-btn-google-auth:hover .pm-btn-google-arrow {
  transform: translateX(4px);
  color: #7c3aed;
}

/* Indicadores de Seguridad */
.pm-auth-security-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 24px;
}

.pm-sec-item {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-sec-icon-box {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-sec-icon-box.green {
  background: #e6f8f1;
  color: #07996a;
}

.pm-sec-icon-box.purple {
  background: #f3ecff;
  color: #6930c3;
}

.pm-sec-desc {
  display: flex;
  flex-direction: column;
}

.pm-sec-desc strong {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.pm-sec-desc span {
  font-size: 11px;
  color: #64748b;
}

/* Soporte y Ayuda */
.pm-auth-support {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
}

.pm-auth-support a {
  color: #6930c3;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.15s ease;
}

.pm-auth-support a:hover {
  color: #4e21c9;
  text-decoration: underline;
}

/* Responsive para Pantallas Medianas y Móviles */
@media (max-width: 1024px) {
  .pm-login-container {
    grid-template-columns: 1fr;
  }
  .pm-login-hero {
    display: none;
  }
  .pm-login-action-side {
    padding: 24px 20px;
    background: radial-gradient(circle at 50% 10%, rgba(131, 83, 232, 0.15), transparent 20rem), #f8fafc;
  }
  .pm-auth-brand-mobile {
    display: flex;
  }
}

/* ============================================================================
   OCULTAR ASISTENTE / CHATBOT FLOTANTE (BOTÓN DE COBROS)
   ============================================================================ */
.ai-chatbot-toggle,
#ai-chatbot-toggle,
.ai-chatbot-toggle.show,
.ai-chatbot-container,
#ai-chatbot-container {
  display: none !important;
}

/* ============================================================================
   OCULTAR RESUMEN INTELIGENTE (BANNER / GRÁFICO DIARIO)
   ============================================================================ */
#pm-daily-insight,
.daily-insight {
  display: none !important;
}

.live-dot.live-dot-offline {
  background: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

/* ============================================================================
   PANEL ÚNICO DE APERTURA DE TURNO (IN-CANVAS FINTECH REDESIGN)
   ============================================================================ */
.pm-aperture-card {
  max-width: 540px;
  margin: 30px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 32px 28px;
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  animation: pmFadeUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.pm-aperture-header {
  text-align: center;
  margin-bottom: 24px;
}

.pm-aperture-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.12);
}

.pm-aperture-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  color: #475569;
  letter-spacing: 0.02em;
  margin-bottom: 10px;
}

.pm-aperture-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2);
  animation: pmPulseDot 2s infinite ease-in-out;
}

@keyframes pmPulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.25); opacity: 0.7; }
}

.pm-aperture-title {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.02em;
}

.pm-aperture-desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: #64748b;
  margin: 0 auto;
  max-width: 440px;
}

.pm-aperture-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.pm-aperture-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
}

.pm-aperture-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.06em;
}

/* Cuadrícula de Turnos 2x2 */
.pm-aperture-shifts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pm-shift-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.pm-shift-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.pm-shift-card.selected {
  background: #f0fdf4;
  border-color: #059669;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.12);
}

.pm-shift-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pm-shift-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pm-shift-card:hover .pm-shift-icon {
  transform: scale(1.08);
}

.pm-shift-icon.amber {
  background: #fef3c7;
  color: #d97706;
}
.pm-shift-icon.orange {
  background: #ffedd5;
  color: #ea580c;
}
.pm-shift-icon.purple {
  background: #ede9fe;
  color: #6366f1;
}
.pm-shift-icon.green {
  background: #dcfce7;
  color: #059669;
}

.pm-shift-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.pm-shift-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.25;
}

.pm-shift-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

.pm-shift-check-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.pm-shift-card.selected .pm-shift-check-circle {
  border-color: #059669;
  background: #059669;
}

.pm-shift-card.selected .pm-shift-check-circle::after {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: white;
}

/* Tira de metadatos del cajero */
.pm-aperture-meta-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #475569;
}

.pm-aperture-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pm-aperture-meta-item strong {
  color: #0f172a;
}

/* Botón principal */
.pm-aperture-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
  transition: all 0.2s ease;
}

.pm-aperture-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.38);
}

.pm-aperture-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.pm-aperture-footer-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed #e2e8f0;
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.45;
  text-align: left;
}

.pm-aperture-footer-note svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #94a3b8;
}

@media (max-width: 600px) {
  .pm-aperture-card {
    padding: 24px 18px;
    margin: 16px 8px;
  }
  .pm-aperture-shifts-grid {
    grid-template-columns: 1fr;
  }
  .pm-aperture-meta-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}

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

/* ============================================================================
   VENTANA FLOTANTE COMPACTA DE APERTURA DE TURNO
   ============================================================================ */
.pm-aperture-modal-card {
  max-width: 480px !important;
  width: 95% !important;
  padding: 22px 24px !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.35) !important;
  display: flex !important;
  flex-direction: column !important;
  box-sizing: border-box !important;
  max-height: 94vh !important;
  overflow-y: auto !important;
  animation: pmModalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

@keyframes pmModalPop {
  from { opacity: 0; transform: scale(0.95) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.pm-aperture-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 10px;
  position: relative;
}

.pm-aperture-modal-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pm-aperture-modal-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12);
}

.pm-aperture-modal-title-wrap {
  display: flex;
  flex-direction: column;
}

.pm-aperture-modal-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #059669;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.pm-aperture-modal-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2);
}

.pm-aperture-modal-title {
  font-family: 'Manrope', -apple-system, sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.pm-aperture-modal-close {
  background: #f1f5f9;
  border: none;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #64748b;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.pm-aperture-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pm-aperture-modal-desc {
  font-size: 12.5px;
  line-height: 1.45;
  color: #64748b;
  margin: 0 0 12px 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.pm-aperture-modal-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.pm-aperture-modal-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.pm-aperture-modal-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: #475569;
  letter-spacing: 0.05em;
}

/* Selector compacto de sedes */
.pm-aperture-modal-select-trigger {
  padding: 8px 12px !important;
  min-height: 44px !important;
  border-radius: 10px !important;
}

/* Grilla compacta de turnos 2x2 */
.pm-aperture-modal-shifts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}

.pm-aperture-modal-shift-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pm-aperture-modal-shift-card:hover {
  background: #ffffff;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.pm-aperture-modal-shift-card.selected {
  background: #f0fdf4;
  border-color: #059669;
  box-shadow: 0 2px 10px rgba(5, 150, 105, 0.12);
}

.pm-aperture-modal-shift-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pm-aperture-modal-shift-name {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
}

.pm-aperture-modal-shift-sub {
  font-size: 10px;
  color: #64748b;
  margin-top: 1px;
}

.pm-aperture-modal-meta {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 7px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #475569;
}

.pm-aperture-modal-submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.28);
  transition: all 0.15s ease;
  margin-top: 2px;
}

.pm-aperture-modal-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.38);
}

.pm-aperture-modal-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.pm-aperture-modal-footnote {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: #94a3b8;
  line-height: 1.35;
  margin-top: 3px;
}

/* Placeholder discreto en el canvas cuando la caja está cerrada */
.pm-caja-closed-placeholder {
  max-width: 460px;
  margin: 30px auto;
  text-align: center;
  padding: 28px 20px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 16px;
  box-sizing: border-box;
}

.pm-caja-closed-placeholder-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ecfdf5;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}

.pm-caja-closed-placeholder-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 5px 0;
}

.pm-caja-closed-placeholder-desc {
  font-size: 12.5px;
  color: #64748b;
  margin: 0 auto 14px;
  max-width: 360px;
  line-height: 1.45;
}

.pm-caja-closed-placeholder-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: white;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.22);
}

/* ============================================================================
   UNIVERSAL CUSTOM SELECTS (Cero estilo del navegador)
   ============================================================================ */
select, .pm-select, .form-select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236d28d9' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: calc(100% - 14px) center !important;
  background-size: 16px 16px !important;
  padding-right: 42px !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 12px !important;
  color: #1e293b !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

select:hover, .pm-select:hover, .form-select:hover {
  border-color: #c4b5fd !important;
  background-color: #faf8ff !important;
}

select:focus, .pm-select:focus, .form-select:focus {
  outline: none !important;
  border-color: #7c4de6 !important;
  box-shadow: 0 0 0 3.5px rgba(124, 77, 230, 0.14) !important;
  background-color: #ffffff !important;
}

/* ============================================================================
   CUSTOM DROPDOWN COMPONENT (Desplegable Propio)
   ============================================================================ */
.pm-custom-select-wrap {
  position: relative;
  width: 100%;
}

.pm-custom-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-align: left;
}

.pm-custom-select-trigger:hover {
  border-color: #c4b5fd;
  background: #faf8ff;
}

.pm-custom-select-trigger.active,
.pm-custom-select-trigger:focus {
  outline: none;
  border-color: #7c4de6;
  box-shadow: 0 0 0 3.5px rgba(124, 77, 230, 0.14);
}

.pm-custom-select-val {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.pm-custom-select-icon {
  width: 18px;
  height: 18px;
  color: #7c4de6;
  flex-shrink: 0;
}

.pm-custom-select-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.pm-custom-select-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pm-custom-select-sub {
  font-size: 11.5px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.pm-custom-select-chevron {
  width: 16px;
  height: 16px;
  color: #94a3b8;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  margin-left: 8px;
}

.pm-custom-select-trigger.active .pm-custom-select-chevron {
  transform: rotate(180deg);
  color: #7c4de6;
}

.pm-custom-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.14), 0 4px 12px rgba(15, 23, 42, 0.06);
  padding: 6px;
  z-index: 2500;
  max-height: 240px;
  overflow-y: auto;
  animation: dropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.pm-custom-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.pm-custom-select-option:hover {
  background: #faf8ff;
}

.pm-custom-select-option.selected {
  background: #f5f0ff;
}

.pm-custom-select-option.selected .pm-option-name {
  color: #6d28d9;
  font-weight: 700;
}

.pm-custom-select-option.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #f8fafc;
}

.pm-option-body {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.pm-option-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #1e293b;
}

.pm-option-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 1px;
}

.pm-option-badge {
  font-size: 10.5px;
  font-weight: 700;
  background: #fee2e2;
  color: #dc2626;
  padding: 2px 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.pm-option-check {
  color: #7c4de6;
  flex-shrink: 0;
}

/* ============================================================================
   MODALES DE DIÁLOGO PERSONALIZADOS (Cero confirm() ni alert())
   ============================================================================ */
.pm-confirm-dialog-card {
  max-width: 480px;
  padding: 28px;
  border-radius: 24px;
}

.pm-confirm-stats-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.pm-confirm-stat-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pm-confirm-stat-label {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pm-confirm-stat-val {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.pm-print-choices-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.pm-print-choice-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 14px;
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pm-print-choice-card:hover {
  border-color: #7c4de6;
  background: #faf8ff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(124, 77, 230, 0.12);
}

.pm-print-choice-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(124, 77, 230, 0.1);
  color: #6d28d9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.pm-print-choice-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 4px;
}

.pm-print-choice-desc {
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}




