/* ============================================================
   Orixen VC — Dark / Soft-Purple Design System
   ============================================================ */
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-Light.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-Medium.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-SemiBold.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Vazirmatn; src: url('../assets/fonts/Vazirmatn-Black.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --bg: #0B0B12;
  --bg-2: #101018;
  --card: rgba(255, 255, 255, 0.035);
  --card-solid: #15151F;
  --stroke: rgba(255, 255, 255, 0.07);
  --stroke-2: rgba(255, 255, 255, 0.12);
  --text: #ECECF4;
  --text-2: #9C9CB2;
  --text-3: #6B6B82;
  --purple: #8B5CF6;
  --purple-2: #A78BFA;
  --purple-soft: rgba(139, 92, 246, 0.16);
  --purple-glow: rgba(139, 92, 246, 0.45);
  --green: #34D399;
  --red: #F87171;
  --amber: #FBBF24;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --font: Vazirmatn, "Segoe UI", Tahoma, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  overscroll-behavior: none;
  touch-action: manipulation;
}
input, textarea { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
img { -webkit-user-drag: none; }
.hidden { display: none !important; }

/* ---------------- background decor ---------------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
  radial-gradient(1100px 500px at 85% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(139, 92, 246, 0.07), transparent 55%),
  var(--bg); }
.orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55; }
.orb-1 { width: 420px; height: 420px; background: rgba(124, 88, 237, 0.20); top: -140px; left: -110px; }
.orb-2 { width: 380px; height: 380px; background: rgba(88, 70, 200, 0.16); bottom: -150px; right: -100px; }
.orb-3 { width: 260px; height: 260px; background: rgba(139, 92, 246, 0.12); top: 42%; left: 58%; }

/* ---------------- views ---------------- */
.view { display: none; min-height: 100vh; min-height: 100dvh; }
.view.active { display: flex; flex-direction: column; }

/* ============================================================
   AUTH
   ============================================================ */
#view-auth {
  align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(620px 340px at 50% -6%, rgba(124, 79, 239, 0.15), transparent 62%),
    radial-gradient(520px 330px at 50% 112%, rgba(124, 79, 239, 0.09), transparent 60%);
}
.auth-card {
  width: 100%; max-width: 430px;
  background: linear-gradient(180deg, rgba(23, 21, 40, 0.72), rgba(13, 12, 22, 0.84));
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 28px;
  padding: 36px 28px 28px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(22px);
  position: relative;
  animation: auth-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes auth-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.auth-logo-wrap { display: flex; justify-content: center; position: relative; }
.auth-logo-glow {
  position: absolute; width: 170px; height: 170px; top: 50%; left: 50%;
  transform: translate(-50%, -48%);
  background: radial-gradient(circle, rgba(139, 92, 246, 0.32), transparent 65%);
  filter: blur(12px); pointer-events: none;
}
.auth-logo {
  width: 104px; height: 104px; border-radius: 26px; position: relative;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 14px 44px rgba(139, 92, 246, 0.38);
}
.brand { text-align: center; font-size: 30px; font-weight: 900; letter-spacing: 1.5px;
  margin-top: 18px; direction: ltr; }
.brand-vc {
  background: linear-gradient(180deg, #B69CFF, #8B5CF6);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-sm { font-weight: 800; font-size: 19px; letter-spacing: 0.5px; direction: ltr; }
.auth-sub { text-align: center; color: var(--text-3); margin: 8px 0 24px; font-size: 13.5px; letter-spacing: .2px; }

.tabs { display: flex; background: rgba(255,255,255,0.045); border: 1px solid var(--stroke);
  border-radius: 15px; padding: 5px; gap: 6px; margin-bottom: 24px; }
.tab { flex: 1; padding: 12px 0; border: 0; border-radius: 11px; background: transparent;
  color: var(--text-2); font-family: var(--font); font-size: 15px; font-weight: 700; cursor: pointer;
  transition: all .2s ease; }
.tab:hover { color: var(--text); }
.tab.active {
  background: linear-gradient(180deg, rgba(144, 97, 249, 0.88), rgba(124, 79, 239, 0.88));
  color: #fff;
  box-shadow: 0 6px 18px rgba(124, 79, 239, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 13px; font-weight: 700; color: var(--text-2); letter-spacing: .1px; }
.field label small { color: var(--text-3); font-weight: 400; font-size: 11.5px; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; color: rgba(158, 136, 224, 0.8); pointer-events: none;
}
.input-wrap input { padding-right: 45px; }
input {
  width: 100%; padding: 14px 15px; border-radius: 14px;
  background: rgba(255,255,255,0.045); border: 1px solid var(--stroke);
  color: var(--text); font-family: var(--font); font-size: 16px; outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
input:focus { border-color: rgba(139,92,246,0.65); box-shadow: 0 0 0 3px rgba(139,92,246,0.18); background: rgba(255,255,255,0.06); }
input::placeholder { color: var(--text-3); }
input:disabled { opacity: .55; }

.auth-footer { margin-top: 18px; text-align: center; }
.link-btn { background: none; border: 0; color: var(--text-2); cursor: pointer; font-family: var(--font);
  font-size: 13px; padding: 6px 10px; border-radius: 8px; transition: .15s; }
.link-btn:hover { color: var(--purple-2); background: var(--purple-soft); }

/* ---------------- buttons ---------------- */
.btn-primary {
  background: linear-gradient(180deg, #9061F9, #7C4FEF);
  color: #fff; border: 0; border-radius: 14px; padding: 14px 22px;
  font-family: var(--font); font-size: 15.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 8px 26px rgba(124, 79, 239, 0.38), inset 0 1px 0 rgba(255,255,255,0.22);
  transition: transform .14s ease, box-shadow .14s ease, filter .14s;
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 12px 32px rgba(124,79,239,0.5); }
.btn-primary:active { transform: translateY(1px) scale(0.99); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent; color: var(--text-2); border: 1px solid var(--stroke-2);
  border-radius: 14px; padding: 13px 22px; font-family: var(--font); font-size: 15px; font-weight: 600;
  cursor: pointer; transition: .15s;
}
.btn-ghost:hover { background: rgba(255,255,255,0.05); color: var(--text); }
.btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--purple-soft); color: var(--purple-2);
  border: 1px solid rgba(139,92,246,0.35); border-radius: 13px;
  padding: 11px 18px; font-family: var(--font); font-size: 14px; font-weight: 700; cursor: pointer;
  transition: .15s;
}
.btn-secondary:hover { background: rgba(139,92,246,0.26); }
.btn-mini { background: var(--purple-soft); color: var(--purple-2); border: 1px solid rgba(139,92,246,0.3);
  border-radius: 9px; padding: 6px 12px; font-family: var(--font); font-size: 12.5px; font-weight: 700; cursor: pointer; }
.btn-ic { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--stroke);
  background: var(--card); color: var(--text-2); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: .15s;
}
.icon-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.icon-btn svg { width: 21px; height: 21px; fill: currentColor; stroke: none; }
.icon-btn.danger-ghost { color: var(--red); }
.icon-btn.danger-ghost:hover { background: rgba(248,113,113,0.12); }
.icon-btn.danger-ghost svg { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 22px; gap: 14px;
  border-bottom: 1px solid var(--stroke);
  background: rgba(11, 11, 18, 0.72); backdrop-filter: blur(16px);
  position: sticky; top: 0; z-index: 40;
}
.topbar-right { display: flex; align-items: center; gap: 11px; }
.topbar-logo { width: 38px; height: 38px; border-radius: 11px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 4px 18px rgba(139,92,246,0.3); }
.topbar-left { display: flex; align-items: center; gap: 10px; }

.user-chip {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: 14px;
  padding: 6px 13px 6px 6px; cursor: pointer; color: var(--text);
  font-family: var(--font); font-size: 14px; font-weight: 600; transition: .15s;
}
.user-chip:hover { background: rgba(255,255,255,0.07); }

.avatar-xs { width: 31px; height: 31px; border-radius: 9px; object-fit: cover; background: var(--bg-2); }
.avatar-sm { width: 42px; height: 42px; border-radius: 12px; object-fit: cover; background: var(--bg-2); }
.avatar-lg { width: 86px; height: 86px; border-radius: 22px; object-fit: cover; background: var(--bg-2); }

.badge { font-size: 10.5px; font-weight: 800; padding: 3px 9px; border-radius: 99px; letter-spacing: .2px; }
.badge.owner { background: rgba(251, 191, 36, 0.14); color: var(--amber); border: 1px solid rgba(251,191,36,0.3); }
.badge.admin { background: var(--purple-soft); color: var(--purple-2); border: 1px solid rgba(139,92,246,0.32); }

/* menu popup */
.menu-pop {
  position: fixed; top: 72px; left: 22px; z-index: 90;
  background: var(--card-solid); border: 1px solid var(--stroke-2); border-radius: 15px;
  padding: 7px; min-width: 210px; box-shadow: var(--shadow);
}
.menu-item {
  display: block; width: 100%; text-align: right; background: none; border: 0;
  color: var(--text); font-family: var(--font); font-size: 14.5px; font-weight: 500;
  padding: 11px 13px; border-radius: 10px; cursor: pointer; transition: .13s;
}
.menu-item:hover { background: rgba(255,255,255,0.07); }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: rgba(248,113,113,0.1); }

/* ============================================================
   HOME
   ============================================================ */
.home-main { width: 100%; max-width: 880px; margin: 0 auto; padding: 26px 20px 120px; }
.home-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.section-title { font-size: 21px; font-weight: 800; }

.room-list { display: flex; flex-direction: column; gap: 14px; }
.room-card {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: var(--radius);
  padding: 18px 20px; cursor: pointer; transition: .18s ease; position: relative; overflow: hidden;
}
.room-card:hover { background: rgba(255,255,255,0.06); border-color: rgba(139,92,246,0.4);
  box-shadow: 0 10px 34px rgba(139,92,246,0.16); transform: translateY(-2px); }
.room-card.public { border-color: rgba(139,92,246,0.3);
  background: linear-gradient(135deg, rgba(139,92,246,0.10), rgba(255,255,255,0.03) 55%); }
.room-ic {
  width: 56px; height: 56px; border-radius: 16px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 25px;
  background: var(--purple-soft); border: 1px solid rgba(139,92,246,0.28);
}
.room-info { flex: 1; min-width: 0; }
.room-name { font-size: 16.5px; font-weight: 800; margin-bottom: 3px; }
.room-meta { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.room-join {
  flex-shrink: 0; background: var(--purple-soft); color: var(--purple-2);
  border: 1px solid rgba(139,92,246,0.35); border-radius: 12px; padding: 11px 20px;
  font-family: var(--font); font-weight: 700; font-size: 14px;
}
.avatar-stack { display: inline-flex; direction: ltr; }
.avatar-stack img, .avatar-stack .avatar-more {
  width: 27px; height: 27px; border-radius: 9px; object-fit: cover;
  border: 2px solid var(--bg); margin-left: -8px; background: var(--bg-2);
}
.avatar-stack .avatar-more {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--purple-soft); color: var(--purple-2); font-size: 10.5px; font-weight: 800;
}
.code-chip {
  display: inline-flex; align-items: center; gap: 6px; direction: ltr;
  background: rgba(255,255,255,0.06); border: 1px dashed var(--stroke-2);
  color: var(--purple-2); border-radius: 9px; padding: 3px 10px; font-size: 12.5px; font-weight: 800; letter-spacing: 1px;
}
.room-del { flex-shrink: 0; background: none; border: 1px solid var(--stroke); color: var(--text-3);
  border-radius: 10px; width: 40px; height: 40px; cursor: pointer; transition: .15s; font-size: 15px; }
.room-del:hover { color: var(--red); border-color: rgba(248,113,113,0.4); background: rgba(248,113,113,0.08); }

.hint-card {
  display: flex; gap: 14px; align-items: center; margin-top: 26px;
  background: var(--card); border: 1px dashed var(--stroke-2); border-radius: var(--radius);
  padding: 18px 20px; color: var(--text-2); font-size: 14px; line-height: 2;
}
.hint-card b { color: var(--text); }
.hint-ic { width: 44px; height: 44px; border-radius: 13px; background: var(--purple-soft);
  color: var(--purple-2); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex-shrink: 0; }

.fab {
  position: fixed; bottom: 28px; left: 28px; width: 62px; height: 62px; border-radius: 21px;
  background: linear-gradient(180deg, #9061F9, #7C4FEF); border: 0; cursor: pointer;
  color: #fff; z-index: 60;
  box-shadow: 0 14px 38px rgba(124, 79, 239, 0.5), inset 0 1px 0 rgba(255,255,255,0.25);
  transition: transform .15s ease;
}
.fab:hover { transform: translateY(-3px) scale(1.03); }
.fab:active { transform: scale(0.96); }
.fab svg { width: 27px; height: 27px; fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; }

/* ============================================================
   ROOM
   ============================================================ */
.room-top { justify-content: space-between; }
.room-title { font-size: 18px; font-weight: 800; }
.conn-chip {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 700;
  color: var(--green); background: rgba(52, 211, 153, 0.10); border: 1px solid rgba(52,211,153,0.25);
  border-radius: 99px; padding: 7px 14px;
}
.conn-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); animation: pulse-dot 1.8s infinite; }
.conn-chip.warn { color: var(--amber); background: rgba(251,191,36,0.1); border-color: rgba(251,191,36,0.28); }
.conn-chip.warn .dot { background: var(--amber); }
@keyframes pulse-dot { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.room-body {
  flex: 1; width: 100%; max-width: 1080px; margin: 0 auto;
  padding: 22px 20px 130px; display: flex; flex-direction: column; gap: 20px;
}

.stage {
  position: relative; border-radius: 20px; overflow: hidden;
  border: 1px solid rgba(139, 92, 246, 0.45);
  box-shadow: 0 0 0 1px rgba(139,92,246,0.18), 0 22px 60px rgba(139, 92, 246, 0.22);
  background: #000; aspect-ratio: 16 / 9;
}
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
.stage-label {
  position: absolute; bottom: 0; right: 0; left: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: linear-gradient(transparent, rgba(0,0,0,0.75));
  font-size: 13.5px; font-weight: 700;
}
.chip-live { display: inline-flex; align-items: center; gap: 7px; background: rgba(248,113,113,0.16);
  border: 1px solid rgba(248,113,113,0.35); color: #FCA5A5; border-radius: 99px; padding: 5px 12px; font-size: 12px; }
.dot.red { background: var(--red); width: 8px; height: 8px; border-radius: 50%; animation: pulse-dot 1.4s infinite; }

.member-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 16px;
}
.member-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--stroke); border-radius: 20px;
  padding: 20px 12px 16px; cursor: pointer; transition: .16s ease; position: relative;
}
.member-card:hover { background: rgba(255,255,255,0.06); border-color: var(--stroke-2); }
.member-card.pinned-card { border-color: rgba(251,191,36,0.4); }

.avatar-ring {
  width: 78px; height: 78px; border-radius: 50%; padding: 3px;
  background: rgba(255,255,255,0.10);
  transition: box-shadow .25s ease, background .25s ease;
}
.avatar-ring img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: var(--bg-2); display: block; }

/* ---- the purple speaking glow ---- */
.member-card.speaking .avatar-ring {
  background: conic-gradient(from 180deg, #A78BFA, #7C4FEF, #C4B5FD, #7C4FEF, #A78BFA);
  animation: ring-spin 2.6s linear infinite;
  box-shadow:
    0 0 22px 4px rgba(139, 92, 246, 0.55),
    0 0 52px 10px rgba(139, 92, 246, 0.35),
    0 0 90px 22px rgba(139, 92, 246, 0.18);
}
.member-card.speaking { border-color: rgba(139, 92, 246, 0.45); }
@keyframes ring-spin { to { transform: rotate(360deg); } }
.member-card.speaking .avatar-ring img { animation: ring-spin 2.6s linear reverse infinite; }

.member-name { font-size: 13.5px; font-weight: 700; max-width: 120px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.member-badges { display: flex; gap: 5px; align-items: center; min-height: 22px; flex-wrap: wrap; justify-content: center; }
.mini-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 7px; font-size: 11px; font-weight: 800;
}
.mini-badge.crown { background: rgba(251,191,36,0.15); color: var(--amber); }
.mini-badge.shield { background: var(--purple-soft); color: var(--purple-2); }
.mini-badge.pin { background: rgba(255,255,255,0.08); color: var(--text-2); }
.mini-badge.muted { background: rgba(248,113,113,0.14); color: var(--red); }
.mini-badge.screen { background: rgba(52,211,153,0.13); color: var(--green); }
.mini-badge.me { background: rgba(255,255,255,0.08); color: var(--text-3); font-size: 9.5px; width: auto; padding: 0 8px; }

/* ---------------- controls ---------------- */
.controls {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; gap: 14px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(11,11,18,0.92) 40%);
}
.ctrl-btn {
  width: 62px; height: 62px; border-radius: 21px; cursor: pointer;
  background: var(--card-solid); border: 1px solid var(--stroke-2); color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  transition: .15s ease; box-shadow: 0 10px 28px rgba(0,0,0,0.4);
}
.ctrl-btn:hover { transform: translateY(-2px); border-color: rgba(139,92,246,0.5); }
.ctrl-btn:active { transform: scale(0.95); }
.ctrl-btn svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round; }
.ctrl-btn.active { background: var(--purple-soft); border-color: rgba(139,92,246,0.5); color: var(--purple-2);
  box-shadow: 0 10px 30px rgba(139,92,246,0.3); }
.ctrl-btn.muted-ic { background: rgba(248,113,113,0.14); border-color: rgba(248,113,113,0.4); color: var(--red); }
.ctrl-btn.danger { background: linear-gradient(180deg, #EF6A6A, #DC4E4E); border: 0; color: #fff;
  box-shadow: 0 12px 30px rgba(220, 78, 78, 0.4); }

/* ============================================================
   MODALS
   ============================================================ */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 5, 10, 0.66); backdrop-filter: blur(7px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in .18s ease;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: 100%; max-width: 420px;
  background: var(--card-solid); border: 1px solid var(--stroke-2); border-radius: 24px;
  padding: 28px 24px 22px; box-shadow: var(--shadow);
  animation: pop-in .22s cubic-bezier(.2, .9, .3, 1.2);
}
.modal-wide { max-width: 720px; }
@keyframes pop-in { from { opacity: 0; transform: translateY(18px) scale(0.96); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 19px; font-weight: 800; text-align: center; margin-bottom: 8px; }
.modal-sub { color: var(--text-2); font-size: 14px; text-align: center; margin-bottom: 18px; line-height: 2; }
.modal-sub b { color: var(--purple-2); }
.modal-ic { font-size: 42px; text-align: center; margin-bottom: 10px; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.modal-actions .btn-primary:first-child { margin-top: 4px; }

.text-input { text-align: right; }
.code-input {
  text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 12px;
  padding: 17px 12px; direction: ltr;
}
.code-display {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--purple-soft); border: 1px dashed rgba(139,92,246,0.45);
  border-radius: 14px; padding: 14px; margin-top: 14px;
}
.code-label { color: var(--text-2); font-size: 13.5px; }
.code-value { color: var(--purple-2); font-size: 21px; letter-spacing: 5px; direction: ltr; }
.hint-small { color: var(--text-3); font-size: 12px; line-height: 2; margin-top: 10px; }

.profile-row { display: flex; gap: 18px; align-items: center; }
.avatar-upload { position: relative; }
.avatar-cam {
  position: absolute; bottom: -6px; left: -6px; width: 36px; height: 36px; border-radius: 12px;
  background: var(--purple); border: 2px solid var(--card-solid); cursor: pointer; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
.profile-fields { flex: 1; display: flex; flex-direction: column; gap: 12px; }

.member-head { display: flex; gap: 15px; align-items: center; margin-bottom: 6px; }
.member-head h3 { text-align: right; margin-bottom: 2px; }
.member-head .modal-sub { text-align: right; margin-bottom: 0; }

.action-list { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.action-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: right;
  background: rgba(255,255,255,0.045); border: 1px solid var(--stroke); border-radius: 13px;
  color: var(--text); font-family: var(--font); font-size: 14.5px; font-weight: 600;
  padding: 13px 15px; cursor: pointer; transition: .14s;
}
.action-item:hover { background: rgba(139,92,246,0.14); border-color: rgba(139,92,246,0.4); }
.action-item.danger { color: var(--red); border-color: rgba(248,113,113,0.22); }
.action-item.danger:hover { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.45); }
.action-item .action-ic { font-size: 17px; width: 24px; text-align: center; }

.ban-list { display: flex; flex-direction: column; gap: 9px; max-height: 320px; overflow-y: auto; }
.ban-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--stroke); border-radius: 13px; padding: 11px 14px;
}
.ban-row .btn-mini { color: var(--green); border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.1); }
.empty-note { color: var(--text-3); text-align: center; padding: 22px 0; font-size: 14px; }

.source-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 13px; max-height: 52vh; overflow-y: auto; direction: ltr;
}
.source-item {
  border: 2px solid var(--stroke); border-radius: 14px; overflow: hidden; cursor: pointer;
  background: rgba(255,255,255,0.03); transition: .15s; padding: 0;
}
.source-item:hover { border-color: rgba(139,92,246,0.55); transform: translateY(-2px); }
.source-item img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; background: #111; }
.source-item span { display: block; padding: 8px 10px; font-size: 12px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   TOASTS
   ============================================================ */
#toasts {
  position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 9px; z-index: 200; width: min(420px, calc(100vw - 40px));
}
.toast {
  background: var(--card-solid); border: 1px solid var(--stroke-2); color: var(--text);
  border-radius: 14px; padding: 13px 18px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow); animation: toast-in .25s ease; text-align: center;
}
.toast.ok { border-color: rgba(52,211,153,0.4); }
.toast.err { border-color: rgba(248,113,113,0.45); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ============================================================
   SCROLLBARS
   ============================================================ */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.14); border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 620px) {
  .auth-card { padding: 26px 20px 20px; }
  .brand { font-size: 25px; }
  .topbar { padding: 13px 15px; }
  .brand-sm { display: none; }
  .home-main { padding: 18px 15px 120px; }
  .room-card { padding: 15px; gap: 12px; }
  .room-ic { width: 48px; height: 48px; border-radius: 14px; font-size: 21px; }
  .room-join { padding: 10px 15px; }
  .member-grid { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 12px; }
  .avatar-ring { width: 66px; height: 66px; }
  .fab { bottom: 22px; left: 20px; width: 57px; height: 57px; border-radius: 19px; }
  .menu-pop { left: 15px; right: 15px; min-width: 0; }
  .profile-row { flex-direction: column; }
}

/* ---------------- inline SVG icons ---------------- */
.modal-ic svg { width: 46px; height: 46px; fill: none; stroke: var(--purple-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.avatar-cam svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.room-ic svg { width: 26px; height: 26px; fill: none; stroke: var(--purple-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.room-del svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.mini-badge svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.action-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
