/* ============================================================================
   ESTILOS OFICIALES — UNIVERSIDAD MALAMENTE DE VENTAS Y MARKETING
   Identidad Visual: Malamente Collection (#0A0A0A Negro, #E50914 Rojo, #FFFFFF Blanco)
   Diseño Mobile-First (Celular y Computadora)
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Cormorant+Garamond:wght@600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --bg-black: #08080B;
  --bg-card: #13131A;
  --bg-card-alt: #1A1A24;
  --bg-elevated: #222230;
  --red-primary: #E50914;
  --red-dark: #9B060D;
  --red-glow: rgba(229, 9, 20, 0.28);
  --text-white: #FFFFFF;
  --text-light: #E2E8F0;
  --text-muted: #94A3B8;
  --border-subtle: #2A2A38;
  --green-ok: #22C55E;
  --amber-warn: #F59E0B;
  --blue-info: #3B82F6;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

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

html, body {
  background-color: var(--bg-black);
  color: var(--text-white);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  font-size: 15.5px;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ======================== PANTALLA DE LOGIN ======================== */
.login-overlay {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: radial-gradient(circle at 50% 15%, rgba(229, 9, 20, 0.18), transparent 60%), var(--bg-black);
}

.login-box {
  width: 100%;
  max-width: 540px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 28px 22px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75), 0 0 30px rgba(229, 9, 20, 0.12);
  text-align: center;
}

.brand-logo-login {
  max-width: 220px;
  height: auto;
  margin: 0 auto 10px;
  display: block;
  border-radius: 10px;
}

.brand-script {
  font-family: 'Great Vibes', cursive;
  font-size: 2.6rem;
  color: var(--text-white);
  font-weight: 400;
  line-height: 1.1;
}

.brand-sub {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 4px;
  text-transform: uppercase;
  font-size: 0.85rem;
  color: var(--red-primary);
  font-weight: 700;
  margin-bottom: 16px;
}

.user-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 18px 0;
  text-align: left;
}

.user-card-btn {
  background: var(--bg-card-alt);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  color: var(--text-white);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.user-card-btn:hover, .user-card-btn.selected {
  border-color: var(--red-primary);
  background: rgba(229, 9, 20, 0.12);
  box-shadow: 0 0 15px var(--red-glow);
}

.user-card-btn .u-name {
  font-weight: 800;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.user-card-btn .u-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.pin-input-group {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.pin-input {
  flex: 1;
  background: #0D0D12;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  color: var(--text-white);
  font-size: 1.1rem;
  text-align: center;
  letter-spacing: 6px;
  font-weight: 700;
}

.pin-input:focus {
  outline: none;
  border-color: var(--red-primary);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-primary), var(--red-dark));
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-md);
  padding: 13px 20px;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--red-glow);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover {
  border-color: var(--red-primary);
  background: rgba(229, 9, 20, 0.14);
}

/* ======================== HEADER Y NAVEGACIÓN ======================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(12, 12, 16, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-logo {
  height: 40px;
  width: auto;
  border-radius: 6px;
}

.header-titles h1 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-white);
  line-height: 1.2;
}

.header-titles span {
  font-size: 0.75rem;
  color: var(--red-primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.badge-level {
  background: rgba(229, 9, 20, 0.16);
  border: 1px solid var(--red-primary);
  color: #FCA5A5;
  padding: 5px 11px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
  white-space: nowrap;
}

.nav-tabs-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.nav-tab-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tab-btn.active {
  background: rgba(229, 9, 20, 0.16);
  color: var(--text-white);
  border-color: var(--red-primary);
}

/* ======================== LAYOUT PRINCIPAL ======================== */
.main-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 16px 90px;
}

.welcome-banner {
  background: linear-gradient(135deg, #1A080B, #13131A);
  border: 1px solid rgba(229, 9, 20, 0.45);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.welcome-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.progress-bar-wrap {
  background: #09090D;
  height: 10px;
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-bar-fill {
  background: linear-gradient(90deg, var(--red-primary), #22C55E);
  height: 100%;
  transition: width 0.35s ease;
}

/* ======================== GRILLA DE MÓDULOS ======================== */
.modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}

.module-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.module-card:hover {
  transform: translateY(-2px);
  border-color: var(--red-primary);
}

.module-card.locked {
  opacity: 0.65;
  border-color: #22222C;
}

.module-card.passed {
  border-color: var(--green-ok);
}

.module-cover-img {
  width: 100%;
  height: 145px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-subtle);
}

.module-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.module-badges-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.mod-code-pill {
  background: var(--red-primary);
  color: #FFF;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.mod-status-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
}

.mod-status-pill.ok {
  background: rgba(34, 197, 94, 0.18);
  color: #4ADE80;
  border: 1px solid #22C55E;
}

.mod-status-pill.open {
  background: rgba(245, 158, 11, 0.18);
  color: #FBBF24;
  border: 1px solid #F59E0B;
}

.mod-status-pill.lock {
  background: #1F2430;
  color: #9CA3AF;
}

/* ======================== VISOR DE LECCIÓN ======================== */
.lesson-container {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 100%;
  min-width: 0;
}

.lesson-hero {
  position: relative;
  min-height: 210px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 24px 20px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
}

.lesson-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,8,11,0.35) 0%, rgba(8,8,11,0.95) 100%);
}

.lesson-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.audio-controls-bar {
  background: #1A1A24;
  border-bottom: 1px solid var(--border-subtle);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.lesson-body {
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.section-block {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px;
}

.section-block h3 {
  font-size: 1.18rem;
  color: var(--text-white);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 10px;
}

.section-block h4 {
  font-size: 1.02rem;
  color: #FCA5A5;
  margin: 14px 0 8px;
}

.section-block p, .section-block li {
  color: var(--text-light);
  margin-bottom: 8px;
}

.section-block ul, .section-block ol {
  padding-left: 22px;
}

.objective-box {
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.16), rgba(20, 20, 28, 0.9));
  border-left: 4px solid var(--red-primary);
}

.role-capsule-box {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(22, 22, 30, 0.95));
  border: 1.5px solid #F59E0B;
  border-radius: var(--radius-md);
  padding: 18px;
}

/* ======================== PRESENTACIÓN INTERACTIVA (VIDEO-SLIDES) ======================== */
.slide-player-box {
  background: #0D0D14;
  border: 1.5px solid var(--red-primary);
  border-radius: var(--radius-md);
  padding: 20px;
  position: relative;
}

.slide-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.slide-stage {
  background: linear-gradient(145deg, #171722, #101018);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 24px 20px;
  min-height: 165px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
}

.slide-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

/* ======================== DIAGRAMAS SVG Y TABLAS ======================== */
.svg-diagram-box {
  background: #0D0D12;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  overflow-x: auto;
}

.diagram-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #FCA5A5;
  margin-bottom: 10px;
  text-align: center;
}

.course-svg {
  width: 100%;
  min-width: 660px;
  height: auto;
  display: block;
}

.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.info-card {
  background: #12121A;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 15px;
}

.course-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.88rem;
}

.course-table th, .course-table td {
  border: 1px solid var(--border-subtle);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.course-table th {
  background: #221015;
  color: #FFFFFF;
  font-weight: 800;
}

.course-table tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.02);
}

.pill-green {
  background: rgba(34, 197, 94, 0.2);
  color: #4ADE80;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}

.pill-blue {
  background: rgba(59, 130, 246, 0.2);
  color: #60A5FA;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 800;
}

.text-green {
  color: #4ADE80;
}

.alert-box-crimson {
  background: rgba(229, 9, 20, 0.14);
  border: 1.5px solid var(--red-primary);
  border-radius: 10px;
  padding: 14px;
  margin: 12px 0;
}

.private-note-preview {
  background: #2C2410;
  border: 1.5px solid #F59E0B;
  border-radius: 10px;
  padding: 14px;
  margin-top: 12px;
  color: #FEF3C7;
}

.private-note-preview .pn-header {
  font-weight: 800;
  color: #FBBF24;
  font-size: 0.85rem;
  margin-bottom: 6px;
  text-transform: uppercase;
}

/* ======================== BURBUJAS DE WHATSAPP (MALA VS PRO) ======================== */
.wa-compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 12px;
}

.wa-phone-card {
  background: #0B141A;
  border: 1.5px solid #2A3942;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.wa-phone-card.bad {
  border-color: #EF4444;
}

.wa-phone-card.good {
  border-color: #22C55E;
}

.wa-header {
  padding: 12px 14px;
  font-weight: 800;
  font-size: 0.9rem;
}

.wa-phone-card.bad .wa-header {
  background: rgba(239, 68, 68, 0.2);
  color: #FCA5A5;
}

.wa-phone-card.good .wa-header {
  background: rgba(34, 197, 94, 0.2);
  color: #86EFAC;
}

.wa-chat-area {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #0B141A;
  flex: 1;
}

.wa-bubble {
  max-width: 88%;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 0.87rem;
  line-height: 1.45;
  position: relative;
}

.wa-bubble.client {
  align-self: flex-start;
  background: #202C33;
  color: #E9EDEF;
  border-top-left-radius: 2px;
}

.wa-bubble.agent {
  align-self: flex-end;
  background: #005C4B;
  color: #E9EDEF;
  border-top-right-radius: 2px;
}

.wa-time {
  display: block;
  font-size: 0.68rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: right;
  margin-top: 4px;
}

.wa-analysis {
  padding: 12px 14px;
  background: #141C22;
  border-top: 1px solid #2A3942;
  font-size: 0.84rem;
  color: #D1D5DB;
}

/* ======================== GUIONES COPIABLES ======================== */
.script-card {
  background: #111118;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 12px;
}

.script-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  gap: 8px;
  flex-wrap: wrap;
}

.script-text-box {
  background: #09090D;
  border: 1px dashed #374151;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.9rem;
  color: #F3F4F6;
}

/* ======================== CALCULADORA DE COMISIONES ======================== */
.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 20px;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.86rem;
  margin-bottom: 6px;
  color: var(--text-light);
}

.form-control {
  width: 100%;
  background: #0D0D13;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  padding: 11px 14px;
  color: var(--text-white);
  font-size: 0.95rem;
  font-family: inherit;
}

.form-control:focus {
  outline: none;
  border-color: var(--red-primary);
}

.calc-result-panel {
  background: linear-gradient(145deg, #1B1014, #12121A);
  border: 2px solid var(--red-primary);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.big-commission-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: #4ADE80;
  line-height: 1.1;
}

.jugada-alert-banner {
  padding: 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
}

.jugada-alert-banner.missing {
  background: rgba(245, 158, 11, 0.18);
  border: 1.5px solid #F59E0B;
  color: #FEF08A;
}

.jugada-alert-banner.unlocked {
  background: rgba(34, 197, 94, 0.2);
  border: 1.5px solid #22C55E;
  color: #86EFAC;
}

/* ======================== MOTOR DE EXÁMENES (10/10) ======================== */
.exam-box {
  background: #111118;
  border: 2px solid var(--red-primary);
  border-radius: var(--radius-lg);
  padding: 22px;
}

.question-card {
  background: var(--bg-card-alt);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
}

.q-title {
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 12px;
  color: #FFFFFF;
}

.option-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border: 1.5px solid var(--border-subtle);
  border-radius: 10px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.9rem;
}

.option-label:hover {
  border-color: var(--red-primary);
  background: rgba(229, 9, 20, 0.08);
}

.option-label input[type="radio"] {
  margin-top: 4px;
  accent-color: var(--red-primary);
  transform: scale(1.2);
}

/* ======================== ETAPA 3: ESPECIALIZACIONES, CENTRO DE DUDAS, PROFE IA, DIPLOMA & RANKING ======================== */
.module-card.specialization-highlight {
  border: 2px solid #F59E0B;
  box-shadow: 0 0 22px rgba(245, 158, 11, 0.25);
  background: linear-gradient(180deg, #1E1810 0%, #121218 100%);
}

.spec-priority-tag {
  background: linear-gradient(90deg, #F59E0B, #FBBF24);
  color: #111827;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 6px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* Centro de Dudas & Profe Malamente */
.profe-chat-box {
  background: linear-gradient(135deg, #14141F 0%, #1D0D11 100%);
  border: 2px solid var(--red-primary);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 22px;
}

.profe-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 14px 0;
}

.quick-chip {
  background: #232332;
  color: #F3F4F6;
  border: 1px solid #3F3F52;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-chip:hover {
  border-color: var(--red-primary);
  background: rgba(229, 9, 20, 0.18);
  color: #FFFFFF;
}

.profe-answer-card {
  background: #0B0B11;
  border: 1.5px solid #22C55E;
  border-radius: 12px;
  padding: 16px 18px;
  margin-top: 14px;
  color: #F3F4F6;
  line-height: 1.55;
  font-size: 0.94rem;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.faq-card {
  background: #14141C;
  border: 1px solid #2A2A3A;
  border-left: 4px solid var(--red-primary);
  border-radius: 12px;
  padding: 15px 16px;
}

.faq-cat-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(229, 9, 20, 0.15);
  color: #FCA5A5;
  margin-bottom: 6px;
}

/* Certificaciones, Insignias y Diploma Oficial */
.badges-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.badge-tier-card {
  background: #14141D;
  border: 1.5px solid #2D2D3D;
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  opacity: 0.58;
  transition: all 0.2s ease;
}

.badge-tier-card.unlocked {
  opacity: 1;
  border-color: #22C55E;
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.12) 0%, #14141D 100%);
}

.badge-tier-card.current-tier {
  opacity: 1;
  border-color: #F59E0B;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.28);
}

.diploma-card {
  background: linear-gradient(135deg, #160A0D 0%, #0D0D14 50%, #1A140A 100%);
  border: 3px double #F59E0B;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.55);
  margin: 18px 0;
}

.diploma-inner {
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 12px;
  padding: 26px 20px;
}

.diploma-seal {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid #F59E0B;
  color: #FDE047;
  font-weight: 800;
  font-size: 0.8rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.diploma-student-name {
  font-size: 2rem;
  font-weight: 900;
  color: #FFFFFF;
  margin: 10px 0 6px 0;
  letter-spacing: 0.5px;
}

.diploma-signatures {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 26px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ======================== RESPONSIVE CELULAR (BLINDAJE ANTI-DESBORDE) ======================== */
.main-container,
.lesson-body,
.section-block,
.info-card,
.wa-phone-card,
.calc-result-panel,
.profe-chat-box,
.faq-card,
.diploma-card,
.exam-box,
.question-card {
  min-width: 0;
  max-width: 100%;
}

.section-block p,
.section-block li,
.script-text-box,
.faq-card p,
.profe-answer-card,
code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.table-scroll-wrap,
.svg-diagram-box {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.table-scroll-wrap::-webkit-scrollbar,
.svg-diagram-box::-webkit-scrollbar {
  height: 7px;
}

.table-scroll-wrap::-webkit-scrollbar-track,
.svg-diagram-box::-webkit-scrollbar-track {
  background: #0B0B10;
  border-radius: 6px;
}

.table-scroll-wrap::-webkit-scrollbar-thumb,
.svg-diagram-box::-webkit-scrollbar-thumb {
  background: var(--red-primary);
  border-radius: 6px;
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
  }

  .top-header {
    padding: 10px 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .header-brand {
    justify-content: center;
  }

  .header-user {
    justify-content: center;
    gap: 6px;
  }

  .badge-level {
    white-space: normal;
    text-align: center;
    font-size: 0.72rem;
    line-height: 1.25;
    padding: 4px 9px;
  }

  .nav-tabs-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 8px 10px;
    gap: 6px;
  }

  .nav-tab-btn {
    padding: 7px 11px;
    font-size: 0.82rem;
    flex: 0 0 auto;
  }

  .main-container {
    padding: 14px 10px 80px;
  }

  .welcome-banner {
    padding: 14px;
  }

  .welcome-top > div {
    min-width: 0 !important;
    text-align: left !important;
    width: 100%;
  }

  .user-select-grid,
  .modules-grid,
  .info-grid-2,
  .wa-compare-grid,
  .calc-grid,
  .faq-grid,
  .badges-grid,
  .diploma-signatures {
    grid-template-columns: 1fr !important;
  }

  .pin-input-group {
    flex-direction: column;
  }

  .lesson-hero {
    min-height: 175px;
    padding: 16px 14px;
  }

  .audio-controls-bar {
    padding: 10px 12px;
  }

  .audio-controls-bar button,
  .slide-nav-row button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .lesson-body {
    padding: 12px 10px;
    gap: 18px;
  }

  .section-block,
  .slide-player-box,
  .profe-chat-box,
  .calc-result-panel,
  .exam-box {
    padding: 13px 11px;
  }

  .slide-stage {
    padding: 16px 13px;
  }

  .course-svg {
    min-width: 560px;
  }

  .course-table {
    min-width: 520px;
    font-size: 0.82rem;
  }

  .course-table th,
  .course-table td {
    padding: 8px 9px;
  }

  /* Indicador visual en celular para avisar que el cuadro se puede deslizar */
  .svg-diagram-box::before,
  .table-scroll-wrap::before {
    content: "👉 Deslizá el cuadro hacia los lados para verlo completo ↔️";
    display: block;
    font-size: 0.73rem;
    font-weight: 700;
    color: #FBBF24;
    background: rgba(245, 158, 11, 0.12);
    border: 1px dashed rgba(245, 158, 11, 0.45);
    border-radius: 6px;
    padding: 5px 8px;
    margin-bottom: 8px;
    text-align: center;
    position: sticky;
    left: 0;
  }

  .big-commission-number {
    font-size: 1.95rem;
  }

  .diploma-card {
    padding: 12px;
  }

  .diploma-inner {
    padding: 16px 12px;
  }

  .diploma-student-name {
    font-size: 1.5rem;
  }
}

/* ======================== IMPRESIÓN DEL DIPLOMA OFICIAL ======================== */
@media print {
  body {
    background: #FFFFFF !important;
    color: #111827 !important;
  }
  .top-header,
  .nav-tabs-bar,
  .welcome-banner,
  .no-print,
  #toast-banner {
    display: none !important;
  }
  .diploma-card {
    background: #FFFFFF !important;
    color: #111827 !important;
    border: 4px double #B91C1C !important;
    box-shadow: none !important;
    page-break-inside: avoid;
    margin: 0 !important;
  }
  .diploma-inner {
    border: 1.5px solid #D97706 !important;
  }
  .diploma-student-name,
  .diploma-card h2,
  .diploma-card h3,
  .diploma-card strong {
    color: #111827 !important;
  }
  .diploma-card p,
  .diploma-card span {
    color: #374151 !important;
  }
  .diploma-seal {
    background: #FEF3C7 !important;
    color: #92400E !important;
    border-color: #D97706 !important;
  }
}
