@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&family=Noto+Naskh+Arabic:wght@500;700&display=swap');

:root {
  --bg: #070b14;
  --bg2: #0d1422;
  --card: #121a2b;
  --line: #223049;
  --text: #f1f5f9;
  --muted: #93a4bb;
  --green: #22c55e;
  --green2: #16a34a;
  --blue: #38bdf8;
  --red: #ef4444;
  --gold: #fbbf24;
  --purple: #a78bfa;
  --shadow: 0 20px 50px rgba(0,0,0,.45);
  --radius: 18px;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text);
  font-family: "IBM Plex Sans", "Noto Naskh Arabic", sans-serif; }
body.rtl { direction: rtl; }
a { color: var(--blue); text-decoration: none; }
.muted { color: var(--muted); }
.landing {
  min-height: 100vh;
  background:
    radial-gradient(1000px 500px at 10% -10%, rgba(34,197,94,.18), transparent 50%),
    radial-gradient(800px 400px at 100% 0%, rgba(56,189,248,.12), transparent 45%),
    var(--bg);
}

.hero { max-width: 1080px; margin: 0 auto; padding: 48px 24px 80px; }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .04em; font-size: 20px; color: #fff; }
.brand-mark, .logo-mark {
  width: 42px; height: 42px; border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  display: grid; place-items: center; font-weight: 800; color: #04110a;
  box-shadow: 0 8px 24px rgba(34,197,94,.35);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; margin-top: 56px; }
h1 { font-size: clamp(32px, 5vw, 56px); line-height: 1.1; margin: 0 0 16px; }
.lead { font-size: 18px; color: var(--muted); max-width: 540px; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin: 28px 0; }
.btn {
  border: 1px solid var(--line); background: #0f172a; color: #fff;
  padding: 12px 18px; border-radius: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn.primary { background: linear-gradient(180deg, #34d399, #16a34a); border-color: transparent; color: #052e16; }
.btn.danger { background: #7f1d1d; border-color: #991b1b; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.phone {
  background: linear-gradient(180deg, #1e293b, #0b1220);
  border: 1px solid var(--line); border-radius: 36px; padding: 18px;
  box-shadow: var(--shadow); min-height: 520px;
}
.phone-screen { background: #070b14; border-radius: 26px; padding: 18px; height: 100%; }
.ptt-demo {
  width: 168px; height: 168px; margin: 32px auto 0; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #4ade80, #15803d);
  box-shadow: 0 0 0 10px rgba(34,197,94,.15), 0 20px 40px rgba(34,197,94,.35);
  display: grid; place-items: center; font-weight: 800; color: #052e16; font-size: 18px;
}
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.chip { background: #132033; border: 1px solid var(--line); padding: 6px 10px; border-radius: 999px; font-size: 12px; color: var(--muted); }

.install-card, .auth-card, .panel-shell, .app-shell {
  max-width: 520px; margin: 48px auto; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow);
}
.form-grid { display: grid; gap: 12px; }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line);
  background: #0b1220; color: #fff; font: inherit;
}
.banner { padding: 12px 14px; border-radius: 12px; background: #1e293b; margin: 12px 0; }
.banner.ok { background: #052e16; color: #bbf7d0; }
.banner.err { background: #450a0a; color: #fecaca; }
.banner.warn { background: #422006; color: #fde68a; }

.app-shell { max-width: 980px; margin: 0 auto; min-height: 100vh; border: 0; background: transparent; padding: 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.tabs { display: flex; gap: 8px; }
.tab { padding: 8px 12px; border-radius: 10px; background: #121a2b; border: 1px solid var(--line); cursor: pointer; color: var(--muted); }
.tab.on { color: #fff; border-color: var(--green); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; cursor: pointer;
}
.card h3 { margin: 0 0 6px; }
.online-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; margin-right: 6px; box-shadow: 0 0 8px var(--green); }
.member { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #1a2436; }
.av {
  width: 40px; height: 40px; border-radius: 12px; background: #1e293b;
  display: grid; place-items: center; font-weight: 700;
}
.av.staff { outline: 2px solid var(--gold); }
.badge { font-size: 11px; padding: 2px 8px; border-radius: 999px; background: #1e293b; color: var(--muted); }
.badge.mod { color: #fde68a; background: #422006; }
.badge.admin { color: #ddd6fe; background: #2e1065; }

.room-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; min-height: calc(100vh - 90px); }
.side { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px; overflow: auto; }
.stage { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; }
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; flex: 1; }
.videos video, .tile {
  width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #0b1220; border-radius: 12px; border: 1px solid var(--line);
}
.tile.talk { border-color: var(--green); box-shadow: 0 0 0 2px rgba(34,197,94,.35); }
.ptt-wrap { display: grid; place-items: center; padding: 18px 0 8px; }
.ptt {
  width: 168px; height: 168px; border-radius: 50%; border: 0; cursor: pointer;
  background: radial-gradient(circle at 40% 32%, #86efac, #16a34a 62%, #14532d);
  color: #052e16; font-weight: 800; font-size: 18px; letter-spacing: .04em;
  box-shadow: 0 12px 30px rgba(22,163,74,.35);
  user-select: none; touch-action: none;
}
.ptt:active, .ptt.live {
  background: radial-gradient(circle at 40% 32%, #bbf7d0, #22c55e 55%, #166534);
  box-shadow: 0 0 0 12px rgba(34,197,94,.18), 0 18px 40px rgba(34,197,94,.5);
  transform: scale(1.03);
}
.ptt.wait { background: radial-gradient(circle at 40% 32%, #cbd5e1, #475569); color: #0f172a; }
.ptt-hint { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.hidden { display: none !important; }

.panel-shell { max-width: 1180px; }
.panel-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.stat { background: #0b1220; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.stat b { display: block; font-size: 26px; margin-top: 4px; }

@media (max-width: 860px) {
  .hero-grid, .room-layout { grid-template-columns: 1fr; }
  .side { order: 2; max-height: 240px; }
}
