:root{
  --bg1:#0b1220;
  --bg2:#0f1b35;
  --card: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.14);
  --text: #eaf0ff;
  --muted: rgba(234,240,255,.70);
  --primary:#6d5efc;
  --danger:#ef4444;
  --ok:#22c55e;
  --shadow: 0 18px 60px rgba(0,0,0,.35);
  --radius: 18px;
}
*{ box-sizing:border-box; }

body{
  margin:0;
  min-height:100vh;
  font-family:"Cairo", Tahoma, Arial, sans-serif;
  color:var(--text);
  background:
    radial-gradient(1200px 600px at 80% 10%, rgba(109,94,252,.35), transparent 55%),
    radial-gradient(900px 500px at 20% 90%, rgba(34,197,94,.18), transparent 55%),
    linear-gradient(160deg, var(--bg1), var(--bg2));
  padding:18px;
}

a{ color:inherit; text-decoration:none; }
a:hover{ text-decoration:underline; }

.topbar{
  max-width:1200px;
  margin:0 auto 14px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.brand{ display:flex; align-items:center; gap:10px; font-weight:900; }
.logo{
  width:38px;height:38px;border-radius:14px;
  background: linear-gradient(135deg, var(--primary), #9b8cff);
  display:grid;place-items:center;
  color:#fff;font-weight:900;
  box-shadow: 0 12px 30px rgba(109,94,252,.25);
}
.brand small{ display:block; margin-top:-2px; color:var(--muted); font-weight:700; }

.tabs{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
  align-items:center;
}
.tab{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(234,240,255,.92);
  padding:9px 12px;
  border-radius: 14px;
  cursor:pointer;
  font-weight:900;
  font-size:13px;
  transition:.15s ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.tab:hover{ background: rgba(255,255,255,.10); }
.tab.active{
  background: linear-gradient(135deg, rgba(109,94,252,.55), rgba(155,140,255,.18));
  border-color: rgba(109,94,252,.7);
  box-shadow: 0 0 0 5px rgba(109,94,252,.14);
}
.tab.danger{
  background: rgba(239,68,68,.14);
  border:1px solid rgba(239,68,68,.25);
}

.wrap{ max-width:1200px; margin:0 auto; display:grid; grid-template-columns: 1fr; gap:14px; }
.grid2{ display:grid; grid-template-columns: 420px 1fr; gap:14px; align-items:start; }

.card{
  border:1px solid var(--stroke);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card), rgba(255,255,255,.05));
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  padding:16px;
}

h2{ margin:0 0 10px; font-size:16px; font-weight:900; }
.desc{ margin:-6px 0 14px; color:var(--muted); font-size:13px; line-height:1.7; }

.field{ display:flex; flex-direction:column; gap:7px; margin-bottom:12px; }
label{ font-size:12px; color:var(--muted); font-weight:900; }

.control{ position:relative; }
input, select{
  width:100%;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 44px 12px 12px;
  outline:none;
  font-size:14px;
  transition:.2s ease;
  direction: rtl;
  text-align: right;
  unicode-bidi: plaintext;
}
select{ padding-right:44px; }
input:focus, select:focus{
  border-color: rgba(109,94,252,.75);
  box-shadow: 0 0 0 5px rgba(109,94,252,.18);
  background: rgba(255,255,255,.08);
}
input::placeholder{ color: rgba(234,240,255,.45); }

.icon{
  position:absolute;
  right:12px;
  top:50%;
  transform:translateY(-50%);
  opacity:.9;
  pointer-events:none;
}

.hint{ font-size:12px; color: rgba(234,240,255,.55); line-height:1.6; }
.hint.error{ color: var(--danger); font-weight:900; }
.hint.ok{ color: rgba(34,197,94,.95); font-weight:900; }

.btnRow{ display:flex; gap:10px; margin-top:6px; flex-wrap:wrap; }
.btn{
  border:none;
  cursor:pointer;
  border-radius: 14px;
  padding: 12px 14px;
  font-weight:900;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), #9b8cff);
  box-shadow: 0 18px 45px rgba(109,94,252,.22);
  transition: transform .15s ease, filter .15s ease;
  flex:1;
  min-width: 160px;
}
.btn:hover{ transform: translateY(-1px); filter: brightness(1.05); }
.btn.secondary{
  background: rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.14);
  color: var(--text);
  box-shadow:none;
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  font-size:12px;
  font-weight:900;
  white-space:nowrap;
}

table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  overflow:hidden;
  border-radius: 14px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
}
th, td{
  padding:12px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-size:14px;
}
th{
  text-align:right;
  color: rgba(234,240,255,.85);
  font-size:12px;
  background: rgba(255,255,255,.05);
}
tr:last-child td{ border-bottom:none; }

.del{
  border:none;
  cursor:pointer;
  border-radius: 12px;
  padding:8px 10px;
  font-weight:900;
  background: rgba(239,68,68,.14);
  border:1px solid rgba(239,68,68,.25);
  color: rgba(255,255,255,.95);
}

.empty{
  padding:14px;
  color: var(--muted);
  text-align:center;
  border:1px dashed rgba(255,255,255,.18);
  border-radius:14px;
  background: rgba(255,255,255,.04);
  margin-top:10px;
  line-height:1.8;
}

@media (max-width: 980px){
  .grid2{ grid-template-columns: 1fr; }
}

.icon-btn{
  border:none;
  background:transparent;
  cursor:pointer;
  padding:6px;
  border-radius:10px;
  color:#ef4444;
}
.icon-btn:hover{
  background: rgba(239,68,68,.12);
}
