:root {
  --bg-main: #f4f7fb;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #f8fafc;
  --border-color: #e2e8f0;
  --border-strong: #cbd5e1;
  --text-main: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;

  /* Paleta Institucional Aurex Prime */
  --brand-primary: #1e40af;
  --brand-accent: #2563eb;
  --brand-accent-hover: #1d4ed8;
  --brand-glow: rgba(37, 99, 235, 0.14);

  /* Colores Semánticos para Fondo Claro (Alto Contraste Financiero) */
  --gold: #b45309;
  --gold-bright: #d97706;
  --gold-bg: #fffbeb;
  --gold-border: #fde68a;

  --green: #059669;
  --green-bright: #10b981;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;

  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;

  --blue: #2563eb;
  --cyan: #0284c7;
  --cyan-bg: #f0f9ff;
  --cyan-border: #bae6fd;

  --purple: #7c3aed;
  --purple-bg: #f5f3ff;
  --purple-border: #ddd6fe;

  --radius: 14px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.04), 0 1px 2px rgba(15, 23, 42, 0.02);
  --shadow-card: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --shadow-hover: 0 12px 28px -4px rgba(15, 23, 42, 0.08), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  background-image:
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.05) 0px, transparent 45%),
    radial-gradient(at 100% 0%, rgba(14, 165, 233, 0.06) 0px, transparent 45%);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   PANTALLA DE PRESENTACIÓN + ACCESO PRIVADO (SPLIT LANDING)
   ========================================================= */
.login-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(37, 99, 235, 0.11) 0%, transparent 45%),
    radial-gradient(circle at 86% 82%, rgba(14, 165, 233, 0.11) 0%, transparent 45%),
    linear-gradient(135deg, #f8fafc 0%, #eef2f9 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 5%;
  z-index: 9999;
  overflow-y: auto;
}

.login-bg-decor {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.45;
  pointer-events: none;
}

.login-split-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1220px;
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  align-items: center;
  gap: 54px;
}

/* Columna Izquierda: Presentación Comercial */
.login-hero {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.hero-brand-header {
  display: inline-flex;
  align-items: center;
  gap: 16px;
}

.hero-logo-box {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  box-shadow: 0 10px 24px -4px rgba(30, 64, 175, 0.32);
}

.hero-brand-name {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.hero-brand-name strong {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-headline {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 2.45rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.9px;
  color: #0f172a;
}

.hero-gradient-text {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1rem;
  line-height: 1.65;
  color: #475569;
  max-width: 600px;
}

.hero-features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 4px;
}

.hero-feature-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.hero-feature-card:hover {
  transform: translateY(-2px);
  border-color: #bfdbfe;
  background: #ffffff;
}

.hero-feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.hero-feature-card h3 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 3px;
}

.hero-feature-card p {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #64748b;
}

.hero-trust-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #cbd5e1;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #334155;
}

.live-dot-mini {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

/* Columna Derecha: Tarjeta de Login */
.login-card-wrap {
  display: flex;
  justify-content: flex-end;
  width: 100%;
}

.login-card {
  position: relative;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 22px;
  padding: 38px 34px 32px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  box-shadow:
    0 25px 60px -15px rgba(15, 23, 42, 0.12),
    0 0 0 1px rgba(15, 23, 42, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

@media (max-width: 980px) {
  .login-split-container {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 20px 0;
  }
  .login-card-wrap {
    justify-content: center;
  }
  .hero-headline {
    font-size: 1.9rem;
  }
}

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

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.22);
  margin-bottom: 4px;
}

.login-brand-pill {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 1.4px;
  color: var(--brand-accent);
  background: #eff6ff;
  border: 1px solid #dbeafe;
  padding: 4px 12px;
  border-radius: 999px;
}

.login-card h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #0f172a;
}

.login-card h2 span {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-form {
  width: 100%;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 0.84rem;
  font-weight: 600;
}

.login-security-foot {
  margin-top: 12px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #64748b;
}

/* =========================================================
   BARRA SUPERIOR EJECUTIVA (TOPBAR)
   ========================================================= */
.topbar {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-color);
  padding: 14px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 15px rgba(15, 23, 42, 0.03);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(30, 64, 175, 0.2);
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-brand h1 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.52rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: #0f172a;
}

.topbar-brand h1 span {
  background: linear-gradient(135deg, #1e40af, #0284c7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tier-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  padding: 3px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #eff6ff, #e0f2fe);
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.subtitle {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

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

/* Badges de estado en barra superior */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-ok {
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid var(--green-border);
}
.status-ok .dot {
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.status-warn {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}
.status-warn .dot {
  background: var(--gold-bright);
}

.status-admin {
  background: linear-gradient(135deg, #0f172a, #1e3a8a);
  color: #ffffff;
  border: 1px solid #1e40af;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.14);
}

/* =========================================================
   CONTENEDOR PRINCIPAL CON MÁRGENES ELEGANTES
   ========================================================= */
.container {
  max-width: 1260px;
  width: 92%;
  margin: 0 auto;
  padding: 20px 0 38px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Alertas */
.alert {
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
}
.alert.hidden {
  display: none;
}
.alert-success {
  background: var(--green-bg);
  color: #065f46;
  border: 1px solid var(--green-border);
}
.alert-error {
  background: var(--red-bg);
  color: #991b1b;
  border: 1px solid var(--red-border);
}
.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

/* Tarjetas Principales */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

.card.hidden {
  display: none;
}

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

.card-header h2 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

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

code {
  font-family: 'JetBrains Mono', Consolas, monospace;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  color: #1e40af;
  font-size: 0.78rem;
  font-weight: 600;
}

/* =========================================================
   FORMULARIOS, SELECTORES Y BOTONES
   ========================================================= */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.align-end {
  align-items: flex-end;
}

.flex-1 {
  flex: 1;
  min-width: 180px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.1px;
}

input[type="text"],
input[type="password"],
input[type="datetime-local"],
input[type="search"],
select {
  background-color: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  outline: none;
  transition: all 0.2s ease;
  width: 100%;
}

input:focus,
select:focus {
  background-color: #ffffff;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 4px var(--brand-glow);
}

.input-with-btn {
  display: flex;
  gap: 8px;
}

.btn-eye {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  color: var(--text-secondary);
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.btn-eye:hover {
  background: #ffffff;
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}

.api-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  font-family: inherit;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}
.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #1e3a8a, #1d4ed8);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background-color: #f8fafc;
}

.btn-outline {
  background-color: #ffffff;
  color: var(--text-secondary);
  border-color: var(--border-strong);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background-color: #eff6ff;
}

.btn-success {
  background: linear-gradient(135deg, #059669, #10b981);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}
.btn-success:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.btn-danger-outline {
  background-color: #ffffff;
  color: var(--red);
  border-color: var(--red-border);
}
.btn-danger-outline:hover:not(:disabled) {
  background-color: var(--red-bg);
  border-color: #f87171;
}

.btn-start-cycle {
  width: 100%;
  padding: 15px 22px;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.4px;
  background: linear-gradient(135deg, #0f172a 0%, #1e40af 55%, #2563eb 100%);
  color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 10px 24px -4px rgba(30, 64, 175, 0.35);
}
.btn-start-cycle:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -4px rgba(30, 64, 175, 0.45);
}

.btn-icon {
  background: #f1f5f9;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* =========================================================
   SELECTOR DE PESTAÑAS BANCARIAS (BANESCO / BDV)
   ========================================================= */
.bank-tabs-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.bank-tab {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  color: var(--text-main);
  text-align: left;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.bank-tab:hover {
  border-color: #93c5fd;
  box-shadow: var(--shadow-card);
  transform: translateY(-1px);
}

.bank-tab.active {
  border-color: var(--brand-accent);
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.14);
}

.bank-tab-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.bank-tab-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #cbd5e1;
  flex-shrink: 0;
}

.bank-tab-dot.running {
  background-color: var(--green-bright);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
  animation: pulse 1.6s infinite;
}

.bank-tab-title {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.06rem;
  font-weight: 800;
  color: var(--text-main);
}

.bank-tab-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 2px;
}

.bank-tab-right {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--green);
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  padding: 7px 14px;
  border-radius: 10px;
}

.cycle-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.active-cycle-banner {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1.5px solid var(--green-border);
  border-radius: 12px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.pulse-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--green-bright);
  box-shadow: 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 1.6s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.65); }
  70% { box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.active-cycle-info {
  flex: 1;
}

.cycle-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 1rem;
  color: #064e3b;
}

.cycle-meta {
  font-size: 0.85rem;
  color: #334155;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mono-timer {
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  font-size: 0.95rem;
  font-weight: 800;
}

.cycle-active-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Botones Chip en Tablas */
.btn-chip {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.btn-chip:hover:not(:disabled) {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
  background: #eff6ff;
}

.btn-chip-disabled,
.btn-chip:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.badge-neutral {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}

.badge-active {
  background: var(--green-bg);
  color: #047857;
  border: 1px solid var(--green-border);
}

.badge-pending {
  background: var(--gold-bg);
  color: var(--gold);
  border: 1px solid var(--gold-border);
}

.badge-live-blink {
  font-size: 0.92rem;
  font-weight: 800;
  padding: 7px 18px;
  letter-spacing: 0.3px;
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #10b981;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.22);
  animation: blinkBadge 1.2s ease-in-out infinite;
}

@keyframes blinkBadge {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.32);
  }
  50% {
    opacity: 0.4;
    box-shadow: 0 0 2px rgba(16, 185, 129, 0.08);
  }
}

.badge-banesco {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

/* =========================================================
   TARJETAS KPI EJECUTIVAS (5 RECUADROS FINANCIEROS)
   ========================================================= */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

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

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

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 14px 15px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
}

.kpi-ves::before { background: linear-gradient(90deg, #f59e0b, #d97706); }
.kpi-rate::before { background: linear-gradient(90deg, #2563eb, #3b82f6); }
.kpi-usdt::before { background: linear-gradient(90deg, #10b981, #059669); }

.kpi-client-send {
  background: linear-gradient(180deg, #f0f9ff 0%, #ffffff 65%);
  border-color: #bae6fd;
}
.kpi-client-send::before { background: linear-gradient(90deg, #0284c7, #06b6d4); }

.kpi-my-profit {
  background: linear-gradient(180deg, #faf5ff 0%, #ffffff 65%);
  border-color: #ddd6fe;
}
.kpi-my-profit::before { background: linear-gradient(90deg, #7c3aed, #9333ea); }

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

.kpi-title {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.kpi-icon {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 9px;
  border-radius: 999px;
}

.kpi-value {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.18rem;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.4px;
}

.kpi-ves .kpi-value { color: #b45309; }
.kpi-rate .kpi-value { color: #0f172a; }
.kpi-usdt .kpi-value { color: #059669; }
.kpi-client-send .kpi-value { color: #0369a1; }

.kpi-footer {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Recuadro Dual (Comisión Binance + Comisión x Servicio) */
.kpi-dual-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.kpi-dual-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.kpi-dual-label {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.kpi-dual-val {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 1.04rem;
  font-weight: 800;
}

.kpi-dual-sub {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.kpi-dual-divider {
  border-top: 1px dashed #cbd5e1;
  margin: 8px 0;
}

.text-profit { color: var(--purple); }
.text-success { color: var(--green); }
.text-gold { color: var(--gold); }
.text-danger { color: var(--red); }

/* =========================================================
   TABLAS DE DATOS (ESTILO FINTECH CLARO)
   ========================================================= */
.table-header-bar {
  flex-wrap: wrap;
}

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

.search-input {
  width: 270px !important;
}

.table-responsive {
  width: 100%;
  overflow-x: hidden;
  border: 1px solid var(--border-color);
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  table-layout: auto;
  background: #ffffff;
}

.data-table th,
.data-table td {
  padding: 9px 6px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  color: #475569;
  font-weight: 800;
  font-size: 0.65rem;
  letter-spacing: 0.25px;
  text-transform: uppercase;
  background-color: #f8fafc;
  border-bottom: 1.5px solid var(--border-color);
  white-space: nowrap;
}

.history-table {
  font-size: 0.73rem;
}

.history-table th,
.history-table td {
  padding: 8px 4px;
}

.history-table .btn-chip {
  padding: 4px 7px;
  font-size: 0.7rem;
}

.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

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

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

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

.empty-row {
  text-align: center !important;
  padding: 34px !important;
  color: var(--text-muted);
  font-weight: 500;
}

.hidden {
  display: none !important;
}

@media (max-width: 768px) {
  .bank-tabs-bar {
    grid-template-columns: 1fr;
  }
  .search-input {
    width: 100% !important;
  }
}
