/* TheAlliens Fintech - Portal del Cliente (split) */

html { scroll-behavior: smooth; }

:root{

/* =========================================
   THEALLIENS - Paleta alineada al logo
   (grafito + plata + neutros profesionales)
   ========================================= */

/* Colores corporativos TheAlliens */
--primary: #2b2b2b;         /* grafito principal (botones, navbar, títulos fuertes) */
--primary-dark: #171717;    /* casi negro */
--primary-light: #5f6368;   /* gris acero */
--primary-bg: #f3f4f6;      /* fondo suave neutro (sin tono azul) */

--secondary: #cfcfcf;       /* plata suave */
--secondary-dark: #8b8f96;  /* gris metálico */

/* Neutros profesionales */
--text-primary: #1f1f1f;
--text-secondary: #5f6368;
--text-tertiary: #9aa0a6;

/* Bordes */
--border-light: #e5e7eb;
--border-medium: #d1d5db;

/* Fondo y superficies */
--bg-primary: #ffffff;
--bg-secondary: #f7f7f8;
--bg-tertiary: #eeeeef;

/* Estados (manteniendo buena legibilidad y contraste) */
--success: #10b981;
--success-bg: #d1fae5;
--warning: #ffa000;
--warning-bg: #fff1ba;
--error: #ef4444;
--error-bg: #fee2e2;

/* Extras opcionales para estilo logo/metal */
--metal-light: #e5e5e5;
--metal-mid: #bfc3c8;
--metal-dark: #6b7280;
--shadow-soft: rgba(0, 0, 0, 0.12);
--shadow-strong: rgba(0, 0, 0, 0.25);

  /* Bordes redondeados */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Tipografía */
  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
}

body, body.ta-portal{
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.ta-portal *, body.ta-portal *::before, body.ta-portal *::after{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.ta-portal .hidden { display: none !important; }
body.ta-portal a { color: inherit; }

/* ===== LAYOUT PRINCIPAL ===== */
body.ta-portal .main-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.ta-portal .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ===== HEADER CORPORATIVO ===== */
body.ta-portal .header {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
}

body.ta-portal .navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 16px;
  flex-wrap: wrap;
}

body.ta-portal .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

body.ta-portal .logo{
  width: 48px;
  height: 48px;
  background: var(--bg-primary);
  border: 1px solid rgba(107, 114, 128, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
}
.logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body.ta-portal .brand-text { display: flex; flex-direction: column; }
body.ta-portal .brand-name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
body.ta-portal .brand-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.5px;
}

body.ta-portal .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
body.ta-portal .nav-link{
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 6px 2px;
  transition: color 0.2s ease;
}
body.ta-portal .nav-link::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: var(--primary);
  width: 0;
  margin: 0 auto;
  transition: width 0.25s ease;
  border-radius: 999px;
}
body.ta-portal .nav-link:hover,
body.ta-portal .nav-link:focus-visible{
  color: var(--primary);
  outline: none;
}
body.ta-portal .nav-link:hover::after,
body.ta-portal .nav-link.active::after{
  width: 100%;
}
/* ===== HERO SECTION ===== */
body.ta-portal .hero {
  background: linear-gradient(135deg, #5f6368 50%, #8b8f96 100%);
  color: white;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
body.ta-portal .hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><path d="M0,0V100H1000V0Z" fill="white"/></svg>');
  background-size: 100% 100px;
  background-position: bottom;
  background-repeat: no-repeat;
}
body.ta-portal .hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}
body.ta-portal .hero-title {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.2;
}
body.ta-portal .hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 48px;
  line-height: 1.6;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}
body.ta-portal .hero-cta{
  background: #eae8e8 !important;
  color: #000000 !important;
  font-size: 1rem !important;
  padding: 16px 32px !important;
}

/* ===== SECCIÓN CORPORATIVA ===== */
body.ta-portal .corporate-section { padding: 80px 0; }
body.ta-portal .corporate-section-alt { background: var(--bg-tertiary); }

body.ta-portal .section-header { text-align: center; margin-bottom: 48px; }
body.ta-portal .section-title {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
body.ta-portal .section-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== TARJETAS DE INFORMACIÓN ===== */
body.ta-portal .info-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 32px;
  margin-top: 48px;
}
body.ta-portal .info-card{
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
}
body.ta-portal .info-card:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
body.ta-portal .info-icon{
  width: 64px;
  height: 64px;
  background: var(--primary-bg);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
  font-weight: 800;
  font-family: var(--font-heading);
}
body.ta-portal .info-icon.info-step{
  font-size: 20px;
}
body.ta-portal .info-title{
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}
body.ta-portal .info-content{ color: var(--text-secondary); line-height: 1.6; }

/* ===== TABLAS CORPORATIVAS ===== */
body.ta-portal .corporate-table{
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
body.ta-portal .corporate-table th{
  background: var(--primary-bg);
  color: var(--primary);
  font-weight: 600;
  text-align: left;
  padding: 16px;
  border-bottom: 2px solid var(--border-light);
}
body.ta-portal .corporate-table td{
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-primary);
}
body.ta-portal .corporate-table tr:last-child td{ border-bottom:none; }
body.ta-portal .corporate-table tr:hover{ background: var(--bg-secondary); }

/* ===== LISTAS CORPORATIVAS ===== */
body.ta-portal .corporate-list{ list-style:none; margin: 24px 0; }
body.ta-portal .corporate-list li{
  padding: 12px 0;
  color: var(--text-primary);
  display:flex;
  align-items:flex-start;
  gap: 12px;
}
body.ta-portal .corporate-list li::before{
  content:'✓';
  color: var(--success);
  font-weight:bold;
  flex-shrink:0;
}

body.ta-portal .warning-box{
  margin-top: 48px;
  padding: 24px;
  background: var(--warning-bg);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--warning);
}
body.ta-portal .warning-title{
  font-family: var(--font-heading);
  color: var(--warning);
  margin-bottom: 12px;
}

/* ===== LOGIN SECTION ===== */
body.ta-portal .login-section{
  padding: 80px 0;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, white 100%);
}
body.ta-portal .login-card{
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 48px;
  max-width: 480px;
  margin: 0 auto;
  border: 1px solid var(--border-light);
}
body.ta-portal .login-header{ text-align:center; margin-bottom:32px; }
body.ta-portal .login-icon{
  width:64px;height:64px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  display:flex;align-items:center;justify-content:center;
  color:#fff;
  margin: 0 auto 16px;
}
body.ta-portal .login-title{
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight:700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
body.ta-portal .login-subtitle{
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.6;
}

body.ta-portal .login-security-note{
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}
body.ta-portal .login-security-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-tertiary);
  padding: 8px 16px;
  border-radius: var(--radius-full);
}

/* ===== FORMULARIOS ===== */
body.ta-portal .form-group{ margin-bottom: 24px; }
body.ta-portal .form-label{
  display:block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}
body.ta-portal .input-group{ position:relative; display:flex; align-items:center; }
body.ta-portal .input-icon{
  position:absolute;
  left:12px;
  color: var(--text-tertiary);
  display:flex;
  align-items:center;
  pointer-events:none;
}
body.ta-portal .form-input{
  width:100%;
  padding: 14px 14px 14px 44px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all 0.2s;
  outline:none;
}
body.ta-portal .form-input:focus{
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
body.ta-portal .form-hint{
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 8px;
}
body.ta-portal .text-link{
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
body.ta-portal .text-link:hover{ text-decoration: underline; }

body.ta-portal .form-alert{
  padding: 12px 16px;
  background: var(--error-bg);
  color: var(--error);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  margin-bottom: 24px;
  display: none;
}
body.ta-portal .form-alert:not(:empty){ display:block; }

/* ===== BOTONES ===== */
body.ta-portal .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  padding: 14px 24px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.5;
  text-decoration:none;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  cursor:pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  user-select:none;
}
body.ta-portal .btn:hover{ transform: translateY(-1px); }
body.ta-portal .btn-primary{
  background-color: var(--primary);
  color:#fff;
  box-shadow: var(--shadow-md);
}
body.ta-portal .btn-primary:hover{
  background-color: var(--primary-dark);
  box-shadow: var(--shadow-lg);
}

/* Header CTA - efecto de deslizado */
body.ta-portal .header .btn-primary{
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
  background-size: 200% 100%;
  background-position: 0% 50%;
}
body.ta-portal .header .btn-primary:hover{
  background-position: 100% 50%;
}
body.ta-portal .btn-outline{
  background-color: transparent;
  border-color: var(--border-medium);
  color: var(--text-primary);
}
body.ta-portal .btn-outline:hover{
  border-color: var(--primary);
  color: var(--primary);
}
body.ta-portal .btn-block{ width:100%; }
body.ta-portal .btn-whatsapp{
  background-color: #25D366;
  color:#fff;
  border:none;
  box-shadow: var(--shadow-md);
}
body.ta-portal .btn-whatsapp:hover{
  background-color: #128C7E;
  box-shadow: var(--shadow-lg);
}

/* Botón animado: Solicitar préstamo */
body.ta-portal .btn-loan-now{
  position: relative;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color:#fff;
  border:none;
  box-shadow: 0 12px 28px rgba(34, 197, 94, 0.22);
  overflow: hidden;
  animation: taPulseLoan 1.35s ease-in-out infinite;
}
body.ta-portal .btn-loan-now:hover{
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 16px 36px rgba(34, 197, 94, 0.32);
}
body.ta-portal .btn-loan-now:active{
  transform: translateY(0) scale(0.995);
}
body.ta-portal .btn-loan-now::after{
  content: "";
  position: absolute;
  top: -60%;
  left: -70%;
  width: 40%;
  height: 220%;
  background: rgba(255,255,255,0.26);
  transform: rotate(25deg);
  animation: taShineLoan 2.8s ease-in-out infinite;
}
@keyframes taPulseLoan{
  0%, 100%{ filter: saturate(1); }
  50%{ filter: saturate(1.25); }
}
@keyframes taShineLoan{
  0%{ left:-70%; opacity:0; }
  18%{ opacity:0.75; }
  38%{ left:140%; opacity:0; }
  100%{ left:140%; opacity:0; }
}

/* ===== DASHBOARD ===== */
body.ta-portal .dashboard{
  background: var(--bg-secondary);
  min-height: 100vh;
  padding: 32px 0;
}
body.ta-portal .dash-actions{ display:flex; align-items:center; gap:16px; flex-wrap:wrap; justify-content:flex-end; }

body.ta-portal .dashboard-header{
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 24px;
}
body.ta-portal .user-greeting{ flex:1; min-width:300px; }
body.ta-portal .greeting-title{
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight:700;
  color: var(--text-primary);
  margin-bottom: 12px;
}
body.ta-portal .user-info{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
}
body.ta-portal .status-badge{
  display:inline-flex;
  align-items:center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.875rem;
}
body.ta-portal .status-dot{ width:8px;height:8px;border-radius:50%; background: var(--text-tertiary); }
body.ta-portal .status-badge.ok .status-dot{ background: var(--success); }
body.ta-portal .status-badge.warn .status-dot{ background: var(--warning); }
body.ta-portal .status-badge.bad .status-dot{ background: var(--error); }

/* ===== RESUMEN ===== */
body.ta-portal .summary-grid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
body.ta-portal .summary-card{
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  display:flex;
  align-items:flex-start;
  gap: 16px;
  transition: transform 0.2s, box-shadow 0.2s;
}
body.ta-portal .summary-card:hover{ transform: translateY(-2px); box-shadow: var(--shadow-lg); }
body.ta-portal .summary-icon{
  width:50px;height:50px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-md);
  display:flex;align-items:center;justify-content:center;
  color: var(--primary);
  flex-shrink:0;
}
body.ta-portal .summary-label{
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
body.ta-portal .summary-value{
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
body.ta-portal .summary-note{
  font-size: 1.4rem;
  color: var(--text-tertiary);
}
body.ta-portal .summary-card-highlight{
  border-color: var(--primary);
  background: linear-gradient(135deg, var(--primary-bg) 0%, white 100%);
}
body.ta-portal .summary-icon-highlight{
  background: var(--primary);
  color: white;
}

/* ===== PANEL (DETALLES) ===== */
body.ta-portal .panel{
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
  overflow:hidden;
}
body.ta-portal .panel-head{
  padding: 24px;
  border-bottom: 1px solid var(--border-light);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 24px;
  background: linear-gradient(to right, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}
body.ta-portal .panel-title{
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
body.ta-portal .panel-sub{ font-size: 0.875rem; color: var(--text-secondary); }
body.ta-portal .panel-select{ display:flex; flex-direction:column; gap:8px; min-width: 280px; }
body.ta-portal .panel-select-label{
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
body.ta-portal .panel-select-input{
  padding: 12px 16px;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 2px solid var(--border-light);
  border-radius: var(--radius-md);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%236b7280" viewBox="0 0 16 16"><path d="M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
}
body.ta-portal .panel-select-input:focus{ border-color: var(--primary); }

body.ta-portal .panel-kpis{
  padding: 24px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-light);
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}
body.ta-portal .kpi-item .kpi-label{ font-size: 0.75rem; color: var(--text-secondary); }
body.ta-portal .kpi-item .kpi-value{ font-size: 1.125rem; font-weight: 700; color: var(--text-primary); }
body.ta-portal .kpi-value-danger{ color: var(--error) !important; }
body.ta-portal .kpi-value-primary{ color: var(--primary) !important; }

/* ===== TABS ===== */
body.ta-portal .tabs{
  display:flex;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-secondary);
}
body.ta-portal .tab-btn{
  flex: 1;
  padding: 16px 24px;
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
body.ta-portal .tab-btn.active{
  border-bottom-color: var(--primary) !important;
  color: var(--primary) !important;
}
body.ta-portal .tab-content{ padding: 32px; }
body.ta-portal .tab-pane{ display:block; }

/* ===== TABLES ===== */
body.ta-portal .table-card{
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow:hidden;
}
body.ta-portal .tablewrap{ overflow-x:auto; }
body.ta-portal .table{ width:100%; border-collapse: separate; border-spacing: 0; }
body.ta-portal .table th{
  padding: 12px 16px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align:left;
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-tertiary);
  white-space: nowrap;
}
body.ta-portal .table td{
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
}

/* ===== HELP ===== */
body.ta-portal .help-box{
  background: linear-gradient(135deg, var(--primary-bg) 0%, var(--bg-primary) 100%);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
}
body.ta-portal .help-title{
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 16px;
}
body.ta-portal .help-text{ color: var(--text-secondary); margin-bottom: 24px; line-height: 1.6; }
body.ta-portal .help-actions{ display:flex; gap: 16px; justify-content:center; flex-wrap:wrap; }

/* ===== FOOTER ===== */
body.ta-portal .footer{
  background: var(--text-primary);
  color: white;
  padding: 80px 0 24px;
  margin-top: auto;
}
body.ta-portal .footer-content{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 48px;
  margin: 0 auto 48px;
  max-width: 900px;
  justify-items: center;
  text-align: center;
}
body.ta-portal .footer-brand{ display:flex; align-items:flex-start; gap: 16px; }
body.ta-portal .footer-logo{
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  overflow: hidden;
}
.footer-logo img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

body.ta-portal .footer-title{
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 8px;
}
body.ta-portal .footer-tagline{ font-size: 0.875rem; color: rgba(255,255,255,0.7); }
body.ta-portal .footer-head{
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: white;
}
body.ta-portal .footer-links,
.footer-contact{
  display:flex;
  flex-direction:column;
  gap: 12px;
}
body.ta-portal .footer-link,
body.ta-portal .footer-item{
  color: rgba(255,255,255,0.7);
  font-size: 0.875rem;
  line-height: 1.4;
}
body.ta-portal .footer-link{
  text-decoration:none;
  transition: color 0.2s;
}
body.ta-portal .footer-link:hover{ color: white; }
body.ta-portal .footer-item{
  cursor: default;
}
body.ta-portal .footer-security{
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}
body.ta-portal .footer-security-row{ display:flex; align-items:center; gap:8px; margin-bottom: 8px; }
body.ta-portal .footer-bottom{
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap: 16px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
}
body.ta-portal .footer-bottom-right{ display:flex; align-items:center; gap: 12px; }
body.ta-portal .footer-sep{ color: rgba(255,255,255,0.3); }

/* ===== NOTIFICATION ANIMATIONS ===== */
@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes slideOut {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(100%); opacity: 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px){
  body.ta-portal .hero-title{ font-size: 2.5rem; }
  body.ta-portal .section-title{ font-size: 2rem; }
  body.ta-portal .navbar{ flex-direction: column; text-align:center; }
  body.ta-portal .nav-links{ justify-content:center; }
  body.ta-portal .dashboard-header{ flex-direction: column; text-align:center; }
  body.ta-portal .footer-content{ grid-template-columns: 1fr; text-align:center; }
  body.ta-portal .footer-brand{ justify-content:center; }
}
@media (max-width: 480px){
  body.ta-portal .hero-title{ font-size: 2rem; }
  body.ta-portal .login-card{ padding: 32px 24px; }
  body.ta-portal .info-grid{ grid-template-columns: 1fr; }
}


/* Offset para scroll con header sticky */
body.ta-portal section[id]{ scroll-margin-top: 96px; }


/* ===== Responsive: phones ===== */
@media (max-width: 600px) {
  .navbar { padding: 14px 0; }
  .nav-links { gap: 8px; width: 100%; }
  .nav-links .btn { width: 100%; justify-content: center; }
  .hero { padding: 28px 0 18px; }
  .hero h1 { font-size: 26px; }
  .hero p { font-size: 15px; }
  .info-grid { grid-template-columns: 1fr; gap: 14px; }
  .card { padding: 16px; }
  .row { flex-wrap: wrap; }
  .row > * { width: 100%; }
  .panel { overflow-x: auto; }
  .table { min-width: 660px; }
  .btn { width: 100%; }
  input, select, textarea { width: 100%; }
}

@media (max-width: 420px) {
  .hero h1 { font-size: 24px; }
  .btn { padding: 10px 12px; }
}

/* ===== Mobile fix: Nuestros Productos (tabla corporativa) ===== */
@media (max-width: 600px) {
  body.ta-portal #products .table-wrap{
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    background: var(--bg-primary);
    box-shadow: var(--shadow-md);
  }

  /* La tabla se mantiene completa, pero no fuerza el viewport */
  body.ta-portal #products .table-wrap .corporate-table{
    margin: 0;
    min-width: 720px;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
  }

  body.ta-portal #products .corporate-table th,
  body.ta-portal #products .corporate-table td{
    padding: 12px;
  }
}



/* Segmented control (instalments view) */
.seg{
  display:inline-flex;
  align-items:center;
  border:1px solid var(--border);
  background: rgba(148,163,184,.10);
  border-radius:999px;
  overflow:hidden;
}
.seg-btn{
  appearance:none;
  border:0;
  background:transparent;
  padding:8px 12px;
  font-weight:800;
  font-size:12px;
  color: var(--text);
  cursor:pointer;
}
.seg-btn.active{
  background: rgba(37,99,235,.12);
  color: var(--primary);
}
.table-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:10px 12px;
  border-bottom:1px solid var(--border);
}
.chip{
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  font-size:12px;
  font-weight:900;
  border-radius:999px;
  border:1px solid var(--border);
  background: rgba(37,99,235,.10);
}
.chip-ghost{
  background: rgba(148,163,184,.12);
}
.row-next td{
  background: rgba(16,185,129,.08);
}
.inst-cards{ display:none; }
.inst-card{
  border:1px solid var(--border);
  border-radius:14px;
  padding:12px;
  margin:10px 0;
  background:#fff;
}
@media (max-width: 720px){
  .tablewrap{ display:none; }
  .inst-cards{ display:block; }
  .table-head{ padding:8px 10px; }
}
