/* ========== Projecthon Design System (RTL) ========== */

/* ===== 0. Bahij TheSansArabic - self-hosted ===== */
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-ExtraLight.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-SemiLight.ttf") format("truetype");
  font-weight: 350;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Plain.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bahij TheSansArabic";
  src: url("../fonts/Bahij_TheSansArabic-Black.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ===== 1. Design Tokens ===== */
:root {
  /* Primary palette - derived from brand #362978 */
  --ph-bg: #0c0a18;
  --ph-ink: #ede9f5;
  --ph-ink-dim: #a59fbd;
  --ph-muted: #7b7494;
  --ph-stroke: #2a2450;
  --ph-card-1: #1a1530;
  --ph-card-2: #150f28;

  /* Accent colors */
  --ph-violet: #362978;
  --ph-pink: #ac46bd;
  --ph-cyan: #27d8d3;
  --ph-orange: #ff6a00;

  /* Semantic */
  --danger: #b91c1c;
  --ok: #16a34a;
  --success: #16a34a;
  --warning: #b45309;

  /* Legacy aliases (referenced by existing rules) */
  --bg: #0c0a18;
  --bg-2: #100e1e;
  --card: #1a1530;
  --stroke: #2a2450;
  --text: #ede9f5;
  --text-dim: #a59fbd;
  --muted: #7b7494;
  --panel: #1a1530;
  --panel-2: #150f28;
  --brand: #5b4ba8;
  --brand-2: #362978;
  --ring: rgba(91, 75, 168, 0.35);
  --accent-1: #ac46bd;
  --accent-2: #27d8d3;
  --accent-3: #16a34a;
}

/* Base */
body {
  direction: rtl;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Bahij TheSansArabic",
    "Tajawal",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    "Helvetica Neue",
    Arial,
    "Noto Sans",
    "Apple Color Emoji",
    "Segoe UI Emoji",
    "Segoe UI Symbol";
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Links */
a {
  color: var(--accent-2);
}
a:hover {
  color: #5fd0e3;
}

/* Container helpers */
.section {
  padding: 64px 0;
}
.section-alt {
  padding: 64px 0;
  background: var(--bg-2);
}

/* Navbar */
.app-navbar {
  background: linear-gradient(90deg, #14183a, var(--bg) 70%);
  border-bottom: 1px solid var(--stroke);
}
.app-navbar .nav-link {
  color: #fff;
  opacity: 0.8;
  padding-inline: 0.75rem;
}
.app-navbar .nav-link:hover {
  opacity: 1;
}
.app-navbar .nav-link.active {
  opacity: 1;
  border-bottom: 2px solid var(--accent-2);
}

/* Hero */
.hero {
  background:
    radial-gradient(
      1000px 400px at 85% -20%,
      rgba(173, 69, 190, 0.25),
      transparent 60%
    ),
    radial-gradient(
      800px 300px at 20% -10%,
      rgba(53, 182, 206, 0.25),
      transparent 60%
    ),
    linear-gradient(180deg, #111538, var(--bg));
  color: #eef1ff;
  text-align: center;
  padding: 96px 0;
}
.hero .lead {
  color: var(--muted);
}

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 16px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
  color: var(--text);
}
.card-ghost {
  background: transparent;
  border: 1px dashed var(--stroke);
}

/* Buttons */
.btn-primary {
  background: var(--accent-1);
  border-color: var(--accent-1);
}
.btn-primary:hover {
  filter: brightness(1.08);
}

.btn-outline-primary {
  color: var(--accent-2);
  border-color: var(--accent-2);
}
.btn-outline-primary:hover {
  background: var(--accent-2);
  color: #fff;
}

.btn-success {
  background: var(--accent-3);
  border-color: var(--accent-3);
  color: #0c1b1b;
}
.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
}

/* Forms */
.form-control,
.form-select,
.form-check-input,
.input-group-text {
  background: #0e1433;
  color: var(--text);
  border: 1px solid var(--stroke);
}
.form-control::placeholder {
  color: #9aa3d9;
}
.form-control:focus,
.form-select:focus {
  border-color: var(--accent-2);
  box-shadow: none;
}

/* Table */
.table {
  --bs-table-bg: var(--card);
  --bs-table-border-color: var(--stroke);
  color: var(--text);
  border-radius: 12px;
  overflow: hidden;
}
.table thead th {
  background: #131945;
  color: #dfe5ff;
  border-bottom: 1px solid var(--stroke);
}

/* Badges / Pills */
.badge-soft {
  background: rgba(53, 182, 206, 0.15);
  color: #8ce5f4;
  border: 1px solid rgba(53, 182, 206, 0.25);
}
.badge-soft-success {
  background: rgba(169, 209, 142, 0.15);
  color: #c8efb8;
  border: 1px solid rgba(169, 209, 142, 0.25);
}
.badge-soft-danger {
  background: rgba(239, 71, 111, 0.15);
  color: #ffc1cf;
  border: 1px solid rgba(239, 71, 111, 0.25);
}

/* Section Titles with gradient ink */
.title-ink {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Footer */
.app-footer {
  background: var(--bg);
  border-top: 1px solid var(--stroke);
  color: var(--muted);
}

/* Utility */
.shadow-soft {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.round-12 {
  border-radius: 12px;
}
.round-16 {
  border-radius: 16px;
}
.hr-soft {
  border-color: var(--stroke);
  opacity: 0.35;
}

/* Login/Forms grid helpers (تخطيط الشاشات بدون تعديل الـViews) */
.auth-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 992px) {
  .auth-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.auth-card {
  padding: 20px;
}

/* Hero CTA buttons spacing */
.hero-cta {
  gap: 12px;
}

/* Public cards (قائمة المبادرات) */
.project-card .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

/* Alerts on dark */
.alert {
  border-radius: 12px;
  border: 1px solid var(--stroke);
}
.alert-info {
  background: rgba(53, 182, 206, 0.12);
  color: #c9f5ff;
  border-color: rgba(53, 182, 206, 0.25);
}
.alert-warning {
  background: rgba(255, 193, 7, 0.12);
  color: #ffe6a3;
  border-color: rgba(255, 193, 7, 0.25);
}

/* ====== تحسين التباين العام ====== */

body {
  color: var(--text);
  background: var(--bg);
}
a {
  color: var(--brand);
}
.muted {
  color: var(--muted);
}

/* ====== الهيرو والنصوص الباهتة في (عن بروجكثون) ====== */
.lead {
  color: #eef1ff;
  line-height: 1.9;
}

/* ====== بطاقات عامة ====== */
.card {
  background: linear-gradient(180deg, var(--panel) 0%, var(--panel-2) 100%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 18px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* عناوين الأقسام */
.section-title {
  color: #cbd5ff;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ====== أزرار واضحة ====== */
.btn {
  background: #362881;
  color: #aff2f2;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: none;
  transition:
    background-color 0.2s,
    transform 0.1s;
}
.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}
.btn:active {
  transform: translateY(0);
}
.btn.ok {
  background: var(--ok);
  color: #fff;
}
.btn.danger {
  background: var(--danger);
  color: #fff;
}
.btn.ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--text);
}
.btn.sm {
  padding: 6px 10px;
  font-size: 0.9rem;
}

/* شارات ووسوم */
.badge {
  background: #1f254a;
  color: #cfe1ff;
  padding: 6px 10px;
  border-radius: 999px;
}
.tag {
  background: #1d223f;
  color: #a9b6ff;
  padding: 4px 10px;
  border-radius: 10px;
}

/* جداول */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}
.table thead th {
  color: #cfd6ff;
  font-weight: 800;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
}
.table tbody td {
  padding: 12px;
  background: #0f1433;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.table tbody tr {
  border-radius: 12px;
}

/* ====== شبكة النماذج (Register / Document) ====== */
.grid {
  display: grid;
  gap: 12px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 680px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
form label {
  color: #d9deff;
  font-weight: 700;
  font-size: 0.95rem;
}
form input,
form textarea,
form select {
  background: #0e1435;
  color: #f5f7ff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 10px 12px;
}
form textarea {
  min-height: 120px;
}

/* ====== “شركاؤنا” داكن يناسب شعارات بيضاء ====== */
.partners-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
@media (max-width: 992px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.partner-card {
  background: #0f1330;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 20px;
  text-align: center;
}
.partner-card img {
  max-height: 80px;
  opacity: 0.95;
}
.partner-card h6 {
  color: #cfd6ff;
  margin-top: 10px;
}

/* ====== تواصل معنا ====== */
#contact,
#partners {
  background: #0b0f27;
}
#contact p {
  color: #eef2ff;
  font-weight: 600;
}

/* ====== مربعات الهيدر/الفورمز في صفحة الدخول ====== */
.form-wrap {
  background: linear-gradient(180deg, #0f1433, #0b1030);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 18px;
}
.h-title {
  color: #dbe3ff;
  font-weight: 800;
}

/* ====== شريط علوي (روابط الأدمن/تسجيل الخروج) ====== */
.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .sep {
  opacity: 0.35;
}

/* تحسين وضوح النصوص على الخلفية الداكنة */
.text-muted {
  color: rgba(255, 255, 255, 0.75);
}
.text-white-75 {
  color: rgba(255, 255, 255, 0.85);
}

/* ألوان أقوى للأقسام الداكنة */
.section,
.section-alt {
  padding: 64px 0;
}
.section-alt {
  background: rgba(255, 255, 255, 0.02);
}

/* بطاقات شركاؤنا بالشعار الأبيض */
#partners .card {
  background: #0f1530; /* أغمق عشان الشعار الأبيض يبان */
  color: #e6e6f0;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

/* contact readability */
#contact p {
  color: rgba(255, 255, 255, 0.85);
}

/* وثيقة المبادرة – مسافات وراحة قراءة */
.card.shadow-soft {
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.form-label {
  color: #e8e8ff;
}
.form-control,
textarea.form-control {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.form-control::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

/* navbar وfooter (ثابتين) */
.app-navbar {
  background: #0b0f24;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.app-footer {
  background: #0b0f24;
  color: rgba(255, 255, 255, 0.7);
}

/* أزرار صغيرة متناسقة */
.btn-danger.btn-sm,
.btn.btn-sm.btn-danger {
  padding: 0.35rem 0.7rem;
  font-size: 0.875rem;
}
/* ========= إصلاحات ألوان النص على الثيم الداكن ========= */
.app-card,
.app-card *:not(.btn):not(.badge):not(.tag) {
  color: var(--ink);
}

.table,
.table thead th,
.table tbody td {
  color: var(--ink);
}

.form-label,
label {
  color: var(--ink);
  font-weight: 600;
}

/* ========= تخطيط وراحة لصفحة وثيقة المبادرة ========= */
.doc-form .section {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
}

.doc-form .section legend {
  padding: 0 8px;
  font-weight: 700;
  color: var(--accent);
}

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

.doc-form .grid.grid-2 {
  grid-template-columns: 1fr 1fr;
}
.doc-form .col-span-2 {
  grid-column: 1 / -1;
}

.doc-form .form-row .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.doc-form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.doc-form .form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  margin-top: 10px;
}
/* حدود ناعمة للكروت الداخلية */
.border-soft {
  border: 1px solid rgba(255, 255, 255, 0.08);
}

/* توحيد حقول النماذج في الثيم الداكن */
.card .form-control {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink);
}

/* ====== Projecthon New Theme (RTL) ====== */

body {
  background: var(--ph-bg);
  color: var(--ph-ink);
  font-family: "Bahij TheSansArabic", "Tajawal", system-ui;
  direction: rtl;
}
a {
  color: var(--ph-cyan);
}
a:hover {
  filter: brightness(1.1);
}

.ph-section {
  padding: 72px 0;
  background: var(--ph-bg);
}
.ph-section-alt {
  padding: 72px 0;
  background: #022456;
  border-block: 1px solid var(--ph-stroke);
}

/* ===== HERO with Video ===== */
.ph-hero {
  position: relative;
  overflow: clip;
  min-height: 78vh;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--ph-stroke);
}
.ph-hero.has-video .ph-hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: saturate(1.1) contrast(1.05) brightness(0.65);
}
.ph-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      900px 380px at 12% -10%,
      rgba(8, 243, 236, 0.2),
      transparent 60%
    ),
    radial-gradient(
      1100px 420px at 90% -25%,
      rgba(172, 70, 189, 0.22),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.35));
}

/* Decorative floating shapes */
.ph-hero-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
  opacity: 0.18;
  pointer-events: none;
}
.ph-shape-a {
  width: 240px;
  height: 240px;
  right: -60px;
  top: -40px;
  background: radial-gradient(closest-side, var(--ph-pink), transparent 70%);
  animation: floatY 6s ease-in-out infinite;
}
.ph-shape-b {
  width: 280px;
  height: 280px;
  left: -70px;
  bottom: -60px;
  background: radial-gradient(closest-side, var(--ph-cyan), transparent 70%);
  animation: floatX 7s ease-in-out infinite;
}
@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}
@keyframes floatX {
  0%,
  100% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(14px);
  }
}

.ph-hero-logo {
  height: clamp(110px, 10vw, 160px);
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.35));
}
.ph-hero-kicker {
  margin: 14px 0 6px;
  color: var(--ph-ink-dim);
  font-weight: 700;
  letter-spacing: 0.2px;
}
.ph-hero-title {
  font-size: clamp(2rem, 2.4vw + 1rem, 3.1rem);
  font-weight: 900;
  margin-bottom: 18px;
  line-height: 1.25;
  color: #fff;
}
.ph-hero-cta .btn {
  border-radius: 14px;
  padding: 12px 18px;
  font-weight: 800;
}

.ph-btn-primary {
  background: linear-gradient(90deg, var(--ph-pink), var(--ph-cyan));
  color: #001627;
  border: 0;
  box-shadow: none;
}
.ph-btn-ghost {
  background: transparent;
  color: #fff;
  border: 1px solid var(--ph-stroke);
}
.ph-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
}

.ph-hero-stamp {
  position: absolute;
  inset-inline: 0;
  bottom: -18px;
  text-align: center;
  font-weight: 900;
  letter-spacing: 0.22em;
  opacity: 0.06;
  pointer-events: none;
  font-size: clamp(3rem, 8vw + 1rem, 9rem);
  color: #fff;
}

/* Cards + shared */
.ph-card {
  background: var(--ph-card-1);
  border: 1px solid var(--ph-stroke);
  border-radius: 18px;
  color: var(--ph-ink);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.ph-lead {
  color: #ebf3ff;
  font-size: 1.12rem;
  font-weight: 600;
}
.ph-title-ink {
  background: linear-gradient(90deg, #c0d0ff, #6ee7e7);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  letter-spacing: 0.5px;
}
.ph-strong {
  color: #f3f7ff;
  font-weight: 800;
}

/* Lists */
.ph-list {
  margin: 0;
  padding: 0 1rem;
}
.ph-list li {
  margin: 0.25rem 0;
  color: var(--ph-ink-dim);
}

/* Goals (لونين + نقاط يمين/يسار + أنيميشن خفيف) */
#goals {
  position: relative;
  overflow: clip;
}
#goals::before,
#goals::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  opacity: 0.1;
  filter: blur(0.2px);
  background:
    radial-gradient(
        6px 6px at 14px 14px,
        rgba(255, 255, 255, 0.45) 45%,
        transparent 50%
      )
      0 0/28px 28px,
    radial-gradient(
        6px 6px at 14px 14px,
        rgba(255, 255, 255, 0.35) 45%,
        transparent 50%
      )
      14px 14px/28px 28px;
}
#goals::before {
  inset-inline-start: -40px;
  top: -30px;
  transform: rotate(12deg);
}
#goals::after {
  inset-inline-end: -40px;
  bottom: -40px;
  transform: rotate(-8deg);
}

.goals-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 992px) {
  .goals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .goals-grid {
    grid-template-columns: 1fr;
  }
}
.goal-card {
  position: relative;
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--ph-stroke);
}
.goal-card h5 {
  font-weight: 900;
  margin-bottom: 6px;
  letter-spacing: 0.2px;
  color: #fff;
}
.goal-card p {
  margin: 0;
  color: var(--ph-ink-dim);
  font-weight: 600;
}
.goal-a {
  background: linear-gradient(180deg, #151b8a, #0f176f);
} /* اشتقاق من #362880 */
.goal-b {
  background: linear-gradient(180deg, #271a73, #101457);
} /* تنويع نفس العائلة */
.ph-float {
  animation: updown 4.8s ease-in-out infinite;
}
.ph-float-delay {
  animation: updown 5.6s ease-in-out 0.5s infinite;
}
@keyframes updown {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Partners grid */
.partners-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 992px) {
  .partners-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.partner-card {
  text-align: center;
}
.partner-card img {
  max-height: 82px;
  width: auto;
  margin: 0 auto 10px;
  display: block;
}
.partner-card h6 {
  color: #e6edff;
  font-weight: 800;
}

/* Inputs (بحث المبادرات) */
.ph-input.sm {
  height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid var(--ph-stroke);
  background: #0e2b6b;
  color: #fff;
}
.ph-input.sm::placeholder {
  color: #bfd6ff;
}

/* Buttons (bootstrap overrides safe) */
.btn {
  font-weight: 800;
}
.btn-sm {
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}

/* Contact */
#contact p {
  color: rgba(255, 255, 255, 0.9);
}

/* Media helpers */
.ratio.ratio-16x9 video,
.ratio.ratio-16x9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== تحسين بطاقات الأهداف/المراحل مع أيقونات متناسقة ===== */
.ph-goal-card {
  position: relative;
  overflow: hidden;
}
.ph-step {
  position: relative;
  overflow: visible;
}
.ph-ico {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, #ac46bd, #08f3ec);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  box-shadow: none;
}
.ph-ico.sm {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.ph-ico svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: #001a24;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ph-ico.sm svg {
  width: 22px;
  height: 22px;
}

.ph-step .fw-bold {
  color: #f2f6ff;
}

/* تحسين تباعد العناصر داخل أقسام جديدة */
#beneficiaries .ph-card h6,
#value .ph-card h6 {
  color: #f2f6ff;
  font-weight: 800;
}

/* CTA المبادرات */
#initiatives-cta .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

/* تباين أعلى لعناوين صغيرة داخل بطاقات */
.ph-card h5,
.ph-card h6 {
  color: #fff;
  font-weight: 800;
}

/* تأكيد ألوان الشريط (الجوائز) مع الهوية */
.ph-ribbon {
  background: linear-gradient(135deg, #362880, #ac46bd);
  border: 0;
  border-radius: 22px;
  box-shadow: 0 20px 38px rgba(0, 0, 0, 0.35);
}

/* Chips / Badges أنيقة */
.badge.chip {
  background: rgba(8, 243, 236, 0.15);
  border: 1px solid rgba(8, 243, 236, 0.35);
  color: #8efaff;
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
}
.badge.pill {
  background: rgba(172, 70, 189, 0.15);
  border: 1px solid rgba(172, 70, 189, 0.35);
  color: #f2b7ff;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 700;
}
.badge.pill.muted {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.78);
}

/* مدخلات شريط الأدوات */
.ph-input.sm {
  height: 40px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: #0e2b6b;
  color: #fff;
}
.ph-input.sm::placeholder {
  color: #bfd6ff;
}

/* ===== لوحة الألوان ===== */

/* ===== أهداف – Pills ===== */
.ph-goals {
  background: #0b1130;
}
.section-cap {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 16px;
}
.section-cap .cap-line {
  width: min(20vw, 160px);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ph-cyan),
    var(--ph-pink),
    var(--ph-violet)
  );
  opacity: 0.55;
}
.goals-pills {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 992px) {
  .goals-pills {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .goals-pills {
    grid-template-columns: 1fr;
  }
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0d1740;
  border: 1px solid var(--ph-stroke);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.pill-accent {
  background: linear-gradient(180deg, #121742, #0e1435);
  border-color: rgba(255, 255, 255, 0.14);
}
.pill .ico {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ph-pink), var(--ph-cyan));
  border-radius: 10px;
}
.pill .ico svg {
  width: 20px;
  height: 20px;
  color: #00182a;
}

/* ===== مراحل – كاروسيل التفاف بلا نهاية ===== */
.ph-stages {
  background: linear-gradient(180deg, #04163c, #002160);
  border-top: 1px solid var(--ph-stroke);
  border-bottom: 1px solid var(--ph-stroke);
}
.loop {
  position: relative;
  overflow: hidden;
}
.loop-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scrollLoop 28s linear infinite;
}
.stage-card {
  width: 260px;
  min-height: 360px;
  background: #0f173a;
  color: var(--ph-ink);
  border: 1px solid var(--ph-stroke);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.stage-card .card-img {
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid var(--ph-stroke);
  background: #0c1330;
}
.stage-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stage-card .card-body {
  padding: 14px;
}
.stage-card h5 {
  font-weight: 900;
  margin-bottom: 6px;
  color: #fff;
}

@keyframes scrollLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-50%));
  } /* لأننا ضاعفنا القائمة */
}

/* أزرار التحكّم */
#pauseLoop,
#playLoop {
  min-width: 160px;
}

/* ===== Goals Pills ===== */
.ph-goals {
  background: #0b1130;
}
.section-cap {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-content: center;
  margin-bottom: 16px;
}
.section-cap .cap-line {
  width: min(20vw, 160px);
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #08f3ec, #ac46bd, #362880);
  opacity: 0.55;
}

.goals-pills {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 992px) {
  .goals-pills {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .goals-pills {
    grid-template-columns: 1fr;
  }
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0d1740;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.2px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.pill-accent {
  background: linear-gradient(180deg, #121742, #0e1435);
  border-color: rgba(255, 255, 255, 0.18);
}
.pill .ico {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ac46bd, #08f3ec);
  border-radius: 10px;
  color: #00182a;
}

/* ===== Stages Infinite Loop ===== */
.ph-stages {
  background: linear-gradient(180deg, #04163c, #002160);
  border-block: 1px solid rgba(255, 255, 255, 0.12);
}
.loop {
  position: relative;
  overflow: hidden;
}
.loop-track {
  display: flex;
  gap: 16px;
  width: max-content;
  animation: scrollLoop 28s linear infinite;
}
@keyframes scrollLoop {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.stage-card {
  width: 260px;
  min-height: 360px;
  background: #0f173a;
  color: #f2f6ff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}
.stage-card .card-img {
  height: 160px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: #0c1330;
}
.stage-card .card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stage-card .card-body {
  padding: 14px;
}
.stage-card h5 {
  font-weight: 900;
  margin-bottom: 6px;
  color: #fff;
}

/* ===== Shared View Components (extracted from inline <style> blocks) ===== */

/* Page wrappers (.wrap and .page-wrap used across all dashboard/form views) */
.wrap,
.page-wrap {
  background: linear-gradient(180deg, #0b1130, #081028);
  padding: 16px;
  border-radius: 18px;
  border: 1px solid var(--ph-stroke);
  color: var(--ph-ink);
}

/* Card variant for dashboard views */
.cardx {
  background: #0f173a;
  border: 1px solid var(--ph-stroke);
  color: var(--ph-ink);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
}

/* Button variant for dashboard views */
.btnx {
  background: #151c3a;
  color: var(--ph-ink);
  border: 1px solid var(--ph-stroke);
  padding: 0.55rem 0.9rem;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
}
.btnx:hover {
  filter: brightness(1.05);
  color: var(--ph-ink);
}
.btnx.primary {
  background: linear-gradient(180deg, #0cc9bf, #08f3ec);
  color: #00222a;
  border: 0;
}
.btnx.danger {
  background: transparent;
  color: #ff9ba5;
  border: 1px solid rgba(255, 155, 165, 0.35);
}

/* Table variant for dashboard views */
.tablex {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.tablex th,
.tablex td {
  border: 1px solid var(--ph-stroke);
  padding: 10px;
  vertical-align: top;
  color: var(--ph-ink);
}
.tablex th {
  background: #10193f;
}

/* Input styling for dashboard views */
.input,
.select {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--ph-stroke);
  background: #0c1330;
  color: var(--ph-ink);
}

/* Auto-growing textareas: wrap + expand so long content is never clipped */
textarea.input {
  min-height: 2.6rem;
  line-height: 1.5;
  resize: none;
  overflow: hidden;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  box-sizing: border-box;
  vertical-align: top;
}
/* Comfortable width for textareas inside the form's data tables */
.tablex td textarea.input { min-width: 7rem; }
/* Wide form tables scroll horizontally instead of cramping cells */
.table-overflow-x { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Character limit: in-field counter + over-limit highlight (Twitter-style) ── */
/* Growth cap for auto-grow textareas (JS toggles overflow-y past this). */
textarea.input { max-height: 20rem; }

.ph-limited { position: relative; display: block; }
/* Reserve space so the in-field counter never overlaps typed text. */
.ph-limited-area > textarea { padding-bottom: 1.3rem; }
.ph-limited-input > input { padding-inline-end: 3.2rem; }

.ph-char-counter {
  position: absolute;
  font-size: .7rem;
  line-height: 1;
  color: var(--muted-foreground, #9aa);
  opacity: .6;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
  z-index: 3;
}
.ph-limited-area > .ph-char-counter { bottom: .4rem; inset-inline-end: .7rem; }   /* RTL → left */
.ph-limited-input > .ph-char-counter { top: 50%; transform: translateY(-50%); inset-inline-end: .7rem; }
.ph-char-counter.is-over { color: #e5484d; opacity: 1; font-weight: 700; }
textarea.ph-over-limit,
input.ph-over-limit { border-color: #e5484d !important; }

/* Transparent mirror layered over a textarea: only the red highlight on the
   over-limit characters shows (the textarea shows its own text underneath). */
.ph-limit-backdrop {
  position: absolute;
  inset: 0;
  margin: 0;
  border-style: solid;
  border-color: transparent;
  box-sizing: border-box;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  word-break: break-word;
  overflow: hidden;
  color: transparent;
  pointer-events: none;
  z-index: 2;
}
.ph-over-mark { background: rgba(229, 72, 77, .4); border-radius: 2px; color: transparent; }

/* Title ink for dashboard views */
.title-ink {
  color: var(--ph-ink);
  font-weight: 900;
}

/* Flash messages */
.msg {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--ph-stroke);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ph-ink);
}
.msg.ok,
.msg-ok {
  border-color: rgba(32, 213, 160, 0.35);
  color: #9bffd9;
  background: rgba(32, 213, 160, 0.08);
}
.msg.err,
.msg-err {
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb0b0;
  background: rgba(255, 107, 107, 0.08);
}

/* Status badges (TeamsBoard) */
.status {
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  display: inline-block;
}
.status-Accepted {
  background: rgba(32, 213, 160, 0.12);
  color: #9bffd9;
  border: 1px solid rgba(32, 213, 160, 0.35);
}
.status-Pending {
  background: rgba(255, 176, 32, 0.1);
  color: #ffd79e;
  border: 1px solid rgba(255, 176, 32, 0.35);
}
.status-Rejected {
  background: rgba(255, 107, 107, 0.1);
  color: #ffb0b0;
  border: 1px solid rgba(255, 107, 107, 0.35);
}

/* Role badges (Admin/Index) */
.role {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--ph-stroke);
  background: rgba(255, 255, 255, 0.06);
}
.role-Reviewer {
  border-color: rgba(255, 220, 128, 0.35);
  background: rgba(255, 220, 128, 0.08);
}
.role-Judge {
  border-color: rgba(128, 255, 200, 0.35);
  background: rgba(128, 255, 200, 0.08);
}

/* On/Off badges (EvaluationCriteria) */
.badge-on {
  background: rgba(32, 213, 160, 0.1);
  border-color: rgba(32, 213, 160, 0.35);
  color: #9bffd9;
}
.badge-off {
  background: rgba(255, 107, 107, 0.1);
  border-color: rgba(255, 107, 107, 0.35);
  color: #ffb0b0;
}
.badge-ok {
  background: rgba(8, 243, 236, 0.1);
  border-color: rgba(8, 243, 236, 0.45);
}
.badge-warn {
  background: rgba(255, 193, 7, 0.1);
  border-color: rgba(255, 193, 7, 0.35);
}

/* Results page */
.rank-badge {
  display: inline-block;
  min-width: 42px;
  text-align: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid var(--ph-stroke);
  background: rgba(255, 255, 255, 0.06);
}
.rank-1 {
  background: rgba(247, 201, 72, 0.15);
  color: #f7c948;
  border-color: rgba(247, 201, 72, 0.35);
}
.rank-2 {
  background: rgba(192, 199, 209, 0.15);
  color: #c0c7d1;
  border-color: rgba(192, 199, 209, 0.35);
}
.rank-3 {
  background: rgba(199, 134, 82, 0.15);
  color: #c78652;
  border-color: rgba(199, 134, 82, 0.35);
}
.top-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 900px) {
  .top-grid {
    grid-template-columns: 1fr;
  }
}
.top-card {
  background: #0f173a;
  border: 1px solid var(--ph-stroke);
  border-radius: 18px;
  padding: 18px;
  color: var(--ph-ink);
}
.top-rank {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 10px;
}
.top-score {
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--ph-cyan);
}
.top-1 .top-rank {
  color: #f7c948;
}
.top-2 .top-rank {
  color: #c0c7d1;
}
.top-3 .top-rank {
  color: #c78652;
}

/* Evaluation scoring */
.score-cell {
  min-width: 140px;
}
.comment-cell {
  min-width: 220px;
}
.total-box {
  font-size: 1.1rem;
  font-weight: 900;
}
.inline-form {
  display: inline;
}

/* Stats grid (Admin/Database) */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 900px) {
  .stats {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .stats {
    grid-template-columns: 1fr;
  }
}

/* Text utilities */
.sub {
  color: var(--ph-muted);
}
.text-block {
  white-space: pre-wrap;
  line-height: 1.8;
}
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  line-height: 1.6;
}
.empty {
  color: var(--ph-muted);
  padding: 20px;
  text-align: center;
}
.toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.inline {
  display: inline;
}
.hrd {
  border-color: var(--ph-stroke);
  opacity: 0.5;
}
.section-title {
  margin-bottom: 10px;
  font-weight: 800;
}

/* Register page */
.ph-accent-border {
  border: 1px solid var(--ph-stroke);
  border-radius: 18px;
}
.member-card {
  border: 1px solid var(--ph-stroke);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.member-card h6 {
  margin: 0 0 8px 0;
  font-weight: 800;
}
.member-actions {
  display: flex;
  gap: 8px;
}
.btn-add {
  background: var(--ph-stroke);
  color: var(--ph-ink);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 8px 14px;
}
.btn-add:hover {
  filter: brightness(1.05);
}
.btn-del {
  background: transparent;
  color: #ffb4c1;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  padding: 6px 10px;
}
.btn-del:hover {
  background: rgba(255, 255, 255, 0.06);
}
.small-hint {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.88rem;
}
.highlight-field {
  border: 1px solid var(--ph-stroke);
  outline: none;
  box-shadow: none;
}

/* Initiative form extras */
.validation {
  color: #ff8080;
  font-size: 13px;
}

/* Mobile navbar toggler (white icon on dark bg) */
.navbar-toggler {
  border-color: var(--ph-stroke);
}
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,255,255,0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.navbar-toggler {
  min-height: 44px;
  min-width: 44px;
}
.app-navbar .nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Admin sub-navigation bar */
.admin-subnav {
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--ph-stroke);
  padding: 6px 0;
}
.admin-subnav .container {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}
.admin-subnav a {
  color: var(--ph-ink-dim);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s;
}
.admin-subnav a:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--ph-ink);
}
.admin-subnav a.active {
  background: rgba(8, 243, 236, 0.12);
  color: var(--ph-cyan);
}

/* Pagination controls */
.ph-pagination {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}
.ph-pagination a,
.ph-pagination span {
  padding: 5px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ph-ink-dim);
  text-decoration: none;
  border: 1px solid var(--ph-stroke);
}
.ph-pagination a:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--ph-ink);
}
.ph-pagination .current {
  background: rgba(8, 243, 236, 0.15);
  color: var(--ph-cyan);
  border-color: rgba(8, 243, 236, 0.4);
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.filter-tabs a {
  padding: 5px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ph-ink-dim);
  text-decoration: none;
  border: 1px solid var(--ph-stroke);
  transition: background 0.15s;
}
.filter-tabs a:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--ph-ink);
}
.filter-tabs a.active {
  background: rgba(8, 243, 236, 0.12);
  color: var(--ph-cyan);
  border-color: rgba(8, 243, 236, 0.4);
}

/* ===== Home/Landing Page Unique Styles (extracted from Home/Index.cshtml) ===== */

/* Hero video layers */
.ph-hero-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ph-hero-layer.hero-mirror {
  background-size: cover;
  background-position: center;
  opacity: 0.55;
  z-index: 1;
}
.ph-hero-layer.hero-wash {
  background: none;
  opacity: 0.3;
  z-index: 2;
  mix-blend-mode: screen;
}
.ph-hero-layer.hero-tint {
  background: #0b1130;
  opacity: 0.45;
  mix-blend-mode: multiply;
  z-index: 3;
}
.ph-hero-layer.hero-vignette {
  background: radial-gradient(
    120% 80% at 50% 60%,
    rgba(0, 0, 0, 0) 35%,
    rgba(0, 0, 0, 0.35) 100%
  );
  z-index: 4;
}
.ph-hero > .container {
  position: relative;
  z-index: 5;
}
.ph-hero .ph-hero-logo {
  max-height: 140px;
  width: auto;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  display: inline-block;
}

/* Stages shelf (accordion/file tab style) */
.ph-stages {
  background: linear-gradient(180deg, #04163c, #002160);
  border-block: 1px solid var(--ph-stroke);
}
.stepper {
  position: relative;
  overflow: hidden;
}
.stepper-track {
  display: flex;
  gap: 16px;
  will-change: transform;
  transform: translateX(0);
  direction: ltr;
}
.stepper-track.is-stepping {
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.stage-shelf--dark {
  display: flex;
  gap: 16px;
  align-items: stretch;
  direction: rtl;
}
.stage-file {
  --violet: #ac46bd;
  --cyan: #08f3ec;
  position: relative;
  display: flex;
  align-items: stretch;
  min-height: 280px;
  border-radius: 20px;
  overflow: hidden;
  isolation: isolate;
  background: #0c1436;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  flex: 1 1 104px;
  min-width: 96px;
  transition:
    flex-basis 360ms cubic-bezier(0.22, 0.61, 0.36, 1),
    transform 240ms ease,
    box-shadow 240ms ease;
}
.stage-file:hover {
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}
.stage-file:nth-child(odd) {
  --ink: var(--violet);
}
.stage-file:nth-child(even) {
  --ink: var(--cyan);
}

.file-strip {
  width: 88px;
  min-width: 88px;
  display: grid;
  place-items: center;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--ink), #000 20%),
    color-mix(in oklab, var(--ink), #000 8%)
  );
}
.file-title {
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.3px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  text-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}
.file-panel {
  position: relative;
  flex: 0 1 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}
.file-panel__inner {
  height: 100%;
  padding: 24px 22px;
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-content: start;
  background: linear-gradient(
    90deg,
    rgba(11, 17, 48, 0.88) 0%,
    rgba(11, 17, 48, 0.76) 55%,
    rgba(11, 17, 48, 0.46) 100%
  );
  backdrop-filter: blur(6px) saturate(120%);
  border: 1px solid color-mix(in oklab, var(--ink), #fff 25%);
  border-radius: 18px;
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--ink), #fff 12%) inset,
    0 18px 38px rgba(0, 0, 0, 0.3),
    0 0 24px color-mix(in oklab, var(--ink), transparent 70%);
}
.file-icon {
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.35));
}
.file-text h3 {
  margin: 0 0 6px;
  color: #eaf1ff;
  font-weight: 900;
  letter-spacing: 0.2px;
}
.file-text p {
  margin: 0;
  color: #cfe7ff;
  opacity: 0.92;
  font-weight: 600;
}
.stage-file.is-active {
  flex: 5 1 620px;
}
.stage-file.is-active .file-panel {
  width: auto;
  flex: 1 1 auto;
  opacity: 1;
  pointer-events: auto;
}
.chev {
  inline-size: 18px;
  block-size: 18px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-right: none;
  border-top: none;
  transform: rotate(-45deg);
  margin-inline-start: 10px;
  opacity: 0.8;
}
.stage-file.is-open .chev {
  transform: rotate(135deg);
}

@media (max-width: 992px) {
  .stage-shelf--dark {
    flex-direction: column;
  }
  .stage-file {
    min-height: unset;
    flex: 1 1 auto;
  }
  .file-strip {
    width: 100%;
    height: 64px;
  }
  .file-title {
    writing-mode: horizontal-tb;
    transform: none;
  }
  .stage-file.is-active {
    flex: 1 1 auto;
  }
}
@media (max-width: 768px) {
  .stage-shelf--dark {
    display: block;
    gap: 10px;
  }
  .stage-file {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  }
  .stage-file .file-strip {
    height: auto;
    padding: 14px 16px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
  }
  .stage-file .file-title {
    font-weight: 900;
    font-size: 1.05rem;
    color: #eaf1ff;
  }
  .stage-file .file-panel {
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition:
      height 380ms cubic-bezier(0.22, 0.61, 0.36, 1),
      opacity 180ms ease;
    background: rgba(11, 17, 48, 0.45);
    backdrop-filter: saturate(120%) blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    margin-top: 8px;
  }
  .stage-file.is-open .file-panel {
    opacity: 1;
  }
  .file-panel__inner {
    padding: 14px 16px;
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 12px;
    align-items: start;
  }
  .file-icon {
    inline-size: 36px;
    block-size: 36px;
    opacity: 0.9;
  }
}

/* Beneficiaries carousel */
.benef-carousel {
  position: relative;
  overflow: hidden;
}
.benef-track {
  display: flex;
  gap: 14px;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  direction: ltr;
}
.benef-item {
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: #0d1740;
  border: 1px solid var(--ph-stroke);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}
.benef-circle {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.benef-circle.is-cyan {
  background: linear-gradient(135deg, #08f3ec, #06b6d4);
}
.benef-circle.is-violet {
  background: linear-gradient(135deg, #ac46bd, #362880);
}
.benef-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: #001a24;
  stroke-width: 2;
}
.benef-title {
  font-weight: 800;
  color: #f2f6ff;
}
.benef-nav {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 14px;
}
.benef-nav button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

/* Orbit carousel (values/outcomes) */
.orbit {
  position: relative;
  overflow: hidden;
}
.orbit__track {
  display: flex;
  gap: 16px;
  will-change: transform;
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
  direction: ltr;
}
.orbit__item {
  min-width: 300px;
  background: linear-gradient(180deg, #10183b, #0f1433);
  border: 1px solid var(--ph-stroke);
  color: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.orbit__item h6 {
  font-weight: 900;
  margin: 0 0 6px;
}
.orbit__arrow {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 10px;
  width: 36px;
  height: 36px;
  cursor: pointer;
}

/* Value deck (flip cards) */
.value-deck {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 992px) {
  .value-deck {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 600px) {
  .value-deck {
    grid-template-columns: 1fr;
  }
}
.vd-card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(180deg, #10183b, #0f1433);
  border: 1px solid var(--ph-stroke);
  padding: 16px;
  color: #fff;
  cursor: pointer;
}
.vd-face {
  transition: opacity 0.3s ease;
}
.vd-dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ph-cyan), var(--ph-pink));
  display: grid;
  place-items: center;
  color: #00182a;
  font-weight: 900;
}
.vd-reveal {
  position: absolute;
  inset: 0;
  padding: 16px;
  background: linear-gradient(180deg, #0f173a, #0c1330);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
}
.vd-card.is-open .vd-face {
  opacity: 0;
}
.vd-card.is-open .vd-reveal {
  opacity: 1;
}

/* Prizes section */
.prizes-section {
  text-align: center;
}
.prize-card {
  background: linear-gradient(180deg, #10183b, #0f1433);
  border: 1px solid var(--ph-stroke);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.prize-trophy {
  font-size: 2.5rem;
  margin-bottom: 8px;
}
.amount {
  font-weight: 900;
  color: var(--ph-cyan);
}
.place {
  font-weight: 800;
}
.first .amount {
  color: #f7c948;
}
.second .amount {
  color: #c0c7d1;
}
.third .amount {
  color: #c78652;
}
.extra-note {
  color: var(--ph-muted);
  margin-top: 12px;
}

/* Ribbon title */
.ribbon-title {
  text-align: center;
  font-weight: 900;
  margin: 0 0 18px;
}
.ribbon-title:before,
.ribbon-title:after {
  content: "";
  display: inline-block;
  width: 120px;
  height: 8px;
  margin: 0 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    var(--ph-cyan),
    var(--ph-pink),
    var(--ph-violet)
  );
  opacity: 0.35;
  vertical-align: middle;
}

/* Stepper card sizing */
#stages-stepper .stage-card {
  min-width: 260px;
}
#benef-stepper .chip {
  min-width: 200px;
}
#value-stepper .value-card {
  min-width: 320px;
}
#out-stepper .out-card {
  min-width: 280px;
}

/* Chip/value/out cards */
.chip,
.value-card,
.out-card {
  background: linear-gradient(180deg, #10183b, #0f1433);
  border: 1px solid var(--ph-stroke);
  color: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}
.chip {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.chip .dot {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--ph-cyan), var(--ph-pink));
  display: grid;
  place-items: center;
  color: #00182a;
  font-weight: 900;
}
.value-card,
.out-card {
  padding: 16px;
}
.value-card h6,
.out-card h6 {
  font-weight: 900;
  margin: 0 0 6px;
}

/* Partner card v2 + contact */
#partners-contact {
  background: linear-gradient(180deg, #0e1536, #0b1130);
  border-top: 1px solid var(--ph-stroke);
}
.partner-card2 {
  background: linear-gradient(180deg, #121a40, #0e1534);
  border: 1px solid var(--ph-stroke);
  border-radius: 16px;
  padding: 22px;
  text-align: center;
  height: 100%;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}
.partner-card2 img {
  max-height: 80px;
  width: auto;
  margin: 0 auto 8px;
  opacity: 0.95;
}
.contact-card {
  background: linear-gradient(180deg, #121a40, #0e1534);
  border: 1px solid var(--ph-stroke);
  border-radius: 16px;
  padding: 22px;
  color: var(--ph-ink);
}

/* About section */
/* old #about rules removed - was killing sticky with overflow:hidden */
.about-images {
  position: relative;
  display: inline-block;
  width: 30vw;
  max-width: 380px;
  aspect-ratio: 3/4;
}
@media (max-width: 992px) {
  .about-images {
    max-width: 180px;
  }
}
.about-images img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  user-select: none;
}
.about-images .back-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.35));
  z-index: 1;
}
.about-images .front-img {
  position: absolute;
  inset: 0;
  width: 15%;
  height: auto;
  object-fit: contain;
  margin: auto;
  transform: translate(10%, 10%);
  pointer-events: none;
  opacity: 0.98;
  animation: float 4.5s ease-in-out infinite;
  z-index: 2;
}
@keyframes float {
  0%,
  100% {
    transform: translate(10%, 5%);
  }
  50% {
    transform: translate(10%, -3%);
  }
}

/* (old venue section removed) */
.ph-venue__glass {
  position: relative;
  z-index: 1;
  width: min(900px, 92vw);
  margin-inline: auto;
  margin-block: 32px;
  padding: 18px 22px;
  background: rgba(10, 15, 38, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
}
.venue-head {
  font-weight: 900;
  font-size: 1.65rem;
  color: #dde9ff;
  margin-bottom: 10px;
}
.venue-ticker {
  --row: 38px;
  --gap: 10px;
  position: relative;
  height: calc(var(--row) * 3 + var(--gap) * 2);
  overflow: hidden;
  margin-top: 10px;
  padding: 0;
  list-style: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 22%,
    #000 78%,
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    #000 22%,
    #000 78%,
    transparent 100%
  );
}
.venue-ticker li {
  position: absolute;
  left: 0;
  right: 0;
  line-height: var(--row);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  color: #e8f1ff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}
.venue-ticker li[data-pos="-1"] {
  top: 0;
  opacity: 0.35;
}
.venue-ticker li[data-pos="0"] {
  top: calc(var(--row) + var(--gap));
  opacity: 1;
}
.venue-ticker li[data-pos="1"] {
  top: calc((var(--row) + var(--gap)) * 2);
  opacity: 0.35;
}
.venue-ticker li[hidden] {
  display: none;
}

/* ===== Phase 5: UX Utility Classes ===== */

/* Sort links in table headers */
.sort-link {
  text-decoration: none;
  color: inherit;
}
.sort-link:hover {
  color: var(--ph-cyan);
}
.sort-link.active {
  color: var(--ph-cyan);
}

/* Table overflow wrapper */
.table-overflow-x {
  overflow-x: auto;
}

/* Column width helpers */
.col-w-60 {
  width: 60px;
}
.col-w-90 {
  width: 90px;
}
.col-w-100 {
  width: 100px;
}
.col-w-120 {
  width: 120px;
}
.col-w-140 {
  width: 140px;
}
.col-w-160 {
  width: 160px;
}
.col-w-180 {
  width: 180px;
}

/* Score input - compact fixed width */
.score-input {
  width: 80px;
  text-align: center;
}
.score-cell {
  width: 110px;
}
.comment-cell {
  min-width: 160px;
}

/* Total score box */
.total-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(8, 243, 236, 0.08);
  border: 1px solid rgba(8, 243, 236, 0.25);
  border-radius: 12px;
  padding: 10px 18px;
  font-weight: 700;
  color: var(--ph-ink);
}
.total-box .total-value {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--ph-cyan);
}

/* Form validation message */
.validation {
  color: #f87171;
  font-size: 0.82rem;
  margin-top: 4px;
  display: block;
}
input.input:invalid,
textarea.input:invalid {
  border-color: rgba(248, 113, 113, 0.5);
}

/* Disabled button state */
.btn:disabled,
.btnx:disabled,
button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* Empty state with illustration-style block */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ph-ink-dim);
  border: 1px dashed var(--ph-stroke);
  border-radius: 16px;
}
.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}
.empty-state p {
  margin: 0;
  font-size: 0.95rem;
}

/* Judge evaluation progress bar */
.judge-progress-wrap {
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  width: 100%;
  margin-top: 4px;
}
.judge-progress-bar {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ph-cyan), var(--ph-violet));
  transition: width 0.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.judge-progress-label {
  font-size: 0.8rem;
  color: var(--ph-ink-dim);
  margin-top: 3px;
}

/* Member count pill + expandable list */
.member-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--ph-stroke);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--ph-ink-dim);
  user-select: none;
}
.member-pill:hover {
  background: rgba(255, 255, 255, 0.11);
  color: var(--ph-ink);
}
.member-pill-caret {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.member-list-dropdown {
  display: none;
  margin-top: 6px;
  background: rgba(10, 14, 36, 0.95);
  border: 1px solid var(--ph-stroke);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 0.82rem;
  white-space: nowrap;
  min-width: 180px;
}
.member-list-dropdown.open {
  display: block;
}

/* Score summary in TeamsBoard */
.score-summary {
  font-size: 0.82rem;
}
.score-avg {
  font-size: 1.1rem;
  font-weight: 900;
  color: var(--ph-cyan);
}
.score-detail {
  color: var(--ph-ink-dim);
  font-size: 0.78rem;
}

/* Next-steps guidance card for Teams/Dashboard */
.next-steps-card {
  background: rgba(8, 243, 236, 0.05);
  border: 1px solid rgba(8, 243, 236, 0.2);
  border-radius: 16px;
  padding: 18px 22px;
  margin-top: 16px;
}
.next-steps-card h6 {
  color: var(--ph-cyan);
  font-weight: 800;
  margin-bottom: 10px;
}
.next-step-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.next-step-item:last-child {
  border-bottom: none;
}
.next-step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(8, 243, 236, 0.15);
  border: 1px solid rgba(8, 243, 236, 0.3);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--ph-cyan);
}
.next-step-text {
  font-size: 0.88rem;
  color: var(--ph-ink-dim);
}
.next-step-text strong {
  color: var(--ph-ink);
}

/* Status-specific next step card themes */
.next-steps-card.status-Pending {
  border-color: rgba(251, 191, 36, 0.25);
  background: rgba(251, 191, 36, 0.04);
}
.next-steps-card.status-Pending h6 {
  color: #fbbf24;
}
.next-steps-card.status-Pending .next-step-num {
  background: rgba(251, 191, 36, 0.15);
  border-color: rgba(251, 191, 36, 0.3);
  color: #fbbf24;
}
.next-steps-card.status-Rejected {
  border-color: rgba(248, 113, 113, 0.25);
  background: rgba(248, 113, 113, 0.04);
}
.next-steps-card.status-Rejected h6 {
  color: #f87171;
}

/* ===== Phase 6: Modal, Spinner, Utilities ===== */

/* Grid full-width utility */
.grid-full {
  grid-column: 1 / -1;
}

/* Details/summary toggle utility */
.details-sum {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  user-select: none;
  color: var(--ph-ink-dim);
  font-size: 0.875rem;
}
.details-sum::-webkit-details-marker {
  display: none;
}
.details-sum .sum-caret {
  font-size: 0.65rem;
  display: inline-block;
  transition: transform 0.2s ease;
}
details[open] > summary .sum-caret {
  transform: rotate(90deg);
}

/* Form submit loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}
.btn-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  animation: btn-spin 0.6s linear infinite;
}
@keyframes btn-spin {
  to {
    transform: translateY(-50%) rotate(360deg);
  }
}

/* Confirm modal overlay */
.ph-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.ph-modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.ph-modal-box {
  background: #0d1740;
  border: 1px solid var(--ph-stroke);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 420px;
  width: calc(100% - 32px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.45);
  transform: translateY(12px) scale(0.97);
  transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
  direction: rtl;
}
.ph-modal-overlay.open .ph-modal-box {
  transform: translateY(0) scale(1);
}
.ph-modal-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ph-ink);
  margin-bottom: 10px;
}
.ph-modal-body {
  color: var(--ph-ink-dim);
  font-size: 0.9rem;
  margin-bottom: 22px;
  line-height: 1.6;
}
.ph-modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* msg-ok / msg-err aliases without !important */
.msg.ok {
  background: rgba(8, 243, 120, 0.1);
  border: 1px solid rgba(8, 243, 120, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #08f378;
  margin-bottom: 12px;
}
.msg.err {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f87171;
  margin-bottom: 12px;
}

/* Error role badge (Admin/Index) without inline style */
.role-err {
  border-color: #f99 !important;
  background: rgba(255, 0, 0, 0.1);
}

/* Reviewer/Index table column widths */
.col-pct-42 {
  width: 42%;
}

/* ===== Phase 7: Content Guidance & UX Writing ===== */

/* Field-level helper text */
.field-hint {
  display: block;
  font-size: 0.78rem;
  color: var(--ph-ink-dim);
  margin-top: 4px;
  line-height: 1.5;
}

/* Methodology intro card (collapsible) */
.method-intro {
  background: rgba(8, 243, 236, 0.05);
  border: 1px solid rgba(8, 243, 236, 0.18);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 0.875rem;
  color: var(--ph-ink-dim);
  line-height: 1.7;
}
.method-intro strong {
  color: var(--ph-ink);
}
.method-intro .method-title {
  font-weight: 800;
  color: var(--ph-cyan);
  font-size: 0.92rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Scale legend (shows 1–5 or 1–9 meaning) */
.scale-legend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  margin-bottom: 4px;
}
.scale-legend span {
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ph-stroke);
  border-radius: 6px;
  padding: 2px 8px;
  color: var(--ph-ink-dim);
}
.scale-legend span strong {
  color: var(--ph-ink);
}

/* Submitted form banner */
.submit-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(8, 243, 120, 0.08);
  border: 1px solid rgba(8, 243, 120, 0.25);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
}
.submit-banner-icon {
  font-size: 1.4rem;
}
.submit-banner-text {
  font-size: 0.875rem;
  line-height: 1.5;
}
.submit-banner-text strong {
  color: #08f378;
}

/* Form intro / overview card */
.form-intro-card {
  background: linear-gradient(
    135deg,
    rgba(172, 70, 189, 0.08),
    rgba(8, 243, 236, 0.06)
  );
  border: 1px solid var(--ph-stroke);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 24px;
}
.form-intro-card h4 {
  color: var(--ph-ink);
  font-weight: 900;
  margin-bottom: 8px;
}
.form-intro-card .intro-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.form-intro-card .intro-meta span {
  font-size: 0.82rem;
  color: var(--ph-ink-dim);
  display: flex;
  align-items: center;
  gap: 4px;
}
.form-intro-card .intro-sections {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.form-intro-card .intro-section-chip {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--ph-stroke);
  border-radius: 8px;
  padding: 3px 10px;
  color: var(--ph-ink-dim);
}

/* Submit action explanation */
.submit-help {
  font-size: 0.8rem;
  color: var(--ph-ink-dim);
  margin-top: 8px;
}
.submit-help strong {
  color: var(--ph-ink);
}

/* Role description chip (admin) */
.role-desc {
  font-size: 0.8rem;
  color: var(--ph-ink-dim);
  margin-top: 4px;
  line-height: 1.5;
}

/* Score scale row (judge evaluate) */
.score-scale-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ph-stroke);
  border-radius: 10px;
  font-size: 0.78rem;
}
.score-scale-row .ss-item {
  color: var(--ph-ink-dim);
}
.score-scale-row .ss-item strong {
  color: var(--ph-cyan);
}

/* Success page */
.success-card {
  text-align: center;
  padding: 40px 24px;
  background: linear-gradient(
    135deg,
    rgba(8, 243, 120, 0.07),
    rgba(8, 243, 236, 0.05)
  );
  border: 1px solid rgba(8, 243, 120, 0.2);
  border-radius: 20px;
}
.success-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}
.success-title {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--ph-ink);
  margin-bottom: 8px;
}
.success-sub {
  color: var(--ph-ink-dim);
  margin-bottom: 24px;
  line-height: 1.7;
}
.success-steps {
  text-align: right;
  max-width: 440px;
  margin: 0 auto 24px;
}
.success-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.success-step:last-child {
  border-bottom: none;
}
.success-step-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(8, 243, 120, 0.15);
  border: 1px solid rgba(8, 243, 120, 0.3);
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: #08f378;
}
.success-step-text {
  font-size: 0.875rem;
  color: var(--ph-ink-dim);
  line-height: 1.5;
}
.success-step-text strong {
  color: var(--ph-ink);
}

.link-cyan {
  color: var(--ph-cyan);
  text-decoration: underline;
}
.link-cyan:hover {
  color: var(--ph-ink);
}

/* =============================================
   Phase 8 - Accessibility & WCAG Compliance
   ============================================= */

/* 8.1 Skip navigation link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 16px;
  z-index: 10000;
  background: var(--ph-cyan);
  color: #000;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  transition: left 0.1s;
}
.skip-link:focus {
  left: 16px;
}

/* 8.2 Global focus-visible ring (keyboard only) */
*:focus:not(:focus-visible) {
  outline: none;
}
*:focus-visible {
  outline: 2px solid var(--ph-cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

/* 8.3 Placeholder contrast - WCAG AA (4.5:1 on dark bg) */
.input::placeholder,
.form-control::placeholder,
.doc-form .form-control::placeholder,
.ph-input.sm::placeholder {
  color: #c0ccf0;
}

/* 8.4 Muted text contrast improvement */
:root {
  --ph-muted: #c8d0f0;
}

/* 8.5 Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .stepper-track {
    transition: none !important;
  }
  .ph-modal-box {
    animation: none !important;
  }
}

/* End of site.css */
/* ================================================================
   Phase 12 - Fixed Topnav + Contained Layout
   ================================================================ */

/* Hide old Bootstrap navbar (replaced by #ph-topnav) */
.app-navbar {
  display: none !important;
}

/* ── Fixed topnav ── */
#ph-topnav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  height: 64px;
  display: flex;
  align-items: center;
  background: rgba(0, 20, 60, 0.92);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition:
    background 0.3s ease,
    backdrop-filter 0.3s ease,
    border-color 0.3s ease;
}

/* Landing page: starts fully transparent over hero video */
#ph-topnav.is-transparent {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom-color: transparent;
}

/* Scrolled state - JS adds this class */
#ph-topnav.is-transparent.scrolled {
  background: rgba(0, 20, 60, 0.9);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

/* Inner max-width centering - same 1280px cap as content */
.ph-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Logo — fixed at the start (right in RTL) */
.ph-nav-brand {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.ph-nav-brand img {
  height: 34px;
  display: block;
}

/* Nav links container — spans the row so center/actions zones can lay out */
.ph-nav-links {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 0.5rem;
}

/* Center zone: primary links, visually centered in the bar */
.ph-nav-center {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
}

/* End zone (left in RTL): theme toggle + sign-out / CTA */
.ph-nav-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Individual nav link / button */
.ph-nav-link {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
  font-family: inherit;
  line-height: 1.4;
}
.ph-nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  text-decoration: none;
}
.ph-nav-link.is-active,
.ph-nav-link.active,
.ph-nav-links .nav-link.active {
  color: #27d8d3;
  font-weight: 600;
  background: transparent;
  border-color: transparent;
  border-bottom: 3px solid #27d8d3;
  border-radius: 0;
  padding-bottom: calc(0.375rem - 3px);
}
.ph-nav-link.ph-nav-logout {
  color: rgba(255, 100, 100, 0.85);
}
.ph-nav-link.ph-nav-logout:hover {
  color: #ff6b6b;
  background: rgba(255, 80, 80, 0.1);
}

/* Light/Dark theme toggle — circular icon button */
.ph-theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
  color: rgba(255, 255, 255, 0.78);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  cursor: pointer;
  font-family: inherit;
  transition:
    color 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}
.ph-theme-toggle:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.3);
}
.ph-theme-toggle i {
  font-size: 0.95rem;
}

/* Vertical separator */
.ph-nav-sep {
  width: 1px;
  height: 1.25rem;
  background: rgba(255, 255, 255, 0.15);
  margin: 0 0.375rem;
  flex-shrink: 0;
}

/* CTA button (Register) */
.ph-nav-cta {
  background: var(--ph-cyan);
  color: #001627 !important;
  font-weight: 700;
  padding: 0.4rem 1.125rem;
  border-radius: 6px;
  text-decoration: none !important;
  white-space: nowrap;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s ease;
  margin-inline-start: 0.375rem;
  flex-shrink: 0;
}
.ph-nav-cta:hover {
  opacity: 0.86;
}

/* Mobile hamburger - hidden on desktop */
.ph-nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.125rem;
  cursor: pointer;
  padding: 0.5rem;
  margin-inline-start: auto;
  line-height: 1;
}

/* ── Page content wrapper (replaces admin-layout + container py-4) ── */
.ph-page-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: calc(64px + 2rem) 2rem 2rem;
  box-sizing: border-box;
}

/* Landing page: full-bleed sections, hero overlaps nav */
.ph-page-wrap.is-landing {
  max-width: none;
  padding: 0;
  margin: 0;
  display: contents;
}

/* Footer also uses nav-inner for centering */
.app-footer {
  background: #0b0f24;
}
.app-footer .ph-nav-inner {
  height: auto;
  padding-block: 0.25rem;
}

/* ── Mobile (≤ 991px) ── */
@media (max-width: 991px) {
  .ph-nav-toggle {
    display: block;
  }

  .ph-nav-links {
    display: none;
    position: fixed;
    top: 64px;
    inset-inline: 0;
    z-index: 999;
    background: rgba(0, 10, 40, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    padding: 0.875rem 1rem 1.25rem;
    gap: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
    max-height: calc(100vh - 64px);
  }
  .ph-nav-links.open {
    display: flex;
  }
  /* Both zones flatten into the stacked mobile menu */
  .ph-nav-center,
  .ph-nav-actions {
    flex: 0 0 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 0.25rem;
  }
  .ph-nav-actions {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .ph-nav-actions form,
  .ph-nav-actions .ph-nav-logout {
    width: 100%;
    justify-content: center;
  }
  .ph-theme-toggle {
    width: 100%;
    border-radius: 8px;
  }
  .ph-nav-sep {
    display: none;
  }
  .ph-nav-link {
    padding: 0.625rem 0.75rem;
    font-size: 0.9375rem;
  }
  .ph-nav-cta {
    margin: 0.625rem 0 0;
    text-align: center;
    padding: 0.625rem 1rem;
    display: block;
  }
  .ph-page-wrap {
    padding: calc(64px + 1.25rem) 1.25rem 1.25rem;
  }
  .ph-page-wrap.is-landing {
    padding: 0;
  }
}

/* ================================================================
   PURPLE BRAND OVERHAUL - Dark theme derived from #362978
   Deep purple-tinted backgrounds, brand accents, cyan interactive.
   Bahij TheSansArabic + Space Grotesk; 12px radius.
   ================================================================ */

/* -- 1. Token Override (purple brand) -- */
:root {
  --ph-bg: #0c0a18;
  --ph-ink: #ede9f5;
  --ph-ink-dim: #a59fbd;
  --ph-muted: #7b7494;
  --ph-stroke: #2a2450;
  --ph-card-1: #1a1530;
  --ph-card-2: #150f28;
  --ph-violet: #362978;
  --ph-pink: #ac46bd;
  --ph-cyan: #27d8d3;
  --ph-orange: #b45309;
  --danger: #b91c1c;
  --ok: #16a34a;
  --success: #16a34a;
  --warning: #b45309;
  --bg: #0c0a18;
  --bg-2: #100e1e;
  --card: #1a1530;
  --stroke: #2a2450;
  --text: #ede9f5;
  --text-dim: #a59fbd;
  --muted: #7b7494;
  --panel: #1a1530;
  --panel-2: #150f28;
  --brand: #5b4ba8;
  --brand-2: #362978;
  --ring: rgba(91, 75, 168, 0.35);
  --accent-1: #ac46bd;
  --accent-2: #27d8d3;
  --accent-3: #16a34a;
  --ink: #ede9f5;
  --background: #0c0a18;
  --foreground: #ede9f5;
  --card-foreground: #ede9f5;
  --primary: #5b4ba8;
  --primary-foreground: #ede9f5;
  --secondary: #2a2450;
  --secondary-foreground: #ede9f5;
  --muted-foreground: #7b7494;
  --accent: #2a2450;
  --accent-foreground: #ede9f5;
  --destructive: #b91c1c;
  --destructive-foreground: #ffffff;
  --success-foreground: #ffffff;
  --warning-foreground: #ffffff;
  --border: #2a2450;
  --input: #13101f;
  --radius: 0.75rem;
  /* Role accents (used by Razor-conditional inline colors; light values live in theme-light.css) */
  --judge-accent: #27d8d3;
  --reviewer-accent: #c02bd6;
  /* Rank metallics (light values live in theme-light.css) */
  --rank-gold: #f7c948;
  --rank-silver: #c0c7d1;
  --rank-bronze: #c78652;
}

/* -- 2. Typography + Base -- */
html {
  font-family:
    "Bahij TheSansArabic", "Space Grotesk", "Tajawal", system-ui, sans-serif;
}
body {
  background: #0c0a18 !important;
  color: #ede9f5 !important;
  font-family:
    "Bahij TheSansArabic", "Space Grotesk", "Tajawal", system-ui, sans-serif !important;
}
a {
  color: #c4bde0;
  text-decoration-color: rgba(91, 75, 168, 0.3);
}
a:hover {
  color: #27d8d3;
  filter: none;
}

/* -- 3. Topnav -- */
#ph-topnav {
  background: #0c0a18;
  border-bottom: 1px solid #2a2450;
  backdrop-filter: none;
}
#ph-topnav.is-transparent {
  background: transparent;
  border-bottom-color: transparent;
}
#ph-topnav.is-transparent .ph-nav-link {
  color: rgba(255, 255, 255, 0.75);
}
#ph-topnav.is-transparent .ph-nav-link:hover {
  color: #27d8d3;
  background: rgba(54, 41, 120, 0.12);
}
#ph-topnav.is-transparent.scrolled {
  background: rgba(12, 10, 24, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: #2a2450;
}
#ph-topnav.is-transparent.scrolled .ph-nav-link {
  color: #a59fbd;
}
#ph-topnav.is-transparent.scrolled .ph-nav-link:hover {
  color: #ede9f5;
  background: rgba(54, 41, 120, 0.1);
}
#ph-topnav:not(.is-transparent) .ph-nav-link {
  color: #a59fbd;
}
#ph-topnav:not(.is-transparent) .ph-nav-link:hover {
  color: #ede9f5;
  background: rgba(54, 41, 120, 0.1);
}
#ph-topnav:not(.is-transparent) .ph-nav-link.is-active {
  color: #27d8d3;
  font-weight: 600;
  background: transparent;
  border-color: transparent;
  border-bottom: 3px solid #27d8d3;
  border-radius: 0;
  padding-bottom: calc(0.375rem - 3px);
}
.ph-nav-link.ph-nav-logout {
  color: #b91c1c !important;
}
.ph-nav-link.ph-nav-logout:hover {
  background: rgba(220, 38, 38, 0.1) !important;
}
.ph-nav-sep {
  background: #2a2450;
}
.ph-nav-brand img {
  filter: none;
}
.ph-nav-cta {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
  border-radius: 8px;
}
.ph-nav-cta:hover {
  opacity: 0.88;
}
@media (max-width: 991px) {
  .ph-nav-links {
    background: rgba(12, 10, 24, 0.97) !important;
    backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid #2a2450 !important;
  }
  .ph-nav-links .ph-nav-link {
    color: #a59fbd !important;
  }
  .ph-nav-links .ph-nav-link:hover {
    color: #ede9f5 !important;
    background: rgba(54, 41, 120, 0.1) !important;
  }
  .ph-nav-toggle {
    color: #ede9f5;
  }
}

/* -- 4. Page wrap -- */
.ph-page-wrap {
  background: #0c0a18;
}

/* -- 5. Cards -- */
.ph-card,
.card {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  color: #ede9f5 !important;
}
.ph-card *:not(.ph-badge):not(.ph-btn):not(a):not(button) {
  color: inherit;
}
.ph-card-ghost {
  background: rgba(54, 41, 120, 0.06) !important;
  border: 1px solid #2a2450 !important;
}
.ph-card-accent {
  border-inline-start: 3px solid #5b4ba8 !important;
}
.ph-card h5,
.ph-card h6 {
  color: #ede9f5 !important;
}

/* -- 6. Buttons -- */
.ph-btn {
  border-radius: 8px;
}
.ph-btn-primary {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
  border: 1px solid #5b4ba8 !important;
  box-shadow: none !important;
}
.ph-btn-primary:hover {
  background: #4e3f96 !important;
}
.ph-btn-ghost {
  background: transparent !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
}
.ph-btn-ghost:hover {
  background: #1e1835 !important;
}
.ph-btn-secondary,
.ph-btn-accent,
.ph-btn-muted {
  background: #1e1835 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
}
.ph-btn-secondary:hover,
.ph-btn-accent:hover,
.ph-btn-muted:hover {
  background: #2a2450 !important;
}
.ph-btn-danger {
  background: #b91c1c !important;
  color: #fff !important;
  border-color: #b91c1c !important;
}
.ph-btn-success {
  background: #16a34a !important;
  color: #fff !important;
  border-color: #16a34a !important;
}
.btn {
  background: #5b4ba8;
  color: #ede9f5;
  border: none;
  border-radius: 8px;
  box-shadow: none;
  font-weight: 600;
}
.btn:hover {
  background: #4e3f96;
  color: #ede9f5;
  filter: none;
  transform: none;
}
.btn.ok,
.btn-success {
  background: #16a34a !important;
  color: #fff !important;
}
.btn.danger,
.btn-danger {
  background: #b91c1c !important;
  color: #fff !important;
}
.btn.ghost,
.btn-outline-secondary {
  background: transparent;
  color: #ede9f5;
  border: 1px solid #2a2450;
}
.btn.ghost:hover,
.btn-outline-secondary:hover {
  background: #1e1835;
}

/* -- 7. Tables -- */
.ph-table,
.table {
  --bs-table-bg: transparent !important;
  --bs-table-border-color: #2a2450 !important;
  color: #ede9f5 !important;
  background: transparent !important;
  border-collapse: collapse !important;
  border-spacing: 0 !important;
}
.ph-table thead,
.table thead th {
  background: #120f22 !important;
  color: #7b7494 !important;
  border-bottom: 1px solid #2a2450 !important;
}
.ph-table td,
.table tbody td {
  background: transparent !important;
  color: #ede9f5 !important;
  border-bottom: 1px solid #1e1835 !important;
  border-top: none !important;
}

/* -- 8. Forms -- */
.form-control,
.form-select,
form input,
form textarea,
form select,
.input-group-text {
  /* background-color (not the `background` shorthand): the shorthand resets
     background-image to none, which erased the custom <select> chevron in dark
     mode. Setting only the color preserves the arrow defined in the
     "Consistent dropdown arrow" rule below. */
  background-color: #1a1530 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.form-control::placeholder,
form input::placeholder,
form textarea::placeholder {
  color: #5c5478 !important;
}
.form-control:focus,
.form-select:focus,
form input:focus,
form textarea:focus,
form select:focus {
  border-color: #5b4ba8 !important;
  box-shadow: 0 0 0 2px rgba(91, 75, 168, 0.12) !important;
  outline: none !important;
}
.form-label,
label,
.form-check-label {
  color: #ede9f5 !important;
}
.form-check-input {
  background: #1a1530 !important;
  border-color: #3d3560 !important;
}
.form-check-input:checked {
  background: #5b4ba8 !important;
  border-color: #5b4ba8 !important;
}

/* -- 9. Badges -- */
.badge {
  background: #1e1835 !important;
  color: #a59fbd !important;
  border-radius: 999px !important;
  border: 1px solid #2a2450 !important;
}
.ph-badge-success {
  background: rgba(22, 163, 74, 0.15) !important;
  color: #4ade80 !important;
  border-color: rgba(22, 163, 74, 0.3) !important;
}
.ph-badge-danger {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #fca5a5 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}
.ph-badge-warning {
  background: rgba(217, 119, 6, 0.15) !important;
  color: #fcd34d !important;
  border-color: rgba(217, 119, 6, 0.3) !important;
}
.ph-badge-info {
  background: #1e1835 !important;
  color: #a59fbd !important;
  border-color: #2a2450 !important;
}
.ph-badge-muted {
  background: #1e1835 !important;
  color: #7b7494 !important;
  border-color: #2a2450 !important;
}
.ph-badge-primary {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
  border-color: #5b4ba8 !important;
}
.badge.chip,
.badge.pill,
.badge.pill.muted {
  background: #1e1835 !important;
  color: #a59fbd !important;
  border: 1px solid #2a2450 !important;
}

/* -- 10. Alerts -- */
.alert {
  border-radius: 8px !important;
  border: 1px solid #2a2450 !important;
  background: #1a1530 !important;
  color: #ede9f5 !important;
}
.alert-warning {
  background: rgba(217, 119, 6, 0.1) !important;
  color: #fcd34d !important;
  border-color: rgba(217, 119, 6, 0.25) !important;
}
.alert-danger {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #fca5a5 !important;
  border-color: rgba(220, 38, 38, 0.25) !important;
}
.alert-success {
  background: rgba(22, 163, 74, 0.1) !important;
  color: #4ade80 !important;
  border-color: rgba(22, 163, 74, 0.25) !important;
}

/* -- 11. Modals -- */
.ph-modal-overlay {
  background-color: rgba(6, 4, 12, 0.65);
  backdrop-filter: blur(4px);
}
.ph-modal-box {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
}
.ph-modal-title {
  color: #ede9f5 !important;
}
.ph-modal-body {
  color: #a59fbd !important;
}

/* -- 12. Toasts -- */
.ph-toast {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
  border-radius: 8px !important;
}
.ph-toast-message {
  color: #ede9f5 !important;
}

/* -- 13. Steps -- */
.ph-step-dot {
  background: #2a2450;
  color: #7b7494;
}
.ph-step-dot.active {
  background: #d4a017 !important;
  color: #1a1530 !important;
}
.ph-step-dot.done {
  background: #16a34a !important;
  color: #fff !important;
}
.ph-step-label {
  color: #7b7494;
}
.ph-step-label.active {
  color: #d4a017 !important;
}
.ph-step-label.done {
  color: #16a34a !important;
}
.ph-step::before {
  background: #2a2450;
}
.ph-step.done::before {
  background: #16a34a !important;
}
.ph-step.done-to-active::before {
  background: #d4a017 !important;
}

/* -- 14. Pagination -- */
.ph-page-link {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  color: #ede9f5 !important;
  border-radius: 6px !important;
}
.ph-page-link:hover {
  background: #1e1835 !important;
}
.ph-page-link.active {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
  border-color: #5b4ba8 !important;
}

/* -- 15. Empty / Skip / Footer -- */
.ph-empty-state {
  color: #7b7494 !important;
}
.ph-empty-state-title {
  color: #ede9f5 !important;
}
.ph-skip-link {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
}
.app-footer {
  background: #0c0a18 !important;
  border-top: 1px solid #2a2450 !important;
  color: #5c5478 !important;
}

/* -- 16. Landing sections -- */
.ph-section {
  background: #0c0a18 !important;
}
.ph-section-alt {
  background: #120f22 !important;
  border-color: #2a2450 !important;
}

/* Hero (dark - video bg) */
.ph-hero {
  border-bottom: 1px solid #2a2450;
}
.ph-hero-overlay {
  background:
    radial-gradient(
      900px 380px at 12% -10%,
      rgba(91, 75, 168, 0.18),
      transparent 60%
    ),
    radial-gradient(
      1100px 420px at 90% -25%,
      rgba(172, 70, 189, 0.12),
      transparent 60%
    ),
    linear-gradient(180deg, rgba(12, 10, 24, 0.5), rgba(12, 10, 24, 0.65)) !important;
}
.ph-hero-shape {
  display: none;
}
.ph-hero-kicker {
  color: rgba(255, 255, 255, 0.6) !important;
}
.ph-hero-title {
  color: #ede9f5 !important;
}
.ph-hero-stamp {
  color: rgba(255, 255, 255, 0.04) !important;
}
.ph-hero-cta .ph-btn-primary {
  background: #5b4ba8 !important;
  color: #0c0a18 !important;
  border-color: #5b4ba8 !important;
}
.ph-hero-cta .ph-btn-ghost {
  background: transparent !important;
  color: #ede9f5 !important;
  border: 1px solid rgba(91, 75, 168, 0.2) !important;
}

/* Title ink - remove gradient, solid white */
.ph-title-ink,
.title-ink {
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  color: #ede9f5 !important;
}
.ph-lead {
  color: #a59fbd !important;
}
.ph-strong {
  color: #ede9f5 !important;
}

/* Goals */
.ph-goals {
  background: #0c0a18 !important;
}
.section-cap .cap-line {
  background: linear-gradient(90deg, #5b4ba8, #ac46bd, #27d8d3) !important;
  opacity: 1 !important;
}
.pill {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  color: #ede9f5 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
  border-radius: 12px !important;
}
.pill-accent {
  background: #1a1530 !important;
  border-color: #2a2450 !important;
}
.pill .ico {
  background: linear-gradient(135deg, #ac46bd, #5b4ba8) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.pill .ico svg {
  color: #ede9f5 !important;
  stroke: #ede9f5 !important;
}
#goals::before,
#goals::after {
  display: none;
}

/* Stages */
.ph-stages {
  background: #120f22 !important;
  border-color: #2a2450 !important;
}
.stage-card {
  background: #1a1530 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3) !important;
}
.stage-card h5 {
  color: #ede9f5 !important;
}
.stage-card .card-img {
  background: #100e1e !important;
  border-color: #2a2450 !important;
}
.stage-shelf--dark {
  background: transparent !important;
}
.stage-file {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
}
.file-strip,
.file-title {
  color: #ede9f5 !important;
}
.file-panel {
  background: #1a1530 !important;
  color: #a59fbd !important;
}
.file-panel__inner h3 {
  color: #ede9f5 !important;
}
.file-panel__inner p {
  color: #a59fbd !important;
}

/* Beneficiaries */
.orbit__item {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  color: #ede9f5 !important;
}
.orbit__item h3 {
  color: #ede9f5 !important;
}
.orbit__item p {
  color: #a59fbd !important;
}
.orbit__item.is-cyan {
  border-inline-start: 3px solid #27d8d3 !important;
}
.orbit__item.is-violet {
  border-inline-start: 3px solid #5c5478 !important;
}
.orbit__arrow {
  color: #ede9f5 !important;
  background: rgba(54, 41, 120, 0.1) !important;
  border-radius: 50% !important;
}

/* Value */
.value-card {
  background: #1a1530 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  padding: 24px !important;
}
.value-card h6 {
  color: #ede9f5 !important;
}
.value-card p {
  color: #7b7494 !important;
}
#beneficiaries .ph-card h6,
#value .ph-card h6 {
  color: #ede9f5 !important;
}

/* Venue */
.ph-venue {
  background: #120f22 !important;
}
.ph-venue__glass {
  color: #ede9f5 !important;
}
.venue-ticker li {
  color: #a59fbd !important;
}

/* Partners */
.partner-card {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
}
.partner-card h6 {
  color: #ede9f5 !important;
}
#partners .card {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
}
#contact,
#partners {
  background: #0c0a18 !important;
}
#contact p {
  color: #a59fbd !important;
}

/* Icons */
.ph-ico {
  background: linear-gradient(135deg, #ac46bd, #5b4ba8) !important;
  box-shadow: none !important;
}
.ph-ico svg {
  stroke: #ede9f5 !important;
}
.ph-ribbon {
  background: linear-gradient(135deg, #362978, #ac46bd) !important;
  color: #ede9f5 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 16px rgba(6, 4, 12, 0.3) !important;
}

/* -- 17. Forms / Auth / Initiative -- */
.auth-card,
.form-wrap {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
}
.h-title {
  color: #ede9f5 !important;
}
.ph-accent-border {
  border-color: #2a2450 !important;
}
.wrap {
  color: #ede9f5;
}
.cardx {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  padding: 24px !important;
  margin-bottom: 16px;
  color: #ede9f5 !important;
}
.cardx textarea,
.cardx input:not([type="number"]):not([type="checkbox"]):not([type="radio"]),
.cardx select {
  width: 100% !important;
  box-sizing: border-box;
}
.cardx h5,
.section-title {
  color: #ede9f5 !important;
}
.field-hint,
.small-hint {
  color: #7b7494 !important;
}
.method-intro {
  background: rgba(39, 216, 211, 0.05) !important;
  color: #a59fbd !important;
  border: none !important;
  border-inline-start: 3px solid #27d8d3 !important;
  border-radius: 6px !important;
  padding: 0.625rem 0.875rem !important;
  font-size: 0.75rem !important;
  line-height: 1.6 !important;
  margin-bottom: 0.75rem !important;
}
.method-title {
  color: #27d8d3 !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
}
.scale-legend span {
  color: #a59fbd !important;
}
.tablex {
  border: 1px solid #2a2450 !important;
  border-radius: 8px;
  overflow: hidden;
}
.tablex thead th {
  background: #120f22 !important;
  color: #7b7494 !important;
  border-bottom: 1px solid #2a2450 !important;
}
.tablex td {
  border-bottom: 1px solid #1e1835 !important;
}
.tablex .input,
.tablex input,
.tablex select {
  /* background-color (not `background`): `.tablex .input` (specificity 0,2,0)
     out-specifies the select-arrow rule, so the shorthand was wiping the
     chevron's background-image on the initiative-form table dropdowns in dark
     mode. Color-only keeps the arrow visible. */
  background-color: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  color: #ede9f5 !important;
  border-radius: 6px !important;
}
.btnx {
  background: #1e1835 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 6px !important;
}
.btnx.primary {
  background: #5b4ba8 !important;
  color: #ede9f5 !important;
  border-color: #5b4ba8 !important;
}
.btnx.danger {
  background: rgba(220, 38, 38, 0.15) !important;
  color: #fca5a5 !important;
  border-color: rgba(220, 38, 38, 0.3) !important;
}
.submit-banner {
  background: rgba(22, 163, 74, 0.1) !important;
  border: 1px solid rgba(22, 163, 74, 0.25) !important;
  border-radius: 8px !important;
  color: #4ade80 !important;
}
.form-intro-card {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 12px !important;
  color: #ede9f5 !important;
  padding: 24px !important;
}
.intro-meta span {
  color: #7b7494 !important;
}
.intro-section-chip {
  background: #1e1835 !important;
  color: #a59fbd !important;
  border: 1px solid #2a2450 !important;
  border-radius: 999px !important;
}
.intro-section-chip.active {
  background: #5b4ba8 !important;
  color: #0c0a18 !important;
  border-color: #5b4ba8 !important;
}
.member-card {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 8px !important;
  padding: 16px !important;
}
.btn-add {
  background: #1e1835 !important;
  color: #ede9f5 !important;
  border: 1px solid #2a2450 !important;
  border-radius: 6px !important;
}
.btn-del {
  background: rgba(220, 38, 38, 0.1) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(220, 38, 38, 0.25) !important;
  border-radius: 6px !important;
}
.highlight-field {
  background: #100e1e !important;
}
.submit-help {
  color: #7b7494 !important;
}

/* -- 18. Misc text fixes -- */
.text-muted,
.muted {
  color: #7b7494 !important;
}
.link-cyan {
  color: #c4bde0 !important;
  text-decoration: underline !important;
}
.validation {
  color: #fca5a5 !important;
}
.text-danger {
  color: #fca5a5 !important;
}
.text-warning {
  color: #fcd34d !important;
}
dt {
  color: #7b7494 !important;
}
dd {
  color: #ede9f5 !important;
}

/* -- 19. Sort/filter/search -- */
.sort-link.active,
.sort-link.active-desc {
  color: #27d8d3 !important;
}
.judge-filter.active {
  background: #5b4ba8 !important;
  color: #0c0a18 !important;
  border-color: #5b4ba8 !important;
}
input[type="search"] {
  background: #1a1530 !important;
  border: 1px solid #2a2450 !important;
  color: #ede9f5 !important;
  border-radius: 8px !important;
}

/* -- 20. Register wizard -- */
.reg-step .section-title {
  color: #ede9f5 !important;
}

/* -- 21. Search icon color fix -- */
input[type="search"] + i,
input[type="search"] ~ i {
  color: #5c5478 !important;
}

/* -- 22. Hide empty validation summary -- */
.validation-summary-valid {
  display: none !important;
}

/* -- 23. Custom dropdown arrow --
   (Single source of truth lives in the consolidated `select.…` block below.
    The old `.form-select` rule was removed to avoid two conflicting arrows.) */

/* -- 24. Login tabs -- */
.login-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--ph-stroke);
  margin-bottom: 1.25rem;
}
.login-tab {
  flex: 1;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ph-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition:
    color 0.15s,
    border-color 0.15s;
  font-family: inherit;
  text-align: center;
}
.login-tab:hover {
  color: var(--ph-ink);
}
.login-tab.active {
  color: var(--ph-ink);
  border-bottom-color: var(--ph-cyan);
}
.login-panel {
  display: none;
}
.login-panel.active {
  display: block;
}

/* -- 25. Dashboard responsive grid -- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* -- 26. Initiative form wizard (position:fixed approach) -- */
.wizard-header {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  z-index: 9;
  background: var(--background);
  padding: 0.375rem 2rem;
  border-bottom: 1px solid var(--border);
}
.wizard-header .wizard-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.wizard-tabs {
  display: flex;
  gap: 0.25rem;
  overflow-x: auto;
  background: #13101f;
  border-radius: 10px;
  padding: 0.25rem;
}
.wizard-body {
  max-width: 1280px;
  margin: 0 auto;
  padding-left: 2rem;
  padding-right: 2rem;
  padding-bottom: 6rem;
}
.wizard-body .cardx {
  margin-bottom: 0;
}

/* Scroll fade at bottom of content - visual hint that content continues */
.wizard-body::after {
  content: "";
  display: block;
  height: 1px; /* spacer so last element isn't clipped */
}

.wizard-footer {
  height: 80px !important;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9;
  background: var(--background);
  border-top: 1px solid var(--border);
  padding: 0.9rem 2rem 0.45rem;
}
.wizard-footer .wizard-inner {
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transform: translateY(-0.45rem);
}
/* Larger footer buttons */
.wizard-footer .ph-btn {
  padding: 0.5rem 1.25rem !important;
  font-size: 0.8125rem !important;
}

/* Scroll shadow on wizard-body - top fade when scrolled */
.wizard-body {
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 8px,
    black calc(100% - 24px),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0,
    black 8px,
    black calc(100% - 24px),
    transparent 100%
  );
}

@media (max-width: 768px) {
  .wizard-header {
    padding: 0.375rem 1rem;
  }
  .wizard-body {
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 6.75rem;
  }
  .wizard-footer {
    bottom: 0;
    padding: 0.8rem 1rem 0.4rem;
  }
  .wizard-footer .wizard-inner {
    transform: translateY(-0.35rem);
  }
}
.init-tip {
  color: var(--muted-foreground);
  font-size: 0.7rem;
  cursor: help;
  margin-inline-start: 0.25rem;
}
.init-tip:hover {
  color: var(--ph-cyan);
}

/* ================================================================
   LANDING OVERHAUL - Pill Navbar + Hero + Footer
   Dark achromatic · RTL Arabic · Space Grotesk + Tajawal
   ================================================================ */

/* Hide old Bootstrap navbar only - #ph-topnav still used on non-landing pages */
.app-navbar {
  display: none !important;
}

/* ─── PILL NAVBAR ─────────────────────────────────────────────── */
.ph-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  height: 5rem;
  width: 100%;
  align-items: flex-end;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}
.ph-navbar * {
  pointer-events: auto;
}
@media (min-width: 640px) {
  .ph-navbar {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .ph-navbar {
    padding: 0 2rem;
  }
}

.ph-navbar-pill {
  position: relative;
  display: flex;
  height: 3.5rem;
  width: 100%;
  max-width: 80rem;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0 1rem;
  transition: all 700ms ease-in-out;
}
.ph-navbar-pill::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 9999px;
  background: rgba(13, 12, 45, 0.55);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px);
}
.ph-navbar.scrolled .ph-navbar-pill {
  max-width: 56rem;
}
@media (min-width: 640px) {
  .ph-navbar:not(.scrolled) .ph-navbar-pill {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .ph-navbar:not(.scrolled) .ph-navbar-pill {
    padding: 0 2rem;
  }
}

/* Logo */
.ph-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #fafafa;
  flex-shrink: 0;
}
.ph-logo-img {
  height: 2rem;
  width: auto;
  display: block;
}

/* Desktop nav */
.ph-nav-desktop {
  display: none;
  align-items: center;
  flex: 1;
}
@media (min-width: 1024px) {
  .ph-nav-desktop {
    display: flex;
  }
}

.ph-nav-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  gap: 0;
  margin: 0;
  padding: 0;
}
.ph-nav-list .nav-link {
  display: block;
  padding: 0.375rem 0.75rem;
  color: #a3a3a3;
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 500;
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms ease;
  font-family: inherit;
}
.ph-nav-list .nav-link:hover {
  color: #fafafa;
}
.ph-nav-list .nav-link.active {
  color: #ffffff;
  font-weight: 600;
}

/* Actions */
.ph-navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Pill buttons (navbar-scoped) */
.ph-pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: all 300ms ease;
  outline: none;
  white-space: nowrap;
}
.ph-pill-btn-sm {
  height: 2.25rem;
  padding: 0 1rem;
}
.ph-pill-btn-icon {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}
.ph-pill-btn-primary {
  background: #ffffff;
  color: #0a0a0a;
}
.ph-pill-btn-primary:hover {
  background: #e5e5e5;
  color: #0a0a0a;
}
.ph-pill-btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fafafa;
}
.ph-pill-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14);
}
.ph-pill-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

/* Responsive show/hide */
.ph-desktop-only {
  display: none;
}
@media (min-width: 1024px) {
  .ph-desktop-only {
    display: inline-flex;
  }
}
.ph-mobile-only {
  display: inline-flex;
}
@media (min-width: 1024px) {
  .ph-mobile-only {
    display: none;
  }
}

/* ─── MOBILE SHEET (top-down) ─────────────────────────────────── */
.ph-sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 300ms ease,
    visibility 300ms ease;
}
.ph-sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ph-sheet-panel {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 70;
  max-height: 80vh;
  overflow-y: auto;
  background: #0d0c1f;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  color: #fafafa;
  transform: translateY(-100%);
  transition: transform 400ms cubic-bezier(0.32, 0.72, 0, 1);
}
.ph-sheet-panel.open {
  transform: translateY(0);
}

.ph-sheet-header {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ph-sheet-body {
  padding: 0.75rem 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.ph-sheet-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  color: #fafafa;
  text-decoration: none;
  font-size: 0.9375rem;
  border-radius: 8px;
  transition: background 150ms ease;
}
.ph-sheet-link:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ─── HERO DARK (from landing/herodark reference) ─────────────── */
.hero-dark {
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  direction: rtl;
  color: oklch(0.8107 0.0396 226.16);
  position: relative;
  overflow: hidden;
  background-color: #0d0c1f;
  background-image: url("/images/hero/bg-pattern.webp");
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 0 4rem;
}

.hero-dark-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 80rem;
  gap: 1rem;
  padding: 0 1rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

/* Badge */
.hero-dark-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.125rem 0.5rem;
  opacity: 0;
  animation: darkFadeIn 0.5s ease forwards;
}
.dark-badge-dot {
  width: 0.625rem;
  height: 0.625rem;
  border-radius: 0;
  flex-shrink: 0;
  transition:
    background-color 0.3s ease,
    border-radius 0.3s ease;
}
.dark-badge-dot.purple {
  background-color: #c02bd6;
  border-radius: 0 100% 0 0;
}
.dark-badge-dot.indigo {
  background-color: #443aa3;
  border-radius: 0 0 100% 0;
}
.dark-badge-dot.cyan {
  background-color: #27d8d3;
  border-radius: 100% 0 0 0;
}
.dark-badge-dot.silver {
  background-color: #f2f2f2;
  border-radius: 0 0 0 100%;
}
.dark-badge-text {
  display: inline-block;
  font-size: 0.875rem;
  white-space: nowrap;
  transition:
    opacity 0.35s ease,
    filter 0.35s ease,
    transform 0.35s ease;
}
.dark-badge-text.visible-text {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}
.dark-badge-text.hidden-text {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(4px);
}

/* Heading */
.hero-dark-heading {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.3;
  color: oklch(0.8107 0.0396 226.16);
}

/* Subtitle */
.hero-dark-subtitle {
  color: oklch(0.5814 0.0301 223.57);
  font-size: 1.25rem;
  max-width: 56rem;
  line-height: 1.6;
}

/* Buttons */
.hero-dark-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
.dark-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.5rem;
  padding: 0 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.5s ease;
  position: relative;
  overflow: hidden;
  outline: none;
  font-family: inherit;
}
.dark-btn svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  pointer-events: none;
  transition: transform 0.3s ease;
}
.dark-btn-primary {
  background-color: #27d8d3;
  color: white;
  box-shadow:
    0 0 0 2px rgba(39, 216, 211, 0.6),
    inset 0 -3px 6px 0 rgba(0, 0, 0, 0.6);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.dark-btn-primary:hover {
  box-shadow:
    0 0 0 2px rgba(39, 216, 211, 0.6),
    inset 0 -3px 6px -2px rgba(0, 0, 0, 0.6);
}
.dark-btn-primary:hover svg {
  transform: translateX(-4px);
}
.dark-btn-secondary {
  background-color: rgba(39, 216, 211, 0.1);
  color: #27d8d3;
  box-shadow:
    0 0 0 2px rgba(39, 216, 211, 0.6),
    inset 0 -3px 6px 0 rgba(39, 216, 211, 0.3);
}
.dark-btn-secondary:hover {
  background-color: rgba(39, 216, 211, 0.15);
  box-shadow:
    0 0 0 2px rgba(39, 216, 211, 0.6),
    inset 0 -3px 6px -2px rgba(39, 216, 211, 0.1);
}

/* Entrance animations */
.dark-animate-fade-slide {
  opacity: 0;
  animation: darkFadeSlideDown 0.5s ease-out forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes darkFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes darkFadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Cloud marquee */
.hero-dark-marquee {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  direction: ltr;
  gap: 0;
  overflow: hidden;
  padding: 0;
}
.dark-marquee-track {
  display: flex;
  flex-shrink: 0;
  gap: 0;
  animation: darkMarquee 50s linear infinite;
}
.dark-marquee-track img {
  opacity: 0.4;
  display: block;
  height: auto;
  width: auto;
  max-width: none;
}
@keyframes darkMarquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

/* Bottom gradient fade */
.hero-dark-fade {
  position: absolute;
  inset: auto 0 0 0;
  height: 40%;
  background: linear-gradient(
    to top,
    #0d0c1f 0%,
    rgba(13, 12, 31, 0.6) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 2;
}

/* Responsive */
@media (min-width: 640px) {
  .hero-dark-container {
    padding: 0 1.5rem;
  }
  .hero-dark-heading {
    font-size: 2.25rem;
  }
}
@media (min-width: 1024px) {
  .hero-dark-container {
    padding: 0 2rem;
  }
  .hero-dark-heading {
    font-size: 3.75rem;
  }
  .dark-btn {
    flex-grow: 0;
  }
}

/* ─── FOOTER ──────────────────────────────────────────────────── */
.ph-footer {
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  background: #0d0c1f;
  color: #737373;
  position: relative;
  overflow: hidden;
}
.ph-footer-container {
  margin: 0 auto;
  max-width: 80rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1rem 0;
}
@media (min-width: 640px) {
  .ph-footer-container {
    padding: 2rem 1.5rem 0;
  }
}
@media (min-width: 1024px) {
  .ph-footer-container {
    padding: 2.5rem 2rem 0;
  }
}

.ph-footer-top {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
}
@media (max-width: 1023px) {
  .ph-footer-top {
    flex-direction: column;
  }
}

.ph-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ph-footer-brand p {
  max-width: 32rem;
  line-height: 1.6;
  font-size: 0.9375rem;
  color: #737373;
}

.ph-footer-links {
  display: flex;
  gap: 5rem;
}
@media (max-width: 639px) {
  .ph-footer-links {
    flex-direction: column;
    gap: 2rem;
  }
}

.ph-footer-col {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.ph-footer-col h3 {
  color: #fafafa;
  font-size: 1.125rem;
  font-weight: 600;
}
.ph-footer-col-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.ph-footer-col-links a {
  color: #737373;
  text-decoration: none;
  font-size: 0.9375rem;
  transition: color 300ms ease;
}
.ph-footer-col-links a:hover {
  color: #fafafa;
}

.ph-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid #262626;
}
.ph-footer-copyright {
  font-weight: 300;
  font-size: 0.9375rem;
}
.ph-footer-copyright a {
  color: #737373;
  text-decoration: none;
  transition: color 300ms ease;
}
.ph-footer-copyright a:hover {
  color: #fafafa;
}

.ph-footer-socials {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.ph-footer-socials a {
  color: #737373;
  text-decoration: none;
  transition: color 300ms ease;
  display: flex;
}
.ph-footer-socials a:hover {
  color: #fafafa;
}
.ph-footer-socials a svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* Big hover text */
.ph-footer-hover-text {
  padding-top: 2.5rem;
  margin-bottom: -2.5rem;
}
@media (min-width: 640px) {
  .ph-footer-hover-text {
    padding: 2.5rem 4rem 0;
  }
}
@media (min-width: 768px) {
  .ph-footer-hover-text {
    margin-bottom: -5.5rem;
  }
}
@media (min-width: 1024px) {
  .ph-footer-hover-text {
    padding: 2.5rem 6rem 0;
  }
}
.ph-footer-hover-text svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
  cursor: default;
}

.hover-text-outline {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 96px;
  font-weight: 700;
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 0.5;
}
.hover-text-draw {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: phStrokeDraw 4s ease-in-out forwards;
}
@keyframes phStrokeDraw {
  to {
    stroke-dashoffset: 0;
  }
}

.hover-text-ghost {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 96px;
  font-weight: 700;
  fill: transparent;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 0.5;
  opacity: 0;
  transition: opacity 300ms ease;
}
.ph-footer-hover-text svg:hover .hover-text-ghost {
  opacity: 0.7;
}

.hover-text-gradient {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 96px;
  font-weight: 700;
  fill: transparent;
  stroke: url(#textGradient);
  stroke-width: 0.5;
  mask: url(#textMask);
}

/* ─── OLD FOOTER OVERRIDE ────────────────────────────────────── */
.app-footer {
  display: none !important;
}

/* ================================================================
   BRAND IDENTITY - Asymmetric Radius
   One corner fully rounded, rest square. Corner varies by component
   type for visual rhythm.
   ================================================================ */

/* ── Cards - top-right (RTL: top-left visually) ── */
.ph-card,
.card,
.ph-card-ghost,
.ph-card-flat,
.form-intro-card,
.auth-card,
.form-wrap,
.top-card,
.partner-card2,
.contact-card,
.ph-accent-border,
.value-card {
  border-radius: 0 1rem 0 0 !important;
}

/* ── Cards alternate - bottom-left ── */
.cardx,
.member-card,
.goal-card,
.stage-card,
.prize-card,
.orbit__item,
.method-intro {
  border-radius: 0 0 0 1rem !important;
}

/* ── Cards tertiary - top-left ── */
.partner-card,
.vd-card,
.benef-item,
.ph-card-accent,
.ph-card-primary {
  border-radius: 1rem 0 0 0 !important;
}

/* ── Buttons primary - bottom-right ── */
.ph-pill-btn-primary,
.dark-btn-primary,
.ph-btn-primary,
.btn-primary,
.btnx.primary,
.ph-nav-cta {
  border-radius: 0 0 0.75rem 0 !important;
}

/* ── Buttons secondary/ghost - top-right ── */
.ph-pill-btn-ghost,
.dark-btn-secondary,
.ph-btn-ghost,
.ph-btn-secondary,
.ph-btn-accent,
.ph-btn-muted,
.btn.ghost,
.btn-outline-secondary,
.btnx {
  border-radius: 0 0.625rem 0 0 !important;
}

/* ── Buttons danger/success - bottom-left ── */
.ph-btn-danger,
.ph-btn-success,
.btn-danger,
.btn-success,
.btn.danger,
.btn.ok,
.btn-del {
  border-radius: 0 0 0 0.625rem !important;
}

/* ── Small utility buttons ── */
.ph-btn-sm,
.ph-pill-btn-sm {
  border-radius: 0 0 0.5rem 0 !important;
}
.btn-add {
  border-radius: 0 0.5rem 0 0 !important;
}
.ph-pill-btn-icon {
  border-radius: 0 0 0 0.625rem !important;
}

/* ── Badges - top-left ── */
.badge,
.ph-badge,
.ph-badge-success,
.ph-badge-danger,
.ph-badge-warning,
.ph-badge-info,
.ph-badge-muted,
.ph-badge-primary,
.badge.chip,
.badge.pill,
.tag {
  border-radius: 0.5rem 0 0 0 !important;
}

/* ── Status/role pills - bottom-right ── */
.status,
.role,
.rank-badge {
  border-radius: 0 0 0.5rem 0 !important;
}

/* ── Form Inputs - top-right ── */
.form-control,
.form-select,
form input,
form textarea,
form select,
.ph-input,
.tablex .input,
.tablex input,
.tablex select,
input[type="search"] {
  border-radius: 0 0.5rem 0 0 !important;
}

/* ── Input group text (addon) - match opposite corner ── */
.input-group-text {
  border-radius: 0.5rem 0 0 0 !important;
}

/* ── Tables - bottom-left ── */
.tablex {
  border-radius: 0 0 0 0.75rem !important;
  overflow: hidden;
}
.ph-table-wrap {
  border-radius: 0 0 0 0.75rem !important;
  overflow-x: auto;
}

/* ── Alerts - top-left ── */
.alert,
.msg {
  border-radius: 0.75rem 0 0 0 !important;
}
.msg.ok {
  border-radius: 0 0.75rem 0 0 !important;
}
.msg.err {
  border-radius: 0 0 0.75rem 0 !important;
}
.submit-banner {
  border-radius: 0 0.75rem 0 0 !important;
}

/* ── Modal - bottom-right ── */
.ph-modal-box {
  border-radius: 0 0 1rem 0 !important;
}

/* ── Toasts - top-left ── */
.ph-toast {
  border-radius: 0.75rem 0 0 0 !important;
}

/* ── Pagination - bottom-right ── */
.ph-page-link {
  border-radius: 0 0 0.375rem 0 !important;
}

/* ── Section chips - top-right ── */
.intro-section-chip {
  border-radius: 0 0.625rem 0 0 !important;
}

/* ── Dropdown panels - bottom-left ── */
.dropdown-panel,
.dropdown-items,
.member-dropdown {
  border-radius: 0 0 0 0.75rem !important;
}

/* ── Sheet panel (mobile menu top-down) - bottom-right + bottom-left ── */
.ph-sheet-panel {
  border-radius: 0 0 1rem 0 !important;
}

/* ── Stage / Goal elements - alternate corners ── */
.stage-file {
  border-radius: 0 0 1rem 0 !important;
}
.chip {
  border-radius: 0.625rem 0 0 0 !important;
}
.ph-ico {
  border-radius: 0 0 0 0.625rem !important;
}
.ph-ico.sm {
  border-radius: 0 0.5rem 0 0 !important;
}
.benef-circle {
  border-radius: 0 0 0.625rem 0 !important;
}
.benef-nav button {
  border-radius: 0.5rem 0 0 0 !important;
}
.orbit__arrow {
  border-radius: 0 0 0 0.5rem !important;
}
.vd-dot {
  border-radius: 0 0.5rem 0 0 !important;
}

/* ── Step dots - bottom-right ── */
.ph-step-dot {
  border-radius: 0 0 0.5rem 0 !important;
}

/* ── Utility classes ── */
.round-12 {
  border-radius: 0 0.75rem 0 0 !important;
}
.round-16 {
  border-radius: 0 0 0 1rem !important;
}

/* ── Navbar pill - brand asymmetric radius ── */
.ph-navbar-pill,
.ph-navbar-pill::before {
  border-radius: 0 0 0 1.75rem !important;
}

/* ── Cap line decorations ── */
.cap-line {
  border-radius: 0 0.5rem 0 0 !important;
}

/* ── Hero badge dots - keep their special asymmetric shapes (already correct) ── */

/* ── Remove separator lines between landing page sections ── */
.ph-section,
.ph-section-alt,
.ph-stages,
.ph-goals,
.ph-venue,
#goals,
#stages,
#beneficiaries,
#value,
#prizes,
#initiatives-cta,
#partners-contact,
.hero-dark {
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  border-block: none !important;
}
/* ============================================================
   FEATURES SECTION - Dark Mode, RTL Arabic
   Scroll-driven frame animation + alternating cards
   Responsive: desktop side-by-side, tablet/mobile stacked
   ============================================================ */

:root {
  --ft-background: #0d0c1f;
  --ft-foreground: oklch(0.8107 0.0396 226.16);
  --ft-primary: #27d8d3;
  --ft-muted-foreground: oklch(0.5814 0.0301 223.57);
  --ft-border: oklch(0.36 0.02 213.25);
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap");

.features-dark *,
.features-dark *::before,
.features-dark *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.features-dark {
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  direction: rtl;
  color: var(--ft-foreground);
  background-color: var(--ft-background);
}

.features-dark-body {
  position: relative;
}

/* ============================================================
   STICKY BULB - Desktop (>=1024px)
   Uses vw-based sizing so it scales smoothly
   ============================================================ */

.features-frame-wrap {
  pointer-events: none;
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.features-frame-wrap img {
  display: block;
  width: 30vw;
  min-width: 20rem;
  max-width: 36rem;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

/* ============================================================
   SCROLL CARDS AREA - Desktop
   ============================================================ */

.scroll-cards {
  position: relative;
  z-index: 20;
  margin-top: -100vh;
}

/* ============================================================
   CARD SECTION - Desktop
   ============================================================ */

.card-section {
  display: flex;
  min-height: 70vh;
  align-items: center;
  padding: 2rem 2rem 0;
}

.card-section.pos-right {
  justify-content: flex-start;
}

.card-section.pos-left {
  justify-content: flex-end;
}

/* ============================================================
   FEATURE CARD - Desktop
   ============================================================ */

.feature-card {
  width: 100%;
  max-width: 22rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Push cards inward using percentages so they scale with viewport */
.card-section.pos-right .feature-card {
  margin-right: auto;
  margin-left: 5%;
}

.card-section.pos-left .feature-card {
  margin-left: auto;
  margin-right: 5%;
}

@media (min-width: 1200px) {
  .card-section.pos-right .feature-card {
    margin-left: 8%;
  }
  .card-section.pos-left .feature-card {
    margin-right: 8%;
  }
}

@media (min-width: 1400px) {
  .card-section.pos-right .feature-card {
    margin-left: 12%;
  }
  .card-section.pos-left .feature-card {
    margin-right: 12%;
  }
}

/* ============================================================
   TABLET + MOBILE (<1024px)
   Image on top, cards stacked underneath
   ============================================================ */

@media (max-width: 1023px) {
  /* Bulb: sticky at top, ON TOP of everything with matching bg + fade edge */
  .features-frame-wrap {
    position: sticky;
    top: 0;
    height: 45vh;
    z-index: 30;
    background: var(--ft-background);
  }

  .features-frame-wrap::after {
    content: "";
    position: absolute;
    bottom: -3rem;
    left: 0;
    right: 0;
    height: 3rem;
    background: linear-gradient(to bottom, var(--ft-background), transparent);
    pointer-events: none;
  }

  .features-frame-wrap img {
    width: 50vw;
    min-width: 14rem;
    max-width: 22rem;
  }

  /* Cards: scroll up and disappear behind the bulb's bg */
  .scroll-cards {
    position: relative;
    margin-top: 0;
    z-index: 1;
  }

  .card-section {
    min-height: auto;
    padding: 1.5rem 1.5rem;
    justify-content: center !important;
  }

  .feature-card {
    max-width: 32rem;
  }

  .card-section.pos-right .feature-card,
  .card-section.pos-left .feature-card {
    margin: 0 auto;
  }
}

@media (max-width: 640px) {
  .features-frame-wrap {
    padding: 2rem 0 0.5rem;
  }

  .features-frame-wrap img {
    width: 60vw;
    min-width: 12rem;
    max-width: 18rem;
  }

  .card-section {
    padding: 1.25rem 1rem;
  }

  .feature-card {
    max-width: 100%;
  }
}

/* ============================================================
   CARD HEADER (icon + title)
   ============================================================ */

.feature-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.5rem;
  height: 4.5rem;
  flex-shrink: 0;
  border-radius: 0;
  border: 1px solid var(--ft-border);
  background: linear-gradient(
    to bottom,
    rgba(39, 216, 211, 0.1),
    rgba(39, 216, 211, 0.2)
  );
}

/* Each icon gets a different rounded corner, SVG nudged toward the opposite (square) corner */
.card-section:nth-child(1) .feature-card-icon {
  border-radius: 0 100% 0 0;
}
.card-section:nth-child(1) .feature-card-icon svg {
  transform: translate(-5px, 5px);
}

.card-section:nth-child(2) .feature-card-icon {
  border-radius: 0 0 100% 0;
}
.card-section:nth-child(2) .feature-card-icon svg {
  transform: translate(-5px, -5px);
}

.card-section:nth-child(3) .feature-card-icon {
  border-radius: 100% 0 0 0;
}
.card-section:nth-child(3) .feature-card-icon svg {
  transform: translate(5px, 5px);
}

.card-section:nth-child(4) .feature-card-icon {
  border-radius: 0 0 0 100%;
}
.card-section:nth-child(4) .feature-card-icon svg {
  transform: translate(5px, -5px);
}

.card-section:nth-child(5) .feature-card-icon {
  border-radius: 0 100% 0 0;
}
.card-section:nth-child(5) .feature-card-icon svg {
  transform: translate(-5px, 5px);
}

.card-section:nth-child(6) .feature-card-icon {
  border-radius: 0 0 100% 0;
}
.card-section:nth-child(6) .feature-card-icon svg {
  transform: translate(-5px, -5px);
}

@media (max-width: 1023px) {
  .feature-card-icon {
    width: 3.75rem;
    height: 3.75rem;
  }
}

@media (max-width: 640px) {
  .feature-card-icon {
    width: 3.25rem;
    height: 3.25rem;
  }
}

.feature-card-icon svg {
  width: 2.5rem;
  height: 2.5rem;
}

@media (max-width: 1023px) {
  .feature-card-icon svg {
    width: 2rem;
    height: 2rem;
  }
}

.feature-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

@media (max-width: 640px) {
  .feature-card h3 {
    font-size: 1.25rem;
  }
}

.feature-card p {
  color: var(--ft-muted-foreground);
  line-height: 1.7;
}

/* ============================================================
   GOALS MINI CARDS GRID
   ============================================================ */

.goals-card {
  max-width: 24rem !important;
}

@media (max-width: 1023px) {
  .goals-card {
    max-width: 32rem !important;
  }
}

@media (max-width: 640px) {
  .goals-card {
    max-width: 100% !important;
  }
}

.goals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.goal-mini-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--ft-border);
  border-radius: 0;
  background: rgba(39, 216, 211, 0.04);
  font-size: 0.9375rem;
  font-weight: 500;
}

/* Teardrop corner per card */
.goal-mini-card:nth-child(1) {
  border-radius: 0 1.25rem 0 0;
}
.goal-mini-card:nth-child(2) {
  border-radius: 0 0 1.25rem 0;
}
.goal-mini-card:nth-child(3) {
  border-radius: 1.25rem 0 0 0;
}
.goal-mini-card:nth-child(4) {
  border-radius: 0 0 0 1.25rem;
}
.goal-mini-card:nth-child(5) {
  border-radius: 0 1.25rem 0 0;
}
.goal-mini-card:nth-child(6) {
  border-radius: 0 0 1.25rem 0;
}

.goal-dot {
  width: 0.75rem;
  height: 0.75rem;
  flex-shrink: 0;
}

.goal-dot.purple {
  background: #c02bd6;
}
.goal-dot.indigo {
  background: #443aa3;
}
.goal-dot.cyan {
  background: #27d8d3;
}
.goal-dot.silver {
  background: #f2f2f2;
}

/* ============================================================
   VALUE SUB-ITEMS
   ============================================================ */

.value-entry {
  margin-bottom: 0.75rem;
}

.value-entry:last-child {
  margin-bottom: 0;
}

.value-entry strong {
  display: block;
  color: var(--ft-foreground);
  font-weight: 600;
  margin-bottom: 0.125rem;
}

.value-entry span {
  color: var(--ft-muted-foreground);
  font-size: 0.9375rem;
  line-height: 1.7;
}

/* ── Features-dark: override Tailwind img reset + kill noise ── */
.features-dark .features-frame-wrap img {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
  filter: none !important;
  border-radius: 0 !important;
  max-width: none;
}
.features-dark .feature-card {
  background: transparent !important;
  box-shadow: none !important;
}
.features-dark .card-section::before,
.features-dark .card-section::after {
  display: none !important;
}

/* ================================================================
   TIMELINE - مراحل بروجكثون
   Scroll-driven alternating timeline with progress line
   ================================================================ */

.ph-timeline-section {
  background: #0d0c1f;
  padding: 4rem 0 6rem;
}

.ph-timeline-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .ph-timeline-container {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .ph-timeline-container {
    padding: 0 2rem;
  }
}

/* Header */
.ph-timeline-header {
  text-align: center;
  margin-bottom: 3rem;
}
.ph-timeline-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0 0 0.75rem;
}
.ph-timeline-header p {
  font-size: 1.125rem;
  color: var(--ft-muted-foreground, #7a8ba0);
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.6;
}
@media (min-width: 640px) {
  .ph-timeline-header h2 {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .ph-timeline-header h2 {
    font-size: 2.5rem;
  }
  .ph-timeline-header {
    margin-bottom: 5rem;
  }
}

/* Mobile: sticky header with bg + fade - tall enough to cover navbar gap */
@media (max-width: 767px) {
  .ph-timeline-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: #0d0c1f;
    padding: 7rem 1rem 1.5rem;
    margin-top: -5rem;
    margin-bottom: 1.5rem;
  }
  .ph-timeline-header::after {
    content: "";
    position: absolute;
    bottom: -2.5rem;
    left: 0;
    right: 0;
    height: 2.5rem;
    background: linear-gradient(to bottom, #0d0c1f, transparent);
    pointer-events: none;
  }
}

/* Timeline wrapper */
.ph-timeline {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
}

/* Each item */
.ph-tl-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}
/* Alternating: normal = title-right, content-left; alt = reversed */
.ph-tl-item-alt {
  flex-direction: row-reverse;
}

/* Title column */
.ph-tl-title-wrap {
  flex: 1;
  display: flex;
}
.ph-tl-item:not(.ph-tl-item-alt) .ph-tl-title-wrap {
  justify-content: flex-end;
}
.ph-tl-item-alt .ph-tl-title-wrap {
  justify-content: flex-start;
}

/* Badge */
.ph-tl-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0 0.5rem 0 0;
  background: rgba(39, 216, 211, 0.08);
  color: #27d8d3;
  transition:
    background 0.3s,
    color 0.3s;
  white-space: nowrap;
}
.ph-tl-badge.active {
  background: #27d8d3;
  color: #0d0c1f;
}

/* Mobile badge - hidden on desktop */
.ph-tl-badge-mobile {
  display: block;
  margin-bottom: 0.75rem;
}
.ph-tl-title-desktop {
  display: none;
}
@media (min-width: 768px) {
  .ph-tl-badge-mobile {
    display: none;
  }
  .ph-tl-title-desktop {
    display: flex;
  }
}

/* Dot column */
.ph-tl-dot-col {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1rem;
  flex-shrink: 0;
}
.ph-tl-dot {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: sticky;
  top: 10rem;
  z-index: 5;
  transition: background 0.3s;
}
.ph-tl-dot::after {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--ft-muted-foreground, #7a8ba0);
  transition: background 0.3s;
}
.ph-tl-dot.active {
  background: rgba(39, 216, 211, 0.15);
}
.ph-tl-dot.active::after {
  background: #27d8d3;
}

/* Content column */
.ph-tl-content {
  flex: 1;
}

/* Card */
.ph-tl-card {
  background: rgba(39, 216, 211, 0.03);
  border: 1px solid var(--ft-border, rgba(255, 255, 255, 0.1));
  padding: 1.25rem;
  margin-bottom: 1rem;
  max-width: 34rem;
  border-radius: 0 1rem 0 0;
}
.ph-tl-item-alt .ph-tl-card {
  border-radius: 1rem 0 0 0;
}
.ph-tl-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0 0 0.5rem;
}
.ph-tl-card p {
  font-size: 0.9375rem;
  color: var(--ft-muted-foreground, #7a8ba0);
  line-height: 1.7;
  margin: 0;
}

/* Mobile: stack all left-aligned */
@media (max-width: 767px) {
  .ph-tl-item,
  .ph-tl-item-alt {
    flex-direction: row;
  }
  .ph-tl-title-wrap {
    display: none;
  }
  .ph-tl-dot-col {
    padding: 0 0.75rem 0 0;
  }
  .ph-tl-card {
    max-width: none;
    border-radius: 0 0.75rem 0 0 !important;
  }
}

/* Progress line */
.ph-tl-line {
  position: absolute;
  width: 2px;
  background: rgba(255, 255, 255, 0.08);
  top: 0;
  bottom: 0;
  z-index: 1;
  /* Centered on the dot column - on desktop that's 50% */
  left: 50%;
  transform: translateX(-50%);
}
.ph-tl-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: #27d8d3;
  border-radius: 2px;
  transition: height 0.15s linear;
}

/* Mobile: line on the right side (RTL) */
@media (max-width: 767px) {
  .ph-tl-line {
    left: auto;
    right: 0.375rem;
    transform: none;
  }
}

/* ================================================================
   TRACKS - المسارات التنموية
   ================================================================ */

.ph-tracks-section {
  background: #0d0c1f;
  padding: 5rem 0 1rem;
}
.ph-tracks-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.ph-tracks-header {
  text-align: center;
  margin-bottom: 3rem;
}
.ph-tracks-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0 0 0.75rem;
}
.ph-tracks-header p {
  font-size: 1.125rem;
  color: var(--ft-muted-foreground, #7a8ba0);
  margin: 0;
}
@media (min-width: 640px) {
  .ph-tracks-header h2 {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .ph-tracks-header h2 {
    font-size: 2.5rem;
  }
}

.ph-tracks-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
@media (min-width: 640px) {
  .ph-tracks-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (min-width: 1024px) {
  .ph-tracks-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.ph-track-card {
  padding: 1.5rem 1.25rem;
  border: 2px solid var(--ft-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.03);
  color: var(--ft-foreground, #c9d6e8);
  border-radius: 0 1.5rem 0 0;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.ph-track-card:hover {
  border-color: #27d8d3;
  transform: translateY(-4px);
}
.ph-track-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
  color: var(--ft-foreground, #c9d6e8);
}
.ph-track-desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0.5rem 0 0;
  color: var(--ft-muted-foreground, #7a8ba0);
}

/* ================================================================
   AWARDS - الجوائز (static podium / leaderboard)
   ================================================================ */

.ph-awards-section {
  background: #0d0c1f;
  padding: 5rem 0 4rem;
  overflow: hidden;
}

.ph-awards-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.ph-awards-header {
  text-align: center;
  margin-bottom: 3rem;
}
.ph-awards-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0 0 1rem;
}
.ph-awards-header p {
  font-size: 1.125rem;
  color: var(--ft-muted-foreground, #7a8ba0);
  margin: 0;
}
@media (min-width: 640px) {
  .ph-awards-header h2 {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .ph-awards-header h2 {
    font-size: 2.5rem;
  }
}

/* Prominent total prize figure */
.ph-awards-total {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}
.ph-awards-total-num {
  display: inline-flex;
  align-items: center;
  gap: 0.15em;
  font-size: clamp(3rem, 9vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #27d8d3;
  text-shadow: 0 0 40px rgba(39, 216, 211, 0.35);
}
.ph-awards-total-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ft-foreground, #c9d6e8);
}
@media (min-width: 640px) {
  .ph-awards-total-label {
    font-size: 1.125rem;
  }
}

/* Stage - static podium row (RTL: visual order is 3rd, 1st, 2nd) */
.ph-awards-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: nowrap;
  margin-top: 7rem;
}
@media (min-width: 640px) {
  .ph-awards-stage {
    gap: 2rem;
  }
}

/* Individual card */
.ph-award-card {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 240px;
  padding: 2rem 1.25rem 1.75rem;
  border: 2px solid var(--ft-border, rgba(255, 255, 255, 0.1));
  background: rgba(255, 255, 255, 0.03);
  color: var(--ft-foreground, #c9d6e8);
  border-radius: 0 3rem 0 0;
  transition: transform 0.3s ease;
}

/* Podium sizing: 1st largest, 2nd a touch smaller, 3rd smaller still */
.ph-award-first {
  width: 300px;
  padding-bottom: 3rem;
  z-index: 10;
  border-color: #27d8d3;
  background: #27d8d3;
  color: #0d0c1f;
  box-shadow: 0 8px 0 4px rgba(255, 255, 255, 0.08);
}
.ph-award-first .ph-award-amount {
  color: #0d0c1f;
}
.ph-award-first .ph-award-place {
  color: rgba(13, 12, 31, 0.7);
}
.ph-award-second {
  width: 252px;
}
.ph-award-third {
  width: 216px;
}
@media (min-width: 640px) {
  .ph-award-first {
    width: 360px;
  }
  .ph-award-second {
    width: 300px;
  }
  .ph-award-third {
    width: 264px;
  }
}

/* Badge image - scaled per place, pulled above the card */
.ph-award-badge {
  max-width: none;
  object-fit: contain;
  margin-bottom: 0.25rem;
  position: relative;
  z-index: 2;
}
.ph-award-first .ph-award-badge {
  width: 17rem;
  height: 17rem;
  margin-top: -11rem;
}
.ph-award-second .ph-award-badge {
  width: 14rem;
  height: 14rem;
  margin-top: -9rem;
}
.ph-award-third .ph-award-badge {
  width: 12rem;
  height: 12rem;
  margin-top: -7.5rem;
}
@media (min-width: 640px) {
  .ph-award-first .ph-award-badge {
    width: 21rem;
    height: 21rem;
    margin-top: -14rem;
  }
  .ph-award-second .ph-award-badge {
    width: 17rem;
    height: 17rem;
    margin-top: -11rem;
  }
  .ph-award-third .ph-award-badge {
    width: 15rem;
    height: 15rem;
    margin-top: -10rem;
  }
}

/* Amount */
.ph-award-amount {
  display: inline-flex;
  align-items: center;
  gap: 0.1em;
  font-weight: 700;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0;
}
.ph-award-first .ph-award-amount {
  font-size: 2.25rem;
}
.ph-award-second .ph-award-amount {
  font-size: 1.75rem;
}
.ph-award-third .ph-award-amount {
  font-size: 1.5rem;
}
@media (min-width: 640px) {
  .ph-award-first .ph-award-amount {
    font-size: 3rem;
  }
  .ph-award-second .ph-award-amount {
    font-size: 2.25rem;
  }
  .ph-award-third .ph-award-amount {
    font-size: 2rem;
  }
}

/* Place label */
.ph-award-place {
  font-weight: 500;
  color: var(--ft-muted-foreground, #7a8ba0);
  margin: 0;
}
.ph-award-first .ph-award-place {
  font-size: 1.25rem;
}
.ph-award-second .ph-award-place {
  font-size: 1.0625rem;
}
.ph-award-third .ph-award-place {
  font-size: 1rem;
}

/* Mobile: stack vertically 1st -> 2nd -> 3rd */
@media (max-width: 639px) {
  .ph-awards-stage {
    flex-direction: column;
    align-items: center;
    gap: 4rem;
    margin-top: 9rem;
  }
  .ph-award-card {
    width: 100%;
    max-width: 320px;
  }
  .ph-award-first,
  .ph-award-second,
  .ph-award-third {
    width: 100%;
    max-width: 320px;
  }
}

/* Extra note */
.ph-awards-extra {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9375rem;
  color: var(--ft-muted-foreground, #7a8ba0);
}

/* SAR currency symbol icon */
.ph-sar-icon {
  display: inline-block;
  width: 0.85em;
  height: 0.85em;
  vertical-align: baseline;
  margin-inline-start: 0.15em;
  transition: color 0.5s ease;
}
/* ============================================================
   MARQUEE LOGOS - Dark Mode, RTL Arabic
   Two-row scrolling brand logos with fade edges
   ============================================================ */

:root {
  --mq-background: #0d0c1f;
  --mq-foreground: var(--ft-foreground, #c9d6e8);
  --mq-primary: #27d8d3;
  --mq-muted: #0d0c1f;
  --mq-muted-foreground: var(--ft-muted-foreground, #7a8ba0);
  --mq-border: rgba(255, 255, 255, 0.08);
  --mq-card: rgba(255, 255, 255, 0.92);
}

@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Arabic:wght@300;400;500;600;700&display=swap");

.marquee-section *,
.marquee-section *::before,
.marquee-section *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ============================================================
   LAYOUT
   ============================================================ */

.marquee-section {
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  direction: rtl;
  color: var(--mq-foreground);
  background: #0d0c1f;
  padding: 2rem 0;
}

@media (min-width: 640px) {
  .marquee-section {
    padding: 4rem 0;
  }
}
@media (min-width: 1024px) {
  .marquee-section {
    padding: 6rem 0;
  }
}

/* ============================================================
   HEADER
   ============================================================ */

.marquee-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

@media (min-width: 640px) {
  .marquee-header {
    margin-bottom: 4rem;
  }
}
@media (min-width: 1024px) {
  .marquee-header {
    margin-bottom: 6rem;
  }
}

.marquee-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--mq-primary);
  border-radius: 9999px;
  color: var(--mq-primary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0;
  animation: mqFadeSlide 0.7s ease forwards;
}

.marquee-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  animation: mqSpin 2s linear infinite;
}

.marquee-title {
  font-size: 1.5rem;
  font-weight: 600;
  opacity: 0;
  animation: mqFadeSlide 0.7s ease forwards 0.2s;
}

@media (min-width: 768px) {
  .marquee-title {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .marquee-title {
    font-size: 2.25rem;
  }
}

.marquee-subtitle {
  color: var(--mq-muted-foreground);
  font-size: 1.125rem;
  opacity: 0;
  animation: mqFadeSlide 0.7s ease forwards 0.4s;
}

@media (min-width: 768px) {
  .marquee-subtitle {
    font-size: 1.25rem;
  }
}

/* ============================================================
   MARQUEE ROWS CONTAINER
   ============================================================ */

.marquee-rows {
  position: relative;
  direction: ltr;
  width: 100%;
  overflow: hidden;
}

/* Fade edges */
.marquee-rows::before,
.marquee-rows::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8.75rem;
  z-index: 2;
  pointer-events: none;
}

.marquee-rows::before {
  right: 0;
  background: linear-gradient(to left, var(--mq-muted), transparent);
}

.marquee-rows::after {
  left: 0;
  background: linear-gradient(to right, var(--mq-muted), transparent);
}

@media (max-width: 639px) {
  .marquee-rows::before,
  .marquee-rows::after {
    display: none;
  }
}

/* ============================================================
   MARQUEE TRACK
   ============================================================ */

.marquee-row {
  display: flex;
  gap: 1.5rem;
  overflow: hidden;
  padding: 0.75rem 0;
}

.marquee-track {
  display: flex;
  gap: 1.5rem;
  flex-shrink: 0;
  animation: mqScroll var(--mq-duration, 30s) linear infinite;
}

.marquee-row.reverse .marquee-track {
  animation-direction: reverse;
}

/* Pause on hover */
.marquee-row:hover .marquee-track {
  animation-play-state: paused;
}

/* ============================================================
   LOGO CARD
   ============================================================ */

.logo-card {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  direction: rtl;
  transition: border-color 0.3s ease;
}

/* Teardrop branding - cycle through corners */
.marquee-track .logo-card:nth-child(6n + 1) {
  border-radius: 0 1rem 0 0;
}
.marquee-track .logo-card:nth-child(6n + 2) {
  border-radius: 0 0 1rem 0;
}
.marquee-track .logo-card:nth-child(6n + 3) {
  border-radius: 1rem 0 0 0;
}
.marquee-track .logo-card:nth-child(6n + 4) {
  border-radius: 0 0 0 1rem;
}
.marquee-track .logo-card:nth-child(6n + 5) {
  border-radius: 0 1rem 0 0;
}
.marquee-track .logo-card:nth-child(6n) {
  border-radius: 0 0 1rem 0;
}

.logo-card img {
  height: 3rem;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
  opacity: 0.7;
  transition: opacity 0.3s ease;
}
.logo-card:hover img {
  opacity: 1;
}

.logo-card-text {
  display: flex;
  flex-direction: column;
}

.logo-card-name {
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: nowrap;
}

.logo-card-label {
  font-size: 0.75rem;
  color: var(--mq-muted-foreground);
  white-space: nowrap;
}

/* ============================================================
   KEYFRAMES
   ============================================================ */

@keyframes mqScroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-100% - 1.5rem));
  }
}

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

@keyframes mqSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Logo marquee: override Tailwind img max-width */
.logo-card img {
  max-width: none;
}

/* ── Partners - شركاؤنا ── */
.ph-partners-section {
  background: #0d0c1f;
  padding: 3rem 0 2rem;
}
.ph-partners-container {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1rem;
}
.ph-partners-title {
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ft-foreground, #c9d6e8);
  margin: 0 0 2rem;
}
@media (min-width: 640px) {
  .ph-partners-title {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .ph-partners-title {
    font-size: 2.25rem;
  }
}

.ph-partners-grid {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.ph-partner-card {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ft-border, rgba(255, 255, 255, 0.1));
  border-radius: 0 1.5rem 0 0;
}
.ph-partner-card img {
  height: 4rem;
  width: auto;
  max-width: 10rem;
  object-fit: contain;
  flex-shrink: 0;
}

/* ================================================================
   CTA SECTION
   ================================================================ */

.cta-section {
  font-family: "Space Grotesk", "Tajawal", system-ui, sans-serif;
  direction: rtl;
  color: var(--ft-foreground, #c9d6e8);
  background: #0d0c1f;
  padding: 2rem 0;
}
@media (min-width: 640px) {
  .cta-section {
    padding: 4rem 0;
  }
}
@media (min-width: 1024px) {
  .cta-section {
    padding: 6rem 0;
  }
}

.cta-container {
  margin: 0 auto;
  max-width: 80rem;
  padding: 0 1rem;
}
@media (min-width: 640px) {
  .cta-container {
    padding: 0 1.5rem;
  }
}
@media (min-width: 1024px) {
  .cta-container {
    padding: 0 2rem;
  }
}

.cta-card {
  background: #151426;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 2rem 0 0;
  overflow: hidden;
  padding: 2rem 1.5rem 2rem 0;
}
@media (min-width: 768px) {
  .cta-card {
    padding: 4rem 5rem 4rem 0;
    border-radius: 0 3rem 0 0;
  }
}

.cta-inner {
  display: flex;
  gap: 0;
  align-items: stretch;
}
@media (max-width: 1023px) {
  .cta-inner {
    flex-direction: column-reverse;
    gap: 0;
  }
}

.cta-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 2rem 0 0;
}
@media (min-width: 768px) {
  .cta-text {
    padding: 0 2rem 0 0;
  }
}
@media (max-width: 1023px) {
  .cta-text {
    text-align: center;
    padding: 1.5rem;
  }
}

.cta-badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid #27d8d3;
  border-radius: 0 0.5rem 0 0;
  color: #27d8d3;
  font-size: 0.875rem;
  font-weight: 500;
}
@media (max-width: 1023px) {
  .cta-badge {
    align-self: center;
  }
}
.cta-badge svg {
  width: 1.5rem;
  height: 1.5rem;
  animation: ctaSpin 2s linear infinite;
}

.cta-title {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}
@media (min-width: 768px) {
  .cta-title {
    font-size: 1.875rem;
  }
}
@media (min-width: 1024px) {
  .cta-title {
    font-size: 2.25rem;
  }
}

.cta-desc {
  color: var(--ft-muted-foreground, #7a8ba0);
  font-size: 1.125rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}
@media (max-width: 1023px) {
  .cta-buttons {
    justify-content: center;
  }
}

/* Lightbulb gif container - edge-to-edge on the left (RTL: left = start side) */
.cta-bulb-wrap {
  position: relative;
  flex: 1.4;
  background: #010102;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  margin: -2rem 0 -2rem 0;
  min-height: 16rem;
  overflow: hidden;
}
@media (min-width: 768px) {
  .cta-bulb-wrap {
    margin: -4rem 0 -4rem 0;
  }
}
.cta-bulb-gif {
  display: block;
  width: 100%;
  max-height: 20rem;
  object-fit: contain;
  max-width: none;
  transform: translateX(-8%);
}
/* Gradient: left-to-right (from card bg toward gif) */
.cta-bulb-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    #151426 0%,
    rgba(1, 1, 2, 0.3) 35%,
    transparent 50%
  );
  pointer-events: none;
}

/* Mobile: gif on top (column-reverse puts it first), text below */
@media (max-width: 1023px) {
  .cta-card {
    padding: 0;
  }
  .cta-bulb-wrap {
    margin: 0;
    min-height: 14rem;
    max-height: none;
    aspect-ratio: 16 / 9;
    justify-content: center;
    align-items: center;
  }
  .cta-bulb-gif {
    transform: none;
    width: auto;
    height: 100%;
    max-height: none;
    object-fit: contain;
    margin: 0 auto;
  }
  .cta-bulb-fade {
    background: linear-gradient(to top, #151426 0%, transparent 50%);
  }
}

@keyframes ctaSpin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

/* Logos that are already white - skip invert filter */
.logo-card img[alt*="الأوقاف"],
.logo-card img[alt*="البيئة"],
.logo-card img[alt*="الشؤون الإسلامية"],
.logo-card img[alt*="التجارة"],
.logo-card img[alt*="العدل"] {
  filter: none;
  opacity: 0.85;
}

/* ── Legal pages (Privacy, Terms) ── */
.ph-legal {
  max-width: 48rem;
  margin: 0 auto;
  padding: 2rem 0;
  color: var(--ft-foreground, #c9d6e8);
  line-height: 1.8;
}
.ph-legal h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ph-legal-updated {
  font-size: 0.875rem;
  color: var(--ft-muted-foreground, #7a8ba0);
  margin-bottom: 2rem;
}
.ph-legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}
.ph-legal p {
  margin-bottom: 1rem;
  color: var(--ft-muted-foreground, #7a8ba0);
}
.ph-legal ul {
  margin: 0 0 1rem 0;
  padding-inline-start: 1.5rem;
}
.ph-legal li {
  margin-bottom: 0.5rem;
  color: var(--ft-muted-foreground, #7a8ba0);
}
.ph-legal a {
  color: #27d8d3;
}

/* ── Results podium (award card style) ── */
.results-podium {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding-top: 6rem;
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0.5rem 1.25rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 1.5rem 0 0;
  overflow: visible;
}

/* Sizes - #1 biggest, #2 medium, #3 smallest */
.podium-1st {
  width: 14.5rem;
}
.podium-2nd {
  width: 12.5rem;
  background: rgba(192, 192, 192, 0.06);
  border-color: rgba(192, 192, 192, 0.2);
}
.podium-3rd {
  width: 10rem;
  background: rgba(165, 113, 63, 0.05);
  border-color: rgba(165, 113, 63, 0.15);
}

/* Center card (#1) highlighted */
.podium-1st {
  border-color: #27d8d3;
  background: rgba(39, 216, 211, 0.05);
}

/* Badge images */
.podium-badge {
  width: 13rem;
  height: 13rem;
  object-fit: contain;
  max-width: none;
  margin-top: -6.5rem;
  margin-bottom: 0;
}
.podium-1st .podium-badge {
  width: 18rem;
  height: 18rem;
  margin-top: -9rem;
}
.podium-3rd .podium-badge {
  width: 9rem;
  height: 9rem;
  margin-top: -5rem;
}

/* Text */
.podium-team {
  font-size: 1rem;
  font-weight: 700;
  color: var(--foreground);
  margin-bottom: 0.125rem;
}
.podium-1st .podium-team {
  font-size: 1.125rem;
}
.podium-category {
  font-size: 0.8125rem;
  color: var(--muted-foreground);
  margin-bottom: 0.75rem;
}
.podium-score {
  font-size: 2rem;
  font-weight: 800;
  color: #27d8d3;
}
.podium-1st .podium-score {
  font-size: 2.5rem;
}
.podium-judges {
  font-size: 0.75rem;
  color: var(--muted-foreground);
  margin-top: 0.25rem;
}
.podium-place {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Responsive */
@media (max-width: 768px) {
  .results-podium {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 3rem;
  }
  .podium-1st,
  .podium-2nd,
  .podium-3rd {
    width: 100%;
    max-width: 18rem;
  }
  .podium-badge {
    margin-top: -3rem;
  }
  .podium-1st .podium-badge {
    margin-top: -4rem;
  }
}

/* ── Admin dropdown menu ── */
.ph-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 50;
  min-width: 14rem;
  background: #141414;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 0.75rem 0 0;
  padding: 0.375rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.ph-dropdown-menu.open {
  display: block;
}
.ph-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  color: var(--foreground);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 0.375rem;
  transition: background 0.15s ease;
}
.ph-dropdown-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* ── Consistent dropdown arrow for all styled selects (RTL: arrow on the left) ── */
select.ph-input,
select.ph-input-sm,
select.form-select,
select.input,
select.select,
form select {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23cdd4ea' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 0.7rem center !important;
  background-size: 12px 12px !important;
  padding-left: 2rem !important;
}

/* ═══════════════════════════════════════════════════════════════════
   Initiative form refinements (v0.7)
   Delete-as-trash-icon · table column widths · business-model canvas
   ═══════════════════════════════════════════════════════════════════ */

/* ── Icon-only delete button (trash) — replaces the text "حذف" in row tables ── */
.btnx.icon-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  padding: 0 !important;
  background: transparent;
  color: #ff8a93;
  border: 1px solid rgba(255, 138, 147, 0.35);
  border-radius: 10px;
  line-height: 1;
}
.btnx.icon-danger:hover {
  background: rgba(255, 107, 116, 0.12) !important;
  color: #ff6b74;
  border-color: rgba(255, 107, 116, 0.55);
  filter: none;
}

/* ── Fixed column widths: risk & revenue tables (keep horizontal scroll via min-width).
   Every column is given an explicit width so table-layout:fixed is fully deterministic. ── */
#riskTable { table-layout: fixed; min-width: 54rem; }
#riskTable th:nth-child(1), #riskTable td:nth-child(1) { width: 17%; }   /* الخطر */
#riskTable th:nth-child(2), #riskTable td:nth-child(2) { width: 10%; }   /* التصنيف — narrower */
#riskTable th:nth-child(3), #riskTable td:nth-child(3) { width: 14%; }   /* الاحتمالية — wider (fits متوسط) */
#riskTable th:nth-child(4), #riskTable td:nth-child(4) { width: 19%; }   /* الأثر إذا وقع */
#riskTable th:nth-child(5), #riskTable td:nth-child(5) { width: 14%; }   /* مستوى الخطورة — match الاحتمالية */
#riskTable th:nth-child(6), #riskTable td:nth-child(6) { width: 19%; }   /* الاستجابة */
#riskTable th:last-child,  #riskTable td:last-child  { width: 3.4rem; }  /* حذف icon */

#revenueTable { table-layout: fixed; min-width: 66rem; }
#revenueTable th:nth-child(1), #revenueTable td:nth-child(1) { width: 16%; } /* المنتج/الخدمة */
#revenueTable th:nth-child(2), #revenueTable td:nth-child(2) { width: 13%; } /* التصنيف — wider */
#revenueTable th:nth-child(3), #revenueTable td:nth-child(3) { width: 6%; }  /* الكمية — narrower (2 digits) */
#revenueTable th:nth-child(4), #revenueTable td:nth-child(4) { width: 11%; } /* القيمة الفردية */
#revenueTable th:nth-child(5), #revenueTable td:nth-child(5) { width: 11%; } /* الإجمالي */
#revenueTable th:nth-child(6), #revenueTable td:nth-child(6) { width: 11%; } /* تكرار الإيراد */
#revenueTable th:nth-child(7), #revenueTable td:nth-child(7) { width: 10%; } /* مستوى الثقة */
#revenueTable th:nth-child(8), #revenueTable td:nth-child(8) { width: 16%; } /* مصدر التقدير */
#revenueTable th:last-child,  #revenueTable td:last-child  { width: 3.4rem; }/* حذف icon */

/* ── Business Model Canvas (section 5) — an advanced form layout, not a 3rd-party tool ── */
/* Dividers come from 1px gaps: the canvas/row background (--border) shows through
   every gap as a line — between columns, between stacked cells, and between the
   upper area and the lower area. Cells paint over it with --card. */
.bmc-canvas {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 1rem;
}
.bmc-row {
  display: grid;
  gap: 1px;
  background: var(--border);
}
/* Equal-height rows (1fr 1fr) so the stacked cells (القنوات/الموارد، العوائد) match
   the height of their siblings instead of collapsing. */
.bmc-upper {
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "seg rel val act par"
    "seg chan val res par";
}
.bmc-lower {
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 1fr 1fr;
  grid-template-areas:
    "rev rev cost cost"
    "fin soc cost cost";
}
.bmc-a-seg  { grid-area: seg; }
.bmc-a-rel  { grid-area: rel; }
.bmc-a-chan { grid-area: chan; }
.bmc-a-val  { grid-area: val; }
.bmc-a-act  { grid-area: act; }
.bmc-a-res  { grid-area: res; }
.bmc-a-par  { grid-area: par; }
.bmc-a-rev  { grid-area: rev; }
.bmc-a-fin  { grid-area: fin; }
.bmc-a-soc  { grid-area: soc; }
.bmc-a-cost { grid-area: cost; }

.bmc-cell {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding: .85rem .8rem;
  min-height: 9rem;
  background: var(--card);
}
.bmc-cell-title {
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: .01em;
}
/* Textareas blend into the canvas (no visible box). The cell is a fixed, uniform block;
   the field fills the remaining height and SCROLLS internally for long text instead of
   growing — auto-grow is opted out for .bmc-cell in site.js. min-height:0 lets the flex
   child shrink so overflow engages; max-height:none neutralizes the global 20rem cap. */
.bmc-canvas .bmc-cell .input {
  width: 100%;
  flex: 1 1 0;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto;
  border: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  padding: 0 !important;
  resize: none;
  box-shadow: none !important;
}
.bmc-canvas .bmc-cell .input:focus {
  outline: none !important;
  box-shadow: none !important;
}
.bmc-cell-value {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  font-size: .875rem;
  color: var(--foreground);
  line-height: 1.7;
  white-space: pre-wrap;
}
/* Slim, theme-matched scrollbar so overflow looks intentional on the borderless field. */
.bmc-cell .input,
.bmc-cell-value {
  scrollbar-width: thin;
  scrollbar-color: var(--muted-foreground) transparent;
}
.bmc-cell .input::-webkit-scrollbar,
.bmc-cell-value::-webkit-scrollbar { width: 6px; }
.bmc-cell .input::-webkit-scrollbar-thumb,
.bmc-cell-value::-webkit-scrollbar-thumb { background: var(--muted-foreground); border-radius: 999px; }
.bmc-cell .input::-webkit-scrollbar-track,
.bmc-cell-value::-webkit-scrollbar-track { background: transparent; }
/* Keep the canvas clean: the char counter only appears if the cell goes over limit. */
.bmc-cell .ph-char-counter:not(.is-over) { display: none !important; }
.bmc-cell .ph-limited, .bmc-cell .ph-limited-area { width: 100%; flex: 1 1 0; min-height: 0; display: flex; }
@media (max-width: 768px) {
  .bmc-upper, .bmc-lower { grid-template-columns: 1fr; grid-template-rows: none; grid-template-areas: none; }
  .bmc-upper .bmc-cell, .bmc-lower .bmc-cell { grid-area: auto !important; }
}
