:root {
  --navy: #073f65;
  --blue: #0b628f;
  --blue-2: #167cab;
  --blue-pale: #eaf6fb;
  --green: #39752f;
  --green-2: #73a944;
  --green-pale: #eef7e9;
  --orange: #f7941d;
  --orange-pale: #fff2df;
  --red: #c51f2a;
  --gold: #e7c36c;
  --ink: #152637;
  --muted: #657786;
  --line: #dce7ec;
  --bg: #f2f7f9;
  --white: #ffffff;
  --danger: #b42318;
  --warning-bg: #fff7e6;
  --shadow: 0 20px 55px rgba(7, 63, 101, .10);
  --shadow-soft: 0 12px 34px rgba(7, 63, 101, .08);
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  background:
    radial-gradient(circle at 8% 30%, rgba(247, 148, 29, .08), transparent 24rem),
    radial-gradient(circle at 92% 54%, rgba(57, 117, 47, .08), transparent 25rem),
    linear-gradient(180deg, #f7fbfc 0%, var(--bg) 46%, #eef5f7 100%);
  color: var(--ink);
  min-height: 100vh;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .3;
  background-image: radial-gradient(rgba(11, 98, 143, .13) .7px, transparent .7px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, transparent, #000 22%, #000 80%, transparent);
}
button, input, textarea, select { font: inherit; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(22, 124, 171, .24);
  outline-offset: 3px;
}
[hidden] { display: none !important; }
img { max-width: 100%; }

.top-ribbon {
  height: 5px;
  background: linear-gradient(90deg, var(--green) 0 26%, var(--gold) 26% 38%, var(--red) 38% 52%, var(--orange) 52% 72%, var(--blue) 72% 100%);
}

.app-header {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: white;
  background:
    linear-gradient(123deg, rgba(4, 45, 73, .98) 0%, rgba(7, 78, 115, .98) 48%, rgba(9, 99, 132, .97) 100%);
  min-height: 440px;
}
.app-header::after {
  content: "";
  position: absolute;
  inset: auto -12% -46% -12%;
  height: 68%;
  border-radius: 50% 50% 0 0;
  background: rgba(255, 255, 255, .04);
  transform: rotate(-3deg);
  z-index: -1;
}
.header-shell {
  width: min(1240px, calc(100% - 40px));
  min-height: 410px;
  margin: 0 auto;
  padding: 44px 0 62px;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(360px, .78fr);
  gap: 56px;
  align-items: center;
  position: relative;
  z-index: 2;
}
.header-grid {
  position: absolute;
  inset: 0;
  opacity: .14;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 68% 40%, #000, transparent 66%);
}
.header-orb { position: absolute; border-radius: 50%; filter: blur(.3px); z-index: -1; }
.orb-one {
  width: 310px; height: 310px; left: -90px; top: -120px;
  background: radial-gradient(circle at 35% 35%, rgba(247,148,29,.34), rgba(247,148,29,.03) 68%);
  border: 1px solid rgba(247,148,29,.22);
}
.orb-two {
  width: 430px; height: 430px; right: 40%; bottom: -330px;
  border: 58px solid rgba(115,169,68,.08);
}
.header-wave {
  position: absolute;
  bottom: -2px;
  left: -2%; right: -2%;
  height: 38px;
  background: var(--bg);
  clip-path: polygon(0 54%, 8% 66%, 18% 34%, 29% 59%, 39% 31%, 51% 58%, 62% 27%, 73% 54%, 84% 30%, 93% 58%, 100% 42%, 100% 100%, 0 100%);
  z-index: 3;
}

.hero-copy { max-width: 700px; }
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 13px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  border-radius: 999px;
  font-size: 13px;
  color: rgba(255,255,255,.88);
}
.eyebrow-dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 6px rgba(247,148,29,.14);
}
.hero-copy h1 {
  margin: 20px 0 15px;
  font-size: clamp(35px, 4vw, 58px);
  line-height: 1.16;
  letter-spacing: -.8px;
}
.hero-copy h1 span { color: #ffd38b; }
.hero-copy > p {
  margin: 0;
  max-width: 650px;
  font-size: 17px;
  line-height: 1.9;
  color: rgba(255,255,255,.82);
}
.hero-features {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-features span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 10px;
  color: rgba(255,255,255,.91);
  background: rgba(3, 38, 62, .35);
  border: 1px solid rgba(255,255,255,.12);
  font-size: 13px;
}
.hero-features b { color: #8fd06a; }

.brand-stage {
  position: relative;
  min-height: 310px;
  display: grid;
  align-content: center;
  gap: 14px;
  padding: 22px;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  border: 1px solid rgba(255,255,255,.2);
  box-shadow: 0 28px 70px rgba(1, 31, 51, .34), inset 0 1px 0 rgba(255,255,255,.28);
  backdrop-filter: blur(18px);
  transform: rotate(-1.2deg);
}
.brand-stage::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 26px;
  pointer-events: none;
}
.brand-stage-glow {
  position: absolute;
  width: 160px; height: 160px;
  left: -35px; bottom: -38px;
  border-radius: 50%;
  background: rgba(247,148,29,.2);
  filter: blur(28px);
}
.school-identity {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 17px;
  align-items: center;
}
.logo-card {
  min-height: 126px;
  display: grid;
  place-items: center;
  border-radius: 25px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 18px 42px rgba(2, 38, 60, .22);
}
.school-logo-card img { max-width: 108px; max-height: 108px; object-fit: contain; }
.school-copy span, .school-copy strong { display: block; }
.school-copy span { font-size: 14px; color: rgba(255,255,255,.76); margin-bottom: 7px; }
.school-copy strong { font-size: 22px; line-height: 1.45; }
.guidance-card {
  position: relative;
  z-index: 1;
  min-height: 92px;
  display: grid;
  place-items: center;
  padding: 12px 20px;
  border-radius: 21px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 16px 34px rgba(2, 38, 60, .20);
}
.guidance-card img { width: min(100%, 310px); max-height: 72px; object-fit: contain; }

.layout {
  position: relative;
  z-index: 4;
  width: min(1240px, calc(100% - 32px));
  margin: -4px auto 32px;
  display: grid;
  gap: 24px;
}
.panel {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(201, 219, 227, .82);
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.panel-accent {
  position: absolute;
  top: 0; right: 0; left: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--blue), var(--green-2), var(--orange));
}
.panel-watermark {
  position: absolute;
  left: -50px;
  bottom: -75px;
  width: 260px;
  opacity: .025;
  transform: rotate(-12deg);
  pointer-events: none;
}

.section-title {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.section-title.compact { margin-top: 36px; }
.section-title h2 { margin: 2px 0 5px; font-size: 23px; letter-spacing: -.2px; }
.section-title p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }
.section-kicker {
  display: block;
  color: var(--blue-2);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.step {
  flex: 0 0 45px;
  height: 45px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  box-shadow: 0 10px 22px rgba(11, 98, 143, .24);
  font-size: 13px;
  font-weight: 800;
}

.mode-panel { padding-top: 31px; }
.mode-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}
.mode-card {
  --card-accent: var(--blue);
  --card-pale: var(--blue-pale);
  position: relative;
  overflow: hidden;
  border: 1px solid #d8e6ec;
  border-radius: 22px;
  background: linear-gradient(145deg, #fff, var(--card-pale));
  padding: 30px 20px 20px;
  min-height: 192px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 58px 1fr 30px;
  gap: 15px;
  align-items: center;
  text-align: right;
  color: var(--ink);
  box-shadow: 0 10px 30px rgba(7, 63, 101, .055);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.mode-card::after {
  content: "";
  position: absolute;
  width: 105px; height: 105px;
  border-radius: 50%;
  left: -45px; bottom: -55px;
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
}
.mode-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--card-accent) 48%, white);
  box-shadow: 0 22px 42px rgba(7, 63, 101, .12);
}
.mode-card.active {
  transform: translateY(-4px);
  border-color: var(--card-accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--card-accent) 13%, transparent), 0 24px 44px rgba(7, 63, 101, .13);
}
.semester-card { --card-accent: var(--blue); --card-pale: #edf8fc; }
.past-card { --card-accent: var(--green); --card-pale: #f0f8ed; }
.period-card { --card-accent: var(--orange); --card-pale: #fff6e8; }
.mode-ribbon {
  position: absolute;
  top: 0; right: 0;
  padding: 6px 13px 7px;
  border-radius: 0 0 0 14px;
  color: var(--card-accent);
  background: color-mix(in srgb, var(--card-accent) 11%, white);
  font-size: 11px;
  font-weight: 800;
}
.mode-icon {
  width: 58px; height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: white;
  border: 1px solid color-mix(in srgb, var(--card-accent) 28%, white);
  color: var(--card-accent);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--card-accent) 15%, transparent);
}
.mode-icon svg { width: 31px; height: 31px; fill: currentColor; }
.mode-icon .icon-line { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.mode-icon .soft { opacity: .48; }
.mode-copy strong, .mode-copy small { display: block; }
.mode-copy strong { font-size: 18px; margin-bottom: 9px; color: #173044; }
.mode-copy small { color: var(--muted); line-height: 1.75; }
.mode-check {
  width: 29px; height: 29px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid #c6d5dc;
  color: transparent;
  background: white;
  font-weight: 900;
  transition: .2s ease;
}
.mode-card.active .mode-check {
  background: var(--card-accent);
  border-color: var(--card-accent);
  color: white;
  transform: scale(1.06);
}
.selection-hint {
  margin: 17px 0 0;
  color: var(--muted);
  font-size: 13px;
  padding-right: 5px;
}
.selection-hint.selected { color: var(--green); font-weight: 800; }

.selected-mode-bar {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 17px;
  margin: -4px 0 26px;
  border-radius: 16px;
  background: linear-gradient(90deg, #eff9fc, #f3faef);
  border: 1px solid #cee3e8;
}
.selected-mode-bar > div span, .selected-mode-bar > div strong { display: block; }
.selected-mode-bar > div span { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.selected-mode-bar > div strong { color: var(--navy); font-size: 16px; }
.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
}
.live-indicator i {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4cab4a;
  box-shadow: 0 0 0 6px rgba(76,171,74,.12);
}

.drop-zone {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 205px;
  border: 2px dashed #8ab6c8;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(234,246,251,.9), rgba(238,247,233,.78));
  cursor: pointer;
  text-align: center;
  padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.drop-zone::before, .drop-zone::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.drop-zone::before { width: 180px; height: 180px; right: -70px; top: -85px; background: rgba(115,169,68,.08); }
.drop-zone::after { width: 140px; height: 140px; left: -55px; bottom: -70px; background: rgba(247,148,29,.09); }
.drop-zone:hover, .drop-zone.dragging {
  transform: translateY(-2px);
  border-color: var(--blue);
  box-shadow: 0 18px 38px rgba(11,98,143,.10);
}
.upload-visual {
  position: relative;
  z-index: 1;
  width: 68px; height: 68px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: linear-gradient(145deg, var(--blue-2), var(--navy));
  color: white;
  box-shadow: 0 14px 28px rgba(11,98,143,.25);
  margin-bottom: 4px;
}
.upload-visual svg { width: 37px; height: 37px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.drop-zone strong { position: relative; z-index: 1; font-size: 19px; color: var(--navy); }
.drop-action { position: relative; z-index: 1; color: var(--blue-2); font-weight: 700; font-size: 13px; }
.drop-zone small { position: relative; z-index: 1; color: var(--muted); margin-top: 5px; }
.file-list { margin-top: 15px; display: grid; gap: 10px; }
.empty-state {
  color: var(--muted);
  padding: 14px;
  border-radius: 14px;
  background: #f7fafb;
  border: 1px solid #e4edf0;
  text-align: center;
}
.file-row {
  display: grid;
  grid-template-columns: 1fr minmax(160px, 220px) 38px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 11px 13px;
  background: #fff;
  box-shadow: 0 7px 20px rgba(7,63,101,.04);
}
.file-name { min-width: 0; }
.file-name strong, .file-name small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-name strong { color: var(--navy); }
.file-name small { color: var(--muted); margin-top: 4px; font-size: 12px; }
.file-row select, input, textarea {
  width: 100%;
  border: 1px solid #cddce2;
  background: rgba(255,255,255,.98);
  border-radius: 13px;
  padding: 11px 13px;
  outline: none;
  color: var(--ink);
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.file-row select:focus, input:focus, textarea:focus {
  border-color: var(--blue-2);
  box-shadow: 0 0 0 4px rgba(22,124,171,.10);
  background: #fff;
}
.file-row button {
  border: 0;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  background: #fff0ef;
  color: var(--danger);
  font-size: 20px;
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.form-grid label > span:first-child { display: block; margin-bottom: 8px; font-weight: 750; font-size: 13px; color: #294252; }
.full-width { grid-column: 1 / -1; }
.field-help { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 20px 14px 0;
  border-radius: 13px;
}
.checkbox-label input { width: 19px; height: 19px; accent-color: var(--blue); }
.checkbox-label span { margin: 0 !important; }
.input-suffix {
  display: flex;
  align-items: center;
  border: 1px solid #cddce2;
  border-radius: 13px;
  overflow: hidden;
  background: white;
}
.input-suffix:focus-within { border-color: var(--blue-2); box-shadow: 0 0 0 4px rgba(22,124,171,.10); }
.input-suffix input { border: 0; border-radius: 0; box-shadow: none !important; }
.input-suffix > span { padding: 0 13px; color: var(--blue); font-weight: 800; }
textarea { resize: vertical; min-height: 105px; }

.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
button.primary-button, button.secondary-button {
  border-radius: 13px;
  padding: 12px 19px;
  cursor: pointer;
  border: 1px solid transparent;
  font-weight: 800;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary-button {
  background: linear-gradient(145deg, var(--blue-2), var(--navy));
  color: white;
  box-shadow: 0 12px 25px rgba(7,63,101,.20);
}
.primary-button:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(7,63,101,.25); }
.primary-button:disabled { opacity: .62; cursor: wait; transform: none; }
.secondary-button {
  background: white;
  color: var(--navy);
  border-color: #9cbcc9 !important;
}
.secondary-button:hover { background: #f2f8fa; transform: translateY(-1px); }
.main-actions .primary-button {
  min-width: 190px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
}
.main-actions .primary-button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.status-box {
  margin-top: 15px;
  padding: 14px 16px;
  background: #ecf8ee;
  color: #285b20;
  border: 1px solid #badcbb;
  border-radius: 14px;
  line-height: 1.65;
}
.status-box.error { background: #fff0ef; color: var(--danger); border-color: #f1c1bd; }
.help-box {
  margin-top: 16px;
  border: 1px solid var(--line);
  padding: 12px 15px;
  border-radius: 14px;
  color: var(--muted);
  background: #fbfdfe;
}
.help-box summary { cursor: pointer; color: var(--blue); font-weight: 800; }

.report-brand {
  display: grid;
  grid-template-columns: 78px 1fr 180px;
  align-items: center;
  gap: 16px;
  padding: 13px 17px;
  margin: -6px -6px 24px;
  border-radius: 20px;
  background: linear-gradient(120deg, #f3fafc, #f6fbf2);
  border: 1px solid #d7e7ea;
}
.report-brand img { object-fit: contain; }
.report-school-logo { width: 70px; height: 70px; }
.report-guidance-logo { width: 170px; max-height: 58px; justify-self: end; }
.report-brand div span, .report-brand div strong { display: block; }
.report-brand div span { color: var(--muted); font-size: 12px; margin-bottom: 3px; }
.report-brand div strong { color: var(--navy); font-size: 18px; }
.results-header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.results-header h2 { margin: 7px 0 5px; font-size: 25px; }
.results-header p { margin: 0; color: var(--muted); }
.result-mode-badge {
  display: inline-block;
  color: var(--blue);
  background: var(--blue-pale);
  border: 1px solid #c7e2ec;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}
.inline-actions { margin: 0; }
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.kpi {
  position: relative;
  overflow: hidden;
  border: 1px solid #dce8ec;
  background: linear-gradient(145deg, #fff, #f5fafc);
  padding: 19px;
  border-radius: 18px;
  box-shadow: 0 9px 24px rgba(7,63,101,.055);
}
.kpi::after {
  content: "";
  position: absolute;
  width: 56px; height: 56px;
  border-radius: 50%;
  left: -20px; bottom: -24px;
  background: rgba(11,98,143,.08);
}
.kpi span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.kpi strong { color: var(--blue); font-size: 27px; }
.kpi.warning { background: linear-gradient(145deg, #fff, var(--warning-bg)); border-color: #f1d7a1; }
.kpi.warning strong { color: #a45e00; }
.kpi.warning::after { background: rgba(247,148,29,.13); }
.tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid #dce8ec;
  border-radius: 16px;
  background: #f6fafb;
  margin-bottom: 24px;
}
.tab {
  border: 0;
  background: transparent;
  padding: 10px 15px;
  cursor: pointer;
  color: var(--muted);
  border-radius: 11px;
  white-space: nowrap;
  transition: .18s ease;
}
.tab:hover { color: var(--blue); background: #edf6f9; }
.tab.active {
  color: white;
  background: linear-gradient(145deg, var(--blue-2), var(--navy));
  box-shadow: 0 8px 18px rgba(7,63,101,.18);
  font-weight: 800;
}
.tab-content { display: none; }
.tab-content.active { display: block; animation: reveal .25s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.section-block { margin: 0 0 28px; }
.section-block h3 { color: var(--navy); margin: 0 0 14px; font-size: 19px; }
.section-block h4 { margin-top: 24px; color: #294252; }
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin-bottom: 19px;
  background: white;
  box-shadow: 0 8px 22px rgba(7,63,101,.045);
}
table { width: 100%; border-collapse: collapse; min-width: 650px; }
th, td { padding: 12px 10px; text-align: center; border-bottom: 1px solid #e6edf0; }
th { background: linear-gradient(180deg, #eef7fa, #e8f3f7); color: var(--navy); font-weight: 800; }
tbody tr:hover td { background: #fbfdfe; }
tbody tr:last-child td { border-bottom: 0; }
.name-cell { text-align: right; min-width: 190px; }
.chart {
  display: grid;
  gap: 11px;
  padding: 17px;
  border-radius: 17px;
  background: linear-gradient(145deg, #fbfdfe, #f4f9fb);
  border: 1px solid var(--line);
  margin-bottom: 19px;
}
.chart-row { display: grid; grid-template-columns: minmax(95px,170px) 1fr 72px; align-items: center; gap: 11px; }
.chart-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #36505f; }
.chart-track { height: 18px; border-radius: 999px; background: #e3edf1; overflow: hidden; }
.chart-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--green-2), var(--orange)); }
.chart-value { text-align: left; font-weight: 800; color: var(--navy); }
.narrative {
  background: linear-gradient(120deg, #f4fafc, #f8fcf6);
  border-right: 5px solid var(--blue-2);
  border-radius: 15px;
  padding: 18px 20px;
  line-height: 1.95;
  margin-bottom: 19px;
}
.narrative ul { margin: 8px 0 0; padding-right: 21px; }
.cards-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 13px; }
.summary-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 17px;
  background: linear-gradient(145deg, white, #f9fcfd);
  box-shadow: 0 8px 22px rgba(7,63,101,.04);
}
.summary-card h3 { margin-bottom: 13px; }
.meta { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #dbe6ea; }
.meta:last-child { border-bottom: 0; }
.badge { font-size: 12px; padding: 5px 9px; border-radius: 999px; }
.badge.danger { color: var(--danger); background: #feeceb; }

.app-footer {
  position: relative;
  margin-top: 10px;
  border-top: 1px solid #dce7ec;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(10px);
}
.footer-shell {
  width: min(1240px, calc(100% - 32px));
  min-height: 110px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 190px;
  align-items: center;
  gap: 25px;
  padding: 18px 0;
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img { width: 56px; height: 56px; object-fit: contain; }
.footer-brand strong, .footer-brand span { display: block; }
.footer-brand strong { color: var(--navy); font-size: 14px; }
.footer-brand span { color: var(--muted); font-size: 12px; margin-top: 3px; }
.footer-shell p { margin: 0; text-align: center; color: var(--muted); font-size: 12px; }
.footer-guidance { width: 180px; max-height: 55px; object-fit: contain; justify-self: end; }

@media (max-width: 1020px) {
  .header-shell { grid-template-columns: 1fr 370px; gap: 30px; }
  .hero-copy h1 { font-size: 41px; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 145px; }
}

@media (max-width: 820px) {
  .app-header { min-height: auto; }
  .header-shell { grid-template-columns: 1fr; padding-top: 34px; padding-bottom: 75px; }
  .hero-copy { max-width: none; text-align: center; }
  .hero-eyebrow { margin-inline: auto; }
  .hero-copy > p { margin-inline: auto; }
  .hero-features { justify-content: center; }
  .brand-stage { width: min(100%, 520px); margin: 0 auto; transform: none; }
  .form-grid, .kpi-grid { grid-template-columns: 1fr 1fr; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .results-header { align-items: flex-start; flex-direction: column; }
  .report-brand { grid-template-columns: 65px 1fr 140px; }
  .report-guidance-logo { width: 135px; }
  .footer-shell { grid-template-columns: 1fr 170px; }
  .footer-shell p { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 570px) {
  .header-shell, .layout, .footer-shell { width: min(100% - 18px, 1240px); }
  .hero-copy h1 { font-size: 33px; }
  .hero-copy > p { font-size: 15px; }
  .hero-features { display: grid; }
  .brand-stage { padding: 15px; min-height: 270px; border-radius: 25px; }
  .school-identity { grid-template-columns: 100px 1fr; gap: 12px; }
  .logo-card { min-height: 102px; border-radius: 19px; }
  .school-logo-card img { max-width: 86px; max-height: 86px; }
  .school-copy strong { font-size: 17px; }
  .guidance-card { min-height: 78px; }
  .layout { margin-top: 0; }
  .panel { padding: 18px; border-radius: 20px; }
  .section-title h2 { font-size: 20px; }
  .step { flex-basis: 40px; height: 40px; border-radius: 13px; }
  .mode-card { grid-template-columns: 50px 1fr 26px; padding: 29px 15px 16px; min-height: 160px; }
  .mode-icon { width: 50px; height: 50px; border-radius: 15px; }
  .mode-copy strong { font-size: 16px; }
  .form-grid, .kpi-grid, .cards-grid { grid-template-columns: 1fr; }
  .file-row { grid-template-columns: 1fr 38px; }
  .file-row select { grid-column: 1 / -1; grid-row: 2; }
  .checkbox-label { padding: 4px 0; }
  .selected-mode-bar { align-items: flex-start; flex-direction: column; }
  .report-brand { grid-template-columns: 56px 1fr; padding: 12px; }
  .report-school-logo { width: 52px; height: 52px; }
  .report-guidance-logo { grid-column: 1 / -1; width: 150px; justify-self: center; }
  .report-brand div strong { font-size: 15px; }
  .chart-row { grid-template-columns: 86px 1fr 58px; }
  .footer-shell { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-content: center; }
  .footer-guidance { justify-self: center; }
  .footer-shell p { grid-column: 1; grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}

@media print {
  @page { size: A4 portrait; margin: 8mm 12mm 18mm; }
  html, body { background: #fff !important; }
  body {
    margin: 0 !important;
    color: #213746;
    font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
    font-size: 9.5pt;
    line-height: 1.7;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body::before,
  .top-ribbon,
  .app-header,
  .mode-panel,
  .setup-panel,
  .database-panel,
  .archive-panel,
  .app-footer { display: none !important; }
  .layout { width: 100%; margin: 0; display: block; }
  .panel { border: 0; box-shadow: none; padding: 0; background: #fff; }
  .results-panel { display: block !important; overflow: visible; }
  .results-panel > :not(.print-document) { display: none !important; }
  .print-document { display: block !important; width: 100%; }
  /* يستخدم التقرير تذييلًا حقيقيًا متكررًا داخل tfoot؛ لا نعرض التذييل الثابت فوق الغلاف. */
  .pdf-fixed-footer { display: none !important; }

  .print-page-frame { width: 100%; border-collapse: collapse; table-layout: fixed; margin: 0; }
  .print-page-frame > thead { display: table-header-group; }
  .print-page-frame > tfoot { display: table-footer-group; }
  .print-page-frame > tbody > .page-frame-row { page-break-inside: auto; break-inside: auto; }
  .print-page-frame > tbody > .report-row-break { page-break-before: always; break-before: page; }
  .print-page-frame > tbody > tr > .page-frame-cell,
  .print-page-frame > thead > tr > .page-frame-cell { border: 0; padding: 0; background: #fff !important; vertical-align: top; }
  .report-running-header,
  .report-running-footer {
    display: block !important;
    width: 100%;
    background: #fff;
    color: #617784;
  }
  .report-running-header {
    height: 18mm;
    border-bottom: .55mm solid #0b628f;
    padding-bottom: 1.5mm;
    margin-bottom: 4mm;
  }
  .report-running-footer {
    height: 9mm;
    border-top: .35mm solid #0b628f;
    padding-top: 1.2mm;
    margin-top: 3mm;
  }
  .report-running-header table,
  .report-running-footer table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 0;
  }
  .report-running-header td,
  .report-running-footer td {
    border: 0;
    background: #fff !important;
    padding: .7mm 1.2mm;
    vertical-align: middle;
  }
  .report-running-header .header-school-logo { width: 18%; text-align: right; }
  .report-running-header .header-guidance-logo { width: 27%; text-align: left; }
  .report-running-header img { max-height: 13mm; max-width: 36mm; object-fit: contain; }
  .report-running-header .header-center { text-align: center; }
  .report-running-header strong,
  .report-running-header span,
  .report-running-header small { display: block; }
  .report-running-header strong { font-size: 10pt; color: #073f65; line-height: 1.25; }
  .report-running-header span { font-size: 7.5pt; color: #39752f; font-weight: 800; }
  .report-running-header small { font-size: 7pt; color: #687d88; margin-top: .4mm; }
  .report-running-footer td { font-size: 7pt; }
  .report-running-footer td:first-child { color: #073f65; font-weight: 800; }
  .report-running-footer td:nth-child(2) { text-align: center; }
  .report-running-footer .footer-page { width: 18%; text-align: left; }

  .print-cover-only { display: block !important; width: 100%; page-break-after: always; break-after: page; }
  .report-pages { width: 100%; }
  .report-cover {
    min-height: 255mm;
    box-sizing: border-box;
    position: relative;
    text-align: center;
    display: block;
    width: 100%;
    border: 2.4mm solid #eaf4f7;
    outline: .45mm solid #0b628f;
    outline-offset: -4.2mm;
    background: #fff;
    overflow: hidden;
    padding: 13mm 11mm 11mm;
  }
  .report-cover::before,
  .report-cover::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    opacity: .07;
  }
  .report-cover::before { width: 74mm; height: 74mm; background: #73a944; left: -34mm; top: 73mm; }
  .report-cover::after { width: 60mm; height: 60mm; background: #f7941d; right: -28mm; bottom: 44mm; }
  .report-cover > * { position: relative; z-index: 2; }
  .cover-brand-row {
    display: grid;
    grid-template-columns: 31mm 1fr 39mm;
    align-items: center;
    gap: 5mm;
    width: 93%;
    margin: 0 auto 4mm;
  }
  .cover-logo-box {
    height: 26mm;
    display: flex;
    align-items: center;
    justify-content: center;
    border: .3mm solid #d8e5ea;
    border-radius: 4mm;
    background: #fff !important;
    padding: 2mm;
  }
  .cover-logo-box.guidance { height: 23mm; }
  .cover-logo-box img { max-width: 100%; max-height: 100%; object-fit: contain; }
  .cover-brand-copy span,
  .cover-brand-copy strong,
  .cover-brand-copy small { display: block; }
  .cover-brand-copy span { font-size: 7.2pt; color: #687d88; font-weight: 700; }
  .cover-brand-copy strong { font-size: 14pt; color: #073f65; margin: 1.2mm 0 .6mm; }
  .cover-brand-copy small { font-size: 9pt; color: #39752f; font-weight: 800; }
  .cover-rule { display: grid; grid-template-columns: 1fr 2fr 1fr; width: 72%; height: 1.5mm; margin: 3mm auto 10mm; }
  .cover-rule i:nth-child(1) { background: #73a944; }
  .cover-rule i:nth-child(2) { background: #0b628f; }
  .cover-rule i:nth-child(3) { background: #f7941d; }
  .cover-badge {
    display: inline-block;
    padding: 2mm 7mm;
    border: .3mm solid #c9dec0;
    background: #eef7e9 !important;
    color: #39752f;
    border-radius: 30mm;
    font-size: 8.5pt;
    font-weight: 800;
  }
  .cover-title { margin-top: 8mm; }
  .cover-title h1 { font-size: 24pt; line-height: 1.35; color: #073f65; margin: 0 0 4mm; }
  .cover-title h2 { font-size: 14pt; color: #39752f; margin: 0 0 2.5mm; }
  .cover-title p { font-size: 9.5pt; color: #657b86; margin: 0; }
  .cover-metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5mm;
    width: 94%;
    margin: 14mm auto 0;
  }
  .cover-metrics > div {
    min-height: 22mm;
    box-sizing: border-box;
    padding: 3.2mm 1.5mm;
    border: .3mm solid #cbdde5;
    border-bottom: .8mm solid #0b628f;
    background: #f7fbfc !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .cover-metrics > div:nth-child(3) { background: #f3faef !important; border-bottom-color: #39752f; }
  .cover-metrics > div:nth-child(4) { background: #fff8ea !important; border-bottom-color: #f7941d; }
  .cover-metrics span,
  .cover-metrics strong { display: block; }
  .cover-metrics span { font-size: 7pt; color: #687d88; }
  .cover-metrics strong { font-size: 9.5pt; color: #073f65; margin-top: .8mm; }
  .cover-seal { margin-top: 17mm; }
  .cover-seal span,
  .cover-seal b { display: block; }
  .cover-seal span { font-size: 13pt; color: #073f65; font-weight: 800; }
  .cover-seal b { font-size: 8.5pt; color: #39752f; margin-top: 1mm; }
  .cover-note {
    position: absolute !important;
    right: 12mm;
    left: 12mm;
    bottom: 8mm;
    border-top: .3mm solid #d6e3e8;
    padding-top: 3mm;
    font-size: 7pt;
    color: #71848e;
  }

  .report-section { margin: 0 0 7mm; }
  .report-page-break { page-break-before: always; break-before: page; }
  .report-section h2 {
    color: #073f65;
    font-size: 15pt;
    line-height: 1.35;
    margin: 0 0 4mm;
    padding: 2.4mm 3mm;
    background: #f0f7f9 !important;
    border-right: 1.6mm solid #73a944;
    border-bottom: .3mm solid #cbdde5;
    page-break-after: avoid;
    break-after: avoid;
  }
  .report-section h3 { font-size: 11.5pt; color: #0b628f; margin: 5mm 0 2.5mm; page-break-after: avoid; break-after: avoid; }
  .report-section h4 { font-size: 10pt; color: #39752f; margin: 3.5mm 0 2mm; page-break-after: avoid; break-after: avoid; }
  .report-section p { margin: 0 0 3mm; text-align: justify; }
  .report-list { margin: 1.5mm 0 4mm; padding-right: 7mm; }
  .report-list li { margin: 0 0 1.5mm; line-height: 1.7; text-align: justify; }
  .two-column-block { display: grid; grid-template-columns: 1fr 1fr; gap: 7mm; }
  .two-column-block > div:first-child { border-left: .3mm solid #dce7ec; padding-left: 5mm; }
  .report-lead {
    background: #f7fbf4 !important;
    border-right: 1.6mm solid #73a944;
    padding: 3mm 4mm;
    font-weight: 700;
    color: #2d4856;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .report-notice,
  .report-success,
  .report-muted {
    padding: 3mm 4mm;
    margin: 3mm 0 4mm;
    border: .35mm solid #ead6a8;
    border-right: 1.6mm solid #f7941d;
    background: #fff8ea !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .report-success { border-color: #c9dec0; border-right-color: #73a944; background: #f3faef !important; color: #315f2a; }
  .report-muted { border-color: #d8e3e7; border-right-color: #8ca0aa; background: #f6f9fa !important; color: #657b86; }

  .report-summary-grid {
    width: 100%;
    border-collapse: separate;
    border-spacing: 2mm;
    margin: 3mm 0 5mm;
    table-layout: fixed;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .report-summary-grid td { border: .3mm solid #cbdde5; border-bottom: .7mm solid #0b628f; background: #f4fafc !important; padding: 2.4mm 1.2mm; text-align: center; }
  .report-summary-grid td.warning { background: #fff7e9 !important; border-color: #f1d7a1; }
  .report-summary-grid span,
  .report-summary-grid strong { display: block; }
  .report-summary-grid span { font-size: 7.5pt; color: #687d88; }
  .report-summary-grid strong { font-size: 16pt; color: #073f65; margin-top: 1mm; }
  .report-summary-grid .warning strong { color: #b45309; }

  .report-table-block {
    width: 96%;
    margin: 2.5mm auto 4mm;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .report-table-new-page { page-break-before: always; break-before: page; }
  .table-continuation-title {
    font-size: 9.5pt;
    font-weight: 800;
    color: #073f65;
    margin: 0 0 1.5mm;
    padding: 1.5mm 2.5mm;
    background: #eef6f8 !important;
    border-right: 1mm solid #73a944;
  }
  .report-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 7.5pt;
    line-height: 1.28;
  }
  .report-table thead { display: table-header-group; }
  .report-table tr { page-break-inside: avoid; break-inside: avoid; }
  .report-table th,
  .report-table td {
    border: .3mm solid #9babb3;
    text-align: center;
    vertical-align: middle;
    padding: 1.2mm .9mm;
    height: 7.2mm;
    word-break: normal;
    overflow-wrap: anywhere;
  }
  .report-table th { background: #0b628f !important; color: #fff !important; font-weight: 800; }
  .report-table tbody tr:nth-child(even) td { background: #f4f8fa !important; }
  .report-table tbody tr:last-child td { border-bottom: .65mm solid #39752f; }
  .report-table .text-cell { text-align: right; padding-right: 2mm; }
  .report-table .empty-cell { text-align: center; color: #71848e; }
  .table-part-label { text-align: left; font-size: 6.5pt; color: #71848e; margin-top: .8mm; }
  .class-top-block { page-break-inside: avoid; break-inside: avoid; }
  .report-closing { margin-top: 9mm; padding-top: 4mm; border-top: .65mm solid #0b628f; text-align: center; page-break-inside: avoid; break-inside: avoid; }
  .report-closing strong,
  .report-closing span { display: block; }
  .report-closing strong { color: #073f65; font-size: 11pt; }
  .report-closing > div > span { color: #39752f; font-size: 8.5pt; }
  .signature-lines { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15mm; margin-top: 13mm; }
  .signature-lines span { padding-top: 2.5mm; border-top: .35mm solid #9babb3; color: #516b79 !important; }
}

/* A4 report cover and print identity */
.pdf-fixed-footer,
.print-document,
.print-cover,
.print-page-footer { display: none; }


/* Supabase authentication and archive */
.database-panel,.archive-panel{position:relative;overflow:hidden}.auth-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.auth-grid label{display:flex;flex-direction:column;gap:7px}.auth-grid .full-width{grid-column:1/-1}.auth-grid input,.archive-toolbar input,.archive-toolbar select{width:100%;border:1px solid #cbdde5;border-radius:13px;padding:12px 14px;font:inherit;background:#fff;color:#19303f}.auth-actions{justify-content:flex-start}.user-session{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:18px;border-radius:18px;background:linear-gradient(135deg,#edf8fb,#f5faef);border:1px solid #c8dfe7}.user-session span,.user-session strong,.user-session small{display:block}.user-session strong{font-size:1.15rem;color:#073f65}.user-session small{margin-top:4px;color:#58707d}.archive-toolbar{display:grid;grid-template-columns:2fr 1fr auto;gap:12px;margin-bottom:18px}.archive-list{display:grid;gap:14px}.archive-card{border:1px solid #cbdde5;border-radius:18px;padding:17px;background:#fff;box-shadow:0 8px 24px rgba(7,63,101,.07)}.archive-card-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}.archive-card-head span{font-size:.8rem;color:#39752f;font-weight:800}.archive-card-head h3{margin:3px 0;color:#073f65}.archive-card-head time{font-size:.78rem;color:#6c7f89;white-space:nowrap}.archive-meta{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0}.archive-meta span,.archive-grades b{padding:5px 9px;border-radius:999px;background:#eef6f8;color:#294252;font-size:.78rem}.archive-grades{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:13px}.archive-grades b{background:#eef7e9;color:#39752f}.danger-button{border:1px solid #d8a5a5;background:#fff3f3;color:#9a2525;border-radius:12px;padding:10px 15px;font:inherit;font-weight:700;cursor:pointer}.save-analysis-button{background:linear-gradient(135deg,#39752f,#73a944)}
@media(max-width:760px){.auth-grid{grid-template-columns:1fr}.user-session{align-items:flex-start;flex-direction:column}.archive-toolbar{grid-template-columns:1fr}.archive-card-head{flex-direction:column}.archive-card-head time{white-space:normal}}
@media print{.database-panel,.archive-panel,.save-analysis-button{display:none!important}}


/* Generic Premium edition */
.login-page{min-height:100vh;display:grid;place-items:center;position:relative;overflow:hidden;background:linear-gradient(135deg,#032d42 0%,#07566c 52%,#079b91 100%);padding:28px;color:#fff}.login-backdrop{position:absolute;inset:0;background:radial-gradient(circle at 15% 10%,rgba(255,255,255,.12),transparent 26rem),radial-gradient(circle at 88% 80%,rgba(57,214,190,.2),transparent 28rem),linear-gradient(rgba(255,255,255,.04) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.04) 1px,transparent 1px);background-size:auto,auto,42px 42px,42px 42px}.login-shell{width:min(1120px,100%);display:grid;grid-template-columns:1.05fr .95fr;gap:34px;align-items:center;position:relative;z-index:1}.login-brand{padding:28px}.login-logos{display:flex;align-items:center;gap:15px;margin-bottom:28px}.login-logo-box{width:150px;height:95px;background:#fff;border-radius:20px;padding:12px;display:grid;place-items:center;box-shadow:0 20px 50px rgba(0,0,0,.18)}.login-logo-box.vision{width:180px}.login-logo-box img{max-height:70px;object-fit:contain}.login-kicker{display:inline-block;color:#9fe5db;font-weight:800;letter-spacing:1px}.login-brand h1{font-size:clamp(38px,5vw,68px);line-height:1.15;margin:14px 0}.login-brand p{font-size:17px;line-height:1.9;color:rgba(255,255,255,.82);max-width:600px}.login-benefits{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}.login-benefits span{padding:9px 13px;border:1px solid rgba(255,255,255,.2);border-radius:999px;background:rgba(255,255,255,.07);font-size:13px}.login-card{background:#fff;color:var(--ink);border-radius:30px;padding:30px;box-shadow:0 30px 90px rgba(0,0,0,.28)}.login-card-head h2{margin:5px 0;font-size:26px}.login-card-head>span{color:#008f83;font-weight:800}.login-card-head p{color:var(--muted);line-height:1.7}.login-auth-grid{grid-template-columns:1fr}.price-strip{margin-top:18px;border-radius:18px;padding:14px 16px;background:linear-gradient(135deg,#ecfbf8,#f6fbff);border:1px solid #cdece7;display:grid;grid-template-columns:auto 1fr;gap:4px 14px;align-items:center}.price-strip strong{grid-row:1/3;color:#007b70;font-size:18px}.price-strip span{font-weight:800}.price-strip small{color:var(--muted)}
.generic-header{background:linear-gradient(123deg,#03364f,#075d70 55%,#00a394)}.generic-brand-grid{display:grid;grid-template-columns:1fr;gap:12px}.generic-brand-grid .logo-card,.generic-brand-grid .guidance-card{min-height:88px}.generic-brand-grid .logo-card img,.generic-brand-grid .guidance-card img{max-height:64px}.school-profile-brand{display:grid;grid-template-columns:78px 1fr;gap:14px;align-items:center;background:rgba(255,255,255,.12);border:1px solid rgba(255,255,255,.18);border-radius:18px;padding:12px}.school-profile-brand img{width:78px;height:68px;object-fit:contain;background:#fff;border-radius:13px;padding:7px}.school-profile-brand span,.school-profile-brand strong{display:block}.school-profile-brand span{font-size:12px;color:rgba(255,255,255,.72)}.school-profile-brand strong{font-size:18px}.account-dashboard{display:grid;gap:18px}.account-summary{display:grid;grid-template-columns:1fr 1fr;gap:14px}.account-summary>div,.plan-card{border:1px solid var(--line);border-radius:18px;padding:16px;background:#f8fbfc}.account-summary span,.account-summary strong,.account-summary small{display:block}.account-summary strong{font-size:19px;margin:3px 0}.plan-card{background:linear-gradient(135deg,#effcf9,#f5fbff)}.school-profile-form{display:grid;grid-template-columns:1.4fr 1fr 110px auto;gap:14px;align-items:end}.school-profile-form label{display:grid;gap:7px}.school-logo-preview{width:100px;height:84px;border:1px solid var(--line);border-radius:14px;padding:8px;display:grid;place-items:center;background:#fff}.school-logo-preview img{max-height:68px;object-fit:contain}.subscription-box{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;background:linear-gradient(135deg,#053b50,#007f77);color:#fff;border-radius:22px;padding:20px}.subscription-box h3{margin:6px 0}.subscription-box p{margin:0;color:rgba(255,255,255,.78)}.premium-pill{display:inline-block;background:#f7c65d;color:#20303a;padding:5px 10px;border-radius:999px;font-weight:900;font-size:12px}.account-actions{justify-content:flex-start}.locked-feature{opacity:.68;position:relative}.locked-feature::after{content:'Premium';position:absolute;top:-8px;left:-8px;background:#f7c65d;color:#273741;border-radius:999px;padding:3px 7px;font-size:10px;font-weight:900}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.admin-list{display:grid;gap:12px}.admin-item{border:1px solid var(--line);border-radius:16px;padding:14px;background:#f9fbfc}.admin-item h4{margin:0 0 6px}.admin-item p{margin:3px 0;color:var(--muted);font-size:13px}.admin-item .actions{margin-top:10px}.trial-banner{margin-bottom:15px;padding:12px 15px;border-radius:14px;background:#fff7e6;border:1px solid #f4d58a;color:#7a4a00}.premium-active-banner{margin-bottom:15px;padding:12px 15px;border-radius:14px;background:#ecfbf8;border:1px solid #b9e8df;color:#00675f}.print-custom-school-logo{max-height:92px;max-width:130px;object-fit:contain;margin:8px auto;display:block}.report-custom-school-logo{max-height:58px;max-width:90px;object-fit:contain}.archive-locked{padding:20px;border-radius:16px;background:#fff7e6;border:1px solid #efd79e;text-align:center;color:#7a4a00}
@media(max-width:850px){.login-shell{grid-template-columns:1fr}.login-brand{padding:10px}.school-profile-form{grid-template-columns:1fr}.account-summary,.admin-grid{grid-template-columns:1fr}.subscription-box{grid-template-columns:1fr}.login-logos{justify-content:center}.login-brand{text-align:center}.login-benefits{justify-content:center}}


/* الهوية التعبيرية العامة */
.login-logo-box img,.logo-card img,.guidance-card img,.footer-brand img,.footer-guidance{object-fit:contain;filter:drop-shadow(0 10px 18px rgba(7,63,101,.13))}
.login-logo-box{background:linear-gradient(145deg,#fff,#f0f9f8);border:1px solid rgba(20,160,150,.18)}
.logo-card,.guidance-card{background:linear-gradient(145deg,#ffffff,#eef8f7)}

/* نافذة التواصل والتفعيل */
.payment-modal[hidden]{display:none!important}.payment-modal{position:fixed;inset:0;z-index:9995;display:grid;place-items:center;padding:22px}.payment-modal-backdrop{position:absolute;inset:0;background:rgba(2,25,42,.78);backdrop-filter:blur(10px)}.payment-modal-card{position:relative;width:min(940px,96vw);max-height:94vh;overflow:auto;background:#fff;border-radius:30px;padding:28px;box-shadow:0 32px 90px rgba(0,0,0,.34);border:1px solid rgba(255,255,255,.7)}.payment-modal-close{position:absolute;left:22px;top:18px;width:42px;height:42px;border-radius:50%;border:0;background:#edf5f5;color:#073f65;font-size:30px;cursor:pointer}.payment-modal-head{text-align:center;padding:4px 60px 18px}.payment-modal-head h2{margin:8px 0 7px;color:#073f65;font-size:30px}.payment-modal-head p{margin:0;color:#5c727d;line-height:1.9}.payment-badge{display:inline-flex;align-items:center;justify-content:center;padding:7px 17px;border-radius:99px;background:linear-gradient(135deg,#ffb02e,#ff8c1a);color:#fff;font-weight:900;letter-spacing:.4px}.payment-image-frame{border-radius:22px;overflow:hidden;background:#eaf4f4;border:1px solid #cfe1e3;box-shadow:0 12px 30px rgba(7,63,101,.11)}.payment-image-frame img{display:block;width:100%;height:auto;user-select:none;-webkit-user-drag:none}.payment-reference-label{display:grid;gap:7px;margin:18px 0 12px}.payment-reference-label span{font-weight:800;color:#284a59}.payment-reference-label input{height:50px;border:1px solid #c8dadd;border-radius:14px;padding:0 15px;font-family:inherit;font-size:16px}.payment-confirm-row{display:flex;align-items:flex-start;gap:11px;background:#f4faf8;border:1px solid #cfe7df;border-radius:15px;padding:14px 16px;color:#315f2a;font-weight:700;line-height:1.7}.payment-confirm-row input{width:20px;height:20px;margin-top:3px;accent-color:#0b7f91}.payment-actions{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:18px}.payment-security-note{text-align:center;margin:14px 0 0;color:#7a8790;font-size:13px}.modal-open{overflow:hidden}

/* طبقات حماية وردع التصوير والنسخ */
#appShell{user-select:none;-webkit-user-select:none}#appShell input,#appShell textarea,#appShell select{user-select:text;-webkit-user-select:text}.security-watermark[hidden]{display:none!important}.security-watermark{position:fixed;inset:-20%;z-index:9800;pointer-events:none;display:flex;align-items:center;justify-content:center;overflow:hidden;color:rgba(7,63,101,.055);font-size:17px;font-weight:800;line-height:6.6;letter-spacing:1px;transform:rotate(-24deg);white-space:pre-wrap;word-spacing:30px;text-align:center;mix-blend-mode:multiply}.screen-shield[hidden]{display:none!important}.screen-shield{position:fixed;inset:0;z-index:10000;background:linear-gradient(135deg,#062f4f,#0b7f91);display:grid;place-items:center;color:#fff;text-align:center}.screen-shield>div{display:grid;justify-items:center;gap:10px}.screen-shield img{width:110px;height:110px}.screen-shield strong{font-size:30px}.screen-shield span{opacity:.82}
@media(max-width:700px){.payment-modal-card{padding:18px;border-radius:22px}.payment-modal-head{padding:6px 34px 14px}.payment-modal-head h2{font-size:24px}.payment-actions>*{width:100%}.payment-reference-label input{font-size:14px}.security-watermark{font-size:13px}}


/* تنسيقات توافق قديمة مخفية في النسخة الحالية */
.payment-bank-details{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0 4px}.bank-detail{display:grid;gap:5px;align-content:center;min-height:88px;padding:14px 16px;border:1px solid #cfe1e3;border-radius:16px;background:linear-gradient(145deg,#fbfefe,#edf8f7);text-align:center}.bank-detail-wide{grid-column:1/-1}.bank-detail span{font-size:13px;font-weight:800;color:#627984}.bank-detail strong{font-size:20px;line-height:1.55;color:#073f65;overflow-wrap:anywhere;word-break:break-word}.bank-detail-wide strong[dir=ltr]{font-size:22px;letter-spacing:1.2px}.capture-guard #appShell{filter:blur(24px)!important;opacity:.08!important;transition:none!important}.capture-guard .security-watermark{opacity:1}.screen-shield{animation:guardIn .06s linear both}@keyframes guardIn{from{opacity:.4}to{opacity:1}}
@media(max-width:700px){.payment-bank-details{grid-template-columns:1fr}.bank-detail-wide{grid-column:auto}.bank-detail strong,.bank-detail-wide strong[dir=ltr]{font-size:16px;letter-spacing:.2px}.bank-detail{min-height:72px;padding:11px 12px}}

/* Premium monthly/yearly plan selector */
.subscription-plan-selector{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:0 0 18px}.subscription-plan-option{position:relative;display:grid;gap:5px;align-content:center;min-height:130px;padding:18px;border:2px solid #d5e5e6;border-radius:20px;background:linear-gradient(145deg,#fff,#f3f9f9);cursor:pointer;text-align:center;transition:.18s ease;user-select:none}.subscription-plan-option:hover{transform:translateY(-2px);border-color:#8ccbc5}.subscription-plan-option.selected{border-color:#0a9b8e;background:linear-gradient(145deg,#effcf9,#f8fffd);box-shadow:0 12px 28px rgba(10,155,142,.13)}.subscription-plan-option input{position:absolute;opacity:0;pointer-events:none}.subscription-plan-option .plan-choice-title{font-weight:900;color:#164b5d}.subscription-plan-option strong{font-size:27px;color:#007e74}.subscription-plan-option small{color:#687e87}.plan-choice-badge{position:absolute;top:-10px;left:16px;padding:4px 10px;border-radius:999px;background:linear-gradient(135deg,#ffc14d,#ff9825);color:#fff;font-size:11px;font-weight:900}.price-strip span{line-height:1.7}.subscription-box h3{line-height:1.7}
@media(max-width:650px){.subscription-plan-selector{grid-template-columns:1fr}.subscription-plan-option{min-height:108px}}


/* V5 — تفعيل Premium عبر واتساب فقط */
.payment-image-frame,.payment-bank-details,.payment-reference-label{display:none!important}
.whatsapp-activation-card{display:grid;grid-template-columns:92px 1fr;gap:20px;align-items:center;margin:2px 0 16px;padding:22px;border:1px solid #bfe5d1;border-radius:22px;background:linear-gradient(145deg,#f4fff8,#eefaf7);box-shadow:0 12px 30px rgba(16,122,74,.08)}
.whatsapp-icon{width:86px;height:86px;border-radius:24px;display:grid;place-items:center;background:linear-gradient(145deg,#25d366,#0fa958);color:#fff;box-shadow:0 14px 28px rgba(20,174,92,.24)}
.whatsapp-icon svg{width:62px;height:62px}
.whatsapp-activation-copy h3{margin:5px 0 7px;color:#0b4f39;font-size:22px;line-height:1.55}
.whatsapp-activation-copy p{margin:0;color:#49685d;line-height:1.9}
.whatsapp-kicker{font-size:12px;font-weight:900;color:#11824f;background:#dff8e9;border-radius:999px;padding:5px 10px;display:inline-flex}
.whatsapp-number{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
.whatsapp-number span{font-size:12px;color:#648074;font-weight:800}.whatsapp-number strong{font-size:18px;color:#09623f;letter-spacing:.5px}
.whatsapp-contact-button{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;min-height:56px;margin:0 0 14px;border-radius:16px;background:linear-gradient(135deg,#25d366,#12ad55);color:#fff!important;text-decoration:none;font-weight:900;font-size:17px;box-shadow:0 12px 26px rgba(20,174,92,.22);transition:.18s ease}
.whatsapp-contact-button:hover{transform:translateY(-2px);box-shadow:0 16px 32px rgba(20,174,92,.27)}
.payment-security-note{padding:12px 14px;border-radius:14px;background:#fff7e6;border:1px solid #f0d390;color:#815100;line-height:1.8}
@media(max-width:700px){.whatsapp-activation-card{grid-template-columns:1fr;text-align:center;padding:18px}.whatsapp-icon{margin:auto}.whatsapp-number{justify-content:center}.whatsapp-activation-copy h3{font-size:19px}.whatsapp-contact-button{font-size:15px;padding:0 12px}}


/* V6 — شات الدعم وإدارة صلاحيات المدير */
.support-entry-button{border-color:#0c9b75!important;color:#08765b!important;background:#ecfff8!important}
.support-chat-toggle{position:fixed;left:24px;bottom:24px;z-index:9200;display:flex;align-items:center;gap:9px;border:0;border-radius:999px;background:linear-gradient(135deg,#075b87,#0b9b76);color:#fff;padding:12px 18px;font-family:inherit;font-weight:800;font-size:14px;box-shadow:0 18px 45px rgba(4,58,88,.28);cursor:pointer;transition:.2s transform,.2s box-shadow}
.support-chat-toggle:hover{transform:translateY(-2px);box-shadow:0 22px 52px rgba(4,58,88,.34)}
.support-chat-toggle-icon{font-size:18px}.support-unread-badge{display:grid;place-items:center;min-width:21px;height:21px;border-radius:999px;background:#ef4444;color:#fff;font-size:11px;border:2px solid #fff}
.support-chat-panel{position:fixed;left:24px;bottom:84px;z-index:9199;width:min(390px,calc(100vw - 28px));height:min(590px,calc(100vh - 120px));background:#fff;border:1px solid #d7e6ed;border-radius:22px;box-shadow:0 26px 70px rgba(3,42,67,.27);overflow:hidden;display:flex;flex-direction:column}
.support-chat-panel[hidden]{display:none}.support-chat-head{display:flex;align-items:center;justify-content:space-between;padding:15px 17px;background:linear-gradient(135deg,#075b87,#0b9b76);color:#fff}.support-chat-head div:first-child{display:flex;flex-direction:column}.support-chat-head span{font-size:11px;opacity:.82}.support-chat-head strong{font-size:17px}.support-chat-head-actions{display:flex;gap:6px}.support-chat-head-actions button{width:34px;height:34px;border:1px solid rgba(255,255,255,.35);border-radius:10px;background:rgba(255,255,255,.12);color:#fff;font:700 20px/1 inherit;cursor:pointer}
.support-chat-note{margin:0;padding:10px 14px;background:#f2f8fb;color:#55717f;font-size:11px;line-height:1.7;border-bottom:1px solid #e2edf2}.support-messages{flex:1;min-height:0;overflow:auto;padding:14px;background:linear-gradient(180deg,#f7fbfd,#fff);display:flex;flex-direction:column;gap:10px}.support-empty{margin:auto;text-align:center;color:#78909c;font-size:13px;padding:22px}.support-message{max-width:86%;padding:9px 11px;border-radius:16px;box-shadow:0 3px 11px rgba(15,63,86,.07)}.support-message.mine{align-self:flex-start;background:#dff7ee;border-bottom-left-radius:5px}.support-message.theirs{align-self:flex-end;background:#fff;border:1px solid #dbe8ee;border-bottom-right-radius:5px}.support-message-meta{display:flex;gap:8px;justify-content:space-between;align-items:center;margin-bottom:4px;font-size:9px;color:#6d8490}.support-message p{margin:0;font-size:13px;line-height:1.65;color:#163947;overflow-wrap:anywhere}.support-compose{display:grid;grid-template-columns:1fr auto;gap:8px;padding:11px;border-top:1px solid #dfeaf0;background:#fff}.support-compose textarea{resize:none;min-height:46px;max-height:110px;border:1px solid #ccdde5;border-radius:13px;padding:10px 11px;font:500 12px/1.6 Cairo,sans-serif}.support-compose button{align-self:stretch;min-width:74px;padding-inline:13px}.support-chat-status{padding:8px 12px;background:#e8f8f1;color:#087155;font-size:11px}.support-chat-status.error{background:#fff0f0;color:#b42318}
.admin-support-section{margin-top:22px;padding-top:20px;border-top:1px solid #dfe8ed}.admin-support-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.admin-support-head span{font-size:11px;color:#0a7b67;font-weight:800}.admin-support-head h3{margin:3px 0 0;color:#173c4b}.admin-support-workspace{display:grid;grid-template-columns:minmax(260px,34%) 1fr;gap:14px;min-height:520px}.admin-support-threads{border:1px solid #dbe7ed;border-radius:17px;background:#f8fbfc;overflow:auto;padding:8px}.admin-support-thread{width:100%;display:grid;grid-template-columns:8px 1fr auto;align-items:start;gap:9px;text-align:right;border:0;border-bottom:1px solid #e1eaee;background:transparent;padding:12px 8px;font-family:inherit;cursor:pointer}.admin-support-thread:last-child{border-bottom:0}.admin-support-thread:hover,.admin-support-thread.selected{background:#eaf7f3;border-radius:12px}.thread-status{width:8px;height:8px;border-radius:999px;margin-top:6px;background:#9ca3af}.thread-status.open{background:#13a274}.thread-copy{display:flex;flex-direction:column;min-width:0}.thread-copy strong{font-size:12px;color:#173c4b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.thread-copy small{font-size:10px;color:#6f8792;direction:ltr;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.thread-copy time{font-size:9px;color:#90a3ac;margin-top:4px}.thread-unread{font-size:9px;color:#fff;background:#ef4444;border-radius:999px;padding:3px 7px}.admin-support-conversation{display:flex;flex-direction:column;border:1px solid #dbe7ed;border-radius:17px;overflow:hidden;background:#fff}.admin-support-conversation-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid #dfe9ee;background:#f7fbfc}.admin-support-conversation-head div{display:flex;flex-direction:column}.admin-support-conversation-head span{font-size:10px;color:#78909c}.admin-support-conversation-head strong{font-size:14px;color:#153d4d}.admin-support-messages{min-height:350px}.admin-support-compose{grid-template-columns:1fr 110px}.compact-button{padding:7px 10px!important;font-size:11px!important;min-height:auto!important}.admin-user-title{display:flex;justify-content:space-between;gap:10px;align-items:start}.admin-user-title h4{margin:0 0 3px}.admin-role-badge{font-size:9px;font-weight:800;border-radius:999px;padding:5px 8px;white-space:nowrap}.admin-role-badge.manager{background:#fff1c9;color:#8a5b00}.admin-role-badge.user{background:#e7f4fa;color:#17607d}.admin-user-item .inline-actions{margin-top:8px}
@media(max-width:800px){.support-chat-toggle{left:14px;bottom:14px}.support-chat-panel{left:14px;bottom:70px}.admin-support-workspace{grid-template-columns:1fr;min-height:0}.admin-support-threads{max-height:260px}.admin-support-conversation{min-height:480px}.admin-support-head{align-items:flex-start;gap:8px}.admin-support-head button{font-size:11px;padding:8px}}
@media print{.support-chat-toggle,.support-chat-panel{display:none!important}}

.support-chat-toggle[hidden]{display:none!important}

/* Premium accounts: remove capture shield and watermark completely. */
body.premium-unprotected .security-watermark,
body.premium-unprotected .screen-shield{display:none!important;}
body.premium-unprotected.capture-guard #appShell{filter:none!important;opacity:1!important;}

/* Package entitlements and comprehensive plan */
.package-plan-selector{grid-template-columns:repeat(2,minmax(0,1fr))}
.subscription-plan-option.comprehensive-option{background:linear-gradient(145deg,#fff9ee,#fff);border-color:#efd6a8}
.subscription-plan-option.comprehensive-option.selected{border-color:#d48a1c;background:linear-gradient(145deg,#fff4dc,#fffdf8);box-shadow:0 12px 28px rgba(212,138,28,.16)}
.plan-choice-badge.package-badge{background:linear-gradient(135deg,#178da3,#0a9b8e)}
.plan-choice-badge.comprehensive-badge{background:linear-gradient(135deg,#a15d08,#ef9e24)}
@media(max-width:650px){.package-plan-selector{grid-template-columns:1fr}}
