:root {
  --gold: #d4a94a;
  --gold-soft: #f0d387;
  --bg: #07101e;
  --bg-deep: #040a14;
  --surface: rgba(15, 32, 54, 0.82);
  --surface-strong: rgba(18, 39, 64, 0.95);
  --surface-soft: rgba(20, 43, 70, 0.58);
  --line: rgba(124, 174, 224, 0.2);
  --line-bright: rgba(39, 211, 226, 0.62);
  --cyan: #27d3e2;
  --cyan-soft: #7cecf4;
  --blue: #2aa5ff;
  --violet: #8d6cff;
  --text: #f4f8ff;
  --muted: #9caec5;
  --danger: #d54b5c;
  --success: #26d3aa;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius: 24px;
  --font: Vazirmatn, IRANSans, Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

button,
input { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

button { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.glass {
  background: linear-gradient(145deg, rgba(31, 56, 89, 0.76), rgba(10, 24, 43, 0.88));
  border: 1px solid rgba(147, 186, 230, 0.33);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(22px);
}

.glass-soft {
  background: rgba(14, 34, 58, 0.55);
  border: 1px solid rgba(72, 137, 199, 0.22);
  backdrop-filter: blur(12px);
}

.login-page {
  display: grid;
  place-items: center;
  position: relative;
  background:
    linear-gradient(rgba(11, 26, 46, 0.18) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 26, 46, 0.18) 1px, transparent 1px),
    radial-gradient(circle at 22% 55%, rgba(38, 129, 255, 0.15), transparent 31%),
    radial-gradient(circle at 82% 27%, rgba(141, 108, 255, 0.13), transparent 27%),
    linear-gradient(145deg, #06101f, #091932 56%, #060f1e);
  background-size: 64px 64px, 64px 64px, auto, auto, auto;
}

.login-page::before {
  content: '';
  position: fixed;
  inset: 11% 5% 9%;
  pointer-events: none;
  border: 1px solid rgba(39, 211, 226, 0.07);
  transform: perspective(900px) rotateX(66deg) translateY(40%);
  background: repeating-linear-gradient(90deg, transparent 0 90px, rgba(39, 211, 226, 0.07) 91px 92px);
}

.ambient {
  position: fixed;
  width: 520px;
  height: 520px;
  border-radius: 999px;
  filter: blur(110px);
  opacity: 0.14;
  pointer-events: none;
}

.ambient-one { background: var(--cyan); bottom: -260px; left: 9%; }
.ambient-two { background: var(--violet); top: -260px; right: 13%; }

.login-shell {
  width: min(1320px, calc(100% - 64px));
  min-height: 720px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(48px, 7vw, 110px);
  z-index: 2;
  padding: 50px 0 80px;
}

.brand-stage {
  direction: rtl;
  min-height: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.language-switch {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  direction: ltr;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  background: rgba(5, 18, 35, 0.65);
}

.language-switch button {
  min-width: 76px;
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.language-switch button.active {
  border: 1px solid var(--cyan);
  background: rgba(39, 211, 226, 0.12);
}

.language-switch button:disabled { opacity: 0.55; cursor: not-allowed; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 30px;
}

.brand-logo {
  width: 126px;
  height: 154px;
  filter: drop-shadow(0 0 25px rgba(39, 211, 226, 0.28));
}

.brand-lockup h1 {
  margin: 0 0 2px;
  font-size: clamp(54px, 6vw, 86px);
  letter-spacing: -4px;
}

.brand-en {
  direction: ltr;
  text-align: right;
  margin: 0;
  color: var(--cyan);
  letter-spacing: 10px;
  font-size: 19px;
}

.privacy-note {
  width: fit-content;
  max-width: 520px;
  margin-top: 70px;
  padding: 20px 22px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.shield-icon {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 26px;
  border: 3px solid var(--cyan);
  border-radius: 45% 45% 55% 55%;
  clip-path: polygon(50% 0, 100% 18%, 90% 76%, 50% 100%, 10% 76%, 0 18%);
}

.privacy-note strong { font-size: 20px; }
.privacy-note p { margin: 5px 0 0; color: var(--muted); line-height: 1.8; }

.login-card {
  border-radius: 32px;
  padding: clamp(34px, 4.7vw, 66px);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  top: -120px;
  left: -80px;
  background: var(--violet);
  opacity: 0.12;
  filter: blur(45px);
}

.card-kicker {
  direction: ltr;
  color: var(--cyan);
  letter-spacing: 5px;
  font-size: 11px;
  margin-bottom: 15px;
}

.login-card h2 { margin: 0; font-size: clamp(31px, 4vw, 48px); letter-spacing: -1.5px; }
.card-subtitle { color: var(--muted); line-height: 1.9; margin: 14px 0 32px; }

.alert {
  color: #ffd7dc;
  background: rgba(213, 75, 92, 0.14);
  border: 1px solid rgba(213, 75, 92, 0.4);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 18px;
}

.login-form > label,
.role-picker legend { display: block; margin-bottom: 9px; color: #d9e6f7; }

.code-input-wrap {
  height: 68px;
  display: flex;
  align-items: center;
  direction: ltr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(3, 12, 24, 0.54);
  padding: 0 18px;
  transition: 0.2s ease;
}

.code-input-wrap:focus-within {
  border-color: var(--cyan);
  box-shadow: 0 0 0 4px rgba(39, 211, 226, 0.1);
}

.code-input-wrap span { color: var(--cyan); font-size: 22px; }
.code-input-wrap input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; color: white; text-align: center; letter-spacing: 5px; font-size: 18px; text-transform: uppercase; }
.code-input-wrap input::placeholder { color: #60758f; }

.role-picker {
  border: 0;
  margin: 25px 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.role-picker legend { grid-column: 1 / -1; }
.role-picker label { cursor: pointer; }
.role-picker input { position: absolute; opacity: 0; }
.role-picker label span { display: block; border: 1px solid var(--line); background: rgba(5, 17, 32, 0.4); border-radius: 14px; padding: 14px 16px; transition: 0.2s ease; }
.role-picker label b { display: block; }
.role-picker label small { display: block; color: var(--muted); margin-top: 4px; }
.role-picker input:checked + span { border-color: var(--cyan); background: rgba(39, 211, 226, 0.1); box-shadow: inset 0 0 0 1px rgba(39, 211, 226, 0.18); }
.role-picker input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.primary-button {
  width: 100%;
  border: 0;
  border-radius: 15px;
  padding: 18px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  color: #03121a;
  font-weight: 900;
  font-size: 18px;
  cursor: pointer;
  background: linear-gradient(100deg, var(--cyan), #51ddec 55%, #44c4eb);
  box-shadow: 0 16px 35px rgba(39, 211, 226, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.primary-button:hover { transform: translateY(-2px); box-shadow: 0 20px 40px rgba(39, 211, 226, 0.3); }
.primary-button:active { transform: translateY(0); }
.primary-button span { font-size: 24px; }

.text-button { display: block; margin: 15px auto 0; border: 0; background: none; color: var(--cyan-soft); cursor: pointer; padding: 6px 10px; }
.text-button:hover { color: white; }

.secure-row {
  margin-top: 34px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.secure-row i { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.site-footer { position: fixed; bottom: 22px; z-index: 3; color: #71859f; font-size: 12px; }

.toast {
  position: fixed;
  z-index: 100;
  bottom: 26px;
  left: 50%;
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  background: #102640;
  color: white;
  border: 1px solid var(--line-bright);
  border-radius: 999px;
  padding: 12px 22px;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Room workspace */
.room-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 68% 15%, rgba(42, 165, 255, 0.1), transparent 30%),
    linear-gradient(140deg, #06101e, #09182d 58%, #06101d);
}

.room-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  direction: ltr;
  transition: grid-template-columns 0.25s ease;
}

.room-sidebar {
  direction: rtl;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border-right: 1px solid var(--line);
  background: rgba(5, 15, 29, 0.86);
  backdrop-filter: blur(18px);
  padding: 18px 13px;
  overflow: hidden;
}

.sidebar-brand { text-decoration: none; color: white; display: flex; flex-direction: column; align-items: center; margin-bottom: 24px; white-space: nowrap; }
.sidebar-brand img { width: 46px; height: 58px; }
.sidebar-brand strong { font-size: 14px; margin-top: 3px; }
.sidebar-brand small { direction: ltr; color: var(--cyan); letter-spacing: 3px; font-size: 7px; }
.room-sidebar nav { display: flex; flex-direction: column; gap: 12px; }

.nav-item {
  min-height: 70px;
  border: 1px solid transparent;
  border-radius: 17px;
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  cursor: pointer;
}

.nav-item span { font-size: 22px; color: #8297ff; }
.nav-item.active { border-color: rgba(39, 211, 226, 0.34); background: rgba(39, 211, 226, 0.08); color: white; }
.nav-item.active span { color: var(--cyan); }
.sidebar-collapse { margin-top: auto; width: 46px; height: 42px; align-self: center; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); cursor: pointer; font-size: 25px; }

.room-main { min-width: 0; direction: rtl; padding: 0 24px 20px; }
.room-header { min-height: 90px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); }
.room-heading { text-align: center; }
.room-heading p { margin: 0 0 2px; color: var(--cyan); font-size: 11px; }
.room-heading h1 { margin: 0; font-size: 22px; }
.room-statuses { display: flex; gap: 10px; justify-self: start; }
.status-pill { border: 1px solid var(--line); background: rgba(9, 25, 44, 0.7); padding: 8px 13px; border-radius: 999px; display: flex; align-items: center; gap: 7px; font-size: 12px; color: #c8d7e9; }
.status-pill.privacy b { color: var(--cyan); }
.status-pill.recording i { width: 8px; height: 8px; border-radius: 50%; background: #d95767; }
.room-meta { justify-self: end; direction: ltr; display: flex; align-items: center; gap: 12px; }
.room-code { border: 1px solid var(--line); border-radius: 12px; background: rgba(6, 20, 36, 0.75); display: flex; align-items: center; padding: 7px 10px; gap: 10px; cursor: pointer; }
.room-code span { letter-spacing: 1.2px; }
.room-code b { color: var(--cyan); font-size: 10px; }
.session-timer { min-width: 57px; color: var(--muted); font-variant-numeric: tabular-nums; }

.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 336px; direction: ltr; gap: 18px; padding-top: 18px; }
.stage-column { min-width: 0; display: flex; flex-direction: column; gap: 15px; }
.participant-strip { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 10px; direction: ltr; }
.participant-tile { position: relative; height: 112px; border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(145deg, rgba(25, 47, 75, 0.9), rgba(12, 27, 47, 0.96)); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.participant-tile.is-self { border-color: var(--cyan); box-shadow: inset 0 0 0 1px rgba(39, 211, 226, 0.2); }
.participant-avatar { width: 48px; height: 48px; border-radius: 50%; background: rgba(154, 175, 202, 0.12); position: relative; display: grid; place-items: center; }
.participant-avatar::before { content: ''; width: 14px; height: 14px; border-radius: 50%; background: #8d9cb0; position: absolute; top: 10px; }
.participant-avatar span { width: 28px; height: 13px; border-radius: 14px 14px 8px 8px; background: #8d9cb0; position: absolute; bottom: 8px; }
.participant-tile strong { font-size: 12px; direction: ltr; }
.moderator-badge { position: absolute; top: 8px; left: 8px; font-size: 9px; color: var(--cyan); background: rgba(39, 211, 226, 0.1); border: 1px solid rgba(39, 211, 226, 0.4); border-radius: 999px; padding: 3px 7px; }
.tile-mic { position: absolute; right: 9px; bottom: 8px; font-size: 8px; }
.tile-mic.on { color: var(--success); }
.tile-mic.off { color: var(--danger); }

.presentation-card {
  min-height: 520px;
  flex: 1;
  direction: rtl;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 19px;
  overflow: hidden;
  background:
    radial-gradient(circle at 69% 44%, rgba(84, 93, 255, 0.18), transparent 32%),
    radial-gradient(circle at 22% 82%, rgba(39, 211, 226, 0.12), transparent 28%),
    linear-gradient(145deg, #071327, #0a1a35 55%, #071326);
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  align-items: center;
  padding: 42px 62px;
}

.presentation-card::before { content: ''; position: absolute; inset: auto 0 0; height: 34%; background: radial-gradient(ellipse at bottom, rgba(39, 211, 226, 0.18), transparent 62%); pointer-events: none; }
.presentation-copy { z-index: 1; }
.presentation-kicker { display: inline-block; color: var(--cyan); border: 1px solid rgba(39, 211, 226, 0.32); border-radius: 999px; padding: 7px 13px; font-size: 12px; }
.presentation-copy h2 { margin: 20px 0 8px; font-size: clamp(42px, 5vw, 72px); letter-spacing: -4px; }
.presentation-copy p { margin: 0; color: #b5c6dc; font-size: 18px; }
.slide-progress { width: 190px; height: 3px; background: rgba(255,255,255,.11); margin-top: 30px; overflow: hidden; }
.slide-progress span { display: block; width: 48%; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--violet)); }

.pdca-visual { width: min(380px, 30vw); aspect-ratio: 1; position: relative; margin: auto; direction: ltr; }
.pdca-orbit { position: absolute; border-radius: 50%; inset: 12%; border: 20px solid transparent; transform: rotate(45deg); }
.orbit-one { border-top-color: var(--violet); border-right-color: var(--blue); border-bottom-color: var(--cyan); border-left-color: var(--violet); filter: drop-shadow(0 0 9px rgba(42, 165, 255, 0.35)); }
.orbit-two { inset: 20%; border-width: 2px; border-color: rgba(149, 177, 255, 0.35); }
.pdca-center { position: absolute; inset: 36%; border-radius: 50%; display: grid; place-items: center; border: 2px solid #6f90ff; background: #0b1a36; font-weight: 900; font-size: 24px; box-shadow: 0 0 30px rgba(91, 112, 255, 0.3); }
.pdca-item { position: absolute; font-weight: 900; font-size: 18px; text-align: center; }
.pdca-item small { display: block; font-family: var(--font); font-size: 9px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.pdca-item.plan { right: 0; top: 45%; }
.pdca-item.do { right: 43%; bottom: 0; }
.pdca-item.check { left: 0; top: 45%; }
.pdca-item.act { left: 42%; top: 0; }
.zoom-control { position: absolute; left: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: center; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: rgba(4, 17, 32, 0.75); }
.zoom-control button { border: 0; background: transparent; width: 38px; height: 34px; cursor: pointer; font-size: 18px; }
.zoom-control span { font-size: 10px; color: var(--muted); }

.control-bar { min-height: 78px; direction: ltr; border: 1px solid var(--line); border-radius: 18px; background: rgba(9, 25, 44, 0.76); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; }
.control { min-width: 78px; height: 60px; border: 1px solid transparent; border-radius: 12px; background: transparent; color: var(--muted); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.control span { font-size: 20px; line-height: 1; }
.control small { font-size: 10px; }
.control:hover { background: rgba(255,255,255,.04); color: white; }
.control.active { color: var(--cyan); background: rgba(39, 211, 226, 0.07); border-color: rgba(39, 211, 226, 0.17); }
.leave-button { margin-left: 10px; height: 54px; min-width: 108px; border-radius: 13px; background: linear-gradient(135deg, #ca3d50, #ae3144); text-decoration: none; color: white; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; }
.leave-button b { font-size: 20px; }

.interaction-panel { min-width: 0; direction: rtl; border: 1px solid var(--line); border-radius: 19px; background: rgba(8, 23, 41, 0.78); display: flex; flex-direction: column; overflow: hidden; transition: 0.2s ease; }
.interaction-panel.is-hidden { display: none; }
.workspace:has(.interaction-panel.is-hidden) { grid-template-columns: minmax(0, 1fr); }
.panel-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 10px; gap: 8px; border-bottom: 1px solid var(--line); }
.panel-tabs button { border: 1px solid transparent; background: transparent; border-radius: 11px; padding: 10px 8px; cursor: pointer; color: var(--muted); }
.panel-tabs button span { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-right: 4px; border-radius: 999px; background: rgba(255,255,255,.08); }
.panel-tabs button.active { border-color: rgba(39, 211, 226, 0.36); background: rgba(39, 211, 226, 0.08); color: white; }
.tab-panel { display: none; min-height: 0; flex: 1; }
.tab-panel.active { display: flex; flex-direction: column; }
.people-list { padding: 8px 12px; overflow: auto; }
.person-row { display: grid; grid-template-columns: 34px 1fr 22px 20px; direction: ltr; align-items: center; gap: 8px; padding: 10px 4px; border-bottom: 1px solid rgba(124, 174, 224, 0.11); }
.person-row > div:nth-child(2) { direction: rtl; text-align: right; }
.person-row strong { direction: ltr; font-size: 12px; display: block; }
.person-row small { color: var(--muted); font-size: 9px; }
.person-row button { border: 0; background: none; cursor: pointer; color: var(--muted); font-size: 19px; }
.mini-avatar { width: 32px; height: 32px; border-radius: 50%; background: radial-gradient(circle at 50% 35%, #8998ab 0 18%, transparent 19%), radial-gradient(ellipse at 50% 80%, #8998ab 0 30%, transparent 31%), rgba(145, 163, 188, 0.1); flex: 0 0 auto; }
.person-mic { text-align: center; }
.person-mic.on { color: var(--success); }
.person-mic.off { color: var(--danger); }
.request-button { margin: auto 12px 14px; border: 1px solid rgba(39, 211, 226, 0.28); border-radius: 12px; background: rgba(39, 211, 226, 0.08); color: var(--cyan); padding: 12px; cursor: pointer; }
.request-button.active { background: rgba(39, 211, 226, 0.18); }
.chat-list { flex: 1; min-height: 260px; max-height: calc(100vh - 300px); overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 11px; }
.message { display: flex; gap: 8px; align-items: flex-start; direction: ltr; }
.message p { direction: rtl; flex: 1; margin: 0; background: rgba(23, 46, 73, 0.62); border: 1px solid rgba(124, 174, 224, 0.13); border-radius: 12px; padding: 9px 11px; }
.message b { direction: ltr; display: block; text-align: left; font-size: 10px; color: #aec0d6; }
.message span { display: block; font-size: 11px; line-height: 1.8; }
.message time { display: block; text-align: left; color: #71869f; font-size: 8px; }
.message.self { flex-direction: row-reverse; }
.message.self p { background: rgba(29, 99, 150, 0.2); border-color: rgba(39, 211, 226, 0.18); }
.chat-form { margin: 10px 12px 14px; display: grid; grid-template-columns: 1fr 42px; direction: ltr; gap: 7px; }
.chat-form input { direction: rtl; min-width: 0; border: 1px solid var(--line); background: rgba(4, 16, 30, 0.8); border-radius: 12px; padding: 11px 12px; color: white; outline: 0; }
.chat-form input:focus { border-color: var(--cyan); }
.chat-form button { border: 0; border-radius: 12px; background: var(--cyan); color: #06121c; font-weight: 900; cursor: pointer; }
.panel-privacy { display: flex; align-items: center; gap: 9px; margin: 0 12px 12px; border: 1px solid rgba(39, 211, 226, 0.16); border-radius: 12px; padding: 10px; background: rgba(39, 211, 226, 0.05); }
.panel-privacy > b { color: var(--cyan); font-size: 18px; }
.panel-privacy p { margin: 0; }
.panel-privacy strong { display: block; font-size: 10px; }
.panel-privacy span { color: var(--muted); font-size: 9px; }

.sidebar-mini { grid-template-columns: 72px minmax(0, 1fr); }
.sidebar-mini .sidebar-brand strong,
.sidebar-mini .sidebar-brand small,
.sidebar-mini .nav-item small { display: none; }
.sidebar-mini .sidebar-brand img { width: 38px; height: 48px; }
.sidebar-mini .room-sidebar { padding-inline: 8px; }
.sidebar-mini .nav-item { min-height: 55px; }

@media (max-width: 1180px) {
  .workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .presentation-card { padding: 34px 32px; min-height: 460px; }
  .presentation-copy h2 { font-size: 46px; }
  .control { min-width: 66px; }
}

@media (max-width: 940px) {
  .login-shell { grid-template-columns: 1fr; width: min(620px, calc(100% - 36px)); padding-top: 34px; }
  .brand-stage { min-height: 300px; align-items: center; text-align: center; }
  .brand-lockup h1 { font-size: 58px; }
  .brand-en { text-align: center; }
  .privacy-note { margin-top: 34px; text-align: right; }
  .language-switch { position: static; margin-bottom: 26px; }
  .site-footer { position: static; padding-bottom: 20px; }
  .room-layout { grid-template-columns: 78px minmax(0, 1fr); }
  .room-sidebar { padding-inline: 8px; }
  .sidebar-brand strong, .sidebar-brand small, .nav-item small { display: none; }
  .sidebar-brand img { width: 38px; height: 48px; }
  .nav-item { min-height: 55px; }
  .workspace { grid-template-columns: 1fr; }
  .interaction-panel { min-height: 540px; }
  .room-header { grid-template-columns: 1fr 1fr; }
  .room-heading { grid-column: 1 / -1; grid-row: 1; padding-top: 12px; }
  .room-statuses { grid-row: 2; }
  .room-meta { grid-row: 2; }
}

@media (max-width: 680px) {
  .login-page { display: block; }
  .login-shell { min-height: auto; padding: 26px 0 50px; gap: 24px; }
  .brand-stage { min-height: 270px; }
  .brand-lockup { gap: 14px; }
  .brand-logo { width: 74px; height: 96px; }
  .brand-lockup h1 { font-size: 44px; letter-spacing: -2px; }
  .brand-en { font-size: 11px; letter-spacing: 6px; }
  .privacy-note { margin-top: 24px; padding: 14px; }
  .privacy-note p { font-size: 12px; }
  .login-card { border-radius: 24px; padding: 28px 21px; }
  .login-card h2 { font-size: 30px; }
  .role-picker { grid-template-columns: 1fr; }
  .room-layout { display: block; padding-bottom: 72px; }
  .room-sidebar { position: fixed; z-index: 20; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: 68px; border-right: 0; border-top: 1px solid var(--line); padding: 6px 10px; flex-direction: row; }
  .sidebar-brand, .sidebar-collapse { display: none; }
  .room-sidebar nav { width: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
  .nav-item { min-height: 54px; }
  .nav-item small { display: block; font-size: 9px; }
  .nav-item span { font-size: 18px; }
  .room-main { padding: 0 10px 12px; }
  .room-header { min-height: 128px; gap: 8px; }
  .room-statuses { gap: 5px; }
  .status-pill { padding: 6px 8px; font-size: 9px; }
  .room-code b { display: none; }
  .session-timer { min-width: 45px; font-size: 11px; }
  .participant-strip { grid-template-columns: repeat(4, 112px); overflow-x: auto; padding-bottom: 5px; }
  .participant-tile { height: 96px; }
  .presentation-card { min-height: 470px; grid-template-columns: 1fr; padding: 28px 19px; text-align: center; }
  .presentation-copy h2 { font-size: 42px; letter-spacing: -3px; }
  .slide-progress { margin-inline: auto; }
  .pdca-visual { width: 270px; max-width: 82vw; }
  .control-bar { justify-content: flex-start; overflow-x: auto; padding-inline: 8px; }
  .control { min-width: 68px; }
  .leave-button { min-width: 88px; }
  .interaction-panel { min-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ===== نوع ورود: کلاس آموزشی / جلسه مدیران ===== */
.type-tabs { display: flex; gap: 8px; margin-bottom: 22px; border: 1px solid var(--line); border-radius: 14px; padding: 4px; background: rgba(5, 17, 32, 0.4); }
.type-tab { flex: 1; border: 0; background: none; color: var(--muted); padding: 10px 8px; border-radius: 10px; cursor: pointer; font-size: 13px; font-weight: 600; transition: 0.2s ease; }
.type-tab:hover { color: var(--text); }
.type-tab.active { background: rgba(39, 211, 226, 0.14); color: var(--cyan-soft); box-shadow: inset 0 0 0 1px rgba(39, 211, 226, 0.35); }
.type-tab.type-tab-mgr.active { background: rgba(212, 169, 74, 0.16); color: var(--gold-soft); box-shadow: inset 0 0 0 1px rgba(212, 169, 74, 0.4); }

.manager-note { display: flex; align-items: flex-start; gap: 12px; margin: 16px 0; padding: 13px 14px; border-radius: 14px; }
.manager-note strong { display: block; font-size: 13px; color: var(--gold-soft); }
.manager-note p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.shield-gold { background: rgba(212, 169, 74, 0.15) !important; color: var(--gold-soft) !important; border-color: rgba(212, 169, 74, 0.4) !important; font-size: 10px !important; letter-spacing: 0.5px; }

.primary-button-gold { background: linear-gradient(120deg, var(--gold), #b9873a) !important; color: #1a1204 !important; box-shadow: none !important; }
.primary-button-gold:hover { box-shadow: 0 20px 40px rgba(212, 169, 74, 0.3) !important; }

/* ===== اتاق انتظار ===== */
.waiting-page { padding: 24px 0; }
.waiting-shell { width: min(480px, calc(100% - 32px)); border-radius: var(--radius); padding: 44px 34px; text-align: center; position: relative; z-index: 1; }
.waiting-shell .card-kicker { justify-content: center; margin: 0 auto 14px; }
.waiting-shell h1 { margin: 0 0 12px; font-size: clamp(24px, 4vw, 30px); }
.waiting-shell .card-subtitle { color: var(--muted); line-height: 1.9; }
.waiting-spinner { display: flex; justify-content: center; gap: 9px; margin-bottom: 24px; }
.waiting-spinner span { width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); opacity: 0.35; animation: waiting-bounce 1.1s ease-in-out infinite; }
.waiting-spinner span:nth-child(2) { animation-delay: 0.15s; }
.waiting-spinner span:nth-child(3) { animation-delay: 0.3s; }
@keyframes waiting-bounce { 0%, 80%, 100% { transform: translateY(0); opacity: 0.35; } 40% { transform: translateY(-10px); opacity: 1; } }
.waiting-tips { text-align: right; list-style: none; margin: 24px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.waiting-tips li { position: relative; padding-inline-start: 22px; color: #d9e6f7; font-size: 13px; line-height: 1.8; }
.waiting-tips li::before { content: '•'; position: absolute; inset-inline-start: 0; color: var(--cyan); }
.waiting-shell .text-button { margin-top: 18px; }

/* ===== اتاق جلسه مدیران (تم طلایی) ===== */
.confidential-banner { display: flex; align-items: center; gap: 10px; margin: 0 22px 14px; padding: 11px 16px; border-radius: 14px; background: rgba(212, 169, 74, 0.1); border: 1px solid rgba(212, 169, 74, 0.3); }
.confidential-banner b { color: var(--gold-soft); font-size: 16px; }
.confidential-banner p { margin: 0; font-size: 12px; color: #ecdbb0; }

.status-pill.mgr b { color: var(--gold-soft); }
.mgr-badge { color: var(--gold-soft) !important; background: rgba(212, 169, 74, 0.12) !important; border-color: rgba(212, 169, 74, 0.4) !important; }
.mgr-tile .participant-avatar { box-shadow: inset 0 0 0 1px rgba(212, 169, 74, 0.35); }

.agenda-card { position: relative; overflow: hidden; border-radius: 22px; padding: 30px; background: linear-gradient(150deg, rgba(41, 34, 15, 0.55), rgba(10, 15, 24, 0.9)); border: 1px solid rgba(212, 169, 74, 0.22); box-shadow: var(--shadow); margin: 0 22px 18px; }
.agenda-head { margin-bottom: 18px; }
.mgr-kicker { color: var(--gold-soft) !important; }
.agenda-card h2 { margin: 6px 0 0; font-size: clamp(20px, 2.6vw, 26px); }
.agenda-list { margin: 0 0 22px; padding-inline-start: 22px; color: #e7dcbc; line-height: 2; font-size: 14px; }
.decisions-block h3 { margin: 0 0 12px; font-size: 14px; color: var(--gold-soft); }
.decision-form { display: flex; gap: 8px; margin-bottom: 12px; }
.decision-form input { flex: 1; border-radius: 12px; border: 1px solid rgba(212, 169, 74, 0.3); background: rgba(5, 17, 32, 0.5); color: var(--text); padding: 11px 14px; }
.decision-form button { border: 0; border-radius: 12px; padding: 0 18px; background: var(--gold); color: #1a1204; font-weight: 700; cursor: pointer; }
.decision-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.decision-list li { border: 1px solid rgba(212, 169, 74, 0.2); background: rgba(212, 169, 74, 0.06); border-radius: 12px; padding: 10px 14px; font-size: 13px; color: #ecdbb0; }

.panel-privacy-gold { border-color: rgba(212, 169, 74, 0.24) !important; background: rgba(212, 169, 74, 0.06) !important; }
.panel-privacy-gold > b { color: var(--gold-soft) !important; }

@media (max-width: 640px) {
  .waiting-shell { padding: 34px 22px; }
  .agenda-card { margin: 0 12px 14px; padding: 22px; }
  .confidential-banner { margin: 0 12px 12px; }
}

/* ===== نوار اتاق انتظار میزبان/مدیر در room.php ===== */
.waiting-room-bar { margin: 14px 22px 0; border-radius: 16px; border: 1px solid rgba(255, 196, 84, 0.35); background: rgba(255, 196, 84, 0.08); padding: 12px 16px; }
.waiting-room-count { display: block; font-size: 12px; color: #ffd98a; margin-bottom: 8px; }
.waiting-room-count b { font-size: 14px; }
.waiting-room-list { display: flex; flex-direction: column; gap: 8px; }
.waiting-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: rgba(5, 17, 32, 0.4); border: 1px solid rgba(255, 196, 84, 0.18); border-radius: 12px; padding: 8px 12px; font-size: 13px; }
.admit-button { border: 0; border-radius: 10px; padding: 7px 14px; background: linear-gradient(120deg, #ffd98a, #e0a63f); color: #241705; font-weight: 700; cursor: pointer; font-size: 12px; }
.admit-button:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 640px) {
  .waiting-room-bar { margin: 12px 12px 0; }
}

/* ===== پنل مدیریت ===== */
.admin-page { background: var(--bg); min-height: 100vh; padding-bottom: 60px; }
.admin-topbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 28px; border-bottom: 1px solid var(--line); background: rgba(7, 16, 30, 0.9); position: sticky; top: 0; z-index: 5; }
.admin-shell { max-width: 980px; margin: 0 auto; padding: 24px 20px; display: flex; flex-direction: column; gap: 20px; }
.admin-card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.admin-card h2 { margin: 0 0 16px; font-size: 17px; }
.admin-alert { border-radius: 12px; padding: 12px 16px; font-size: 13px; }
.admin-alert-ok { background: rgba(38, 211, 170, 0.1); border: 1px solid rgba(38, 211, 170, 0.35); color: #9ff2dd; word-break: break-all; }
.admin-alert-error { background: rgba(213, 75, 92, 0.12); border: 1px solid rgba(213, 75, 92, 0.4); color: #ffb4bd; }
.admin-form-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px; }
.admin-form-row label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); flex: 1; min-width: 160px; }
.admin-form-row input, .admin-form-row select { background: rgba(5, 17, 32, 0.5); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 9px 10px; border-bottom: 1px solid rgba(124, 174, 224, 0.14); text-align: right; }
.admin-table th { color: var(--muted); font-weight: 600; }
.admin-table tr.is-selected { background: rgba(39, 211, 226, 0.06); }
.admin-table a { color: var(--cyan-soft); text-decoration: none; }

/* ===== قاب واقعی Jitsi (فقط وقتی JITSI_ENABLED=true) ===== */
.jitsi-frame-wrap { border-radius: 22px; overflow: hidden; min-height: 460px; border: 1px solid var(--line); box-shadow: var(--shadow); }
.jitsi-frame-wrap iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; }

/* ===== بنر اتاق فرعی (Breakout) ===== */
.breakout-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px 22px 0; padding: 12px 16px; border-radius: 14px; background: rgba(141, 108, 255, 0.1); border: 1px solid rgba(141, 108, 255, 0.35); font-size: 13px; color: #d9d0ff; }
.breakout-setup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 12px 10px; }
.breakout-setup label { display: flex; flex-direction: column; gap: 4px; font-size: 11px; color: var(--muted); }
.breakout-setup input { width: 70px; background: rgba(5, 17, 32, 0.5); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; color: var(--text); font: inherit; }
.breakout-groups { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.breakout-group-row { display: flex; align-items: center; justify-content: space-between; border: 1px solid rgba(141, 108, 255, 0.2); background: rgba(141, 108, 255, 0.06); border-radius: 12px; padding: 9px 12px; font-size: 12px; }
.breakout-group-row b { color: #d9d0ff; }
.breakout-empty { padding: 0 12px; font-size: 12px; color: var(--muted); }

/* ===== نظرسنجی زنده ===== */
.poll-create-bar { margin: 12px 22px 0; }
.poll-create-form { margin-top: 10px; display: flex; flex-direction: column; gap: 10px; border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: var(--surface-soft); }
.poll-create-form input[type="text"] { background: rgba(5, 17, 32, 0.5); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; }
.poll-options-inputs { display: flex; flex-direction: column; gap: 8px; }
.poll-form-actions { display: flex; align-items: center; justify-content: space-between; }
.poll-card { margin: 14px 22px 0; border-radius: 18px; padding: 18px 20px; background: linear-gradient(150deg, rgba(39, 211, 226, 0.1), rgba(10, 24, 43, 0.85)); border: 1px solid rgba(39, 211, 226, 0.25); }
.poll-head { margin-bottom: 12px; }
.poll-kicker { font-size: 11px; color: var(--cyan-soft); letter-spacing: 0.5px; }
.poll-card h3 { margin: 4px 0 0; font-size: 16px; }
.poll-options { display: flex; flex-direction: column; gap: 8px; }
.poll-option { position: relative; overflow: hidden; text-align: right; border: 1px solid rgba(39, 211, 226, 0.25); background: rgba(5, 17, 32, 0.4); border-radius: 12px; padding: 10px 14px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; font: inherit; color: var(--text); }
.poll-option:disabled { cursor: default; }
.poll-option.is-mine { border-color: var(--cyan); }
.poll-option-fill { position: absolute; inset: 0; background: rgba(39, 211, 226, 0.16); width: 0; transition: width 0.3s ease; z-index: 0; }
.poll-option-label, .poll-option-pct { position: relative; z-index: 1; font-size: 13px; }
.poll-option-pct { color: var(--muted); font-size: 11px; white-space: nowrap; }
.poll-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; font-size: 11px; color: var(--muted); }

/* ===== تخته سفید مشترک ===== */
.whiteboard-wrap { border-radius: 22px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: #0b1930; }
.whiteboard-toolbar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(5, 17, 32, 0.6); flex-wrap: wrap; }
.whiteboard-colors { display: flex; gap: 6px; }
.wb-color { width: 22px; height: 22px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; padding: 0; }
.wb-color.active { border-color: var(--text); }
.whiteboard-canvas { width: 100%; height: 420px; display: block; touch-action: none; cursor: crosshair; background: #0b1930; }

@media (max-width: 640px) {
  .breakout-banner { margin: 12px 12px 0; flex-direction: column; align-items: flex-start; }
  .poll-create-bar, .poll-card { margin: 12px 12px 0; }
  .whiteboard-canvas { height: 320px; }
}
