:root{
  --bgA:#070a12;
  --bgB:#0b1430;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --line: rgba(255,255,255,.10);
  --text:#f3f4f6;
  --muted:#a1a1aa;

  --p1:#7c3aed;
  --p2:#22c55e;
  --warn:#f59e0b;
  --danger:#ef4444;

  --shadow: 0 18px 60px rgba(0,0,0,.40);
  --radius: 20px;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: Vazirmatn, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 18% 10%, rgba(124,58,237,.22) 0%, transparent 55%),
    radial-gradient(1200px 800px at 85% 35%, rgba(34,197,94,.16) 0%, transparent 58%),
    linear-gradient(180deg, var(--bgA), var(--bgB));
}

a{color:inherit; text-decoration:none}
.container{width:min(980px, calc(100% - 28px)); margin:0 auto}

.topbar{
  position:sticky; top:0; z-index:30;
  background: rgba(7,10,18,.55);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
.topbar-inner{display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 0}
.brand{display:flex; align-items:center; gap:10px; font-weight:900; letter-spacing:-.2px}
.brand-dot{
  width:12px; height:12px; border-radius:999px;
  background: linear-gradient(135deg, var(--p1), var(--p2));
  box-shadow: 0 0 0 5px rgba(124,58,237,.14);
}
.nav{display:flex; gap:10px; align-items:center}
.nav a{
  color:var(--muted);
  padding:8px 10px;
  border-radius:14px;
}
.nav a:hover{color:var(--text); background: rgba(255,255,255,.06)}

.hero{padding:18px 0 38px}
.hero-card{
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}

.hero h1{margin:6px 0 8px; font-size:22px}
.muted{color:var(--muted)}
.small{font-size:13px}

.badge-row{display:flex; gap:8px; flex-wrap:wrap; margin-top:10px}
.badge{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  color: var(--muted);
}

.searchbox{
  margin-top:14px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px;
  background: rgba(0,0,0,.22);
  border:1px solid rgba(255,255,255,.12);
  border-radius: 18px;
}
.searchbox input{
  width:100%;
  border:0;
  outline:none;
  background:transparent;
  color:var(--text);
  font-size:15px;
}
.kbd{
  display:none; /* mobile-first */
  font-size:12px;
  color:var(--muted);
  padding:6px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}

.status{margin-top:10px; min-height:22px; font-size:13px}

.results{margin-top:12px; display:grid; gap:10px}
.result{
  padding:14px;
  background: rgba(255,255,255,.04);
  border:1px solid rgba(255,255,255,.10);
  border-radius: 18px;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.result:hover{
  transform: translateY(-1px);
  border-color: rgba(124,58,237,.40);
  background: rgba(255,255,255,.05);
}
.result-title{font-weight:900; margin:0 0 6px; font-size:15px; line-height:1.7}
.result-snippet{color:var(--muted); font-size:13px; line-height:1.9}

.pills{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap}
.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background: rgba(124,58,237,.14);
  border:1px solid rgba(124,58,237,.26);
  color: #e9ddff;
}

/* skeleton */
.skel{position:relative; overflow:hidden}
.skel::after{
  content:"";
  position:absolute; inset:0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.08), transparent);
  animation: shimmer 1.05s infinite;
}
@keyframes shimmer{100%{transform: translateX(100%)}}

.tips{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}
.tip{
  background: rgba(255,255,255,.03);
  border:1px solid rgba(255,255,255,.08);
  border-radius:18px;
  padding:12px;
}
.tip-title{font-weight:900; margin-bottom:6px; font-size:14px}

/* cards / admin */
.card{
  margin:16px 0 46px;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.04));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:16px;
}
.card.narrow{max-width:560px; margin-left:auto; margin-right:auto}

.card-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-bottom:10px; margin-bottom:12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.actions{display:flex; gap:10px; flex-wrap:wrap}

.btn{
  display:inline-flex; align-items:center; justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.10);
  background: linear-gradient(135deg, rgba(124,58,237,.92), rgba(34,197,94,.34));
  color: white;
  font-weight:900;
  cursor:pointer;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}
.btn:hover{filter: brightness(1.05)}
.btn.ghost{
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.14);
  color: var(--text);
  box-shadow:none;
}
.btn.tiny{padding:8px 10px; border-radius:14px; font-size:13px}
.btn.danger{
  background: rgba(239,68,68,.15);
  border-color: rgba(239,68,68,.35);
  color: #ffd0d0;
  box-shadow:none;
}

.form{display:grid; gap:10px}
label{color:var(--muted); font-size:13px}
input, textarea{
  width:100%;
  border-radius:16px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding:12px 12px;
  outline:none;
  font-size:14px;
}
textarea{resize:vertical}
input:focus, textarea:focus{border-color: rgba(124,58,237,.45)}

.alert{
  padding:12px 12px;
  border-radius:16px;
  margin:10px 0 14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.alert.ok{border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.10)}
.alert.danger{border-color: rgba(239,68,68,.35); background: rgba(239,68,68,.10)}

.search-admin{display:flex; gap:10px; align-items:center; margin: 10px 0 14px}
.search-admin input{flex:1}

.table{display:grid; gap:8px}
.row{
  display:grid;
  grid-template-columns: 1fr;
  gap:8px;
  align-items:start;
  padding:12px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
  border-radius:18px;
}
.row.head{display:none}
.right{text-align:right; display:flex; gap:8px; justify-content:flex-start; flex-wrap:wrap}
.link{color:#e9ddff}
.link:hover{text-decoration:underline}
.title-col{font-weight:900; font-size:15px}

.content{line-height:2.05; color:#f8fafc}
.meta{margin-top:14px; display:flex; gap:10px; align-items:center; flex-wrap:wrap}
.tag{
  font-size:12px; padding:6px 10px; border-radius:999px;
  background: rgba(34,197,94,.12);
  border:1px solid rgba(34,197,94,.26);
  color:#d1fae5;
}

.footer{
  border-top:1px solid rgba(255,255,255,.08);
  background: rgba(7,10,18,.45);
  backdrop-filter: blur(12px);
  padding:16px 0;
}
.footer-inner{display:flex; justify-content:space-between; gap:12px; flex-wrap:wrap}
code{background:rgba(255,255,255,.08); padding:2px 6px; border-radius:10px}

@media (min-width: 820px){
  .hero{padding:26px 0 60px}
  .hero-card{padding:22px}
  .hero h1{font-size:28px}
  .kbd{display:inline-flex}
  .tips{grid-template-columns: repeat(2, minmax(0,1fr))}
  .row{grid-template-columns: 2fr 1.2fr 1fr 220px; align-items:center}
  .row.head{display:grid; color:var(--muted); font-size:13px; font-weight:800; background: rgba(255,255,255,.06)}
  .right{text-align:left; justify-content:flex-end}
}


.select{width:100%; border-radius:16px; border:1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.18); color: var(--text); padding:12px 12px; outline:none; font-size:14px}
.filters{margin-top:12px}
.accordion{margin-top:10px}
.answer{margin-top:10px; padding-top:10px; border-top:1px dashed rgba(255,255,255,.12)}
.answer img{max-width:100%; height:auto; border-radius:14px; border:1px solid rgba(255,255,255,.10)}
.answer pre{background: rgba(0,0,0,.25); padding:12px; border-radius:14px; overflow:auto; border:1px solid rgba(255,255,255,.10)}
.answer code{background: rgba(255,255,255,.08); padding:2px 6px; border-radius:10px}
.helpful-row{display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap}
.helpful-actions{display:flex; gap:10px}
