:root {
  --bg: #0b0c10;
  --bg-2: #111318;
  --surface: #16181f;
  --surface-2: #1c1f28;
  --surface-3: #252936;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #eceef4;
  --text-2: #a4a9b8;
  --text-3: #6d7384;
  --accent: #7c5cff;
  --accent-2: #9d85ff;
  --accent-soft: rgba(124, 92, 255, 0.14);
  --green: #2fd39b;
  --red: #ff4d5e;
  --red-soft: rgba(255, 77, 94, 0.14);
  --amber: #f5b73b;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Space Grotesk', var(--font);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; margin: 0; }
a { color: var(--accent-2); }
kbd {
  font: 600 11px var(--font);
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
}
.muted { color: var(--text-2); }

.i {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ---------- Háttér ---------- */
.bg-aura {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.bg-aura span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: drift 24s ease-in-out infinite alternate;
}
.bg-aura span:nth-child(1) { width: 520px; height: 520px; background: #5a3dff; top: -160px; left: -120px; }
.bg-aura span:nth-child(2) { width: 460px; height: 460px; background: #0fb39a; bottom: -180px; right: -100px; animation-delay: -8s; opacity: 0.22; }
.bg-aura span:nth-child(3) { width: 360px; height: 360px; background: #ff6a88; top: 40%; left: 55%; animation-delay: -16s; opacity: 0.12; }
@keyframes drift {
  to { transform: translate(80px, 60px) scale(1.15); }
}
body.in-room .bg-aura { display: none; }

/* ---------- Gombok, mezők ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  background: var(--surface-2);
  transition: background 0.15s, transform 0.1s, border-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn .i { width: 18px; height: 18px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 24px -8px rgba(124, 92, 255, 0.7); }
.btn-primary:hover { background: #8a6dff; }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-danger { background: var(--red); color: #fff; }
.btn-block { width: 100%; }
.btn-lg { height: 54px; font-size: 16px; padding: 0 28px; border-radius: 14px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 0;
  background: transparent;
  color: var(--text-2);
  flex: none;
  transition: background 0.15s, color 0.15s;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn-primary { background: var(--accent); color: #fff; }
.icon-btn-primary:hover { background: #8a6dff; color: #fff; }
.icon-btn .i { width: 18px; height: 18px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; min-width: 0; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field input, .field select, .field textarea, #reg-role-custom {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { height: auto; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, #reg-role-custom:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field-sm select { height: 38px; font-size: 13px; border-radius: 10px; }
#reg-role-custom { margin-top: 8px; }

.form-error { color: var(--red); font-size: 13px; min-height: 20px; margin: 0; text-align: center; }

.segmented {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 4px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 12px;
}
.segmented button {
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-2);
  font-weight: 500;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}
.segmented button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 0 var(--line-2) inset; }

/* ---------- Márka ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #4f7bff);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(124, 92, 255, 0.8);
}
.brand-mark .i { width: 19px; height: 19px; }
.brand-name { font: 700 18px var(--display); letter-spacing: -0.02em; }
.brand-sub { font-size: 13px; color: var(--text-3); }
.brand-lg .brand-mark { width: 46px; height: 46px; border-radius: 14px; }
.brand-lg .brand-mark .i { width: 24px; height: 24px; }
.brand-lg .brand-name { font-size: 22px; }

/* ---------- Avatar ---------- */
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  color: #fff;
  font: 600 14px var(--display);
  flex: none;
  position: relative;
}
.avatar-lg { width: 56px; height: 56px; font-size: 22px; }
.avatar.online::after {
  content: '';
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface);
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--accent-soft);
  color: var(--accent-2);
}

/* ---------- Belépés ---------- */
.auth {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 32px;
  border-radius: 24px;
  background: rgba(22, 24, 31, 0.78);
  border: 1px solid var(--line-2);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
}
.auth-card .brand { margin-bottom: 28px; }
.auth-step { display: none; flex-direction: column; gap: 14px; animation: rise 0.35s ease; }
.auth-step.active { display: flex; }
.auth-step h1 { font-size: 26px; }
.auth-step p.muted { margin: -6px 0 6px; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }

.setup-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; color: var(--text-2); font-size: 14px; }
.setup-list b { color: var(--text); }

.auth-foot { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-size: 12px; margin: 0; }
.auth-foot .i { width: 14px; height: 14px; }

.link-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
}
.link-back:hover { color: var(--text); }
.link-back .i { width: 16px; height: 16px; }

.steps { display: flex; gap: 6px; }
.steps i { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.steps i.on { background: var(--accent); }

.user-picker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.user-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  text-align: left;
  transition: border-color 0.15s, background 0.15s, transform 0.1s;
}
.user-option:hover { border-color: var(--accent); background: var(--surface-2); }
.user-option:active { transform: scale(0.99); }
.user-option .name { font-weight: 600; }
.user-option .go { margin-left: auto; color: var(--text-3); transform: rotate(180deg); }
.empty-note {
  padding: 18px;
  border-radius: 14px;
  border: 1px dashed var(--line-2);
  color: var(--text-2);
  text-align: center;
  font-size: 14px;
}

.auth-who { display: flex; align-items: center; gap: 12px; }
.auth-who .name { font-weight: 600; font-size: 16px; }

.pin { display: flex; gap: 12px; justify-content: center; margin: 8px 0; }
.pin input {
  width: 60px;
  height: 70px;
  text-align: center;
  font: 700 28px var(--display);
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  outline: none;
  caret-color: var(--accent);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  -webkit-text-security: disc;
}
.pin input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pin input.filled { background: var(--surface-2); }
.pin.error input { border-color: var(--red); animation: shake 0.4s; }
.pin.ok input { border-color: var(--green); }
@keyframes shake {
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

/* ---------- Főoldal ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 32px;
}
.topbar-right { display: flex; align-items: center; gap: 12px; }
.clock { font: 500 14px var(--display); color: var(--text-2); font-variant-numeric: tabular-nums; }
.me-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.me-pill .avatar { width: 30px; height: 30px; font-size: 12px; }
.me-pill .name { font-weight: 600; font-size: 14px; }

.home-main { max-width: 1120px; margin: 0 auto; padding: 16px 32px 64px; }
.home-hero { margin: 24px 0 28px; }
.eyebrow { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-2); }
.home-hero h1 { font-size: clamp(30px, 4vw, 42px); }

.actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-bottom: 40px; }
.action-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  text-align: left;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.action-card:hover { transform: translateY(-2px); border-color: var(--line-2); background: var(--surface-2); }
.action-primary {
  background: linear-gradient(135deg, #6a4cff 0%, #4a6bff 100%);
  border-color: transparent;
  box-shadow: 0 20px 40px -20px rgba(106, 76, 255, 0.8);
}
.action-primary:hover { background: linear-gradient(135deg, #7659ff 0%, #5677ff 100%); }
.action-icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 15px;
  background: var(--surface-3);
  flex: none;
}
.action-primary .action-icon { background: rgba(255, 255, 255, 0.18); }
.action-icon .i { width: 24px; height: 24px; }
.action-title { font: 600 18px var(--display); }
.action-sub { font-size: 14px; color: var(--text-2); }
.action-primary .action-sub { color: rgba(255, 255, 255, 0.78); }

.home-grid { display: grid; grid-template-columns: 1fr 300px; gap: 32px; align-items: start; }
.section { margin-bottom: 32px; }
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 13px var(--font);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin-bottom: 14px;
}
details.past summary { cursor: pointer; list-style: none; }
details.past summary::-webkit-details-marker { display: none; }
details.past summary::before { content: '▸'; transition: transform 0.2s; }
details.past[open] summary::before { transform: rotate(90deg); }
.count { color: var(--text-3); font-weight: 500; }

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 77, 94, 0.6);
  animation: pulse 1.6s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 77, 94, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 77, 94, 0); } }

.meeting-list { display: flex; flex-direction: column; gap: 10px; }
.meeting {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.15s;
}
.meeting:hover { border-color: var(--line-2); }
.meeting.is-live { border-color: rgba(255, 77, 94, 0.4); background: linear-gradient(90deg, rgba(255, 77, 94, 0.08), var(--surface) 60%); }
.meeting.is-past { opacity: 0.6; }
.m-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 60px;
  border-radius: 12px;
  background: var(--surface-2);
  flex: none;
}
.m-date .mon { font-size: 11px; font-weight: 600; text-transform: uppercase; color: var(--accent-2); }
.m-date .day { font: 700 22px/1.1 var(--display); }
.m-body { flex: 1; min-width: 0; }
.m-title { font-weight: 600; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-desc { font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.m-meta span { display: inline-flex; align-items: center; gap: 5px; }
.m-meta .i { width: 14px; height: 14px; }
.m-when-soon { color: var(--amber) !important; font-weight: 600; }
.m-live { color: var(--red) !important; font-weight: 600; }
.m-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.stack-avatars { display: flex; }
.stack-avatars .avatar { width: 24px; height: 24px; font-size: 10px; border: 2px solid var(--surface); margin-left: -6px; }
.stack-avatars .avatar:first-child { margin-left: 0; }

.empty {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px dashed var(--line-2);
  color: var(--text-3);
  text-align: center;
}

.panel {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 16px;
}
.panel .section-title { margin-bottom: 12px; }
.panel.tip h3 { font-size: 15px; margin-bottom: 6px; }
.panel.tip p { margin: 0; font-size: 13px; color: var(--text-2); line-height: 1.8; }

.team-list { display: flex; flex-direction: column; gap: 4px; }
.team-member { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; }
.team-member .who { flex: 1; min-width: 0; }
.team-member .name { font-weight: 600; font-size: 14px; }
.team-member .status { font-size: 12px; color: var(--text-3); }
.team-member .status.on { color: var(--green); }
.team-member .icons { display: flex; gap: 6px; color: var(--text-3); }
.team-member .icons .i { width: 16px; height: 16px; }
.team-member .icons .off { color: var(--red); }

/* ---------- Előcsarnok ---------- */
.lobby { min-height: 100%; display: flex; flex-direction: column; }
.lobby-main {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 16px 32px 48px;
}
.lobby-preview { display: flex; flex-direction: column; gap: 16px; }
.lobby-controls { display: flex; justify-content: center; gap: 12px; margin-top: -48px; position: relative; z-index: 2; }
.device-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.lobby-info { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; }
.lobby-info h1 { font-size: clamp(28px, 3.5vw, 38px); }
.lobby-info p { margin: 0; }
.lobby-live { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-height: 28px; }
.lobby-info .btn-lg { margin-top: 8px; min-width: 220px; }

.meter { position: absolute; left: 16px; top: 16px; display: flex; gap: 3px; align-items: flex-end; height: 18px; z-index: 2; }
.meter i { width: 4px; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, 0.7); transition: height 0.08s; }

/* ---------- Csempe (videó) ---------- */
.tile {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: var(--surface);
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  isolation: isolate;
}
.tile video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
}
.tile.mirror video { transform: scaleX(-1); }
.tile.is-screen video { object-fit: contain; background: #050507; }
.tile::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 3px solid var(--green);
  opacity: 0;
  transition: opacity 0.15s;
  pointer-events: none;
  z-index: 3;
}
.tile.speaking::after { opacity: 1; }
.tile-avatar {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 40%, var(--surface-3), var(--surface) 70%);
  z-index: 1;
}
.tile-avatar .avatar { width: 88px; height: 88px; font-size: 34px; box-shadow: 0 0 0 8px rgba(255, 255, 255, 0.04); }
.tile.has-video .tile-avatar { display: none; }
.tile-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100% - 24px);
  padding: 6px 12px 6px 10px;
  border-radius: 10px;
  background: rgba(10, 11, 15, 0.62);
  backdrop-filter: blur(12px);
  font-size: 13px;
  font-weight: 600;
  z-index: 2;
}
.tile-label .i { width: 15px; height: 15px; }
.tile-label .mic-off { color: var(--red); }
.tile-label .role { font-weight: 500; color: var(--text-2); }
.tile-label .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-badge {
  position: absolute;
  right: 12px;
  top: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(10, 11, 15, 0.62);
  backdrop-filter: blur(12px);
  font-size: 12px;
  font-weight: 600;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
}
.tile-badge .i { width: 14px; height: 14px; }
.tile-badge.warn { color: var(--amber); }
.tile-pin {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  opacity: 0;
  background: rgba(10, 11, 15, 0.62);
  backdrop-filter: blur(12px);
  transition: opacity 0.15s;
}
.tile:hover .tile-pin { opacity: 1; }
.tile-lobby { border-radius: 24px; box-shadow: var(--shadow); }
.tile-lobby .tile-avatar .avatar { width: 110px; height: 110px; font-size: 42px; }

.float-emoji {
  position: absolute;
  bottom: 20%;
  font-size: 48px;
  z-index: 5;
  pointer-events: none;
  animation: floatUp 2.4s ease-out forwards;
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.5); opacity: 0; }
  15% { transform: translateY(-20px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-220px) scale(1); opacity: 0; }
}

/* ---------- Hívás ---------- */
body.in-room { overflow: hidden; }
.room {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #08090c;
}
.room-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
}
.room-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.room-title strong { font: 600 16px var(--display); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px var(--green); flex: none; }
.room-timer {
  font: 500 13px var(--display);
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--surface);
}

.room-body { flex: 1; display: flex; min-height: 0; gap: 12px; padding: 0 16px; }
.stage {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 12px;
  align-content: center;
  justify-content: center;
}
.stage .tile { width: 100%; max-height: 100%; }

/* Kiemelt nézet (képernyőmegosztás vagy kitűzés) */
.stage.spotlight { align-content: stretch; justify-content: stretch; }
.stage.spotlight .tile.featured { grid-column: 1; aspect-ratio: auto; height: 100%; min-height: 0; }
.stage.spotlight .tile:not(.featured) { grid-column: 2; }
.stage.spotlight .tile:not(.featured) .tile-avatar .avatar { width: 52px; height: 52px; font-size: 20px; }
.stage.spotlight .tile:not(.featured) .tile-label { font-size: 12px; padding: 4px 8px; left: 8px; bottom: 8px; }

.side {
  width: 360px;
  flex: none;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: slideIn 0.2s ease;
}
@keyframes slideIn { from { opacity: 0; transform: translateX(16px); } }
.side-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; }
.tabs button {
  border: 0;
  background: transparent;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text-3);
  font-weight: 600;
  font-size: 13px;
}
.tabs button.on { background: var(--surface-3); color: var(--text); }
.tabs span { color: var(--text-3); font-weight: 500; }
.tab-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.tab-pane[data-pane='people'], .tab-pane[data-pane='files'] { padding: 10px; overflow-y: auto; }

.messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.msg-group { display: flex; gap: 10px; margin-top: 12px; }
.msg-group .avatar { width: 30px; height: 30px; font-size: 12px; }
.msg-group.mine { flex-direction: row-reverse; }
.msg-stack { display: flex; flex-direction: column; gap: 4px; min-width: 0; max-width: 80%; }
.mine .msg-stack { align-items: flex-end; }
.msg-head { font-size: 12px; color: var(--text-3); }
.msg-head b { color: var(--text-2); font-weight: 600; margin-right: 6px; }
.bubble {
  padding: 9px 13px;
  border-radius: 14px;
  border-top-left-radius: 5px;
  background: var(--surface-3);
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: anywhere;
  font-size: 14px;
}
.mine .bubble { background: var(--accent); color: #fff; border-top-left-radius: 14px; border-top-right-radius: 5px; }
.bubble a { color: inherit; }
.msg-empty { margin: auto; text-align: center; color: var(--text-3); font-size: 14px; padding: 24px; }
.msg-empty .i { width: 32px; height: 32px; margin-bottom: 8px; opacity: 0.5; }

.file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 10px 12px;
  border-radius: 14px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  min-width: 220px;
  max-width: 100%;
}
.file-card .fi {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  flex: none;
  font: 700 10px var(--display);
  text-transform: uppercase;
}
.file-card .fmeta { flex: 1; min-width: 0; }
.file-card .fname { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-card .fsize { font-size: 12px; color: var(--text-3); }
.file-thumb {
  display: block;
  max-width: 240px;
  max-height: 200px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  cursor: zoom-in;
  background: var(--surface-3);
}

.uploads { display: flex; flex-direction: column; gap: 6px; padding: 0 12px; }
.upload-row { padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 12px; }
.upload-row .bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 6px; overflow: hidden; }
.upload-row .bar i { display: block; height: 100%; background: var(--accent); width: 0; transition: width 0.2s; }

.composer {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  margin: 12px;
  padding: 6px;
  border-radius: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.composer:focus-within { border-color: var(--accent); }
.composer textarea {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  resize: none;
  padding: 9px 4px;
  max-height: 140px;
  font-size: 14px;
  line-height: 1.45;
}

.files-list { display: flex; flex-direction: column; gap: 8px; }
.files-list .file-card { min-width: 0; }
.files-list .who { font-size: 11px; color: var(--text-3); }

.controls {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 20px 18px;
  gap: 12px;
}
.controls-left { font: 500 14px var(--display); color: var(--text-2); font-variant-numeric: tabular-nums; }
.controls-center { display: flex; gap: 10px; align-items: center; }
.controls-right { display: flex; gap: 8px; justify-content: flex-end; }

.ctrl {
  position: relative;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 0;
  background: var(--surface-2);
  color: var(--text);
  transition: background 0.15s, transform 0.1s, color 0.15s;
}
.ctrl:hover { background: var(--surface-3); }
.ctrl:active { transform: scale(0.95); }
.ctrl .i { width: 22px; height: 22px; }
.ctrl.off { background: var(--red-soft); color: var(--red); }
.ctrl.off:hover { background: rgba(255, 77, 94, 0.22); }
.ctrl.active { background: var(--accent); color: #fff; }
.ctrl-danger { width: 68px; background: var(--red); color: #fff; }
.ctrl-danger:hover { background: #ff6573; }
.ctrl-sm { width: 44px; height: 44px; border-radius: 13px; background: transparent; color: var(--text-2); }
.ctrl-sm .i { width: 20px; height: 20px; }
.ctrl-sm.active { background: var(--surface-3); color: var(--text); }
.lobby-controls .ctrl { width: 56px; height: 56px; border-radius: 50%; background: rgba(28, 31, 40, 0.85); backdrop-filter: blur(12px); }
.lobby-controls .ctrl.off { background: var(--red); color: #fff; }

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
}

.react-wrap { position: relative; }
.react-pop {
  position: absolute;
  bottom: 64px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 2px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  animation: rise 0.15s ease;
}
.react-pop button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  font-size: 22px;
  transition: transform 0.1s, background 0.1s;
}
.react-pop button:hover { background: var(--surface-3); transform: scale(1.15); }

.drop-overlay {
  position: absolute;
  inset: 12px;
  z-index: 50;
  display: grid;
  place-items: center;
  border-radius: 24px;
  border: 2px dashed var(--accent);
  background: rgba(124, 92, 255, 0.12);
  backdrop-filter: blur(6px);
  pointer-events: none;
  font: 600 18px var(--display);
  text-align: center;
}
.drop-overlay .i { width: 40px; height: 40px; }

/* ---------- Dialógus ---------- */
.dialog {
  width: min(520px, calc(100% - 32px));
  padding: 24px;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.dialog::backdrop { background: rgba(5, 6, 9, 0.7); backdrop-filter: blur(6px); }
.dialog[open] { animation: rise 0.2s ease; }
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h2 { font-size: 22px; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 10px; }
input[type='date']::-webkit-calendar-picker-indicator,
input[type='time']::-webkit-calendar-picker-indicator { filter: invert(0.8); cursor: pointer; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: rgba(5, 6, 9, 0.9);
  cursor: zoom-out;
  padding: 24px;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }

/* ---------- Értesítések ---------- */
.toasts {
  position: fixed;
  top: 16px;
  left: 16px;
  right: 16px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 500;
  pointer-events: auto;
  animation: toastIn 0.25s ease;
  max-width: min(460px, calc(100vw - 32px));
}
.toast .avatar { width: 24px; height: 24px; font-size: 10px; }
.toast.error { border-color: rgba(255, 77, 94, 0.5); }
.toast.hide { opacity: 0; transform: translateY(-8px); transition: 0.25s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px); } }

/* ---------- Mobil ---------- */
@media (max-width: 900px) {
  .home-grid { grid-template-columns: 1fr; }
  .lobby-main { grid-template-columns: 1fr; gap: 28px; }
  .side {
    position: fixed;
    inset: 0 0 86px 0;
    width: auto;
    border-radius: 0;
    z-index: 20;
  }
  .stage.spotlight .tile:not(.featured) { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 14px 16px; }
  .clock, .me-pill .name { display: none; }
  .home-main { padding: 8px 16px 48px; }
  .actions { grid-template-columns: 1fr; }
  .meeting { flex-wrap: wrap; gap: 12px 14px; }
  .m-actions { width: 100%; }
  .m-actions .btn { flex: 1; }
  .lobby-main { padding: 8px 16px 32px; }
  .device-row { grid-template-columns: 1fr; }
  .auth-card { padding: 24px 20px; }
  .pin input { width: 54px; height: 64px; }
  .row { flex-wrap: wrap; }
  .room-body { padding: 0 8px; }
  .controls { grid-template-columns: 1fr; padding: 10px 8px 14px; }
  .controls-left { display: none; }
  .controls-center { justify-content: center; gap: 6px; }
  .controls-right { justify-content: center; }
  .ctrl { width: 46px; height: 46px; border-radius: 14px; }
  .ctrl-danger { width: 56px; }
  .side { inset: 0 0 128px 0; }
  .room-top .btn span { display: none; }
}
