:root {
  --bg: #05060b;
  --bg-elevated: #0b0c16;
  --bg-elevated-2: #101120;
  --accent: #ff2ea3;
  --accent-soft: #ff2ea30f;
  --accent-strong: #ff2ea3;
  --accent-alt: #7b3cff;
  --text: #fefefe;
  --text-muted: rgba(255, 255, 255, 0.65);
  --border-soft: rgba(255, 255, 255, 0.06);
  --danger: #ff3b5c;
  --success: #2bd27b;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.7);
  --shadow-inner: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  --transition-fast: 150ms ease-out;
  --transition-med: 220ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body.app-root {
  min-height: 100vh;
  background:
    radial-gradient(circle at 0% 0%, #210e37 0, transparent 46%),
    radial-gradient(circle at 100% 0%, #3c0d39 0, transparent 46%),
    radial-gradient(circle at 50% 100%, #150c25 0, transparent 50%),
    #05060b;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: flex;
  flex-direction: column;
}

/* Vistas genéricas */

.view {
  display: none;
}

.view.is-visible {
  display: block;
}

/* Topbar */

.topbar {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: linear-gradient(90deg, #0c0c14 0%, #1b0b2c 35%, #0c0c14 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 12px;
}

.topbar-divider {
  opacity: 0.5;
}

.topbar-room,
.topbar-pill {
  background: radial-gradient(circle at 0 0, #ff2ea3 0, #8b3cff 75%);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-user {
  font-size: 13px;
  color: var(--text-muted);
}

/* Auth view */

.view-auth {
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px 16px;
}

.view-auth.is-visible {
  display: flex;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at 0 0, #331734 0, #151524 60%, #05060b 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  padding: 24px 22px 26px;
}

.auth-title {
  font-size: 20px;
  margin: 0 0 6px;
}

.auth-subtitle {
  margin: 0 0 16px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-tabs {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.55);
  border-radius: 999px;
  padding: 2px;
  margin: 0 0 18px;
}

.auth-tab {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.auth-tab.is-active {
  background: radial-gradient(circle at 0 0, #ff2ea3 0, #7b3cff 80%);
  color: #fff;
  transform: translateY(-1px);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.field-label {
  font-size: 12px;
  margin-bottom: 4px;
  color: var(--text-muted);
}

.field-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.7);
  color: var(--text);
  font-size: 13px;
  margin-bottom: 12px;
}

.field-input:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 46, 163, 0.5);
}

.auth-error {
  min-height: 18px;
  font-size: 11px;
  color: var(--danger);
  margin-top: 2px;
}

/* Botones genéricos */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  transition: background var(--transition-fast), transform var(--transition-fast),
    box-shadow var(--transition-fast);
}

.btn:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-0.5px);
}

.btn:active {
  transform: translateY(0);
}

.btn-pill {
  border-radius: var(--radius-pill);
}

.btn-primary {
  background: radial-gradient(circle at 0 0, #ff2ea3 0, #a03cff 80%);
  box-shadow: 0 0 24px rgba(255, 46, 163, 0.55);
}

.btn-primary:hover {
  box-shadow: 0 0 28px rgba(255, 46, 163, 0.7);
}

.btn-primary:active {
  box-shadow: 0 0 18px rgba(255, 46, 163, 0.4);
}

.btn-block {
  width: 100%;
}

.btn-logout {
  font-size: 12px;
  padding: 6px 14px;
}

/* Main layout */

.main-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Sala */

.view-room {
  flex: 1;
  padding: 14px 16px 20px;
}

.room-layout {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr);
  gap: 18px;
}

/* Columna izquierda */

.col-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  font-size: 15px;
  margin: 0 0 6px;
}

.own-video-wrapper {
  position: relative;
  background: radial-gradient(circle at 0 0, #1c1028 0, #05060b 70%);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 10px;
  min-height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.own-video-wrapper video {
  width: 100%;
  height: 230px;
  border-radius: 18px;
  background: #000;
  object-fit: cover;
}

.own-video-controls {
  position: absolute;
  left: 20px;
  bottom: 16px;
  display: flex;
  gap: 10px;
}

.toggle-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 0 0, #101020 0, #05060b 80%);
  color: #f5f5f5;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), color var(--transition-fast);
}

.toggle-circle.is-off {
  background: radial-gradient(circle at 0 0, #421020 0, #12040b 80%);
  color: #ffb3c8;
}

.toggle-circle:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.8);
}

.toggle-circle:active {
  transform: translateY(0);
}

/* Cabinas */

.cabins-wrapper {
  margin-top: 6px;
}

.cabins-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 10px;
}

.cabins-header span {
  font-size: 12px;
  color: var(--text-muted);
}

.cabins-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cabin-card {
  border-radius: 18px;
  padding: 10px 12px;
  background: radial-gradient(circle at 0 0, #1a1027 0, #05060b 70%);
  border: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* Columna derecha */

.col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Ventana de chat retro */

.chat-window {
  background: radial-gradient(circle at 0 0, #44133a 0, #171324 60%, #07040d 100%);
  border-radius: 26px;
  box-shadow: var(--shadow-soft);
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chat-dots {
  display: flex;
  gap: 6px;
}

.chat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.chat-dot.dot-red {
  background: #ff5f57;
}

.chat-dot.dot-yellow {
  background: #ffbd2e;
}

.chat-dot.dot-green {
  background: #28c840;
}

.chat-title-pill {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  background: rgba(0, 0, 0, 0.65);
}

.chat-room-label {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-body {
  flex: 1;
  border-radius: 18px;
  background: linear-gradient(135deg, #fefefe 0%, #f5f6ff 40%, #f8f1ff 100%);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
  padding: 12px;
  overflow-y: auto;
  color: #101020;
}

.chat-footer {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-wrapper {
  flex: 1;
  position: relative;
}

.chat-input {
  width: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.85);
  color: var(--text);
  padding: 8px 12px 8px 32px;
  font-size: 13px;
}

.chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.emoji-toggle {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
}

.emoji-toggle span {
  font-size: 16px;
}

.emoji-panel {
  position: absolute;
  left: 0;
  bottom: 110%;
  background: rgba(5, 6, 11, 0.98);
  border-radius: 12px;
  padding: 6px;
  display: none;
  flex-wrap: wrap;
  gap: 4px;
  box-shadow: var(--shadow-soft);
  z-index: 10;
}

.emoji-panel.is-open {
  display: flex;
}

.emoji-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
}

/* Botón enviar */

.btn-send {
  min-width: 80px;
}

/* Lista de usuarios */

.users-panel {
  background: radial-gradient(circle at 0 0, #32133a 0, #07080f 60%, #05060b 100%);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 12px 10px 14px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
}

.users-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.users-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.users-title {
  font-size: 13px;
  font-weight: 600;
}

.users-subtitle {
  font-size: 11px;
  color: var(--text-muted);
}

.users-filters {
  display: flex;
  gap: 6px;
  font-size: 11px;
}

.users-filter {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 11px;
}

.users-filter.is-active {
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.users-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  flex: 1;
  overflow-y: auto;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.user-item:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 0 0, #ff2ea3 0, #7b3cff 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

.user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-name {
  font-size: 12px;
}

.user-gender-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
}

.user-meta-row {
  font-size: 11px;
  color: var(--text-muted);
}

.user-status {
  display: flex;
  align-items: center;
  justify-content: center;
}

.user-cam-indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

.user-cam-indicator.is-on {
  background: #2bd27b;
}

/* Responsivo */

@media (max-width: 980px) {
  .room-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .col-right {
    order: -1;
  }
}

:root {
  --bg: #05060b;
  --bg-elevated: #0b0b10;
  --bg-elevated-soft: #10121c;
  --bg-elevated-softer: #141827;
  --bg-chip: rgba(255, 255, 255, 0.04);
  --bg-input: rgba(8, 10, 20, 0.9);
  --bg-tv: #15151f;
  --bg-tv-border: #252538;
  --bg-tv-screen: #050509;
  --bg-tv-screen-glow: rgba(255, 0
  /* …y sigue todo tal como ya lo tenés… */
  --bg-tv-scanlines: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.18);

  --accent: #ff2ea3;
  --accent-soft: rgba(255, 46, 163, 0.16);
  --accent-strong: #ff4fb4;
  --accent-alt: #03aee4;

  --text: #ffffff;
  --text-soft: rgba(255, 255, 255, 0.75);
  --text-mute: rgba(255, 255, 255, 0.5);

  --danger: #ff4b6a;
  --success: #1dd1a1;

  --shadow-soft: 0 24px 60px rgba(0, 0, 0, 0.65);
  --shadow-inner: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Reset simple */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  background: radial-gradient(circle at top, #16192b 0%, #05060b 60%, #02030a 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

/* App root */
.app-root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(5, 6, 11, 0.9);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.topbar-divider {
  opacity: 0.5;
}

.topbar-pill {
  font-size: 0.78rem;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: radial-gradient(circle at top left, rgba(255, 46, 163, 0.25), transparent 50%);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topbar-user {
  font-size: 0.8rem;
  color: var(--text-soft);
}

.topbar-logout {
  font-size: 0.8rem;
  padding-inline: 10px;
}

/* Main */
.main {
  flex: 1;
  display: flex;
  padding: 16px;
}

/* Views genéricas */
.view {
  display: none;
}

.view.is-visible {
  display: block;
}

.view-auth {
  justify-content: center;
  align-items: center;
  flex: 1;
  padding: 40px 16px;
}

.view-room {
  flex: 1;
}

/* Auth card */
.auth-card {
  max-width: 960px;
  margin: 0 auto;
  background: radial-gradient(circle at top, rgba(255, 46, 163, 0.18), transparent 55%),
    radial-gradient(circle at bottom right, rgba(3, 174, 228, 0.16), transparent 55%),
    rgba(5, 6, 11, 0.96);
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  gap: 24px;
}

.auth-tabs {
  display: inline-flex;
  background: rgba(8, 10, 20, 0.9);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 18px;
}

.auth-tab {
  border: none;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.82rem;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.auth-tab.is-active {
  background: radial-gradient(circle at top, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 46, 163, 0.55);
}

.auth-forms {
  display: flex;
  flex-direction: column;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-title {
  font-size: 1.3rem;
  margin: 0 0 6px;
}

.auth-subtitle {
  font-size: 0.86rem;
  color: var(--text-soft);
  margin: 0 0 12px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-label {
  font-size: 0.78rem;
  color: var(--text-soft);
}

.field-input {
  background: var(--bg-input);
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.85rem;
  outline: none;
}

.field-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(255, 46, 163, 0.4);
}

.auth-error {
  color: var(--danger);
  font-size: 0.8rem;
  min-height: 1.2em;
}

.auth-success {
  color: var(--success);
  font-size: 0.8rem;
  min-height: 1.2em;
}

/* Botones genéricos */
.btn {
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-weight: 500;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 12px 30px rgba(255, 46, 163, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.btn-block {
  width: 100%;
}

.btn-pill {
  border-radius: 999px;
}

.btn-icon {
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 10, 20, 0.95);
  color: #fff;
  font-size: 1rem;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Layout sala */
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.1fr);
  gap: 14px;
  width: 100%;
}

.col-left,
.col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.section-title {
  font-size: 0.94rem;
  margin: 0 0 6px;
}

.section-title-secondary {
  margin-top: 16px;
}

/* Video propio */
.own-video-wrapper {
  background: radial-gradient(circle at top left, rgba(255, 46, 163, 0.18), transparent 60%),
    var(--bg-elevated-softer);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#localVideo {
  width: 100%;
  height: 220px;
  background: #05060b;
  border-radius: 10px;
  object-fit: cover;
}

.own-video-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.media-toggle {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 6, 11, 0.9);
  position: relative;
}

.media-toggle::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.media-toggle-mic::after {
  content: "🎤";
}
.media-toggle-cam::after {
  content: "📷";
}

.media-toggle.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(255, 46, 163, 0.6);
}

/* Retro TVs */
.retro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, 160px);
  gap: 10px;
}

.tv {
  background: radial-gradient(circle at top left, rgba(255, 46, 163, 0.25), transparent 55%),
    linear-gradient(135deg, #141625, #0a0b14);
  border-radius: 14px;
  border: 1px solid var(--bg-tv-border);
  box-shadow: var(--shadow-soft);
  position: relative;
}

.tv-inner {
  padding: 8px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tv-screen {
  flex: 1;
  border-radius: 10px;
  background: radial-gradient(circle at center, #11131e 0%, #050509 60%);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 0 25px rgba(255, 0, 128, 0.22);
}

.tv-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.1) saturate(1.05);
}

.tv-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 40%, rgba(0, 0, 0, 0.55));
  pointer-events: none;
}

.tv-scanlines {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.08) 0,
    rgba(255, 255, 255, 0.08) 1px,
    transparent 1px,
    transparent 3px
  );
  mix-blend-mode: soft-light;
  opacity: 0.22;
  pointer-events: none;
}

.tv-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.7rem;
  color: var(--text-soft);
}

.tv-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.tv-user {
  font-weight: 500;
}

/* Paneles derecha */
.panel {
  background: rgba(5, 6, 11, 0.96);
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-subtle);
  background: radial-gradient(circle at top left, rgba(255, 46, 163, 0.2), transparent 60%);
}

.panel-title {
  font-size: 0.86rem;
  margin: 0;
}

/* Chat */
.chat-messages {
  flex: 1;
  padding: 8px 10px;
  font-size: 0.82rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 260px;
  overflow-y: auto;
}

.chat-message {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 6px;
  align-items: baseline;
}

.chat-author {
  color: var(--accent-alt);
  font-weight: 600;
}

.chat-text {
  color: var(--text-soft);
}

.chat-time {
  color: var(--text-mute);
  font-size: 0.7rem;
}

.chat-input-row {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-top: 1px solid var(--border-subtle);
}

.chat-input {
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 10, 20, 0.95);
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.84rem;
  outline: none;
}

.emoji-panel {
  position: absolute;
  bottom: 48px;
  left: 8px;
  background: rgba(8, 10, 20, 0.98);
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  padding: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 180px;
}

.emoji-btn {
  border-radius: 999px;
  border: none;
  background: rgba(20, 22, 33, 0.95);
  color: #fff;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

/* Usuarios */
.panel-users {
  min-height: 220px;
}

.users-filter-row {
  display: flex;
  gap: 6px;
  padding: 8px 10px 4px;
}

.users-filter {
  flex: 1;
  font-size: 0.76rem;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(8, 10, 20, 0.96);
  color: var(--text-soft);
  cursor: pointer;
}

.users-filter.is-active {
  background: radial-gradient(circle at top, var(--accent), var(--accent-strong));
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 46, 163, 0.55);
}

.users-pane {
  padding: 6px 10px 10px;
  max-height: 260px;
  overflow-y: auto;
}

.users-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-main {
  display: flex;
  align-items: center;
  gap: 6px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: radial-gradient(circle at top, var(--accent-soft), #141625);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.user-meta {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.82rem;
}

.user-status {
  font-size: 0.7rem;
  color: var(--text-mute);
}

/* Perfil */
.view-profile {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 20px 12px;
}

.profile-card {
  max-width: 640px;
  width: 100%;
  background: rgba(5, 6, 11, 0.96);
  border-radius: 16px;
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-soft);
  padding: 16px 16px 20px;
}

.profile-header {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: radial-gradient(circle at top, var(--accent-soft), #141625);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.profile-header-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.profile-title {
  font-size: 1.1rem;
  margin: 0;
}

.profile-subtitle {
  font-size: 0.82rem;
  color: var(--text-soft);
  margin: 0;
}

.profile-section {
  margin-top: 12px;
}

.profile-section-title {
  font-size: 0.9rem;
  margin: 0 0 4px;
}

.profile-summary {
  font-size: 0.85rem;
  color: var(--text-soft);
}

.profile-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mini-profile-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: radial-gradient(circle at top, var(--accent-soft), #141625);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}

.mini-profile-name {
  font-size: 0.92rem;
  font-weight: 600;
}

.mini-profile-vip-badge {
  font-size: 0.65rem;
  border-radius: 999px;
  padding: 2px 6px;
  background: linear-gradient(135deg, #f8d76b, #f39c12);
  color: #3b2400;
  font-weight: 600;
}

.mini-profile-tag {
  font-size: 0.7rem;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.06);
}

/* Checkbox */
.field-inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
}

/* Responsive */
@media (max-width: 640px) {
  .topbar {
    padding-inline: 10px;
  }

  #localVideo {
    height: 180px;
  }

  .retro-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, 140px);
  }
}

@media (max-width: 640px) {
  .auth-card {
    padding-inline: 18px;
  }

  .own-video-wrapper video {
    height: 190px;
  }

  .cabins-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chat-window,
  .users-panel {
    border-radius: 18px;
  }
}
