:root {
  --bg: #0a0913;
  --panel: rgba(23, 20, 39, 0.72);
  --line: rgba(139, 92, 246, 0.18);
  --fg: #eceaf7;
  --muted: #9b95bb;
  --brand: #8b5cf6;
  --brand-2: #4f46e5;
  --ok: #34d399;
  --err: #fb7185;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "IBM Plex Sans Arabic", system-ui, sans-serif;
  min-height: 100vh;
}

.aurora {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60vw 50vh at 80% -10%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(50vw 40vh at 10% 0%, rgba(79, 70, 229, 0.22), transparent 60%),
    radial-gradient(40vw 40vh at 50% 110%, rgba(139, 92, 246, 0.12), transparent 60%);
}

a { color: inherit; text-decoration: none; }
code { color: #c4b5fd; background: rgba(139,92,246,.12); padding: 1px 6px; border-radius: 6px; }

.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 28px; position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(10, 9, 19, 0.7);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: .2px; }
.brand b { color: #c4b5fd; }
.nav-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.nav-links a:hover { color: #c4b5fd; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 32px 20px 64px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; border: 0; cursor: pointer;
  padding: 10px 18px; border-radius: 12px; font: inherit; font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, .8);
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(139,92,246,.95); }
.btn.ghost { background: transparent; border: 1px solid var(--line); box-shadow: none; color: var(--fg); }
.btn.danger { background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: none; }
.btn.lg { padding: 13px 26px; font-size: 15px; }
.btn.sm { padding: 8px 14px; font-size: 13px; }
.btn.xs { padding: 5px 10px; font-size: 12px; border-radius: 9px; }

.flash {
  max-width: 1120px; margin: 16px auto 0; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px; font-size: 14px;
  background: rgba(52, 211, 153, .12); border: 1px solid rgba(52,211,153,.35); color: #a7f3d0;
}
.flash.err { background: rgba(251,113,133,.12); border-color: rgba(251,113,133,.35); color: #fecdd3; }
.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 36px; align-items: center; padding: 28px 0 48px; }
.hero h1 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.22; margin: 14px 0 14px; }
.hero h1 b { background: linear-gradient(120deg, #c4b5fd, #818cf8); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 16px; line-height: 1.9; max-width: 46ch; }
.pill { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(139,92,246,.1); color: #c4b5fd; }
.pill .ic { fill: #34d399; stroke: #34d399; width: 10px; height: 10px; }
.cta { display: flex; gap: 12px; margin: 26px 0 22px; flex-wrap: wrap; }
.stats { display: flex; gap: 28px; }
.stats b { display: block; font-size: 24px; color: #c4b5fd; }
.stats span { font-size: 13px; color: var(--muted); }

.term { background: #0d0b1a; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 30px 60px -30px #000; }
.term-bar { display: flex; align-items: center; gap: 6px; padding: 10px 14px; background: rgba(139,92,246,.08); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3b3557; }
.term-bar span { margin-inline-start: auto; }
.term pre { margin: 0; padding: 18px; direction: ltr; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px; line-height: 1.9; color: #a7f3d0; white-space: pre-wrap; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card, .panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; backdrop-filter: blur(8px);
}
.card h3 { margin: 12px 0 6px; font-size: 16px; }
.card p { margin: 0; color: var(--muted); font-size: 13.5px; line-height: 1.8; }
.icon { display: inline-flex; padding: 10px; border-radius: 12px; background: rgba(139,92,246,.14); color: #c4b5fd; }
.icon.sm { padding: 7px; }
.icon .ic { width: 20px; height: 20px; }

.panel { margin-top: 24px; }
.panel h2, .panel h3 { margin: 0 0 14px; font-size: 18px; }
.muted { color: var(--muted); font-size: 13.5px; }
.muted a { color: #c4b5fd; }
.notice { background: rgba(139,92,246,.12); border: 1px solid var(--line); padding: 12px 14px; border-radius: 12px; font-size: 13.5px; line-height: 1.8; }
.code { letter-spacing: 6px; font-size: 20px; color: #c4b5fd; }

.price-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.price { text-align: center; border: 1px solid var(--line); border-radius: 14px; padding: 18px 12px; background: rgba(139,92,246,.06); }
.price b { display: block; font-size: 30px; color: #c4b5fd; }
.price span { font-size: 12.5px; color: var(--muted); }
.price .stars { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 10px 0 12px; font-size: 14px; color: #fbbf24; }
.price .stars .ic { stroke: #fbbf24; fill: rgba(251,191,36,.25); }

.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.head-row h2 { font-size: 22px; margin: 0; }
.row-actions { display: flex; gap: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: end; }
.form-grid .full { grid-column: 1 / -1; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; color: var(--muted); }
input, textarea, select {
  background: rgba(10,9,19,.7); border: 1px solid var(--line); color: var(--fg);
  padding: 11px 13px; border-radius: 11px; font: inherit; font-size: 14px; outline: none; width: 100%;
}
input:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(139,92,246,.18); }
textarea { resize: vertical; direction: ltr; text-align: left; font-family: ui-monospace, monospace; font-size: 13px; }
.check { flex-direction: row; align-items: center; gap: 8px; }
.check input { width: 16px; height: 16px; }

.auth { max-width: 430px; margin: 40px auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.auth h2 { margin: 0 0 14px; }
.auth form { display: grid; gap: 14px; margin: 16px 0; }

.apps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.app-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 14px; background: rgba(139,92,246,.06); transition: .15s; }
.app-card:hover { border-color: var(--brand); transform: translateY(-1px); }
.app-card b { display: block; font-size: 15px; }
.app-card small { color: var(--muted); font-size: 12.5px; }
.app-card .icon { margin-inline-start: auto; }

.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 4px rgba(52,211,153,.18); }
.dot.off { background: #4b4468; }

.logs { direction: ltr; text-align: left; background: #0d0b1a; border: 1px solid var(--line); border-radius: 12px; padding: 16px; max-height: 340px; overflow: auto; font-family: ui-monospace, monospace; font-size: 12.5px; line-height: 1.8; color: #a7f3d0; white-space: pre-wrap; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.two .panel { margin-top: 16px; }
.files { list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 6px; font-size: 13px; direction: ltr; text-align: left; }
.files li { display: flex; align-items: center; gap: 8px; color: var(--muted); }

.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: right; }
.tbl th { color: var(--muted); font-weight: 500; }
.tbl input { width: 80px; padding: 5px 8px; }
.inline, .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

.foot { border-top: 1px solid var(--line); padding: 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.foot > div:first-child { display: flex; align-items: center; gap: 10px; }
.foot p { margin: 0; }
.foot-links { display: flex; gap: 16px; flex-wrap: wrap; }
.foot-links a:hover { color: #c4b5fd; }

@media (max-width: 900px) {
  .hero, .grid3, .price-row, .apps, .two, .form-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 10px; }
  .wrap { padding: 20px 14px 48px; }
}


/* ---- الإدارة + الاستجابة للهاتف ---- */
.notice {
  margin: 14px auto; max-width: 1100px; width: calc(100% - 32px);
  padding: 12px 16px; border-radius: var(--radius);
  background: rgba(139, 92, 246, 0.12); border: 1px solid var(--line); font-size: 14px;
}
.notice.err { background: rgba(251, 113, 133, 0.12); border-color: rgba(251, 113, 133, 0.4); }
.notice.ok { background: rgba(52, 211, 153, 0.12); border-color: rgba(52, 211, 153, 0.35); }

.badge {
  display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: var(--err); color: #fff; font-size: 11px; text-align: center;
}

.stat-grid {
  display: grid; gap: 12px; margin-bottom: 18px;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}
.stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; display: flex; flex-direction: column; gap: 6px;
}
.stat small { color: var(--muted); font-size: 12px; }
.stat b { font-size: 20px; }

.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; margin-bottom: 12px; }
.tab {
  flex: 0 0 auto; background: transparent; color: var(--muted); cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px;
  font-family: inherit; font-size: 14px;
}
.tab.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

.search {
  width: 100%; margin-bottom: 12px; padding: 10px 14px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line);
  color: var(--fg); font-family: inherit;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .tbl { min-width: 640px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); color: var(--muted); }
.tag.ok { color: var(--ok); border-color: rgba(52, 211, 153, 0.4); }
.tag.err { color: var(--err); border-color: rgba(251, 113, 133, 0.4); }
.tag.warn { color: #fbbf24; border-color: rgba(251, 191, 36, 0.4); }

.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; margin-bottom: 12px; }
.review-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.review .files.sm { max-height: 160px; overflow: auto; font-size: 13px; }
.mini { background: rgba(0, 0, 0, 0.35); padding: 8px 12px; border-radius: 10px; font-size: 12px; overflow: auto; }
.acts.wrap { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.inline.grow { display: flex; gap: 6px; flex: 1 1 220px; }
.inline.grow input { flex: 1; min-width: 0; }
.files a { color: inherit; text-decoration: none; }
.files a:hover { color: var(--brand); }

.burger { display: none; background: transparent; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 22px; height: 2px; margin: 4px 0; background: var(--fg); border-radius: 2px; }

@media (max-width: 820px) {
  .burger { display: block; }
  .nav-links {
    display: none; width: 100%; flex-direction: column; align-items: stretch;
    gap: 6px; padding-top: 10px;
  }
  .nav-links.open { display: flex; }
  .nav { flex-wrap: wrap; }
  .two { grid-template-columns: 1fr; }
  .head-row { flex-direction: column; align-items: flex-start; gap: 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .acts { display: flex; flex-wrap: wrap; gap: 6px; }
  .stat b { font-size: 18px; }
}
