
:root{
  --bg:#f6f7fb;
  --card:#ffffff;
  --primary:#2fb6a3;
  --primary2:#1b8c7f;
  --text:#0f172a;
  --muted:#64748b;
  --danger:#ef4444;
  --warn:#f59e0b;
  --ok:#16a34a;
  --shadow: 0 20px 60px rgba(15,23,42,.12);
  --radius:18px;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Noto Kufi Arabic", Arial;
  background: var(--bg);
  color: var(--text);
}

.wrap{
  width:min(980px, 92vw);
  margin: 40px auto;
}

.card{
  display:grid;
  grid-template-columns: 1fr 1fr;
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  min-height: 420px;
}

.card.single{
  grid-template-columns: 1fr;
  padding: 28px;
  min-height: unset;
}

.side{padding: 34px}
.side-form h1{margin:0 0 18px}
.side-cta{
  background: linear-gradient(135deg, #33c1ad, #1b8c7f);
  color:white;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap: 10px;
}

.side-cta h2{margin:0;font-size:34px}
.side-cta p{margin:0;color: rgba(255,255,255,.9);line-height:1.8}

.form{display:grid;gap:10px}
label{font-size:13px;color:var(--muted)}
input,select{
  width:100%;
  padding:12px 14px;
  border:1px solid #e5e7eb;
  border-radius:12px;
  outline:none;
  background:#fff;
}
input:focus,select:focus{border-color: rgba(47,182,163,.6); box-shadow: 0 0 0 4px rgba(47,182,163,.12);}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  background:#e5e7eb;
  color:#111827;
  cursor:pointer;
  text-decoration:none;
  font-weight:600;
}
.btn.primary{background: var(--primary); color:white;}
.btn.primary:hover{background: var(--primary2);}
.btn.ghost{background: transparent; border-color: rgba(255,255,255,.6); color:white;}
.btn.ghost:hover{background: rgba(255,255,255,.12);}
.btn.small{padding:8px 12px; font-size: 12px; border-radius: 12px;}
.btn.danger{background: var(--danger); color:white;}

.hint{margin-top:14px;color:var(--muted);font-size:13px}
.hint a{color: var(--primary2); text-decoration:none}

.alert{
  background: #fee2e2;
  color: #7f1d1d;
  padding: 10px 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #fecaca;
}

.topbar{
  background: #0f172a;
  color:white;
  padding: 14px 18px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.brand{font-weight:800}
.user{margin-inline-end: 12px}

.grid{display:grid; grid-template-columns: 1fr 1fr; gap:12px; margin-top:12px}
.grid .col{display:grid; gap:8px}
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:18px; margin-top:18px}
.panel{
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  margin-top: 18px;
}
.panel h2{margin:0 0 12px}

.table{display:grid; gap:10px; margin-top:12px}
.trow{
  display:grid;
  grid-template-columns: 1.2fr 2fr 1fr;
  gap: 10px;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #fff;
}
.trow.thead{background: #f1f5f9; font-weight:800}

.badge{
  display:inline-flex;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.badge.ok{background:#dcfce7;color:#14532d}
.badge.bad{background:#fee2e2;color:#7f1d1d}
.badge.warn{background:#ffedd5;color:#7c2d12}

.toast{
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 14px;
  border: 1px solid #e5e7eb;
  background: #fff;
  box-shadow: var(--shadow);
}
.toast.ok{border-color:#bbf7d0}
.toast.bad{border-color:#fecaca}

.small{font-size:12px;color:var(--muted)}
.modal{
  position:fixed;
  inset:0;
  background: rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 18px;
}
.modal.hidden{display:none}
.modal-box{
  width:min(820px, 96vw);
  background:#fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.modal-head{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom: 10px;
}
.x{
  width: 40px;height:40px;border-radius: 12px;border:1px solid #e5e7eb;background:#fff;
  cursor:pointer;font-size:20px;
}
.mini{display:flex; gap:8px; align-items:center; 
