:root{
  --bg:#071226;
  --card:#0b1a33;
  --muted:#9fb3d9;
  --border:rgba(255,255,255,.10);

  /* ✅ مهم لـ app.js (showMsg) */
  --ok:#2cc476;
  --bad:#ff5252;

  /* ✅ ألوان أزرار واضحة */
  --primary:#5b5df0;
  --secondary:rgba(255,255,255,.10);
  --danger:#ff5252;
  --ghost:rgba(255,255,255,.06);

  --text:#e8f0ff;
  --textStrong:#ffffff;
}

*{box-sizing:border-box}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Tahoma,Arial;
  background:linear-gradient(180deg,#071226 0%,#0b1a33 100%);
  color:var(--text);
}

/* ===== Header ===== */
.top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:16px 24px;
  border-bottom:1px solid var(--border);
  gap:18px;
  flex-wrap:nowrap;
}

.brand{
  flex:1 1 auto;
  text-align:center;
  display:flex;
  justify-content:center;
}

.top-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex:0 0 auto;
}

.title{
  font-size:28px;
  font-weight:900;
  letter-spacing:.4px;
}

.subtitle{
  font-size:17px;
  color:var(--muted);
  line-height:1.9;
  max-width:720px;
  margin-top:8px;
}

/* ===== Pills / Links ===== */
.pill{
  padding:9px 12px;
  border:1px solid var(--border);
  border-radius:999px;
  font-size:13px;
  color:var(--muted);
  background:rgba(255,255,255,.04);
}

.adminLink{
  display:inline-block;
  padding:9px 12px;
  border:1px solid rgba(255,255,255,.18);
  border-radius:12px;
  color:#cfe1ff;
  text-decoration:none;
  background:rgba(255,255,255,.04);
}

/* ===== Grid / Cards ===== */
.grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  padding:30px 20px;
}

.card{
  background:var(--card);
  padding:20px;
  border-radius:16px;
  border:1px solid var(--border);
}

.card h2{
  margin-top:0;
  font-size:16px;
  font-weight:800;
}

.row{ margin-bottom:14px; }

label{
  display:block;
  margin-bottom:8px;
  color:var(--muted);
  font-weight:700;
}

.req{ color: var(--danger); font-weight:900; }

/* ===== Inputs ===== */
input,select,textarea{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#0c1426;
  color:var(--textStrong);
  outline:none;
}

input::placeholder, textarea::placeholder{ color: rgba(232,240,255,.55); }

input:focus,select:focus,textarea:focus{
  border-color: rgba(91,93,240,.6);
  box-shadow: 0 0 0 3px rgba(91,93,240,.18);
}

.inline{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.inline > *{ flex: 1 1 auto; min-width: 160px; }

/* ===== Buttons (الأهم) ===== */
button{
  font-family:inherit;
  border-radius:14px;
  padding:12px 14px;
  font-weight:900;
  border:1px solid var(--border);
  cursor:pointer;
  color:var(--textStrong);
  background:rgba(255,255,255,.06);
  transition: filter .15s ease, transform .08s ease, opacity .15s ease;
}

button:hover{ filter: brightness(1.08); }
button:active{ transform: translateY(1px); }

button.primary{
  background: var(--primary) !important;
  border-color: rgba(91,93,240,.65) !important;
  color: #fff !important;
}

button.secondary{
  background: var(--secondary) !important;
  border-color: rgba(255,255,255,.16) !important;
  color:#eaf2ff !important;
}

button.danger{
  background: rgba(255,82,82,.92) !important;
  border-color: rgba(255,82,82,.55) !important;
  color:#fff !important;
}

button.ghost{
  background: var(--ghost) !important;
  border-color: rgba(255,255,255,.14) !important;
  color:#eaf2ff !important;
}

/* ✅ حل مشكلة “أزرار فاتحة والخط غير مقروء” على الموبايل */
button:disabled{
  opacity: .65;                 /* يوضح أنها غير فعّالة */
  cursor: not-allowed;
  filter: none;
  color: rgba(255,255,255,.92) !important; /* يبقى النص مقروء */
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(255,255,255,.16) !important;
}

/* ===== Messages ===== */
.msg{
  margin-top:10px;
  white-space:pre-wrap;
  line-height:1.7;
  color: var(--muted);
}

/* ===== Team / Footer ===== */
.team{
  padding:40px 20px;
  text-align:center;
}

.team-card{
  background:var(--card);
  padding:30px;
  border-radius:20px;
  border:1px solid var(--border);
}

.team-title{
  font-size:20px;
  font-weight:900;
  margin-bottom:20px;
}

.team-img{
  width:100%;
  max-width:600px;
  border-radius:20px;
  object-fit:cover;
  box-shadow:0 15px 40px rgba(0,0,0,.4);
}

.foot{
  text-align:center;
  padding:20px;
  color:var(--muted);
  border-top:1px solid var(--border);
}

/* ===== Responsive ===== */
@media (max-width: 980px){
  .grid{ grid-template-columns:1fr; padding:18px 14px; gap:14px; }

  .top{
    flex-wrap:wrap;
    justify-content:center;
    gap:12px;
    padding:14px 14px;
  }

  .brand{ width:100%; }
  .top-actions{ width:100%; justify-content:center; flex-wrap:wrap; }

  .title{ font-size:24px; }
  .subtitle{ font-size:15px; max-width:100%; }

  /* على الموبايل: خلي الأزرار مريحة للمس */
  button{ width:100%; }
  .inline > *{ min-width: 100%; }
}
/* =========================
   UI Polish (Safe Overrides)
   ========================= */

/* app.js يعتمد على --ok و --bad */
:root{
  --ok:#2cc476;
  --bad:#ff5252;

  --primary:#5b5df0;
  --danger:#ff5252;

  --btn-bg: rgba(255,255,255,.08);
  --btn-bg-2: rgba(255,255,255,.12);
  --btn-border: rgba(255,255,255,.16);
}

/* أزرار <button> */
button{
  background: var(--btn-bg);
  color:#fff;
  border:1px solid var(--btn-border);
}

/* أزرار الواجهة عندك تستخدم هذه الكلاسات */
button.primary{
  background: var(--primary) !important;
  border-color: rgba(91,93,240,.65) !important;
  color:#fff !important;
}
button.secondary{
  background: rgba(255,255,255,.10) !important;
  border-color: rgba(255,255,255,.16) !important;
  color:#fff !important;
}
button.danger{
  background: rgba(255,82,82,.92) !important;
  border-color: rgba(255,82,82,.55) !important;
  color:#fff !important;
}
button.ghost{
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.14) !important;
  color:#fff !important;
}

/* مهم جداً: لا نخلي الزر disabled يخفي النص */
button:disabled{
  opacity:.70;
  cursor:not-allowed;
  background: var(--btn-bg-2) !important;
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(255,255,255,.18) !important;
}

/* أزرار لوحة المدير غالباً <a class="btn"> */
a.btn, .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  background: var(--btn-bg);
  border:1px solid var(--btn-border);
  color:#fff !important;
}

/* ========= Hero image full-width on mobile ========= */
.hero-image img{
  width:100%;
  display:block;
  border-radius:18px;
}

/* على الهاتف: تمتد لأقصى يمين/يسار */
@media (max-width: 700px){
  .hero{ padding:0 !important; }
  .hero-image{ margin:0; }
  .hero-image img{
    width:100vw;
    max-width:100vw;
    border-radius:0;
  }
}
/* ===== Progress Bar ===== */

.progress-wrapper{
  margin-top:20px;
  position:relative;
}

.progress-line{
  position:absolute;
  top:22px;
  right:0;
  left:0;
  height:4px;
  background:rgba(255,255,255,.08);
  border-radius:4px;
}

.progress-fill{
  height:100%;
  width:0%;
  background:linear-gradient(90deg,#5b5df0,#2cc476);
  border-radius:4px;
  transition:width .4s ease;
}

.progress-steps{
  display:flex;
  justify-content:space-between;
  position:relative;
  z-index:2;
}

.step{
  text-align:center;
  flex:1;
}

.circle{
  width:44px;
  height:44px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  border:2px solid rgba(255,255,255,.15);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto;
  font-weight:900;
  transition:all .3s ease;
}

.label{
  margin-top:8px;
  font-size:14px;
  color:var(--muted);
}

/* الحالة المنجزة */
.step.done .circle{
  background:var(--ok);
  border-color:var(--ok);
  color:#fff;
}

/* المرحلة الحالية */
.step.active .circle{
  background:#5b5df0;
  border-color:#5b5df0;
  color:#fff;
  box-shadow:0 0 15px rgba(91,93,240,.5);
}

.step.done .label,
.step.active .label{
  color:#fff;
}
@media (max-width: 900px){
  .stats-grid{
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 560px){
  .stats-grid{
    grid-template-columns: 1fr !important;
  }
}