:root{
  --bg0:#f8fafc;
  --bg1:#eef2ff;
  --card:rgba(255,255,255,.92);
  --card2:rgba(255,255,255,.98);
  --text:#0f172a;
  --muted:#475569;
  --primary:#2563eb;
  --primary2:#06b6d4;
  --success:#16a34a;
  --danger:#dc2626;
  --warning:#d97706;
  --border:rgba(15,23,42,.12);
  --shadow:0 10px 30px rgba(15,23,42,.10);
  --shadow2:0 18px 70px rgba(15,23,42,.12);
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Tajawal",system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans Arabic",sans-serif;
  color:var(--text);
  background:
    radial-gradient(900px 600px at 10% 10%, rgba(124,58,237,.16), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, rgba(6,182,212,.14), transparent 60%),
    radial-gradient(700px 520px at 70% 90%, rgba(217,119,6,.10), transparent 55%),
    linear-gradient(180deg, var(--bg1) 0%, var(--bg0) 100%);
  min-height:100vh;
}

a{color:var(--primary);text-decoration:none}
a:hover{text-decoration:none;opacity:.95}

.container{max-width:1040px;margin:0 auto;padding:18px}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:14px}
.row{display:flex;gap:12px;flex-wrap:wrap;align-items:center}
.muted{color:var(--muted)}
.mono{font-variant-numeric:tabular-nums}

.topbar{
  position:sticky;
  top:0;
  z-index:50;
  background:rgba(248,250,252,.75);
  backdrop-filter:blur(14px);
  border-bottom:1px solid var(--border);
}
.topbar__row{display:flex;gap:12px;align-items:center;justify-content:space-between}
.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:800;
  letter-spacing:.2px;
}
.brand__logo{
  width:34px;height:34px;border-radius:12px;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  display:inline-flex;align-items:center;justify-content:center;
  box-shadow:var(--shadow);
}
.brand__logo svg{width:18px;height:18px;fill:white}

.nav{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.nav a{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;
  border-radius:999px;
  border:1px solid transparent;
  color:var(--text);
  background:transparent;
}
.nav a:hover{
  background:rgba(15,23,42,.04);
  border-color:rgba(15,23,42,.10);
}
.nav__user{
  display:inline-flex;align-items:center;gap:8px;
  padding:8px 12px;border-radius:999px;
  background:rgba(15,23,42,.04);
  border:1px solid rgba(15,23,42,.10);
}

.icon{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.icon--solid{fill:currentColor;stroke:none}

.card{
  grid-column:span 12;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  box-shadow:var(--shadow);
}
.card--soft{
  background:
    linear-gradient(135deg, rgba(124,58,237,.12), rgba(6,182,212,.10)),
    rgba(255,255,255,.88);
  border-color:rgba(15,23,42,.12);
  box-shadow:var(--shadow2);
}
.card h3{margin:0}
.card h4{margin:14px 0 6px 0}
.card__head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.card__title{display:flex;align-items:center;gap:10px;margin:0}
.card__title .icon{opacity:.95}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 14px;
  border:1px solid rgba(15,23,42,.14);
  border-radius:14px;
  background:rgba(255,255,255,.75);
  color:var(--text);
  cursor:pointer;
  transition:transform .08s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{background:rgba(255,255,255,.96);border-color:rgba(15,23,42,.18)}
.btn:active{transform:translateY(1px)}
.btn--primary{
  border-color:transparent;
  background:linear-gradient(135deg, var(--primary), var(--primary2));
  color:white;
  box-shadow:0 12px 30px rgba(37,99,235,.18);
}
.btn.btn--primary:hover{
  background:linear-gradient(135deg, #1d4ed8, #0891b2);
  border-color:transparent;
}
.btn--danger{
  border-color:rgba(220,38,38,.30);
  background:rgba(220,38,38,.10);
}
.btn--ghost{
  background:transparent;
  border-color:rgba(15,23,42,.14);
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(15,23,42,.04);
  color:var(--muted);
  font-size:12px;
}
.badge--success{border-color:rgba(22,163,74,.25);background:rgba(22,163,74,.10);color:#065f46}
.badge--warning{border-color:rgba(217,119,6,.25);background:rgba(217,119,6,.10);color:#92400e}

.stats{display:flex;gap:12px;align-items:stretch;flex-wrap:wrap}
.stat{
  display:flex;align-items:center;gap:10px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  background:rgba(255,255,255,.78);
  box-shadow:0 10px 30px rgba(15,23,42,.08);
  min-width:190px;
}
.stat__icon{
  width:42px;height:42px;border-radius:14px;
  display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg, rgba(37,99,235,.14), rgba(6,182,212,.10));
  border:1px solid rgba(15,23,42,.10);
}
.stat__icon .icon{width:20px;height:20px;color:var(--primary)}
.stat__text{display:flex;align-items:baseline;gap:10px;white-space:nowrap}
.stat__label{color:var(--text);font-size:15px;font-weight:700;line-height:1.1}
.stat__num{font-size:30px;font-weight:900;letter-spacing:.2px;line-height:1;color:var(--primary)}

.list{margin-top:8px;border-top:1px solid rgba(15,23,42,.10)}
.list__item{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:12px 0;border-bottom:1px solid rgba(15,23,42,.10);
}
.list__item a{color:var(--text)}
.list__meta{margin-top:6px;color:var(--muted);font-size:13px}

.alert{
  padding:12px 14px;
  border-radius:16px;
  border:1px solid rgba(15,23,42,.12);
  margin:12px 0;
  background:rgba(255,255,255,.70);
}
.alert--error{border-color:rgba(220,38,38,.28);background:rgba(220,38,38,.08)}
.alert--success{border-color:rgba(22,163,74,.22);background:rgba(22,163,74,.08)}

form{max-width:640px}
label{display:block;margin:10px 0 6px 0;color:var(--muted)}
input,textarea,select{
  width:100%;
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(15,23,42,.14);
  background:rgba(255,255,255,.92);
  color:var(--text);
  outline:none;
}
input:focus,textarea:focus,select:focus{
  border-color:rgba(6,182,212,.55);
  box-shadow:0 0 0 4px rgba(6,182,212,.15);
}
textarea{min-height:120px;resize:vertical}
.actions{margin-top:14px;display:flex;gap:10px;align-items:center;flex-wrap:wrap}

.table{width:100%;border-collapse:separate;border-spacing:0 10px}
.table td,.table th{padding:12px 12px;text-align:right}
.table thead th{color:var(--muted);font-weight:600;font-size:13px}
.table tbody tr{background:rgba(255,255,255,.85);border:1px solid rgba(15,23,42,.10)}
.table tbody tr td:first-child{border-radius:14px 0 0 14px}
.table tbody tr td:last-child{border-radius:0 14px 14px 0}

.footer{padding:30px 0;border-top:1px solid rgba(15,23,42,.10);margin-top:30px}

@media(min-width:820px){
  .card--6{grid-column:span 6}
  .card--4{grid-column:span 4}
}
