
:root{
  --bg:#0b1220;
  --panel:#0f1a2f;
  --card:#0e1730;
  --card2:#0c152b;
  --text:#e5e7eb;
  --muted:#9ca3af;
  --line:rgba(255,255,255,.08);
  --green:#22c55e;
  --green2:#16a34a;
  --warn:#f59e0b;
  --bad:#ef4444;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --r:16px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif;
  background: radial-gradient(1200px 500px at 50% -10%, rgba(34,197,94,.25), transparent 60%),
              radial-gradient(900px 420px at 10% 10%, rgba(56,189,248,.14), transparent 55%),
              var(--bg);
  color:var(--text);
}

.top{
  padding: 18px 16px 10px;
  max-width: 980px;
  margin: 0 auto;
}
.brand{display:flex; align-items:center; justify-content:space-between; gap:12px}
.logo{
  font-weight:900;
  letter-spacing: .5px;
  font-size: 22px;
}
.logo span{color:var(--green)}
.tag{display:flex; flex-direction:column; gap:2px; text-align:left; direction:ltr}
.tag .en{font-weight:700}
.tag .ar{color:var(--muted); font-size:12px; direction:rtl; text-align:right}
.sub{
  margin-top:10px;
  color:var(--muted);
  font-size: 12.5px;
  display:flex; gap:10px; align-items:center; flex-wrap:wrap
}
.sep{opacity:.5}

.wrap{
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px 40px;
  display:flex;
  flex-direction:column;
  gap:16px;
}

.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 16px;
}

h2{
  margin:0 0 12px 0;
  font-size: 16px;
}
.muted{color:var(--muted)}

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

.field{
  display:flex;
  flex-direction:column;
  gap: 6px;
  font-size: 13px;
}
.field input{
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(2,6,23,.55);
  color: var(--text);
  padding: 12px 12px;
  font-size: 16px;
  outline:none;
}
.field input:focus{
  border-color: rgba(34,197,94,.55);
  box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

.actions{
  margin-top: 12px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}
.btn{
  border-radius: 12px;
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  background: rgba(255,255,255,.04);
}
.btn.primary{
  background: linear-gradient(180deg, rgba(34,197,94,.95), rgba(22,163,74,.92));
  border-color: rgba(34,197,94,.35);
  color: #052e16;
  font-weight: 800;
}
.btn.ghost{background: transparent}
.btn:active{transform: translateY(1px)}

.note{
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.kpis{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.kpi{
  background: rgba(2,6,23,.45);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
.kpi-title{font-size:13px; color: #cbd5e1}
.kpi-value{
  margin-top: 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .2px;
}
.kpi-sub{margin-top: 4px; font-size:12px}

.score{
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(2,6,23,.35);
}
.score-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-size: 13px;
}
.score-num{font-weight:900; direction:ltr}
.bar{
  height: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
  margin-top: 10px;
  border: 1px solid rgba(255,255,255,.06);
}
.bar-fill{
  height:100%;
  width:0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--bad), var(--warn), var(--green));
  transition: width .35s ease;
}
.bar-legend{
  margin-top: 8px;
  display:flex;
  justify-content:space-between;
  font-size: 11px;
}

.rec{
  margin-top: 12px;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(34,197,94,.18);
  background: rgba(34,197,94,.10);
  line-height: 1.7;
  font-size: 13px;
}

.details{
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(2,6,23,.28);
}
.details summary{
  cursor:pointer;
  color:#cbd5e1;
  font-weight:700;
}
.detail-grid{
  margin-top: 10px;
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.detail{
  background: rgba(2,6,23,.35);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px;
}
.detail div:last-child{
  margin-top: 6px;
  font-weight: 900;
  font-size: 16px;
  direction:ltr;
  text-align:right;
}

.foot{
  text-align:center;
  font-size: 12px;
  padding-top: 10px;
}

/* Larger screens */
@media (min-width: 820px){
  .grid{grid-template-columns: 1fr 1fr}
  .kpis{grid-template-columns: 1fr 1fr}
  .detail-grid{grid-template-columns: 1fr 1fr 1fr}
}
