
:root{
  --bg:#0b1020;
  --panel:#111831;
  --panel2:#0f1730;
  --card:#121b36;
  --text:#e8ecff;
  --muted:#a7b0d6;
  --border:rgba(255,255,255,.10);
  --primary:#7c5cff;
  --primary2:#5ce1ff;
  --danger:#ff4d6d;
  --ok:#3ddc97;
  --warn:#ffcc66;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius:18px;
  --radius2:24px;
  --max:1200px;
  --font: "Cairo","Inter",system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
}
*{box-sizing:border-box}
html{direction:rtl}
body{
  margin:0;
  font-family:var(--font);
  background:
    radial-gradient(1000px 500px at 20% -10%, rgba(124,92,255,.35), transparent 55%),
    radial-gradient(900px 600px at 110% 10%, rgba(92,225,255,.20), transparent 55%),
    linear-gradient(180deg, #060a14 0%, #050816 45%, #060a14 100%);
  color:var(--text);
  min-height:100vh;
}
a{color:inherit; text-decoration:none}
.container{max-width:var(--max); margin:0 auto; padding:20px}
.topbar{
  position:sticky; top:0; z-index:10;
  backdrop-filter: blur(14px);
  background: rgba(6,10,20,.65);
  border-bottom:1px solid var(--border);
}
.topbar .row{display:flex; align-items:center; justify-content:space-between; gap:14px; padding:14px 20px; max-width:var(--max); margin:0 auto;}
.brand{display:flex; align-items:center; gap:12px; cursor:pointer}
.logo{
  width:38px;height:38px;border-radius:14px;
  background: linear-gradient(135deg, rgba(124,92,255,1) 0%, rgba(92,225,255,1) 100%);
  box-shadow: 0 10px 25px rgba(124,92,255,.25);
}
.brand h1{margin:0; font-size:18px; letter-spacing:.2px}
.pill{
  display:inline-flex; align-items:center; gap:8px;
  padding:10px 12px;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  border-radius:999px;
}
.nav{display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end}
.btn{
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
  color:var(--text);
  padding:10px 14px;
  border-radius:14px;
  cursor:pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
  display:inline-flex; align-items:center; gap:8px;
  font-weight:700;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.10); border-color:rgba(255,255,255,.18)}
.btn.primary{
  border:0;
  background: linear-gradient(135deg, rgba(124,92,255,1) 0%, rgba(92,225,255,1) 140%);
  color:#071021;
}
.btn.danger{border:0;background: linear-gradient(135deg, rgba(255,77,109,1), rgba(255,169,96,1)); color:#1b0a0e}
.btn.ghost{background:transparent}
.grid{display:grid; gap:14px}
.hero{
  padding:18px 0 10px;
}
.hero .banner{
  border:1px solid var(--border);
  border-radius:var(--radius2);
  padding:18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  box-shadow: var(--shadow);
  display:flex; align-items:flex-start; justify-content:space-between; gap:14px; flex-wrap:wrap;
}
.hero h2{margin:0 0 4px; font-size:26px}
.hero p{margin:0; color:var(--muted); max-width:720px; line-height:1.6}
.card{
  border:1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border-radius:var(--radius);
  box-shadow: var(--shadow);
}
.card .hd{padding:14px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:10px}
.card .hd h3{margin:0; font-size:16px}
.card .bd{padding:16px}
.muted{color:var(--muted)}
.row{display:flex; gap:12px; flex-wrap:wrap; align-items:center}
.row.nowrap{flex-wrap:nowrap}
.field{display:flex; flex-direction:column; gap:8px; min-width:240px; flex:1}
label{font-size:12px; color:var(--muted)}
input, select, textarea{
  width:100%;
  padding:12px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.22);
  color:var(--text);
  outline:none;
}
textarea{min-height:92px; resize:vertical}
input:focus, select:focus, textarea:focus{
  border-color: rgba(92,225,255,.45);
  box-shadow: 0 0 0 4px rgba(92,225,255,.10);
}
.badge{
  display:inline-flex; align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border:1px solid var(--border);
  background: rgba(255,255,255,.06);
}
.badge.ok{background: rgba(61,220,151,.10); border-color: rgba(61,220,151,.25)}
.badge.warn{background: rgba(255,204,102,.12); border-color: rgba(255,204,102,.25)}
.badge.danger{background: rgba(255,77,109,.12); border-color: rgba(255,77,109,.25)}
.table{
  width:100%;
  border-collapse:collapse;
  overflow:hidden;
  border-radius:16px;
  border:1px solid var(--border);
}
.table th, .table td{
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  text-align:right;
  vertical-align:top;
}
.table th{font-size:12px; color:var(--muted); background: rgba(255,255,255,.04)}
.table tr:hover td{background: rgba(255,255,255,.03)}
.products{
  display:grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap:14px;
}
@media(min-width:720px){
  .products{grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media(min-width:1020px){
  .products{grid-template-columns: repeat(3, minmax(0, 1fr));}
}
.pcard{padding:14px}
.pimg{
  width:100%; height:160px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(0,0,0,.25);
  display:flex; align-items:center; justify-content:center;
  overflow:hidden;
}
.pimg img{width:100%; height:100%; object-fit:cover; display:block}
.pmeta{margin-top:10px}
.pmeta h4{margin:0 0 2px; font-size:15px}
.pmeta .cat{font-size:12px; color:var(--muted)}
.pfoot{display:flex; justify-content:space-between; align-items:center; gap:10px; margin-top:12px}
.price{font-weight:900}
.fab{
  position:fixed; left:18px; bottom:18px; z-index:20;
  border-radius:999px;
  box-shadow: var(--shadow);
}
.drawer{
  position:fixed; inset:0; z-index:30;
  background: rgba(0,0,0,.55);
  display:none;
}
.drawer.open{display:block}
.drawer .panel{
  position:absolute; left:0; top:0; height:100%;
  width:min(520px, 100%);
  background: rgba(10,14,30,.92);
  border-right:1px solid var(--border);
  backdrop-filter: blur(16px);
  padding:16px;
  overflow:auto;
}
.hr{height:1px; background: var(--border); margin:14px 0}
.kv{display:flex; justify-content:space-between; gap:10px; font-weight:800}
.small{font-size:12px; color:var(--muted)}
.toast{
  position:fixed; right:18px; bottom:18px; z-index:40;
  padding:12px 14px;
  border-radius:16px;
  border:1px solid var(--border);
  background: rgba(17,24,49,.92);
  box-shadow: var(--shadow);
  display:none;
  max-width: min(520px, calc(100vw - 36px));
}
.toast.show{display:block}
.modal{
  position:fixed; inset:0; z-index:35;
  background: rgba(0,0,0,.55);
  display:none;
}
.modal.open{display:flex; align-items:center; justify-content:center; padding:18px}
.modal .box{
  width:min(900px, 100%);
  max-height: min(90vh, 780px);
  overflow:auto;
  padding:16px;
  border-radius:22px;
  border:1px solid var(--border);
  background: rgba(10,14,30,.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}
.footer{
  padding:30px 0 24px;
  color: var(--muted);
  font-size:12px;
  text-align:center;
}
