/* ==========================================================================
   PORTAL DE SOLICITUDES - SEMCO COSMETICS
   Diseño UX Premium: Encuesta por Niveles Asistida (Conversational Wizard),
   Integración Nativa con Sistemas de Diseño Compartidos (disenos/),
   Tipografías Dinámicas, Glassmorphism y Micro-animaciones.
   ========================================================================== */

/* Variables Base Dinámicas (Conectadas al Sistema de Diseño Activo) */
:root {
  /* Mapeo con fallback inteligente */
  --bg-page: var(--background, #f8fafc);
  --bg-card: var(--card, #ffffff);
  --bg-card-sub: var(--muted, #f1f5f9);
  --bg-glass: rgba(255, 255, 255, 0.88);
  --bg-glass-subtle: rgba(255, 255, 255, 0.6);
  
  --text-main: var(--foreground, #0f172a);
  --text-muted: var(--muted-foreground, #64748b);
  --border-color: var(--border, #e2e8f0);
  
  --primary: var(--primary, #00b4d8);
  --primary-hover: var(--primary-hover, #0096c7);
  --primary-foreground: var(--primary-foreground, #ffffff);
  --primary-glow: rgba(0, 180, 216, 0.28);
  --primary-gradient: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  
  --accent-purple: #7c3aed;
  --purple-glow: rgba(124, 58, 237, 0.25);
  
  --danger: #ef4444;
  --warning: #f59e0b;
  --success: #10b981;
  --info: #3b82f6;
  
  --font-sans: var(--font-sans, 'Inter', -apple-system, sans-serif);
  --font-heading: var(--font-heading, 'Outfit', 'Inter', sans-serif);
  --font-mono: var(--font-mono, 'JetBrains Mono', monospace);
  
  --radius-sm: var(--radius-sm, 8px);
  --radius-md: var(--radius-md, 14px);
  --radius-lg: var(--radius-lg, 22px);
  --radius-full: 9999px;
  
  --shadow-sm: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
  --shadow-md: var(--shadow-md, 0 8px 24px -4px rgba(0, 0, 0, 0.07));
  --shadow-lg: var(--shadow-lg, 0 18px 40px -6px rgba(0, 0, 0, 0.12));
  --shadow-glow: 0 0 20px var(--primary-glow);
}

/* Modo Oscuro Nativo */
[data-theme="dark"] {
  --bg-page: #0b0f19;
  --bg-card: #141c2e;
  --bg-card-sub: #1b263b;
  --bg-glass: rgba(20, 28, 46, 0.88);
  --bg-glass-subtle: rgba(20, 28, 46, 0.6);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #27354f;
  --primary-glow: rgba(0, 180, 216, 0.4);
}

/* ==========================================================================
   ADAPTACIONES BESPOKE PARA TEMAS COMPARTIDOS (disenos/)
   ========================================================================== */

/* 1. CyberPop (Pop-Art Retro Cream & Bold Yellow/Red) */
[data-theme="cyberpop"] {
  --bg-page: #FFF4F0;
  --bg-card: #FFFFFF;
  --bg-card-sub: #FFF0EB;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --text-main: #2D1E2F;
  --text-muted: #8E8390;
  --border-color: rgba(240, 90, 91, 0.35);
  --primary: #E69500;
  --primary-hover: #FFC436;
  --primary-foreground: #2D1E2F;
  --font-sans: 'Fredoka', sans-serif;
  --font-heading: 'Fredoka One', cursive;
  --shadow-md: 4px 4px 0px rgba(240, 90, 91, 0.22);
  --shadow-lg: 6px 6px 0px rgba(240, 90, 91, 0.25);
}

[data-theme="cyberpop"] .level-card,
[data-theme="cyberpop"] .choice-card,
[data-theme="cyberpop"] .kpi-box,
[data-theme="cyberpop"] .toolbar-card,
[data-theme="cyberpop"] .table-card,
[data-theme="cyberpop"] .packaging-item-card,
[data-theme="cyberpop"] .phase-card-box,
[data-theme="cyberpop"] .pres-card-interactive,
[data-theme="cyberpop"] .slot-survey-card,
[data-theme="cyberpop"] .summary-proforma-card,
[data-theme="cyberpop"] .modal-card {
  border: 2px solid rgba(240, 90, 91, 0.35) !important;
  box-shadow: 4px 4px 0px rgba(240, 90, 91, 0.18) !important;
  background-color: #FFFFFF !important;
}

[data-theme="cyberpop"] .search-box {
  background: #FFF0EB !important;
  border: 2px solid rgba(240, 90, 91, 0.35) !important;
}

[data-theme="cyberpop"] .sol-data-table th {
  background: #FFF0EB !important;
  border-bottom: 2px solid #F05A5B !important;
  color: #2D1E2F !important;
  font-family: 'Fredoka One', cursive !important;
}

[data-theme="cyberpop"] .sol-data-table td {
  border-bottom: 1px solid rgba(240, 90, 91, 0.2) !important;
  color: #2D1E2F !important;
}

[data-theme="cyberpop"] .choice-card.selected,
[data-theme="cyberpop"] .quick-chip-btn.active,
[data-theme="cyberpop"] .toggle-pill-card.active {
  border-color: #F05A5B !important;
  background: #FFF0EB !important;
  box-shadow: 3px 3px 0px #F05A5B !important;
}

/* 2. Sakura (Sumi-e & Papel Washi Japonés) */
[data-theme="sakura"] {
  --bg-page: #f7eee7;
  --bg-card: #fffdfa;
  --bg-card-sub: #f6e8ec;
  --bg-glass: rgba(255, 253, 250, 0.94);
  --text-main: #34272c;
  --text-muted: #7d6d70;
  --border-color: rgba(169, 87, 112, 0.45);
  --primary: #a95770;
  --primary-hover: #91455d;
  --primary-foreground: #fffaf7;
  --font-sans: 'Nunito', sans-serif;
  --font-heading: 'Cormorant Garamond', serif;
  --shadow-md: 0 4px 16px rgba(86, 49, 63, 0.08), 2px 3px 0 rgba(169, 87, 112, 0.18);
}

[data-theme="sakura"] .kpi-box,
[data-theme="sakura"] .toolbar-card,
[data-theme="sakura"] .table-card,
[data-theme="sakura"] .level-card,
[data-theme="sakura"] .choice-card,
[data-theme="sakura"] .packaging-item-card,
[data-theme="sakura"] .phase-card-box,
[data-theme="sakura"] .pres-card-interactive,
[data-theme="sakura"] .slot-survey-card,
[data-theme="sakura"] .summary-proforma-card,
[data-theme="sakura"] .modal-card {
  background: #fffdfa !important;
  border: 1.5px solid rgba(169, 87, 112, 0.45) !important;
  box-shadow: 0 4px 16px rgba(86, 49, 63, 0.08), 2px 3px 0 rgba(169, 87, 112, 0.18) !important;
  border-radius: 12px !important;
}

[data-theme="sakura"] .search-box {
  background: #fffdfa !important;
  border: 1.5px solid rgba(169, 87, 112, 0.45) !important;
}

[data-theme="sakura"] .kpi-number {
  color: #56313f !important;
  font-family: var(--font-heading) !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
}

[data-theme="sakura"] .sol-data-table {
  background: #fffdfa !important;
}

[data-theme="sakura"] .sol-data-table th {
  background: #f7e6ea !important;
  color: #56313f !important;
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  font-size: 0.84rem !important;
  letter-spacing: 0.04em !important;
  border-bottom: 2px solid #a95770 !important;
}

[data-theme="sakura"] .sol-data-table td {
  border-bottom: 1px solid rgba(169, 87, 112, 0.22) !important;
  color: #34272c !important;
}

[data-theme="sakura"] .sol-data-table tr:hover td {
  background: #faedf0 !important;
}

[data-theme="sakura"] .search-input,
[data-theme="sakura"] .filter-select,
[data-theme="sakura"] .status-select,
[data-theme="sakura"] .form-input-stylish,
[data-theme="sakura"] .select-unit {
  background: #fffdfa !important;
  border: 1.5px solid rgba(169, 87, 112, 0.45) !important;
  color: #34272c !important;
}

[data-theme="sakura"] .search-input:focus,
[data-theme="sakura"] .filter-select:focus,
[data-theme="sakura"] .form-input-stylish:focus {
  border-color: #a95770 !important;
  box-shadow: 0 0 0 3px rgba(169, 87, 112, 0.2) !important;
}

[data-theme="sakura"] .choice-card.selected,
[data-theme="sakura"] .quick-chip-btn.active {
  background: #faebee !important;
  border-color: #a95770 !important;
  color: #56313f !important;
}

/* 3. Premium (Terciopelo Vino, Obsidiana y Oro) */
[data-theme="premium"] {
  --bg-page: #110e12;
  --bg-card: #191419;
  --bg-card-sub: rgba(75, 27, 46, 0.35);
  --bg-glass: rgba(25, 20, 25, 0.94);
  --text-main: #f2eadc;
  --text-muted: #c3b5ad;
  --border-color: rgba(197, 163, 101, 0.32);
  --primary: #c5a365;
  --primary-hover: #dfc58d;
  --primary-foreground: #110e12;
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Cormorant Garamond', serif;
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="premium"] .level-card,
[data-theme="premium"] .choice-card,
[data-theme="premium"] .kpi-box,
[data-theme="premium"] .toolbar-card,
[data-theme="premium"] .table-card,
[data-theme="premium"] .packaging-item-card,
[data-theme="premium"] .phase-card-box,
[data-theme="premium"] .pres-card-interactive,
[data-theme="premium"] .slot-survey-card,
[data-theme="premium"] .summary-proforma-card,
[data-theme="premium"] .modal-card {
  background: #191419 !important;
  border: 1px solid rgba(197, 163, 101, 0.32) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

[data-theme="premium"] .search-box {
  background: #191419 !important;
  border: 1px solid rgba(197, 163, 101, 0.32) !important;
}

[data-theme="premium"] .sol-data-table th {
  background: rgba(75, 27, 46, 0.45) !important;
  border-bottom: 2px solid #c5a365 !important;
  color: #f2eadc !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 0.95rem !important;
}

[data-theme="premium"] .sol-data-table td {
  border-bottom: 1px solid rgba(197, 163, 101, 0.2) !important;
  color: #f2eadc !important;
}

[data-theme="premium"] .sol-data-table tr:hover td {
  background: rgba(75, 27, 46, 0.25) !important;
}

[data-theme="premium"] .choice-card.selected,
[data-theme="premium"] .quick-chip-btn.active {
  border-color: #c5a365 !important;
  background: rgba(75, 27, 46, 0.55) !important;
  color: #f2eadc !important;
}

/* 4. Natural (Jardín Ilustrado & Cálido) */
[data-theme="natural"] {
  --bg-page: #fff9ec;
  --bg-card: #fffdf7;
  --bg-card-sub: #f1f4e7;
  --bg-glass: rgba(255, 253, 247, 0.94);
  --text-main: #2f4035;
  --text-muted: #657267;
  --border-color: rgba(72, 111, 75, 0.3);
  --primary: #5d895d;
  --primary-hover: #426b49;
  --primary-foreground: #fffdf7;
  --font-sans: 'Nunito', sans-serif;
  --font-heading: 'Patrick Hand', cursive;
  --shadow-md: 3px 4px 0 rgba(47, 64, 53, 0.14);
}

[data-theme="natural"] .kpi-box,
[data-theme="natural"] .toolbar-card,
[data-theme="natural"] .table-card,
[data-theme="natural"] .level-card,
[data-theme="natural"] .choice-card,
[data-theme="natural"] .packaging-item-card,
[data-theme="natural"] .phase-card-box,
[data-theme="natural"] .pres-card-interactive,
[data-theme="natural"] .slot-survey-card,
[data-theme="natural"] .summary-proforma-card,
[data-theme="natural"] .modal-card {
  background: #fffdf7 !important;
  border: 1.5px solid rgba(72, 111, 75, 0.45) !important;
  box-shadow: 3px 4px 0 rgba(47, 64, 53, 0.14) !important;
  border-radius: 14px 10px 15px 11px !important;
}

[data-theme="natural"] .kpi-number {
  color: #2f4035 !important;
  font-family: var(--font-heading) !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
}

[data-theme="natural"] .sol-data-table {
  background: #fffdf7 !important;
}

[data-theme="natural"] .sol-data-table th {
  background: #eaf1e1 !important;
  color: #2f4035 !important;
  font-family: var(--font-heading) !important;
  font-weight: 800 !important;
  font-size: 0.95rem !important;
  letter-spacing: 0.03em !important;
  border-bottom: 2px solid #5d895d !important;
}

[data-theme="natural"] .sol-data-table td {
  border-bottom: 1px solid rgba(72, 111, 75, 0.22) !important;
  color: #2f4035 !important;
}

[data-theme="natural"] .sol-data-table tr:hover td {
  background: #f4f8ec !important;
}

[data-theme="natural"] .search-box {
  background: #fffdf7 !important;
  border: 1.5px solid rgba(72, 111, 75, 0.45) !important;
}

[data-theme="natural"] .search-input,
[data-theme="natural"] .filter-select,
[data-theme="natural"] .status-select,
[data-theme="natural"] .form-input-stylish,
[data-theme="natural"] .select-unit {
  background: #fffdf7 !important;
  border: 1.5px solid rgba(72, 111, 75, 0.45) !important;
  color: #2f4035 !important;
}

[data-theme="natural"] .search-input:focus,
[data-theme="natural"] .filter-select:focus,
[data-theme="natural"] .form-input-stylish:focus {
  border-color: #5d895d !important;
  box-shadow: 0 0 0 3px rgba(93, 137, 93, 0.2) !important;
}

[data-theme="natural"] .choice-card.selected,
[data-theme="natural"] .quick-chip-btn.active {
  background: #eaf1e1 !important;
  border-color: #5d895d !important;
  color: #2f4035 !important;
}

/* 5. Boceto (Cuaderno Rayado Cómic) */
[data-theme="boceto"] {
  --bg-page: #FFFDF7;
  --bg-card: #FFFFFF;
  --bg-card-sub: #FFF4EA;
  --bg-glass: rgba(255, 255, 255, 0.94);
  --text-main: #211A15;
  --text-muted: #665A52;
  --border-color: #211A15;
  --primary: #FF7D00;
  --primary-hover: #E66F00;
  --primary-foreground: #FFFFFF;
  --font-sans: 'Patrick Hand', cursive;
  --font-heading: 'Patrick Hand', cursive;
  --shadow-md: 4px 4px 0px rgba(33, 26, 21, 1);
}

[data-theme="boceto"] .level-card,
[data-theme="boceto"] .choice-card,
[data-theme="boceto"] .kpi-box,
[data-theme="boceto"] .toolbar-card,
[data-theme="boceto"] .table-card,
[data-theme="boceto"] .packaging-item-card,
[data-theme="boceto"] .phase-card-box,
[data-theme="boceto"] .pres-card-interactive,
[data-theme="boceto"] .slot-survey-card,
[data-theme="boceto"] .summary-proforma-card,
[data-theme="boceto"] .modal-card {
  background: #FFFFFF !important;
  border: 2px solid #211A15 !important;
  box-shadow: 4px 4px 0px #211A15 !important;
}

[data-theme="boceto"] .search-box {
  background: #FFFFFF !important;
  border: 2px solid #211A15 !important;
}

[data-theme="boceto"] .sol-data-table th {
  background: #FFF4EA !important;
  border-bottom: 2px solid #211A15 !important;
  color: #211A15 !important;
  font-family: 'Patrick Hand', cursive !important;
  font-weight: 800 !important;
}

[data-theme="boceto"] .sol-data-table td {
  border-bottom: 1px solid #211A15 !important;
  color: #211A15 !important;
}

/* 6. Plano Técnico (Blueprint & Grid) */
[data-theme="plano"] {
  --bg-page: #0f172a;
  --bg-card: #1e293b;
  --bg-card-sub: #334155;
  --bg-glass: rgba(30, 41, 59, 0.92);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(56, 189, 248, 0.35);
  --primary: #38bdf8;
  --primary-hover: #0284c7;
  --primary-foreground: #0f172a;
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'JetBrains Mono', monospace;
}

[data-theme="plano"] .kpi-box,
[data-theme="plano"] .toolbar-card,
[data-theme="plano"] .table-card,
[data-theme="plano"] .level-card,
[data-theme="plano"] .choice-card,
[data-theme="plano"] .packaging-item-card,
[data-theme="plano"] .phase-card-box,
[data-theme="plano"] .pres-card-interactive,
[data-theme="plano"] .slot-survey-card,
[data-theme="plano"] .summary-proforma-card,
[data-theme="plano"] .modal-card {
  background: #1e293b !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  box-shadow: 0 4px 20px rgba(0, 240, 255, 0.08) !important;
}

[data-theme="plano"] .search-box {
  background: #1e293b !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
}

[data-theme="plano"] .sol-data-table th {
  background: #334155 !important;
  border-bottom: 2px solid #38bdf8 !important;
  color: #70E1FF !important;
  font-family: 'JetBrains Mono', monospace !important;
}

[data-theme="plano"] .sol-data-table td {
  border-bottom: 1px solid rgba(56, 189, 248, 0.2) !important;
  color: #f8fafc !important;
}

[data-theme="plano"] .sol-data-table tr:hover td {
  background: rgba(56, 189, 248, 0.1) !important;
}

/* 7. Recorrido Ciudad (Metrópolis & Crepúsculo Urbano) */
[data-theme="ciudad"] {
  --bg-page: #091322;
  --bg-card: rgba(16, 28, 48, 0.92);
  --bg-card-sub: rgba(22, 38, 64, 0.95);
  --bg-glass: rgba(16, 28, 48, 0.88);
  --text-main: #f8fafc;
  --text-muted: #8da4c4;
  --border-color: rgba(158, 217, 221, 0.28);
  --primary: #fa927f;
  --primary-hover: #ff7b63;
  --primary-foreground: #091322;
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --shadow-md: 0 12px 36px rgba(5, 12, 24, 0.55);
}

[data-theme="ciudad"] .kpi-box,
[data-theme="ciudad"] .toolbar-card,
[data-theme="ciudad"] .table-card,
[data-theme="ciudad"] .level-card,
[data-theme="ciudad"] .choice-card,
[data-theme="ciudad"] .packaging-item-card,
[data-theme="ciudad"] .phase-card-box,
[data-theme="ciudad"] .pres-card-interactive,
[data-theme="ciudad"] .slot-survey-card,
[data-theme="ciudad"] .summary-proforma-card,
[data-theme="ciudad"] .modal-card {
  background: rgba(16, 28, 48, 0.92) !important;
  border: 1.5px solid rgba(158, 217, 221, 0.3) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border-radius: 14px !important;
}

[data-theme="ciudad"] .kpi-number {
  color: #ffffff !important;
  font-family: var(--font-heading) !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  text-shadow: 0 0 12px rgba(56, 189, 248, 0.35) !important;
}

[data-theme="ciudad"] .sol-data-table {
  background: transparent !important;
}

[data-theme="ciudad"] .sol-data-table th {
  background: rgba(22, 38, 64, 0.96) !important;
  border-bottom: 2px solid rgba(56, 189, 248, 0.55) !important;
  color: #9ed9dd !important;
  font-family: var(--font-heading) !important;
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
}

[data-theme="ciudad"] .sol-data-table td {
  border-bottom: 1px solid rgba(158, 217, 221, 0.15) !important;
  color: #cbd5e1 !important;
}

[data-theme="ciudad"] .sol-data-table tr:hover td {
  background: rgba(30, 52, 86, 0.55) !important;
  color: #ffffff !important;
}

[data-theme="ciudad"] .search-box {
  background: rgba(9, 17, 30, 0.92) !important;
  border: 1.5px solid rgba(158, 217, 221, 0.35) !important;
}

[data-theme="ciudad"] .search-input,
[data-theme="ciudad"] .filter-select,
[data-theme="ciudad"] .status-select,
[data-theme="ciudad"] .form-input-stylish,
[data-theme="ciudad"] .select-unit {
  background: rgba(9, 17, 30, 0.92) !important;
  border: 1.5px solid rgba(158, 217, 221, 0.3) !important;
  color: #ffffff !important;
}

[data-theme="ciudad"] .search-input:focus,
[data-theme="ciudad"] .filter-select:focus,
[data-theme="ciudad"] .form-input-stylish:focus {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.25) !important;
}

[data-theme="ciudad"] .choice-card.selected,
[data-theme="ciudad"] .quick-chip-btn.active {
  background: rgba(250, 146, 127, 0.2) !important;
  border-color: #fa927f !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(250, 146, 127, 0.3) !important;
}

/* 8. Frosted Paper (Clinical Blueprint & High-Tech Minimal) */
[data-theme="frosted"] {
  --bg-page: #f4f6f8;
  --bg-card: rgba(255, 255, 255, 0.88);
  --bg-card-sub: rgba(240, 244, 248, 0.9);
  --bg-glass: rgba(255, 255, 255, 0.85);
  --text-main: #0a0a0a;
  --text-muted: #525252;
  --border-color: #0a0a0a;
  --primary: #0a0a0a;
  --primary-hover: #262626;
  --primary-foreground: #ffffff;
  --font-sans: 'Inter', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
}

[data-theme="frosted"] .level-card,
[data-theme="frosted"] .choice-card,
[data-theme="frosted"] .kpi-box,
[data-theme="frosted"] .toolbar-card,
[data-theme="frosted"] .table-card,
[data-theme="frosted"] .packaging-item-card,
[data-theme="frosted"] .phase-card-box,
[data-theme="frosted"] .pres-card-interactive,
[data-theme="frosted"] .slot-survey-card,
[data-theme="frosted"] .summary-proforma-card,
[data-theme="frosted"] .modal-card {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1.5px solid #0a0a0a !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

[data-theme="frosted"] .search-box {
  background: #ffffff !important;
  border: 1.5px solid #0a0a0a !important;
  border-radius: 4px !important;
}

[data-theme="frosted"] .sol-data-table th {
  background: #f0f4f8 !important;
  border-bottom: 2px solid #0a0a0a !important;
  color: #0a0a0a !important;
  font-family: 'JetBrains Mono', monospace !important;
  font-size: 0.82rem !important;
  text-transform: uppercase !important;
}

[data-theme="frosted"] .sol-data-table td {
  border-bottom: 1px solid rgba(10, 10, 10, 0.12) !important;
  color: #0a0a0a !important;
}

[data-theme="frosted"] .sol-data-table tr:hover td {
  background: rgba(14, 165, 233, 0.06) !important;
}

[data-theme="frosted"] .choice-card.selected,
[data-theme="frosted"] .quick-chip-btn.active,
[data-theme="frosted"] .toggle-pill-card.active {
  border-color: #0a0a0a !important;
  background: #e2e8f0 !important;
  color: #0a0a0a !important;
  box-shadow: 0 0 0 2px #0a0a0a !important;
}

/* 9. Slush (Inflatable Bubblegum Sticker Universe) */
[data-theme="slush"] {
  --bg-page: #dceeff;
  --bg-card: #ffffff;
  --bg-card-sub: #f0f7ff;
  --bg-glass: rgba(255, 255, 255, 0.95);
  --text-main: #000000;
  --text-muted: #4b5563;
  --border-color: #000000;
  --primary: #fb4903;
  --primary-hover: #e03f00;
  --primary-foreground: #ffffff;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --shadow-md: 0 6px 0 #000000;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
}

[data-theme="slush"] .level-card,
[data-theme="slush"] .choice-card,
[data-theme="slush"] .kpi-box,
[data-theme="slush"] .toolbar-card,
[data-theme="slush"] .table-card,
[data-theme="slush"] .packaging-item-card,
[data-theme="slush"] .phase-card-box,
[data-theme="slush"] .pres-card-interactive,
[data-theme="slush"] .slot-survey-card,
[data-theme="slush"] .summary-proforma-card,
[data-theme="slush"] .modal-card {
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 20px !important;
  box-shadow: 0 6px 0 #000000 !important;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease !important;
}

[data-theme="slush"] .choice-card:hover,
[data-theme="slush"] .kpi-box:hover {
  transform: translateY(-3px) scale(1.02) !important;
  box-shadow: 0 8px 0 #000000 !important;
}

[data-theme="slush"] .choice-card.selected,
[data-theme="slush"] .quick-chip-btn.active,
[data-theme="slush"] .toggle-pill-card.active {
  background: #ffedd5 !important;
  border-color: #fb4903 !important;
  color: #c2410c !important;
  box-shadow: 0 4px 0 #fb4903 !important;
}

[data-theme="slush"] .search-box {
  background: #ffffff !important;
  border: 2px solid #000000 !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 0 #000000 !important;
}

[data-theme="slush"] .sol-data-table th {
  background: #dceeff !important;
  border-bottom: 2px solid #000000 !important;
  color: #000000 !important;
  font-weight: 800 !important;
}

[data-theme="slush"] .sol-data-table td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.12) !important;
}

/* 10. Superr (Schoolyard Notebook & 3D Page Turn) */
[data-theme="superr"] {
  --bg-page: #fdfbf7;
  --bg-card: rgba(253, 251, 247, 0.82);
  --bg-card-sub: rgba(247, 239, 228, 0.84);
  --bg-glass: rgba(253, 251, 247, 0.88);
  --text-main: #171717;
  --text-muted: #6b5e51;
  --border-color: #171717;
  --primary: #ff6f1e;
  --primary-hover: #ea580c;
  --primary-foreground: #ffffff;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Fraunces', 'Plus Jakarta Sans', serif;
  --shadow-md: rgba(43, 26, 7, 0.12) 0px 8px 24px -4px, rgba(43, 26, 7, 0.08) 0px 2px 6px 0px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
}

[data-theme="superr"] body {
  background-color: #fdfbf7 !important;
  background-image: 
    url('../../disenos/Sistema-de-Diseno-Superr/notebook_margin_doodles.svg'),
    radial-gradient(circle at 44px 16px, rgba(43, 26, 7, 0.14) 2px, transparent 2.5px),
    repeating-linear-gradient(transparent, transparent 31px, rgba(43, 26, 7, 0.05) 31px, rgba(43, 26, 7, 0.05) 32px) !important;
  background-size: 1600px auto, 100% 32px, 100% 32px !important;
  background-position: center top, left top, left top !important;
  background-repeat: repeat-y, repeat-y, repeat !important;
  background-attachment: scroll, fixed, fixed !important;
}

[data-theme="superr"] .level-card,
[data-theme="superr"] .table-card,
[data-theme="superr"] .summary-proforma-card,
[data-theme="superr"] .modal-card {
  background: rgba(253, 251, 247, 0.82) !important;
  backdrop-filter: blur(8px) saturate(108%) !important;
  -webkit-backdrop-filter: blur(8px) saturate(108%) !important;
  border: 2px solid #171717 !important;
  border-left: 20px solid #854d0e !important;
  border-radius: 16px !important;
  box-shadow: rgba(43, 26, 7, 0.14) 0px 8px 24px -4px, rgba(43, 26, 7, 0.08) 0px 2px 6px 0px !important;
  position: relative !important;
}

[data-theme="superr"] .kpi-box,
[data-theme="superr"] .toolbar-card,
[data-theme="superr"] .packaging-item-card,
[data-theme="superr"] .phase-card-box,
[data-theme="superr"] .pres-card-interactive,
[data-theme="superr"] .slot-survey-card {
  background: rgba(247, 239, 228, 0.84) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border: 2px solid #171717 !important;
  border-radius: 14px !important;
  box-shadow: 0 3px 0 #171717 !important;
}

[data-theme="superr"] .search-box {
  background: rgba(253, 251, 247, 0.85) !important;
  border: 2px solid #171717 !important;
  border-radius: 8px !important;
}

[data-theme="superr"] .sol-data-table th {
  background: rgba(247, 239, 228, 0.95) !important;
  color: #2b1a07 !important;
  font-family: 'Fraunces', serif !important;
  font-size: 0.82rem !important;
  border-bottom: 2px solid #171717 !important;
}

[data-theme="superr"] .sol-data-table td {
  border-bottom: 1px solid rgba(43, 26, 7, 0.08) !important;
  color: #171717 !important;
}

[data-theme="superr"] .sol-data-table tr:hover td {
  background: rgba(255, 111, 30, 0.08) !important;
}

[data-theme="superr"] .choice-card.selected,
[data-theme="superr"] .quick-chip-btn.active,
[data-theme="superr"] .toggle-pill-card.active {
  background: #ffedd5 !important;
  border-color: #ea580c !important;
  color: #9a3412 !important;
  box-shadow: 0 3px 0 #ea580c !important;
}

[data-theme="superr"] .kpi-number {
  font-family: 'Fraunces', serif !important;
  color: #ff6f1e !important;
}

/* ==========================================================================
   RESET & ESTILOS GLOBALES
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

#app-content,
.app-content,
#app-root,
.main-body,
.dashboard-container,
.survey-wizard-wrapper {
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   HEADER SUPERIOR MODERNO
   ========================================================================== */
.app-header {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0.85rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
  font-size: 1.25rem;
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.nav-right-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ==========================================================================
   SELECTOR DE TEMA VISUAL CON MINIATURAS (Theme Switcher Pro)
   ========================================================================== */
.theme-menu-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-theme-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  text-align: left;
  user-select: none;
  box-shadow: var(--shadow-sm);
}

.btn-theme-trigger:hover,
.btn-theme-trigger.expanded {
  background: var(--bg-card);
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

@keyframes triggerThemeFlash {
  0% { transform: scale(0.97); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.btn-theme-trigger.theme-just-changed {
  animation: triggerThemeFlash 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.theme-trigger-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.theme-trigger-swatch {
  width: 34px;
  height: 24px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
  flex-shrink: 0;
  position: relative;
  background: #ffffff;
}

.trigger-swatch-header {
  height: 6px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 2px;
  background: rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
}

.trigger-swatch-header .swatch-dot {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.trigger-swatch-canvas {
  flex: 1;
  display: flex;
  padding: 1.5px;
  gap: 1.5px;
  box-sizing: border-box;
}

.trigger-swatch-sidebar {
  width: 7px;
  height: 100%;
  border-radius: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.trigger-swatch-card {
  flex: 1;
  height: 100%;
  border-radius: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.7);
}

.trigger-swatch-chip {
  width: 8px;
  height: 3px;
  border-radius: 1px;
  background: var(--primary);
}

.theme-trigger-info {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.theme-trigger-title-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.theme-trigger-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.theme-trigger-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.theme-trigger-tag {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.theme-trigger-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.theme-trigger-action-hint {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: var(--bg-card-sub);
  color: var(--text-muted);
  transition: all 0.2s ease;
}

.btn-theme-trigger:hover .theme-trigger-action-hint,
.btn-theme-trigger.expanded .theme-trigger-action-hint {
  background: var(--primary);
  color: var(--primary-foreground);
}

.theme-trigger-chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-theme-trigger.expanded .theme-trigger-chevron {
  transform: rotate(180deg);
}

/* Panel Desplegable Flotante de Temas */
.theme-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 350px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1.5px solid var(--border-color);
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 1100;
  animation: themeMenuFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes themeMenuFadeIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-theme-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 8px;
}

.dropdown-group-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.dropdown-theme-hint {
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

/* Cuadrícula de 3 Columnas para Mini Tarjetas */
.theme-options-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  box-sizing: border-box;
}

.theme-card-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 3px 5px;
  border: 1.5px solid var(--border-color);
  background: var(--bg-card);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-sizing: border-box;
  text-align: center;
  min-width: 0;
  overflow: hidden;
}

.theme-card-mini:hover {
  transform: translateY(-2.5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--primary);
}

.theme-card-mini.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary);
}

.theme-card-mini.active::after {
  content: '✓';
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 8px;
  font-weight: 900;
  width: 13px;
  height: 13px;
  background: var(--primary);
  color: var(--primary-foreground);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.mini-swatch {
  width: 100%;
  height: 24px;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.mini-bar {
  height: 7px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 3px;
  box-sizing: border-box;
}

.mini-microdot {
  width: 2.5px;
  height: 2.5px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
}

.mini-body {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 2px 4px;
  box-sizing: border-box;
}

.mini-accent {
  width: 12px;
  height: 4px;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
}

.mini-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-top: 1px;
}

.mini-tag {
  font-size: 0.58rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Colores de Swatches por Temática */
.swatch-light { background: #ffffff; border: 1px solid #e2e8f0; }
.swatch-light .mini-bar { background: #f1f5f9; }
.swatch-light .mini-accent { background: #00b4d8; }

.swatch-dark { background: #0b0f19; border: 1px solid #27354f; }
.swatch-dark .mini-bar { background: #141c2e; }
.swatch-dark .mini-microdot { background: rgba(255, 255, 255, 0.3); }
.swatch-dark .mini-accent { background: #00b4d8; }

.swatch-ciudad { background: #091322; border: 1px solid rgba(158, 217, 221, 0.4); }
.swatch-ciudad .mini-bar { background: #101c30; }
.swatch-ciudad .mini-microdot { background: #fa927f; }
.swatch-ciudad .mini-accent { background: #fa927f; }

.swatch-cyberpop { background: #ffd500; border: 1px solid #000000; }
.swatch-cyberpop .mini-bar { background: #ffffff; }
.swatch-cyberpop .mini-microdot { background: #000000; }
.swatch-cyberpop .mini-accent { background: #f05a5b; }

.swatch-sakura { background: #fff5f7; border: 1px solid #fecdd3; }
.swatch-sakura .mini-bar { background: #fce7eb; }
.swatch-sakura .mini-microdot { background: #f43f5e; }
.swatch-sakura .mini-accent { background: #a95770; }

.swatch-boceto { background: #fffaf3; border: 1px solid #d6c7b2; }
.swatch-boceto .mini-bar { background: #f5ede0; }
.swatch-boceto .mini-microdot { background: #8c7860; }
.swatch-boceto .mini-accent { background: #c2410c; }

.swatch-plano { background: #0f172a; border: 1px solid #38bdf8; }
.swatch-plano .mini-bar { background: #1e293b; }
.swatch-plano .mini-microdot { background: #38bdf8; }
.swatch-plano .mini-accent { background: #38bdf8; }

.swatch-premium { background: #110e12; border: 1px solid #c5a365; }
.swatch-premium .mini-bar { background: #191419; }
.swatch-premium .mini-microdot { background: #c5a365; }
.swatch-premium .mini-accent { background: #c5a365; }

.swatch-natural { background: #fff9ec; border: 1px solid #a7f3d0; }
.swatch-natural .mini-bar { background: #f1f4e7; }
.swatch-natural .mini-microdot { background: #5d895d; }
.swatch-natural .mini-accent { background: #5d895d; }

.swatch-frosted { background: #f4f6f8; border: 1px solid #0a0a0a; }
.swatch-frosted .mini-bar { background: #e2e8f0; }
.swatch-frosted .mini-microdot { background: #0a0a0a; }
.swatch-frosted .mini-accent { background: #0a0a0a; }

.swatch-slush { background: #dceeff; border: 1.5px solid #000000; }
.swatch-slush .mini-bar { background: #ffffff; }
.swatch-slush .mini-microdot { background: #fb4903; }
.swatch-slush .mini-accent { background: #fb4903; }

.swatch-superr { background: #fdfbf7; border: 1.5px solid #171717; }
.swatch-superr .mini-bar { background: #f7efe4; }
.swatch-superr .mini-microdot { background: #ff6f1e; }
.swatch-superr .mini-accent { background: #ff6f1e; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.52rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: var(--font-sans);
}

.nav-btn:hover {
  background: var(--bg-card-sub);
  color: var(--text-main);
}

.nav-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.nav-btn-link {
  border: 1px solid var(--border-color);
  color: var(--primary);
}

.nav-btn-link:hover {
  background: var(--bg-card-sub);
  border-color: var(--primary);
}

.badge-alerta-nav {
  background: var(--danger);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  animation: pulse-red 1.8s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
  70% { transform: scale(1.08); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* ==========================================================================
   MAIN BODY WRAPPER
   ========================================================================== */
.main-body {
  max-width: 1240px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ==========================================================================
   ENCUESTA ASISTIDA POR NIVELES (CONVERSATIONAL WIZARD UX)
   ========================================================================== */
.survey-wizard-wrapper {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.survey-wizard-wrapper.animate-view-enter,
.level-card.animate-step-enter {
  animation: surveyFadeIn 0.24s ease-out;
}

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

/* Barra de Progreso Superior con Porcentaje */
.survey-progress-header {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.6rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.progress-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-level-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-percent-badge {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-card-sub);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.progress-track {
  height: 8px;
  background: var(--bg-card-sub);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px var(--primary-glow);
}

/* Stepper de 5 Pasos Visuales */
.levels-stepper-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.3rem 0;
}

.step-node {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.step-node:hover {
  background: var(--bg-card-sub);
}

.step-node-bubble {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  background: var(--bg-card-sub);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  transition: all 0.25s ease;
}

.step-node-text {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.step-node.active .step-node-bubble {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 0 14px var(--primary-glow);
  transform: scale(1.08);
}

.step-node.active .step-node-text {
  color: var(--text-main);
  font-weight: 800;
}

.step-node.completed .step-node-bubble {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}

.step-separator {
  height: 2px;
  flex: 1;
  background: var(--border-color);
  min-width: 12px;
}

/* ==========================================================================
   TARJETA PRINCIPAL DEL NIVEL (CARD UX)
   ========================================================================== */
.level-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (max-width: 640px) {
  .level-card {
    padding: 1.5rem 1.25rem;
    gap: 1.25rem;
  }
}

/* Header del Nivel */
.level-header {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1.25rem;
}

.level-greeting-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary);
  margin-bottom: 0.4rem;
}

.level-title {
  font-family: var(--font-heading);
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.45rem;
}

.level-desc {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Grupos de Preguntas Amigables */
.survey-question-block {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.survey-question-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
}

.survey-question-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: -0.35rem;
}

/* ==========================================================================
   SELECTORES INTERACTIVOS Y CHIPS RÁPIDOS
   ========================================================================== */

/* Selector de Asesora (Tarjetas Grandes 1-Clic) */
.asesoras-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
}

.asesora-card-btn {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
  cursor: pointer;
  transition: all 0.22s ease;
  text-align: left;
  font-family: var(--font-sans);
}

.asesora-card-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  transform: translateY(-2px);
}

.asesora-card-btn.active {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.asesora-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
}

.asesora-card-btn.active .asesora-avatar {
  background: var(--primary);
  border-color: var(--primary);
}

.asesora-info-name {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  line-height: 1.2;
}

.asesora-info-role {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* Fila de Chips Rápidos de Marca / Cliente */
.quick-chips-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.quick-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  font-size: 0.84rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.quick-chip-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.quick-chip-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

/* Inputs con Estilo Amigable */
.form-input-stylish {
  width: 100%;
  padding: 0.85rem 1.15rem;
  font-size: 0.95rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.22s ease;
}

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

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

/* Tarjetas de Selección de Gran Tamaño (Tipo de Pedido / Origen) */
.choice-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.95rem;
}

.choice-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.25rem;
  cursor: pointer;
  transition: all 0.22s ease;
  position: relative;
}

.choice-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.choice-card.selected {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.choice-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--bg-card-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.choice-card.selected .choice-card-icon {
  background: var(--primary);
  color: var(--primary-foreground);
}

.choice-card-body h4 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.choice-card-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 240px;
  overflow-y: auto;
  display: none;
}

.autocomplete-dropdown.active {
  display: block;
}

.autocomplete-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: background 0.15s ease;
}

.autocomplete-item:last-child {
  border-bottom: none;
}

.autocomplete-item:hover {
  background: var(--bg-card-sub);
}

.item-primary-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.item-secondary-code {
  font-size: 0.76rem;
  color: var(--text-muted);
}

/* ==========================================================================
   MAQUILA: TOGGLE PILLS CLAROS CON 1 CLIC
   ========================================================================== */
.toggle-pills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.85rem;
}

.toggle-pill-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.toggle-pill-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
}

.toggle-pill-card.active {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.toggle-pill-indicator {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 800;
  color: #fff;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.toggle-pill-card.active .toggle-pill-indicator {
  background: var(--primary);
  border-color: var(--primary);
}

.toggle-pill-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

/* Banner Informativo de Condición Maquila */
.maquila-status-banner {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.88rem;
  color: var(--text-main);
}

/* ==========================================================================
   PRESENTACIONES Y TAMAÑOS (NIVEL 3)
   ========================================================================== */
.pres-container-interactive {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.pres-card-interactive {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

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

.pres-badge-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
  background: var(--bg-card);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.pres-inputs-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.select-unit {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-left: none;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 0 0.85rem;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.fixed-unit-tag {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-left: none;
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--primary);
  font-family: var(--font-mono, monospace);
  user-select: none;
}

.empaque-prices-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.15rem;
  margin-top: 0.5rem;
}

.fields-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

/* ==========================================================================
   4 SLOTS DE FOTOS SIN IA (NIVEL 4 REDISEÑADO & COMPACTO)
   ========================================================================== */
.photos-info-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1.25rem;
  margin-top: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.photos-info-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.photos-info-item svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.photos-info-item.badge-has-photos {
  color: #10b981;
  font-weight: 700;
  margin-left: auto;
}

.photos-info-item.badge-has-photos svg {
  color: #10b981;
}

.slots-survey-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .slots-survey-grid {
    grid-template-columns: 1fr;
  }
}

.slot-survey-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 160px;
  position: relative;
  overflow: hidden;
}

.slot-survey-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.slot-survey-card.dragover {
  border-color: var(--primary);
  background: rgba(0, 180, 216, 0.08);
  transform: scale(1.015);
}

.slot-survey-card.has-photos {
  border-color: rgba(16, 185, 129, 0.4);
}

.slot-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.slot-survey-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  transition: transform 0.2s ease;
}

.slot-survey-card:hover .slot-survey-icon {
  transform: scale(1.08);
}

.slot-counter-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.slot-counter-badge.active {
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.35);
  color: #10b981;
}

.slot-survey-name {
  font-family: var(--font-heading);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  margin-top: 0.15rem;
}

.slot-survey-hint {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
}

.slot-survey-photos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--border-color);
}

.slot-empty-prompt {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.slot-empty-prompt svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

.slot-thumb-wrapper {
  position: relative;
  display: inline-block;
}

.slot-survey-photo-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  border: 1.5px solid var(--border-color);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.slot-survey-photo-thumb:hover {
  transform: scale(1.08);
  border-color: var(--primary);
}

.btn-remove-thumb {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s, background 0.15s;
}

.btn-remove-thumb:hover {
  transform: scale(1.15);
  background: #dc2626;
}

/* ==========================================================================
   RESUMEN EJECUTIVO (PROFORMA CARD EN NIVEL 5)
   ========================================================================== */
.summary-proforma-card {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.summary-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.summary-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.summary-kpi-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.summary-kpi-item label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
}

.summary-kpi-item strong {
  font-size: 0.95rem;
  color: var(--text-main);
}

/* ==========================================================================
   BOTONES DE NAVEGACIÓN DE NIVELES (FOOTER ACTIONS)
   ========================================================================== */
.level-nav-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.btn-level {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.22s ease;
  font-family: var(--font-sans);
  border: 1.5px solid transparent;
}

.btn-level-back {
  background: var(--bg-card-sub);
  color: var(--text-muted);
  border-color: var(--border-color);
}

.btn-level-back:hover {
  background: var(--bg-card);
  color: var(--text-main);
}

.btn-level-next {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-level-next:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-level-submit {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.35);
  font-size: 1.05rem;
  padding: 0.95rem 2rem;
}

.btn-level-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.45);
}

/* ==========================================================================
   DASHBOARD DE SEGUIMIENTO (KPIS, TABLA Y SEMÁFORO > 5 DÍAS)
   ========================================================================== */
.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.dashboard-container.animate-view-enter {
  animation: surveyFadeIn 0.24s ease-out;
}

.kpis-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.kpi-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

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

.kpi-number {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1;
  display: block;
  margin-bottom: 3px;
}

/* Toolbar de Filtros */
.toolbar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  flex: 1;
  min-width: 250px;
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.88rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  width: 100%;
}

.filters-group {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  padding: 0.45rem 1rem;
  font-size: 0.84rem;
  font-family: var(--font-sans);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.btn-toggle-vencidas {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #dc2626;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-toggle-vencidas.active {
  background: #dc2626;
  color: #fff;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.15rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-outline {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.btn-outline:hover {
  background: var(--bg-card-sub);
  border-color: var(--primary);
}

/* Tabla de Solicitudes */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  overflow-x: auto;
}

.sol-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  text-align: left;
}

.sol-data-table th {
  background: var(--bg-card-sub);
  padding: 0.95rem 1.15rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.sol-data-table td {
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
}

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

.sol-data-table tr:hover td {
  background: var(--bg-card-sub);
}

.row-vencida td {
  background: rgba(239, 68, 68, 0.03);
}

/* Semáforo de Días */
.semaforo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.semaforo-verde {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
}

.semaforo-amarillo {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.semaforo-rojo {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  animation: pulse-red 2s infinite;
}

.radicado-chip {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.78rem;
  background: var(--bg-card-sub);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  color: var(--primary);
}

.slots-mini-avatars {
  display: flex;
  gap: 3px;
}

.slot-dot {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card-sub);
  color: var(--text-muted);
}

.slot-dot.active {
  background: var(--primary);
  color: var(--primary-foreground);
}

.status-select {
  padding: 4px 8px;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-main);
  outline: none;
  cursor: pointer;
}

.action-buttons-cell {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
}

.btn-action-icon {
  height: 32px;
  min-width: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-action-icon:hover {
  background: var(--bg-card-sub);
  color: var(--text-main);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-action-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.btn-action-cotizar {
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.15), rgba(114, 9, 183, 0.12));
  color: var(--primary);
  border-color: rgba(0, 180, 216, 0.4);
  font-weight: 700;
  padding: 0 13px;
}

.btn-action-cotizar:hover {
  background: linear-gradient(135deg, #00b4d8, #0096c7);
  color: #ffffff;
  border-color: #0077b6;
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.35);
  transform: translateY(-1px);
}

.btn-action-delete {
  padding: 0;
  width: 32px;
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.25);
  background: rgba(239, 68, 68, 0.04);
}

.btn-action-delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #dc2626;
  box-shadow: 0 4px 10px rgba(239, 68, 68, 0.25);
  transform: translateY(-1px);
}

/* ==========================================================================
   MODALES Y LIGHTBOX
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
}

.modal-card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-card-body {
  padding: 1.5rem;
}

.modal-card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 2rem;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  color: #fff;
  font-size: 0.9rem;
  margin-top: 1rem;
}

/* ==========================================================================
   BIFÁSICOS / MULTIFÁSICOS & FASES DINÁMICAS (NIVEL 2)
   ========================================================================== */
.fases-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.phase-card-box {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-left: 5px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.2s ease;
  position: relative;
}

.phase-card-box:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-sm);
}

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

.phase-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  background: var(--bg-card-sub);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

.phase-sum-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.15rem;
  font-size: 0.88rem;
}

.phase-sum-badge {
  font-family: var(--font-mono);
  font-weight: 800;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.84rem;
}

.phase-sum-ok {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.phase-sum-warn {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

/* ==========================================================================
   COMPONENTES DE EMPAQUE FLEXIBLES & OPERACIONES MOD (NIVEL 3)
   ========================================================================== */
.pres-tabs-container {
  background: var(--bg-card-sub);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
}

.pres-tabs-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 2px 2px 6px 2px;
}

.pres-tab-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--text-main);
  white-space: nowrap;
}

.pres-tab-pill:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  transform: translateY(-1px);
}

.pres-tab-pill.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

.pres-tab-pill.active .pres-tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

.pres-tab-pill.active .pres-tab-vol {
  color: #fff;
}

.pres-tab-pill.active .pres-tab-qty {
  color: rgba(255, 255, 255, 0.85);
}

.pres-tab-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.pres-tab-vol {
  font-weight: 800;
}

.pres-tab-qty {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.pres-card-active {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 2px var(--primary-glow) !important;
}

.packaging-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.pkg-select-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.95rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.pkg-select-btn:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
}

.pkg-select-btn.active {
  background: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
  box-shadow: 0 3px 12px var(--primary-glow);
}

.pkg-select-btn.pkg-locked {
  background: rgba(16, 185, 129, 0.12) !important;
  border-color: rgba(16, 185, 129, 0.45) !important;
  color: #065f46 !important;
  cursor: default !important;
}

.pkg-select-btn.pkg-locked:hover {
  background: rgba(16, 185, 129, 0.18) !important;
  border-color: rgba(16, 185, 129, 0.65) !important;
}

.badge-mandatory {
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  background: #10b981;
  color: #fff;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.03em;
}

.packaging-items-list {
  display: flex;
  flex-direction: column;
  gap: 1.35rem; /* Separación amplia para que no quede todo amontonado */
  margin-top: 1.25rem;
}

.packaging-item-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.45rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.packaging-item-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.pkg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.pkg-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
}

.pkg-name-input {
  font-family: var(--font-heading, inherit);
  font-size: 0.96rem !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  background: transparent !important;
  border: 1px dashed transparent !important;
  border-radius: 6px !important;
  padding: 3px 8px !important;
  width: 100% !important;
  max-width: 480px !important;
  transition: all 0.2s ease !important;
}

.pkg-name-input:hover {
  border-color: var(--border-color) !important;
  background: var(--bg-card-sub) !important;
}

.pkg-name-input:focus {
  border: 1.5px solid var(--primary) !important;
  background: var(--bg-card) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}

.pkg-fields-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.85rem;
}

/* Operaciones MOD */
.mod-ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}

.mod-pill-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-card);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.mod-pill-card:hover {
  border-color: var(--primary);
  background: var(--bg-card-sub);
}

.mod-pill-card.active {
  border-color: var(--primary);
  background: var(--bg-card-sub);
  box-shadow: 0 3px 12px var(--primary-glow);
}

.mod-pill-card.active .mod-indicator {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.mod-indicator {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.mod-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.25;
}

/* ==========================================================================
   BUSCADOR UNIVERSAL ESTILO VALIDADOR (PT, RADICADOS & GRANELES)
   ========================================================================== */
.exc-search-header {
  padding: 8px 14px;
  background: var(--bg-card-sub);
  border-bottom: 1px solid var(--border-color);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.exc-search-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.15s ease;
  gap: 12px;
}

.exc-search-item:last-child {
  border-bottom: none;
}

.exc-search-item:hover {
  background: var(--bg-card-sub);
}

.exc-search-item-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.exc-search-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.exc-search-item-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.exc-bom-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(139, 92, 246, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(139, 92, 246, 0.35);
  padding: 1px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}

[data-theme="dark"] .exc-bom-badge,
[data-theme="sakura"] .exc-bom-badge,
[data-theme="cyberpop"] .exc-bom-badge {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.25);
  border-color: rgba(167, 139, 250, 0.45);
}

.exc-search-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.exc-search-item-ref {
  font-weight: 700;
  font-size: 0.82rem;
}

/* Badges por tipo */
.badge-tag-pt {
  background: rgba(0, 180, 216, 0.15);
  color: #0096c7;
  border: 1px solid rgba(0, 180, 216, 0.35);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.badge-tag-rad {
  background: rgba(124, 58, 237, 0.15);
  color: #7c3aed;
  border: 1px solid rgba(124, 58, 237, 0.35);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
}

.badge-tag-gr {
  background: rgba(217, 119, 6, 0.15);
  color: #d97706;
  border: 1px solid rgba(217, 119, 6, 0.35);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 1px 6px;
  border-radius: 4px;
}

/* Ficha de Fórmula Seleccionada */
.selected-formula-box {
  background: var(--bg-card);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
  margin-top: 0.85rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

/* ==========================================================================
   NUEVA SECCIÓN DE MATERIALES (ME DE CLIENTE VS SEMCO COTIZA)
   ========================================================================== */
.pkg-supply-choice-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin: 0.25rem 0 0.5rem 0;
}

@media (max-width: 600px) {
  .pkg-supply-choice-row {
    grid-template-columns: 1fr;
  }
}

.pkg-supply-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-color);
  background: var(--bg-card-sub);
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.pkg-supply-btn:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.pkg-supply-btn.active-semco {
  border-color: var(--primary);
  background: rgba(0, 180, 216, 0.12);
  color: var(--primary);
  box-shadow: 0 2px 10px var(--primary-glow);
}

.pkg-supply-btn.active-cliente {
  border-color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.2);
}

.me-cliente-notice {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: #059669;
  font-size: 0.8rem;
  font-weight: 600;
}

.btn-add-custom-pkg {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  border: 1.5px dashed var(--primary);
  background: transparent;
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--font-sans);
}

.btn-add-custom-pkg:hover {
  background: rgba(0, 180, 216, 0.08);
  transform: translateY(-1px);
}

/* Badges específicos para ETQ e IMP */
.pkg-badge-etq {
  background: rgba(0, 180, 216, 0.15) !important;
  color: #0096c7 !important;
  border: 1px solid rgba(0, 180, 216, 0.35) !important;
}

.pkg-badge-imp {
  background: rgba(251, 73, 3, 0.15) !important;
  color: #fb4903 !important;
  border: 1px solid rgba(251, 73, 3, 0.35) !important;
}

.auto-quote-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.auto-quote-chip:hover {
  background: rgba(16, 185, 129, 0.22);
  transform: translateY(-1px);
}

/* ==========================================================================
   BLINDAJE DE CONTRASTE Y LEGIBILIDAD PARA TODOS LOS TEMAS (disenos/)
   ========================================================================== */
.level-card,
.choice-card,
.packaging-item-card,
.phase-card-box,
.pres-card-interactive,
.slot-survey-card,
.summary-proforma-card,
.table-card,
.kpi-box,
.toolbar-card,
.modal-card {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  box-sizing: border-box;
}

.level-title,
.survey-question-title,
.pkg-title,
.item-primary-name,
.summary-title,
.brand-title {
  color: var(--text-main) !important;
  -webkit-text-fill-color: initial !important;
}

.form-input-stylish,
.search-input,
.filter-select,
.status-select,
.select-unit {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-color: var(--border-color) !important;
}

.form-input-stylish:focus,
.search-input:focus,
.filter-select:focus {
  border-color: var(--primary) !important;
  outline: none !important;
}

.sol-data-table {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.sol-data-table th {
  background-color: var(--bg-card-sub);
  color: var(--text-muted);
}

.sol-data-table td {
  color: var(--text-main);
  background-color: var(--bg-card);
}

.sol-data-table tr:hover td {
  background-color: var(--bg-card-sub);
}

/* Aislamiento estricto para evitar que mariposas/aves aparezcan fuera del tema Natural */
:not([data-theme="natural"]) #app-content::before,
:not([data-theme="natural"]) #app-content::after,
:not([data-theme="natural"]) body::before,
:not([data-theme="natural"]) body::after {
  animation: none !important;
}


