:root {
  --primary: #2563EB;
  --primary-hover: #1D4ED8;
  --primary-light: #EFF6FF;
  --purple: #6366F1;
  --purple-dark: #4F46E5;
  --purple-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --accent-pink: #EC4899;
  --accent-orange: #F59E0B;
  --accent-green: #10B981;
  --accent-red: #EF4444;
  --accent-cyan: #06B6D4;
  
  --bg-main: #F8FAFC;
  --bg-card: #FFFFFF;
  --text-main: #0F172A;
  --text-muted: #64748B;
  --text-light: #94A3B8;
  --border-color: #E2E8F0;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 14px rgba(0,0,0,0.07);
  --shadow-lg: 0 10px 25px rgba(37,99,235,0.12);
  --shadow-glow: 0 0 25px rgba(99,102,241,0.35);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-tap-highlight-color: transparent;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

/* App Container (Mobile Frame or Standalone PWA) */
.app-container {
  width: 100%;
  max-width: 440px;
  min-height: 100vh;
  background-color: #FFFFFF;
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(0,0,0,0.08);
  padding-bottom: 75px;
}

@media (min-width: 992px) {
  body {
    background: linear-gradient(135deg, #EEF2F6 0%, #E2E8F0 100%);
    padding: 20px 0;
  }
  .app-container {
    min-height: 92vh;
    border-radius: 36px;
    overflow: hidden;
    border: 8px solid #FFFFFF;
    box-shadow: 0 20px 50px rgba(15,23,42,0.15);
  }
}

/* App Screens */
.app-screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 18px 20px;
  animation: fadeIn 0.25s ease-in-out;
}

.app-screen.active {
  display: flex;
}

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

/* SCREEN 1: LOGIN & CADASTRO (media_1791684856855_ac090066.png) */
.auth-top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.btn-back-clean {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: var(--text-main);
  padding: 4px;
}

.auth-header-center {
  text-align: center;
  margin-bottom: 24px;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-brand-logo img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
}

.auth-brand-logo span {
  font-size: 22px;
  font-weight: 800;
  color: #1E293B;
  letter-spacing: -0.5px;
}

.auth-title-main {
  font-size: 24px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

.auth-subtitle-main {
  font-size: 14px;
  color: var(--text-muted);
}

.auth-form-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-input-group label {
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
}

.auth-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-wrapper input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  font-size: 14px;
  color: #0F172A;
  outline: none;
  background: #FFFFFF;
  transition: border 0.2s;
}

.auth-input-wrapper input:focus {
  border-color: var(--primary);
}

.auth-eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 16px;
}

.auth-remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}

.auth-remember-left {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-weight: 500;
  cursor: pointer;
}

.auth-forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.btn-auth-submit {
  background: #2563EB;
  color: white;
  border: none;
  padding: 15px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3);
  transition: all 0.2s;
}

.btn-auth-submit:hover {
  background: #1D4ED8;
}

.auth-divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
  color: var(--text-light);
  font-size: 13px;
}

.auth-divider-row::before,
.auth-divider-row::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: white;
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  cursor: pointer;
  transition: background 0.2s;
}

.auth-social-btn:hover {
  background: #F8FAFC;
}

.auth-bottom-switch {
  text-align: center;
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-bottom-switch a {
  color: #7C3AED;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

/* SCREEN 2: DASHBOARD (media_1791684874106_6d434685.png) */
.dash-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.dash-menu-icon {
  font-size: 22px;
  color: #1E293B;
  cursor: pointer;
}

.dash-brand-center {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-brand-center img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.dash-brand-center span {
  font-size: 17px;
  font-weight: 800;
  color: #1E293B;
}

.dash-user-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dash-bell-icon {
  font-size: 20px;
  color: #334155;
  cursor: pointer;
  position: relative;
}

.dash-avatar-round {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #E2E8F0;
}

.dash-greeting-box {
  margin-bottom: 18px;
}

.dash-greeting-box h2 {
  font-size: 22px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.dash-greeting-box p {
  font-size: 14px;
  color: var(--text-muted);
}

/* Trial Notification Pill */
.trial-pill-banner {
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  border: 1px solid #F59E0B;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #92400E;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.trial-pill-banner a {
  background: #F59E0B;
  color: white;
  padding: 4px 10px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 11px;
}

/* Banner Gravar Nova Aula */
.banner-record {
  background: var(--purple-gradient);
  border-radius: 20px;
  padding: 22px 20px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  box-shadow: 0 10px 25px rgba(37,99,235,0.28);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.banner-record:hover {
  transform: translateY(-2px);
}

.banner-record-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.banner-record-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.banner-record-title {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 4px;
}

.banner-record-sub {
  font-size: 12px;
  opacity: 0.9;
  max-width: 190px;
}

.banner-record-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* 4 Metric Cards */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 26px;
}

.metric-card {
  background: #F8FAFC;
  border-radius: 16px;
  padding: 16px 8px;
  text-align: center;
  border: 1px solid rgba(226,232,240,0.8);
}

.metric-value {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 4px;
}

.metric-label {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Section Header */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
}

.section-link {
  font-size: 13px;
  font-weight: 600;
  color: #2563EB;
  text-decoration: none;
  cursor: pointer;
}

/* Classes List Items */
.classes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.class-item {
  background: #FFFFFF;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.class-item:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.class-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.class-badge-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.badge-cardio { background: #FEE2E2; color: #EF4444; }
.badge-math { background: #EDE9FE; color: #7C3AED; }
.badge-history { background: #DBEAFE; color: #2563EB; }

.class-info h4 {
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: 2px;
}

.class-info p {
  font-size: 12px;
  color: var(--text-muted);
}

.class-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.class-time-tag {
  font-size: 12px;
  color: var(--text-light);
}

.class-play-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #EFF6FF;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  font-size: 13px;
}

.class-dots-btn {
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 16px;
  cursor: pointer;
}

/* SCREEN 4: GRAVAÇÃO DE ÁUDIO (media_1791684903865_e76bdb6f.png) */
.record-screen {
  text-align: center;
}

.record-top-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.record-top-nav-bar h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

.record-class-header-card {
  background: #F8FAFC;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  margin-bottom: 30px;
}

.record-class-icon-purple {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #EDE9FE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #7C3AED;
}

.record-class-details h4 {
  font-size: 15px;
  font-weight: 800;
  color: #0F172A;
}

.record-class-details p {
  font-size: 12px;
  color: #7C3AED;
  font-weight: 600;
  margin-bottom: 2px;
}

.record-class-details small {
  font-size: 11px;
  color: var(--text-light);
}

.record-big-mic-wrap {
  width: 170px;
  height: 170px;
  margin: 10px auto 20px;
  border-radius: 50%;
  background: var(--purple-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 15px 35px rgba(99,102,241,0.35);
  cursor: pointer;
  position: relative;
}

.record-big-mic-icon {
  font-size: 52px;
  color: white;
}

.record-timer-big {
  font-size: 36px;
  font-weight: 900;
  color: #0F172A;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.record-status-label {
  font-size: 14px;
  color: #2563EB;
  font-weight: 600;
  margin-bottom: 20px;
}

/* Sound Wave Canvas */
.waveform-canvas-box {
  width: 100%;
  height: 70px;
  margin-bottom: 30px;
}

#waveformCanvas {
  width: 100%;
  height: 100%;
}

/* Record Buttons Row */
.record-controls-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
}

.record-btn-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
}

.record-btn-circle-action {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #1E293B;
  transition: transform 0.2s;
}

.record-btn-circle-action:hover {
  transform: scale(1.05);
}

.record-btn-stop-red {
  background: #EF4444;
  border-color: #EF4444;
  color: white;
  box-shadow: 0 6px 18px rgba(239,68,68,0.35);
}

.record-btn-stop-red:hover {
  background: #DC2626;
}

/* SCREEN 3: PROCESSANDO (media_1791684896825_7b0e103f.png) */
.proc-top-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.proc-top-bar h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin-left: 14px;
}

.proc-center-art {
  width: 90px;
  height: 90px;
  margin: 10px auto 20px;
  border-radius: 24px;
  background: #EFF6FF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  box-shadow: 0 10px 25px rgba(37,99,235,0.15);
}

.proc-title-main {
  font-size: 20px;
  font-weight: 800;
  color: #0F172A;
  margin-bottom: 8px;
  text-align: center;
}

.proc-sub-main {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  max-width: 320px;
  margin: 0 auto 30px;
  line-height: 1.5;
}

.proc-steps-list {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

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

.proc-step-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 700;
  color: #1E293B;
}

.proc-check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.proc-check-done { background: #10B981; color: white; }
.proc-check-empty { border: 2px solid #CBD5E1; color: transparent; }

.proc-step-status {
  font-size: 13px;
  font-weight: 600;
}

.proc-status-green { color: #10B981; }
.proc-status-blue { color: #2563EB; }
.proc-status-gray { color: var(--text-light); }

.proc-bottom-card {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: #166534;
  line-height: 1.4;
}

/* SCREEN 5: TRANSCRIÇÃO (media_1791684912020_c1c45abb.png) */
.trans-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.trans-top-bar h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
}

.trans-tab-menu {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 18px;
}

.trans-tab-item {
  flex: 1;
  text-align: center;
  padding: 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.trans-tab-item.active {
  color: #2563EB;
  border-bottom-color: #2563EB;
}

.trans-search-input-wrap {
  position: relative;
  margin-bottom: 18px;
}

.trans-search-input-wrap input {
  width: 100%;
  padding: 12px 14px 12px 38px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: #F8FAFC;
  font-size: 13px;
  outline: none;
}

.trans-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  font-size: 14px;
}

.trans-dialogs-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-height: 380px;
  overflow-y: auto;
  padding-bottom: 10px;
}

.trans-line-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.trans-line-time {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
  white-space: nowrap;
}

.trans-line-speech {
  font-size: 14px;
  color: #334155;
  line-height: 1.5;
}

.trans-line-speaker {
  font-weight: 800;
  color: #0F172A;
}

/* Audio Player Bar at Bottom */
.audio-player-fixed-bar {
  background: #FFFFFF;
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  margin-top: 10px;
}

.player-btn-play {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #EFF6FF;
  border: none;
  color: #2563EB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.player-time-current {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.player-slider-wrap {
  flex: 1;
  display: flex;
  align-items: center;
}

.player-slider-wrap input[type=range] {
  width: 100%;
  accent-color: #2563EB;
  cursor: pointer;
}

.player-time-total {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 600;
}

.player-btn-speed {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2563EB;
  border: none;
  color: white;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

/* ==========================================================================
   SCREEN 6: QUESTIONÁRIO ULTRA-MODERNO (SIMULADOS & FIXAÇÃO)
   ========================================================================== */
.record-top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.record-title-box {
  text-align: center;
  flex: 1;
}

.record-title-box h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}

.record-title-box p {
  font-size: 12px;
  color: #64748B;
  margin-top: 2px;
  font-weight: 600;
}

.header-icon-btn {
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #1E293B;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.header-icon-btn:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Pílulas de quantidade de questões */
.quiz-chips-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.quiz-chip {
  padding: 8px 16px;
  background: #F1F5F9;
  border: 1.5px solid #E2E8F0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  transition: all 0.2s ease;
}
.quiz-chip:hover {
  border-color: #93C5FD;
  background: #EFF6FF;
  color: #2563EB;
}
.quiz-chip.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border-color: #2563EB;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* Barra de progresso e timer */
.quiz-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
#quizProgressText {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  letter-spacing: 0.3px;
}
.quiz-timer-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #FEF3C7;
  border: 1px solid #FDE68A;
  color: #B45309;
  font-size: 13px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
}

/* Card moderno da pergunta */
.quiz-question-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  padding: 22px 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.question-number-tag {
  display: inline-block;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  color: #2563EB;
  border: 1px solid #BFDBFE;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.question-text {
  font-size: 17px;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.45;
  margin-bottom: 20px;
}

/* Lista de alternativas */
.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.option-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.option-btn:hover:not(:disabled) {
  border-color: #93C5FD;
  background: #EFF6FF;
  transform: translateY(-1px);
}
.option-btn:active:not(:disabled) {
  transform: scale(0.99);
}
.option-letter {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #1E293B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  transition: all 0.2s;
}
.option-text {
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  flex: 1;
}

/* Feedback de resposta (correta ou incorreta) */
.option-btn.correct {
  border-color: #22C55E !important;
  background: #F0FDF4 !important;
}
.option-btn.correct .option-letter {
  background: #22C55E !important;
  border-color: #22C55E !important;
  color: #FFFFFF !important;
}
.option-btn.correct .option-text {
  color: #15803D !important;
  font-weight: 700;
}

.option-btn.wrong {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
}
.option-btn.wrong .option-letter {
  background: #EF4444 !important;
  border-color: #EF4444 !important;
  color: #FFFFFF !important;
}
.option-btn.wrong .option-text {
  color: #B91C1C !important;
}

.quiz-feedback-box {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 13px;
  line-height: 1.5;
  animation: modalPopIn 0.2s ease;
}

/* Botões de navegação do quiz */
.quiz-nav-btns {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.btn-secondary {
  padding: 13px 20px;
  background: #F1F5F9;
  border: 1px solid #CBD5E1;
  border-radius: 14px;
  color: #475569;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: #E2E8F0;
  color: #1E293B;
}
.btn-primary {
  flex: 1;
  padding: 13px 20px;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: none;
  border-radius: 14px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.2s;
}
.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

/* ==========================================================================
   SCREEN 7: CHAT DA AULA COM IA ULTRA-MODERNO (TUTOR PESSOAL 24/7)
   ========================================================================== */
.chat-class-header {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 18px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.chat-class-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #BFDBFE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.chat-class-info h4 {
  font-size: 14px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}
.chat-class-info p {
  font-size: 12px;
  color: #64748B;
  margin: 2px 0 0;
}
.chat-web-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 5px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

/* Container de mensagens */
.chat-messages-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 280px;
  max-height: 380px;
  overflow-y: auto;
  padding: 8px 4px 16px;
  scroll-behavior: smooth;
}

.chat-bubble {
  max-width: 85%;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
  animation: modalPopIn 0.2s ease;
}
.chat-bubble.assistant {
  align-self: flex-start;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  border-radius: 18px 18px 18px 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}
.chat-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border-radius: 18px 18px 4px 18px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
}

.chat-ref-box {
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-size: 11.5px;
  color: #334155;
}
.chat-ref-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  color: #2563EB;
  font-weight: 700;
}

/* Sugestões rápidas (Quick Prompts) */
.quick-prompts-bar {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  margin-bottom: 8px;
}
.quick-prompt-pill {
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.quick-prompt-pill:hover {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #2563EB;
  transform: translateY(-1px);
}

/* Barra de envio de mensagem */
.chat-input-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.08);
  margin-bottom: 20px;
  transition: border-color 0.2s;
}
.chat-input-bar:focus-within {
  border-color: #2563EB;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.chat-input-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 13.5px;
  color: #0F172A;
  background: transparent;
  font-family: inherit;
}
.chat-input-bar input::placeholder {
  color: #94A3B8;
}
.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  border: none;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.35);
  transition: all 0.2s;
}
.chat-send-btn:hover {
  transform: scale(1.05);
}
.chat-send-btn:active {
  transform: scale(0.95);
}

/* PAYWALL ULTRA-MODERNO (ASSINATURA PREMIUM STUDYMIND) */
.paywall-screen {
  padding: 16px 18px 90px;
  text-align: center;
  background: #FAFCFF;
}

.paywall-hero-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.paywall-hero-icon-glow {
  width: 68px;
  height: 68px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(37,99,235,0.12) 0%, rgba(124,58,237,0.16) 100%);
  border: 1px solid rgba(37,99,235,0.25);
  box-shadow: 0 12px 28px rgba(37,99,235,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
}

.paywall-trial-tag {
  background: rgba(245, 158, 11, 0.12);
  color: #D97706;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.paywall-title-premium {
  font-size: 23px;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.25;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.paywall-sub-premium {
  font-size: 13px;
  color: #64748B;
  line-height: 1.5;
  margin: 0 auto 24px;
  max-width: 340px;
}

.paywall-card-modern {
  border-radius: 24px;
  padding: 22px;
  text-align: left;
  margin-bottom: 18px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.paywall-card-modern:active {
  transform: scale(0.985);
}

.paywall-card-modern.featured-vip {
  background: linear-gradient(180deg, #FFFFFF 0%, #F5F9FF 100%);
  border: 2px solid #2563EB;
  box-shadow: 0 14px 35px rgba(37, 99, 235, 0.16);
}

.paywall-ribbon-popular {
  position: absolute;
  top: -12px;
  left: 20px;
  background: linear-gradient(135deg, #7C3AED 0%, #2563EB 100%);
  color: white;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 14px;
  border-radius: 9999px;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.35);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.paywall-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.paywall-plan-title-vip {
  font-size: 18px;
  font-weight: 900;
  color: #0F172A;
  line-height: 1.2;
}

.paywall-plan-subtitle {
  font-size: 12px;
  color: #64748B;
  font-weight: 500;
  margin-top: 2px;
}

.paywall-plan-sparkle {
  font-size: 20px;
}

.paywall-price-block {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.paywall-price-big {
  font-size: 32px;
  font-weight: 900;
  color: #2563EB;
  line-height: 1;
  letter-spacing: -1px;
}

.paywall-price-big.standard-color {
  color: #0F172A;
}

.paywall-price-period {
  font-size: 14px;
  color: #64748B;
  font-weight: 600;
  letter-spacing: 0;
  margin-left: 2px;
}

.paywall-price-details {
  font-size: 12px;
  color: #475569;
  font-weight: 600;
  margin-top: 6px;
}

.paywall-benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.paywall-benefits-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #334155;
  line-height: 1.35;
}

.benefit-check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #DCFCE7;
  color: #16A34A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  flex-shrink: 0;
}

.btn-paywall-cta {
  width: 100%;
  padding: 14px 18px;
  border-radius: 14px;
  border: none;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-paywall-gradient {
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-paywall-gradient:hover {
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.paywall-card-modern.standard {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
}

.paywall-plan-title-standard {
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
}

.btn-paywall-dark {
  background: #0F172A;
  color: #FFFFFF;
}

.btn-paywall-dark:hover {
  background: #1E293B;
}

.paywall-trust-box {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(241, 245, 249, 0.7);
  border-radius: 16px;
  border: 1px solid #E2E8F0;
}

.trust-icons-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.trust-guarantee-text {
  font-size: 11px;
  color: #64748B;
  margin: 0;
  line-height: 1.4;
}

/* BOTTOM NAVIGATION BAR (Fixed & Mobile-First with Safe Area Support) */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  height: 68px;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 1000;
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.05);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: #94A3B8;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s;
}

.nav-item.active {
  color: #2563EB;
}

.nav-item-icon {
  font-size: 20px;
}

/* ==========================================================================
   APP SIDE DRAWER (MENU HAMBÚRGUER DENTRO DO APP)
   ========================================================================== */
.dash-menu-icon {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #1E293B;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.dash-menu-icon:hover {
  background: #F1F5F9;
}

.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.side-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 82%;
  max-width: 330px;
  height: 100%;
  background: #FFFFFF;
  z-index: 9999;
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.15);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.side-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  color: #FFFFFF;
  padding: 24px 20px 20px;
  position: relative;
}
.drawer-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #FFFFFF;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.drawer-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.drawer-profile-card {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 8px;
}
.drawer-avatar-wrap {
  position: relative;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  cursor: pointer;
}
.drawer-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #3B82F6;
  object-fit: cover;
  background: #2563EB;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
.drawer-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.drawer-avatar-edit-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #2563EB;
  color: #FFF;
  font-size: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #0F172A;
}

.drawer-profile-info {
  flex: 1;
  min-width: 0;
}
.drawer-profile-name {
  font-size: 16px;
  font-weight: 800;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.drawer-profile-email {
  font-size: 12px;
  color: #94A3B8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}
.drawer-plan-pill {
  display: inline-block;
  background: rgba(37, 99, 235, 0.25);
  border: 1px solid rgba(59, 130, 246, 0.5);
  color: #93C5FD;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  -webkit-overflow-scrolling: touch;
}
.drawer-section-title {
  font-size: 11px;
  font-weight: 800;
  color: #94A3B8;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin: 14px 10px 6px;
}
.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: #1E293B;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.drawer-nav-item:hover, .drawer-nav-item:active {
  background: #F1F5F9;
  color: #2563EB;
}
.drawer-nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}
.drawer-badge-highlight {
  margin-left: auto;
  background: #EF4444;
  color: #FFF;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 999px;
}

.drawer-footer {
  padding: 14px 16px;
  border-top: 1px solid #E2E8F0;
  background: #F8FAFC;
}
.btn-drawer-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
  padding: 11px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-drawer-logout:hover {
  background: #FCA5A5;
  color: #991B1B;
}
.drawer-version-tag {
  text-align: center;
  font-size: 11px;
  color: #94A3B8;
  margin-top: 8px;
}

/* ==========================================================================
   AVATAR DINÂMICO NO HEADER DO DASHBOARD
   ========================================================================== */
.dash-avatar-container {
  position: relative;
  width: 38px;
  height: 38px;
  cursor: pointer;
  flex-shrink: 0;
}
.dash-avatar-circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid #E2E8F0;
  background: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s, border-color 0.2s;
}
.dash-avatar-container:hover .dash-avatar-circle {
  transform: scale(1.05);
  border-color: #2563EB;
}
.dash-avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.dash-avatar-badge-edit {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #2563EB;
  color: #FFF;
  font-size: 9px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #FFF;
}

/* ==========================================================================
   MODAL DE SELEÇÃO DE AVATAR & FOTO
   ========================================================================== */
.avatar-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.avatar-modal-card {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: modalPopIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalPopIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
.avatar-modal-header {
  padding: 20px 24px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E2E8F0;
}
.avatar-modal-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 0;
}
.avatar-modal-close {
  background: #F1F5F9;
  border: none;
  font-size: 16px;
  font-weight: 700;
  color: #64748B;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.avatar-modal-close:hover {
  background: #E2E8F0;
  color: #0F172A;
}

.avatar-modal-tabs {
  display: flex;
  padding: 12px 20px 0;
  gap: 8px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
.avatar-tab-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.avatar-tab-btn.active {
  color: #2563EB;
  border-bottom-color: #2563EB;
}

.avatar-modal-body {
  padding: 20px 24px;
  max-height: 60vh;
  overflow-y: auto;
}

/* Tab 1: Upload de Foto Própria */
.avatar-upload-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.avatar-preview-lg {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #2563EB;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}
.avatar-preview-lg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-file-label {
  background: #F1F5F9;
  border: 2px dashed #94A3B8;
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  cursor: pointer;
  width: 100%;
  transition: all 0.2s;
}
.avatar-file-label:hover {
  background: #EFF6FF;
  border-color: #2563EB;
}
.avatar-file-label span {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1E293B;
  margin-top: 6px;
}
.avatar-file-label small {
  font-size: 11px;
  color: #64748B;
}

/* Tab 2: Galeria de Avatares */
.avatar-grid-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.avatar-preset-item {
  aspect-ratio: 1;
  border-radius: 18px;
  border: 2px solid #E2E8F0;
  background: #F8FAFC;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  transition: all 0.2s ease;
  padding: 6px;
  position: relative;
}
.avatar-preset-item:hover {
  transform: translateY(-2px);
  border-color: #93C5FD;
  background: #EFF6FF;
}
.avatar-preset-item.selected {
  border-color: #2563EB;
  background: #EFF6FF;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.avatar-preset-item img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}
.avatar-preset-label {
  font-size: 10px;
  font-weight: 700;
  color: #64748B;
  margin-top: 3px;
}

.avatar-modal-footer {
  padding: 16px 24px 20px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  gap: 12px;
}
.btn-save-avatar {
  flex: 1;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  border: none;
  padding: 12px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
  transition: opacity 0.2s;
}
.btn-save-avatar:hover {
  opacity: 0.95;
}
.btn-cancel-modal {
  padding: 12px 18px;
  background: #F1F5F9;
  color: #475569;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

/* ==============================================
   ESTILOS MODERNOS DO MAPA MENTAL
============================================== */
.mindmap-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  margin-bottom: 16px;
}

.mindmap-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mindmap-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #4338CA;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.mindmap-subtitle {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
  font-weight: 500;
}

.mindmap-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mindmap-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.mindmap-action-btn span {
  font-size: 14px;
}

.mindmap-action-btn.btn-print {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
}
.mindmap-action-btn.btn-print:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: translateY(-1px);
}

.mindmap-action-btn.btn-whatsapp {
  background: #DCFCE7;
  color: #166534;
  border-color: #86EFAC;
}
.mindmap-action-btn.btn-whatsapp:hover {
  background: #BBF7D0;
  color: #14532D;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.25);
  transform: translateY(-1px);
}

.mindmap-action-btn.btn-email {
  background: #EFF6FF;
  color: #1E40AF;
  border-color: #BFDBFE;
}
.mindmap-action-btn.btn-email:hover {
  background: #DBEAFE;
  color: #1E3A8A;
  box-shadow: 0 3px 8px rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.mindmap-viewport {
  position: relative;
  width: 100%;
  min-height: 480px;
  height: 520px;
  background: radial-gradient(#CBD5E1 1px, #F8FAFC 1px);
  background-size: 20px 20px;
  border: 1.5px solid #E2E8F0;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.04);
}

.mindmap-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  z-index: 10;
}

.mindmap-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #334155;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s;
}
.mindmap-btn:hover {
  background: #F1F5F9;
  color: #2563EB;
  border-color: #93C5FD;
  transform: scale(1.05);
}

/* ==============================================
   ESTILOS MODERNOS DO RESUMO DA AULA
============================================== */
.summary-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-bottom: 24px;
}

.summary-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.summary-header-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.summary-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #2563EB;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

.summary-title {
  font-size: 18px;
  font-weight: 800;
  color: #0F172A;
  margin: 2px 0 0;
  letter-spacing: -0.3px;
}

.summary-subtitle {
  font-size: 12.5px;
  color: #64748B;
  margin: 0;
  font-weight: 500;
}

.summary-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.summary-action-btn span {
  font-size: 14px;
}

.summary-action-btn.btn-copy {
  background: #F8FAFC;
  color: #334155;
  border-color: #CBD5E1;
}
.summary-action-btn.btn-copy:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: translateY(-1px);
}

.summary-action-btn.btn-whatsapp {
  background: #DCFCE7;
  color: #166534;
  border-color: #86EFAC;
}
.summary-action-btn.btn-whatsapp:hover {
  background: #BBF7D0;
  color: #14532D;
  box-shadow: 0 3px 8px rgba(34, 197, 94, 0.25);
  transform: translateY(-1px);
}

.summary-action-btn.btn-print {
  background: #F1F5F9;
  color: #334155;
  border-color: #CBD5E1;
}
.summary-action-btn.btn-print:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: translateY(-1px);
}

/* Card Principal de Resumo */
.summary-card-main {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  padding: 22px 24px;
}

.summary-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid #F1F5F9;
  flex-wrap: wrap;
}

.summary-icon-pill {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  border: 1px solid #C7D2FE;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.12);
}

.summary-card-titles {
  flex: 1;
  min-width: 180px;
}

.summary-card-titles h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.summary-card-titles p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #64748B;
}

.summary-reading-time {
  font-size: 11.5px;
  font-weight: 700;
  color: #4F46E5;
  background: #EEF2FF;
  border: 1px solid #C7D2FE;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.summary-body-text {
  font-size: 15px;
  line-height: 1.8;
  color: #334155;
}

.summary-p {
  margin: 0 0 14px 0;
  color: #334155;
  line-height: 1.8;
  text-align: justify;
}
.summary-p:last-child {
  margin-bottom: 0;
}

.summary-p-lead {
  font-size: 15.5px;
  font-weight: 500;
  color: #0F172A;
  background: #F8FAFC;
  padding: 16px 20px;
  border-left: 4px solid #2563EB;
  border-radius: 0 12px 12px 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* Seção de Pontos Chave */
.summary-points-section {
  background: #FFFFFF;
  border-radius: 16px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  padding: 22px 24px;
}

.summary-section-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.summary-section-title-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  border: 1px solid #FCD34D;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.15);
  flex-shrink: 0;
}

.summary-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: #0F172A;
  letter-spacing: -0.2px;
}

.summary-section-subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #64748B;
}

.summary-points-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.summary-point-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 14px 18px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  transition: all 0.2s ease;
}

.summary-point-card:hover {
  background: #FFFFFF;
  border-color: #93C5FD;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

.summary-point-badge {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  margin-top: 2px;
}

.summary-point-body {
  flex: 1;
  min-width: 0;
}

.summary-point-header {
  margin-bottom: 4px;
}

.summary-point-tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  color: #1D4ED8;
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 2px 8px;
  border-radius: 6px;
  letter-spacing: 0.2px;
}

.summary-point-text {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.6;
  color: #334155;
}

/* Barra de Navegação Rápida */
.summary-quick-nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 20px;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

.summary-quick-nav-label {
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.summary-quick-nav-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.summary-nav-pill-btn {
  padding: 8px 16px;
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.summary-nav-pill-btn:hover {
  background: #2563EB;
  color: #FFFFFF;
  border-color: #2563EB;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS (< 480px)
   ========================================================================== */
@media (max-width: 480px) {
  .app-container {
    max-width: 100vw;
    border-radius: 0;
    box-shadow: none;
    padding-bottom: 84px;
  }

  .summary-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 14px 16px;
  }

  .summary-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .summary-action-btn {
    padding: 8px 4px;
    font-size: 11px;
    justify-content: center;
    text-align: center;
  }

  .summary-card-main,
  .summary-points-section {
    padding: 16px 14px;
  }

  .summary-point-card {
    padding: 12px 14px;
    gap: 12px;
  }

  .summary-quick-nav-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .summary-quick-nav-buttons {
    flex-direction: column;
  }

  .summary-nav-pill-btn {
    text-align: center;
  }

  .mindmap-header-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .mindmap-action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    width: 100%;
  }

  .mindmap-action-btn {
    padding: 9px 4px;
    font-size: 11.5px;
    justify-content: center;
    text-align: center;
  }

  .mindmap-viewport {
    height: 420px;
    min-height: 380px;
  }

  .lecture-tab-btn {
    font-size: 11px;
    padding: 10px 4px;
  }
}


