:root {
  color-scheme: light;
  --bg: #202124;
  --tile: #3c4043;
  --ink: #e8eaed;
  --muted: #9aa0a6;
  --blue: #1a73e8;
  --blue-hover: #1765cc;
  --accent: #0d9f90;
  --accent-hover: #0b8a7d;
  --red: #ea4335;
  --off: #ea4335;
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  height: 100%;
  background: #f4f7fb;
}

body {
  margin: 0;
  height: 100%;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, sans-serif;
  background: #f4f7fb;
  color: #1a2433;
}

button, input { font: inherit; }

.hidden { display: none !important; }

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.lobby {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 420px);
  gap: 48px;
  align-items: center;
  padding: 40px 6vw;
}

.preview {
  position: relative;
  background: var(--tile);
  border-radius: 12px;
  overflow: hidden;
  min-height: 480px;
  aspect-ratio: 16 / 9;
}

.preview video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #202124;
  display: block;
}

.self video,
#remote {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #202124;
  display: block;
}

.allow-row {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  width: min(100% - 24px, 460px);
}

.preview-status {
  flex: 1 0 100%;
  margin: 4px 0 0;
  text-align: center;
  color: #e8eaed;
  font-size: 0.95rem;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.allow {
  border: 0;
  border-radius: 24px;
  background: var(--blue);
  color: #fff;
  padding: 12px 22px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.allow:hover { background: var(--blue-hover); }

.preview-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  z-index: 3;
  display: flex;
  justify-content: center;
  gap: 16px;
}

.round {
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 50%;
  background: var(--tile);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  position: relative;
}

.round svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.round .icon-off { display: none; }
.round.is-off .icon-on { display: none; }
.round.is-off .icon-off { display: block; }
.round.is-off { background: var(--off); }

.round:hover { filter: brightness(1.15); }

.join-panel h1 {
  margin: 0 0 22px;
  font-size: 2rem;
  font-weight: 400;
}

.join-panel form {
  display: grid;
  gap: 16px;
  max-width: 320px;
}

input {
  background: transparent;
  color: var(--ink);
  border: 1px solid #5f6368;
  border-radius: 4px;
  padding: 14px 12px;
}

input:focus {
  outline: 2px solid var(--blue);
  border-color: transparent;
}

.join {
  justify-self: start;
  border: 0;
  border-radius: 24px;
  background: var(--blue);
  color: #fff;
  padding: 12px 24px;
  font-weight: 500;
  cursor: pointer;
}

.join:hover { background: var(--blue-hover); }
.join:disabled { opacity: 0.6; cursor: default; }

.hint {
  color: var(--muted);
  max-width: 320px;
  line-height: 1.45;
}

.cam-off {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 40%, #3a3d42 0%, #2a2c30 52%, #1c1d20 100%);
}

.person {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  background:
    url("/mark.png") center / 62% no-repeat,
    radial-gradient(circle at 50% 42%, #3a3d42 0%, #2a2c30 70%, #1c1d20 100%);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.person::before,
.person::after {
  content: none;
}

.person.large {
  width: 168px;
  height: 168px;
}

.person.has-photo {
  background: transparent;
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.person.has-photo::before,
.person.has-photo::after {
  display: none;
}

.person .person-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.meet {
  position: relative;
  min-height: 100vh;
  min-width: 0;
  display: block;
  padding: 0;
  overflow: hidden;
  background: #000;
}

.meet-top {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 40px;
  color: var(--muted);
}

.meet-top strong { color: var(--ink); font-weight: 500; }
.meet-top time { margin-left: auto; }

.stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}

#remote { position: absolute; inset: 0; }

.remote-off {
  position: absolute;
  inset: 0;
  z-index: 2;
  margin: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 40%, #3a3d42 0%, #2a2c30 52%, #1c1d20 100%);
}

.remote-off p { margin: 0; font-size: 1.25rem; }

.remote-mic {
  display: none !important;
  position: absolute;
  z-index: 4;
  left: 16px;
  bottom: 16px;
  margin: 0;
  padding: 8px 14px;
  border-radius: 8px;
  background: rgba(32, 33, 36, 0.92);
  color: #fff;
  font-size: 0.95rem;
}

.wait {
  position: absolute;
  z-index: 3;
  inset: 0;
  margin: 0;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 40%, #3a3d42 0%, #2a2c30 52%, #1c1d20 100%);
}

.wait p { margin: 0; font-size: 1.25rem; }

.notice {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 40;
  margin: 0;
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(26, 36, 51, 0.92);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: "DM Sans", system-ui, sans-serif;
  white-space: nowrap;
  max-width: min(92vw, 420px);
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
  pointer-events: none;
}

.self-wrap {
  position: absolute;
  z-index: 5;
  right: 16px;
  bottom: 104px;
}

.self {
  position: relative;
  width: 220px;
  height: 140px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--tile);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* PiP self luôn hiện khi đang họp (trừ khi đã thu nhỏ) */
.meet .self-wrap:not(.is-collapsed) .self {
  display: block !important;
}
.meet .self-wrap.is-collapsed .self {
  display: none !important;
}

.meet.solo #remote,
.meet.stage-local #remote {
  transform: scaleX(-1);
}

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 16px 28px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.2) 55%, transparent 100%);
  pointer-events: none;
}

.dock .round {
  pointer-events: auto;
  flex: 0 0 72px;
  width: 72px;
  height: 70px;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: block;
  overflow: visible;
}

.dock .round::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--tile);
}

.dock .round.is-off::before { background: var(--off); }

.dock .round svg {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 48px;
  height: 48px;
  padding: 12px;
  box-sizing: border-box;
  transform: translateX(-50%);
  margin: 0;
}

.dock .hangup::before { background: var(--red); }

.caption {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 76px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink);
  white-space: nowrap;
  text-align: center;
  pointer-events: none;
}

#screen .caption {
  font-size: 12px;
  letter-spacing: 0;
}

@media (max-width: 800px) {
  .lobby {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 20px 16px 32px;
  }

  .preview { min-height: 240px; aspect-ratio: auto; height: 52vw; }
  .join-panel h1 { font-size: 1.5rem; }
  .self-wrap { right: 10px; bottom: 96px; }
  .self { width: 120px; height: 84px; }

  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 48vh) minmax(0, 1fr);
  }

  .shell:not(.in-call) {
    grid-template-columns: 1fr !important;
    grid-template-rows: 1fr;
  }

  .shell:not(.in-call) .chat,
  .shell:not(.in-call) .meet {
    display: none !important;
  }

  .room-lobby {
    min-height: 0;
    padding: 12px;
  }

  .room-lobby-frame {
    width: 100%;
    max-width: none;
    gap: 10px;
  }

  .room-lobby-title {
    font-size: clamp(1.7rem, 7vw, 2rem);
    font-weight: 800;
  }

  .room-lobby .preview {
    min-height: min(72vh, 560px);
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 16px;
  }

  .presence-badge {
    top: 10px;
    font-size: 0.8rem;
    max-width: calc(100% - 24px);
    white-space: normal;
    text-align: center;
  }

  .roster {
    top: auto;
    bottom: 88px;
    left: 10px;
  }

  .chat {
    min-height: 0;
    border-left: 0;
    border-top: 1px solid #3c4043;
  }

  .shell.in-call {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(280px, 52vh) minmax(0, 1fr);
  }

  .shell.in-call.chat-collapsed {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr);
  }

  .shell.in-call .chat {
    grid-column: 1;
    grid-row: 2;
    min-height: 0;
    border-right: 0;
    border-top: 1px solid #3c4043;
  }

  .shell.in-call.chat-collapsed .chat {
    grid-row: 1;
    top: 12px;
    left: 12px;
    right: auto;
    bottom: auto;
  }

  .shell.in-call .meet {
    grid-column: 1;
    grid-row: 1;
    order: -1;
    min-width: 0;
    min-height: 0;
    height: auto;
    overflow: hidden;
  }

  .shell.in-call.chat-collapsed .meet {
    grid-row: 1;
  }
}

.gate {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  padding: calc(var(--nav-h, 56px) + var(--safe-top, 0px)) 0 0;
  box-sizing: border-box;
  background:
    radial-gradient(900px 320px at 100% -10%, rgba(13, 159, 144, 0.12), transparent 60%),
    #f4f7fb;
  color: #1a2433;
}

body.hw-nav-autohide #lobby.gate {
  padding-top: 12px;
}

.gate-brand,
.hw-brand {
  --hw-glass-x: 50%;
  --hw-glass-y: 40%;
  position: relative;
  top: auto;
  left: auto;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  margin: 0 4px 0 0;
  height: 40px;
  padding: 0 12px 0 4px;
  box-sizing: border-box;
  border-radius: 12px;
  overflow: visible;
  isolation: isolate;
  line-height: 1;
  font-family: "DM Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  text-decoration: none;
  color: inherit;
  background: transparent;
}

.gate > .hw-brand,
.gate > .gate-brand {
  position: absolute;
  top: 16px;
  left: 16px;
}

.gate-brand::before,
.hw-brand::before,
.hw-nav-dock .hw-brand::before {
  content: none !important;
  display: none !important;
}

.gate-brand::after {
  content: none !important;
  display: none !important;
}

.hw-nav-dock > .hw-brand::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 7px;
  bottom: 7px;
  right: 0;
  width: 1px;
  background: rgba(15, 23, 42, 0.14);
  pointer-events: none;
}

.gate-mark,
.gate-brand-org,
.gate-brand-product,
.hw-brand-mark,
.hw-brand .kicker,
.hw-brand .hw-brand-title {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}

.gate-mark,
.hw-brand-mark {
  display: block;
  width: 28px;
  height: 24px;
  margin: 0;
  object-fit: contain;
  flex: 0 0 28px;
}

.gate-brand-org,
.hw-brand .kicker {
  margin: 0;
  padding: 0;
  color: #0b8a7d;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
}

.gate-brand-product,
.hw-brand .hw-brand-title {
  margin: 0 0 0 4px;
  padding: 0;
  color: #1a2433;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 24px;
  height: 24px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.gate-card {
  width: auto;
  max-width: none;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  text-align: left;
  margin: 0;
  padding: 0;
}

.hw-filter-menu {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}

.tools-panel .hw-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: #5c6b7a;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.tools-panel .hw-filter-btn svg {
  flex: 0 0 auto;
}

.tools-panel .hw-filter-btn.is-active,
.tools-panel .hw-filter-btn.is-open {
  background: #f3fbf8;
  color: #17324d;
  box-shadow: inset 0 0 0 1px rgba(13, 159, 144, 0.16);
}

.hw-filter-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 280px;
  padding: 6px;
  border: 1px solid #d5dee9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.hw-filter-panel[hidden] {
  display: none !important;
}

.gate-join-panel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 4px 0 0;
  padding-top: 4px;
  border-top: 1px solid #e6edf5;
}

.hw-filter-panel .search {
  display: block;
  width: 100%;
}

.hw-filter-panel .search input {
  width: 100%;
  min-width: 240px;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 0 0 1px #d5dee9;
  color: #1a2433;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.hw-filter-panel .search input:focus {
  box-shadow: inset 0 0 0 1px rgba(13, 159, 144, 0.55);
}

.hw-filter-action {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1a2433;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.hw-filter-action:hover {
  background: rgba(13, 159, 144, 0.1);
}

.hw-filter-action.is-selected {
  background: rgba(13, 159, 144, 0.14);
  color: #0b8a7d;
}

.hw-filter-action:disabled {
  opacity: 0.55;
  cursor: default;
}

.gate-card .hint {
  color: #5f6368;
}

.gate-card .brand {
  display: none;
}

.gate-form {
  display: grid;
  gap: 14px;
  justify-items: stretch;
}

.gate-row {
  display: flex;
  align-items: stretch;
  gap: 0;
  width: 100%;
  height: 48px;
  background: #fff;
  border: 1px solid #d5dee9;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gate-row:focus-within {
  border-color: #0d9f90;
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.18);
}

.gate-row input {
  flex: 1;
  min-width: 0;
  margin: 0;
  height: 100%;
  background: transparent;
  color: #1a2433;
  border: 0;
  border-radius: 0;
  padding: 0 16px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
}

.gate-row input:focus {
  outline: none;
  border: 0;
  box-shadow: none;
}

.gate-row input::placeholder {
  color: #9aa0a6;
}

.gate-row .join {
  flex: 0 0 auto;
  align-self: stretch;
  margin: 0;
  height: 100%;
  white-space: nowrap;
  border: 0;
  border-radius: 0;
  border-left: 1px solid rgba(13, 159, 144, 0.25);
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.gate-row .join:hover {
  background: var(--accent-hover);
}

.gate-create {
  justify-self: center;
  border: 0;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  padding: 4px 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.gate-create:hover {
  color: var(--blue);
}

.brand {
  margin: 0 0 8px;
  color: #8ab4f8;
  font-weight: 500;
}

@media (max-width: 560px) {
  .gate-row {
    flex-direction: column;
    height: auto;
  }

  .gate-row input {
    height: 48px;
  }

  .gate-row .join {
    width: 100%;
    height: 48px;
    border-left: 0;
    border-top: 1px solid rgba(13, 159, 144, 0.25);
  }
}

.shell {
  color-scheme: dark;
  position: relative;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 400px);
  overflow: hidden;
}

.shell:not(.in-call) {
  grid-template-columns: 1fr !important;
  grid-template-rows: auto;
  background: radial-gradient(ellipse 70% 50% at 50% 40%, rgba(13, 159, 144, 0.12), transparent 60%), #f4f7fb;
}

.shell:not(.in-call) .chat,
.shell:not(.in-call) .meet {
  display: none !important;
}

.shell.in-call {
  grid-template-columns: minmax(280px, 380px) minmax(0, 1fr);
}

.shell.in-call.chat-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.shell.in-call .room-lobby {
  display: none;
}

.shell.in-call .chat {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 6;
  min-width: 0;
  overflow: hidden;
  background: #17181b;
}

.shell.in-call.chat-collapsed .chat {
  position: absolute;
  inset: 0 auto 0 0;
  width: auto;
  height: auto;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  z-index: 8;
  pointer-events: none;
}

.shell.in-call .meet {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 0;
  height: 100vh;
  overflow: hidden;
}

.shell.in-call.chat-collapsed .meet {
  grid-column: 1;
}

.room-lobby {
  min-height: 100vh;
  display: grid;
  place-items: center;
  justify-content: center;
  padding: 20px 16px 28px;
  background: transparent;
}

.room-lobby-frame {
  width: min(100%, 1320px);
  max-width: 1320px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.room-lobby-title {
  margin: 0;
  padding: 0 4px;
  color: #202124;
  font-size: clamp(1.65rem, 2.4vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.room-lobby .preview {
  width: 100%;
  max-width: none;
  justify-self: center;
  margin: 0;
  min-height: 600px;
  aspect-ratio: 16 / 9;
  background: #202124;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.presence-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  margin: 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.88);
  color: #e8eaed;
  font-size: 0.9rem;
  white-space: nowrap;
}

.roster {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  margin: 0;
  padding: 12px 14px;
  list-style: none;
  border-radius: 12px;
  background: rgba(32, 33, 36, 0.88);
  display: grid;
  gap: 10px;
  min-width: 168px;
}

.roster-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e8eaed;
  font-size: 0.95rem;
}

.roster-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #81c995; /* trong phòng */
  flex: 0 0 auto;
}

.roster-item.is-in-lobby .roster-dot,
.call-roster-item.is-in-lobby .roster-dot {
  background: #fdd663; /* phòng chờ */
}

.roster-item.is-in-call .roster-dot,
.call-roster-item.is-in-call .roster-dot {
  background: #81c995;
}

.roster-item.is-out .roster-dot,
.call-roster-item.is-out .roster-dot {
  display: none;
}

.call-roster-wrap {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
}

.shell.chat-collapsed .call-roster-wrap {
  top: 60px;
}

.call-roster {
  position: relative;
  margin: 0;
  padding: 8px 10px;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 148px;
  max-width: min(240px, 46vw);
  border-radius: 14px;
  background: rgba(32, 33, 36, 0.88);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
}

.call-roster-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #e8eaed;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  min-width: 0;
}

.call-roster-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.call-roster-flags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  flex: 0 0 auto;
}

.roster-flag {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #c4c7c5;
}

.roster-flag svg {
  width: 12px;
  height: 12px;
  fill: currentColor;
}

.roster-flag.is-mic .icon-off,
.roster-flag.is-cam .icon-off { display: none; }
.roster-flag.is-mic.is-off,
.roster-flag.is-cam.is-off {
  color: #f28b82;
  background: rgba(242, 139, 130, 0.16);
}
.roster-flag.is-mic.is-off .icon-on,
.roster-flag.is-cam.is-off .icon-on { display: none; }
.roster-flag.is-mic.is-off .icon-off,
.roster-flag.is-cam.is-off .icon-off { display: block; }

.roster-flag.is-screen {
  color: #81c995;
  background: rgba(129, 201, 149, 0.18);
}

.call-roster-avatar.person {
  width: 28px;
  height: 28px;
  box-shadow: none;
  flex: 0 0 auto;
}

.call-roster-avatar.person.has-photo {
  box-shadow: none;
}

.room-lobby .preview-bar {
  align-items: center;
  gap: 14px;
}

.lobby-join {
  border: 0;
  border-radius: 24px;
  background: var(--accent);
  color: #fff;
  padding: 12px 22px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  margin-left: 8px;
}

.lobby-join:hover:not(:disabled) { background: var(--accent-hover); }
.lobby-join:disabled,
.lobby-join.is-schedule-locked {
  opacity: 0.45;
  cursor: not-allowed;
  background: #9aa0a6 !important;
  pointer-events: none;
}

.schedule-hint {
  position: absolute;
  left: 50%;
  bottom: 86px;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  max-width: min(92%, 420px);
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(32, 33, 36, 0.88);
  color: #f8fafc;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.35;
}

.schedule-hint.is-blocked {
  background: rgba(180, 83, 9, 0.92);
}

.lobby-leave {
  border: 0;
  border-radius: 24px;
  background: var(--red);
  color: #fff;
  margin-left: 8px;
  padding: 12px 18px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.lobby-leave:hover {
  filter: brightness(1.08);
  color: #fff;
}

.room-lobby .preview-bar .round {
  width: 56px;
  height: 64px;
  border-radius: 0;
  background: transparent;
  padding: 0;
  display: block;
}

.room-lobby .preview-bar .round::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(60, 64, 67, 0.92);
}

.room-lobby .preview-bar .round.is-off::before {
  background: var(--off);
}

.room-lobby .preview-bar .round svg {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 1;
  width: 48px;
  height: 48px;
  padding: 12px;
  box-sizing: border-box;
  transform: translateX(-50%);
  margin: 0;
}

.room-lobby .preview-status {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 88px;
  z-index: 3;
  margin: 0;
  pointer-events: none;
}

.chat {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #17181b;
  border-left: 1px solid #3c4043;
}

.shell.in-call .chat {
  min-height: 0;
  height: 100vh;
  border-left: 0;
  border-right: 1px solid #3c4043;
}

.chat-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 0;
  flex-shrink: 0;
}

.chat-tools-label {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.chat-toggle {
  position: relative;
  border: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #2b2d31;
  color: #e8eaed;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
}

.chat-toggle:hover {
  background: #3c4043;
}

.shell.chat-collapsed .chat-tools {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 12px;
  padding: 0;
  border-bottom: 0;
  height: auto;
  background: transparent;
  box-shadow: none;
  pointer-events: auto;
}

.shell.chat-collapsed .chat-tools-label,
.shell.chat-collapsed .chat-top,
.shell.chat-collapsed .incoming,
.shell.chat-collapsed .log,
.shell.chat-collapsed .composer {
  display: none !important;
}

.shell.chat-collapsed .chat-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(32, 33, 36, 0.92);
  color: #e8eaed;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
  pointer-events: auto;
  position: relative;
  z-index: 9;
}


.shell.chat-collapsed .chat-toggle.has-unread,
#chat-toggle.has-unread {
  box-shadow: 0 0 0 2px #e11d48;
}
.shell.chat-collapsed .chat-toggle.has-unread::after,
#chat-toggle.has-unread::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #e11d48;
}

.shell.chat-collapsed .chat-toggle:hover {
  background: #3c4043;
  color: #fff;
}

.shell.chat-collapsed .chat {
  background: transparent;
  box-shadow: none;
}

.chat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.chat-top strong { display: block; font-size: 1.05rem; }

.chat-actions { display: flex; gap: 8px; align-items: center; }

.call-btn, .composer button[type="submit"] {
  border: 0;
  border-radius: 12px;
  background: var(--accent, #0d9f90);
  color: #fff;
  padding: 11px 18px;
  cursor: pointer;
  font-weight: 700;
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, transform 0.12s ease;
}

.call-btn:hover, .composer button[type="submit"]:hover {
  background: var(--accent-hover, #0b8a7d);
}

.call-btn:active, .composer button[type="submit"]:active {
  transform: translateY(1px);
}

.text-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 10px 8px;
}

.incoming {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 16px 8px;
  padding: 12px;
  border-radius: 12px;
  background: #30343a;
}

.incoming p { margin: 0; flex: 1 0 160px; }

.log {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: min(92%, 480px);
  align-self: flex-start;
}

.chat-row.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.chat-row-avatar.person {
  width: 32px;
  height: 32px;
  box-shadow: none;
  background:
    url("/mark.png") center / 62% no-repeat,
    radial-gradient(circle at 50% 42%, #3a3d42 0%, #2a2c30 70%, #1c1d20 100%);
}

.chat-row-avatar.person.has-photo {
  box-shadow: none;
  background: transparent;
}

.chat-row-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  max-width: calc(100% - 40px);
}

.chat-row.mine .chat-row-main {
  align-items: flex-end;
}

.chat-row-name {
  font-size: 0.72rem;
  line-height: 1.2;
  color: var(--muted);
  padding: 0 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-row .bubble {
  max-width: min(100%, 420px);
}

.bubble {
  max-width: min(80%, 420px);
  padding: 10px 12px;
  border-radius: 16px 16px 16px 4px;
  background: #30343a;
  line-height: 1.4;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.bubble.mine {
  align-self: flex-end;
  border-radius: 16px 16px 4px 16px;
  background: #0d9f90;
}

.bubble a {
  color: #9fe8df;
  text-decoration: underline;
  word-break: break-all;
}

.bubble.mine a {
  color: #ffffff;
}

.bubble-text {
  white-space: pre-wrap;
}

.bubble-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 10px;
  margin: 0 0 6px;
  object-fit: contain;
  background: rgba(0, 0, 0, 0.2);
  cursor: zoom-in;
}

.bubble.recalled {
  opacity: 0.8;
  font-style: italic;
  color: rgba(255, 255, 255, 0.7);
  background: #30343a;
}

.bubble.mine.recalled {
  background: rgba(13, 159, 144, 0.4);
}

.bubble-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.bubble-meta time,
.bubble time {
  display: inline;
  margin-top: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.75rem;
}

.bubble-recall {
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.72rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.bubble-recall:hover {
  color: #fff;
}

.bubble.system {
  align-self: center;
  max-width: none;
  background: transparent;
  color: var(--muted);
  padding: 4px 8px;
  font-size: 0.85rem;
}

.composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(23, 24, 27, 0) 0%, rgba(23, 24, 27, 0.85) 28%, #17181b 100%);
}

.attach-btn {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(213, 222, 233, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #e8eaed;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.attach-btn:hover {
  border-color: rgba(13, 159, 144, 0.7);
  background: rgba(13, 159, 144, 0.08);
}

.composer input {
  flex: 1;
  min-width: 0;
  height: 44px;
  margin: 0;
  padding: 0 16px;
  border: 1px solid rgba(213, 222, 233, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #e8eaed;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.composer input::placeholder {
  color: #9aa0a6;
}

.composer input:focus {
  outline: none;
  border-color: rgba(13, 159, 144, 0.7);
  background: rgba(13, 159, 144, 0.08);
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.18);
}

.composer button[type="submit"] {
  flex: 0 0 auto;
  height: 44px;
  min-width: 72px;
}

.shell.in-call .meet {
  min-height: 0;
  height: 100vh;
}


.gate-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.gate-create {
  justify-self: center;
  align-self: center;
  border: 0;
  background: transparent;
  color: #5f6368;
  cursor: pointer;
  padding: 4px 8px;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
}

.gate-create:hover {
  color: var(--blue, #1a73e8);
}

.room-lists {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 12px 16px 16px;
  text-align: left;
  background: #fff;
  border: 1px solid #e6edf5;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.room-lists .table-wrap {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.room-lists .table-wrap > hw-data-table {
  flex: 1;
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
}

.room-lists .table-wrap > hw-data-table .hw-project-table-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.room-lists .table-wrap:empty {
  display: none;
}


.room-lists .v-data-table-footer {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-height: 44px;
  padding: 4px 8px;
  border-top: 1px solid #d5dee9;
  background: #fff;
  color: #66788f;
  font-size: 13px;
  font-weight: 400;
}

.room-lists .v-data-table-footer__items-per-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.room-lists .v-data-table-footer__items-per-page > span {
  padding-inline-end: 0;
  white-space: nowrap;
  color: #66788f;
  font-size: 13px;
}

.room-lists .v-data-table-footer select {
  height: 36px;
  min-width: 72px;
  margin-left: 0;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  background: #fff;
  color: #1a2433;
  font: inherit;
  font-size: 13px;
  padding: 0 10px;
}

.room-lists .v-data-table-footer__info {
  display: flex;
  justify-content: flex-end;
  min-width: 116px;
  padding: 0 16px;
  color: #66788f;
  font-size: 13px;
  white-space: nowrap;
}

.room-lists .v-data-table-footer__pagination {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.room-lists .v-data-table-footer__pagination button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #66788f;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.room-lists .v-data-table-footer__pagination button:hover:not(:disabled) {
  background: rgba(13, 159, 144, 0.1);
  color: #0d9f90;
}

.room-lists .v-data-table-footer__pagination button:disabled {
  opacity: 0.38;
  cursor: default;
}


.room-lists hw-data-table thead th {
  height: 40px;
  padding: 0 16px;
  color: #8a97a8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.room-lists hw-data-table tbody td {
  height: auto;
  min-height: 64px;
  padding: 14px 16px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f3f7;
}

.room-lists hw-data-table tbody tr:last-child td {
  border-bottom: 0;
}

.room-lists .meeting-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.room-lists .meeting-avatars {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.room-lists .meeting-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e3ebf4;
  background: #d7efec;
  margin-left: -8px;
}

.room-lists .meeting-avatar:first-child {
  margin-left: 0;
}

.room-lists .meeting-avatar.is-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
  font-size: 10px;
  background:
    url("/mark.png") center / 54% no-repeat,
    radial-gradient(circle at 50% 42%, #eef8f6 0%, #d7efec 100%);
}

.room-lists .meeting-avatar.is-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #5f6b7a;
  font-size: 10px;
  font-weight: 750;
  background: #f4f7fb;
}

.room-lists .meeting-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.room-lists .meeting-title {
  margin: 0;
  color: #1a2433;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-lists .meeting-sub {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.room-lists .col-status {
  width: 18%;
  min-width: 120px;
  white-space: nowrap;
  vertical-align: middle;
}

.room-lists .col-when {
  width: 18%;
  min-width: 112px;
  white-space: nowrap;
  vertical-align: middle;
  text-align: right;
}

.room-lists .col-meeting {
  min-width: 240px;
  width: 64%;
}

.room-lists .room-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.room-lists .room-status-text {
  color: #5f6b7a;
  font-size: 13px;
  font-weight: 600;
}

.room-lists .room-status-text.is-open {
  color: #1a7a45;
}

.room-lists .room-status-lock {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff4e8;
  color: #b15b12;
  font-size: 11px;
  font-weight: 700;
}

.room-lists .room-when {
  display: grid;
  gap: 2px;
  justify-items: end;
}

.room-lists .room-when-time {
  color: #1a2433;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  font-variant-numeric: tabular-nums;
}

.room-lists .room-when-date {
  color: #98a2b3;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.room-lists hw-data-table tbody tr {
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.room-lists hw-data-table tbody tr:hover td {
  background: #f8fbfa;
}

.room-list-empty {
  margin: auto;
  padding: 48px 16px;
  color: #9aa0a6;
  font-size: 0.95rem;
  text-align: center;
}

.row-menu {
  position: fixed;
  z-index: 400;
  min-width: 200px;
  padding: 4px;
  background: #fff;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.16);
}

.row-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: rgba(26, 36, 51, 0.87);
  cursor: pointer;
}

.row-menu-item:hover {
  background: rgba(13, 159, 144, 0.1);
}

.row-menu-item.is-danger {
  color: #c62828;
}

.row-menu[hidden] {
  display: none !important;
}

.password-dialog {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(244, 247, 251, 0.92);
  border-radius: inherit;
}

/* Schedule vẫn dùng overlay full-page */
.password-dialog.schedule-dialog {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(15, 23, 42, 0.28);
  border-radius: 0;
}

.room-lobby {
  position: relative;
}

.room-lobby.is-password-locked .preview {
  visibility: hidden;
}

.room-lobby.is-password-locked .password-dialog {
  visibility: visible;
}

.password-form {
  width: min(100%, 380px);
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid #d5dee9;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.16);
  text-align: left;
}

.password-form-title {
  margin: 0;
  color: #1a2433;
  font-size: 1.05rem;
  font-weight: 700;
}

.schedule-form,
.schedule-result {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  text-align: left;
  box-shadow: none;
}

.schedule-dialog {
  z-index: 150;
}

.schedule-dialog-card {
  width: min(100%, 460px);
  display: grid;
  gap: 12px;
}

.schedule-form {
  display: grid;
  gap: 12px;
}

.schedule-result {
  display: grid;
  gap: 10px;
}

.schedule-field {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #5f6368;
  font-size: 0.85rem;
  font-weight: 600;
}

.schedule-field input {
  width: 100%;
  height: 44px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  background: #fff;
  color: #1a2433;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  box-sizing: border-box;
}

.schedule-field input:focus {
  outline: none;
  border-color: #0d9f90;
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.18);
}

.schedule-participants-field {
  position: relative;
}

.schedule-participants {
  position: relative;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  background: #fff;
}

.schedule-participants:focus-within {
  border-color: #0d9f90;
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.18);
}

.schedule-participant-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.schedule-participant-chips:empty {
  display: none;
}

.schedule-participant-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  min-height: 28px;
  padding: 2px 8px 2px 4px;
  border-radius: 999px;
  background: #eef8f6;
  color: #0b8a7d;
  font-size: 12px;
  font-weight: 650;
}

.schedule-participant-chip-avatar,
.schedule-participant-suggest-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #d7efec;
}

.schedule-participant-chip-avatar.is-initials,
.schedule-participant-suggest-avatar.is-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0b7a70;
  font-size: 10px;
  font-weight: 700;
}

.schedule-participant-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-participant-chip button {
  appearance: none;
  border: 0;
  background: transparent;
  color: #5f6b7a;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
  padding: 0;
  width: 18px;
  height: 18px;
}

.schedule-participant-chip button:hover {
  color: #1a2433;
}

.schedule-participants input {
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: #f4f7fb;
  color: #1a2433;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  box-sizing: border-box;
}

.schedule-participants input:focus {
  outline: none;
  background: #eef8f6;
  box-shadow: none;
}

.schedule-participants-hint {
  margin: 0;
  color: #8a97a8;
  font-size: 12px;
  font-weight: 500;
}

.schedule-participant-suggest {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 220px;
  overflow: auto;
  padding: 6px;
  border: 1px solid #d5dee9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
}

.schedule-participant-suggest[hidden] {
  display: none !important;
}

.schedule-participant-suggest button {
  appearance: none;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #1a2433;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.schedule-participant-suggest button:hover,
.schedule-participant-suggest button.is-active {
  background: #eef8f6;
}

.schedule-participant-suggest-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schedule-participant-suggest-copy strong {
  font-size: 13px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-participant-suggest-copy span {
  color: #66788f;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-participant-suggest-empty {
  padding: 12px 8px;
  color: #8a97a8;
  font-size: 13px;
  text-align: center;
}

.schedule-actions,
.schedule-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.schedule-submit,
.schedule-secondary {
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

.schedule-submit {
  background: var(--accent, #0d9f90);
  color: #fff;
}

.schedule-submit:hover:not(:disabled):not(.is-locked) {
  background: var(--accent-hover, #0b8a7d);
}

.schedule-submit:disabled,
.schedule-submit.is-locked,
#password-submit:disabled,
#password-submit.is-locked {
  background: #c5d0de !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
}

.schedule-secondary,
.schedule-cancel {
  background: #eef2f7;
  color: #1a2433;
  border: 0;
  border-radius: 10px;
  height: 40px;
  padding: 0 14px;
  cursor: pointer;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.schedule-cancel:hover,
.schedule-secondary:hover {
  background: #e2e8f0;
}

.schedule-result {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.schedule-result-title {
  margin: 0;
  color: #1a2433;
  font-weight: 700;
}

.schedule-code {
  margin: 0;
  font-family: "DM Sans", ui-monospace, monospace;
  font-size: 1.05rem;
  font-weight: 700;
  color: #0d9f90;
  word-break: break-all;
}

#schedule-status.is-error {
  color: #b42318;
}

.meeting-meta {
  margin: 4px 0 0;
  color: #9aa0a6;
  font-size: 0.85rem;
}

.dock .round.is-active::before { background: var(--blue); }
.meet.remote-screen #remote {
  object-fit: contain;
  background: #000;
}
.meet.sharing-screen .self video {
  object-fit: cover;
  background: #202124;
}

.self .cam-off {
  z-index: 2;
}

.self .cam-off .person {
  width: 64px;
  height: 64px;
}

#local, #preview { transform: scaleX(-1); }



/* hw-date-picker Hiring parity */
.hw-date-picker-host { width: 100%; }
.hw-date-picker-root { position: relative; width: 100%; }
.hw-date-field-btn {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  background: #fff;
  color: #1a2433;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  box-sizing: border-box;
}
.hw-date-field-btn:hover,
.hw-date-picker-root.is-open .hw-date-field-btn {
  border-color: #0d9f90;
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.18);
}
.hw-date-field-btn svg { flex: 0 0 auto; color: #0b8a7d; }
.hw-date-field-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hw-date-field-clear {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #8a97a8;
  font-size: 18px;
  line-height: 1;
}
.hw-date-field-clear:hover { background: #f4f7fb; color: #1a2433; }
.hw-date-panel {
  position: absolute;
  z-index: 40;
  left: 0;
  top: calc(100% + 6px);
  width: 316px;
  max-width: min(316px, calc(100vw - 24px));
  border: 1px solid #d5dee9;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(26, 36, 51, 0.14);
  overflow: hidden;
}
.hw-date-panel--portal {
  position: fixed;
  z-index: 400;
  max-width: min(316px, calc(100vw - 24px));
}
.hw-date-picker-root.is-open {
  z-index: 50;
}
.hw-date-panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 10px 8px 14px;
  border-bottom: 1px solid #d5dee9;
}
.hw-date-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #1a2433;
  font-size: 13px;
  font-weight: 650;
}
.hw-date-today {
  border: none;
  border-radius: 999px;
  background: rgba(13, 159, 144, 0.12);
  color: #0b8f80;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  padding: 4px 10px;
  cursor: pointer;
}
.hw-date-today:hover { background: rgba(13, 159, 144, 0.2); }
.hw-date-nav { display: inline-flex; gap: 2px; }
.hw-date-nav-btn {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f6b7a;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.hw-date-nav-btn:hover { background: #f4f7fb; color: #1a2433; }
.hw-date-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px;
  padding: 8px 10px 4px;
}
.hw-date-weekday {
  height: 28px;
  display: grid;
  place-items: center;
  color: #8a97a8;
  font-size: 11px;
  font-weight: 700;
}
.hw-date-day {
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #1a2433;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.hw-date-day:hover { background: #f4f7fb; }
.hw-date-day.is-adjacent { color: #8a97a8; }
.hw-date-day.is-today { box-shadow: inset 0 0 0 1px rgba(13, 159, 144, 0.45); }
.hw-date-day.is-selected {
  background: #0d9f90 !important;
  color: #fff !important;
}
.hw-date-time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid #d5dee9;
}
.hw-date-time-row label {
  font-size: 13px;
  font-weight: 650;
  color: #66788f;
}
.hw-date-time-input {
  height: 34px;
  padding: 0 10px;
  border: 1px solid #d5dee9;
  border-radius: 8px;
  background: #fff;
  color: #1a2433;
  font: inherit;
  font-weight: 650;
}
.hw-date-time-input:focus {
  outline: none;
  border-color: #0d9f90;
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.16);
}
.hw-date-panel-foot {
  border-top: 1px solid #d5dee9;
  padding: 8px 12px 10px;
}
.hw-date-clear {
  width: 100%;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #66788f;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 8px;
  cursor: pointer;
}
.hw-date-clear:hover:not(:disabled) {
  background: #f4f7fb;
  color: #1a2433;
}
.hw-date-clear:disabled {
  opacity: 0.45;
  cursor: default;
}


.schedule-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #d5dee9;
  border-radius: 10px;
  background: #f8fafc;
  color: #1a2433;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}
.schedule-check input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #0d9f90;
  flex: 0 0 auto;
}
.schedule-check span {
  line-height: 1.35;
}


.meeting-info-card {
  width: min(100%, 440px);
  gap: 14px;
  padding: 22px 22px 18px;
}

.meeting-info-card .password-form-title {
  margin: 0;
  color: #66788f;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.meeting-info-heading {
  margin: 0;
  color: #0b8a7d;
  font-size: 1.15rem;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.meeting-info-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.meeting-info-badges:empty {
  display: none;
}

.meeting-info-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef8f6;
  color: #0b7a70;
  font-size: 12px;
  font-weight: 700;
}

.meeting-info-badge.is-lock {
  background: #fff4e8;
  color: #b15b12;
}

.meeting-info-badge.is-open {
  background: #e8f7ee;
  color: #1a7a45;
}

.meeting-info-meta {
  margin: 0;
  display: grid;
  gap: 0;
  border: 1px solid #e3ebf4;
  border-radius: 14px;
  overflow: hidden;
  background: #fbfcfe;
}

.meeting-info-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
  padding: 11px 14px;
  border-top: 1px solid #eef2f7;
}

.meeting-info-row:first-child {
  border-top: 0;
}

.meeting-info-row dt {
  margin: 0;
  color: #8a97a8;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.45;
}

.meeting-info-row dd {
  margin: 0;
  color: #1a2433;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.45;
  word-break: break-word;
}

.meeting-info-pwd {
  display: inline-block;
  margin: 0;
  padding: 4px 10px;
  border-radius: 8px;
  background: #eef8f6;
  color: #0b7a70;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.meeting-info-people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meeting-info-person {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 34px;
  padding: 3px 10px 3px 3px;
  border-radius: 999px;
  background: #f4f7fb;
  border: 1px solid #e3ebf4;
}

.meeting-info-person-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #d7efec;
}

.meeting-info-person-avatar.is-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  font-size: 11px;
  font-weight: 750;
  text-indent: -999px;
  overflow: hidden;
  background:
    url("/mark.png") center / 54% no-repeat,
    radial-gradient(circle at 50% 42%, #eef8f6 0%, #d7efec 100%);
}

.meeting-info-person-name {
  min-width: 0;
  color: #1a2433;
  font-size: 0.86rem;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#meeting-info-participants-row {
  align-items: center;
}

#meeting-info-participants-row dd {
  min-width: 0;
}

.meeting-info-link-box {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid #d7efec;
  border-radius: 12px;
  background: linear-gradient(180deg, #f4fbfa 0%, #eef8f6 100%);
}

.meeting-info-link-label {
  color: #66788f;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.meeting-info-card .meeting-info-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #0d9f90;
  font-size: 0.95rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.meeting-info-card .meeting-info-link::after {
  content: "↗";
  font-size: 0.85em;
  opacity: 0.8;
}

.meeting-info-card .meeting-info-link:hover {
  text-decoration: underline;
}

.meeting-info-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.meeting-info-actions .schedule-submit {
  grid-column: 1 / -1;
}

.meeting-info-actions .schedule-secondary.hidden {
  display: none !important;
}

.meeting-info-card .schedule-cancel {
  width: 100%;
}

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


button.meeting-url {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0d9f90;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: left;
  word-break: break-all;
  cursor: pointer;
}

button.meeting-url:hover {
  text-decoration: underline;
}


.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 600;
  transform: translateX(-50%);
  max-width: min(92vw, 420px);
  padding: 10px 14px;
  border-radius: 10px;
  background: #1a2433;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 10px 24px rgba(26, 36, 51, 0.2);
}

.toast[hidden] {
  display: none !important;
}


.guest-identity {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 92px;
  z-index: 4;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
  color: #fff;
}

.guest-identity.hidden {
  display: none !important;
}

.guest-identity-label {
  margin: 0;
  font-size: 12px;
  font-weight: 650;
  color: rgba(255, 255, 255, 0.82);
}

.guest-identity-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guest-identity-chip {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  min-height: 34px;
  margin: 0;
  padding: 3px 10px 3px 3px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.guest-identity-chip:hover,
.guest-identity-chip.is-active {
  background: rgba(13, 159, 144, 0.35);
  border-color: rgba(13, 159, 144, 0.55);
}

.guest-identity-chip-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  background: #d7efec;
}

.guest-identity-chip-avatar.is-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  text-indent: -999px;
  overflow: hidden;
  background:
    url("/mark.png") center / 54% no-repeat,
    radial-gradient(circle at 50% 42%, #eef8f6 0%, #d7efec 100%);
}


.guest-name-form {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}

.guest-name-form input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  outline: none;
}

.guest-name-form input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.guest-name-form input:focus {
  border-color: rgba(13, 159, 144, 0.7);
  box-shadow: 0 0 0 3px rgba(13, 159, 144, 0.22);
}

.guest-name-submit {
  flex: 0 0 auto;
  min-height: 40px;
  margin: 0;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.guest-name-submit:hover {
  background: var(--accent-hover);
}

.guest-identity-list:empty {
  display: none;
}

@media (max-width: 560px) {
  .guest-name-form {
    flex-direction: column;
  }
  .guest-name-form input,
  .guest-name-submit {
    min-height: 48px;
    font-size: 16px;
    width: 100%;
  }
}

.guest-identity-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.chat {
  position: relative;
}

.chat.is-dragover .chat-drop-hint {
  display: grid !important;
}

.chat-drop-hint {
  display: none;
  position: absolute;
  inset: 48px 12px 72px;
  z-index: 8;
  place-items: center;
  border: 2px dashed rgba(13, 159, 144, 0.7);
  border-radius: 16px;
  background: rgba(13, 159, 144, 0.12);
  color: #9fe8df;
  font-weight: 700;
  font-size: 0.95rem;
  pointer-events: none;
}

.chat-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(8, 10, 14, 0.88);
  cursor: zoom-out;
}

.chat-lightbox.hidden {
  display: none !important;
}

.chat-lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 92vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  background: #111;
  cursor: default;
}

.chat-lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.chat-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}


.shell.is-chat-dragover .chat {
  pointer-events: auto !important;
}
.shell.is-chat-dragover.chat-collapsed .log,
.shell.is-chat-dragover.chat-collapsed .composer,
.shell.is-chat-dragover.chat-collapsed .chat-drop-hint {
  display: block !important;
}
.shell.is-chat-dragover .chat-drop-hint {
  display: grid !important;
}


/* Local screen share: không chiếu lại màn hình của mình (tránh gương lồng gương). */
.self-share {
  position: absolute;
  left: 50%;
  top: 16px;
  transform: translateX(-50%);
  z-index: 7;
  display: grid;
  gap: 4px;
  place-items: center;
  max-width: min(92%, 420px);
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(20, 24, 30, 0.9);
  color: #e8eaed;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.self-share.hidden { display: none !important; }
.self-share strong { font-size: 0.95rem; font-weight: 700; }
.self-share span { font-size: 0.8rem; color: #9aa0a6; line-height: 1.35; }
.meet.solo .self-share,
.meet.sharing-screen:not(.remote-screen) .self-share.is-alone {
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 22px 28px;
}
.meet.sharing-screen.solo #remote {
  opacity: 0;
}

/* Thu nhỏ / phóng PiP + danh sách người tham gia */
.float-panel {
  pointer-events: auto;
}

.float-collapse {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 6;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(32, 33, 36, 0.92);
  color: #e8eaed;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.float-collapse svg {
  width: 16px;
  height: 16px;
}

.float-panel:hover .float-collapse,
.float-panel:focus-within .float-collapse {
  opacity: 1;
  pointer-events: auto;
}

.float-panel.is-collapsed .float-collapse {
  display: none;
}

.float-panel.is-collapsed .call-roster,
.float-panel.is-collapsed .self {
  display: none !important;
}

.float-expand {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  place-items: center;
  background: rgba(32, 33, 36, 0.92);
  color: #e8eaed;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.float-expand svg {
  width: 22px;
  height: 22px;
}

.float-expand-avatar.person {
  width: 32px;
  height: 32px;
  box-shadow: none;
}

.float-panel.is-collapsed .float-expand {
  display: grid;
}

.self-wrap .float-collapse {
  top: 8px;
  right: 8px;
}

/* Drag float panels + chat icon */
.float-panel.is-draggable,
.shell.chat-collapsed .chat-tools.is-draggable {
  touch-action: none;
  cursor: grab;
  user-select: none;
}

.float-panel.is-dragging,
.shell.chat-collapsed .chat.is-dragging {
  cursor: grabbing;
  z-index: 40;
  opacity: 0.96;
}

.float-panel.is-positioned {
  right: auto !important;
  bottom: auto !important;
}

.shell.chat-collapsed .chat.is-positioned {
  inset: auto !important;
  width: auto;
  height: auto;
}

.shell.chat-collapsed .chat-tools {
  cursor: grab;
}

/* ===== Mobile: lobby / phòng chờ / nhập mật khẩu ===== */
@media (max-width: 800px) {
  .gate {
    padding-left: max(12px, var(--safe-left, 0px));
    padding-right: max(12px, var(--safe-right, 0px));
    padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
  }

  .gate-card {
    width: 100%;
    max-width: 100%;
    padding: 0 4px;
  }

  .room-lists,
  .table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .room-lobby {
    min-height: 100dvh;
    min-height: 100vh;
    align-content: start;
    place-items: stretch;
    padding:
      max(12px, calc(var(--nav-h, 56px) + var(--safe-top, 0px) - 40px))
      max(12px, var(--safe-left, 0px))
      max(16px, env(safe-area-inset-bottom, 0px))
      max(12px, var(--safe-right, 0px));
    box-sizing: border-box;
  }

  .shell .room-lobby {
    padding-top: 12px;
  }

  .room-lobby-frame {
    width: 100%;
    max-width: 100%;
    gap: 12px;
    min-height: 0;
  }

  .room-lobby-title {
    font-size: clamp(1.75rem, 7.5vw, 2.1rem);
    font-weight: 800;
    padding: 0 2px;
    line-height: 1.2;
  }

  .room-lobby .preview-bar {
    left: 8px;
    right: 8px;
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    row-gap: 10px;
  }

  .room-lobby .preview-bar .round {
    width: 58px;
    height: 68px;
  }

  .room-lobby .preview-bar .round::before,
  .room-lobby .preview-bar .round svg {
    width: 52px;
    height: 52px;
  }

  .lobby-join,
  .lobby-leave {
    margin-left: 0;
    min-height: 52px;
    padding: 14px 22px;
    font-size: 17px;
    font-weight: 700;
    border-radius: 26px;
  }

  .roster {
    top: 10px;
    left: 10px;
    bottom: auto;
    max-width: calc(100% - 20px);
    min-width: 0;
    padding: 8px 10px;
    gap: 8px;
    font-size: 0.85rem;
  }

  .schedule-hint {
    left: 12px;
    right: 12px;
    bottom: 78px;
    transform: none;
    max-width: none;
    width: auto;
    font-size: 0.82rem;
    padding: 8px 10px;
  }

  .guest-identity {
    left: 8px;
    right: 8px;
    bottom: 78px;
    padding: 8px 10px;
  }

  .guest-identity-chip {
    min-height: 40px;
    font-size: 13px;
  }

  .password-dialog {
    padding: max(12px, var(--safe-left, 0px));
    align-items: center;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  .password-form,
  .schedule-dialog-card {
    width: min(100%, 420px);
    max-width: 100%;
    gap: 14px;
    padding: 18px 16px;
    border-radius: 16px;
    box-sizing: border-box;
  }

  .password-form-title {
    font-size: 1.15rem;
    font-weight: 800;
  }

  .schedule-field input,
  .password-form input,
  #join-password {
    min-height: 48px;
    font-size: 16px !important; /* tránh iOS auto-zoom */
    border-radius: 12px;
    box-sizing: border-box;
  }

  .schedule-actions,
  .schedule-result-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .schedule-actions .schedule-submit,
  .schedule-actions .schedule-cancel,
  .schedule-result-actions button,
  #password-submit {
    width: 100%;
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
  }

  .schedule-check {
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    line-height: 1.35;
  }
}

@media (max-width: 560px) {
  .room-lobby {
    padding-left: 10px;
    padding-right: 10px;
  }

  .room-lobby-title {
    text-align: left;
  }

  .room-lobby .preview {
    min-height: min(70vh, 520px);
    aspect-ratio: 3 / 4;
    max-height: calc(100dvh - 110px);
  }

  .room-lobby .preview-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .lobby-join {
    flex: 1 1 100%;
    order: 3;
    width: 100%;
    margin-top: 2px;
  }

  .lobby-leave {
    flex: 1 1 auto;
  }

  .roster {
    padding: 8px;
    border-radius: 10px;
  }

  .password-dialog {
    background: rgba(244, 247, 251, 0.96);
  }

  .password-form {
    padding: 20px 16px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  }

  .gate-row {
    border-radius: 14px;
  }

  .gate-row input,
  .gate-row .join {
    font-size: 16px;
  }
}

@media (max-width: 400px) {
  .room-lobby .preview {
    min-height: 64vh;
  }

  .room-lobby-title {
    font-size: 1.55rem;
  }

  .caption {
    font-size: 11px;
  }
}


