/* ═══════════════════════════════════════════
   الهائل v2.5 — Styles
   ═══════════════════════════════════════════ */

[hidden] { display: none !important; }

/* ── Local fonts ── */
@font-face {
  font-family: 'CairoEB';
  src: url('fonts/Cairo-ExtraBold.woff') format('woff');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'CairoEB';
  src: url('fonts/Cairo-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Tajawal';
  src: url('fonts/Tajawal-Bold.woff') format('woff');
  font-weight: 700 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'AmiriBold';
  src: url('fonts/Amiri-Bold.woff') format('woff');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}


/* ── Theme tokens ── */
:root {
  --fz: 24px;         /* حجم الخط الأساسي الجديد الافتراضي — يتغيّر بزر A+ / A- فقط */
  --ink:          #1E1B4B;
  --ink-2:        #312E81;
  --primary:      #7C3AED;
  --primary-2:    #6D28D9;
  --primary-soft: #EDE9FE;
  --accent:       #A855F7;
  --gold:         #F59E0B;
  --gold-soft:    #FEF3C7;
  --sage:         #10B981;
  --danger:       #EF4444;
  --danger-soft:  #FEE2E2;
  --surface:      #FFFFFF;
  --paper:        #FAF5FF;
  --line:         #DDD6FE;
  --text-soft:    #6B7280;
  --radius:       16px;
  --radius-sm:    10px;
  --shadow:       0 3px 20px rgba(124,58,237,.14);
  --font-ui:  'CairoEB', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-doc: 'CairoEB', 'Traditional Arabic', serif;
  --font-en:  'CairoEB', Georgia, serif;
}
[data-theme="navy"] {
  --ink:#16243F;--ink-2:#1E3A5F;--primary:#16243F;--primary-2:#1E3A5F;
  --primary-soft:#E8EDF5;--accent:#B8893E;--paper:#F1EDE3;--line:#D4C9B8;
  --shadow:0 3px 20px rgba(22,36,63,.13);
}
[data-theme="blue"] {
  --ink:#1E3A5F;--ink-2:#1E40AF;--primary:#1D4ED8;--primary-2:#1E40AF;
  --primary-soft:#DBEAFE;--accent:#60A5FA;--paper:#EFF6FF;--line:#BFDBFE;
  --shadow:0 3px 20px rgba(29,78,216,.12);
}
[data-theme="green"] {
  --ink:#1A3A2A;--ink-2:#047857;--primary:#059669;--primary-2:#047857;
  --primary-soft:#D1FAE5;--accent:#34D399;--paper:#F0FDF4;--line:#A7F3D0;
  --shadow:0 3px 20px rgba(5,150,105,.12);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  /* ثابت لا يتغيّر أبداً — المربعات والأزرار والـ padding مرتبطة به */
  font-size: 22px;
  height: 100%;
}
body {
  font-family: var(--font-ui);
  /* --fz هو الوحيد الذي يتغيّر عند A+ / A- — يكبّر النص فقط */
  font-size: var(--fz, 24px);
  background: var(--paper);
  color: var(--ink);
  min-height: 100%;
  overflow-x: hidden;
  line-height: 1.55;
}

/* تعديل ليكون خط CairoEB افتراضي 24px في كل العناصر بما فيها المدخلات والأزرار */
button, input, select, textarea { 
  font-family: var(--font-ui) !important; 
  font-size: var(--fz, 24px); 
  color: inherit;
}
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }

/* ═══ APP BAR ═══ */
.appbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0 0.75rem; height: 3.5rem;
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.22);
}
.appbar-btn {
  display: flex; align-items: center; justify-content: center;
  min-width: 2.4rem; height: 2.4rem; border-radius: var(--radius-sm);
  color: #fff; font-size: 0.8rem; font-weight: 700;
  background: rgba(255,255,255,.13); transition: background .15s;
  padding: 0 0.5rem;
}
.appbar-btn:active { background: rgba(255,255,255,.28); }
.appbar-title { flex: 1; font-size: 1.05rem; font-weight: 800; }
.appbar-actions { display: flex; align-items: center; gap: 0.3rem; flex-wrap: nowrap; }
.appbar-select {
  height: 2rem; padding: 0 0.4rem; border-radius: 6px; font-size: 0.72rem;
  background: rgba(255,255,255,.15); color: #fff; border: none; max-width: 88px;
}
.appbar-select option { background: var(--ink); color: #fff; }

/* ═══ VIEWS ═══ */
.view { min-height: calc(100vh - 3.5rem); }
.scroll-area { padding: 1rem; max-width: 700px; margin: 0 auto; }

/* ═══ HOME ═══ */
.home-hero {
  text-align: center; padding: 2.5rem 1.2rem 1.5rem;
  background: linear-gradient(160deg, var(--primary) 0%, var(--ink) 100%);
}
.home-title { font-size: 2rem; font-weight: 900; color: #fff; }
.home-sub   { font-size: 0.85rem; color: rgba(255,255,255,.72); margin-top: 0.3rem; }
.tiles {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; padding: 1.2rem 1rem;
  max-width: 520px; margin: 0 auto;
}
.tile {
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  padding: 1.8rem 1rem 1.5rem; border-radius: var(--radius);
  background: var(--surface); border: 1.5px solid var(--line);
  font-size: 1rem; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow); transition: transform .12s;
}
.tile:active { transform: scale(.96); }
.tile-icon { font-size: 2.2rem; }

/* ═══ CARDS ═══ */
.card {
  background: var(--surface); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 1.1rem 1rem;
  margin-bottom: 1rem; box-shadow: var(--shadow);
}
.card-title { font-size: 0.95rem; font-weight: 800; color: var(--ink); margin-bottom: 0.75rem; }
.card-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.card-hdr .card-title { margin-bottom: 0; }
.card-danger { border-color: var(--danger); }
.card-danger .card-title { color: var(--danger); }

/* ═══ GRID ═══ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
@media (max-width: 400px) { .grid-2 { grid-template-columns: 1fr; } }

/* ═══ FIELDS ═══ */
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field span { font-size: 0.78rem; font-weight: 600; color: var(--text-soft); }
.field input, .field select, .form-sel {
  height: 2.8rem; padding: 0 0.75rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--paper); color: var(--ink);
  transition: border-color .15s;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }
.form-sel { width: 100%; height: 2.8rem; }

/* ═══ SEGMENTED ═══ */
.segmented {
  display: flex; border-radius: var(--radius-sm); overflow: hidden;
  border: 1.5px solid var(--primary-soft);
}
.seg-scroll { overflow-x: auto; flex-wrap: nowrap; }
.seg-btn {
  flex: 1; min-width: 4.5rem; padding: 0.6rem 0.65rem;
  font-size: 0.8rem; font-weight: 600; color: var(--text-soft);
  background: var(--surface); transition: background .1s, color .1s;
  white-space: nowrap;
}
.seg-btn.active { background: var(--primary); color: #fff; }
.seg-btn + .seg-btn { border-right: 1px solid var(--primary-soft); }

/* ═══ SOURCE PANELS ═══ */
.src-panel { margin-top: 0.9rem; }
.hint { font-size: 0.82rem; color: var(--text-soft); line-height: 1.6; padding: 0.65rem 0.75rem; background: var(--primary-soft); border-radius: var(--radius-sm); }
.big-ta {
  width: 100%; min-height: 7rem; padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  background: var(--paper); color: var(--ink);
  resize: vertical; line-height: 1.6;
}
.big-ta:focus { outline: none; border-color: var(--primary); }
.thumbs-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.6rem 0; }
.thumbs-grid img { width: 3.5rem; height: 3.5rem; object-fit: cover; border-radius: 6px; border: 1.5px solid var(--line); }
.extracted-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.4rem; font-size: 0.8rem; font-weight: 600; }
.page-range { display: flex; gap: 0.75rem; align-items: center; margin: 0.6rem 0; }
.pg-input { width: 3.5rem; height: 2.2rem; padding: 0 0.4rem; text-align: center; border-radius: 6px; border: 1.5px solid var(--line); background: var(--paper); }
.file-name { display: block; font-size: 0.75rem; color: var(--text-soft); margin: 0.5rem 0; }

/* ═══ PROGRESS ═══ */
.prog-wrap { margin: 0.6rem 0; }
.prog-bar { height: 6px; background: var(--line); border-radius: 4px; overflow: hidden; }
.prog-fill { height: 100%; background: var(--primary); border-radius: 4px; width: 0; transition: width .3s; }
.prog-label { display: block; font-size: 0.72rem; color: var(--text-soft); margin-top: 0.25rem; }

/* ═══ BUTTONS ═══ */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  height: 2.8rem; padding: 0 1.2rem; border-radius: var(--radius-sm);
  background: var(--primary); color: #fff; font-size: 0.95rem; font-weight: 700;
  box-shadow: 0 2px 10px rgba(124,58,237,.25); transition: background .15s;
}
.btn-primary:active { background: var(--primary-2); }
.btn-primary.btn-lg { height: 3.2rem; width: 100%; margin-top: 0.75rem; font-size: 1rem; border-radius: var(--radius); }
.btn-sec {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 2.6rem; padding: 0 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--primary); color: var(--primary);
  font-size: 0.85rem; font-weight: 600; transition: background .15s;
}
.btn-sec:active { background: var(--primary-soft); }
.btn-sm { height: 2.1rem; padding: 0 0.75rem; border-radius: 6px; border: 1.5px solid var(--line); font-size: 0.78rem; font-weight: 600; }
.btn-accent-sm { height: 2rem; padding: 0 0.65rem; border-radius: 6px; background: var(--accent); color: #fff; font-size: 0.75rem; font-weight: 700; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 0.4rem;
  height: 2.6rem; padding: 0 1rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--danger); color: var(--danger);
  font-size: 0.85rem; font-weight: 600; margin-top: 0.5rem;
}
.btn-danger:active { background: var(--danger-soft); }
.backup-row { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.key-row { display: flex; gap: 0.5rem; align-items: center; }
.key-inp { flex: 1; height: 2.8rem; padding: 0 0.75rem; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: var(--paper); }

/* ═══ TOOLBAR ═══ */
.toolbar {
  display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
  padding: 0.5rem 0.75rem; background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 3.5rem; z-index: 40;
}
.toolbtn {
  display: inline-flex; align-items: center; gap: 0.25rem;
  height: 2.2rem; padding: 0 0.65rem; border-radius: 8px;
  border: 1.5px solid var(--line); background: var(--surface);
  font-size: 0.78rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; transition: background .12s;
}
.toolbtn:active { background: var(--primary-soft); }
.toolbtn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.toolbtn-primary:active { background: var(--primary-2); }
.toolbtn-danger { color: var(--danger); border-color: #FECACA; }
.toolbtn-danger:active { background: var(--danger-soft); }
.edit-bar {
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
  padding: 0.5rem 0.75rem;
  background: var(--gold-soft); border-bottom: 1px solid var(--gold);
  position: sticky; top: calc(3.5rem + 2.8rem); z-index: 39;
}
.edit-label { font-size: 0.78rem; font-weight: 700; flex: 1; }
[contenteditable="true"]  { outline: 1.5px dashed var(--gold); border-radius: 3px; background: #FFFCF3; cursor: text; }
[contenteditable="true"]:focus { outline-color: var(--primary); background: #F4FAF7; }

/* ═══ PLAN OUTPUT ═══ */
.plan-output { overflow-x: auto; padding: 0.9rem; transition: all 0.25s ease; }

/* وضع تحسين العرض على الهاتف - يلغي الحد الأدنى العريض ويجعل النص يلتف بمرونة تلقائية */
.plan-output.mobile-optimized .plan-doc,
.plan-output.mobile-optimized .plan-ppp {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.plan-output.mobile-optimized table {
  display: block !important;
  width: 100% !important;
  overflow-x: auto !important;
}
.plan-output.mobile-optimized td,
.plan-output.mobile-optimized th {
  white-space: normal !important;
  word-break: break-word !important;
}

/* ── الخطط الدرسية والجداول معدلة لخط 16px وتغليظ الحدود وتوضيحها ── */
.plan-table, .ppp-table {
  font-size: 16px !important; /* تثبيت خط الخطط على 16px لعدم التأثر بالتكبير */
}
.plan-table td, .plan-table th,
.ppp-table td, .ppp-table th {
  border: 2px solid #1E1B4B !important; /* تغلظ وتوضيح الحدود لجعل التسطير أسمك والحدود أوضح */
  font-size: 16px !important;
}

/* ── Arabic Official Form ── */
.plan-doc { min-width: 780px; font-family: 'Traditional Arabic','Haael-Arabic',serif; background: #fff; }
.plan-letterhead {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 12px; border: 2px solid #1E1B4B; border-bottom: none; background: #fff;
}
.lh-right, .lh-left { font-size: 11px; line-height: 1.7; text-align: center; color: #1E1B4B; }
.lh-center { text-align: center; }
.plan-mainTitle {
  font-size: 15px; font-weight: 900;
  border: 1.5px solid #1E1B4B; padding: 4px 18px; display: inline-block; color: #1E1B4B;
}
.blank-line { display: inline-block; min-width: 80px; border-bottom: 1px solid #333; }
.plan-table { width: 100%; border-collapse: collapse; }
.plan-meta-table .meta-label { background: #f0ecff; font-weight: 700; font-size: 12px; }
.plan-meta-table .meta-value { min-width: 60px; }
.plan-main-table thead th { background: #e0d4ff; font-weight: 800; }
.vertical-text { writing-mode: vertical-rl; text-orientation: mixed; white-space: nowrap; min-width: 28px; }
.step-cell { writing-mode: vertical-rl; text-orientation: mixed; font-weight: 800; min-width: 34px; background: #f5f0ff; }
.col-step   { width: 34px; }
.col-domain { width: 34px; }
.col-level  { width: 34px; }
.col-time   { width: 42px; }
.col-obj    { width: 22%; }
.col-teacher{ width: 20%; }
.col-student{ width: 20%; }
.col-assess { width: 15%; }
.cell-list  { list-style: none; padding: 0; margin: 0; text-align: right; }
.cell-list li::before { content: "• "; }
.cell-list li { font-size: 14px; line-height: 1.5; margin-bottom: 2px; }
.domain-level-stack { display: flex; flex-direction: column; gap: 3px; }
.domain-level-stack span { font-size: 12px; border: 1px solid #ccc; border-radius: 3px; padding: 1px 3px; }
.cell-empty { color: #aaa; }
.plan-footer-table .footer-label { font-weight: 700; background: #f5f0ff; width: 25%; }
.plan-doc-footnote { font-size: 10.5px; text-align: center; margin-top: 5px; color: #555; }

/* ── English PPP Template ── */
.plan-ppp {
  min-width: 780px; background: #fff; border-radius: 12px;
  border: 2px solid #1B3A6B; overflow: hidden;
}
.ppp-header { background: #1B3A6B; color: #fff; text-align: center; padding: 10px; }
.ppp-header h2 { font-size: 20px; letter-spacing: 1px; font-family: Georgia,serif; }
.ppp-meta {
  display: flex; gap: 0; border-bottom: 2px solid #1B3A6B;
  padding: 6px 12px; font-size: 13px; font-family: Georgia,serif;
  font-style: italic; justify-content: space-between; background: #f8faff;
}
.ppp-info-row { display: flex; border-bottom: 2px solid #1B3A6B; }
.ppp-info-cell { flex: 1; border-right: 2px solid #1B3A6B; padding: 5px 8px; text-align: center; font-size: 12px; background: #fff; }
.ppp-info-cell:last-child { border-right: none; }
.ppp-info-cell.blue   { border-top: 3px solid #2563EB; }
.ppp-info-cell.orange { border-top: 3px solid #EA580C; }
.ppp-info-cell.green  { border-top: 3px solid #16A34A; }
.ppp-info-cell.red    { border-top: 3px solid #DC2626; }
.ppp-info-cell b { display: block; font-size: 11px; margin-bottom: 2px; color: #555; }
.ppp-badges { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 10px; border-bottom: 2px solid #e5e7eb; background: #f9f9ff; }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.badge-s { background: #EDE9FE; color: #5B21B6; }
.badge-r { background: #DBEAFE; color: #1E40AF; }
.ppp-aims { border-bottom: 2px solid #e5e7eb; }
.ppp-aims-hdr { background: #DC2626; color: #fff; padding: 5px 10px; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.ppp-aims-hdr i { font-weight: 400; font-style: italic; color: rgba(255,255,255,.9); }
.ppp-aims-body { padding: 6px 12px; background: #fff9f9; }
.ppp-aims-body ul { list-style: disc; padding-left: 18px; }
.ppp-aims-body li { line-height: 1.7; font-size: 14px; }
.ppp-table { width: 100%; border-collapse: collapse; }
.ppp-table th { background: #2563EB; color: #fff; padding: 7px 8px; font-size: 14px; text-align: center; }
.ppp-table td { padding: 7px 8px; vertical-align: top; line-height: 1.55; }
.ppp-table .col-stage { width: 110px; }
.ppp-table .col-time  { width: 50px; text-align: center; }
.stage-lbl { font-weight: 800; font-size: 13px; display: flex; align-items: center; gap: 5px; }
.stage-warmup .stage-lbl { color: #D97706; }
.stage-pres   .stage-lbl { color: #2563EB; }
.stage-prac   .stage-lbl { color: #0D9488; }
.stage-prod   .stage-lbl { color: #EA580C; }
.stage-cons   .stage-lbl { color: #16A34A; }
.stage-warmup td:first-child { border-right: 5px solid #D97706 !important; }
.stage-pres   td:first-child { border-right: 5px solid #2563EB !important; }
.stage-prac   td:first-child { border-right: 5px solid #0D9488 !important; }
.stage-prod   td:first-child { border-right: 5px solid #EA580C !important; }
.stage-cons   td:first-child { border-right: 5px solid #16A34A !important; }
.ppp-footer { display: flex; border-top: 2px solid #1B3A6B; }
.ppp-hw  { flex: 1; padding: 8px 10px; border-right: 2px solid #1B3A6B; font-size: 14px; }
.ppp-hw-lbl  { font-weight: 800; color: #7C3AED; font-size: 14px; margin-bottom: 4px; }
.ppp-eval { flex: 1; padding: 8px 10px; font-size: 14px; }
.ppp-eval-lbl  { font-weight: 800; color: #1D4ED8; font-size: 14px; margin-bottom: 4px; }
.ppp-eval-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.ppp-eval-tag { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #DBEAFE; color: #1D4ED8; }
.ppp-footnote { text-align: center; padding: 5px; font-size: 10px; color: #888; font-style: italic; border-top: 1px solid #e5e7eb; }

/* ═══ ARCHIVE ═══ */
.view#view-archive { display: flex; flex-direction: column; }
.arch-search-wrap { padding: 0.75rem; border-bottom: 1px solid var(--line); }
.search-inp {
  width: 100%; height: 2.8rem; padding: 0 0.75rem; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); background: var(--paper);
}
.search-inp:focus { outline: none; border-color: var(--primary); }
.archive-list { flex: 1; overflow-y: auto; }
.archive-item {
  display: flex; align-items: center; gap: 0.5rem; padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.archive-item:active, .archive-item.selected { background: var(--primary-soft); }
.archive-item-main { flex: 1; overflow: hidden; }
.archive-item-main strong { display: block; font-size: 0.9rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.archive-item-main span { font-size: 0.75rem; color: var(--text-soft); }
.archive-item-badge { padding: 0.15rem 0.5rem; border-radius: 999px; font-size: 0.65rem; font-weight: 800; background: var(--primary-soft); color: var(--primary); }

/* ═══ LIBRARY ═══ */
.book-item {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.75rem;
  border-radius: var(--radius-sm); background: var(--paper);
  border: 1px solid var(--line); margin-bottom: 0.5rem;
}
.book-icon { font-size: 1.5rem; }
.book-info { flex: 1; }
.book-name { font-size: 0.88rem; font-weight: 700; }
.book-meta { font-size: 0.72rem; color: var(--text-soft); }
.book-del  { color: var(--danger); font-size: 1rem; }

/* ═══ MODAL ═══ */
.modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(30,27,75,.5); backdrop-filter: blur(3px);
  display: none; align-items: flex-end; justify-content: center;
}
.modal-bg.is-active { display: flex; }
@media (min-width: 500px) { .modal-bg { align-items: center; padding: 1.2rem; } }
.modal-card {
  background: var(--surface); border-radius: var(--radius) var(--radius) 0 0;
  width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
@media (min-width: 500px) { .modal-card { border-radius: var(--radius); } }
.modal-hdr { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.modal-hdr h2 { font-size: 1rem; font-weight: 800; }
.modal-close { font-size: 1.2rem; color: var(--text-soft); }
.modal-body { padding: 1.1rem; }
.modal-body h3 { font-size: 0.9rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--primary); }
.help-ol { padding-right: 1.2rem; }
.help-ol li { font-size: 0.85rem; line-height: 1.9; margin-bottom: 0.25rem; }
.help-note { background: var(--gold-soft); border: 1px solid var(--gold); border-radius: 8px; padding: 0.5rem 0.75rem; font-size: 0.78rem; margin-top: 0.5rem; }
.whatsapp-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-top: 1.2rem; padding: 0.8rem; border-radius: var(--radius-sm);
  background: #25D366; color: #fff; font-weight: 700; font-size: 0.9rem;
}

/* ═══ OVERLAY + TOAST ═══ */
.overlay {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(30,27,75,.55); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center;
}
.overlay.is-active { display: flex; }
.overlay-card {
  background: var(--surface); border-radius: 18px;
  padding: 2rem 1.8rem; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  max-width: 280px; box-shadow: var(--shadow);
}
.seal-spin svg { animation: spin 1.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay-card p { font-size: 0.82rem; color: var(--text-soft); line-height: 1.7; white-space: pre-line; }
.toast {
  position: fixed; bottom: 1.4rem; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff;
  padding: 0.7rem 1.2rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; z-index: 180;
  max-width: 90%; text-align: center; display: none;
}
.toast.is-active   { display: block; }
.toast.toast-error { background: var(--danger); }
.toast.toast-success { background: var(--sage); }

/* ═══ MISC ═══ */
.empty-state { text-align: center; color: var(--text-soft); font-size: 0.85rem; padding: 2rem 1.2rem; }
.ver-tag     { text-align: center; font-size: 0.7rem; color: var(--text-soft); padding: 1.2rem; }

/* ═══ PRINT ═══ */
@media print {
  .appbar,.toolbar,.edit-bar,.overlay,.toast,.modal-bg { display: none !important; }
  body, .plan-output { background: #fff; }
  .plan-output { overflow: visible; padding: 0; }
  .plan-doc, .plan-ppp { min-width: 0 !important; max-width: 100% !important; width: 100% !important; box-shadow: none; }
  .plan-table, .ppp-table { font-size: 14px !important; width: 100% !important; }
  .plan-table td, .plan-table th, .ppp-table td, .ppp-table th { font-size: 14px !important; }
  @page { size: A4 landscape; margin: 5mm; }
}

