:root {
  --emerald-950: #072415;
  --emerald-900: #0d3b22;
  --emerald-800: #145331;
  --emerald-700: #1b6b3a;
  --emerald-600: #228449;
  --emerald-500: #10b981;
  --emerald-100: #e3f5ec;
  --emerald-50: #f2fbf6;
  
  --orange-600: #ea580c;
  --orange-500: #f97316;
  --orange-100: #ffedd5;
  
  --word-blue: #185abd;
  --pdf-red: #c92a2a;
  --gmail-red: #dc2626;
  
  --bg-canvas: #f7f9f7;
  --surface-card: #ffffff;
  --surface-subtle: #f9fbf9;
  --text-primary: #111c16;
  --text-secondary: #4a5d52;
  --text-muted: #718579;
  --border-subtle: #dfe8e2;
  --border-strong: #c5d6cc;
  
  --shadow-xs: 0 1px 3px rgba(13, 59, 34, 0.04);
  --shadow-sm: 0 4px 12px -2px rgba(13, 59, 34, 0.06), 0 2px 6px -1px rgba(13, 59, 34, 0.04);
  --shadow-md: 0 12px 28px -6px rgba(13, 59, 34, 0.09), 0 4px 10px -2px rgba(13, 59, 34, 0.04);
  --shadow-lg: 0 20px 40px -10px rgba(13, 59, 34, 0.14);
  
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  line-height: 1.55;
  padding-bottom: 56px;
  position: relative;
  overflow-x: hidden;
}

/* Decorative Subtle Background Glows */
.bg-decor {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.45;
}

.bg-decor-1 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #bbf7d0 0%, transparent 70%);
  top: -120px;
  left: -100px;
}

.bg-decor-2 {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #fed7aa 0%, transparent 70%);
  top: 80px;
  right: -120px;
}

.app-container {
  max-width: 980px;
  margin: 0 auto;
  padding: 18px 18px;
}

/* =========================================
   HERO HEADER
   ========================================= */
.hero-header {
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-900) 50%, var(--emerald-700) 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  margin-bottom: 18px;
  color: #ffffff;
}

.hero-glow {
  position: absolute;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(249, 115, 22, 0.25) 0%, transparent 70%);
  right: -60px;
  bottom: -80px;
  pointer-events: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 18px;
  z-index: 1;
}

.logo-squircle {
  width: 62px;
  height: 62px;
  background: #ffffff;
  border-radius: 16px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.header-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.brand-eyebrow {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fde047;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.hero-header h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.school-subtitle {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.84);
  font-weight: 500;
  margin-top: 3px;
}

.header-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 1;
}

.header-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.pill-emerald {
  background: rgba(16, 185, 129, 0.22);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #d1fae5;
}

.pill-glass {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.28);
}

/* =========================================
   MOBILE QR CONNECTION BANNER
   ========================================= */
.mobile-access-banner {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f1f9f4 100%);
  border: 1px solid #c3e4cf;
  border-radius: var(--radius-lg);
  padding: 16px 22px;
  margin-bottom: 18px;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.qr-box {
  background: #ffffff;
  padding: 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-xs);
  flex-shrink: 0;
}

.qr-box img {
  width: 82px;
  height: 82px;
  display: block;
  border-radius: 4px;
}

.banner-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 2px 8px;
  border-radius: 99px;
  margin-bottom: 4px;
}

.banner-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--emerald-950);
  margin-bottom: 2px;
}

.banner-info p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.url-badge {
  background: #ffffff;
  border: 1px solid var(--border-strong);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  font-family: 'Consolas', monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--emerald-800);
}

.btn-copy-url {
  background: var(--emerald-700);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-copy-url:hover {
  background: var(--emerald-900);
}

.btn-close-banner {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.btn-close-banner:hover {
  background: rgba(0, 0, 0, 0.05);
}

/* =========================================
   NAVIGATION TABS
   ========================================= */
.nav-tabs {
  display: flex;
  gap: 10px;
  background: #e9f0ec;
  padding: 6px;
  border-radius: var(--radius-lg);
  margin-bottom: 18px;
}

.tab-btn {
  flex: 1;
  padding: 12px 18px;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.22s ease;
}

.tab-btn.active {
  background: var(--surface-card);
  color: var(--emerald-900);
  box-shadow: var(--shadow-sm);
}

.tab-counter {
  background: var(--emerald-100);
  color: var(--emerald-800);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 99px;
  font-weight: 800;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* =========================================
   CARDS & SECTIONS
   ========================================= */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.section-title-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-badge {
  background: linear-gradient(135deg, var(--emerald-800), var(--emerald-600));
  color: #ffffff;
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
  margin-top: 2px;
}

.section-title-group h2 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--emerald-950);
  letter-spacing: -0.01em;
}

.card-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Method Toggle */
.method-toggle {
  display: flex;
  background: #eff4f1;
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}

.toggle-btn {
  flex: 1;
  padding: 11px 14px;
  border: none;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.toggle-btn.active {
  background: #ffffff;
  color: var(--emerald-800);
  box-shadow: var(--shadow-xs);
}

.entry-mode-container {
  display: none;
}

.entry-mode-container.active {
  display: block;
}

/* Upload Dropzone */
.drop-zone {
  border: 2px dashed var(--emerald-600);
  background: linear-gradient(180deg, var(--emerald-50) 0%, #ffffff 100%);
  border-radius: var(--radius-lg);
  padding: 32px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s ease;
}

.drop-zone:hover {
  background: var(--emerald-100);
  border-color: var(--emerald-800);
  transform: translateY(-1px);
}

.upload-icon-circle {
  width: 58px;
  height: 58px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 12px auto;
  box-shadow: var(--shadow-sm);
}

.drop-zone h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--emerald-900);
  margin-bottom: 4px;
}

.file-hint {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.selected-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  background: var(--emerald-800);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 99px;
  font-size: 0.84rem;
  font-weight: 700;
}

textarea#raw-text-input {
  width: 100%;
  min-height: 150px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-subtle);
  font-family: inherit;
  font-size: 0.92rem;
  resize: vertical;
  background: var(--surface-subtle);
  transition: all 0.2s;
}

textarea#raw-text-input:focus {
  outline: none;
  border-color: var(--emerald-600);
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(34, 132, 73, 0.1);
}

/* =========================================
   FORM FIELDS & AUTO-SIZING TEXTAREAS
   ========================================= */
.student-info-panel {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.span-2 {
  grid-column: span 2;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.field-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--emerald-700);
  background: var(--emerald-100);
  padding: 2px 8px;
  border-radius: 6px;
}

label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--emerald-950);
  margin-bottom: 5px;
}

input[type="text"],
textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  color: var(--text-primary);
  background: #ffffff;
  transition: all 0.18s ease;
}

input.input-highlight {
  font-weight: 700;
  font-size: 1rem;
  border-color: var(--border-strong);
}

input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--emerald-600);
  box-shadow: 0 0 0 3px rgba(34, 132, 73, 0.12);
}

/* Modern CSS field-sizing: content for pedagogical textareas */
textarea.auto-grow-textarea,
textarea.secao-conteudo-input {
  field-sizing: content;
  height: auto;
  width: 100%;
  min-block-size: 3lh;
  max-block-size: 12lh;
  line-height: 1.55;
  resize: vertical;
}

.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 18px; }
.mt-5 { margin-top: 26px; }
.w-100 { width: 100%; }

/* =========================================
   8 PEDAGOGICAL SECTIONS CARDS
   ========================================= */
.secoes-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--emerald-100);
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}

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

.secoes-section-header h3 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--emerald-900);
}

.secoes-count-pill {
  background: var(--emerald-800);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 99px;
}

.secoes-subhint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-add-chip {
  background: var(--emerald-50);
  border: 1px solid var(--emerald-600);
  color: var(--emerald-800);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 99px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-add-chip:hover {
  background: var(--emerald-700);
  color: #ffffff;
}

.secao-item-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-xs);
}

.secao-item-card.filled {
  border-left-color: var(--emerald-600);
  background: linear-gradient(90deg, #f7fcf9 0%, #ffffff 30%);
}

.secao-item-card:focus-within {
  border-color: var(--emerald-600);
  border-left-width: 5px;
  box-shadow: var(--shadow-sm);
}

.secao-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.secao-title-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.secao-num-badge {
  background: var(--emerald-800);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

.secao-titulo-input {
  font-weight: 800 !important;
  color: var(--emerald-950) !important;
  font-size: 0.86rem !important;
  width: 100% !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  padding: 4px 6px !important;
  text-overflow: ellipsis;
}

.secao-titulo-input:focus {
  border-color: var(--border-strong) !important;
  background: #ffffff !important;
}

.secao-status-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-filled {
  background: #d1fae5;
  color: #065f46;
}

.status-empty {
  background: #f1f5f9;
  color: #64748b;
}

.btn-remove-secao {
  background: #fee2e2;
  border: none;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 3px 8px;
  border-radius: 6px;
}

/* Aulas Extras 2x2 Grid */
.aulas-extras-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.aula-extra-card {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.aula-extra-card .secao-titulo-input {
  color: var(--orange-600) !important;
}

.signatures-panel {
  background: #f8faf9;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
}

.panel-mini-title {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

/* =========================================
   BUTTONS & CTA
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.94rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-emerald-soft {
  background: var(--emerald-100);
  color: var(--emerald-900);
  border: 1px solid #b7e4c7;
}

.btn-emerald-soft:hover {
  background: #ccebd7;
}

.btn-ghost {
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--emerald-50);
  color: var(--emerald-900);
}

.btn-ghost-light {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-ghost-light:hover {
  background: rgba(255, 255, 255, 0.26);
}

.btn-danger-soft {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

.btn-cta-generate {
  background: linear-gradient(135deg, var(--emerald-900) 0%, var(--emerald-700) 60%, var(--emerald-600) 100%);
  color: #ffffff;
  padding: 18px 28px;
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 24px -4px rgba(20, 83, 49, 0.4);
  gap: 14px;
}

.btn-cta-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -4px rgba(20, 83, 49, 0.5);
}

.cta-sparkle {
  font-size: 1.6rem;
}

.cta-text-col {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.cta-text-col strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
}

.cta-text-col small {
  font-size: 0.78rem;
  opacity: 0.88;
  font-weight: 500;
}

/* =========================================
   VALIDATION STUDIO & PREVIEW
   ========================================= */
.validation-studio-card {
  padding: 0;
  overflow: hidden;
  border: 2px solid var(--emerald-700);
  box-shadow: var(--shadow-lg);
}

.validation-banner {
  background: linear-gradient(135deg, var(--emerald-950) 0%, var(--emerald-800) 100%);
  color: #ffffff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.val-check-badge {
  width: 44px;
  height: 44px;
  background: var(--emerald-500);
  color: var(--emerald-950);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 900;
  flex-shrink: 0;
}

.val-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #6ee7b7;
}

.validation-banner h3 {
  font-size: 1.18rem;
  font-weight: 800;
}

.validation-banner p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.82);
}

.studio-actions-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 12px;
  padding: 20px 24px 14px 24px;
  background: #ffffff;
}

.studio-action-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
}

.studio-action-btn:hover {
  transform: translateY(-2px);
}

.st-icon {
  font-size: 1.65rem;
  flex-shrink: 0;
}

.st-info {
  display: flex;
  flex-direction: column;
}

.st-info strong {
  font-size: 0.94rem;
  font-weight: 800;
}

.st-info span {
  font-size: 0.74rem;
  opacity: 0.9;
}

.btn-gmail {
  background: linear-gradient(135deg, #dc2626 0%, #ea580c 100%);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(220, 38, 38, 0.25);
}

.btn-word {
  background: #eff6ff;
  border: 1.5px solid #bfdbfe;
  color: var(--word-blue);
}

.btn-pdf {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: var(--pdf-red);
}

.storage-smart-bar {
  margin: 0 24px 18px 24px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--emerald-900);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.preview-studio-frame {
  background: #262b28;
  border-top: 1px solid #1a1e1c;
}

.preview-toolbar {
  background: #181c1a;
  padding: 10px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.preview-tabs {
  display: flex;
  gap: 6px;
}

.preview-tab {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  border: none;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.preview-tab.active {
  background: var(--emerald-600);
  color: #ffffff;
}

.preview-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
}

.btn-zoom {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.preview-sheet-viewport {
  padding: 24px 12px;
  display: flex;
  justify-content: center;
  overflow-x: auto;
}

.a4-paper-preview {
  background: #ffffff;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
  width: 100%;
  max-width: 794px;
  padding: 18px 24px;
  border-radius: 3px;
  transform-origin: top center;
  transition: transform 0.2s ease;
}

.preview-pdf-viewport {
  width: 100%;
  height: 780px;
  background: #262b28;
}

#pdf-iframe-viewer {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================
   HISTORY LIST
   ========================================= */
.history-controls {
  display: flex;
  gap: 8px;
}

.file-list {
  list-style: none;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  background: var(--surface-subtle);
  transition: all 0.2s;
}

.file-item:hover {
  border-color: var(--emerald-600);
  background: #ffffff;
  box-shadow: var(--shadow-xs);
}

.file-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-icon {
  font-size: 1.5rem;
}

.file-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--emerald-950);
}

.file-actions {
  display: flex;
  gap: 8px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 36px 0;
  font-size: 0.92rem;
}

/* =========================================
   LOADING & TOAST
   ========================================= */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7, 36, 21, 0.65);
  backdrop-filter: blur(4px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.loading-box {
  background: #ffffff;
  border-radius: var(--radius-xl);
  padding: 30px 26px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: var(--shadow-lg);
}

.spinner-ring {
  width: 48px;
  height: 48px;
  border: 4px solid var(--emerald-100);
  border-top-color: var(--emerald-700);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 0 auto 16px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.toast-notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--emerald-950);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  transform: translateY(120%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* =========================================
   RESPONSIVE (MOTOROLA G84 / MOBILE)
   ========================================= */
@media (max-width: 720px) {
  .mobile-access-banner {
    display: none !important;
  }

  .app-container {
    padding: 10px 10px;
  }

  .hero-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 18px 18px;
  }

  .header-badges {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
  }

  .card {
    padding: 18px 14px;
  }

  .card-header-row {
    flex-direction: column;
  }

  .form-grid,
  .aulas-extras-grid,
  .studio-actions-grid {
    grid-template-columns: 1fr;
  }

  .form-group.span-2 {
    grid-column: span 1;
  }

  .validation-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .a4-paper-preview {
    padding: 10px 8px;
    font-size: 86%;
  }
}
