/* ====================================================
   🎨 eXchCrpT MAIN.CSS - Version loaded dynamically - ÚNICO CSS PERMITIDO
   Midnight Teal Banking Design System
   Mobile-First | PWA Ready | Theme Switching
   ==================================================== */

/* ===== GLOBAL SURFACE VARIABLES (extend core.css) ===== */
:root {
    --success-surface: rgba(34, 197, 94, 0.12);
    --warning-surface: rgba(245, 158, 11, 0.15);
    --danger-surface: rgba(248, 113, 113, 0.16);
    --info-surface: rgba(59, 130, 246, 0.14);

    /* Provider brand palettes (light) */
    --provider-binance-bg: #FFF7E0;
    --provider-binance-text: #854D0E;
    --provider-binance-border: #F0B90B;

    --provider-kucoin-bg: #E6FFF5;
    --provider-kucoin-text: #006644;
    --provider-kucoin-border: #24AE8F;

    --provider-okx-bg: #F5F5F5;
    --provider-okx-text: #1F2937;
    --provider-okx-border: #9CA3AF;

    --provider-noones-bg: #FFE4E6;
    --provider-noones-text: #9F1239;
    --provider-noones-border: #E11D48;

    --provider-aggregator-bg: var(--info-surface);
    --provider-aggregator-text: var(--info);
    --provider-aggregator-border: var(--info);

    --provider-exchange-bg: var(--warning-surface);
    --provider-exchange-text: var(--warning);
    --provider-exchange-border: var(--warning);

    --provider-market-bg: #F3E8FF;
    --provider-market-text: #7C3AED;
    --provider-market-border: #8B5CF6;

    --provider-p2p-bg: var(--success-surface);
    --provider-p2p-text: var(--success);
    --provider-p2p-border: var(--success);
}

[data-theme="dark"] {
    --success-surface: rgba(34, 197, 94, 0.25);
    --warning-surface: rgba(245, 158, 11, 0.25);
    --danger-surface: rgba(248, 113, 113, 0.3);
    --info-surface: rgba(59, 130, 246, 0.28);

    --provider-binance-bg: rgba(240, 185, 11, 0.18);
    --provider-binance-text: #FDE68A;
    --provider-binance-border: #F0B90B;

    --provider-kucoin-bg: rgba(0, 212, 170, 0.18);
    --provider-kucoin-text: #9FF5E2;
    --provider-kucoin-border: #24AE8F;

    --provider-okx-bg: rgba(255, 255, 255, 0.08);
    --provider-okx-text: #F5F5F5;
    --provider-okx-border: #9CA3AF;

    --provider-noones-bg: rgba(225, 29, 72, 0.22);
    --provider-noones-text: #FCA5A5;
    --provider-noones-border: #F87171;

    --provider-aggregator-bg: rgba(59, 130, 246, 0.18);
    --provider-aggregator-text: #BFDBFE;
    --provider-aggregator-border: #60A5FA;

    --provider-exchange-bg: rgba(245, 158, 11, 0.2);
    --provider-exchange-text: #FCD34D;
    --provider-exchange-border: #F59E0B;

    --provider-market-bg: rgba(139, 92, 246, 0.2);
    --provider-market-text: #E9D5FF;
    --provider-market-border: #C084FC;

    --provider-p2p-bg: rgba(34, 197, 94, 0.2);
    --provider-p2p-text: #A7F3D0;
    --provider-p2p-border: #34D399;
}

/* ===== UTILITY CLASSES SYSTEM - THEME AWARE ===== */
/* 🎯 Replace inline styles with reusable utilities */

/* === LAYOUT UTILITIES === */
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-column { display: flex; flex-direction: column; }
.flex-wrap { display: flex; flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.relative { position: relative; }

/* === SPACING UTILITIES === */
.mb-xs { margin-bottom: var(--space-xs); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.p-xs { padding: var(--space-xs); }
.p-sm { padding: var(--space-sm); }
.p-md { padding: var(--space-md); }
.p-lg { padding: var(--space-lg); }
.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }

/* === TEXT UTILITIES === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-900 { font-weight: 900; }
.text-ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* === TRANSITION UTILITIES === */
.transition-fast { transition: all 0.2s ease; }
.transition-base { transition: all var(--transition-base); }

/* === COMBINED UTILITIES === */
.text-sm-600 { font-size: var(--text-sm); font-weight: 600; }
.text-xs-600 { font-size: var(--text-xs); font-weight: 600; }
.text-lg-600 { font-size: var(--text-lg); font-weight: 600; }
.text-base-600 { font-size: var(--text-base); font-weight: 600; }




/* === COLOR & TEXT SIZE UTILITIES === */
.text-primary-xs { font-size: var(--text-xs); color: var(--text-primary); }
.text-primary-sm { font-size: var(--text-sm); color: var(--text-primary); }
.text-primary-base { font-size: var(--text-base); color: var(--text-primary); }
.text-secondary-xs { font-size: var(--text-xs); color: var(--text-secondary); }
.text-secondary-sm { font-size: var(--text-sm); color: var(--text-secondary); }
.text-tertiary-xs { font-size: var(--text-xs); color: var(--text-tertiary); }

/* === CARD UTILITIES === */
.card-base {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}

.card-enhanced {
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
}

.card-balance {
    background: var(--hero-gradient); /* Consistente con theme claro/oscuro */
    border-radius: var(--radius-lg);
    padding: 0.8rem;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-lg);
    max-width: 280px;
    margin: 0 auto;
    color: white; /* Texto siempre blanco sobre gradiente teal */
}

/* === INPUT UTILITIES === */
.input-base {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    background: var(--card-bg);
    color: var(--text-primary);
}

.input-icon-right {
    position: absolute;
    right: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

/* === COMMON PATTERNS === */
.info-box {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    padding: var(--space-md);
    border-radius: var(--radius-md);
}

.balance-display {
    font-size: 2.2rem;
    font-weight: 900;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.flag-icon {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
}

.user-item {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* === COUNTRY CARD UTILITIES === */
.country-card {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.6rem 0.5rem 0.5rem 0.5rem;
    margin: 0;
    border: 1px solid rgba(200,200,200,0.3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
    min-width: 100px;
    width: fit-content;
    flex: 0 0 auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.country-card:hover {
    border-color: rgba(200,200,200,0.5);
    transform: translateY(-2px);
}

.country-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.1);
}

.country-flag-container {
    margin-bottom: 0.4rem;
    transform: scale(1.1);
}

.country-name {
    margin: 0 0 0.3rem 0;
    font-size: var(--text-sm);
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
}

/* Compact inline display for currencies and methods */
/* Currency line - More visible with subtle background and border */
.country-info-line {
    font-size: 0.65rem;
    text-align: center;
    margin-bottom: 0.25rem;
    line-height: 1.3;
    font-weight: 600;  /* Bold for better visibility */
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-xs);
}

/* Dark mode: light text with subtle background */
[data-theme="dark"] .country-info-line {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Light mode: dark text with subtle background */
[data-theme="light"] .country-info-line {
    color: rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Payment methods - More muted */
.country-info-line.country-methods {
    font-size: 0.6rem;
    font-weight: 500;  /* Less bold than currencies */
}

[data-theme="dark"] .country-info-line.country-methods {
    color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .country-info-line.country-methods {
    color: rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Compact note at top of modal - scrolls with content */
.modal-compact-note {
    font-size: 0.7rem;
    text-align: center;
    padding: 0.35rem 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    font-weight: 600;  /* Bold text */
}

/* Dark mode: light text on dark background */
[data-theme="dark"] .modal-compact-note {
    color: rgba(255, 255, 255, 0.8);
}

/* Light mode: dark text on light background */
[data-theme="light"] .modal-compact-note {
    color: rgba(0, 0, 0, 0.75);
}

/* Subtle separator with text on the right - Teal accent */
.countries-group-separator {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    margin: 0.4rem 0;
    font-size: 0.7rem;
    font-weight: 600;
    color: #008b8b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.countries-group-separator::before {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, #008b8b40 30%, #008b8b 100%);
    margin-right: 0.5rem;
}

.countries-group-separator span {
    flex-shrink: 0;
    opacity: 0.9;
}

.currency-tags, .payment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.currency-tag {
    background: var(--success);
    color: white;
    padding: 0.1rem 0.3rem;
    border-radius: var(--radius-sm);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
}

.payment-tag {
    background: var(--card-bg);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.15rem 0.4rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.bank-details-section {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    background: var(--card-bg);
}

.bank-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.bank-details-row {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xs);
}

/* === RESPONSIVE UTILITIES === */
@media (max-width: 768px) {
    .hidden-mobile { display: none; }
    .p-sm-mobile { padding: var(--space-sm); }
    .text-sm-mobile { font-size: var(--text-sm); }
}

/* === CSS VARIABLES - Midnight Teal Banking === */
:root {
  /* Primary - Midnight Teal Banking */
  --primary: #008B8B;
  --primary-dark: #006666;
  --primary-light: #4DCCCC;
  --primary-50: rgba(0, 139, 139, 0.05);
  --primary-100: rgba(0, 139, 139, 0.1);
  --primary-500: rgba(0, 139, 139, 0.5);
  --primary-900: rgba(0, 139, 139, 0.9);
  
  /* Secondary - Professional Gray */
  --secondary: #2C3E50;
  --secondary-light: #95A5A6;
  --secondary-dark: #1A252F;
  
  /* Tertiary - Dynamic Contrast (Theme Switching) */
  --tertiary: #FFFFFF;
  --tertiary-contrast: #1A1A1A;
  
  /* Status Colors */
  --success: #22c55e; /* Verde para depósitos/cargar */
  --warning: #F39C12;
  --danger: #ef4444; /* Rojo para retiros/retirar */
  --info: #3498DB;
  
  /* Background System */
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8F9FA;
  --bg-tertiary: #E9ECEF;
  
  /* Text System */
  --text-primary: #2C3E50;
  --text-secondary: #7F8C8D;
  --text-muted: #BDC3C7;
  --text-inverse: #FFFFFF;
  
  /* Border & Shadow */
  --border: #DEE2E6;
  --border-light: #E9ECEF;
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Typography Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-base: 0.25s ease-out;
  --transition-slow: 0.4s ease-out;
  
  /* Z-Index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 500;
  --z-toast: 800;
  
  /* Layout Constants */
  --max-width: 1200px;
  --nav-height: 64px;
  
  /* Main CTA Button - Light Theme (Verde claro como línea footer) */
  --cta-bg: var(--success);
  --cta-hover-bg: #219A52;
  
  /* Dashboard Variables - Enhanced Theme Switching */
  --hero-gradient: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  --card-bg: rgba(255,255,255,0.1);
  --card-border: rgba(255,255,255,0.2);
  --dashboard-card-bg: var(--bg-primary);
  --dashboard-card-border: var(--border);
  --dashboard-card-hover-bg: var(--bg-secondary);
  --balance-card-bg: #F8F9FA;
  --balance-card-border: #DEE2E6;
  --action-card-bg: #E9ECEF;
  --action-card-border: #DEE2E6;
  --action-card-hover-bg: #DEE2E6;
  --secondary-button-bg: rgba(255,255,255,0.5);
  --secondary-button-border: var(--border);
  --secondary-button-hover-bg: var(--bg-tertiary);
  
  /* 🎨 IDENTIDAD VISUAL: Transparencias inteligentes para textos */
  --text-bg-overlay: rgba(255,255,255,0.15); /* Blanco semi-opaco filtra teal, resalta negros/grises/verdes */
  --badge-bg-overlay: rgba(255,255,255,0.25); /* Para badges sobre fondos complejos */
  --card-overlay: rgba(255,255,255,0.08); /* Sutil para cards */
}

/* === DARK THEME === */
[data-theme="dark"] {
  --tertiary: #1A1A1A;
  --tertiary-contrast: #FFFFFF;
  
  --bg-primary: #1A2B2B;
  --bg-secondary: #2D3E3E;
  --bg-tertiary: #404F4F;
  
  --text-primary: var(--primary-light);
  --text-secondary: #B0B0B0;
  --text-muted: #9CA3AF; /* More transparent like light theme */
  --text-inverse: #1A1A1A;
  
  --border: #404040;
  --border-light: #2D2D2D;
  
  /* Main CTA Button - Dark Theme (Color de línea footer) */
  --cta-bg: var(--primary-light);
  --cta-hover-bg: var(--primary);
  
  /* Dashboard Variables - Dark Theme Enhanced */
  --hero-gradient: linear-gradient(135deg, rgba(20,35,35,0.95) 0%, rgba(35,50,50,0.98) 100%);
  --card-bg: rgba(77, 204, 204, 0.1);
  --card-border: rgba(77, 204, 204, 0.2);
  --dashboard-card-bg: var(--bg-secondary);
  --dashboard-card-border: var(--border);
  --dashboard-card-hover-bg: var(--bg-tertiary);
  --balance-card-bg: #3A3A3A;
  --balance-card-border: #555555;
  --action-card-bg: #404040;
  --action-card-border: #555555;
  --action-card-hover-bg: #4A4A4A;
  --secondary-button-bg: #404040;
  --secondary-button-border: rgba(77,204,204,0.2);
  --secondary-button-hover-bg: rgba(77,204,204,0.15);
  
  /* 🎨 IDENTIDAD VISUAL: Transparencias dark theme para textos */
  --text-bg-overlay: rgba(40,40,40,0.20); /* Gris oscuro semi-opaco permite resaltar grises claros y verdes */
  --badge-bg-overlay: rgba(40,40,40,0.35); /* Para badges sobre fondos complejos */
  --card-overlay: rgba(40,40,40,0.12); /* Sutil para cards */
}

/* === GLOBAL RESET & BASE === */
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: all var(--transition-base);
}

.loading-content {
  text-align: center;
  color: white;
}

/* Dark theme loading content adjustments */
[data-theme="dark"] .loading-content {
  color: var(--primary-light);
}

.loading-content .logo {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: var(--space-md);
  color: var(--primary);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  -webkit-text-stroke: 1px white;
  text-stroke: 1px white;
  transition: color var(--transition-base);
}

/* Dark theme loading logo */
[data-theme="dark"] .loading-content .logo {
  color: var(--primary-light);
}

.loading-content .version {
  font-size: var(--text-sm);
  font-family: 'Courier New', monospace;
  color: white;
  font-weight: normal;
}

.loading-content .build {
  font-size: var(--text-sm);
  font-family: 'Courier New', monospace;
  margin-top: 4px;
  color: white;
  font-weight: normal;
}

/* === LAYOUT COMPONENTS === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

/* === HEADER COMPONENT === */
.header {
  height: var(--nav-height);
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
}

/* Dark theme header - keep it black */
[data-theme="dark"] .header {
  background: #1A1A1A;
  border-bottom: 1px solid #404040;
}

.header .container {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center;
  width: 100%;
}

/* === LOGO COMPONENT === */
.logo {
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--primary);
  cursor: pointer;
  transition: transform var(--transition-fast);
  flex-shrink: 0;
}

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

/* === NAVIGATION === */
.nav {
  display: flex;
  gap: var(--space-md);
  align-items: center;
  flex-shrink: 0;
}

/* === BUTTON SYSTEM === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
  border: none;
  min-height: 44px; /* Touch target */
  gap: var(--space-sm);
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(0, 139, 139, 0.4);
  transform: translateY(-2px);
}

.btn-success {
  background: var(--cta-bg);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 139, 139, 0.3);
  transition: all var(--transition-base);
}

/* Dark theme button text adjustment */
[data-theme="dark"] .btn-success {
  color: #1A1A1A;
}

.btn-success:hover {
  background: var(--cta-hover-bg);
  box-shadow: 0 6px 20px rgba(0, 139, 139, 0.4);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border: 2px solid var(--danger);
}

.btn-danger:hover {
  background: #C0392B;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
  transform: translateY(-2px);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--text-lg);
  min-height: 56px;
}

.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  min-height: 36px;
}

/* === HERO SECTION === */
.hero {
  flex: 1;
  min-height: 60vh;
  background: var(--hero-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  position: relative;
  padding: var(--space-xl) 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.1);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  margin-bottom: var(--space-md);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  line-height: 1.1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.hero-title .primary-text {
  color: var(--primary);
  -webkit-text-stroke: 1px white;
  text-stroke: 1px white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-title .secondary-text {
  color: var(--secondary-light);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.hero-title .tertiary-text {
  color: white;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* === BRAND ANIMATION === */
.brand-animated {
  min-height: 1.2em;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-text {
  color: var(--primary);
  display: inline-flex;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform-origin: center;
  -webkit-text-stroke: 1px white;
  text-stroke: 1px white;
  letter-spacing: 0.1em;
  min-width: 8ch; /* Fixed width to prevent layout shifts */
  justify-content: center;
  transition: letter-spacing 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.brand-letter {
  display: inline-block;
  transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform-origin: center;
  color: inherit;
  text-shadow: inherit;
  opacity: 1;
  transform: scale(1);
  width: auto;
  overflow: hidden;
}

.core-letter {
  /* X, C, T letters - core brand letters */
  z-index: 1;
}

.extra-letter {
  /* e, h, r, p, T letters - fade smoothly */
  /* Initial state set via JavaScript */
}

/* === LOGO SVG ANIMATION === */
.logo-animation-container {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  height: 40px;
  min-width: 150px;
  max-width: 200px;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.logo-animation-container .logo-svg {
  position: absolute;
  left: 0;
  transform: translateX(0);
  height: 48px;
  width: 48px;
  opacity: 0;
  transition: all 0.6s ease-in-out;
  pointer-events: none;
}

.logo-animation-container .logo-text {
  display: inline-flex;
  font-size: var(--text-2xl);
  font-weight: 900;
  color: var(--primary);
  letter-spacing: 0.05em;
  transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-animation-container .letter {
  display: inline-block;
  transition: all 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Expanded state: Full text visible */
.logo-animation-container.expanded .letter {
  opacity: 1;
  transform: translateX(0) scale(1);
}

.logo-animation-container.expanded .logo-svg {
  opacity: 0;
  transform: translateX(0) scale(0.5);
}

/* Collapsed state: Letters collapse behind X */
.logo-animation-container.collapsed .letter:not(.core) {
  opacity: 0;
  transform: translateX(-100px) scale(0);
}

.logo-animation-container.collapsed .letter.core {
  opacity: 0;
  transform: translateX(0) scale(0.8);
}

.logo-animation-container.collapsed .logo-svg {
  opacity: 1;
  transform: translateX(0) scale(1);
}

/* Pulsing state: Logo pulses (más suave) */
.logo-animation-container.pulsing .logo-svg {
  animation: logoPulse 2.5s ease-in-out infinite;
}

.logo-animation-container.pulsing .letter {
  opacity: 0;
}

@keyframes logoPulse {
  0%, 100% {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translateX(0) scale(1.08);
    opacity: 0.95;
  }
}

.product-line {
  display: flex;
  gap: var(--space-md);
  font-size: 1em;
  opacity: 0.95;
}

.hero-subtitle {
  font-size: var(--text-lg);
  margin-bottom: var(--space-xl);
  opacity: 0.9;
}


/* === OFFLINE DEVELOPMENT STATE === */
.offline-hero {
  padding: 2.5rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.offline-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 139, 139, 0.16);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 620px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  color: var(--text-primary);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .offline-card {
  background: rgba(19, 32, 32, 0.92);
  border-color: rgba(77, 204, 204, 0.25);
}

.offline-heading {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.offline-title {
  font-size: var(--text-2xl);
  margin: 0;
  color: var(--text-primary);
}

.offline-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-base);
}

.offline-url {
  font-weight: 600;
  color: var(--primary);
  word-break: break-word;
}

.offline-description {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.6;
  background: rgba(0, 139, 139, 0.05);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.offline-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.offline-step {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  background: rgba(0, 139, 139, 0.04);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

[data-theme="dark"] .offline-step {
  background: rgba(77, 204, 204, 0.08);
}

.offline-step-number {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

.offline-step-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.offline-step-title {
  margin: 0;
  font-weight: 600;
  color: var(--text-primary);
}

.offline-step-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.offline-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.offline-actions .btn {
  width: 100%;
}

.offline-action-primary {
  font-weight: 600;
}

.offline-status-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  background: rgba(0, 139, 139, 0.06);
  border: 1px dashed rgba(0, 139, 139, 0.25);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
}

[data-theme="dark"] .offline-status-wrapper {
  background: rgba(77, 204, 204, 0.1);
  border-color: rgba(77, 204, 204, 0.28);
}

.offline-status {
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
}

.offline-countdown {
  margin: 0;
}

.offline-error {
  margin: 0;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

@media (min-width: 640px) {
  .offline-card {
    padding: var(--space-2xl);
  }

  .offline-actions {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .offline-actions .btn {
    width: auto;
  }

  .offline-actions .btn + .btn {
    margin-left: var(--space-sm);
  }
}

@media (min-width: 768px) {
  .offline-hero {
    padding: 3.5rem 0;
  }

  .offline-title {
    font-size: 2.2rem;
  }

  .offline-steps {
    gap: var(--space-lg);
  }
}

/* === BADGES GRID === */
.badges-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--space-lg);
  margin: var(--space-2xl) 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.badge {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  backdrop-filter: blur(10px);
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.badge:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.badge-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.badge-title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: white;
}

/* === LIQUIDITY MODAL STYLES === */
.liquidity-modal {
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.holdings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}


.admin-item-line.warning {
  background: rgba(243, 156, 18, 0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
  margin-top: var(--space-xs);
}

.liquidity-content {
  padding: var(--space-sm);
}

.liquidity-section {
  margin-bottom: var(--space-lg);
}

.liquidity-section h4 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
}

.holdings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.holding-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all 0.2s ease;
}

.holding-card.deficit {
  border-left: 4px solid var(--warning);
  background: var(--warning-50);
}

.holding-card.surplus {
  border-left: 4px solid var(--success);
}

.holding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}

.currency-code {
  font-size: var(--text-lg);
  font-weight: bold;
  color: var(--primary);
}

.holding-status.warning {
  color: var(--warning);
  font-size: var(--text-sm);
  font-weight: 600;
}

.holding-status.success {
  color: var(--success);
  font-size: var(--text-sm);
  font-weight: 600;
}

.holding-amounts .amount-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: var(--text-sm);
}

.amount-row.usd {
  font-weight: 600;
  color: var(--primary);
  border-top: 1px solid var(--border-light);
  padding-top: 4px;
  margin-top: 8px;
}

.deficit-warning {
  background: var(--warning-100);
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  padding: var(--space-xs);
  margin: var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--warning-dark);
}

.holding-footer {
  margin-top: var(--space-sm);
  padding-top: var(--space-xs);
  border-top: 1px solid var(--border-light);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.liquidity-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.liquidity-btn {
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.liquidity-btn.primary {
  background: var(--primary);
  color: white;
}

.liquidity-btn.primary:hover {
  background: var(--primary-dark);
}

.liquidity-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.liquidity-btn.secondary:hover {
  background: var(--bg-tertiary);
}

.operations-list {
  max-height: 300px;
  overflow-y: auto;
}

.operation-row {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--space-sm);
  margin-bottom: var(--space-xs);
}

.operation-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.operation-id {
  font-weight: 600;
  color: var(--primary);
  font-size: var(--text-sm);
}

.operation-conversion {
  font-weight: 500;
  color: var(--text-primary);
}

.operation-profit.success {
  color: var(--success);
  font-weight: 600;
}

.operation-details {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  padding: var(--space-xl);
  color: var(--text-muted);
  font-style: italic;
}

/* Responsive para Liquidity Modal */
@media (max-width: 768px) {
  .holdings-grid {
    grid-template-columns: 1fr;
  }
  
  .liquidity-actions {
    flex-direction: column;
  }
  
  .liquidity-btn {
    width: 100%;
    justify-content: center;
  }
  
  .operation-details {
    flex-direction: column;
    gap: 2px;
  }
}

/* === EXCHANGE RATES MODAL STYLES === */
.rates-modal {
  max-width: 1000px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.rates-content {
  padding: var(--space-sm);
}

.rates-section {
  margin-bottom: var(--space-lg);
}

.rates-section h4 {
  margin-bottom: var(--space-md);
  color: var(--text-primary);
  font-size: var(--text-lg);
  font-weight: 600;
}

.rates-alerts {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-lg);
}

.rate-alert {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border-left: 4px solid;
}

.rate-alert.warning {
  background: var(--warning-50);
  border-color: var(--warning);
  color: var(--warning-dark);
}

.rate-alert.info {
  background: var(--info-50);
  border-color: var(--info);
  color: var(--info-dark);
}

.rates-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}

.rates-btn {
  padding: var(--space-sm) var(--space-md);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.rates-btn.primary {
  background: var(--primary);
  color: white;
}

.rates-btn.primary:hover {
  background: var(--primary-dark);
}

.rates-btn.secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.rates-btn.secondary:hover {
  background: var(--bg-tertiary);
}

.rates-table-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
}

.rates-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.rates-table th {
  background: var(--bg-secondary);
  padding: var(--space-sm);
  text-align: left;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 2px solid var(--border);
}

.rates-table td {
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border-light);
}

.rate-row:hover {
  background: var(--bg-secondary);
}

.currency-pair {
  font-weight: 600;
  color: var(--primary);
}

.rate-value {
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.source-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.source-badge.api {
  background: var(--success-100);
  color: var(--success);
}

.source-badge.manual {
  background: var(--warning-100);
  color: var(--warning);
}

.rate-action-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin: 0 2px;
  border-radius: var(--radius-sm);
  transition: background 0.2s ease;
}

.rate-action-btn:hover {
  background: var(--bg-tertiary);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.comparison-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.comparison-header {
  margin-bottom: var(--space-sm);
}

.currency-name {
  font-weight: 600;
  color: var(--primary);
  font-size: var(--text-md);
}

.comparison-rates {
  margin-bottom: var(--space-sm);
}

.rate-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: var(--text-sm);
}

.comparison-diff {
  text-align: center;
  font-weight: 600;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
}

.comparison-diff.positive {
  background: var(--success-100);
  color: var(--success);
}

.comparison-diff.negative {
  background: var(--danger-100);
  color: var(--danger);
}

/* Responsive para Rates Modal */
@media (max-width: 768px) {
  .rates-actions {
    flex-direction: column;
  }
  
  .rates-btn {
    width: 100%;
    justify-content: center;
  }
  
  .rates-table-container {
    font-size: var(--text-xs);
  }
  
  .rates-table th,
  .rates-table td {
    padding: var(--space-xs);
  }
  
  .comparison-grid {
    grid-template-columns: 1fr;
  }
}

/* === PLATFORM BALANCE MODAL STYLES === */
.balance-modal {
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
}

.balance-currencies-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Consolidated admin-list-item states */
.admin-list-item.deficit,
.admin-list-item.pending {
  border-left: 3px solid var(--warning);
  background: var(--warning-50);
}

.admin-item-line.tertiary {
  font-size: var(--text-xs);
  opacity: 0.8;
}

.admin-item-detail.success {
  color: var(--success);
  font-weight: 600;
}

.admin-item-detail.danger {
  color: var(--danger);
  font-weight: 600;
}

.admin-item-detail.muted {
  color: var(--text-muted);
}

.pending-operations-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* === METHODS MODAL FIXES === */
.countries-methods-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.methods-modal {
  max-width: 700px;
  width: 95%;
  max-height: 85vh;
  overflow-y: auto;
}

.country-detail-modal {
  max-width: 600px;
  width: 95%;
  max-height: 80vh;
  overflow-y: auto;
}

/* Flag in modal headers */
.modal-header h3 .flag-svg {
  display: inline-block;
  margin-right: var(--space-xs);
  vertical-align: middle;
}

/* Fix para admin items actions */
.admin-item-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.admin-action-btn {
  padding: var(--space-xs);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-action-btn:hover {
  background: var(--bg-tertiary);
}

.admin-action-btn.success {
  background: var(--success-100);
  color: var(--success);
  border-color: var(--success);
}

.admin-action-btn.danger {
  background: var(--danger-100);
  color: var(--danger);
  border-color: var(--danger);
}

/* === MODAL SYSTEM === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  max-width: 400px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;  /* Default: scroll on content (for backward compatibility) */
  box-shadow: var(--shadow-lg);
  position: relative;
  margin: auto;
}

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

.modal-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px; /* Increased from var(--text-xl) to match icon button size */
  color: var(--text-secondary);
  cursor: pointer;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  width: 44px;  /* Same as icon buttons */
  height: 44px; /* Same as icon buttons */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  transform: scale(1.1);
}

.modal-close-text {
  font-size: var(--text-xs);
  margin-top: 2px;
  line-height: 1;
  font-weight: 500;
}

.modal-body {
  padding: var(--space-md) var(--space-lg);
}

/* Changelog modal: garantizar scroll interno en el body */
#changelog-modal .modal-content {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: visible; /* Permitir que el contenido se expanda */
}

#changelog-modal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(90vh - 80px); /* Limitar altura del body, no del content */
  overflow-y: auto !important; /* Forzar scroll en el body */
  overflow-x: hidden;
  padding-right: 0.75rem;
  -webkit-overflow-scrolling: touch;
}

/* Contenedor de versiones - sin límite de altura */
#changelog-releases {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Commits dentro de cada versión - con scroll propio */
.changelog-commits-container {
  max-height: 350px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

#changelog-modal .modal-body::-webkit-scrollbar {
  width: 8px;
}

#changelog-modal .modal-body::-webkit-scrollbar-track {
  background: var(--bg-secondary);
  border-radius: 4px;
}

#changelog-modal .modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

/* === DEPOSIT/WITHDRAW MODALS SPECIFIC === */
/* Compact note scrolls with content (no sticky position) */
.deposit-container .modal-compact-note,
.withdraw-container .modal-compact-note {
  /* No special positioning - scrolls normally with content */
  /* Styling already defined in global .modal-compact-note rule above */
}

/* === MODAL SPECIFIC COMPONENTS === */
.modal-xct-logo {
  font-size: 3rem;
  font-weight: 900;
  color: white;
  -webkit-text-stroke: 1px var(--primary);
  text-stroke: 1px var(--primary);
  margin-bottom: 1rem;
}

.modal-exchcrpt-title {
  color: var(--primary);
  font-weight: 900;
  font-size: var(--text-xl);
  margin: 0;
}

/* === DARK THEME MODAL ADJUSTMENTS === */
[data-theme="dark"] .modal-xct-logo {
  color: white;
  -webkit-text-stroke: 1px var(--primary);
  text-stroke: 1px var(--primary);
}

[data-theme="light"] .modal-xct-logo {
  color: white;
  -webkit-text-stroke: 1px var(--primary);
  text-stroke: 1px var(--primary);
}

/* === MODAL TABS === */
.modal-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.modal-tab {
  flex: 1;
  padding: var(--space-md) var(--space-sm);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-tab:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.modal-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: rgba(0, 139, 139, 0.1);
}

/* === RATES MODAL SPECIFIC STYLES === */
.tab-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--secondary);
  border-radius: 4px;
  cursor: pointer;
  background: transparent;
  color: var(--secondary);
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.tab-btn.active {
  background: var(--primary);
  color: white;
  border: none;
}

.tab-btn:hover:not(.active) {
  background: var(--tertiary-light);
}

.tab-content {
  display: block;
}

.tab-content:not(.active) {
  display: none;
}

.overview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  text-align: center;
  padding: 1rem;
  background: var(--tertiary-light);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--secondary);
}

.countries-rates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.country-rate-card {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  transition: box-shadow 0.2s ease;
}

.country-rate-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.country-info {
  margin-bottom: 0.75rem;
}

.country-name {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.country-currency {
  color: var(--primary);
  font-weight: 600;
}

.country-operations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.operation-badge {
  background: var(--success);
  color: white;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
}

.market-rates-list {
  display: grid;
  gap: 0.5rem;
}

.market-rate-item {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.75rem;
  background: var(--tertiary-light);
  border-radius: 6px;
  border: 1px solid var(--border);
}

.rate-pair {
  font-weight: bold;
  color: var(--primary);
}

.rate-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.rate-source {
  font-size: 0.875rem;
  color: var(--info);
}

.rate-updated {
  font-size: 0.75rem;
  color: var(--secondary);
}

.adjustments-list {
  display: grid;
  gap: 1rem;
}

.adjustment-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  background: var(--bg);
}

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

.adjustment-header h5 {
  margin: 0;
  color: var(--primary);
}

.current-rates {
  font-size: 0.875rem;
  color: var(--secondary);
}

.current-rates span {
  margin-right: 1rem;
}

.current-rates span:last-child {
  margin-right: 0;
}

.adjustment-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.control-group label {
  display: block;
  font-size: 0.875rem;
  color: var(--secondary);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.control-group input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg);
  color: var(--text);
}

.adjustment-preview {
  font-size: 0.75rem;
  color: var(--secondary);
  text-align: center;
  padding: 0.5rem;
  background: var(--tertiary-light);
  border-radius: 4px;
  border: 1px solid var(--border);
}

.text-info {
  background: #e7f3ff;
  padding: 0.75rem;
  border-radius: 6px;
  border-left: 4px solid var(--info);
  margin: 1rem 0;
}

/* Dark theme adjustments for rates modal */
[data-theme="dark"] .text-info {
  background: rgba(52, 152, 219, 0.1);
  color: var(--text);
}

[data-theme="dark"] .adjustment-card {
  background: var(--bg-secondary);
}

[data-theme="dark"] .country-rate-card {
  background: var(--bg-secondary);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .overview-stats {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .countries-rates-grid {
    grid-template-columns: 1fr;
  }
  
  .market-rate-item {
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }
  
  .adjustment-controls {
    grid-template-columns: 1fr;
  }
  
  .current-rates {
    flex-direction: column;
  }
  
  .adjustment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

.config-tab-content {
  display: none;
}

.config-tab-content.active {
  display: block;
}

/* === DASH SWITCH === */
.dash-switch-container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-xs);
  margin-left: var(--space-xs);
}

.dash-greeting {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  line-height: 1;
  margin: 0;
}

.dash-greeting-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.admin-settings-btn {
  padding: 3px;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(148, 163, 184, 0.35);
  color: var(--text-secondary);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  min-width: 22px;
  min-height: 22px;
}

.admin-settings-btn:hover {
  border-color: var(--teal);
  color: var(--teal);
}

@media (min-width: 768px) {
  .dash-switch-container {
    align-items: center;
  }

  .dash-greeting-stack {
    flex-direction: column;
    align-items: flex-start;
  }
}

.dash-switch {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dash-switch.user-active {
  border-top: 2px solid var(--primary);
  border-left: 2px solid var(--primary);
  border-right: 2px solid var(--primary);
}

.dash-switch.admin-active {
  border-bottom: 2px solid #ff6b35;
  border-left: 2px solid #ff6b35;
  border-right: 2px solid #ff6b35;
}

.dash-btn {
  background: none;
  border: none;
  padding: 2px var(--space-xs);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: var(--text-xs);
}

.dash-btn.active {
  font-size: var(--text-sm);
  padding: var(--space-xs);
}

.user-active .user-dash.active {
  background: rgba(0, 139, 139, 0.1);
}

.user-active .admin-dash:not(.active) {
  border-bottom: 2px dashed #ffa500;
  color: #ffa500;
}

.admin-active .admin-dash.active {
  background: rgba(255, 107, 53, 0.1);
}

.admin-active .user-dash:not(.active) {
  border-top: 2px dashed var(--primary);
  color: var(--primary);
}

.user-dash {
  color: var(--primary);
}

.admin-dash {
  color: #ff6b35;
}

/* === INSTALL BUTTON FLOATING === */
.install-btn-floating {
  position: absolute;
  top: calc(100% + 18px);
  left: -13px;
  background: var(--bg-primary);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  min-height: 36px;
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  animation: pulse 3s infinite;
  z-index: 10;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}

.install-btn-floating .svg-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  vertical-align: middle;
}

.install-btn-floating:hover {
  background: var(--primary);
  color: white;
  transform: scale(1.05);
}

.install-text-floating {
  display: inline;
  vertical-align: baseline;
  line-height: 1;
  margin-top: 3px;
}

@keyframes pulse {
  0%, 70%, 100% { transform: scale(1); }
  35% { transform: scale(1.1); }
}

@media (max-width: 480px) {
  .install-text-floating {
    display: none;
  }
  .install-btn-floating {
    padding: var(--space-sm);
    min-width: 36px;
    min-height: 36px;
    top: calc(100% + 6px);
  }
}

/* === SINGLE USER BUTTON === */
.user-name-btn {
  background: none;
  border: 2px solid var(--primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-left: var(--space-xs);
  color: var(--primary);
}

.user-name-btn:hover {
  background: var(--primary);
  color: white;
}

/* Phase 26: User type badges */
.user-name-btn.trader-badge {
  border-color: #10b981;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.user-name-btn.trader-badge:hover {
  background: #10b981;
  color: white;
}

.user-name-btn.limited-badge {
  border-color: #f59e0b;
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.user-name-btn.limited-badge:hover {
  background: #f59e0b;
  color: white;
}

/* Rate cards for trader dashboard */
.rates-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.rate-card-mini {
  background: var(--bg-secondary);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  text-align: center;
}

.rate-card-mini .rate-pair {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.rate-card-mini .rate-value {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
}

.rate-card-mini .rate-change {
  font-size: var(--text-xs);
  margin-top: 0.25rem;
}

.rate-card-mini .rate-change.positive {
  color: var(--success);
}

.rate-card-mini .rate-change.negative {
  color: var(--error);
}

/* === MODAL COMPACT LAYOUT === */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.feature-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.feature-col > div {
  font-size: var(--text-sm);
  padding: var(--space-xs) 0;
}

.contact-compact {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  font-size: var(--text-sm);
}

.contact-compact > div {
  padding: var(--space-xs) 0;
}

/* === FORM COMPONENTS === */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--space-sm);
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-100);
}

.form-input::placeholder {
  color: var(--text-muted);
}

/* === COMPACT FORM COMPONENTS === */
.form-group-compact {
  margin-bottom: var(--space-md);
}

.form-input-compact {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast);
}

.form-input-compact:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-100);
}

.form-input-compact::placeholder {
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* === FLAG SVG SPRITES === */
.flag-ve { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%23FFCC00"/><rect y="6.67" width="30" height="6.67" fill="%23003893"/><rect y="13.33" width="30" height="6.67" fill="%23CF0921"/><circle cx="12" cy="10" r="0.8" fill="white"/><circle cx="15" cy="10" r="0.8" fill="white"/><circle cx="18" cy="10" r="0.8" fill="white"/></svg>'); }
.flag-ar { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%2374ACDF"/><rect y="6.67" width="30" height="6.67" fill="white"/><rect y="13.33" width="30" height="6.67" fill="%2374ACDF"/><circle cx="15" cy="10" r="2" fill="none" stroke="%23FFAA00" stroke-width="0.8"/><path d="M15,8.5 L15.5,9.5 L16.5,9.5 L15.8,10.2 L16,11.2 L15,10.5 L14,11.2 L14.2,10.2 L13.5,9.5 L14.5,9.5 Z" fill="%23FFAA00"/></svg>'); }
.flag-br { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23009639"/><polygon points="15,4 24,10 15,16 6,10" fill="%23FFDF00"/><circle cx="15" cy="10" r="3.5" fill="%23002868"/><path d="M12,12 Q15,8 18,12" stroke="white" stroke-width="0.3" fill="none"/></svg>'); }
.flag-eu { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23003399"/><g fill="%23FFFF00"><circle cx="15" cy="6" r="0.8"/><circle cx="18" cy="7" r="0.8"/><circle cx="20" cy="10" r="0.8"/><circle cx="18" cy="13" r="0.8"/><circle cx="15" cy="14" r="0.8"/><circle cx="12" cy="13" r="0.8"/><circle cx="10" cy="10" r="0.8"/><circle cx="12" cy="7" r="0.8"/></g></svg>'); }
.flag-mx { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="10" height="20" fill="%23006847"/><rect x="10" width="10" height="20" fill="white"/><rect x="20" width="10" height="20" fill="%23CE1126"/></svg>'); }
.flag-pa { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="15" height="10" fill="white"/><rect x="15" width="15" height="10" fill="%23DA121A"/><rect y="10" width="15" height="10" fill="%23DA121A"/><rect x="15" y="10" width="15" height="10" fill="white"/><rect x="18" y="2" width="2" height="6" fill="%23005CE6"/><rect x="16" y="4" width="6" height="2" fill="%23005CE6"/><path d="M5,3 L6,5 L8,5 L6.5,6.5 L7,8 L5,7 L3,8 L3.5,6.5 L2,5 L4,5 Z" fill="%23005CE6"/></svg>'); }
.flag-sv { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%23002868"/><rect y="6.67" width="30" height="6.67" fill="white"/><rect y="13.33" width="30" height="6.67" fill="%23002868"/></svg>'); }
.flag-co { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="10" fill="%23FFCD00"/><rect y="10" width="30" height="5" fill="%23003893"/><rect y="15" width="30" height="5" fill="%23C8102E"/></svg>'); }
.flag-pe { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="10" height="20" fill="%23D91023"/><rect x="10" width="10" height="20" fill="white"/><rect x="20" width="10" height="20" fill="%23D91023"/></svg>'); }
.flag-uy { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="2.22" fill="white"/><rect y="2.22" width="30" height="2.22" fill="%23002868"/><rect y="4.44" width="30" height="2.22" fill="white"/><rect y="6.67" width="30" height="2.22" fill="%23002868"/><rect y="8.89" width="30" height="2.22" fill="white"/><rect y="11.11" width="30" height="2.22" fill="%23002868"/><rect y="13.33" width="30" height="2.22" fill="white"/><rect y="15.56" width="30" height="2.22" fill="%23002868"/><rect y="17.78" width="30" height="2.22" fill="white"/><rect width="12" height="10" fill="%23002868"/><circle cx="6" cy="5" r="1.5" fill="%23FCD116"/><path d="M6,3.5 L6.5,4.5 L7.5,4.5 L6.8,5.2 L7,6.2 L6,5.5 L5,6.2 L5.2,5.2 L4.5,4.5 L5.5,4.5 Z" fill="%23FCD116"/></svg>'); }
.flag-cl { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="10" fill="white"/><rect y="10" width="30" height="10" fill="%23D52B1E"/><rect width="10" height="10" fill="%230F47AF"/></svg>'); }
.flag-ec { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="10" fill="%23FFD100"/><rect y="10" width="30" height="5" fill="%23003893"/><rect y="15" width="30" height="5" fill="%23CE1126"/></svg>'); }
.flag-pr { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="4" fill="%23ED0000"/><rect y="4" width="30" height="4" fill="white"/><rect y="8" width="30" height="4" fill="%23ED0000"/><rect y="12" width="30" height="4" fill="white"/><rect y="16" width="30" height="4" fill="%23ED0000"/><polygon points="0,0 0,20 15,10" fill="%23002868"/></svg>'); }
.flag-us { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="1.54" fill="%23B22234"/><rect y="1.54" width="30" height="1.54" fill="white"/><rect y="3.08" width="30" height="1.54" fill="%23B22234"/><rect y="4.62" width="30" height="1.54" fill="white"/><rect y="6.15" width="30" height="1.54" fill="%23B22234"/><rect y="7.69" width="30" height="1.54" fill="white"/><rect y="9.23" width="30" height="1.54" fill="%23B22234"/><rect y="10.77" width="30" height="1.54" fill="white"/><rect y="12.31" width="30" height="1.54" fill="%23B22234"/><rect y="13.85" width="30" height="1.54" fill="white"/><rect y="15.38" width="30" height="1.54" fill="%23B22234"/><rect y="16.92" width="30" height="1.54" fill="white"/><rect y="18.46" width="30" height="1.54" fill="%23B22234"/><rect width="12" height="10.77" fill="%233C3B6E"/></svg>'); }
.flag-do { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="white"/><rect width="30" height="8" fill="%23002D62"/><rect y="12" width="30" height="8" fill="%23CE1126"/><rect x="12" width="6" height="20" fill="white"/><rect y="8" width="30" height="4" fill="white"/></svg>'); }
.flag-py { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%23D52B1E"/><rect y="6.67" width="30" height="6.67" fill="white"/><rect y="13.33" width="30" height="6.67" fill="%23003893"/></svg>'); }
.flag-bo { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%23D52B1E"/><rect y="6.67" width="30" height="6.67" fill="%23FFD100"/><rect y="13.33" width="30" height="6.67" fill="%23007934"/></svg>'); }
.flag-cn { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23DE2910"/><path d="M5,4 L6,6 L8,6 L6.5,7.5 L7,9 L5,8 L3,9 L3.5,7.5 L2,6 L4,6 Z" fill="%23FFDE00"/><circle cx="10" cy="3" r="0.5" fill="%23FFDE00"/><circle cx="12" cy="4" r="0.5" fill="%23FFDE00"/><circle cx="12" cy="6" r="0.5" fill="%23FFDE00"/><circle cx="10" cy="7" r="0.5" fill="%23FFDE00"/></svg>'); }
.flag-ca { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="10" height="20" fill="%23FF0000"/><rect x="10" width="10" height="20" fill="white"/><rect x="20" width="10" height="20" fill="%23FF0000"/><path d="M15,6 L16,8 L18,8 L16.5,9.5 L17,11 L15,10 L13,11 L13.5,9.5 L12,8 L14,8 Z" fill="%23FF0000"/></svg>'); }
.flag-cr { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="4" fill="%23002B7F"/><rect y="4" width="30" height="4" fill="white"/><rect y="8" width="30" height="4" fill="%23C8102E"/><rect y="12" width="30" height="4" fill="white"/><rect y="16" width="30" height="4" fill="%23002B7F"/></svg>'); }
.flag-hn { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%230F47AF"/><rect y="6.67" width="30" height="6.67" fill="white"/><rect y="13.33" width="30" height="6.67" fill="%230F47AF"/></svg>'); }
.flag-gt { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="10" height="20" fill="%234997D0"/><rect x="10" width="10" height="20" fill="white"/><rect x="20" width="10" height="20" fill="%234997D0"/></svg>'); }
.flag-ni { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="6.67" fill="%230F47AF"/><rect y="6.67" width="30" height="6.67" fill="white"/><rect y="13.33" width="30" height="6.67" fill="%230F47AF"/></svg>'); }
.flag-es { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="5" fill="%23C60B1E"/><rect y="5" width="30" height="10" fill="%23FFC400"/><rect y="15" width="30" height="5" fill="%23C60B1E"/></svg>'); }
.flag-gb { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 20"><rect width="30" height="20" fill="%23012169"/><path d="M0,0 L30,20 M30,0 L0,20" stroke="white" stroke-width="3"/><path d="M0,0 L30,20 M30,0 L0,20" stroke="%23C8102E" stroke-width="2"/><path d="M15,0 L15,20 M0,10 L30,10" stroke="white" stroke-width="5"/><path d="M15,0 L15,20 M0,10 L30,10" stroke="%23C8102E" stroke-width="3"/></svg>'); }

.flag-usdt { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40"><circle cx="20" cy="20" r="20" fill="%2326A17B"/><text x="20" y="27" font-size="24" font-weight="900" fill="white" text-anchor="middle" font-family="Arial, sans-serif">T</text></svg>'); }

/* === FOOTER === */
.footer {
  background: rgba(0,120,120,0.95);
  border-top: 3px solid var(--success);
  padding: var(--space-2xl) 0;
  margin-top: auto;
  color: white;
  transition: all var(--transition-base);
}

/* Dark theme footer adjustments */
[data-theme="dark"] .footer {
  background: #2a3a3a;
  border-top: 3px solid #1a4d4d;
  color: #d0d0d0;
}

.flags-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: var(--space-lg);
  padding: 0 var(--space-md);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.flag-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
  cursor: pointer;
  background: rgba(255,255,255,0.1);
  border: 1.5px solid rgba(26, 155, 142, 0.7);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

/* Dark theme flag borders */
[data-theme="dark"] .flag-item {
  background: rgba(20, 20, 20, 0.6);
  border: 1.5px solid #1a9b8e;
}

[data-theme="dark"] .flag-item:hover {
  border: 1.5px solid #26d0c4;
  background: rgba(38, 208, 196, 0.15);
  box-shadow: 0 0 8px rgba(26, 155, 142, 0.4);
}

.flag-item:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.15);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.flag-svg {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background-size: cover;
  background-position: center;
}

.flag-code {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.9);
  font-weight: 600;
}

.footer-text {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: var(--text-sm);
}

[data-theme="dark"] .footer-text {
  color: #a8a8a8;
}

/* === RESPONSIVE BREAKPOINTS === */

/* Mobile First - Default styles above are for mobile */

/* Tablet - 768px and up */
@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-lg);
  }

  .badges-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 500px;
  }

  /* Eliminada regla .modal-content { width: 500px; } que causaba salto intermedio */
}

/* Desktop - 1024px and up */
@media (min-width: 1024px) {
  .badges-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    max-width: 600px;
    gap: var(--space-xl);
  }
  
  .badge {
    min-height: 120px;
    padding: var(--space-2xl);
  }
  
  .hero-title {
    font-size: 4rem;
  }
}

/* Large Desktop - 1280px and up */
@media (min-width: 1280px) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* === UTILITY CLASSES === */
.hidden {
  display: none;
}

.visible {
  display: block;
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

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

.font-bold {
  font-weight: 700;
}

.font-semibold {
  font-weight: 600;
}

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

.text-secondary {
  color: var(--text-secondary);
}

.text-muted {
  color: var(--text-muted);
}

.bg-primary {
  background-color: var(--primary);
}

.bg-secondary {
  background-color: var(--bg-secondary);
}


/* === PWA SPECIFIC STYLES === */
@media (display-mode: standalone) {
  .header {
    padding-top: env(safe-area-inset-top);
  }
  
  body {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* === VERSION DISPLAY (Legacy - will be replaced by positioned version) === */
.version-display {
  position: fixed;
  bottom: var(--space-sm);
  right: var(--space-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: var(--text-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  z-index: var(--z-dropdown);
}

/* === ANIMATION CLASSES === */
.fade-in {
  animation: fadeIn 0.3s ease-out;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideDown {
  from {
    opacity: 1;
    max-height: 300px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    transform: translateY(-20px);
  }
}

/* ===================================================================
   🎨 POSITIONED UI CONTROLS - Modular System (ModalUtils.js)
   Theme Switch + Version Display + Custom Controls
   =================================================================== */

/* UI Positioned Control Base */
.ui-positioned-control {
  pointer-events: auto;
  user-select: none;
}

/* Theme Switch Positioned */
.theme-switch-positioned {
  position: fixed;
  z-index: 9999;
}

.theme-toggle-btn {
  background: var(--bg-secondary);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: calc(var(--space-xs) * 0.6) calc(var(--space-xs) * 0.8);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  min-width: 28px;
  min-height: 28px;
  line-height: 1;
}

.theme-toggle-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  color: var(--text-color);
  transform: scale(1.05);
}

.theme-icon-light,
.theme-icon-dark {
  font-size: var(--text-sm);
  line-height: 1;
  display: block;
}

/* Show/hide theme icons based on current theme */
[data-theme="light"] .theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

.theme-label {
  font-size: var(--text-xs);
  font-weight: 500;
}

/* Version Display Positioned */
.version-display-positioned {
  position: fixed !important;
  z-index: 9998 !important;
}

.version-text {
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: calc(var(--space-xs) * 0.6) calc(var(--space-xs) * 0.8);
  font-size: var(--text-xs);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1.2;
  min-height: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Light theme version display */
[data-theme="light"] .version-text {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text-primary);
  border: 1px solid rgba(0, 0, 0, 0.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.version-display-positioned:hover .version-text {
  background: rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.5);
  transform: scale(1.05);
}

[data-theme="light"] .version-display-positioned:hover .version-text {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  .theme-toggle-btn {
    min-width: 24px;
    min-height: 24px;
    padding: calc(var(--space-xs) * 0.5);
  }
  
  .theme-icon-light,
  .theme-icon-dark {
    font-size: var(--text-xs);
  }
  
  .theme-label {
    display: none; /* Hide label on mobile for space */
  }
  
  .version-text {
    font-size: var(--text-xs);
    padding: calc(var(--space-xs) * 0.5) calc(var(--space-xs) * 0.6);
    min-height: 24px;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .theme-toggle-btn,
  .version-text {
    border-width: 2px;
    font-weight: 600;
  }
}

/* === DARK THEME ADJUSTMENTS === */
[data-theme="dark"] .hero-title .secondary-text {
  color: var(--tertiary-contrast);
}

[data-theme="dark"] .hero-title .tertiary-text {
  color: var(--secondary-light);
}

/* Dark theme logo adjustments - NO BORDERS */
[data-theme="dark"] .logo {
  color: var(--primary-light);
  -webkit-text-stroke: none;
  text-stroke: none;
}

[data-theme="dark"] .hero-title .primary-text {
  color: var(--primary-light);
  -webkit-text-stroke: none;
  text-stroke: none;
}

[data-theme="dark"] .loading-content .logo {
  color: var(--primary-light);
}

[data-theme="dark"] .brand-text,
[data-theme="dark"] .brand-letter {
  -webkit-text-stroke: none;
  text-stroke: none;
}

[data-theme="light"] .loading-content .logo {
  color: var(--primary);
}

[data-theme="light"] .brand-text,
[data-theme="light"] .brand-letter {
  -webkit-text-stroke: none;
  text-stroke: none;
}

/* === SPECIAL EFFECTS === */
.cta-main {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* === HEADER BUTTONS UNIFIED === */
.header-btn {
  border-radius: var(--radius-md);
  padding: var(--space-xs);
  background: transparent !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
  margin-right: var(--space-xs);
  font-size: var(--text-sm);
  transition: all 0.2s ease;
  min-height: 36px;
  min-width: 36px;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: var(--bg-secondary) !important;
  color: var(--text-primary) !important;
  border-color: var(--text-secondary) !important;
}

/* SuperAdmin button special styling */
.header-btn.superadmin-btn {
  border-color: var(--warning) !important;
  color: var(--warning) !important;
}

.header-btn.superadmin-btn:hover {
  background: var(--warning) !important;
  color: #1A1A1A !important;
  border-color: var(--warning) !important;
  box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

.help-btn {
  min-width: 36px;
}

.install-btn {
  white-space: nowrap;
  animation: pulse 3s infinite;
  border: 2px solid var(--primary) !important;
}

.install-btn:hover {
  background: var(--primary) !important;
  color: white !important;
  transform: scale(1.05);
}

/* === FLOATING THEME SWITCH === */
.theme-switch-floating {
  position: fixed;
  bottom: var(--space-sm);
  left: var(--space-sm);
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: var(--text-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  z-index: var(--z-dropdown);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  font-family: inherit;
}

.theme-switch-floating:hover {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-color: var(--text-muted);
}

/* === NAV SPACING === */
.nav {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* === COUNTRY SELECTION MODAL === */
.countries-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 por línea en mobile */
  gap: 0.5rem;
  max-height: 50vh;
  overflow-y: auto;
  padding-right: var(--space-xs);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .countries-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 por línea en desktop */
  }
}

@media (min-width: 1024px) {
  .countries-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 por línea en pantallas grandes */
  }
}


/* === MODAL VARIATIONS === */

/* Deposit modals - wider on desktop */
.modal-overlay.deposit-modal .modal-content {
  max-width: 480px;
}

/* === MODAL RESPONSIVE IMPROVEMENTS === */

/* Mobile keyboard handling - when virtual keyboard appears */
@media (max-width: 768px) {
  .modal {
    align-items: flex-start;
    padding-top: 20px;
  }
  
  .modal-content {
    width: 95%;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    top: 0;
    transform: none;
  }
  
  .modal-body {
    padding: var(--space-md);
  }
  
  .modal-header {
    padding: var(--space-md) var(--space-lg);
  }
  
  /* When input is focused (keyboard visible) */
  .modal.keyboard-visible {
    align-items: flex-start;
    padding-top: 10px;
  }
  
  .modal.keyboard-visible .modal-content {
    position: absolute;
    top: 10px;
    max-height: 60vh;
  }
}

/* Small mobile screens */  
@media (max-width: 480px) {
  .modal-content {
    width: 96%;
    max-width: 380px;
  }
  
  .modal-body {
    padding: var(--space-md);
  }
  
  .modal-header {
    padding: var(--space-md);
  }
  
  /* Compact form elements on mobile */
  .modal-body input,
  .modal-body button {
    font-size: 16px; /* Prevent zoom on iOS */
    padding: var(--space-sm);
  }
  
  /* Stack buttons vertically on small screens */
  .modal-body .btn-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .modal-body .btn-group button {
    width: 100%;
  }
}

/* Extra small screens - 320px */
@media (max-width: 320px) {
  .modal-content {
    width: 98%;
    max-width: 300px;
  }
  
  .modal-body {
    padding: var(--space-sm) var(--space-md);
  }
  
  .modal-header {
    padding: var(--space-sm) var(--space-md);
  }
  
  .modal-title {
    font-size: var(--text-base);
  }
}

/* === DEPOSIT MODAL SPECIFIC STYLES === */

/* Countries grid - ya definido arriba con responsive grid */

/* Country items */
.country-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.country-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-color: var(--primary);
}

/* Exchange rates container - borde general sutil */
.rates-exchange-container {
  border: 1px solid rgba(200, 200, 200, 0.2);
  border-radius: var(--radius-md);
  padding: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

/* Línea de subrayado más visible en proveedores */
#rates-list div[style*="border-bottom: 1px solid var(--primary)"] {
  border-bottom: 2px solid var(--primary) !important;
}

[data-theme="dark"] .country-item:hover {
  box-shadow: 0 4px 12px rgba(0,139,139,0.3);
}

/* Bank details grid */
.bank-details-grid {
  display: grid;
  gap: var(--space-sm);
  font-size: var(--text-sm);
}

.bank-details-grid div {
  line-height: 1.4;
}

/* Mobile adjustments for deposit-specific content */
@media (max-width: 480px) {
  .countries-grid .country-item {
    gap: var(--space-xs);
    padding: var(--space-sm);
  }
  
  .countries-grid {
    max-height: 40vh;
  }
  
  .bank-details-grid {
    font-size: var(--text-xs);
    gap: var(--space-xs);
  }
}

/* === DASHBOARD COMPONENTS === */
.dashboard-card {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.dashboard-card:hover {
  background: var(--dashboard-card-hover-bg);
  box-shadow: var(--shadow-md);
}


.action-card {
  position: relative;
  background: var(--action-card-bg);
  border: 1px solid var(--action-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-base);
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 55px;
}

.action-card:hover {
  background: var(--action-card-hover-bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
}

/* Grid base genérico (no afecta al dashboard, que usa dashboard.css) */
.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xs);
  margin: var(--space-lg) 0;
}

/* Fluid tiles grid with min/max cap (admin-like expansion)
   Usage: add class `tiles-fluid` to the grid container.
   Optional: override --tile-min / --tile-max per container. */
/* Admin-like: tiles que llenan fila suavemente (1fr) */
.tiles-fluid {
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--tile-min, 150px), 1fr)
  );
  gap: clamp(var(--space-sm), 1.5vw, var(--space-md));
}

/* Capped: tiles con ancho máximo definido, centrados */
.tiles-capped {
  grid-template-columns: repeat(
    auto-fit,
    minmax(var(--tile-min, 150px), var(--tile-max, 220px))
  );
  gap: clamp(var(--space-sm), 1.5vw, var(--space-md));
  justify-content: center;
}

/* User dashboard tile height scaling (mobile-first) */
.user-tiles .action-card {
  min-height: clamp(96px, 14vw, 120px);
}

/* Grid del Plus Modal: 3 columnas (2 filas de 3 = 6 placeholders) */
.plus-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 1rem;
  justify-items: stretch;
  width: 100%;
}

/* Grid responsive para Plus features: 1 tile=center, 2=2cols, 3+=3cols */
.plus-features-grid {
  display: flex !important;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

/* Debug tile específico - ancho compacto */
.debug-tile {
  width: 100px !important;
  min-width: 100px;
  max-width: 100px;
  position: relative;
}

/* Tooltip personalizado para debug tile */
.debug-tile::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 10000;
}

.debug-tile:hover::after {
  opacity: 1;
}

[data-theme="dark"] .debug-tile::after {
  background: rgba(255, 255, 255, 0.95);
  color: #1a1a1a;
}

.balance-amount {
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 900;
  color: var(--text-primary);
  margin: var(--space-sm) 0;
}

.balance-label, .balance-currency {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.user-greeting-container {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.user-greeting {
  color: var(--text-secondary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.greeting-text {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.user-name {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-primary);
}

.action-icon {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-sm);
}

.action-title {
  font-size: var(--text-xs);
  font-weight: 600;
}

/* === SVG ICONS LIBRARY === */
.svg-icon {
  width: 24px;
  height: 24px;
  fill: var(--primary);
  transition: fill var(--transition-base);
  flex-shrink: 0;
}

.svg-icon-lg {
  width: 32px;
  height: 32px;
}

.svg-icon-xl {
  width: 48px;
  height: 48px;
}

/* Dark theme SVG adjustments */
[data-theme="dark"] .svg-icon {
  fill: var(--primary-light);
}

/* SVG Icon variants */
.svg-icon-white { fill: white !important; }
.svg-icon-success { fill: var(--success); }
.svg-icon-warning { fill: var(--warning); }
.svg-icon-danger { fill: var(--danger); }
.svg-icon-secondary { fill: var(--text-secondary); }

/* Container for SVG icons in action cards */
.action-icon-svg {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-sm);
}

/* Teal icons for action cards in light theme */
[data-theme="light"] .action-card .action-icon-svg svg {
  fill: #008B8B;
}

/* Teal icons for action cards in dark theme */
[data-theme="dark"] .action-card .action-icon-svg svg {
  fill: #20B2AA; /* LightSeaGreen - más visible en dark */
}

/* Plus Modal header icon: SVG Plus con colores teal */
[data-theme="light"] .plus-header-icon svg {
  fill: #008B8B !important; /* teal oscuro */
}

[data-theme="dark"] .plus-header-icon svg {
  fill: #20B2AA !important; /* LightSeaGreen - verde teal */
}

/* Plus Modal placeholders: usar color exacto según tema para stroke/currentColor */
[data-theme="light"] .plus-placeholder .action-icon-svg {
  color: #008B8B !important; /* teal oscuro */
}

[data-theme="dark"] .plus-placeholder .action-icon-svg {
  color: #20B2AA !important; /* LightSeaGreen - verde teal como los demás iconos */
}

/* Asegurar que los SVG dentro usen el color heredado */
[data-theme="light"] .plus-placeholder .action-icon-svg svg {
  stroke: #008B8B;
}

[data-theme="dark"] .plus-placeholder .action-icon-svg svg {
  stroke: #20B2AA; /* Verde teal como los otros iconos del dashboard */
}

/* Debug tile en Plus Modal: colores teal para SVGs (escoba/refresh) */
[data-theme="light"] .plus-grid .action-card .action-icon-svg svg,
[data-theme="light"] .plus-features-grid .action-card .action-icon-svg svg {
  stroke: #008B8B !important;
  fill: #008B8B !important;
}

[data-theme="dark"] .plus-grid .action-card .action-icon-svg svg,
[data-theme="dark"] .plus-features-grid .action-card .action-icon-svg svg {
  stroke: #20B2AA !important; /* Verde teal como los otros iconos */
  fill: #20B2AA !important;
}

/* Tamaño de placeholder en Plus Modal para igualar a dashboard */
.plus-placeholder.action-card {
  min-height: 110px;
  width: 100%;
  max-width: var(--tile-max, 220px);
}

.plus-placeholder .action-icon-svg svg {
  width: 48px;
  height: 48px;
}

/* Action card titles remain black in light theme */
[data-theme="light"] .action-card .action-title {
  color: black;
}

/* Coming soon action cards */
.action-card.coming-soon {
  position: relative;
  opacity: 0.6;
  cursor: not-allowed;
}

.action-card.coming-soon:hover {
  transform: none;
  box-shadow: none;
  opacity: 0.6;
}

.coming-soon-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--badge-bg-overlay); /* Transparencia inteligente sobre teal */
  backdrop-filter: blur(4px); /* Efecto glassmorphism */
  border: 1px solid var(--primary); /* Borde teal para identidad */
  color: var(--primary); /* Texto teal matching logo */
  font-size: 8px;
  font-weight: bold;
  padding: 2px 6px;
  border-radius: 10px;
  line-height: 1;
  box-shadow: 0 2px 4px rgba(0,139,139,0.2); /* Sombra teal sutil */
}

/* Coming soon icons with teal color and reduced opacity */
[data-theme="light"] .action-card.coming-soon .action-icon-svg svg {
  fill: #008B8B;
  opacity: 0.6;
}

/* Coming soon titles remain black but with reduced opacity */
[data-theme="light"] .action-card.coming-soon .action-title {
  color: black;
  opacity: 0.7;
}

/* Account verified card styling - IDENTIDAD VISUAL OPTIMIZADA */
.account-verified-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
  border: 1px solid var(--success);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

[data-theme="dark"] .account-verified-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
  border-color: rgba(16, 185, 129, 0.6);
}

/* Verified card en hero section necesita fondo blanco opaco para contraste */
.hero .account-verified-card {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(12px);
}

.verified-icon {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.verified-icon svg {
  fill: var(--success);
  width: 1.5rem;
  height: 1.5rem;
}

[data-theme="dark"] .verified-icon {
  background: rgba(16, 185, 129, 0.3);
}

/* Verified icon en hero section con estilo diferente */
.hero .verified-icon {
  background: rgba(255, 255, 255, 0.25);
}

.hero .verified-icon svg {
  fill: white;
}

.verified-title {
  color: var(--success);
  margin: 0 0 0.25rem 0;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.2;
}

/* Verified title en hero section necesita más contraste */
.hero .verified-title {
  color: #22c55e;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.verified-text {
  color: var(--text-primary);
  margin: 0;
  font-size: 0.8rem;
  opacity: 0.8;
  line-height: 1.3;
}

/* Verified text en hero section necesita blanco para buen contraste */
.hero .verified-text {
  color: white;
  opacity: 0.95;
}

/* Enhanced container styles for buttons */
.container-with-buttons {
  background: var(--dashboard-card-bg);
  border: 1px solid var(--dashboard-card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all var(--transition-base);
}

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

.container-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.container-button {
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  color: var(--primary);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.container-button:hover {
  background: var(--secondary-button-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--primary-dark);
}

/* ========================================
   ADMIN RATES SECTION - PROVIDER CARDS ENHANCED
   ======================================== */

.providers-grid-enhanced {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.provider-card-enhanced {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
  min-height: 65px;
  position: relative;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.provider-card-enhanced:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.provider-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.provider-name {
  font-size: 13px;
  margin: 0;
  line-height: 1.2;
}

.provider-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-start;
}

.provider-toggle input[type="checkbox"] {
  margin: 0;
}

.provider-toggle span {
  font-weight: 600;
  letter-spacing: 0.5px;
}

@media (max-width: 768px) {
  .providers-grid-enhanced {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .provider-card-enhanced {
    min-height: 55px;
    padding: 8px;
  }

  .provider-name {
    font-size: 12px;
  }

  .provider-toggle span {
    font-size: 10px;
  }
}

.container-button .svg-icon {
  width: 16px;
  height: 16px;
}

/* Container button styling in dark theme */
[data-theme="dark"] .container-button {
  opacity: 0.6;
  color: #D1D5DB;  /* Light gray instead of pure white */
}

[data-theme="dark"] .container-button .svg-icon {
  fill: #D1D5DB;   /* Light gray for icons too */
}

[data-theme="dark"] .container-button:hover {
  opacity: 0.8;
  color: #F3F4F6;  /* Slightly lighter on hover */
}

/* Container button text in light theme */
[data-theme="light"] .container-button {
  color: black;
}

/* ====== ADMIN MODAL TABS - HORIZONTAL LAYOUT ====== */

/* Tab containers - horizontal flex layout */
.users-status-tabs,
.balances-status-tabs,
.credits-status-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    padding: 0 var(--space-sm);
}

/* Individual tab buttons */
.tab-icon-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
    text-decoration: none;
    text-align: center;
    position: relative;
}

.tab-icon-button:hover {
    background: var(--hover-bg);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tab-icon-button.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.tab-icon-button .svg-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    fill: currentColor;
    transition: all 0.2s ease;
}

/* Tab button responsive design */
@media (max-width: 768px) {
    .users-status-tabs,
    .balances-status-tabs,
    .credits-status-tabs {
        gap: 4px;
        padding: 0 var(--space-xs);
    }
    
    .tab-icon-button {
        padding: 8px 12px;
        min-width: 60px;
        font-size: 0.8rem;
    }
    
    .tab-icon-button .svg-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .users-status-tabs,
    .balances-status-tabs,
    .credits-status-tabs {
        gap: 2px;
        padding: 0;
    }
    
    .tab-icon-button {
        padding: 6px 6px;
        min-width: 45px;
        font-size: 0.65rem;
        flex: 1;
        max-width: calc(20% - 2px);
    }
    
    .tab-icon-button .svg-icon {
        width: 16px;
        height: 16px;
        margin-bottom: 2px;
    }
}

@media (max-width: 320px) {
    .users-status-tabs,
    .balances-status-tabs,
    .credits-status-tabs {
        gap: 1px;
        padding: 0;
    }
    
    .tab-icon-button {
        padding: 4px 4px;
        min-width: 40px;
        font-size: 0.6rem;
        flex: 1;
        max-width: calc(20% - 1px);
    }
    
    .tab-icon-button .svg-icon {
        width: 14px;
        height: 14px;
        margin-bottom: 1px;
    }
}

/* === KYC FILTER TABS SYSTEM === */
.kyc-filter-section {
    margin-bottom: var(--space-md);
}

.filter-section-title {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
    font-weight: 600;
    text-align: center;
}

.kyc-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 2px;
    margin-bottom: var(--space-sm);
    flex-wrap: nowrap;
    padding: 0 var(--space-xs);
    overflow-x: auto;
}

.kyc-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 6px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 35px; /* Mucho más compacto */
    max-width: 35px; /* Forzar ancho compacto */
    text-decoration: none;
    text-align: center;
    flex: 0 0 auto;
    overflow: hidden;
}

.kyc-tab.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    min-width: 80px; /* Más compacto - justo para "Todos" */
    max-width: 80px;
}

.kyc-tab:hover:not(.active) {
    border-color: var(--primary);
    /* Solo cambio de borde, no background ni transform */
}

/* Removed duplicate - defined above */

.kyc-tab .tab-icon {
    font-size: 14px;
    margin-bottom: 2px;
}

.kyc-tab .tab-label {
    font-size: 0.6rem;
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.kyc-tab .tab-label.compact {
    font-size: 0.55rem;
}

.kyc-tab .tab-label.expanded {
    font-size: 0.6rem;
}

.kyc-tab.active .tab-label {
    color: white;
}

/* Mobile responsive KYC tabs */
@media (max-width: 768px) {
    .kyc-filter-tabs {
        gap: 1px;
        padding: 0;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .kyc-tab {
        padding: 3px 4px;
        min-width: 30px;
        max-width: 30px;
        flex: 0 0 auto;
    }
    
    .kyc-tab.active {
        min-width: 75px;  /* Más compacto para mobile */
        max-width: 75px;
    }
    
    .kyc-tab .tab-icon {
        font-size: 12px;
        margin-bottom: 1px;
    }
    
    .kyc-tab .tab-label.compact {
        font-size: 0.5rem;
    }
    
    .kyc-tab .tab-label.expanded {
        font-size: 0.55rem;
    }
}

@media (max-width: 480px) {
    .kyc-filter-tabs {
        gap: 1px;
        overflow-x: auto;
        flex-wrap: nowrap;
    }
    
    .kyc-tab {
        padding: 2px 3px;
        min-width: 28px;
        max-width: 28px;
        flex: 0 0 auto;
    }
    
    .kyc-tab.active {
        min-width: 70px;  /* Aún más compacto para pantallas pequeñas */
        max-width: 70px;
    }
    
    .kyc-tab .tab-icon {
        font-size: 11px;
        margin-bottom: 1px;
    }
    
    .kyc-tab .tab-label.compact {
        font-size: 0.45rem;
    }
    
    .kyc-tab .tab-label.expanded {
        font-size: 0.5rem;
    }
}

[data-theme="light"] .container-button .svg-icon {
  fill: black;
}

/* Balance Compact Buttons - 3-button layout in balance card */
.balance-compact-btn {
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 80px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  justify-content: center;
}

.balance-compact-btn:hover {
  background: var(--secondary-button-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--primary-dark);
}

.balance-compact-btn .svg-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.balance-compact-btn span {
  font-size: var(--text-sm);
  line-height: 1.2;
}

/* Dark theme balance compact buttons */
[data-theme="dark"] .balance-compact-btn {
  opacity: 0.6;
  color: white;
}

[data-theme="dark"] .balance-compact-btn .svg-icon {
  fill: white;
}

[data-theme="dark"] .balance-compact-btn:hover {
  opacity: 0.8;
}

/* Light theme balance compact buttons */
[data-theme="light"] .balance-compact-btn {
  color: black;
}

[data-theme="light"] .balance-compact-btn .svg-icon {
  fill: black;
}

/* === WALLET ACTION BUTTONS === */
/* Perfect size buttons for wallet balance section */
.wallet-action-btn {
  background: var(--secondary-button-bg);
  border: 1px solid var(--secondary-button-border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);  /* Smaller padding than container-button */
  color: var(--primary);
  font-size: var(--text-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  min-width: 70px;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--transition-fast);
  flex: 1;
  justify-content: center;
}

.wallet-action-btn:hover {
  background: var(--secondary-button-hover-bg);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
  color: var(--primary-dark);
}

.wallet-action-btn .svg-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Dark theme wallet action buttons */
[data-theme="dark"] .wallet-action-btn {
  opacity: 0.6;
  color: #D1D5DB;  /* Light gray instead of pure white */
}

[data-theme="dark"] .wallet-action-btn .svg-icon {
  fill: #D1D5DB;   /* Light gray for icons too */
}

[data-theme="dark"] .wallet-action-btn:hover {
  opacity: 0.8;
  color: #F3F4F6;  /* Slightly lighter on hover */
}

/* Light theme wallet action buttons */
[data-theme="light"] .wallet-action-btn {
  color: black;
}

[data-theme="light"] .wallet-action-btn .svg-icon {
  fill: #008B8B;
}

/* Wallet buttons container */
.wallet-buttons-container {
  display: flex;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 1rem;
}

/* === MOBILE HEADER BUTTONS === */
/* In mobile, show only icons to save space */
@media (max-width: 768px) {
  .install-btn, .logout-btn, .debug-btn, .superadmin-btn {
    width: 36px;
    height: 36px;
    padding: var(--space-xs);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
  }
  
  .install-btn .install-text,
  .logout-btn .logout-text,
  .superadmin-btn .admin-text {
    display: none;
  }
  
  .install-btn .install-icon,
  .logout-btn .logout-icon,
  .superadmin-btn .admin-icon,
  .debug-btn .svg-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    margin: 0 auto;
  }
}

/* Desktop - show full text and icons */
@media (min-width: 769px) {
  .install-btn .install-text,
  .logout-btn .logout-text,
  .superadmin-btn .admin-text {
    display: inline;
    margin-left: var(--space-xs);
  }
  
  .install-btn .install-icon,
  .logout-btn .logout-icon,
  .superadmin-btn .admin-icon,
  .debug-btn .svg-icon {
    width: 16px;
    height: 16px;
  }
}


/* Balance text colors by theme */
[data-theme="light"] .balance-text,
[data-theme="light"] .balance-amount-text {
  color: white;
}

[data-theme="dark"] .balance-text,
[data-theme="dark"] .balance-amount-text {
  color: #B0B0B0;
}

/* === HISTORY MODAL STYLES === */

/* Filter buttons for period selection */
.filter-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  min-width: auto;
}

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

.filter-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Filter chips for type selection */
.filter-chip {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  white-space: nowrap;
}

/* Responsive optimization */
@media (max-width: 480px) {
  .period-filters {
    justify-content: space-between;
  }
  
  .filter-btn {
    flex: 1;
    padding: var(--space-xs);
    font-size: 12px;
    min-width: 50px;
  }
  
  .filter-btn .period-text {
    display: none;
  }
  
  .type-filters {
    justify-content: space-around;
  }
  
  .filter-chip {
    flex: 1;
    justify-content: center;
    padding: var(--space-xs);
    min-width: 44px;
  }
  
  .filter-chip .filter-text {
    display: none;
  }
  
  .filter-chip svg {
    width: 18px !important;
    height: 18px !important;
  }
  
  .history-modal .modal-content {
    margin: var(--space-sm);
    max-width: calc(100vw - var(--space-md));
  }
}

.filter-chip:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.filter-chip.active {
  background: var(--primary-light, rgba(59, 130, 246, 0.1));
  color: var(--primary);
  border-color: var(--primary);
}

/* Transaction item styles */
.transaction-item {
  transition: all var(--transition-fast);
}

.transaction-item:hover {
  background: var(--bg-secondary) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Transaction amount colors */
.transaction-amount.success {
  color: var(--success) !important;
}

.transaction-amount.danger {
  color: var(--danger) !important;
}

.transaction-amount.warning {
  color: var(--warning) !important;
}

.transaction-amount.text-primary {
  color: var(--text-primary) !important;
}

/* History modal responsive design */
@media (max-width: 480px) {
  .history-modal .modal-content {
    width: 96%;
    max-width: 380px;
    max-height: 90vh;
  }
  
  .transaction-item {
    flex-direction: column;
    align-items: flex-start !important;
    padding: var(--space-sm) !important;
  }
  
  .transaction-item > div:first-child {
    width: 100%;
    margin-bottom: var(--space-sm);
  }
  
  .transaction-item > div:last-child {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .filter-btn, .filter-chip {
    font-size: var(--text-xs);
    padding: calc(var(--space-xs) * 0.8) var(--space-xs);
  }
}

/* === NOTIFICATION SYSTEM === */
.notification-container {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  z-index: 9999;
  pointer-events: none;
}

.notification {
  margin-bottom: var(--space-sm);
  min-width: 300px;
  max-width: 400px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15), 0 4px 10px rgba(0, 0, 0, 0.1);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.slide-in {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 768px) {
  .notification-container {
    left: 0.5rem;
    right: 0.5rem;
    top: var(--space-lg);
  }
  
  .notification {
    min-width: auto;
    max-width: none;
    width: 100%;
    margin-bottom: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .notification-container {
    left: 0.25rem;
    right: 0.25rem;
    top: 1rem;
  }
  
  .notification-content {
    padding: 0.5rem;
    gap: 0.375rem;
  }
  
  .notification-text {
    font-size: var(--text-xs);
    line-height: 1.2;
  }
}

@media (max-width: 340px) {
  .notification-container {
    left: 0.125rem;
    right: 0.125rem;
  }
}

/* Argentina Account Validation Warnings */
.account-warning {
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.account-warning.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.account-warning.warning {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.notification-toast {
  position: fixed;
  top: var(--space-lg);
  right: var(--space-lg);
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  animation: slideInRight 0.3s ease;
  min-width: 300px;
  max-width: 400px;
}

.notification-content {
  display: flex;
  align-items: center;
  padding: var(--space-md);
  gap: var(--space-sm);
}

.notification-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.notification-text {
  flex: 1;
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
}

.notification-message {
  flex: 1;
  color: #1a1a1a;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.4;
}

.notification-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition-base);
}

.notification-close:hover {
  color: var(--text-primary);
}

/* Notification types */
.notification-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border-left: 5px solid #2196f3;
  border-color: #2196f3;
}

.notification-info .notification-icon {
  fill: #2196f3;
}

.notification-warning {
  background: linear-gradient(135deg, #fff8e1 0%, #ffffff 100%);
  border-left: 5px solid #ff9800;
  border-color: #ff9800;
}

.notification-warning .notification-icon {
  fill: #ff9800;
}

.notification-error {
  background: linear-gradient(135deg, #ffebee 0%, #ffffff 100%);
  border-left: 5px solid #f44336;
  border-color: #f44336;
}

.notification-error .notification-icon {
  fill: #f44336;
}

.notification-success {
  background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%);
  border-left: 5px solid #4caf50;
  border-color: #4caf50;
}

.notification-success .notification-icon {
  fill: #4caf50;
}

/* Animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Mobile responsive notifications */
@media (max-width: 768px) {
  .notification-toast {
    left: 0.5rem;
    right: 0.5rem;
    top: var(--space-lg);
    min-width: auto;
    max-width: none;
    width: calc(100vw - 1rem);
    box-sizing: border-box;
  }
}

@media (max-width: 480px) {
  .notification-toast {
    left: 0.25rem;
    right: 0.25rem;
    top: 1rem;
    width: calc(100vw - 0.5rem);
    font-size: var(--text-xs);
  }
  
  .notification-content {
    padding: 0.5rem;
    gap: 0.375rem;
  }
  
  .notification-text {
    font-size: var(--text-xs);
    line-height: 1.2;
  }
}

@media (max-width: 340px) {
  .notification-toast {
    left: 0.125rem;
    right: 0.125rem;
    width: calc(100vw - 0.25rem);
  }
}

/* === DEBUG BUTTON SPECIAL STYLING === */
.debug-btn {
  position: relative;
  background: repeating-linear-gradient(
    45deg,
    #FFD700,
    #FFD700 4px,
    #FFA500 4px,
    #FFA500 8px
  ) !important;
  border: 2px dashed #000000 !important;
  color: #000000 !important;
  font-weight: bold !important;
  animation: debugPulse 2s infinite;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.6) !important;
  -webkit-text-stroke: 1px white;
  text-stroke: 1px white;
  text-shadow: 0 0 3px white, 0 0 6px white;
}

.debug-btn:hover {
  background: repeating-linear-gradient(
    45deg,
    #FFA500,
    #FFA500 4px,
    #FF8C00 4px,
    #FF8C00 8px
  ) !important;
  border-color: #FF0000 !important;
  box-shadow: 0 0 12px rgba(255, 165, 0, 0.8) !important;
  transform: scale(1.05) !important;
}

/* ===== OPTIMAL TRANSACTION STATE SYSTEM ===== */
/* Basado en mejores prácticas de Revolut, AstroPay y Merú */

.optimal-transaction-state {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 12px;
  margin: 8px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* Header con título y badge */
.optimal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.optimal-title h3 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 600;
}

/* Header con tracking ID completo */
.optimal-header-enhanced {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.transaction-header-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tracking-id-full {
  font-family: 'Courier New', monospace;
  font-size: 18px;
  font-weight: bold;
  color: #008B8B;
  background: rgba(0, 139, 139, 0.1);
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid rgba(0, 139, 139, 0.3);
}

/* Header correcto: TIDH grande + fecha / Estado + monto */
.optimal-header-corrected {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

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

.header-tidh-grande {
  font-size: var(--text-md); /* TIDH un poquito más chico para no colapsar */
  color: var(--text-primary);
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.header-fecha-derecha {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-style: italic;
}

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

.header-monto-signo {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #ef4444; /* Rojo para débitos */
}

.header-montos-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.header-monto-usd {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.header-monto-local {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-secondary);
}

/* Timeline con iconos SVG circulares y conectores */
.timeline-step-svg {
  display: flex;
  align-items: center;
  padding: 6px 0;
  position: relative;
}

.timeline-icon-container {
  margin-right: 12px;
  flex-shrink: 0;
}

.timeline-icon-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid;
  background: white;
}

.timeline-icon-circle.completed {
  border: 1px solid #22c55e; /* Borde verde delgado */
  background: rgba(34, 197, 94, 0.1); /* Fondo verde clarito */
  color: #22c55e !important; /* SVG color verde mismo del borde - forzado */
}

.timeline-icon-circle.completed svg {
  color: #22c55e !important;
  fill: #22c55e !important;
  width: 14px !important; /* Check más grande */
  height: 14px !important;
}

.timeline-icon-circle.current {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1); /* Fondo amarillo clarito como completed */
  color: #f59e0b !important; /* SVG color amarillo mismo del borde - forzado */
}

.timeline-icon-circle.current svg {
  color: #f59e0b !important;
  fill: #f59e0b !important;
  width: 14px !important;
  height: 14px !important;
}

.timeline-icon-circle.pending {
  border-color: #9ca3af;
  background: white;
  color: #9ca3af !important;
}

.timeline-icon-circle.pending svg {
  color: #9ca3af !important;
  fill: #9ca3af !important;
  width: 14px !important;
  height: 14px !important;
}

.timeline-icon-circle.cancelled,
.timeline-icon-circle.failed {
  border-color: #ef4444;
  background: white;
  color: #ef4444 !important;
}

.timeline-icon-circle.cancelled svg,
.timeline-icon-circle.failed svg {
  color: #ef4444 !important;
  fill: #ef4444 !important;
  width: 14px !important;
  height: 14px !important;
}

.timeline-text-descripcion {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-left: 4px;
}

.timeline-fecha-real {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-left: auto;
}

.timeline-connector-flecha {
  position: absolute;
  left: 11px; /* Centrado con el ícono */
  bottom: -6px;
  color: var(--text-muted);
  font-size: 12px;
  z-index: 1;
}

.currency-conversion {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  margin-top: 4px;
}

.amount-ars-main {
  color: #1f2937;
  font-size: 18px;
}

.conversion-arrow-main {
  color: #10b981;
  font-size: 16px;
  font-weight: 700;
}

.amount-usd-main {
  color: #10b981;
  font-size: 18px;
}

/* Header info mejorado */
.transaction-main-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.tracking-id-full {
  background: linear-gradient(135deg, #008B8B, #20B2AA);
  color: white;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
  display: inline-block;
}

.main-amount-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-top: 4px;
}

.amount-ars {
  color: #1f2937;
  font-size: 16px;
}

.conversion-arrow {
  color: #10b981;
  font-size: 14px;
  font-weight: 700;
}

.amount-usd {
  color: #10b981;
  font-size: 16px;
}

.amount-primary {
  color: #1f2937;
  font-size: 16px;
}

/* Status Badge - Merú Style */
.status-badge {
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.status-badge.status-completed { 
  background: #10b981; 
  color: white; 
}

.status-badge.status-pending { 
  background: #3b82f6; 
  color: white; 
}

.status-badge.status-processing { 
  background: #f59e0b; 
  color: white; 
}

.status-badge.status-failed { 
  background: #ef4444; 
  color: white; 
}

.status-badge.status-cancelled { 
  background: #6b7280; 
  color: white; 
}

.status-badge.status-expired { 
  background: #f97316; 
  color: white; 
}

.status-icon {
  width: 16px;
  height: 16px;
}

/* Secciones principales */
.optimal-section-title {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px 0;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--card-border);
}

/* Timeline Vertical - Revolut Style */
.optimal-timeline {
  margin: 12px 0;
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 12px;
  position: relative;
}

.timeline-step:last-child {
  margin-bottom: 0;
}

.timeline-icon-container {
  position: relative;
  margin-right: 16px;
}

.timeline-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  border: 2px solid transparent;
}

.timeline-icon.completed { 
  background: #10b981; 
  color: white; 
  border-color: #10b981;
}

.timeline-icon.current { 
  background: #3b82f6; 
  color: white;
  border-color: #3b82f6;
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
}

.timeline-icon.pending { 
  background: #f3f4f6; 
  color: #9ca3af; 
  border-color: #e5e7eb;
}

.timeline-connector {
  position: absolute;
  left: 50%;
  top: 40px;
  bottom: -24px;
  width: 2px;
  transform: translateX(-50%);
}

.timeline-connector.completed { 
  background: #10b981; 
}

.timeline-connector.current { 
  background: linear-gradient(to bottom, #3b82f6 0%, #e5e7eb 50%); 
}

.timeline-connector.pending { 
  background: #e5e7eb; 
}

.timeline-step-icon {
  width: 20px;
  height: 20px;
}

.timeline-content {
  flex: 1;
  padding-top: 8px;
}

.timeline-label {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 500;
  margin: 0 0 4px 0;
}

.timeline-timestamp {
  color: var(--text-secondary);
  font-size: 14px;
  font-style: italic;
}

/* Financial Breakdown - Merú Style */
.optimal-breakdown {
  margin: 20px 0;
}

.financial-breakdown {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid var(--card-border);
}

.breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--card-border);
}

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

.breakdown-row.breakdown-total {
  font-weight: 600;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 2px solid var(--card-border);
  border-bottom: none;
}

.breakdown-label { 
  color: var(--text-secondary);
  font-size: 14px;
}

.breakdown-value { 
  color: var(--text-primary); 
  font-weight: 500;
  font-size: 14px;
}

.breakdown-total .breakdown-value { 
  color: #059669; 
  font-size: 16px;
  font-weight: 600;
}

/* Información adicional */
.optimal-info {
  margin: 8px 0 0 0; /* Reducir distancia superior */
}

.optimal-section-title {
  margin-bottom: 6px !important; /* Reducir espacio entre título e información */
}

.transaction-info {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px; /* Más compacto */
  border: 1px solid var(--card-border);
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--card-border);
}

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

.info-label {
  color: var(--text-secondary);
  font-size: 14px;
}

.info-value {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 14px;
}

/* Filas compactas para información - una línea por campo */
.info-row-compact {
  display: block; /* Una línea por campo completo */
  padding: 1px 0; /* Muy compacto */
  border-bottom: none; /* Sin separadores */
}

.info-label-compact {
  color: var(--text-secondary);
  font-size: 12px;
  display: inline; /* En la misma línea */
}

/* Formato: Label: Valor en una sola línea */
.info-line-format {
  font-size: 12px;
  color: var(--text-primary);
  line-height: 1.3;
  margin: 1px 0;
}

.info-line-format .label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-line-format .value {
  color: var(--text-primary);
  font-weight: 400;
}

/* Fila con nombre + UIDH */
/* Para formato inline nombre + UIDH */
.info-inline-name-uidh {
  display: inline;
}

.info-inline-name {
  color: var(--text-primary);
  font-weight: 400;
}

.info-inline-uidh {
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  font-size: 10px;
  background: var(--card-bg);
  padding: 1px 2px;
  border-radius: 2px;
  border: 1px solid var(--border);
  margin-left: 4px;
}

/* Botones contextuales - Layout específico */
.optimal-actions-layout {
  margin: 20px 0 0 0;
}

.extend-time-section {
  margin-bottom: 16px;
  text-align: center;
}

.extend-time-btn {
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
  position: relative;
  margin-bottom: 8px;
}

.extend-time-btn::before {
  content: '✚';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 18px;
  font-weight: bold;
  color: white;
  opacity: 0.7;
  z-index: 0;
}

.extend-time-btn span,
.extend-time-btn svg {
  position: relative;
  z-index: 1;
}

.extend-time-btn:hover {
  background: #059669;
  transform: translateY(-1px);
}

.primary-actions-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: stretch;
}

/* Botones en línea compactos */
.primary-actions-section-inline {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.contextual-btn-inline {
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 60px; /* Mínimo para botón solo ícono */
  justify-content: center;
}

.contextual-btn-inline.btn-success {
  background: #22c55e;
  color: white;
}

.contextual-btn-inline.btn-success:hover {
  background: #16a34a;
}

.contextual-btn-inline.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.contextual-btn-inline.btn-secondary:hover {
  background: var(--bg-hover);
}

/* Botones contextuales - Layout legacy */
.optimal-actions {
  margin: 24px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.contextual-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  border: 2px solid;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.contextual-btn .btn-icon {
  width: 16px;
  height: 16px;
}

/* DUPLICATED BUTTONS REMOVED - Using original definitions */

/* MASSIVE BUTTON DUPLICATION BLOCK REMOVED - ~70 lines eliminated */

/* ===== PWA UPDATE NOTIFICATION STYLES ===== */
.update-notification-modal .modal-content {
  max-width: 480px;
  margin: auto;
}

.update-notification-content {
  text-align: center;
  padding: 20px;
}

.update-icon-container {
  margin: 0 auto 20px auto;
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.update-main-icon {
  width: 40px;
  height: 40px;
  color: white;
  animation: gentleRotate 3s linear infinite;
}

@keyframes gentleRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-message h3 {
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.update-message p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
}

.version-comparison {
  margin: 24px 0;
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 12px;
  border: 1px solid var(--card-border);
}

.version-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
}

.version-label {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

.version-value {
  font-family: 'Courier New', monospace;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 14px;
}

.version-value.current {
  background: transparent;
  color: #92400e;
  font-weight: bold;
}

.version-value.new {
  background: transparent;
  color: #065f46;
  font-weight: 700;
}

.version-arrow {
  text-align: center;
  margin: 12px 0;
}

.version-arrow-icon {
  width: 24px;
  height: 24px;
  color: #10b981;
}

.update-description {
  margin: 20px 0;
}

.update-desc-text {
  color: var(--text-primary);
  font-size: 15px;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.update-date {
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

.update-actions {
  display: flex;
  gap: 8px;
  margin: 16px 0 12px 0;
  justify-content: center;
}

.update-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
}

.btn-update-green {
  background: transparent;
  color: #22c55e;
  border: 2px solid #22c55e;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-update-green:hover {
  background: #22c55e;
  color: white;
}
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid;
  min-width: 140px;
  justify-content: center;
}

.update-footer {
  padding-top: 16px;
  border-top: 1px solid var(--card-border);
}

.update-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  margin: 0;
}

/* Update Progress Styles */
.update-progress {
  text-align: center;
  padding: 40px 20px;
}

.update-spinner {
  margin: 0 auto 24px auto;
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinning-icon {
  width: 40px;
  height: 40px;
  color: #10b981;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.update-progress h3 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.update-progress p {
  color: var(--text-secondary);
  margin: 0 0 24px 0;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--card-border);
  border-radius: 4px;
  overflow: hidden;
  margin: 20px 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  width: 0%;
  animation: progressFill 3s ease-in-out infinite;
}

@keyframes progressFill {
  0% { width: 0%; }
  50% { width: 85%; }
  100% { width: 100%; }
}

.progress-text {
  color: var(--text-secondary);
  font-size: 13px;
  font-style: italic;
  margin: 0;
}

/* Update Success Styles */
.update-success {
  text-align: center;
  padding: 40px 20px;
}

.success-icon {
  margin: 0 auto 24px auto;
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid #10b981;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-check-icon {
  width: 40px;
  height: 40px;
  color: #10b981;
  animation: checkPop 0.5s ease-out;
}

@keyframes checkPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.update-success h3 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.countdown-display {
  margin: 20px 0;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: 8px;
  font-weight: 600;
  color: var(--text-primary);
}

#countdownNum {
  color: #10b981;
  font-size: 18px;
}

/* Update Error Styles */
.update-error {
  text-align: center;
  padding: 40px 20px;
  background: rgba(254, 226, 226, 0.3) !important;
  border: 1px solid rgba(239, 68, 68, 0.2) !important;
  border-radius: var(--radius-lg);
  margin: var(--space-sm);
}

.error-icon {
  margin: 0 auto 24px auto;
  width: 80px;
  height: 80px;
  background: white;
  border: 3px solid #ef4444;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.error-x-icon {
  width: 40px;
  height: 40px;
  color: #ef4444;
}

.update-error h3 {
  color: var(--text-primary);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px 0;
}

.error-actions {
  display: flex;
  gap: 12px;
  margin: 24px 0;
  justify-content: center;
}

/* Animaciones */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .optimal-transaction-state {
    margin: 10px 0;
    padding: 16px;
  }
  
  .optimal-header {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }
  
  .tracking-id-prominent {
    align-self: flex-start;
  }
  
  .timeline-step {
    margin-bottom: 20px;
  }
  
  .timeline-icon {
    width: 36px;
    height: 36px;
  }
  
  .timeline-step-icon {
    width: 18px;
    height: 18px;
  }
  
  .contextual-btn {
    min-width: 120px;
    padding: 10px 16px;
    font-size: 13px;
  }
  
  .breakdown-row,
  .info-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .breakdown-value,
  .info-value {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .optimal-actions {
    flex-direction: column;
  }
  
  .contextual-btn {
    min-width: 100%;
  }
}

@keyframes debugPulse {
  0% {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.9);
  }
  100% {
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
  }
}

/* ===================================================================
   ADMIN CONFIGURATION SYSTEM STYLES - v0.0.0.8
   ================================================================== */

.admin-tab {
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  font-size: var(--text-sm);
  font-weight: 500;
}

.admin-tab:hover {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--primary);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.admin-list-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  transition: all 0.2s ease;
}

.admin-list-item:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Force history-transaction-item style when combined with admin classes */
.history-transaction-item.balance-item-overview,
.history-transaction-item.currency-item-detailed,
.history-transaction-item.reserve-critical-item,
.history-transaction-item.reserve-excess-item,
.history-transaction-item.history-item-detailed {
  background: var(--card-bg) !important;
  border: 1px solid var(--card-border) !important;
  border-radius: var(--radius-sm) !important;
  padding: var(--space-sm) !important;
  margin-bottom: var(--space-xs) !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  position: relative !important;
}

.history-transaction-item.balance-item-overview:not(:last-child):after,
.history-transaction-item.currency-item-detailed:not(:last-child):after,
.history-transaction-item.reserve-critical-item:not(:last-child):after,
.history-transaction-item.reserve-excess-item:not(:last-child):after,
.history-transaction-item.history-item-detailed:not(:last-child):after {
  content: '' !important;
  position: absolute !important;
  bottom: -6px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: 60% !important;
  height: 1px !important;
  background: var(--border) !important;
  opacity: 0.6 !important;
}

.history-transaction-item.balance-item-overview:hover,
.history-transaction-item.currency-item-detailed:hover,
.history-transaction-item.reserve-critical-item:hover,
.history-transaction-item.reserve-excess-item:hover,
.history-transaction-item.history-item-detailed:hover {
  border-color: var(--primary) !important;
  box-shadow: none !important; /* Remove admin box-shadow */
  /* No cambiar background al hover para evitar activarse al scroll */
}

.admin-status-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
}

.admin-status-badge.active {
  background: var(--success-light, #dcfce7);
  color: var(--success);
  border: 1px solid var(--success);
}

.admin-status-badge.inactive {
  background: var(--warning-light, #fef3c7);
  color: var(--warning);
  border: 1px solid var(--warning);
}

.admin-status-badge.danger {
  background: var(--danger-light, #fee2e2);
  color: var(--danger);
  border: 1px solid var(--danger);
}

/* Country Tags (Chips) */
.country-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--success-light, #dcfce7);
  color: var(--success);
  border: 1px solid rgba(39, 174, 96, 0.2);
  border-radius: 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
}

/* Dark theme country tags */
[data-theme="dark"] .country-tag {
  background: rgba(39, 174, 96, 0.15);
  color: #4ade80;
  border: 1px solid rgba(74, 222, 128, 0.3);
}

.admin-form-group {
  margin-bottom: var(--space-md);
}

.admin-form-group label {
  display: block;
  margin-bottom: var(--space-xs);
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.admin-form-group input,
.admin-form-group select,
.admin-form-group textarea {
  width: 100%;
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.admin-form-group input:focus,
.admin-form-group select:focus,
.admin-form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.admin-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .admin-form-row {
    grid-template-columns: 1fr;
  }
  
  .admin-tabs {
    flex-direction: column;
  }
  
  .admin-tab {
    justify-content: center;
  }
}

/* ===================================================================
   CONFIGURATION BUTTON STYLES - v0.0.0.8
   ================================================================== */

.action-card.config-admin {
  background: linear-gradient(135deg, #D4AF37 0%, #FFD700 50%, #F4C430 100%);
  border: 1px solid rgba(255, 215, 0, 0.3);
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.action-card.config-admin:hover {
  background: linear-gradient(135deg, #B8860B 0%, #DAA520 50%, #D4AF37 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
}

.action-card.config-admin .action-icon-svg svg {
  color: #8B4513;
  filter: drop-shadow(0 1px 2px rgba(139, 69, 19, 0.3));
}

.action-card.config-admin .action-title {
  color: #8B4513;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.action-card.config-user {
  background: linear-gradient(135deg, #C0C0C0 0%, #E5E5E5 50%, #D3D3D3 100%);
  border: 1px solid rgba(192, 192, 192, 0.3);
  box-shadow: 0 4px 12px rgba(169, 169, 169, 0.2);
}

.action-card.config-user:hover {
  background: linear-gradient(135deg, #A9A9A9 0%, #DCDCDC 50%, #C0C0C0 100%);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(169, 169, 169, 0.3);
}

.action-card.config-user .action-icon-svg svg {
  color: #4A4A4A;
  filter: drop-shadow(0 1px 2px rgba(74, 74, 74, 0.3));
}

.action-card.config-user .action-title {
  color: #4A4A4A;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

/* ===================================================================
   NOTIFICATION ITEMS - Admin Dashboard v0.0.0.8
   ================================================================== */

/* Notification items inside containers */
.notification-item {
    background: var(--dashboard-card-bg);
    border: 1px solid var(--dashboard-card-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-md);
    transition: all var(--transition-base);
}

.notification-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ===================================================================
   RESPONSIVE MODAL LAYOUTS - Desktop Horizontal Layout
   ================================================================== */

/* Desktop horizontal layout for larger screens */
@media (min-width: 768px) {
  .admin-countries-modal .modal-content,
  .admin-accounts-modal .modal-content,
  .admin-approvals-modal .modal-content {
    max-width: 90vw;
    width: 90vw;
    max-height: 85vh;
  }
  
  .admin-countries-modal .modal-body,
  .admin-accounts-modal .modal-body,
  .admin-approvals-modal .modal-body {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
    padding: var(--space-lg) var(--space-xl);
  }
  
  .admin-countries-modal .countries-list,
  .admin-accounts-modal .accounts-list,
  .admin-approvals-modal .approvals-list {
    flex: 2;
    max-height: 70vh;
    overflow-y: auto;
  }
  
  .admin-countries-modal .countries-detail,
  .admin-accounts-modal .accounts-detail,
  .admin-approvals-modal .approvals-detail {
    flex: 1;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    position: sticky;
    top: 0;
  }
}

/* DUPLICATED ADMIN STATUS BADGES REMOVED - Using original definitions */

/* Country tags for admin lists */
.country-tag {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 500;
  border: 1px solid var(--border);
}

/* Status badges for user modals - using admin layout pattern */
.status-badge {
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  line-height: 1;
}

.status-active {
  background: rgba(34, 197, 94, 0.1);
  color: #16a34a;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-inactive {
  background: rgba(156, 163, 175, 0.1);
  color: #6b7280;
  border: 1px solid rgba(156, 163, 175, 0.2);
}

/* Improved country item layout for user modals */
.countries-grid .country-item {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  gap: var(--space-xs);
  /* FIXED: Centro el contenido verticalmente */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative; /* Para el badge contador absoluto */
}

.countries-grid .country-item:hover {
  background: var(--hover-bg);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Action alert indicator */
.action-alert {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 12px;
  height: 12px;
  background: linear-gradient(45deg, #f59e0b, #ef4444);
  border: 1px solid white;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  animation: alertPulse 2s infinite;
  z-index: 10;
}

@keyframes alertPulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 1;
  }
  50% { 
    transform: scale(1.2);
    opacity: 0.8;
  }
}

/* Animación para búsqueda exitosa */
@keyframes successGlow {
  0% {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    transform: scaleX(0);
    transform-origin: left;
  }
  50% {
    transform: scaleX(1);
  }
  100% {
    background: linear-gradient(90deg, #16a34a, #15803d);
    transform: scaleX(1);
  }
}

/* User search result styles */
.user-search-result:hover {
  background: var(--hover-bg) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.user-search-result[style*="cursor: not-allowed"]:hover {
  transform: none !important;
  box-shadow: none !important;
  background: var(--card-bg) !important;
}

/* Hover effect for search result button */
.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.4) !important;
}

/* ===================================================================
   ADMIN METRICS CARDS - v0.0.0.9
   ================================================================== */

.admin-metric-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  color: white;
  min-height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.admin-metric-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.metric-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.metric-value {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.metric-label {
  font-size: var(--text-sm);
  font-weight: 600;
  margin-bottom: var(--space-xs);
  opacity: 0.9;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.metric-change {
  font-size: var(--text-xs);
  opacity: 0.8;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===================================================================
   RESPONSIVE ADJUSTMENTS FOR ADMIN METRICS
   ================================================================== */

@media (max-width: 768px) {
  .admin-metric-card {
    min-height: 120px;
    padding: var(--space-md);
  }
  
  .metric-icon {
    font-size: 2rem;
  }
  
  .metric-value {
    font-size: 1.5rem;
  }
  
  .metric-label {
    font-size: var(--text-xs);
  }
  
  .metric-change {
    font-size: 10px;
  }
}

@media (max-width: 480px) {
  .admin-metric-card {
    min-height: 100px;
    padding: var(--space-sm);
  }
  
  .metric-icon {
    font-size: 1.5rem;
    margin-bottom: calc(var(--space-sm) * 0.5);
  }
  
  .metric-value {
    font-size: 1.25rem;
  }
  
  .metric-label {
    font-size: 10px;
    margin-bottom: calc(var(--space-xs) * 0.5);
  }
  
  .metric-change {
    font-size: 9px;
  }
}

/* ===================================================================
   ADMIN COUNTRIES MANAGEMENT - v0.0.0.12 (Compact Design)
   ================================================================== */

.countries-admin-container {
  padding: var(--space-sm);
}

.admin-description-compact {
  margin: 0 0 var(--space-sm) 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
}

.admin-actions-top {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.btn-compact {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 60px;
}

.btn-compact.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-compact.btn-secondary {
  background: var(--card-bg);
  color: var(--text-secondary);
}

.btn-compact:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.countries-grid-compact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs);
  margin: 0 -var(--space-xs);
  max-height: 300px;
  overflow-y: auto;
  padding: var(--space-sm);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Compact country items - Style similar to WithdrawModal */
.country-item-compact {
  margin: var(--space-xs);
  flex: 0 0 auto;
  transition: all 0.3s ease;
  transform: translateZ(0); /* Force hardware acceleration */
}

.country-checkbox-compact {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.4rem 0.4rem 0.4rem;
  border: 1px solid rgba(200,200,200,0.3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.03) 100%);
  min-width: 80px;
  width: fit-content;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  position: relative;
}

.country-checkbox-compact:hover {
  border-color: rgba(200,200,200,0.5);
  transform: translateY(-2px);
}

.country-checkbox-compact input[type="checkbox"] {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.checkbox-custom {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  background: var(--card-bg);
  border: 1.5px solid var(--border);
  border-radius: 2px;
  transition: all 0.2s ease;
  pointer-events: none;
}

.country-checkbox-compact input[type="checkbox"]:checked + .checkbox-custom {
  background: var(--success);
  border-color: var(--success);
}

.checkbox-custom:after {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 4px;
  height: 7px;
  border: solid white;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  display: none;
}

.country-checkbox-compact input[type="checkbox"]:checked + .checkbox-custom:after {
  display: block;
}

.country-name-compact {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  margin-top: var(--space-xs);
  line-height: 1.2;
  max-width: 70px;
  word-wrap: break-word;
}

.country-checkbox-compact input[type="checkbox"]:checked ~ .country-name-compact {
  color: var(--success);
  font-weight: 600;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .countries-grid-compact {
    max-height: 250px;
  }
  
  .admin-actions-top {
    flex-wrap: wrap;
    gap: var(--space-xs);
  }
  
  .btn-compact {
    min-width: 50px;
    padding: var(--space-xs) var(--space-sm);
  }
}

@media (max-width: 480px) {
  .countries-admin-container {
    padding: calc(var(--space-sm) * 0.5);
  }
  
  .country-checkbox-compact {
    min-width: 70px;
    padding: 0.4rem 0.3rem 0.3rem 0.3rem;
  }
  
  .country-name-compact {
    font-size: 10px;
    max-width: 60px;
  }
  
  .countries-grid-compact {
    max-height: 200px;
    gap: calc(var(--space-xs) * 0.5);
  }
}

/* ===================================================================
   COUNTRIES TABS SYSTEM - v0.0.0.12
   ================================================================== */

.countries-tabs {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
  border-bottom: 1px solid var(--card-border);
  background: var(--bg-secondary);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  overflow: hidden;
}

.countries-tab {
  flex: 1;
  padding: var(--space-md);
  border: none;
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 2px solid transparent;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
}

.countries-tab:hover {
  background: var(--primary-light, rgba(0, 139, 139, 0.1));
  color: var(--text-primary);
}

.countries-tab.active {
  background: var(--primary);
  color: white;
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.countries-tab:not(:last-child) {
  border-right: 1px solid var(--card-border);
}

.countries-tab .svg-icon-lg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.countries-tabs-subtitle {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin: var(--space-sm) 0 var(--space-md) 0;
  font-weight: 500;
  line-height: 1.4;
  background: var(--bg-secondary);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.countries-tab-content {
  background: var(--card-bg);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  padding-top: var(--space-sm);
}

/* Operation labels for future enhancement */
.operation-labels {
  display: flex;
  gap: 2px;
  margin-top: 2px;
  justify-content: center;
  flex-wrap: wrap;
}

.operation-label {
  font-size: 8px;
  padding: 1px 3px;
  border-radius: 2px;
  background: var(--success);
  color: white;
  line-height: 1;
}

/* Responsive tabs */
@media (max-width: 768px) {
  .countries-tab {
    padding: var(--space-sm);
    min-height: 48px;
  }
  
  .countries-tab .svg-icon-lg {
    width: 20px;
    height: 20px;
  }
  
  .countries-tabs-subtitle {
    font-size: var(--text-xs);
    margin: var(--space-xs) 0 var(--space-sm) 0;
  }
}

@media (max-width: 480px) {
  .countries-tabs {
    /* Keep single row - no flex-wrap */
    overflow-x: auto;
  }
  
  .countries-tab {
    flex: 1;
    min-width: 60px;
    padding: var(--space-xs);
    min-height: 44px;
  }
  
  .countries-tab .svg-icon-lg {
    width: 18px;
    height: 18px;
  }
}

/* ===================================================================
   USERS MANAGEMENT SYSTEM REDESIGNED - v0.0.0.12++
   Patrón iconográfico siguiendo Countries Management exitoso
   ================================================================== */

/* Users management container */
.users-management-container {
  padding: var(--space-md);
}

/* Overview search section */
.overview-search-section {
  margin-bottom: var(--space-lg);
  margin-top: var(--space-lg);
}

.users-search-input {
  width: 100%;
  padding: var(--space-md);
  border: 2px dashed #9ca3af;
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: 500;
  transition: all 0.3s ease;
}

.users-search-input.focused,
.users-search-input:focus {
  outline: none;
  border: 2px solid var(--primary);
  border-style: solid;
  box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.users-search-input::placeholder {
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Overview stats badges */
.overview-stats-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.stat-badge {
  background: var(--card-bg);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  min-height: 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.stat-number {
  font-size: var(--text-2xl);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Stat badge colors */
.stat-badge.stat-active {
  border-color: #22c55e;
}
.stat-badge.stat-active:hover {
  border-color: #22c55e;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.2);
}
.stat-badge.stat-active .stat-number {
  color: #22c55e;
}

.stat-badge.stat-paused {
  border-color: #f59e0b;
}
.stat-badge.stat-paused:hover {
  border-color: #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.2);
}
.stat-badge.stat-paused .stat-number {
  color: #f59e0b;
}

.stat-badge.stat-suspended {
  border-color: #ef4444;
}
.stat-badge.stat-suspended:hover {
  border-color: #ef4444;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.2);
}
.stat-badge.stat-suspended .stat-number {
  color: #ef4444;
}

.stat-badge.stat-total {
  border-color: #3b82f6;
}
.stat-badge.stat-total:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.2);
}
.stat-badge.stat-total .stat-number {
  color: #3b82f6;
}

.stat-badge.stat-pending-review {
  border-color: #f97316;
}
.stat-badge.stat-pending-review:hover {
  border-color: #f97316;
  box-shadow: 0 4px 20px rgba(249, 115, 22, 0.2);
}
.stat-badge.stat-pending-review .stat-number {
  color: #f97316;
}

/* Mini stats row for non-overview tabs */
.mini-stats-row {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
  justify-content: center;
}

.mini-stat-badge {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-xs) var(--space-sm);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mini-stat-badge:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 139, 139, 0.15);
}

.mini-stat-badge.active {
  border-color: var(--primary);
  background: var(--primary-light, rgba(0, 139, 139, 0.1));
  box-shadow: 0 2px 8px rgba(0, 139, 139, 0.2);
}

.mini-number {
  font-size: var(--text-sm);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 2px;
  color: var(--text-primary);
}

.mini-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
}

.mini-stat-badge.active .mini-number,
.mini-stat-badge.active .mini-label {
  color: var(--primary);
}

/* Colores específicos para mini badges coordinados con tabs */
.mini-badge-active.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.2);
}

.mini-badge-paused.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.2);
}

.mini-badge-suspended.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.2);
}

.mini-badge-total.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.mini-badge-pending-review.active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.2);
}

/* Colores específicos para texto en mini badges activos */
.mini-badge-active.active .mini-number,
.mini-badge-active.active .mini-label {
  color: #22c55e;
}

.mini-badge-paused.active .mini-number,
.mini-badge-paused.active .mini-label {
  color: #f59e0b;
}

.mini-badge-suspended.active .mini-number,
.mini-badge-suspended.active .mini-label {
  color: #ef4444;
}

.mini-badge-total.active .mini-number,
.mini-badge-total.active .mini-label {
  color: #3b82f6;
}

.mini-badge-pending-review.active .mini-number,
.mini-badge-pending-review.active .mini-label {
  color: #f97316;
}

/* Overview empty state for search prompt */
.overview-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: var(--space-xl);
  text-align: center;
}

.search-prompt-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.4;
}

.search-prompt-message {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.search-prompt-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  opacity: 0.8;
}

/* Modal más ancho para usuarios */
.users-modal-wide .modal-content {
  max-width: 95vw;
  width: 95vw;
}

@media (max-width: 768px) {
  .users-modal-wide .modal-content {
    max-width: 98vw;
    width: 98vw;
    margin: var(--space-sm);
  }
}

/* Tab-based Status Filter con iconos SVG (patrón countries) */
.users-status-tabs {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tab-icon-button {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 2px solid var(--card-border);
  background: var(--card-bg);
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  
  --svg-color: var(--text-secondary);
}

.tab-icon-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
  --svg-color: var(--primary);
}

/* Colores específicos para cada tab activa coordinados con mini badges */
.tab-overview.active {
  border-color: var(--primary);
  background: var(--primary-light, rgba(0, 139, 139, 0.1));
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
  --svg-color: var(--primary);
}

.tab-active.active {
  border-color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
  --svg-color: #22c55e;
}

.tab-paused.active {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  --svg-color: #f59e0b;
}

.tab-suspended.active {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  --svg-color: #ef4444;
}

.tab-total.active {
  border-color: #3b82f6;
  background: rgba(59, 130, 246, 0.1);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
  --svg-color: #3b82f6;
}

.tab-pending-review.active {
  border-color: #f97316;
  background: rgba(249, 115, 22, 0.1);
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
  --svg-color: #f97316;
}

.tab-icon-button .svg-icon {
  width: 24px;
  height: 24px;
  fill: var(--svg-color);
  transition: fill 0.2s ease;
}

/* Status subtitle dinámico */
.current-status-subtitle {
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
  background: var(--bg-secondary);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
}

/* KYC Level Filter compacto */
.kyc-filter-compact {
  margin-bottom: var(--space-md);
}

.form-select-compact {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.form-select-compact:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

/* Users list container optimized for mobile */
.users-list-compact {
  min-height: 350px;
  max-height: 450px;
  overflow-y: auto;
  padding: 3px;
  background: transparent;
  transition: opacity 0.2s ease;
  display: flex;
  flex-direction: column;
}

/* Individual user card container (patrón cuentas bancarias) - ANCHO COMPLETO */
.user-card-container {
  background: var(--card-bg);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.user-card-container:hover {
  border-color: rgba(0, 139, 139, 0.2);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.user-card-container:last-child {
  margin-bottom: 0;
}

/* Línea 1: Flag + Nombre + Estado */
.user-line-1 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
}

.no-country-icon {
  font-size: 16px;
  opacity: 0.6;
}

.user-fullname {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-md);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Línea 2: Email + UIDN */
.user-line-2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
  justify-content: space-between;
}

.user-email-short {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.user-uidn-badge {
  font-size: var(--text-xs);
  color: #6b7280;
  background: white;
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
  font-weight: 600;
  border: 1px solid #d1d5db;
  flex-shrink: 0;
}

.user-kyc-badge {
  font-size: var(--text-xs);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
}

.user-kyc-badge.kyc-0 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }
.user-kyc-badge.kyc-1 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }
.user-kyc-badge.kyc-2 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }
.user-kyc-badge.kyc-3 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }
.user-kyc-badge.kyc-4 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }
.user-kyc-badge.kyc-5 { background: #dbeafe; color: #2563eb; border-color: #2563eb; }

/* Empty state container */
.empty-state-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  padding: var(--space-xl);
  text-align: center;
  flex: 1;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state-message {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Status text badges */
.user-status-text {
  font-size: var(--text-xs);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid;
  white-space: nowrap;
}

.user-status-text.status-active { 
  background: #dcfce7; 
  color: #16a34a;
  border-color: #16a34a; 
}
.user-status-text.status-inactive,
.user-status-text.status-paused { 
  background: #fef3c7; 
  color: #d97706;
  border-color: #d97706; 
}
.user-status-text.status-suspended { 
  background: #fee2e2; 
  color: #dc2626;
  border-color: #dc2626; 
}
.user-status-text.status-blocked { 
  background: #f1f5f9; 
  color: #64748b;
  border-color: #64748b; 
}

/* Línea 3: UserTag + KYC */
.user-line-3 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 4px;
  justify-content: space-between;
}

.user-display-tag {
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: monospace;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.user-display-tag.has-tag {
  color: #059669;
  background: #ecfdf5;
  border-color: #059669;
}

.user-display-tag.no-tag {
  color: #374151;
  background: #f9fafb;
  border-color: #d1d5db;
}

.tag-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.tag-alert {
  color: #dc2626;
  font-size: 12px;
  flex-shrink: 0;
}

/* Línea 4: Comentarios + Botones acción */
.user-line-4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.user-comments {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-style: italic;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Quick action buttons ultra-compact */
.user-quick-actions {
  display: flex;
  gap: 4px;
}

.quick-action-btn {
  width: 24px;
  height: 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.quick-action-btn .svg-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.quick-action-btn:hover {
  transform: scale(1.2);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.quick-action-btn.action-pause {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #d97706;
}

.quick-action-btn.action-pause:hover {
  background: #fbbf24;
  color: white;
}

.quick-action-btn.action-suspend {
  background: #fee2e2;
  color: #dc2626;
  border: 1px solid #dc2626;
}

.quick-action-btn.action-suspend:hover {
  background: #ef4444;
  color: white;
}

.quick-action-btn.action-block {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #64748b;
}

.quick-action-btn.action-block:hover {
  background: #6b7280;
  color: white;
}

.quick-action-btn.action-activate {
  background: #d1fae5;
  color: #059669;
  border: 1px solid #059669;
}

.quick-action-btn.action-activate:hover {
  background: #10b981;
  color: white;
}

/* Responsive design optimizado para mobile */
@media (max-width: 768px) {
  .users-management-container {
    padding: var(--space-sm);
  }
  
  .tab-icon-button {
    width: 42px;
    height: 42px;
  }
  
  .tab-icon-button .svg-icon {
    width: 20px;
    height: 20px;
  }
  
  .user-card-container {
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
  }
  
  .user-fullname {
    font-size: var(--text-sm);
  }
  
  .user-email-short {
    font-size: var(--text-xs);
  }
  
  .quick-action-btn {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
  
  .quick-action-btn .svg-icon {
    width: 12px;
    height: 12px;
  }

  /* Overview responsive */
  .users-search-input {
    padding: var(--space-sm);
    font-size: var(--text-sm);
  }
  
  .overview-stats-badges {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .stat-badge {
    min-height: 60px;
    padding: var(--space-sm);
  }
  
  .stat-number {
    font-size: var(--text-xl);
  }
  
  .stat-label {
    font-size: var(--text-xs);
  }
}

@media (max-width: 480px) {
  .users-status-tabs {
    gap: var(--space-xs);
  }
  
  .tab-icon-button {
    width: 36px;
    height: 36px;
  }
  
  .tab-icon-button .svg-icon {
    width: 18px;
    height: 18px;
  }
  
  .current-status-subtitle {
    font-size: var(--text-xs);
  }
}

/* Ultra compact tabs for 320px screens */
@media (max-width: 360px) {
  .users-status-tabs {
    gap: 2px;
    padding: 3px;
    flex-wrap: nowrap;
  }
  
  .tab-icon-button {
    width: 28px;
    height: 28px;
    border-width: 1px;
    min-width: 28px;
    flex-shrink: 0;
  }
  
  .tab-icon-button svg,
  .tab-icon-button .svg-icon {
    width: 14px !important;
    height: 14px !important;
  }
  
  .tab-badge-count {
    font-size: 7px !important;
    padding: 1px 2px !important;
    top: -2px !important;
    right: -2px !important;
  }
}

/* ===================================================================
   ENVIAR MODAL COMPONENTS - v0.0.0.11
   ================================================================== */

/* User search result card */
.enviar-user-result {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px dashed #27AE60;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(39, 174, 96, 0.05);
}

.enviar-user-result.selected {
    border: 2px solid #27AE60;
    background: rgba(39, 174, 96, 0.1);
}

/* User name line with checkmark */
.enviar-user-name {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Checkmark circle */
.enviar-checkmark {
    width: 20px;
    height: 20px;
    background: #27AE60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* User full name */
.enviar-user-fullname {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
    line-height: 1.2;
}

/* Status and UIDN line */
.enviar-status-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

/* Available status badge */
.enviar-status-badge {
    background: rgba(39, 174, 96, 0.15);
    color: #27AE60;
    border: 1px solid rgba(39, 174, 96, 0.3);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* UIDN display */
.enviar-uidn {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-family: monospace;
}

/* Search method line */
.enviar-search-method {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Search method text */
.enviar-search-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Success modal styling - COMPACT VERSION */
.enviar-success-compact {
    text-align: center;
    padding: var(--space-md);
}

.enviar-success-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.enviar-success-check {
    font-size: 1.5rem;
    color: var(--success);
}

.enviar-success-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success);
}

.enviar-success-amount {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid var(--success);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.enviar-success-id {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-sm);
    margin-bottom: var(--space-md);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.enviar-id-value {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-xs);
}

/* Professional Receipt Styles - COMPACT VERSION */
.receipt-professional {
    background: var(--bg-primary); /* Tema-aware en lugar de white hardcodeado */
    max-width: 95vw; /* Mobile-first: más ancho en móvil */
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-radius: 6px;
    overflow: hidden;
}

.receipt-content {
    padding: 16px; /* Mobile-first: más padding */
}

.receipt-header {
    text-align: center;
    border-bottom: 2px solid var(--text-primary); /* Tema-aware en lugar de black hardcodeado */
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.receipt-logo {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 24px; /* Mobile-first: más grande */
    font-weight: 900;
    color: #008B8B;
    margin-bottom: 8px; /* Mobile-first: más espacio */
    letter-spacing: -0.5px;
    cursor: pointer;
}

.receipt-title-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}

.receipt-title {
    font-size: 14px; /* Mobile-first: más grande */
    font-weight: bold;
    font-family: system-ui, -apple-system, sans-serif;
    color: var(--text-primary); /* Tema-aware en lugar de negro */
}

.receipt-status-badge {
    display: inline-block;
    padding: 6px 12px; /* Mobile-first: más padding */
    border-radius: 12px;
    font-size: 11px; /* Mobile-first: más grande */
    font-weight: 600;
    font-family: system-ui, -apple-system, sans-serif;
    margin-bottom: 3px;
}

/* 🎨 Theme-aware text colors for receipt status - OVERRIDE inline styles */
[data-theme="light"] .receipt-status-badge span:first-child {
    color: #000000 !important; /* "TRANSFERENCIA" negro en light */
}

[data-theme="dark"] .receipt-status-badge span:first-child {
    color: #FFFFFF !important; /* "TRANSFERENCIA" blanco en dark */
}

/* 🔔 Transaction Notification System CSS */
.enviar-notification-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding: var(--space-sm);
    background: rgba(0, 139, 139, 0.1);
    border: 1px solid rgba(0, 139, 139, 0.3);
    border-radius: var(--radius-md);
}

.notification-pulse {
    animation: notification-pulse 2s infinite ease-in-out;
}

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

.notification-text {
    font-size: var(--text-sm);
    color: var(--primary);
    font-weight: 500;
}

/* 🔄 Admin Transaction Status Management CSS */
.admin-transaction-status-container {
    padding: var(--space-md);
}

.status-panel-header {
    background: var(--bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    border: 2px solid var(--card-border);
}

.status-panel-description {
    margin-bottom: var(--space-md);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.transactions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--card-border);
}

.transactions-count {
    font-weight: 600;
    color: var(--text-primary);
}

.transactions-actions {
    display: flex;
    gap: var(--space-sm);
}

.transactions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    max-height: 600px;
    overflow-y: auto;
    padding: var(--space-xs);
}

.transaction-status-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    transition: all 0.2s ease;
}

.transaction-status-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 139, 139, 0.1);
}

.transaction-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}

.transaction-type {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--primary);
}

.status-badge {
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 700;
    text-transform: uppercase;
}

.status-badge.status-pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid #f59e0b;
}

.status-badge.status-completed {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border: 1px solid #22c55e;
}

.status-badge.status-failed {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid #ef4444;
}

.status-badge.status-processing {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.status-badge.status-cancelled {
    background: rgba(156, 163, 175, 0.1);
    color: #9ca3af;
    border: 1px solid #9ca3af;
}

.transaction-card-info {
    margin-bottom: var(--space-md);
}

.transaction-amount {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.transaction-user,
.transaction-id,
.transaction-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.transaction-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xs);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-success:hover {
    background: #16a34a;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.empty-transactions {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: var(--space-md);
}

.empty-text {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.empty-subtitle {
    font-size: var(--text-sm);
    opacity: 0.8;
}

.loading-placeholder {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .transactions-grid {
        grid-template-columns: 1fr;
    }
    
    .transaction-card-actions {
        grid-template-columns: 1fr;
    }
}

/* 🚨 UserTag Alert Badge Styling - SIMPLE CIRCULAR ORANGE */
.user-tag-alert {
    position: absolute;
    top: 6px; 
    right: 6px; 
    z-index: 10;
}

.alert-badge-circle {
    width: 12px;
    height: 12px;
    background: #FF6B35; /* Naranja */
    border: 2px solid white;
    border-radius: 50%; /* Círculo perfecto */
    animation: warning-pulse 2s infinite ease-in-out;
    box-shadow: 0 1px 3px rgba(255, 107, 53, 0.5); /* Sombra naranja */
}

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

.receipt-transaction-info {
    margin-bottom: 10px;
}

.receipt-info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    font-size: 14px; /* Mobile-first: legible en móvil */
}

.receipt-info-label {
    color: var(--text-secondary); /* Tema-aware en lugar de #333 */
    font-weight: 600; /* Mobile-first: más visible */
}

.receipt-info-value {
    color: var(--text-primary); /* Tema-aware en lugar de negro */
    font-weight: 500; /* Mobile-first: más visible */
}

.receipt-info-value.bold {
    font-weight: bold;
}

.receipt-section {
    border-top: 1px solid #ddd;
    padding-top: 6px;
    margin-bottom: 8px;
}

.receipt-section-title {
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-secondary); /* Tema-aware en lugar de #333 */
    font-size: 12px; /* Mobile-first: legible */
}

.receipt-section-name {
    color: var(--text-primary); /* Tema-aware en lugar de negro */
    font-weight: 600;
    font-size: 14px; /* Mobile-first: legible */
    margin-bottom: 4px;
}

.receipt-section-uidn {
    font-size: 12px; /* Mobile-first: legible */
    color: var(--primary); /* Mantiene teal pero tema-aware */
    font-weight: 600;
    margin-bottom: 2px;
}

.receipt-section-company {
    font-size: 11px; /* Mobile-first: legible */
    color: var(--text-muted); /* Tema-aware en lugar de #666 */
}

.receipt-footer {
    border-top: 2px solid var(--text-primary); /* Tema-aware en lugar de black */
    padding-top: 10px;
    margin-top: 12px;
    text-align: center;
    font-size: 11px; /* Mobile-first: legible */
    color: var(--text-muted); /* Tema-aware en lugar de #666 */
    font-family: system-ui, -apple-system, sans-serif;
}

.receipt-footer-company {
    font-weight: 700;
    margin-bottom: 4px;
}

.receipt-footer-website {
    margin: 4px 0;
    font-size: 12px; /* Mobile-first: legible */
}

.receipt-footer-tagline {
    margin-top: 6px;
    font-size: 10px; /* Mobile-first: legible */
    font-style: italic;
}

.receipt-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    font-family: system-ui;
}

.receipt-btn {
    border: none;
    padding: 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}

.receipt-btn-primary {
    flex: 1;
    background: var(--primary);
    color: white;
}

.receipt-btn-secondary {
    flex: 1;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.receipt-btn-close {
    flex: 0.6;
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Receipt Actions Centralized - Single Button */
.receipt-actions-center {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    font-family: system-ui;
}

.receipt-btn-center {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 24px; /* Mobile-first: más grande y fácil de tocar */
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 15px; /* Mobile-first: más grande */
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 8px; /* Mobile-first: más espacio */
}

.receipt-btn-center:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.receipt-btn-center svg {
    width: 18px; /* Mobile-first: más grande */
    height: 18px; /* Mobile-first: más grande */
    fill: var(--text-primary);
}

/* ===================================================================
   📱 RECEIPT EXTRA SMALL SCREENS - Ultra compact for narrow devices
   ================================================================== */

@media (max-width: 360px) {
    /* Reduce padding para pantallas muy angostas */
    .receipt-content {
        padding: 12px;
    }

    .receipt-verification {
        padding: 8px 10px;
    }

    /* Número más compacto en pantallas ultra angostas */
    .receipt-verification-number {
        font-size: 18px;
        letter-spacing: -1px;
    }

    .receipt-hash-highlight {
        font-size: 20px;
    }
}

/* ===================================================================
   💻 RECEIPT DESKTOP OPTIMIZATION - Compact version for large screens
   ================================================================== */

@media (min-width: 768px) {
    /* Container más pequeño en desktop */
    .receipt-professional {
        max-width: 350px;
    }

    .receipt-content {
        padding: 12px;
    }

    /* Header - Más compacto */
    .receipt-logo {
        font-size: 18px;
        margin-bottom: 6px;
    }

    .receipt-title {
        font-size: 12px;
    }

    .receipt-status-badge {
        padding: 4px 10px;
        font-size: 9px;
    }

    /* Transaction Info - Más compacto */
    .receipt-info-row {
        font-size: 11px;
        margin-bottom: 2px;
    }

    .receipt-info-label {
        font-weight: normal;
    }

    .receipt-info-value {
        font-weight: normal;
    }

    /* Sections - Más compacto */
    .receipt-section-title {
        font-size: 10px;
        font-weight: bold;
        margin-bottom: 3px;
    }

    .receipt-section-name {
        font-size: 11px;
        font-weight: 500;
        margin-bottom: 0;
    }

    .receipt-section-uidn {
        font-size: 9px;
        margin-bottom: 0;
    }

    .receipt-section-company {
        font-size: 9px;
    }

    /* Footer - Más compacto */
    .receipt-footer {
        font-size: 8px;
        padding-top: 6px;
        margin-top: 8px;
    }

    .receipt-footer-company {
        font-weight: 600;
        margin-bottom: 0;
    }

    .receipt-footer-website {
        margin: 1px 0;
        font-size: 8px;
    }

    .receipt-footer-tagline {
        margin-top: 3px;
        font-size: 8px;
    }

    /* Verification - Más compacto */
    .receipt-verification {
        padding: 6px 12px;
        margin: 8px 0;
    }

    .receipt-verification-title {
        font-size: 10px;
        margin-bottom: 1px;
        font-weight: 600;
    }

    .receipt-verification-number {
        font-size: 18px;
        letter-spacing: 1px;
        margin: 2px 0;
        overflow-wrap: normal;
    }

    .receipt-hash-highlight {
        font-size: 20px;
    }

    .receipt-verification-note {
        font-size: 9px;
        margin-top: 1px;
        line-height: 1.1;
    }

    /* Button - Más compacto */
    .receipt-btn-center {
        padding: 8px 16px;
        font-size: 12px;
        margin-top: 0;
    }

    .receipt-btn-center svg {
        width: 14px;
        height: 14px;
    }
}

/* ===================================================================
   HISTORIAL MODAL STYLES - Full screen transaction history
   ================================================================== */

/* Main history modal container */
.history-modal-fullscreen {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.history-title-section {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.history-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-primary);
}

.history-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.history-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Filters section */
.history-filters {
    padding: var(--space-sm) var(--space-sm);
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
}

.history-search {
    position: relative;
    margin-bottom: var(--space-sm);
}

.history-search-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    padding-right: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.history-search-icon {
    position: absolute;
    right: var(--space-sm);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.history-search-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.history-period-filters {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
    margin-bottom: var(--space-xs);
}

.history-filter-btn {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.history-filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.history-filter-btn svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.history-type-filters {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.history-filter-chip {
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.history-filter-chip.active {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.history-filter-chip svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Transaction list */
.history-transaction-list {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm);
}

.history-loading {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
}

.history-loading-icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
    margin-bottom: var(--space-sm);
}

/* Auto loader styles */
.history-auto-loader {
    padding: var(--space-md);
    text-align: center;
}

.history-auto-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.history-loading-icon-small {
    width: 16px;
    height: 16px;
    fill: var(--primary);
}

/* All loaded message styles */
.history-all-loaded {
    padding: var(--space-lg);
    text-align: center;
}

.history-completed {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-xs);
    color: var(--success);
    font-size: var(--text-sm);
    font-weight: 500;
}

.history-empty {
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-secondary);
}

.history-empty-icon {
    width: 48px;
    height: 48px;
    fill: currentColor;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.history-empty-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.history-empty-text {
    font-size: var(--text-sm);
}

.history-date-separator {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--text-xs);
    background: var(--bg-secondary);
    margin-bottom: var(--space-xs);
    position: sticky;
    top: 0;
    z-index: 1;
}

.history-date-separator::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(100, 116, 139, 0.6), transparent);
    opacity: 0.5;
}

.history-transaction-item {
    background: var(--card-bg);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.history-transaction-item:not(:last-child):after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: var(--border);
    opacity: 0.6;
}


/* REMOVER HOVER: causa problemas al scroll - solo cambiar al hacer clic */
.history-transaction-item:active {
    border-color: var(--primary);
}

/* Línea 1: Signo + Nombre completo */
.history-line-1 {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.history-icon {
    margin-right: var(--space-xs);
}

.history-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

/* Línea 2: Estado + Monto */
.history-line-2 {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: 4px;
}

.history-status {
    font-size: var(--text-xs);
    padding: 2px 6px;
    border-radius: var(--radius-xs);
}

.history-date {
    font-size: var(--text-xs);
    color: var(--text-muted);
    font-weight: 500;
}

.history-amount {
    font-weight: 600;
    font-size: var(--text-sm);
}

.history-amount-negative {
    color: #ef4444; /* Rojo para envíos/retiros */
}

.history-amount-positive {
    color: #22c55e; /* Verde para recepciones/depósitos */
}

/* Línea 3: Hash + Balance */
.history-line-3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.history-hash {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 2px 6px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 4px;
    background: var(--card-bg);
    margin-right: var(--space-xs);
}

.history-local-amount {
    font-size: var(--text-xs);
    color: var(--text-secondary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-align: right;
    margin-left: auto;
}

.history-local-amount-empty {
    color: var(--text-muted);
    font-style: italic;
}

/* Legacy time class - mantener para compatibilidad */
.history-time {
    font-size: var(--text-xs);
    color: var(--text-muted);
}

.history-transaction-amount {
    font-weight: 600;
    font-size: var(--text-md);
    margin-bottom: 2px;
}

.history-transaction-amount.success {
    color: var(--success);
}

.history-transaction-amount.danger {
    color: var(--danger);
}

.history-transaction-amount.warning {
    color: var(--warning);
}

.history-transaction-amount.text-primary {
    color: var(--text-primary);
}

.history-transaction-status {
    font-size: var(--text-xs);
    padding: 2px var(--space-xs);
    border-radius: var(--radius-sm);
}

.history-load-more {
    padding: var(--space-md);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Transaction detail modal */
.transaction-detail-compact {
    padding: var(--space-md);
}

.transaction-detail-info {
    margin-bottom: var(--space-md);
}

.transaction-detail-section-title {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--space-sm) 0;
}

.transaction-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
}

.transaction-detail-label {
    color: var(--text-secondary);
    font-size: var(--text-xs);
}

.transaction-detail-value {
    color: var(--text-primary);
    font-weight: 600;
    text-align: right;
    max-width: 65%;
    word-break: break-all;
    font-size: var(--text-xs);
}

.transaction-detail-actions {
    margin-bottom: var(--space-md);
}

.transaction-detail-help {
    padding: var(--space-sm);
    text-align: center;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.transaction-detail-help-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
    font-size: var(--text-sm);
}

/* Status badges */
.status-badge {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-weight: 600;
}

.status-badge-success {
    background: var(--success-light, #dcfce7);
    color: var(--success);
    border: 1px solid var(--success);
}

.status-badge-warning {
    background: var(--warning-light, #fef3c7);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.status-badge-danger {
    background: var(--danger-light, #fee2e2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.status-badge-info {
    background: var(--info-light, #dbeafe);
    color: var(--info, #3b82f6);
    border: 1px solid var(--info, #3b82f6);
}

.status-badge-error {
    background: var(--error-light, #fee2e2);
    color: var(--error, #ef4444);
    border: 1px solid var(--error, #ef4444);
}

.status-badge-neutral {
    background: var(--neutral-light, #f3f4f6);
    color: var(--text-secondary, #6b7280);
    border: 1px solid var(--border, #d1d5db);
}

/* Transaction icon colors */
.icon-success {
    color: var(--success);
    fill: var(--success);
}

.icon-warning {
    color: var(--warning);
    fill: var(--warning);
}

.icon-primary {
    color: var(--primary);
    fill: var(--primary);
}

.icon-info {
    color: var(--info, #3b82f6);
    fill: var(--info, #3b82f6);
}

.icon-secondary {
    color: var(--text-secondary);
    fill: var(--text-secondary);
}

/* ===================================================================
   ANIMATIONS - v0.0.0.9
   ================================================================== */

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* 🎨 Theme Switch - Formato original al lado de version */
.floating-theme-switch {
    position: fixed !important;
    bottom: 20px !important;
    right: 115px !important;
    z-index: 10001 !important;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.floating-theme-switch:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.floating-theme-switch:active {
    transform: scale(0.95);
}

/* Light theme switch styling */
[data-theme="light"] .floating-theme-switch {
    background: rgba(255, 255, 255, 0.8);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.2);
    --theme-light-display: inline;
    --theme-dark-display: none;
}

[data-theme="light"] .floating-theme-switch:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.3);
}

/* Dark theme switch styling */
[data-theme="dark"] .floating-theme-switch {
    --theme-light-display: none;
    --theme-dark-display: inline;
}

/* 🧹 Debug Button - Estilo consistente con transparencia */
.floating-debug-button {
    position: fixed !important;
    bottom: 20px !important;
    right: 145px !important; /* 30px to the left of theme switch (115 + 30) */
    z-index: 10000 !important; /* Below theme switch */
    width: 24px; /* Same size as theme switch */
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    background: rgba(255, 215, 0, 0.8); /* Amarillo con transparencia */
    color: #000000;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(255, 215, 0, 0.3);
    animation: debugPulseSmall 4s infinite;
}

.floating-debug-button:hover {
    background: rgba(255, 215, 0, 0.9);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
    transform: scale(1.05);
}

.floating-debug-button:active {
    transform: scale(0.9);
}

/* Light theme debug button */
[data-theme="light"] .floating-debug-button {
    background: rgba(255, 193, 7, 0.8); /* Amarillo más suave para light theme */
    border: 1px solid rgba(0, 0, 0, 0.2);
}

[data-theme="light"] .floating-debug-button:hover {
    background: rgba(255, 193, 7, 0.9);
    border-color: rgba(0, 0, 0, 0.3);
}

/* Small debug pulse animation - más sutil */
@keyframes debugPulseSmall {
    0%, 100% {
        box-shadow: 0 1px 3px rgba(255, 215, 0, 0.3);
    }
    50% {
        box-shadow: 0 2px 6px rgba(255, 215, 0, 0.6);
    }
}

/* 🎯 Receipt Verification Number - Súper Compacto */
.receipt-verification {
    background: rgba(34, 197, 94, 0.1); /* Verde sutil como TRANSFERENCIA EXITOSA */
    border: 2px solid var(--primary); /* Borde teal */
    color: var(--primary); /* Texto teal */
    border-radius: 6px;
    padding: 12px 16px; /* Mobile-first: más padding */
    margin: 12px 0; /* Mobile-first: más espaciado */
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 139, 139, 0.15);
}

.receipt-verification-title {
    font-size: 13px; /* Mobile-first: legible */
    color: var(--primary); /* Teal como el texto */
    margin-bottom: 6px; /* Mobile-first: más espacio */
    font-weight: 700; /* Mobile-first: más bold */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.receipt-verification-number {
    font-size: 20px; /* Mobile-first: más grande */
    font-weight: 700;
    color: var(--text-primary); /* Texto tema-aware en lugar de negro hardcodeado */
    letter-spacing: -0.5px; /* Mobile-first: más compacto para que quepa */
    font-family: 'Courier New', monospace;
    margin: 6px 0; /* Mobile-first: más espacio */
    overflow-wrap: break-word; /* Mobile-first: rompe por palabras, no por caracteres */
    hyphens: none; /* Evita guiones */
    text-shadow: 0 1px 3px var(--text-bg-overlay); /* Contraste inteligente */
}

/* 🎨 Dark theme: número confirmación en blanco puro para mayor contraste */
[data-theme="dark"] .receipt-verification-number {
    color: #FFFFFF !important; /* Blanco puro en dark theme */
    text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Sombra oscura para contraste */
}

/* Highlighting the hash part of tracking ID - IDENTIDAD TEAL */
.receipt-hash-highlight {
    font-weight: 900; /* Extra bold */
    font-size: 22px; /* Mobile-first: más grande */
    color: var(--primary); /* Hash en TEAL para identidad visual consistente */
    text-shadow: 0 1px 2px var(--text-bg-overlay); /* Contraste inteligente */
}

.receipt-verification-note {
    font-size: 11px; /* Mobile-first: legible */
    color: var(--primary); /* Teal como el resto */
    font-style: italic;
    line-height: 1.3; /* Mobile-first: más espaciado */
    margin-top: 6px; /* Mobile-first: más espacio */
    opacity: 0.6; /* Más sutil */
}

/* 📱 Receipt Actions Compact - Botones Pequeños */
.receipt-actions-compact {
    display: flex;
    gap: var(--space-xs);
    justify-content: center;
    margin-top: 8px;
}

.receipt-btn-compact {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 50px;
}

.receipt-btn-compact:hover {
    background: var(--card-bg);
}

.receipt-btn-compact:active {
    transform: translateY(0);
}

.receipt-btn-icon-small {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Botones PDF y JPG removidos - funcionalidad de descarga eliminada */

.receipt-btn-close {
    border-color: var(--text-secondary);
    color: var(--text-secondary);
}

.receipt-btn-close:hover {
    background: var(--card-bg);
    color: var(--text-primary);
}

/* ===================================================================
   USER DETAILS MODAL - v0.0.0.12
   ================================================================== */

/* User Details Container */
.user-details-container {
  padding: var(--space-xs);
  max-height: 65vh;
  overflow-y: auto;
}

/* CSS customizado removido - usando modal estándar */

/* User Header Section - 3 Líneas Layout Estilo Badge */
.user-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
  padding: var(--space-sm);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
}

.user-header-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 28px;
}

/* Línea 1: Email + Estado */
.user-header-line.line-1 .user-email-display {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 500;
}

.user-header-line.line-1 .user-status-badge {
  padding: 4px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  border: 1px solid;
}

/* Línea 2: UIDN + Tag */
.user-header-line.line-2 .user-uidn-display {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #6b7280;
  font-weight: 600;
  background: rgba(156, 163, 175, 0.1);
  padding: 4px var(--space-sm);
  border: 1px solid rgba(156, 163, 175, 0.3);
  border-radius: var(--radius-sm);
}

.user-header-line.line-2 .user-tag-badge {
  padding: 4px var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  border: 1px solid;
}

.user-tag-badge.has-tag {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
  border-color: rgba(34, 197, 94, 0.4);
}

.user-tag-badge.no-tag {
  background: rgba(156, 163, 175, 0.1);
  color: #9ca3af;
  border-color: rgba(156, 163, 175, 0.3);
}

/* Línea 3: Comentarios amplios */
.user-header-line.line-3 {
  justify-content: flex-start;
  margin-top: var(--space-xs);
}

.user-header-line.line-3 .user-comments-text {
  width: 100%;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-style: italic;
  padding: var(--space-sm);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  min-height: 20px;
}

/* Línea 4: UIDH con layout horizontal como UIDN */
.user-header-line.line-4 .user-uidh-display {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.user-header-line.line-4 .uidh-label {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: #6b7280;
  font-weight: 600;
  background: rgba(156, 163, 175, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(156, 163, 175, 0.2);
}

.user-header-line.line-4 .uidh-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  cursor: default;
}

/* Estados de copiado */
.copyable-field {
  cursor: pointer !important;
  border: 2px dashed var(--primary) !important;
  background: rgba(59, 130, 246, 0.1) !important;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.copyable-field:hover {
  background: rgba(59, 130, 246, 0.15) !important;
  transform: translateY(-1px);
}

.user-email-display {
  transition: all 0.2s ease;
  padding: 4px 8px;
  border-radius: var(--radius-xs);
  border: 2px dashed transparent;
}

/* UIDH corto con botón pequeño */
.uidh-value-short {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
}

.icon-btn-small {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xs);
  padding: 1px 2px;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 16px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-btn-small:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

/* UIDH expandido */
.uidh-expanded-container {
  margin-top: var(--space-xs);
  width: 100%;
}

.uidh-full-value {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 500;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  word-break: break-all;
  transition: all 0.2s ease;
}

/* Estilos duplicados eliminados - usando clases existentes del sistema */

.kyc-description {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-align: right;
  max-width: 200px;
}

/* KYC Section Styling */
.kyc-section {
  margin-bottom: var(--space-xs);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  overflow: hidden;
}

.kyc-section:hover {
  border-color: var(--primary-light);
}

.kyc-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
}

.kyc-section-header h3 {
  margin: 0;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.kyc-requirement-badge {
  padding: 2px var(--space-xs);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.kyc-requirement-badge.required {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.kyc-requirement-badge.completed {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.2);
}

.kyc-requirement-badge.pending {
  background: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.kyc-requirement-badge.admin {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Editable Fields Grid */
.editable-fields-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-xs);
  padding: var(--space-xs);
}

/* User Details Form Styling */
.user-details-form {
  margin-top: var(--space-md);
}

/* Action Buttons */
.user-details-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
}

.user-details-actions button {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-xs);
  transition: all var(--transition-base);
  cursor: pointer;
}

.user-details-actions .btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.user-details-actions .btn-secondary:hover {
  background: var(--card-bg);
  color: var(--text-primary);
  border-color: var(--primary-light);
}

.user-details-actions .btn-primary {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

.user-details-actions .btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 139, 139, 0.3);
}

.user-details-actions .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--text-secondary);
  border-color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .user-details-container {
    padding: var(--space-xs);
    max-height: 75vh;
  }
  
  .user-header {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
  }
  
  .user-kyc-level {
    align-items: flex-start;
  }
  
  .kyc-description {
    text-align: left;
    max-width: none;
    font-size: var(--text-xs);
  }
  
  .editable-fields-grid {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
    padding: var(--space-xs);
  }
  
  .kyc-section {
    margin-bottom: var(--space-xs);
  }
  
  .kyc-section-header {
    padding: var(--space-xs) var(--space-sm);
  }
  
  .kyc-section-header h3 {
    font-size: var(--text-sm);
  }
  
  .user-details-actions {
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
    padding-top: var(--space-sm);
  }
  
  .user-details-actions button {
    justify-content: center;
  }
}

/* === ADMIN LIST ITEM COMPONENTS v0.0.0.13 === */
.admin-item-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-xs, 4px);
}

.admin-item-line:last-child {
  margin-bottom: 0;
}

.admin-item-line.secondary {
  font-size: var(--text-sm, 14px);
  opacity: 0.8;
}

.admin-item-line.tertiary {
  font-size: var(--text-xs, 12px);
  opacity: 0.6;
}

.admin-item-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-base, 16px);
}

.admin-item-detail {
  font-size: var(--text-sm, 14px);
  color: var(--text-secondary);
}

.admin-item-detail.muted {
  opacity: 0.6;
  font-size: var(--text-xs, 12px);
}

.admin-item-detail.success {
  color: var(--success);
  font-weight: 500;
}

.admin-item-detail.danger {
  color: var(--danger);
  font-weight: 500;
}

.admin-item-badge {
  padding: var(--space-xs, 4px) var(--space-sm, 8px);
  border-radius: var(--radius-sm, 6px);
  font-size: var(--text-xs, 12px);
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs, 4px);
}

.admin-item-badge.success {
  background: var(--success-light, #dcfce7);
  color: var(--success, #059669);
  border: 1px solid var(--success, #059669);
}

.admin-item-badge.warning {
  background: var(--warning-light, #fef3c7);
  color: var(--warning, #d97706);
  border: 1px solid var(--warning, #d97706);
}

.admin-item-badge.danger {
  background: var(--danger-light, #fee2e2);
  color: var(--danger, #dc2626);
  border: 1px solid var(--danger, #dc2626);
}

.admin-item-badge.primary {
  background: var(--primary-light, #dbeafe);
  color: var(--primary, #3b82f6);
  border: 1px solid var(--primary, #3b82f6);
}

/* Admin List Item States */
.admin-list-item.success {
  border-left: 3px solid var(--success, #059669);
  background: var(--success-50, rgba(5, 150, 105, 0.05));
}

.admin-list-item.warning {
  border-left: 3px solid var(--warning, #d97706);
  background: var(--warning-50, rgba(217, 119, 6, 0.05));
}

.admin-list-item.danger {
  border-left: 3px solid var(--danger, #dc2626);
  background: var(--danger-50, rgba(220, 38, 38, 0.05));
}

/* Dark Theme Adjustments */
[data-theme="dark"] .admin-item-badge.success {
  background: rgba(5, 150, 105, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

[data-theme="dark"] .admin-item-badge.warning {
  background: rgba(217, 119, 6, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

[data-theme="dark"] .admin-item-badge.danger {
  background: rgba(220, 38, 38, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* === ADMIN BUTTON STYLES === */
.admin-btn {
  padding: var(--space-sm, 8px) var(--space-md, 16px);
  border: 1px solid var(--card-border, #e5e7eb);
  border-radius: var(--radius-md, 8px);
  background: var(--card-bg, #ffffff);
  color: var(--text-primary, #1f2937);
  font-size: var(--text-sm, 14px);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs, 4px);
  text-decoration: none;
  white-space: nowrap;
}

.admin-btn:hover {
  border-color: var(--primary, #3b82f6);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.admin-btn.primary {
  background: var(--primary, #3b82f6);
  color: white;
  border-color: var(--primary, #3b82f6);
}

.admin-btn.primary:hover {
  background: var(--primary-dark, #2563eb);
  border-color: var(--primary-dark, #2563eb);
}

.admin-btn.secondary {
  background: var(--card-bg, #ffffff);
  color: var(--text-secondary, #6b7280);
  border-color: var(--card-border, #e5e7eb);
}

.admin-btn.secondary:hover {
  background: var(--background-secondary, #f9fafb);
  color: var(--text-primary, #1f2937);
}

.admin-actions {
  display: flex;
  gap: var(--space-sm, 8px);
  margin-top: var(--space-md, 16px);
  padding-top: var(--space-md, 16px);
  border-top: 1px solid var(--card-border, #e5e7eb);
  flex-wrap: wrap;
}

/* Dark theme admin buttons */
[data-theme="dark"] .admin-btn {
  background: var(--card-bg-dark, #374151);
  color: var(--text-primary-dark, #f9fafb);
  border-color: var(--card-border-dark, #4b5563);
}

[data-theme="dark"] .admin-btn:hover {
  background: var(--background-secondary-dark, #4b5563);
  border-color: var(--primary, #3b82f6);
}

[data-theme="dark"] .admin-btn.secondary {
  background: var(--card-bg-dark, #374151);
  color: var(--text-secondary-dark, #9ca3af);
}

[data-theme="dark"] .admin-btn.secondary:hover {
  background: var(--background-secondary-dark, #4b5563);
  color: var(--text-primary-dark, #f9fafb);
}

/* === UPDATE MODAL IMPROVEMENTS === */

/* Título principal más prominente */
.update-title h2 {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 0;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
  text-align: center;
}

/* Flecha más compacta - solo su línea */
.version-arrow-compact {
  text-align: center;
  margin: 4px 0;
  line-height: 1;
}

.version-arrow-compact svg {
  width: 16px;
  height: 16px;
  color: var(--text-secondary);
}

/* Toggle de detalles */
.details-toggle {
  text-align: center;
  margin: 12px 0 8px 0;
  cursor: pointer;
  user-select: none;
}

.details-toggle:hover {
  opacity: 0.7;
}

.toggle-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.toggle-text svg {
  width: 14px;
  height: 14px;
}

/* Detalles colapsables */
.update-details {
  margin-top: var(--space-sm);
  padding: var(--space-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.update-details .detail-section {
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
}

.update-details .detail-section:last-child {
  margin-bottom: 0;
}

.update-details strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Mejoras al layout general */
.current-version-info,
.new-version-info {
  padding: 8px;
  border-radius: var(--radius-sm);
  margin: 8px 0;
}

.current-version-info {
  background: rgba(254, 243, 199, 0.3) !important;
  border: 1px solid rgba(146, 64, 14, 0.2) !important;
}

.new-version-info {
  background: rgba(34, 197, 94, 0.15) !important;
  border: 1px solid rgba(34, 197, 94, 0.3) !important;
}

.version-label {
  font-weight: 600;
  color: var(--text-primary);
  font-size: var(--text-sm);
  margin-bottom: var(--space-xs);
}

.version-value, .build-value {
  font-family: var(--font-mono, 'Courier New', monospace);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.4;
  background: transparent;
}

.version-value.new, .build-value.new {
  color: var(--success, #16a34a);
  font-weight: 700;
}

.build-value.current {
  color: #92400e;
  font-weight: 600;
}

/* Theme adaptations */
[data-theme="dark"] .new-version-info {
  background: var(--success-bg-dark, #064e3b) !important;
  border-color: var(--success-border-dark, #047857) !important;
}

/* Dark theme contrast for current (warning) block */
[data-theme="dark"] .current-version-info {
  background: rgba(146, 64, 14, 0.25) !important; /* amber-800 on dark */
  border-color: rgba(217, 119, 6, 0.45) !important; /* amber-600 */
}

[data-theme="dark"] .version-value.current,
[data-theme="dark"] .build-value.current {
  color: #fbbf24; /* amber-400 for better contrast on dark */
}

[data-theme="dark"] .version-value.new, 
[data-theme="dark"] .build-value.new {
  color: var(--success-dark, #34d399);
}

/* Update modal version/build styling */
.installing-version, .installing-build, .success-version, .success-build {
  font-family: 'Courier New', monospace !important;
  color: var(--success) !important;
  font-weight: bold !important;
}

.update-success-title {
  color: var(--success) !important;
}

[data-theme="dark"] .update-details {
  background: var(--bg-secondary-dark, #374151);
  border-color: var(--border-dark, #4b5563);
}

/* === VERSION & BUILD INFO CONTRAST THEME === */
/* Mejorar contraste visual en modal "Acerca de" */
.version-display-theme {
  color: var(--text-primary) !important;
  font-weight: 600;
}

.build-info-theme {
  color: var(--text-primary) !important;
  font-family: 'Courier New', monospace;
  font-weight: 500;
  word-break: break-all; /* Permite que el hash completo se muestre */
}

/* Theme-specific contrasts - Sutiles como antes */
[data-theme="light"] .version-display-theme {
  color: #000000 !important; /* Negro solo para version */
}

[data-theme="light"] .build-info-theme {
  color: #000000 !important; /* Negro solo para hash */
}

[data-theme="dark"] .version-display-theme {
  color: #10b981 !important; /* Verde solo para version */
}

[data-theme="dark"] .build-info-theme {
  color: #10b981 !important; /* Verde solo para hash */
}

/* === POSTPONE OPTIONS SYSTEM === */
/* Sistema de opciones para "Más Tarde" con tiempos personalizados */
.postpone-options-content {
  padding: var(--space-md) 0;
}

.postpone-title {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.postpone-title h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  margin: 0 0 var(--space-xs) 0;
  color: var(--text-primary);
}

.postpone-time-options {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.postpone-time-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  color: var(--text-primary);
}

.postpone-time-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--primary);
  transform: translateX(4px);
}

.postpone-time-btn:active {
  transform: translateX(2px);
}

.postpone-time-btn .svg-icon {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
}

.time-label {
  font-weight: 600;
  font-size: var(--text-base);
  color: var(--text-primary);
  flex: 1;
  text-align: left;
}

.time-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

.postpone-actions {
  text-align: center;
}

.postpone-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

/* Theme-specific styling */
[data-theme="dark"] .postpone-time-btn:hover {
  background: var(--bg-tertiary-dark, #374151);
  border-color: var(--primary-dark, #10b981);
}

[data-theme="dark"] .time-label {
  color: var(--text-primary-dark, #f3f4f6);
}

@media (max-width: 480px) {
  .postpone-time-btn {
    padding: var(--space-sm) var(--space-md);
  }
  
  .time-label {
    font-size: var(--text-sm);
  }
}

/* ===== ENVIAR MODAL - USUARIOS RECIENTES ===== */

/* Recent users container with green dashed border */
.recent-users-container {
  background: var(--bg-secondary);
  border: 2px dashed #27AE60;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.recent-user-item:hover {
  background: var(--bg-tertiary) !important;
}

.recent-user-item:last-child {
  border-bottom: none !important;
}

.recent-user-item:first-child {
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.recent-user-item:last-child {
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.recent-user-item:only-child {
  border-radius: var(--radius-md);
}

/* Responsive adjustments for recent users */
@media (max-width: 480px) {
  .recent-user-item {
    padding: var(--space-xs) var(--space-sm) !important;
  }
  
  .recent-user-item .flag {
    width: 16px !important;
    height: 12px !important;
  }
}

/* ===================================================================
   KYC SYSTEM COMPLETE - MVP CRITICAL
   Progressive levels with theme-aware design patterns
   ================================================================== */

/* KYC Modal Container */
.kyc-modal-container {
  max-width: 600px;
  margin: 0 auto;
  background: var(--modal-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* KYC Header */
.kyc-header {
  background: linear-gradient(135deg, var(--primary), rgba(0, 139, 139, 0.8));
  color: white;
  padding: var(--space-lg);
  text-align: center;
}

.kyc-title {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.kyc-subtitle {
  font-size: var(--text-sm);
  opacity: 0.9;
  font-weight: 500;
}

/* KYC Progress Bar */
.kyc-progress-container {
  padding: var(--space-lg) var(--space-lg) 0;
}

.kyc-progress-bar {
  background: var(--bg-secondary);
  height: 8px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

.kyc-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 0.5s ease;
  border-radius: var(--radius-full);
}

.kyc-progress-text {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-weight: 600;
}

/* KYC Levels Container */
.kyc-levels-container {
  padding: var(--space-lg);
  max-height: 60vh;
  overflow-y: auto;
}

/* Individual KYC Level */
.kyc-level {
  border: 2px solid var(--card-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  background: var(--card-bg);
  transition: all 0.3s ease;
}

.kyc-level:last-child {
  margin-bottom: 0;
}

/* Level states */
.kyc-level.completed {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.kyc-level.current {
  border-color: var(--primary);
  background: rgba(0, 139, 139, 0.05);
  box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.kyc-level.locked {
  border-color: var(--card-border);
  background: var(--bg-secondary);
  opacity: 0.7;
}

.kyc-level.pending {
  border-color: var(--warning);
  background: rgba(245, 158, 11, 0.05);
}

/* Level Header */
.kyc-level-header {
  padding: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  border-bottom: 1px solid var(--card-border);
}

.kyc-level.locked .kyc-level-header {
  cursor: not-allowed;
}

.kyc-level-info {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.kyc-level-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: var(--text-sm);
}

.kyc-level.completed .kyc-level-icon {
  background: var(--success);
  color: white;
}

.kyc-level.current .kyc-level-icon {
  background: var(--primary);
  color: white;
}

.kyc-level.locked .kyc-level-icon {
  background: var(--text-disabled);
  color: var(--bg-primary);
}

.kyc-level.pending .kyc-level-icon {
  background: var(--warning);
  color: white;
}

.kyc-level-text h4 {
  margin: 0;
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--text-primary);
}

.kyc-level-text p {
  margin: 2px 0 0 0;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Level Status Badge */
.kyc-level-status {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kyc-level-status.completed {
  background: var(--success);
  color: white;
}

.kyc-level-status.current {
  background: var(--primary);
  color: white;
}

.kyc-level-status.locked {
  background: var(--text-disabled);
  color: var(--bg-primary);
}

.kyc-level-status.pending {
  background: var(--warning);
  color: white;
}

/* Level Content */
.kyc-level-content {
  padding: var(--space-md);
  display: none;
}

.kyc-level.expanded .kyc-level-content {
  display: block;
}

/* KYC Form */
.kyc-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.kyc-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.kyc-form-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.kyc-form-input {
  padding: var(--space-md);
  border: 2px solid var(--input-border);
  border-radius: var(--radius-md);
  background: var(--input-bg);
  color: var(--text-primary);
  font-size: var(--text-md);
  transition: all 0.3s ease;
}

.kyc-form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 139, 139, 0.1);
}

.kyc-form-input:read-only {
  background: var(--bg-secondary);
  cursor: not-allowed;
  opacity: 0.7;
}

/* File Upload */
.kyc-file-upload {
  border: 2px dashed var(--card-border);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--card-bg);
}

.kyc-file-upload:hover {
  border-color: var(--primary);
  background: rgba(0, 139, 139, 0.05);
}

.kyc-file-upload.has-file {
  border-color: var(--success);
  background: rgba(16, 185, 129, 0.05);
}

.kyc-file-upload-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.kyc-file-upload-filename {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--primary);
}

/* Read-only Display */
.kyc-readonly-data {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

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

.kyc-readonly-label {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kyc-readonly-value {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}

/* KYC Actions */
.kyc-actions {
  padding: var(--space-lg);
  border-top: 1px solid var(--card-border);
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
}

.kyc-btn {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.kyc-btn-primary {
  background: var(--primary);
  color: white;
}

.kyc-btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.kyc-btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--card-border);
}

.kyc-btn-secondary:hover {
  border-color: var(--primary);
  background: rgba(0, 139, 139, 0.05);
}

.kyc-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Loading State */
.kyc-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  color: var(--text-secondary);
}

.kyc-loading-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--card-border);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  animation: kyc-spin 1s linear infinite;
  margin-right: var(--space-md);
}

@keyframes kyc-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .kyc-modal-container {
    margin: var(--space-md);
    max-width: none;
  }
  
  .kyc-header {
    padding: var(--space-md);
  }
  
  .kyc-levels-container {
    padding: var(--space-md);
    max-height: 50vh;
  }
  
  .kyc-level-header {
    padding: var(--space-md);
  }
  
  .kyc-level-content {
    padding: var(--space-md);
  }
  
  .kyc-actions {
    padding: var(--space-md);
    flex-direction: column;
  }
  
  .kyc-btn {
    width: 100%;
    justify-content: center;
  }
  
  .kyc-readonly-data {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 480px) {
  .kyc-level-info {
    gap: var(--space-sm);
  }
  
  .kyc-level-icon {
    width: 28px;
    height: 28px;
    font-size: var(--text-xs);
  }
  
  .kyc-form-input {
    padding: var(--space-sm);
  }
  
  .kyc-file-upload {
    padding: var(--space-md);
  }
}

/* ===================================
   TOGGLE SWITCH (Generic)
   ================================ */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

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

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--text-tertiary);
  transition: .3s;
  border-radius: 28px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
  background-color: var(--teal);
}

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

.toggle-switch input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--teal);
}

/* ===== RADIO BUTTON INLINE (Compact Settings) ===== */
.radio-button-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid rgba(148, 163, 184, 0.6);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--card-bg);
  font-size: 0.875rem;
  user-select: none;
  flex: 1 1 auto;
  min-width: 90px;
  text-align: center;
}

.radio-button-inline span {
  white-space: nowrap;
}

.radio-button-inline:hover {
  border-color: var(--teal);
  background: var(--bg-secondary);
}

.radio-button-inline input[type="radio"] {
  display: none;
}

.radio-button-inline input[type="radio"]:checked + span {
  color: var(--teal);
  font-weight: 600;
}

.radio-button-inline input[type="radio"]:checked {
  + span::before {
    opacity: 1;
  }
}

.radio-button-inline input[type="radio"]:checked ~ * {
  border-color: inherit;
}

.radio-button-inline:has(input[type="radio"]:checked) {
  border-color: rgba(14, 165, 233, 0.6);
  background: rgba(14, 165, 233, 0.1);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
  color: var(--text-primary);
}

[data-theme="light"] .radio-button-inline:has(input[type="radio"]:checked) {
  border-color: rgba(15, 23, 42, 0.75);
  background: rgba(15, 23, 42, 0.08);
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .radio-button-inline:has(input[type="radio"]:checked) {
  border-color: rgba(226, 232, 240, 0.9);
  background: rgba(226, 232, 240, 0.12);
  color: #e2e8f0;
  box-shadow: 0 0 0 2px rgba(226, 232, 240, 0.15);
}

.radio-button-inline[data-theme-option="system"]:has(input[type="radio"]:checked) {
  border-color: rgba(148, 163, 184, 0.9);
  background: rgba(148, 163, 184, 0.18);
  box-shadow: 0 0 0 2px rgba(148, 163, 184, 0.25);
}

.theme-choice-group {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  width: 100%;
}

@media (max-width: 380px) {
  .theme-choice-group {
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  }
}

.settings-modal-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.settings-note {
  font-size: 0.8rem;
  color: var(--teal);
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  line-height: 1.35;
}

.settings-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.settings-block--divider {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.settings-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.settings-block-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.settings-status {
  font-size: 0.78rem;
  border-radius: 10px;
  padding: 0.6rem 0.75rem;
  border-left: 3px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  line-height: 1.4;
}

.settings-status--success {
  border-color: var(--success);
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.settings-status--warning {
  border-color: var(--warning);
  background: rgba(239, 68, 68, 0.08);
  color: var(--warning);
}

.settings-status--info {
  border-color: var(--info);
  background: rgba(59, 130, 246, 0.08);
  color: var(--info);
}

.settings-status--muted {
  border-color: var(--border-color);
  background: rgba(148, 163, 184, 0.08);
  color: var(--text-tertiary);
}

.admin-last-access {
  margin: 0;
  opacity: 0.85;
  color: var(--text-secondary);
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.admin-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  font-weight: 600;
  border: 2px solid;
}

/* SuperAdmin - Orange (Máxima autoridad) */
.admin-role-badge.admin-role-superadmin,
.admin-role-badge.admin-role-super_admin {
  background: #f97316;
  border-color: #f97316;
  color: white;
}

[data-theme="dark"] .admin-role-badge.admin-role-superadmin,
[data-theme="dark"] .admin-role-badge.admin-role-super_admin {
  background: #fb923c;
  border-color: #fb923c;
  color: #431407;
}

/* Compliance - Purple (Legal/Regulatorio) */
.admin-role-badge.admin-role-compliance {
  background: #9333ea;
  border-color: #9333ea;
  color: white;
}

[data-theme="dark"] .admin-role-badge.admin-role-compliance {
  background: #a855f7;
  border-color: #a855f7;
  color: #3b0764;
}

/* Accountant - Indigo (Finanzas) */
.admin-role-badge.admin-role-accountant {
  background: #4f46e5;
  border-color: #4f46e5;
  color: white;
}

[data-theme="dark"] .admin-role-badge.admin-role-accountant {
  background: #6366f1;
  border-color: #6366f1;
  color: #1e1b4b;
}

/* Banking - Green (Transacciones) */
.admin-role-badge.admin-role-banking {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

[data-theme="dark"] .admin-role-badge.admin-role-banking {
  background: #34d399;
  border-color: #34d399;
  color: #064e3b;
}

/* Support - Pink (Ayuda/Asistencia) */
.admin-role-badge.admin-role-support {
  background: #ec4899;
  border-color: #ec4899;
  color: white;
}

[data-theme="dark"] .admin-role-badge.admin-role-support {
  background: #f472b6;
  border-color: #f472b6;
  color: #831843;
}

/* Operator - Yellow (Operaciones) */
.admin-role-badge.admin-role-operator {
  background: #eab308;
  border-color: #eab308;
  color: #422006;
}

[data-theme="dark"] .admin-role-badge.admin-role-operator {
  background: #facc15;
  border-color: #facc15;
  color: #422006;
}

.toggle-switch input:disabled + .toggle-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* PWA Analytics Modal */
.pwa-analytics-modal {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analytics-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.metric-card {
  background: var(--card-bg, #0f172a);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-label {
  font-size: 0.85rem;
  color: var(--text-muted, rgba(255,255,255,0.6));
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text-primary, #fff);
}

.analytics-section {
  background: var(--card-bg, #0a1224);
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 1rem;
}

.analytics-section h3 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text-primary, #fff);
}

.analytics-section.two-column {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.analytics-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
}

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

.analytics-empty {
  padding: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-muted, rgba(255,255,255,0.6));
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  text-align: center;
}

.analytics-footnote {
  text-align: right;
  font-size: 0.85rem;
  color: var(--text-muted, rgba(255,255,255,0.5));
}
/* ============================================
   MOBILE-FIRST FIXES - User & Admin Dashboard
   ============================================ */

/* ===== USER DASHBOARD FIXES ===== */

/* Header - Prevent overflow and ensure proper spacing */
.header .container {
    padding: 0.75rem 1rem;
    min-height: 60px;
}

.header .logo {
    font-size: 1.5rem;
    white-space: nowrap;
}

/* User greeting and name button - prevent overflow */
.user-greeting-container,
.dash-switch-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0; /* Allow flex shrink */
}

.user-name-btn,
.dash-btn {
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.85rem !important;
    padding: 0.4rem 0.6rem !important;
}

/* Last access info - responsive text */
.text-secondary-xs {
    font-size: 0.7rem !important;
    padding: 0.4rem 0.75rem !important;
    line-height: 1.3;
    max-width: 100%;
    word-break: break-word;
}

/* Balance card - compact for mobile */
.balance-card-enhanced {
    padding: 1rem 0.75rem !important;
    margin-bottom: 1rem !important;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.balance-amount-text {
    font-size: 2.5rem !important;
    line-height: 1.1;
    word-break: break-all;
}

.balance-text h3 {
    font-size: 0.9rem !important;
}

.balance-text p {
    font-size: 0.75rem !important;
}

/* Wallet buttons - ensure they fit */
.wallet-buttons-container {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

.wallet-action-btn {
    flex: 1 1 0;
    min-width: 0;
    padding: 0.5rem 0.6rem !important;
    font-size: 0.75rem !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.wallet-action-btn svg {
    width: 18px !important;
    height: 18px !important;
    flex-shrink: 0;
}

/* Action cards grid - 4 columns on mobile */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.action-card {
    padding: 0.75rem 0.5rem;
    min-height: 85px;
}

.action-icon-svg {
    width: 32px;
    height: 32px;
    margin-bottom: 0.5rem;
}

.action-icon-svg svg {
    width: 100%;
    height: 100%;
}

.action-title {
    font-size: 0.7rem !important;
    line-height: 1.2;
}

/* ===== ADMIN DASHBOARD FIXES ===== */

/* Admin header - prevent overflow */
.admin-header-container {
    padding: 0.75rem 1rem !important;
}

.admin-greeting {
    font-size: 0.75rem !important;
}

.admin-name-badge {
    font-size: 0.85rem !important;
    padding: 0.4rem 0.8rem !important;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* System stats - compact for mobile */
.admin-stats-container {
    padding: 1rem 0.75rem !important;
}

.stat-card-system {
    padding: 0.75rem 0.5rem !important;
}

.stat-label-system {
    font-size: 0.65rem !important;
}

.stat-value-system {
    font-size: 1.2rem !important;
}

.stat-badge-system {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.4rem !important;
}

/* Admin action buttons - fit in 4 columns */
.admin-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    padding: 0 1rem;
}

.admin-action-card {
    padding: 0.75rem 0.5rem !important;
    min-height: 85px;
}

.admin-action-icon {
    width: 32px !important;
    height: 32px !important;
    margin-bottom: 0.5rem;
}

.admin-action-title {
    font-size: 0.65rem !important;
    line-height: 1.2;
}

/* Version info - smaller on mobile */
.version-info {
    font-size: 0.65rem !important;
    padding: 0.3rem 0.6rem !important;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Tablets (600px - 768px) */
@media (min-width: 600px) {
    .actions-grid,
    .admin-actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }

    .action-card,
    .admin-action-card {
        padding: 1rem 0.75rem;
        min-height: 100px;
    }

    .action-title,
    .admin-action-title {
        font-size: 0.8rem !important;
    }

    .balance-amount-text {
        font-size: 3rem !important;
    }

    .balance-card-enhanced {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .wallet-action-btn {
        font-size: 0.85rem !important;
        padding: 0.6rem 0.8rem !important;
    }

    .wallet-action-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
    .header .container,
    .admin-header-container {
        padding: 1rem 2rem !important;
    }

    .balance-card-enhanced {
        padding: 2rem 1.5rem !important;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .balance-amount-text {
        font-size: 3.5rem !important;
    }

    .actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .admin-actions-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .action-card,
    .admin-action-card {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }

    .action-icon-svg,
    .admin-action-icon {
        width: 40px !important;
        height: 40px !important;
    }

    .action-title,
    .admin-action-title {
        font-size: 0.9rem !important;
    }

    .wallet-action-btn {
        font-size: 0.95rem !important;
        padding: 0.7rem 1.2rem !important;
        flex-direction: row;
        gap: 0.6rem;
    }

    .wallet-action-btn svg {
        width: 22px !important;
        height: 22px !important;
    }
}

/* Large Desktop (1024px+) */
@media (min-width: 1024px) {
    .balance-amount-text {
        font-size: 4rem !important;
    }

    .stat-value-system {
        font-size: 1.5rem !important;
    }
}

/* Extra safety - prevent any element from overflowing */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Ensure container doesn't overflow */
.container {
    width: 100%;
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .container {
        max-width: 1200px;
        padding-left: 2rem;
        padding-right: 2rem;
    }
}


/* ===== CUSTOM SELECT DROPDOWN - EditableField ===== */
.custom-select-dropdown {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--border);
    background: rgba(255, 255, 255, 0.98) !important;
}

[data-theme="dark"] .custom-select-dropdown {
    background: rgba(30, 41, 59, 0.98) !important;
}

.custom-select-dropdown::-webkit-scrollbar {
    width: 6px;
}

.custom-select-dropdown::-webkit-scrollbar-track {
    background: var(--border);
    border-radius: 3px;
}

.custom-select-dropdown::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}

.custom-select-option {
    transition: all 0.15s ease;
}

.custom-select-option:hover,
.custom-select-option.focused {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}

.custom-select-option:last-child {
    border-bottom: none !important;
}

.custom-select-option.selected {
    background: var(--primary-bg) !important;
    color: var(--primary) !important;
}

/* ===== RESPONSIVE LAYOUT FOR INVITATION MODALS - 320px ===== */
@media (max-width: 360px) {
    /* Convert 2-column grids to single column for better mobile UX */
    #create-code-form > div[style*="grid-template-columns: 1fr 1fr"],
    #create-campaign-form > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Reduce padding on modal content for more space */
    #create-code-modal .modal-body > div,
    #create-campaign-modal .modal-body > div {
        padding: 0.75rem !important;
    }

    /* Make code input + dice button more compact */
    #create-code-form > div:first-of-type {
        flex-wrap: nowrap !important;
    }

    /* Smaller dice button on very small screens */
    #create-code-form button[title="Generar aleatorio"] {
        padding: 0 0.5rem !important;
        font-size: 1rem !important;
    }

    /* Reduce gap between form fields */
    #create-code-form,
    #create-campaign-form {
        gap: 0.5rem !important;
    }

    /* More compact footer buttons */
    #create-code-modal button,
    #create-campaign-modal button {
        padding: 0.4rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    /* Reduce header spacing */
    #create-code-modal > div > div:first-child,
    #create-campaign-modal > div > div:first-child {
        margin-bottom: 0.75rem !important;
        padding-bottom: 0.5rem !important;
    }

    /* Compact EditableField labels on mobile */
    .editable-field > div > div:first-child {
        font-size: 0.65rem !important;
        margin-bottom: 1px !important;
    }

    /* Slightly smaller field text on 320px */
    .editable-field {
        padding: 0.4rem !important;
    }
}
