/* ==========================================================================
   AAMIRA CONECTA 1.0 — PROFESSIONAL ENTERPRISE DESIGN SYSTEM
   Plataforma comercial de conexión NFC y códigos QR
   Identidad visual: Formal, moderna, elegante, tecnológica y comercial.
   ========================================================================== */

:root {
  /* Paleta Corporativa Principal */
  --brand-navy-950: #0B1120;
  --brand-navy-900: #0F172A;
  --brand-navy-800: #1E293B;
  --brand-navy-700: #334155;
  --brand-navy-600: #475569;
  
  --brand-teal-700: #0F766E;
  --brand-teal-600: #0D9488;
  --brand-teal-500: #14B8A6;
  --brand-teal-400: #2DD4BF;
  --brand-teal-100: #CCFBF1;
  --brand-teal-50:  #F0FDFA;
  
  --brand-cyan-600: #0284C7;
  --brand-cyan-500: #0EA5E9;
  --brand-cyan-100: #E0F2FE;
  
  --brand-amber-600: #D97706;
  --brand-amber-500: #F59E0B;
  --brand-amber-100: #FEF3C7;
  
  --brand-emerald-600: #059669;
  --brand-emerald-500: #10B981;
  --brand-emerald-100: #D1FAE5;
  
  --brand-rose-600: #E11D48;
  --brand-rose-500: #F43F5E;
  --brand-rose-100: #FFE4E6;
  
  /* Superficies y Bordes */
  --bg-app: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-surface-alt: #F1F5F9;
  --bg-surface-elevated: #FFFFFF;
  
  --border-subtle: #E2E8F0;
  --border-medium: #CBD5E1;
  --border-strong: #94A3B8;
  --border-brand:  #0D9488;
  
  /* Textos y Jerarquía */
  --text-main: #0F172A;
  --text-secondary: #475569;
  --text-muted: #64748B;
  --text-subtle: #94A3B8;
  --text-inverse: #FFFFFF;
  
  /* Radios y Espaciado */
  --radius-full: 9999px;
  --radius-2xl: 1.25rem;
  --radius-xl: 1rem;
  --radius-lg: 0.75rem;
  --radius-md: 0.5rem;
  --radius-sm: 0.375rem;
  --radius-xs: 0.25rem;
  
  /* Sombras Comerciales Refinadas */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  
  /* Tipografía */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Reset y Base con prevención total de desbordamiento horizontal */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input, select, textarea {
  font-family: inherit;
}

/* ==========================================================================
   APP SHELL & LAYOUT (PANEL DE ADMINISTRACIÓN)
   ========================================================================== */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Barra Superior de Mando */
.app-header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--border-subtle);
  min-height: 68px;
  padding: 0.65rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-xs);
}

.app-header-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  min-width: 0;
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-icon-box {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand-navy-900), var(--brand-teal-700));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.15);
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy-900);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.brand-title span.accent {
  color: var(--brand-teal-600);
}

.brand-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--brand-teal-50);
  color: var(--brand-teal-700);
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-xs);
  align-self: flex-start;
  border: 1px solid var(--brand-teal-100);
}

/* Selector Central de Perfil */
.profile-switcher-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  background: var(--bg-surface-alt);
  padding: 0.3rem 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  max-width: 100%;
}

.profile-tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.profile-tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.6);
}

.profile-tab-btn.active {
  background: #FFFFFF;
  color: var(--brand-navy-900);
  box-shadow: var(--shadow-sm);
}

.profile-tab-btn .tab-icon {
  display: flex;
  align-items: center;
  color: var(--brand-teal-600);
}

.profile-status-chip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.status-dot-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-emerald-500);
  box-shadow: 0 0 0 2px var(--brand-emerald-100);
  animation: pulseDot 2s infinite;
}

.status-dot-pulse.suspended {
  background: var(--brand-rose-500);
  box-shadow: 0 0 0 2px var(--brand-rose-100);
  animation: none;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.app-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Layout Central: Sidebar + Main Content */
.app-container {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 68px);
}

/* Sidebar de Navegación */
.app-sidebar {
  width: 260px;
  background: #FFFFFF;
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex-shrink: 0;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-section-title {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  padding: 0.6rem 0.75rem 0.25rem 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  position: relative;
}

.nav-item:hover {
  color: var(--brand-navy-900);
  background: var(--bg-surface-alt);
}

.nav-item.active {
  color: var(--brand-teal-700);
  background: var(--brand-teal-50);
  font-weight: 700;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 15%;
  bottom: 15%;
  width: 4px;
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: var(--brand-teal-600);
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.tenant-card {
  background: var(--bg-surface-alt);
  padding: 0.75rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.tenant-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--brand-teal-600);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
}

.tenant-meta {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tenant-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tenant-role {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* Contenido Principal de Trabajo */
.app-content {
  flex: 1;
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* ==========================================================================
   BANNER DE PERFIL ACTIVO Y RESUMEN KPI
   ========================================================================== */
.profile-overview-banner {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.profile-identity-col {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.profile-main-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border-subtle);
  overflow: hidden;
  background: var(--bg-surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-main-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-identity-col h1 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy-900);
  margin-bottom: 0.25rem;
}

.profile-identity-col p {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.profile-badges-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-pill.teal {
  background: var(--brand-teal-50);
  color: var(--brand-teal-700);
  border: 1px solid var(--brand-teal-100);
}

.badge-pill.cyan {
  background: var(--brand-cyan-100);
  color: var(--brand-cyan-600);
}

.badge-pill.slate {
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

.profile-kpi-col {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.kpi-stat-item {
  display: flex;
  flex-direction: column;
  padding-left: 1.5rem;
  border-left: 1px solid var(--border-subtle);
}

.kpi-stat-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-navy-900);
  letter-spacing: -0.02em;
}

.kpi-stat-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==========================================================================
   TARJETAS Y PANELES (PANEL SECTIONS)
   ========================================================================== */
.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
  animation: fadeInSection 0.2s ease-in-out;
}

@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-header-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy-900);
}

.section-header-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

/* Grilla de Acciones Rápidas (Overview Dashboard) */
.quick-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.tool-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-xs);
  min-height: 140px;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-teal-500);
}

.tool-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.tool-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface-alt);
  color: var(--brand-navy-900);
  transition: all 0.2s ease;
}

.tool-card:hover .tool-icon-wrapper {
  background: var(--brand-teal-600);
  color: #FFFFFF;
}

.tool-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  margin-top: 1rem;
}

.tool-card-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  line-height: 1.4;
}

/* ==========================================================================
   GRILLA DE CUENTAS BANCARIAS (OFFICIAL VECTOR CARDS)
   ========================================================================== */
.bank-accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.bank-entity-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  box-shadow: var(--shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s ease;
  position: relative;
}

.bank-entity-card:hover {
  border-color: var(--border-medium);
  box-shadow: var(--shadow-md);
}

.bank-entity-card.preferred {
  border: 2px solid var(--brand-teal-500);
  background: linear-gradient(180deg, #FFFFFF, var(--brand-teal-50));
}

.bank-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.bank-logo-container {
  height: 38px;
  max-width: 165px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
}

.bank-logo-img {
  display: block;
  width: auto;
  height: 28px;
  max-height: 34px;
  max-width: 155px;
  object-fit: contain;
  object-position: left center;
}

.bank-logo-img.bank-logo-mercadopago { height: 30px; }
.bank-logo-img.bank-logo-icbc { height: 29px; }
.bank-logo-img.bank-logo-macro { height: 27px; }
.bank-logo-img.bank-logo-nacion { height: 28px; }
.bank-logo-img.bank-logo-galicia { height: 29px; }
.bank-logo-img.bank-logo-santander { height: 24px; max-width: 155px; }
.bank-logo-img.bank-logo-bbva { height: 23px; }
.bank-logo-img.bank-logo-uala { height: 25px; }
.bank-logo-img.bank-logo-naranjax { height: 28px; }
.bank-logo-img.bank-logo-personalpay { height: 30px; }

.bank-logo-generic {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-navy-900);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.bank-badges-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preferred-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--brand-teal-600);
  color: #FFFFFF;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bank-account-data {
  background: var(--bg-surface-alt);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
}

.account-label {
  color: var(--text-muted);
  font-weight: 500;
}

.account-val {
  color: var(--brand-navy-900);
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.account-val.alias-val {
  color: var(--brand-teal-700);
  font-size: 0.95rem;
}

.bank-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
}

.bank-card-actions-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   PERSONALIZADOR DE IMÁGENES Y ASPECT RATIO
   ========================================================================== */
.image-customizer-container {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 2rem;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow-xs);
}

.image-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-surface-alt);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  border: 1px dashed var(--border-medium);
}

.image-viewport-box {
  width: 200px;
  height: 200px;
  background: #FFFFFF;
  border: 2px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  position: relative;
}

.image-viewport-box.shape-circle {
  border-radius: 50%;
}

.image-viewport-box.shape-square {
  border-radius: var(--radius-xl);
}

.image-viewport-box.shape-rectangle {
  width: 240px;
  height: 135px;
  border-radius: var(--radius-lg);
}

.image-viewport-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.2s ease;
}

.shape-selectors-row {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.25rem;
  width: 100%;
  justify-content: center;
}

.shape-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.75rem;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

.shape-btn:hover {
  border-color: var(--brand-teal-500);
  color: var(--brand-navy-900);
}

.shape-btn.active {
  background: var(--brand-navy-900);
  color: #FFFFFF;
  border-color: var(--brand-navy-900);
}

.image-controls-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.dropzone-box {
  border: 2px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-surface-alt);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.dropzone-box:hover {
  border-color: var(--brand-teal-600);
  background: var(--brand-teal-50);
}

.dropzone-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-teal-600);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   BOTONES, FORMULARIOS Y ELEMENTOS INTERACTIVOS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  transition: all 0.15s ease;
  line-height: 1;
}

.btn-primary {
  background: var(--brand-teal-600);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--brand-teal-700);
  box-shadow: 0 2px 4px rgba(13, 148, 136, 0.25);
}

.btn-secondary {
  background: var(--brand-navy-900);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background: var(--brand-navy-800);
}

.btn-outline {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  color: var(--brand-navy-900);
}

.btn-outline:hover {
  border-color: var(--border-strong);
  background: var(--bg-surface-alt);
}

.btn-danger {
  background: var(--brand-rose-100);
  color: var(--brand-rose-600);
}

.btn-danger:hover {
  background: var(--brand-rose-600);
  color: #FFFFFF;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
}

.btn-icon-only {
  padding: 0.45rem;
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.btn-icon-only:hover {
  color: var(--brand-navy-900);
  background: var(--bg-surface-alt);
}

/* Switch Toggle Profesional */
.switch-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-medium);
  transition: 0.2s;
  border-radius: 24px;
}

.switch-slider::before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #FFFFFF;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
}

input:checked + .switch-slider {
  background-color: var(--brand-teal-600);
}

input:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* Campos de Formulario */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  color: var(--brand-navy-900);
  background: #FFFFFF;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-teal-600);
  box-shadow: 0 0 0 3px var(--brand-teal-100);
}

/* ==========================================================================
   SIMULADOR MÓVIL (REALISTIC CHASSIS)
   ========================================================================== */
.simulator-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.simulator-overlay.show {
  display: flex;
  animation: fadeIn 0.2s ease-out;
}

.phone-mockup-chassis {
  width: 380px;
  height: 760px;
  background: #000000;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
}

.phone-island {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 22px;
  background: #000000;
  border-radius: 20px;
  z-index: 20;
}

.phone-screen-frame {
  flex: 1;
  background: #FFFFFF;
  border-radius: 36px;
  overflow: hidden;
  position: relative;
}

.phone-screen-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.btn-close-sim {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  color: var(--brand-navy-900);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  font-weight: 800;
}

/* Botón flotante para abrir el simulador */
.btn-floating-simulator {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--brand-navy-900);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  z-index: 90;
  transition: all 0.2s ease;
}

.btn-floating-simulator:hover {
  transform: translateY(-2px);
  background: var(--brand-teal-700);
}

/* ==========================================================================
   PÁGINAS PÚBLICAS: CARTEL COMERCIAL & TARJETA PERSONAL
   Diseño moderno, comercial, elegante y minimalista (estilo Orikuo / Fintech)
   ========================================================================== */
.client-container {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1rem 2.5rem 1rem;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  overflow-x: hidden;
}

.client-bg-ambient {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #F8FAFC;
  background-image: 
    radial-gradient(at 0% 0%, rgba(25, 143, 128, 0.06) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(0, 158, 227, 0.06) 0px, transparent 50%),
    radial-gradient(circle at 50% 50%, rgba(241, 245, 249, 0.7) 0%, transparent 100%),
    radial-gradient(#CBD5E1 0.75px, transparent 0.75px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 20px 20px;
  z-index: 0;
}

/* Encabezado del Perfil Público */
.client-profile-card {
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 24px;
  padding: 1.85rem 1.35rem 1.45rem 1.35rem;
  text-align: center;
  box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.05), 0 4px 10px -2px rgba(15, 23, 42, 0.02);
  margin-bottom: 1.35rem;
  position: relative;
}

.client-logo-box {
  width: 92px;
  height: 92px;
  margin: 0 auto 0.95rem auto;
  background: #FFFFFF;
  border: 3px solid #FFFFFF;
  box-shadow: 0 8px 22px -3px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.client-logo-box:hover {
  transform: scale(1.02);
}

.client-logo-box.shape-circle {
  border-radius: 50%;
}

.client-logo-box.shape-square {
  border-radius: 22px;
}

.client-logo-box.shape-rectangle {
  width: 140px;
  height: 80px;
  border-radius: 16px;
}

.client-logo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-store-title {
  font-size: 1.32rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--brand-navy-950);
  line-height: 1.25;
}

.client-store-slogan {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-top: 0.3rem;
  line-height: 1.45;
}

.client-badges-bar {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

.status-chip-live {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-dot-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulseGlow 2s infinite;
}

@keyframes pulseGlow {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.5); }
  70% { transform: scale(1.05); 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); }
}

.status-chip-live.closed {
  background: var(--bg-surface-alt);
  color: var(--text-muted);
  border-color: var(--border-subtle);
}

.status-chip-live.closed .status-dot-pulse {
  background: #94A3B8;
  box-shadow: none;
  animation: none;
}

.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--bg-surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* Lista de Botones de Acción Comercial y Personal */
/* Lista de Botones de Acción Comercial y Personal (Estilo Limpio, Uniforme, Inspirado en Orikuo) */
.action-button-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.action-btn-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 16px;
  padding: 0.95rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03), 0 1px 2px rgba(15, 23, 42, 0.02);
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease, border-color 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: #0F172A;
  position: relative;
  user-select: none;
  width: 100%;
  box-sizing: border-box;
  min-height: 68px;
}

.action-btn-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
  border-color: #CBD5E1;
}

.action-btn-card:active {
  transform: scale(0.985);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

/* Mercado Pago: Tarjeta limpia con borde suave de realce */
.action-btn-card.btn-card-mp {
  background: #FFFFFF;
  border: 1px solid #E0F2FE;
}

.action-btn-card.btn-card-mp:hover {
  border-color: #BAE6FD;
  box-shadow: 0 4px 14px rgba(0, 158, 227, 0.1);
}

.btn-icon-square {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-navy-900);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.btn-icon-square.btn-icon-mp {
  background: #F0F9FF;
  border-color: rgba(0, 158, 227, 0.2);
}

.btn-icon-square.btn-icon-wa {
  background: #F0FDF4;
  border-color: rgba(37, 211, 102, 0.25);
}

.btn-icon-square.btn-icon-ig {
  background: #FFF1F2;
  border-color: rgba(225, 48, 108, 0.25);
}

.btn-icon-square.btn-icon-call {
  background: #EFF6FF;
  border-color: rgba(59, 130, 246, 0.25);
}

.btn-icon-square.btn-icon-email {
  background: #F0F9FF;
  border-color: rgba(2, 132, 199, 0.25);
}

.btn-icon-square.btn-icon-web {
  background: #F0FDFA;
  border-color: rgba(13, 148, 136, 0.25);
}

.action-btn-card:hover .btn-icon-square {
  transform: scale(1.04);
}

.btn-icon-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.btn-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.btn-title-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-clean-title {
  font-size: 1.02rem;
  font-weight: 650;
  color: #0F172A;
  letter-spacing: -0.015em;
  line-height: 1.3;
  word-break: break-word;
}

.btn-desc {
  font-size: 0.8rem;
  font-weight: 400;
  color: #64748B;
  margin-top: 0.2rem;
  line-height: 1.38;
  white-space: normal;
  word-break: break-word;
}

/* Flecha discreta a la derecha de cada botón */
.btn-arrow-col {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94A3B8;
  flex-shrink: 0;
  margin-left: auto;
  transition: transform 0.15s ease, color 0.15s ease;
}

.action-btn-card:hover .btn-arrow-col {
  transform: translateX(2px);
  color: #64748B;
}

.mp-logo-pill {
  background: #FFFFFF;
  border-radius: 10px;
  padding: 0.35rem 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid #E2E8F0;
}

.mp-logo-pill img {
  display: block;
  height: 22px;
  width: auto;
  object-fit: contain;
}

.btn-mercadopago {
  background: #009EE3;
  color: #FFFFFF;
  border: 1px solid #0089C9;
}

.btn-mercadopago:hover {
  background: #0089C9;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(0, 158, 227, 0.32);
}

/* Fila de Redes Sociales en Footer */
.footer-social-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.35rem 0 0.95rem 0;
}

.footer-social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  text-decoration: none;
}

.footer-social-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.footer-social-btn:active {
  transform: scale(0.94);
}

.footer-social-btn img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

/* Identidad visual diferenciada para Tarjeta Personal (AARON FAV — Minimalista y Formal) */
#cardMainContainer .client-profile-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-top: 3px solid #009EE3;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.04);
}

#cardMainContainer .client-store-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0F172A;
}

/* Modales y Hojas Inferiores (Action Sheets) */
.sheet-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: none;
  align-items: flex-end;
  justify-content: center;
}

.sheet-modal-backdrop.open {
  display: flex;
  animation: fadeIn 0.15s ease-out;
}

.sheet-content-panel {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: 1.5rem 1.25rem 2.5rem 1.25rem;
  box-shadow: var(--shadow-xl);
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.sheet-drag-handle {
  width: 36px;
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--border-medium);
  margin: 0 auto 1.25rem auto;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.sheet-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-navy-900);
}

/* Tarjeta de Copiado con 1 Toque */
.copy-strip {
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0.75rem 0.95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}

.copy-strip-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.copy-strip-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  font-family: var(--font-mono);
}

.btn-copy-action {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-copy-action:hover {
  background: var(--brand-teal-50);
  border-color: var(--brand-teal-500);
  color: var(--brand-teal-700);
}

.btn-copy-action.copied {
  background: var(--brand-emerald-500);
  color: #FFFFFF;
  border-color: var(--brand-emerald-500);
}

/* Toast flotante de confirmación */
.toast-notice {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(30px);
  background: var(--brand-navy-950);
  color: #FFFFFF;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast-notice.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ==========================================================================
   RESPONSIVE DESIGN ADAPTATIVO (SIN DESBORDAMIENTO HORIZONTAL EN 320px-430px)
   ========================================================================== */
@media (max-width: 992px) {
  .app-sidebar {
    width: 72px;
    padding: 1.25rem 0.5rem;
  }
  .nav-item span, .nav-section-title, .tenant-meta {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 0.75rem;
  }
  .image-customizer-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-header {
    padding: 0.75rem;
    height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .app-header-left {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
  }
  .profile-switcher-bar {
    width: 100%;
    flex-direction: column;
    gap: 0.4rem;
    padding: 0.4rem;
    box-sizing: border-box;
  }
  .profile-tab-btn {
    width: 100%;
    justify-content: center;
    font-size: 0.8rem;
    padding: 0.4rem 0.5rem;
    box-sizing: border-box;
  }
  .app-header-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .app-sidebar {
    display: none;
  }
  .app-content {
    padding: 0.85rem 0.65rem;
    width: 100%;
    box-sizing: border-box;
  }
  .profile-overview-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 0.85rem;
    gap: 1rem;
    box-sizing: border-box;
  }
  .profile-identity-col {
    gap: 0.85rem;
  }
  .profile-kpi-col {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
  }
  .kpi-stat-item {
    padding-left: 0;
    border-left: none;
  }
  .bank-accounts-grid {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }
  .image-customizer-container {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 1rem;
    box-sizing: border-box;
  }
  .phone-mockup-chassis {
    width: 100%;
    max-width: 95vw;
    height: auto;
    min-height: 580px;
  }
}

@media (max-width: 480px) {
  .client-container {
    padding: 1rem 0.85rem 2rem 0.85rem;
    max-width: 100%;
  }
  .client-profile-card {
    padding: 1.35rem 1rem 1.15rem 1rem;
    border-radius: 18px;
  }
  .client-logo-box {
    width: 80px;
    height: 80px;
    margin-bottom: 0.75rem;
  }
  .client-store-title {
    font-size: 1.18rem;
    font-weight: 700;
  }
  .action-btn-card {
    padding: 0.8rem 0.95rem;
    gap: 0.8rem;
    border-radius: 14px;
    min-height: 58px;
  }
  .btn-icon-square {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
  .btn-clean-title {
    font-size: 0.88rem;
  }
  .btn-desc {
    font-size: 0.73rem;
  }
  .footer-social-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 360px) {
  .client-container {
    padding: 0.85rem 0.65rem 1.75rem 0.65rem;
  }
  .client-profile-card {
    padding: 1.15rem 0.75rem 1rem 0.75rem;
    border-radius: 16px;
  }
  .client-logo-box {
    width: 72px;
    height: 72px;
    margin-bottom: 0.65rem;
  }
  .client-store-title {
    font-size: 1.08rem;
  }
  .action-btn-card {
    padding: 0.75rem 0.75rem;
    gap: 0.65rem;
    min-height: 54px;
  }
  .btn-icon-square {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }
  .btn-clean-title {
    font-size: 0.84rem;
  }
  .btn-desc {
    font-size: 0.7rem;
  }
}

/* Tarjeta Adaptable para Error de Conexión / Mensajes de Estado */
.connection-error-card {
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.25rem 1.5rem;
  text-align: center;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
  width: 100%;
  max-width: 420px;
  box-sizing: border-box;
  margin: 1.5rem auto;
}

.connection-error-icon-box {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--brand-rose-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem auto;
  color: var(--brand-rose-600);
}

.connection-error-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--brand-navy-900);
  margin-bottom: 0.35rem;
}

.connection-error-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.45rem 0 0.75rem 0;
  line-height: 1.45;
  word-break: break-word;
}

.connection-error-subtext {
  font-size: 0.76rem;
  color: var(--text-subtle);
  margin-bottom: 1.25rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .btn-floating-simulator {
    display: none !important;
  }
  .app-content {
    padding-bottom: 4rem;
  }
  #mercadoPagoFeatureCard, #personalMercadoPagoFeatureCard {
    padding: 1rem 0.9rem !important;
  }
}

@media (max-width: 480px) {
  .btn-icon-square {
    width: 44px;
    height: 44px;
  }
  .btn-icon-img {
    width: 26px;
    height: 26px;
  }
  .btn-clean-title {
    font-size: 0.96rem;
  }
  .btn-desc {
    font-size: 0.76rem;
  }
  .connection-error-card {
    padding: 1.75rem 1.15rem;
    border-radius: 16px;
  }
}
