/* ============================================================
   NUPLIN Panel — Stylesheet
   ============================================================ */

:root {
  --primary:      #4F46E5;
  --primary-dark: #3730A3;
  --primary-light:#EEF2FF;
  --secondary:    #6B7280;
  --success:      #10B981;
  --warning:      #F59E0B;
  --danger:       #EF4444;
  --info:         #3B82F6;

  --bg:           #F8FAFC;
  --bg-card:      #FFFFFF;
  --border:       #E5E7EB;
  --text:         #111827;
  --text-muted:   #6B7280;
  --text-light:   #9CA3AF;

  --sidebar-w:    240px;
  --topbar-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --shadow:       0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:    0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -1px rgba(0,0,0,.05);
  --shadow-lg:    0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -2px rgba(0,0,0,.04);

  --font:         'Inter', system-ui, sans-serif;
}

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

html { font-size: 15px; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ============================================================
   UTILITIES
   ============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-right { text-align: right; }
.text-green { color: var(--success) !important; }
.text-yellow { color: var(--warning) !important; }
.text-red    { color: var(--danger)  !important; }
.inline-form { display: inline; }
.link-primary { color: var(--primary); font-weight: 600; }
.link-primary:hover { color: var(--primary-dark); }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 18px; border-radius: var(--radius-sm); font-size: .875rem;
  font-weight: 500; font-family: var(--font); cursor: pointer;
  border: 1.5px solid transparent; transition: all .15s ease;
  line-height: 1; white-space: nowrap;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
}
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }

.btn-secondary {
  background: #F3F4F6; color: var(--text); border-color: var(--border);
}
.btn-secondary:hover { background: #E5E7EB; }

.btn-outline {
  background: transparent; color: var(--primary); border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary-light); }

.btn-danger {
  background: var(--danger); color: #fff; border-color: var(--danger);
}
.btn-danger:hover { background: #DC2626; border-color: #DC2626; color: #fff; }

.btn-ghost {
  background: transparent; color: var(--text-muted); border-color: transparent;
}
.btn-ghost:hover { background: #F3F4F6; color: var(--text); }

.btn-white {
  background: #fff; color: var(--primary); border-color: #fff;
}
.btn-white:hover { background: #F3F4F6; }

.btn-lg  { padding: 12px 28px; font-size: 1rem; }
.btn-sm  { padding: 6px 12px; font-size: .8125rem; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm); font-size: .875rem;
  margin-bottom: 16px; border: 1px solid transparent;
}
.alert-success {
  background: #ECFDF5; color: #065F46; border-color: #A7F3D0;
}
.alert-error {
  background: #FEF2F2; color: #991B1B; border-color: #FECACA;
}
.error-list { margin-top: 6px; padding-left: 18px; }
.error-list li { margin-bottom: 2px; }

/* ============================================================
   BADGES
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border-radius: 20px; font-size: .75rem; font-weight: 600; letter-spacing: .02em;
}
.badge-admin    { background: #EDE9FE; color: #5B21B6; }
.badge-operador { background: #FEF3C7; color: #92400E; }
.badge-isp      { background: #DBEAFE; color: #1E40AF; }

.badge-estado-activa   { background: #D1FAE5; color: #065F46; }
.badge-estado-proxima  { background: #FEF3C7; color: #92400E; }
.badge-estado-vencida  { background: #FEE2E2; color: #991B1B; }
.badge-estado-sin_fecha { background: #F3F4F6; color: #6B7280; }

.badge-ip-pendiente  { background: #FEF3C7; color: #92400E; }
.badge-ip-aprobado   { background: #D1FAE5; color: #065F46; }
.badge-ip-rechazado  { background: #FEE2E2; color: #991B1B; }
.badge-info          { background: #DBEAFE; color: #1E40AF; }

/* IP ranges UI */
.ip-code {
  font-family: 'Courier New', monospace; font-size: .85rem;
  background: #F3F4F6; color: #111827; padding: 3px 8px;
  border-radius: 6px; border: 1px solid #E5E7EB; letter-spacing: .02em;
}
.ip-input { font-family: 'Courier New', monospace; letter-spacing: .03em; }
.ip-info-box {
  display: flex; gap: 14px; align-items: flex-start;
  background: #EFF6FF; border: 1px solid #BAD7F5; border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 24px; color: #1E40AF;
}
.ip-info-box svg { flex-shrink: 0; margin-top: 2px; }
.ip-info-box strong { display: block; font-weight: 700; margin-bottom: 4px; }
.ip-info-box span  { font-size: .875rem; line-height: 1.6; color: #1E3A8A; }
.ip-info-box code  { background: rgba(0,0,0,.08); padding: 1px 6px; border-radius: 4px; font-size: .82rem; }
.ip-examples { background: #F9FAFB; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }
.ip-examples-title { font-size: .78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 10px; }
.ip-examples-list { display: flex; flex-wrap: wrap; gap: 8px; }
.ip-examples-list code { background: #fff; border: 1px solid var(--border); padding: 4px 10px; border-radius: 6px; font-size: .8rem; color: var(--text); }
.btn-success { background: #059669; color: #fff; border: none; }
.btn-success:hover { background: #047857; }
.btn-warning { background: #D97706; color: #fff; border: none; }
.btn-warning:hover { background: #B45309; }
.filter-tabs { display: flex; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-tab {
  padding: 7px 16px; border-radius: var(--radius); font-size: .85rem; font-weight: 500;
  color: var(--text-muted); text-decoration: none; background: #fff; border: 1px solid var(--border);
  transition: all .15s;
}
.filter-tab:hover { background: var(--primary-light); color: var(--primary); border-color: var(--primary); }
.filter-tab.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--bg-card); border-radius: var(--radius);
  border: 1px solid var(--border); box-shadow: var(--shadow);
  overflow: hidden; margin-bottom: 24px;
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 600; }

.form-card { padding: 24px 28px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: collapse; font-size: .875rem;
  min-width: 600px;
}
.table th {
  padding: 10px 16px; text-align: left; font-size: .75rem;
  font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); background: #F9FAFB;
  border-bottom: 1px solid var(--border);
}
.table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #F9FAFB; }
.table td.actions { white-space: nowrap; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: .875rem; font-weight: 500;
  color: var(--text); margin-bottom: 6px;
}
.form-control {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: .9rem; font-family: var(--font);
  color: var(--text); background: #fff; transition: border-color .15s;
  outline: none;
}
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,70,229,.12); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }

.form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.form-row-sm { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 640px) {
  .form-row, .form-row-sm { grid-template-columns: 1fr; }
}

.form-section-title {
  font-size: .8125rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-muted);
  border-bottom: 1px solid var(--border); padding-bottom: 8px; margin-bottom: 16px; margin-top: 8px;
}

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap;
  padding-top: 16px; border-top: 1px solid var(--border); margin-top: 8px;
}

.req { color: var(--danger); margin-left: 2px; }
.optional { color: var(--text-muted); font-weight: 400; font-size: .8rem; }

.input-pw-wrap { position: relative; }
.input-pw-wrap .form-control { padding-right: 42px; }
.toggle-pw {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text-muted);
  padding: 4px; display: flex; align-items: center;
}
.toggle-pw:hover { color: var(--primary); }
.eye-icon { width: 18px; height: 18px; }

/* Password hints */
.pw-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pw-hint {
  font-size: .72rem; padding: 2px 8px; border-radius: 20px;
  background: #F3F4F6; color: var(--text-muted); border: 1px solid var(--border);
  transition: all .15s;
}
.pw-hint.ok  { background: #D1FAE5; color: #065F46; border-color: #6EE7B7; }
.pw-hint.bad { background: #FEE2E2; color: #991B1B; border-color: #FECACA; }

.btn-gen-pw {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; padding: 5px 12px;
  background: #F0F7FF; color: #1D6FCC; border: 1px solid #BAD7F5;
  border-radius: var(--radius); font-size: .78rem; font-weight: 500;
  cursor: pointer; transition: background .15s, color .15s;
}
.btn-gen-pw:hover { background: #DBEEFF; color: #1558A8; }
.btn-gen-pw svg { flex-shrink: 0; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  padding: 48px 24px; text-align: center; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.empty-state svg { opacity: .35; }
.empty-state p { font-size: 1rem; margin: 0; }

/* ============================================================
   LAYOUT — ADMIN PANEL
   ============================================================ */
.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  min-width: var(--sidebar-w);
  background: #1E1B4B;
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; height: 100vh;
  z-index: 100; transition: transform .25s ease;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-icon {
  width: 34px; height: 34px; background: var(--primary);
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; font-weight: 800; font-size: 1.1rem; color: #fff;
  flex-shrink: 0;
}
.brand-text { color: #fff; font-weight: 700; font-size: 1.1rem; }

.sidebar-nav { flex: 1; padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: var(--radius-sm); color: rgba(255,255,255,.6);
  font-size: .875rem; font-weight: 500; transition: all .15s;
}
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(79,70,229,.5); color: #fff; }

.sidebar-footer {
  padding: 16px; border-top: 1px solid rgba(255,255,255,.08);
}
.admin-info { display: flex; align-items: center; gap: 10px; }
.admin-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; flex-shrink: 0;
}
.admin-name { color: #fff; font-size: .875rem; font-weight: 500; }
.admin-role { color: rgba(255,255,255,.5); font-size: .75rem; }
.btn-logout {
  width: 100%; padding: 7px 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15); color: rgba(255,255,255,.7);
  border-radius: var(--radius-sm); font-size: .8125rem; cursor: pointer;
  font-family: var(--font); transition: all .15s;
}
.btn-logout:hover { background: rgba(255,255,255,.15); color: #fff; }

/* Main wrap */
.main-wrap {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-height: 100vh;
}

/* Topbar */
.topbar {
  height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 24px; gap: 12px;
  position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow);
}
.menu-toggle {
  display: none; background: none; border: none; cursor: pointer;
  color: var(--text-muted); padding: 4px;
}
.menu-toggle svg { width: 22px; height: 22px; display: block; }
.topbar-title { font-weight: 600; font-size: .9375rem; flex: 1; color: var(--text); }
.topbar-admin { display: flex; align-items: center; gap: 8px; }
.topbar-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700;
}
.topbar-name { font-size: .875rem; font-weight: 500; color: var(--text); }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 99;
}

/* Main content */
.main-content { flex: 1; padding: 28px 28px; max-width: 100%; }

.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 1.5rem; font-weight: 700; }
.page-sub { font-size: .875rem; color: var(--text-muted); margin-top: 2px; }
.header-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.breadcrumb-link { color: var(--text-muted); }
.breadcrumb-link:hover { color: var(--primary); }

/* Stats grid */
.stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 20px;
  display: flex; align-items: center; gap: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-icon {
  width: 44px; height: 44px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-body { min-width: 0; }
.stat-num { font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }

.stat-blue   .stat-icon { background: #EEF2FF; color: var(--primary); }
.stat-blue   .stat-num  { color: var(--primary); }
.stat-indigo .stat-icon { background: #E0E7FF; color: #4338CA; }
.stat-indigo .stat-num  { color: #4338CA; }
.stat-green  .stat-icon { background: #ECFDF5; color: var(--success); }
.stat-green  .stat-num  { color: var(--success); }
.stat-yellow .stat-icon { background: #FFFBEB; color: var(--warning); }
.stat-yellow .stat-num  { color: var(--warning); }
.stat-red    .stat-icon { background: #FEF2F2; color: var(--danger); }
.stat-red    .stat-num  { color: var(--danger); }

/* Detail grid */
.detail-grid {
  display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px;
}
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-card { padding: 20px; }
.detail-title { font-size: .9375rem; font-weight: 600; margin-bottom: 16px; color: var(--text-muted); text-transform: uppercase; font-size: .75rem; letter-spacing: .05em; }
.detail-rows { display: flex; flex-direction: column; gap: 0; }
.detail-row {
  display: flex; align-items: center; padding: 10px 0;
  border-bottom: 1px solid var(--border); font-size: .875rem;
}
.detail-row:last-child { border-bottom: none; }
.detail-key { width: 160px; flex-shrink: 0; color: var(--text-muted); font-weight: 500; }
.detail-val { flex: 1; }
.detail-val.saldo { color: var(--success); font-weight: 600; font-size: 1rem; }
.stat-mini-card { padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.stat-mini { text-align: center; padding: 12px; background: #F9FAFB; border-radius: var(--radius-sm); }
.stat-mini-num { display: block; font-size: 1.5rem; font-weight: 700; }
.stat-mini-label { font-size: .8rem; color: var(--text-muted); }

/* ============================================================
   ISP PORTAL
   ============================================================ */
.isp-profile-banner {
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(135deg, #1E1B4B 0%, #4338CA 100%);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 24px;
  flex-wrap: wrap; gap: 16px;
}
.isp-profile-info { display: flex; align-items: center; gap: 14px; }
.isp-profile-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.2); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; font-weight: 700; flex-shrink: 0;
}
.isp-profile-name { color: #fff; font-size: 1.125rem; font-weight: 700; }
.isp-profile-meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: .85rem; color: rgba(255,255,255,.7); }
.isp-profile-saldo { text-align: right; }
.saldo-label { color: rgba(255,255,255,.6); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; }
.saldo-value { color: #fff; font-size: 1.5rem; font-weight: 700; }

/* ============================================================
   CHANNELS DISPLAY
   ============================================================ */

/* Badge de conteo */
.canal-count-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--primary-light); color: var(--primary);
  border: 1px solid #C7D2FE; border-radius: 20px;
  font-size: .75rem; font-weight: 700; padding: 3px 10px;
  letter-spacing: .02em; white-space: nowrap;
}
.canal-count-lg { font-size: .875rem; padding: 5px 14px; }

/* Grid de chips de canal */
.channels-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 0 4px;
}
.channel-chip {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .78rem; font-weight: 500; line-height: 1.4;
  border: 1px solid transparent; white-space: nowrap;
}
.chip-nacional  { background: #EFF6FF; color: #1D4ED8; border-color: #BFDBFE; }
.chip-noticias  { background: #FEF3C7; color: #92400E; border-color: #FDE68A; }
.chip-peliculas { background: #F3E8FF; color: #6B21A8; border-color: #DDD6FE; }
.chip-deportes  { background: #ECFDF5; color: #065F46; border-color: #A7F3D0; }
.chip-infantil  { background: #FFF7ED; color: #9A3412; border-color: #FED7AA; }
.chip-musica    { background: #FDF2F8; color: #9D174D; border-color: #FBCFE8; }
.chip-default   { background: #F9FAFB; color: #374151; border-color: #E5E7EB; }

/* Panel de canales en formulario de cuentas */
.pkg-channels-panel {
  margin-top: 12px;
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  animation: slideDown .2s ease;
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.pkg-channels-header {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--border);
}
.pkg-channels-title { flex: 1; min-width: 0; font-size: .875rem; font-weight: 600; color: var(--text); }
.pkg-channels-panel .channels-grid { padding: 12px 14px; }
.pkg-channels-notas {
  margin: 0 14px 12px;
  background: #EFF6FF; border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm); padding: 8px 12px;
  font-size: .8125rem; color: #1E40AF;
  display: flex; align-items: flex-start; gap: 8px;
}
.pkg-channels-notas::before {
  content: 'ℹ️'; flex-shrink: 0; font-size: .875rem;
}

/* Vista previa de canales en formulario de paquetes */
.channels-textarea { font-family: monospace; font-size: .85rem; line-height: 1.6; }
.channels-preview-label { margin-top: 8px; }
.channels-preview-grid {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-top: 6px; min-height: 0;
}

/* Admin packages index */
.pkg-name-cell { display: flex; flex-direction: column; gap: 3px; }
.pkg-note-tag {
  font-size: .73rem; color: var(--text-muted);
  white-space: normal; line-height: 1.3;
}

/* Modal de canales */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 200;
  align-items: center; justify-content: center; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: #fff; border-radius: var(--radius);
  width: 100%; max-width: 720px; max-height: 85vh;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  animation: modalIn .2s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.modal-title { font-size: 1.0625rem; font-weight: 700; }
.modal-close {
  background: none; border: none; font-size: 1.5rem; cursor: pointer;
  color: var(--text-muted); line-height: 1; padding: 2px 6px;
}
.modal-close:hover { color: var(--danger); }
.modal-body {
  overflow-y: auto; padding: 16px 20px; flex: 1;
}
.modal-notas {
  margin-top: 12px; background: #EFF6FF; border: 1px solid #BFDBFE;
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: .8375rem; color: #1E40AF;
  display: flex; align-items: flex-start; gap: 8px;
}
.modal-notas::before { content: 'ℹ️'; flex-shrink: 0; }

/* ============================================================
   PACKAGES EXTRAS
   ============================================================ */
.badge-activo   { background: #D1FAE5; color: #065F46; }
.badge-inactivo { background: #F3F4F6; color: #6B7280; }

.row-inactive td { opacity: .55; }

.price-tag { color: var(--primary); font-size: .9375rem; }

.input-prefix-wrap { position: relative; display: flex; align-items: center; }
.input-prefix {
  position: absolute; left: 12px; color: var(--text-muted);
  font-weight: 600; pointer-events: none; font-size: .9rem;
}
.input-with-prefix { padding-left: 28px !important; }

.form-group-check { display: flex; flex-direction: column; justify-content: center; padding-top: 4px; }
.checkbox-label {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  font-size: .9rem; font-weight: 500; user-select: none;
}
.checkbox-label input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0;
}

.field-hint { display: block; font-size: .78rem; color: var(--text-muted); margin-top: 5px; }
.field-hint-warn { color: #92400E; }
.field-hint a    { color: var(--primary); }

.info-note {
  display: flex; align-items: center; gap: 8px;
  background: #EFF6FF; border: 1px solid #BFDBFE; border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: .8375rem; color: #1E40AF; margin-top: -8px;
}
.info-note svg { flex-shrink: 0; }
.text-muted { color: var(--text-muted); }

/* ============================================================
   LANDING PAGE
   ============================================================ */
.landing { min-height: 100vh; display: flex; flex-direction: column; }

.landing-header {
  background: rgba(255,255,255,.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
  box-shadow: var(--shadow);
}
.landing-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.landing-logo { display: flex; align-items: center; gap: 10px; }
.logo-badge {
  width: 36px; height: 36px; background: var(--primary);
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem; color: #fff;
}
.logo-name { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: -.01em; }
.logo-badge-lg { width: 52px; height: 52px; font-size: 1.5rem; border-radius: 14px; }
.logo-name-lg  { font-size: 1.75rem; }

/* Hero */
.hero {
  padding: 80px 0 64px;
  background: linear-gradient(135deg, #1E1B4B 0%, #312E81 50%, #4338CA 100%);
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}
@media (max-width: 768px) { .hero-inner { grid-template-columns: 1fr; } .hero-graphic { display: none; } }
.hero-label {
  display: inline-block; background: rgba(255,255,255,.15); color: rgba(255,255,255,.9);
  padding: 4px 14px; border-radius: 20px; font-size: .8125rem; font-weight: 500;
  margin-bottom: 16px; letter-spacing: .04em;
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: #fff;
  line-height: 1.15; margin-bottom: 20px; letter-spacing: -.02em;
}
.gradient-text {
  background: linear-gradient(135deg, #A5B4FC, #C7D2FE);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle { color: rgba(255,255,255,.75); font-size: 1.0625rem; max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-graphic { display: flex; justify-content: flex-end; }
.graphic-card {
  background: rgba(255,255,255,.12); backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.2); border-radius: 16px;
  padding: 32px; display: flex; flex-direction: column; gap: 20px;
  width: 240px;
}
.graphic-stat { text-align: center; }
.gs-num { display: block; color: #fff; font-size: 1.1rem; font-weight: 700; }
.gs-label { color: rgba(255,255,255,.6); font-size: .8rem; }

/* Benefits */
.benefits { padding: 80px 0; background: var(--bg); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-header h2 { font-size: 2rem; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.section-header p  { color: var(--text-muted); font-size: 1.0625rem; }

.benefits-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px;
}
.benefit-card {
  background: #fff; border-radius: var(--radius); padding: 28px 24px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}
.benefit-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.benefit-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.benefit-icon svg { width: 24px; height: 24px; }
.benefit-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 8px; }
.benefit-card p  { color: var(--text-muted); font-size: .9rem; line-height: 1.7; }

/* ── Landing TV/TVYMAS branding ───────────────────────────────────────────── */
.tv-logo-wrap { display: flex; align-items: center; gap: 8px; }
.tv-logo-text { font-weight: 800; font-size: 1.25rem; color: var(--text); letter-spacing: .02em; }
.tv-logo-white .tv-logo-text { color: #fff; }
.tv-logo-footer span { color: rgba(255,255,255,.6); font-weight: 700; }
.partnership-badge {
  display: flex; align-items: center; gap: 6px;
  background: #F3F4F6; border-radius: 20px; padding: 4px 10px 4px 8px;
  font-size: .75rem; color: var(--text-muted);
}
.logo-badge-sm {
  width: 20px; height: 20px; background: var(--primary); border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: .7rem; color: #fff;
}
.nuplin-text { font-weight: 700; color: var(--text); font-size: .8rem; }
.footer-sep  { color: rgba(255,255,255,.3); font-size: 1rem; }

/* ── Hero TV ──────────────────────────────────────────────────────────────── */
.hero-tv { background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 55%, #1D4ED8 100%); }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.85); padding: 5px 14px; border-radius: 20px;
  font-size: .8rem; font-weight: 500; margin-bottom: 18px; letter-spacing: .04em;
}
.eyebrow-dot {
  width: 7px; height: 7px; background: #34D399; border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52,211,153,.3);
}
.hero-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 28px; }
.hero-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8); padding: 4px 12px; border-radius: 20px;
  font-size: .78rem; font-weight: 500;
}
.btn-outline-white {
  background: transparent; border: 2px solid rgba(255,255,255,.4);
  color: #fff; padding: 12px 24px; border-radius: var(--radius);
  font-weight: 600; font-size: .9375rem; cursor: pointer; transition: all .2s;
  text-decoration: none; display: inline-block;
}
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.7); }

/* TV mockup */
.tv-mockup { display: flex; flex-direction: column; align-items: center; width: 340px; }
.tv-screen {
  width: 100%; background: #0A0F1E; border-radius: 12px;
  border: 3px solid #2D3748; box-shadow: 0 20px 60px rgba(0,0,0,.5);
  overflow: hidden;
}
.tv-screen-content { display: grid; grid-template-columns: 1fr 1.2fr; }
.tv-channel-list { padding: 16px 12px; border-right: 1px solid #1A2236; }
.tv-ch {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.5); font-size: .72rem; padding: 5px 8px;
  border-radius: 6px; cursor: default;
}
.active-ch { background: rgba(59,130,246,.2); color: #93C5FD; }
.ch-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.ch-dot-red    { background: #F87171; }
.ch-dot-blue   { background: #60A5FA; }
.ch-dot-green  { background: #34D399; }
.ch-dot-yellow { background: #FBBF24; }
.ch-dot-purple { background: #A78BFA; }
.tv-now-playing { padding: 16px 14px; display: flex; flex-direction: column; justify-content: center; }
.now-tag {
  font-size: .65rem; font-weight: 700; background: #EF4444; color: #fff;
  padding: 2px 7px; border-radius: 4px; display: inline-block; margin-bottom: 10px; letter-spacing: .05em;
}
.now-title { color: #fff; font-size: .9rem; font-weight: 700; margin-bottom: 4px; }
.now-sub   { color: rgba(255,255,255,.5); font-size: .72rem; }
.tv-stand-neck { width: 14px; height: 18px; background: #2D3748; }
.tv-stand-base { width: 90px; height: 8px; background: #2D3748; border-radius: 4px; }

/* ── Stats bar ────────────────────────────────────────────────────────────── */
.stats-bar { background: #fff; border-bottom: 1px solid var(--border); box-shadow: var(--shadow); }
.stats-bar-inner {
  display: flex; align-items: center; justify-content: center; gap: 0; padding: 20px 0;
}
.stat-item { text-align: center; padding: 0 40px; }
.stat-big  { display: block; font-size: 1.75rem; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 4px; }
.stat-desc { font-size: .8rem; color: var(--text-muted); }
.stat-divider { width: 1px; height: 40px; background: var(--border); }
@media (max-width: 640px) {
  .stats-bar-inner { flex-wrap: wrap; gap: 16px; }
  .stat-divider { display: none; }
  .stat-item { padding: 0 20px; }
}

/* ── Plans section ────────────────────────────────────────────────────────── */
.plans-section { padding: 80px 0; background: #F8FAFC; }
.section-eyebrow {
  display: inline-block; background: var(--primary-light); color: var(--primary);
  padding: 4px 14px; border-radius: 20px; font-size: .8rem; font-weight: 600;
  margin-bottom: 12px; letter-spacing: .03em;
}
.plans-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 24px; align-items: start;
}
.plan-card {
  background: #fff; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 28px 24px;
  display: flex; flex-direction: column; gap: 0;
  transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden;
}
.plan-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-card-featured {
  border: 2px solid var(--primary); box-shadow: 0 8px 30px rgba(79,70,229,.2);
}
.plan-popular-badge {
  position: absolute; top: 0; right: 0;
  background: var(--primary); color: #fff;
  font-size: .72rem; font-weight: 700; padding: 5px 14px;
  border-radius: 0 14px 0 12px; letter-spacing: .04em;
}
.plan-header { margin-bottom: 20px; }
.plan-icon {
  width: 48px; height: 48px; background: var(--primary-light); color: var(--primary);
  border-radius: 12px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.plan-name { font-size: 1.25rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.plan-desc { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }
.plan-price-wrap {
  display: flex; align-items: baseline; gap: 3px; margin-bottom: 16px;
  border-top: 1px solid var(--border); padding-top: 20px;
}
.plan-currency { font-size: 1.1rem; font-weight: 700; color: var(--text-muted); align-self: flex-start; margin-top: 4px; }
.plan-price    { font-size: 2.25rem; font-weight: 800; color: var(--text); line-height: 1; }
.plan-period   { font-size: .8rem; color: var(--text-muted); margin-left: 4px; }
.plan-price-consult { font-size: 1.1rem; font-weight: 600; color: var(--text-muted); }
.plan-meta-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.plan-channels-count {
  display: inline-flex; align-items: center; gap: 6px;
  background: #EFF6FF; color: #1D4ED8; border-radius: 20px;
  padding: 4px 12px; font-size: .8rem; font-weight: 600;
}
.plan-pantallas-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: #F3F4F6; color: #374151; border-radius: 20px;
  padding: 4px 12px; font-size: .8rem; font-weight: 600;
}
.plan-pantallas-premium { background: #FEF3C7; color: #92400E; }

/* Pantallas badge en panel de canales (formularios de cuenta) */
.pantallas-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: #F3F4F6; color: #374151; border: 1px solid #E5E7EB;
  border-radius: 20px; padding: 2px 10px; font-size: .75rem; font-weight: 600;
}
.pantallas-badge.pantallas-premium { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }
.plan-highlights { margin-bottom: 16px; }
.highlights-label { font-size: .75rem; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
.highlights-list { display: flex; flex-wrap: wrap; gap: 5px; }
.highlight-ch {
  display: inline-flex; align-items: center; gap: 4px;
  background: #F9FAFB; border: 1px solid var(--border);
  color: var(--text); font-size: .75rem; padding: 3px 9px; border-radius: 10px;
}
.highlight-more {
  font-size: .75rem; color: var(--primary); font-weight: 600; padding: 3px 6px;
}
.plan-notas {
  font-size: .78rem; color: #92400E; background: #FFFBEB;
  border: 1px solid #FCD34D; border-radius: 8px; padding: 8px 12px;
  margin-bottom: 16px; line-height: 1.5;
}
.plan-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); }
.btn-block { display: block; width: 100%; text-align: center; }
.plan-min-note {
  text-align: center; font-size: .75rem; color: var(--text-muted); margin-top: 10px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.no-plans { text-align: center; color: var(--text-muted); padding: 40px 0; }
.plans-note {
  text-align: center; color: var(--text-muted); font-size: .8rem;
  margin-top: 40px; max-width: 560px; margin-left: auto; margin-right: auto;
  line-height: 1.6;
}

/* ── ISP section ──────────────────────────────────────────────────────────── */
.isp-section { padding: 80px 0; background: #fff; }
.isp-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
@media (max-width: 900px) { .isp-grid { grid-template-columns: 1fr; } }
.isp-content h2 { font-size: 2rem; font-weight: 800; color: var(--text); margin-bottom: 16px; }
.isp-content > p { color: var(--text-muted); font-size: .9375rem; line-height: 1.7; margin-bottom: 28px; }
.isp-features { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.isp-features li { display: flex; gap: 14px; align-items: flex-start; }
.isp-feat-icon {
  width: 40px; height: 40px; background: var(--primary-light); color: var(--primary);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.isp-features li > div { display: flex; flex-direction: column; gap: 3px; }
.isp-features strong { font-size: .9375rem; font-weight: 700; color: var(--text); }
.isp-features span   { font-size: .85rem; color: var(--text-muted); line-height: 1.5; }

/* ISP dashboard preview */
.isp-dashboard-preview {
  background: #fff; border-radius: 16px; border: 1px solid var(--border);
  box-shadow: 0 20px 60px rgba(0,0,0,.1); overflow: hidden;
}
.preview-bar {
  background: #F9FAFB; border-bottom: 1px solid var(--border);
  padding: 10px 16px; display: flex; gap: 6px;
}
.preview-bar span { width: 10px; height: 10px; border-radius: 50%; background: #E5E7EB; }
.preview-bar span:nth-child(1) { background: #FCA5A5; }
.preview-bar span:nth-child(2) { background: #FCD34D; }
.preview-bar span:nth-child(3) { background: #6EE7B7; }
.preview-body { padding: 20px; }
.preview-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-bottom: 20px; }
.preview-stat {
  background: #F9FAFB; border-radius: 10px; padding: 12px;
  border: 1px solid var(--border); text-align: center;
}
.ps-num   { font-size: 1.3rem; font-weight: 800; color: var(--text); }
.ps-lbl   { font-size: .7rem; color: var(--text-muted); margin-top: 2px; }
.ps-yellow { color: #D97706; }
.ps-green  { color: #059669; }
.preview-table { font-size: .8rem; }
.pt-row {
  display: grid; grid-template-columns: 1fr .7fr .5fr;
  padding: 8px 4px; border-bottom: 1px solid var(--border);
  align-items: center; gap: 8px;
}
.pt-header { color: var(--text-muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
.pt-badge { padding: 2px 8px; border-radius: 10px; font-size: .7rem; font-weight: 600; text-align: center; }
.pt-green  { background: #D1FAE5; color: #065F46; }
.pt-yellow { background: #FEF3C7; color: #92400E; }

/* ── CTA ──────────────────────────────────────────────────────────────────── */
.cta-section { padding: 72px 0; background: linear-gradient(135deg, #1E1B4B 0%, #1D4ED8 100%); }
.cta-box { text-align: center; }
.cta-logos {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin-bottom: 28px;
}
.cta-plus { color: rgba(255,255,255,.5); font-size: 1.5rem; font-weight: 300; }
.landing-logo-white { display: flex; align-items: center; gap: 8px; }
.cta-box h2 { font-size: 2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.cta-box p  { color: rgba(255,255,255,.7); font-size: 1.0625rem; margin-bottom: 28px; }

/* Footer */
.landing-footer { background: #111827; padding: 36px 0; }
.footer-inner { text-align: center; }
.footer-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 12px; }
.footer-tagline { color: rgba(255,255,255,.5); font-size: .875rem; margin-bottom: 6px; }
.footer-copy    { color: rgba(255,255,255,.3); font-size: .8125rem; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-page { display: flex; min-height: 100vh; }
.auth-left {
  flex: 1; background: linear-gradient(135deg, #1E1B4B 0%, #4338CA 100%);
  padding: 48px; display: flex; flex-direction: column; justify-content: center;
}
@media (max-width: 768px) { .auth-left { display: none; } }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.auth-tagline { font-size: 1.75rem; font-weight: 700; color: #fff; line-height: 1.3; margin-bottom: 14px; }
.auth-sub { color: rgba(255,255,255,.65); font-size: 1rem; margin-bottom: 32px; }
.auth-features { display: flex; flex-direction: column; gap: 10px; }
.auth-feature { color: rgba(255,255,255,.8); font-size: .9375rem; display: flex; align-items: center; gap: 8px; }
.check { color: #86EFAC; font-weight: 700; font-size: 1rem; }

.auth-right {
  width: 480px; min-width: 480px;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 48px; background: #fff;
}
@media (max-width: 768px) { .auth-right { width: 100%; min-width: 0; padding: 32px 24px; } }

.auth-card { width: 100%; max-width: 360px; }
.auth-title { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { color: var(--text-muted); font-size: .9375rem; margin-bottom: 28px; }
.auth-form .form-group { margin-bottom: 20px; }
.auth-back { margin-top: 20px; text-align: center; font-size: .875rem; color: var(--text-muted); }

/* ============================================================
   ERROR PAGE
   ============================================================ */
.error-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg); text-align: center;
}
.error-code { font-size: 7rem; font-weight: 800; color: var(--primary); line-height: 1; opacity: .15; }
.error-title { font-size: 1.75rem; font-weight: 700; margin: 12px 0 10px; }
.error-desc  { color: var(--text-muted); font-size: 1rem; margin-bottom: 28px; }
.error-actions { display: flex; gap: 10px; justify-content: center; }

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

/* ── Tablet grande (≤1024px) ──────────────────────────────── */
@media (max-width: 1024px) {
  .hero { padding: 64px 0 48px; }
  .plans-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .isp-grid   { gap: 40px; }
}

/* ── Sidebar mobile (≤900px) ──────────────────────────────── */
@media (max-width: 900px) {
  /* Sidebar deslizable */
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-wrap { margin-left: 0; }
  .menu-toggle { display: flex; }
  .topbar-name { display: none; }

  /* Contenido */
  .main-content { padding: 20px 16px; }
  .form-card    { padding: 20px 16px; }
  .table td.actions { flex-wrap: wrap; }

  /* Detail row: apilar en tablet */
  .detail-row  { flex-direction: column; align-items: flex-start; gap: 4px; }
  .detail-key  { width: auto; }

  /* ISP banner */
  .isp-profile-banner { flex-direction: column; align-items: flex-start; }
  .isp-profile-saldo  { text-align: left; }

  /* Landing ISP section — ocultar preview en 1 columna */
  .isp-visual { display: none; }
  .isp-grid   { grid-template-columns: 1fr; }
}

/* ── Tablet (≤768px) ──────────────────────────────────────── */
@media (max-width: 768px) {
  /* Landing hero */
  .hero        { padding: 52px 0 40px; flex: none; }
  .hero-title  { font-size: clamp(1.6rem, 6vw, 2.4rem); }
  .hero-subtitle { font-size: .9375rem; }
  .hero-inner  { grid-template-columns: 1fr; }
  .hero-graphic { display: none; }

  /* Landing secciones */
  .section-header h2 { font-size: 1.6rem; }
  .plans-section     { padding: 52px 0; }
  .isp-section       { padding: 52px 0; }
  .cta-section       { padding: 48px 0; }
  .cta-box h2        { font-size: 1.5rem; }
  .cta-box p         { font-size: .9375rem; }

  /* Plans grid: 2 cols o 1 según espacio */
  .plans-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }

  /* Auth */
  .auth-left  { display: none; }
  .auth-right { width: 100%; min-width: 0; padding: 32px 24px; }

  /* Detail grid */
  .detail-grid { grid-template-columns: 1fr; }
}

/* ── Teléfono grande (≤640px) ─────────────────────────────── */
@media (max-width: 640px) {
  /* Layout forms */
  .form-row, .form-row-sm { grid-template-columns: 1fr; }

  /* Stats bar landing */
  .stats-bar-inner { flex-wrap: wrap; gap: 16px; padding: 16px 0; }
  .stat-divider    { display: none; }
  .stat-item       { padding: 0 16px; }

  /* Landing hero chips: más pequeños */
  .hero-chip   { font-size: .72rem; padding: 3px 10px; }
  .hero-eyebrow { font-size: .75rem; }
  .hero-actions { flex-direction: column; gap: 10px; }
  .hero-actions .btn-lg { width: 100%; justify-content: center; }

  /* Plans */
  .plans-grid  { grid-template-columns: 1fr; }
  .plan-card   { padding: 20px 18px; }

  /* Landing nav: ocultar partnership badge */
  .partnership-badge { display: none; }
  .landing-nav       { padding: 12px 0; }

  /* CTA logos */
  .cta-logos { flex-wrap: wrap; justify-content: center; gap: 10px; }

  /* ISP features */
  .isp-features strong { font-size: .875rem; }

  /* Stat cards */
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ── Teléfono (≤480px) ────────────────────────────────────── */
@media (max-width: 480px) {
  /* Tipografía panel */
  .page-title { font-size: 1.2rem; }
  .stat-num   { font-size: 1.4rem; }
  .stat-card  { padding: 14px 12px; gap: 10px; }
  .stat-icon  { width: 36px; height: 36px; }
  .stat-icon svg { width: 18px; height: 18px; }

  /* Topbar */
  .topbar { padding: 0 14px; }

  /* Cards */
  .card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }

  /* Landing hero */
  .hero        { padding: 40px 0 32px; }
  .hero-title  { font-size: 1.5rem; }

  /* Buttons */
  .btn-lg { padding: 11px 20px; font-size: .9375rem; }

  /* Plans */
  .plan-price { font-size: 1.9rem; }
  .plan-name  { font-size: 1.1rem; }

  /* filter-tabs: scroll horizontal si muchos */
  .filter-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter-tab  { white-space: nowrap; flex-shrink: 0; }

  /* ISP profile banner */
  .isp-profile-avatar { width: 40px; height: 40px; font-size: 1rem; }
  .isp-profile-name   { font-size: 1rem; }
  .saldo-value        { font-size: 1.25rem; }

  /* Form actions: botones apilados */
  .form-actions { flex-direction: column-reverse; }
  .form-actions .btn { width: 100%; justify-content: center; }

  /* Page header: apilar */
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-header .btn { align-self: stretch; justify-content: center; }
}

/* ── Teléfono pequeño (≤380px) ────────────────────────────── */
@media (max-width: 380px) {
  html { font-size: 14px; }
  .main-content { padding: 14px 12px; }
  .form-card    { padding: 16px 12px; }
  .container    { padding: 0 14px; }
  .stats-grid   { grid-template-columns: 1fr; }
  .landing-nav  { gap: 8px; }
  .tv-logo-text { font-size: 1.1rem; }
}
