/*
 * DigitalDESC Studio — Design System
 * Basado en la paleta DataFinder Manual (Playfair Display + DM Sans)
 * Modo claro, navy/gold corporativo, legibilidad máxima
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;800&family=DM+Sans:ital,wght@0,400;0,500;0,600;0,700&display=swap');

/* ═══════════════════════════════════════════════════════════════
   TOKENS
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* Colores */
  --navy:        #1C2D4F;
  --navy-mid:    #253E6E;
  --navy-dark:   #0F1923;
  --navy-light:  #EEF2F8;
  --gold:        #D4891A;
  --gold-light:  #F5C97A;
  --gold-pale:   #FDF3E3;
  --white:       #FFFFFF;
  --text:        #2C3E50;
  --text-light:  #7F8C9B;
  --danger:      #E74C3C;
  --danger-pale: #FFF5F5;
  --success:     #27AE60;
  --success-pale:#F0FFF4;
  --info-pale:   #F0F4FA;

  /* Layout */
  --sidebar-w:   280px;
  --topbar-h:    56px;
  --content-max: 960px;

  /* Tipografía */
  --font-title:  'Playfair Display', Georgia, serif;
  --font-body:   'DM Sans', 'Inter', sans-serif;
  --font-mono:   'Consolas', 'Courier New', monospace;

  /* Radios */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;

  /* Sombras */
  --shadow-card:  0 2px 12px rgba(28,45,79,0.07);
  --shadow-hover: 0 4px 20px rgba(28,45,79,0.12);
  --shadow-badge: 0 3px 10px rgba(28,45,79,0.2);
}

/* ═══════════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════════ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font-body);
  background: var(--navy-light);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT
   ═══════════════════════════════════════════════════════════════ */
.ds-layout {
  display: flex;
  min-height: 100vh;
}

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

.ds-content {
  max-width: var(--content-max);
  width: 100%;
  margin: 0 auto;
  padding: 40px 48px 80px;
}

/* ═══════════════════════════════════════════════════════════════
   SIDEBAR
   ═══════════════════════════════════════════════════════════════ */
.ds-sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: linear-gradient(175deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-mid) 100%);
  overflow-y: auto; z-index: 100;
  display: flex; flex-direction: column;
  border-right: 3px solid var(--gold);
  transition: transform 0.3s ease;
}

.ds-sidebar-header {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(212,137,26,0.25);
  text-align: center;
}

.ds-sidebar-logo {
  width: 56px; height: 56px;
  margin: 0 auto 10px;
}
.ds-sidebar-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
  filter: brightness(1.1);
}

.ds-sidebar-header h2 {
  font-family: var(--font-title);
  color: var(--white); font-size: 17px; font-weight: 700;
  letter-spacing: 0.5px;
}
.ds-sidebar-header .ds-sidebar-sub {
  color: var(--gold-light); font-size: 10px; margin-top: 3px;
  letter-spacing: 1.8px; text-transform: uppercase;
}

/* Navegación sidebar */
.ds-sidebar nav { flex: 1; padding: 12px 0; }

.ds-sidebar .section-label {
  padding: 18px 24px 6px;
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--gold);
  font-weight: 700;
}

.ds-sidebar .nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; color: rgba(255,255,255,0.65);
  text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: all 0.2s; border-left: 3px solid transparent;
  cursor: pointer;
}
.ds-sidebar .nav-item:hover,
.ds-sidebar .nav-item.active {
  color: var(--white); background: rgba(212,137,26,0.1);
  border-left-color: var(--gold);
}
.ds-sidebar .nav-item .nav-icon {
  width: 20px; text-align: center; font-size: 15px;
  opacity: 0.6;
}
.ds-sidebar .nav-item:hover .nav-icon,
.ds-sidebar .nav-item.active .nav-icon { opacity: 1; }

.ds-sidebar .nav-item .badge-soon {
  margin-left: auto;
  font-size: 9px; font-weight: 700;
  background: var(--gold); color: var(--navy-dark);
  padding: 2px 8px; border-radius: 10px;
  letter-spacing: 0.5px;
}

/* Footer sidebar */
.ds-sidebar-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
}
.ds-sidebar-footer .user-name {
  color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 600;
}
.ds-sidebar-footer .user-email {
  color: rgba(255,255,255,0.4); font-size: 10px; margin-top: 2px;
}
.ds-sidebar-footer .btn-logout {
  margin-top: 10px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 6px;
  font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  cursor: pointer; transition: all 0.2s;
}
.ds-sidebar-footer .btn-logout:hover {
  color: var(--danger); background: rgba(231,76,60,0.1);
  border-color: rgba(231,76,60,0.3);
}

/* Mobile toggle */
.ds-sidebar-toggle {
  display: none;
  position: fixed; top: 12px; left: 12px; z-index: 200;
  width: 40px; height: 40px;
  background: var(--navy); color: var(--gold);
  border: 2px solid var(--gold); border-radius: var(--r-sm);
  font-size: 20px; cursor: pointer;
  align-items: center; justify-content: center;
}
.ds-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.5);
}

/* ═══════════════════════════════════════════════════════════════
   TOPBAR
   ═══════════════════════════════════════════════════════════════ */
.ds-topbar {
  background: var(--navy);
  padding: 0 48px;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 100;
}
.ds-topbar h1 {
  font-family: var(--font-title);
  color: var(--white); font-size: 17px; font-weight: 700;
}
.ds-topbar .topbar-badge {
  background: var(--gold); color: var(--navy-dark);
  font-size: 11px; font-weight: 700; padding: 4px 14px;
  border-radius: 20px; letter-spacing: 0.5px;
}
.ds-topbar .topbar-credits {
  display: flex; align-items: center; gap: 8px;
  color: var(--gold-light); font-size: 13px; font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   TYPOGRAPHY
   ═══════════════════════════════════════════════════════════════ */
.ds-title {
  font-family: var(--font-title);
  font-size: 28px; font-weight: 800; color: var(--navy);
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--gold);
  display: inline-block;
}

.ds-subtitle {
  font-size: 18px; font-weight: 700; color: var(--navy-mid);
  margin: 28px 0 12px;
  padding-left: 14px;
  border-left: 4px solid var(--gold);
}

.ds-text { margin: 10px 0; font-size: 15px; }
.ds-text-sm { font-size: 13px; color: var(--text-light); }
.ds-text-gold { color: var(--gold); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════ */
.ds-card {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 24px 28px;
  margin: 16px 0;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(28,45,79,0.06);
  transition: box-shadow 0.2s;
}
.ds-card:hover { box-shadow: var(--shadow-hover); }

.ds-card.highlight {
  border-left: 5px solid var(--gold);
  background: var(--gold-pale);
}
.ds-card.warning {
  border-left: 5px solid var(--danger);
  background: var(--danger-pale);
}
.ds-card.info {
  border-left: 5px solid var(--navy-mid);
  background: var(--info-pale);
}
.ds-card.success {
  border-left: 5px solid var(--success);
  background: var(--success-pale);
}

.ds-card-title {
  font-weight: 700; font-size: 14px; color: var(--navy);
  margin-bottom: 8px; display: flex; align-items: center; gap: 8px;
}

/* ═══════════════════════════════════════════════════════════════
   STEPS (counter CSS)
   ═══════════════════════════════════════════════════════════════ */
.ds-steps { counter-reset: ds-step; }

.ds-step {
  background: var(--white);
  border-radius: var(--r-md);
  padding: 22px 28px 22px 76px;
  margin: 14px 0;
  position: relative;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(28,45,79,0.06);
  transition: box-shadow 0.2s, border-color 0.2s;
}
.ds-step::before {
  counter-increment: ds-step;
  content: counter(ds-step);
  position: absolute; left: 20px; top: 20px;
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  color: var(--gold); font-weight: 800; font-size: 17px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title);
  box-shadow: var(--shadow-badge);
}
.ds-step strong { color: var(--navy); }

.ds-step.active {
  border-color: var(--gold);
  box-shadow: 0 4px 20px rgba(212,137,26,0.15);
}
.ds-step.completed {
  opacity: 0.7;
}
.ds-step.completed::before {
  content: '✓';
  background: var(--success);
  color: var(--white);
}

/* ═══════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════ */
.ds-table {
  width: 100%; border-collapse: collapse;
  margin: 16px 0; font-size: 14px;
  background: var(--white);
  border-radius: 10px; overflow: hidden;
  box-shadow: var(--shadow-card);
}
.ds-table thead th {
  background: var(--navy); color: var(--white);
  padding: 12px 16px; text-align: left;
  font-weight: 600; font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.ds-table tbody td {
  padding: 10px 16px; border-bottom: 1px solid var(--navy-light);
}
.ds-table tbody tr:nth-child(even) { background: #F8FAFD; }
.ds-table tbody tr:hover { background: var(--gold-pale); }

/* ═══════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════ */
.ds-input {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid rgba(28,45,79,0.15);
  border-radius: var(--r-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ds-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,137,26,0.15);
}
.ds-input::placeholder { color: var(--text-light); }

.ds-select {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body); font-size: 14px;
  color: var(--text);
  background: var(--white);
  border: 1.5px solid rgba(28,45,79,0.15);
  border-radius: var(--r-sm);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237F8C9B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.ds-select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(212,137,26,0.15);
}

.ds-label {
  display: block;
  font-size: 13px; font-weight: 600;
  color: var(--navy); margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.ds-field { margin-bottom: 20px; }

.ds-toggle {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; font-size: 14px; color: var(--text);
}
.ds-toggle input[type="checkbox"] {
  width: 44px; height: 24px;
  -webkit-appearance: none; appearance: none;
  background: rgba(28,45,79,0.15);
  border-radius: 12px; position: relative;
  cursor: pointer; transition: background 0.2s;
}
.ds-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.ds-toggle input[type="checkbox"]:checked {
  background: var(--gold);
}
.ds-toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.ds-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 28px;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm);
  border: none; cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.ds-btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #C17A15 100%);
  color: var(--white);
  box-shadow: 0 3px 12px rgba(212,137,26,0.3);
}
.ds-btn-primary:hover {
  box-shadow: 0 5px 20px rgba(212,137,26,0.4);
  transform: translateY(-1px);
}
.ds-btn-primary:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
  box-shadow: none;
}

.ds-btn-secondary {
  background: var(--white);
  color: var(--navy); border: 1.5px solid var(--navy);
}
.ds-btn-secondary:hover {
  background: var(--navy); color: var(--white);
}

.ds-btn-ghost {
  background: transparent;
  color: var(--text-light);
  padding: 8px 16px;
}
.ds-btn-ghost:hover {
  color: var(--navy); background: rgba(28,45,79,0.05);
}

.ds-btn-sm {
  padding: 8px 18px; font-size: 13px;
}
.ds-btn-lg {
  padding: 16px 36px; font-size: 16px;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.ds-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.3px;
}
.ds-badge-gold   { background: var(--gold-pale); color: var(--gold); }
.ds-badge-navy   { background: var(--info-pale); color: var(--navy); }
.ds-badge-green  { background: var(--success-pale); color: var(--success); }
.ds-badge-red    { background: var(--danger-pale); color: var(--danger); }

/* ═══════════════════════════════════════════════════════════════
   DROP ZONE
   ═══════════════════════════════════════════════════════════════ */
.ds-dropzone {
  border: 2px dashed rgba(28,45,79,0.2);
  border-radius: var(--r-lg);
  padding: 48px 32px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: var(--white);
}
.ds-dropzone:hover,
.ds-dropzone.dragover {
  border-color: var(--gold);
  background: var(--gold-pale);
  box-shadow: 0 0 0 4px rgba(212,137,26,0.08);
}
.ds-dropzone .drop-icon {
  font-size: 48px; margin-bottom: 12px;
  color: var(--gold); opacity: 0.7;
}
.ds-dropzone .drop-title {
  font-family: var(--font-title);
  font-size: 18px; color: var(--navy); font-weight: 700;
}
.ds-dropzone .drop-sub {
  font-size: 13px; color: var(--text-light); margin-top: 6px;
}

/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR
   ═══════════════════════════════════════════════════════════════ */
.ds-progress {
  width: 100%; height: 8px;
  background: rgba(28,45,79,0.08);
  border-radius: 4px; overflow: hidden;
}
.ds-progress-bar {
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 4px;
  transition: width 0.5s ease;
}
.is-hidden { display: none; }

/* ═══════════════════════════════════════════════════════════════
   WIZARD (step progress bar horizontal)
   ═══════════════════════════════════════════════════════════════ */
.ds-wizard-bar {
  display: flex; align-items: center;
  margin-bottom: 32px; padding: 0 16px;
}
.ds-wizard-step {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  color: var(--text-light);
  transition: color 0.2s;
}
.ds-wizard-step.active { color: var(--gold); }
.ds-wizard-step.done { color: var(--success); }

.ds-wizard-step .wiz-num {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-title); font-size: 14px; font-weight: 800;
  background: rgba(28,45,79,0.08); color: var(--text-light);
  transition: all 0.2s;
}
.ds-wizard-step.active .wiz-num {
  background: var(--gold); color: var(--white);
  box-shadow: 0 2px 10px rgba(212,137,26,0.3);
}
.ds-wizard-step.done .wiz-num {
  background: var(--success); color: var(--white);
}

.ds-wizard-line {
  flex: 1; height: 2px;
  background: rgba(28,45,79,0.1);
  margin: 0 12px;
}
.ds-wizard-line.done { background: var(--success); }

/* ═══════════════════════════════════════════════════════════════
   DOCUMENT CARD (for classified PDFs)
   ═══════════════════════════════════════════════════════════════ */
.ds-doc-card {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 20px;
  background: var(--white);
  border-radius: var(--r-md);
  border: 1px solid rgba(28,45,79,0.06);
  box-shadow: var(--shadow-card);
  margin: 8px 0;
  transition: all 0.2s;
}
.ds-doc-card:hover { box-shadow: var(--shadow-hover); }

.ds-doc-icon {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--gold); font-size: 20px;
  flex-shrink: 0;
}

.ds-doc-info { flex: 1; min-width: 0; }
.ds-doc-name {
  font-weight: 600; font-size: 14px; color: var(--navy);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ds-doc-meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }

.ds-doc-type {
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   SPINNER
   ═══════════════════════════════════════════════════════════════ */
.ds-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(28,45,79,0.1);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: ds-spin 0.7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

.ds-spinner-lg { width: 40px; height: 40px; border-width: 3.5px; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
  .ds-sidebar {
    transform: translateX(-100%);
  }
  .ds-sidebar.open {
    transform: translateX(0);
  }
  .ds-sidebar-backdrop.open {
    display: block;
  }
  .ds-sidebar-toggle {
    display: flex;
  }
  .ds-main {
    margin-left: 0;
  }
  .ds-topbar {
    padding: 0 16px 0 56px;
  }
  .ds-content {
    padding: 24px 20px 60px;
  }
}

@media (max-width: 680px) {
  .ds-wizard-step span:not(.wiz-num) { display: none; }
  .ds-wizard-step .wiz-num { width: 26px; height: 26px; font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════
   SCROLLBAR
   ═══════════════════════════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--navy-light); }
::-webkit-scrollbar-thumb { background: var(--gold); border-radius: 3px; }

/* ═══════════════════════════════════════════════════════════════
   UTILITIES
   ═══════════════════════════════════════════════════════════════ */
.ds-flex { display: flex; }
.ds-flex-col { display: flex; flex-direction: column; }
.ds-gap-sm { gap: 8px; }
.ds-gap-md { gap: 16px; }
.ds-gap-lg { gap: 24px; }
.ds-items-center { align-items: center; }
.ds-justify-between { justify-content: space-between; }
.ds-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ds-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.ds-mt-sm { margin-top: 8px; }
.ds-mt-md { margin-top: 16px; }
.ds-mt-lg { margin-top: 32px; }
.ds-mb-0  { margin-bottom: 0; }
.ds-mb-xs { margin-bottom: 4px; }
.ds-mb-sm { margin-bottom: 8px; }
.ds-mb-md { margin-bottom: 16px; }
.ds-mb-12 { margin-bottom: 12px; }
.ds-mb-20 { margin-bottom: 20px; }
.ds-mb-24 { margin-bottom: 24px; }
.ds-mb-28 { margin-bottom: 28px; }
.ds-mb-lg { margin-bottom: 32px; }
.ds-ml-sm { margin-left: 8px; }
.ds-ml-md { margin-left: 16px; }
.ds-hidden { display: none !important; }
.ds-text-center { text-align: center; }
.ds-text-right  { text-align: right; }
.ds-text-italic { font-style: italic; }
.ds-w-full { width: 100%; }
.ds-overflow-x-auto { overflow-x: auto; }
.ds-icon-gold { color: var(--gold); }
.ds-icon-navy { color: var(--navy); }

/* Tipografía utility (tamaños + peso) */
.ds-text-xs   { font-size: 12px; }
.ds-text-lg   { font-size: 18px; }
.ds-text-xl   { font-size: 22px; }
.ds-text-2xl  { font-size: 32px; line-height: 1.1; }
.ds-font-bold { font-weight: 700; }

/* Tints semánticos para texto (consistentes con paleta del DS) */
.ds-text-gray-400 { color: var(--text-light); opacity: 0.7; }
.ds-text-gray-500 { color: var(--text-light); }
.ds-text-gray-600 { color: var(--text-light); }
.ds-text-gray-700 { color: var(--text); }
.ds-text-amber-600 { color: #B45309; }
.ds-text-green-600 { color: var(--success); }
.ds-text-red-600   { color: var(--danger); }

/* Pricing / token cards */
.ds-price-value {
  font-family: var(--font-title);
  font-size: 36px; font-weight: 800;
  color: var(--gold); margin: 12px 0;
}
.ds-price-value span { font-size: 18px; }
.ds-card.featured { border: 2px solid var(--gold); }
.ds-card-title.centered { justify-content: center; }

@media (max-width: 680px) {
  .ds-grid-2 { grid-template-columns: 1fr; }
  .ds-grid-3 { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   APP.HTML — INLINE STYLE REPLACEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Topbar: badge de tier + CTA de upgrade
   El badge y el CTA arrancan ocultos; JS los muestra cambiando .style.display
   directamente (inline style gana sobre la clase, por eso evitamos !important). */
.topbar-tier-badge { display: none; }
.topbar-upgrade-cta { display: none; }

/* Stat cards — variantes de icono y card destacada */
.stat-card--featured { border-left: 4px solid var(--gold); }
.stat-icon--gold    { background: var(--gold-pale);    color: var(--gold); }
.stat-icon--info    { background: var(--info-pale);    color: var(--navy); }
.stat-icon--success { background: var(--success-pale); color: var(--success); }
.stat-value--online { color: var(--success); font-size: 24px; }

/* Card paddings semánticos para el dashboard */
.ds-card--p28 { padding: 28px; }
.ds-card--p32 { padding: 32px; }
.ds-card--p16 { padding: 16px 20px; }

/* Tamaño extra-pequeño para botones ghost del header de actividad */
.ds-btn--xs { padding: 6px 12px; font-size: 12px; }

/* Variante de botón ghost peligro (texto rojo) */
.ds-btn-ghost--danger { color: var(--danger); }

/* Botón a ancho completo */
.ds-btn--block { width: 100%; }

/* Support card (dashboard inferior derecho) */
.support-card { padding: 32px; position: relative; overflow: hidden; }
.support-card__body { position: relative; z-index: 1; }
.support-card__title {
  font-family: var(--font-title);
  font-size: 20px; font-weight: 800;
  color: var(--navy);
  margin-bottom: 8px;
}
.support-card__decoration {
  position: absolute;
  bottom: -20px; right: -20px;
  font-size: 140px;
  opacity: 0.06;
  color: var(--navy);
}

/* Processor (legacy) — controles del Resumen de Carga */
.processor-engine-desc { padding: 14px 18px; }
.processor-resumen-divider {
  border-top: 1px solid rgba(28,45,79,0.08);
  padding-top: 20px;
  margin-top: 20px;
}
.processor-cost-label {
  text-transform: uppercase;
  letter-spacing: 1px;
}
.processor-cost-value {
  font-family: var(--font-title);
  font-weight: 800;
  color: var(--gold);
  font-size: 18px;
}

/* Toggle "Modo lote" del Resumen de Carga */
.processor-modo-lote {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: #f0f9ff;
  border: 1px solid #38bdf8;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 12px;
}
.processor-modo-lote__check { margin-top: 3px; }
.processor-modo-lote__text {
  font-size: 12px;
  color: var(--navy);
  line-height: 1.4;
}
.processor-modo-lote__icon { color: #0284c7; }

/* Aviso de seguridad (sidebar del procesador) */
.security-notice__title {
  font-size: 11px;
  font-weight: 700;
  color: var(--danger);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Estado vacío del hub de seguimiento */
.hub-empty { text-align: center; padding: 48px 32px; }
.hub-empty--sm { text-align: center; padding: 32px; }
.hub-empty__icon {
  font-size: 40px;
  color: var(--gold);
  opacity: 0.4;
  margin-bottom: 16px;
  display: block;
}

/* Credits view — hero (saldo grande) */
.credits-hero__icon {
  font-size: 48px;
  color: var(--gold);
  margin-bottom: 8px;
  display: block;
}

/* Cargando dentro de la tabla de créditos */
.ds-table__loading-row {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-style: italic;
}

/* Account view */
.account-card { max-width: 640px; padding: 32px; }
.account-card__name {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
}
.account-card__section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  margin-bottom: 10px;
}
.account-card__divider {
  border-top: 1px solid rgba(28,45,79,0.08);
  padding-top: 20px;
}

/* Fallback de icono en el header del chat cuando el SVG no carga */
.chat-header-avatar__fallback {
  color: var(--gold);
  font-size: 18px;
}

/* ═══════════════════════════════════════════════════════════════
   UPLOAD.HTML — INLINE STYLE REPLACEMENTS
   ═══════════════════════════════════════════════════════════════ */

/* Lead text del header con ajuste negativo (cae más cerca del título) */
.upload-intro { margin-top: -4px; margin-bottom: 28px; }

/* Banner "TOTAL ESTIMADO" del paso 3 */
.upload-total-banner {
  padding: 16px 20px;
  background: var(--gold-pale);
  border-radius: var(--r-md);
}
.upload-total-label {
  font-weight: 700;
  color: var(--navy);
  font-size: 16px;
}
.upload-total-value {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 800;
  color: var(--gold);
}

/* Tarjeta toggle "Modo lote — un solo correo con ZIP" */
.upload-lote-card {
  padding: 14px 18px;
  background: #f0f9ff;
  border: 1px solid #38bdf8;
  border-radius: var(--r-md);
}
.upload-lote-label { cursor: pointer; }
.upload-lote-check {
  margin-top: 3px;
  transform: scale(1.2);
}
.upload-lote-body { flex: 1; }
.upload-lote-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 14px;
}
.upload-lote-icon { color: #0284c7; }
.upload-lote-desc {
  font-size: 12px;
  color: var(--text-light);
  margin-top: 4px;
}
.upload-lote-pref-hint { font-style: italic; }
.upload-lote-recordar-label {
  font-size: 11px;
  color: var(--text-light);
  cursor: pointer;
}
.upload-lote-recordar-check { margin-right: 4px; }

/* Pie informativo bajo los botones del paso 3 */
.upload-justify-end { justify-content: flex-end; }
.upload-foot-note { color: var(--text-light); }

/* Modal de procesamiento */
.upload-modal-spinner { margin: 0 auto 16px; }
.upload-modal-status {
  font-family: var(--font-title);
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}
.upload-modal-file { color: var(--text-light); }
.upload-modal-percent {
  font-weight: 700;
  color: var(--gold);
}
