/* ============================================================
   CineRoom — Components
   ============================================================ */

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  font-weight: 600;
  font-size: var(--text-body);
  line-height: 1;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  padding: 0 var(--sp-5);
  height: 44px;
  transition: background-color var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out),
    color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease-out);
  user-select: none;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn--sm { height: 36px; padding: 0 var(--sp-4); font-size: var(--text-caption); border-radius: var(--radius-sm); }
.btn--lg { height: 52px; padding: 0 var(--sp-8); font-size: var(--text-body-lg); border-radius: var(--radius-md); }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--primary);
  color: var(--primary-contrast);
}
.btn--primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-glow); }
.btn--primary:active { background: var(--primary-active); }

.btn--secondary {
  background: var(--surface-elevated);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn--secondary:hover { border-color: var(--primary); color: var(--primary); }

.btn--ghost {
  color: var(--text-secondary);
  background: transparent;
}
.btn--ghost:hover { color: var(--text-primary); background: var(--primary-soft); }

.btn--danger {
  background: transparent;
  border-color: var(--error);
  color: var(--error);
}
.btn--danger:hover { background: var(--error); color: #fff; }

.btn[disabled], .btn.is-disabled {
  opacity: 0.45;
  pointer-events: none;
}

/* Icon-only button */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: background-color var(--dur-fast), color var(--dur-fast);
  flex: none;
}
.icon-btn:hover { background: var(--primary-soft); color: var(--text-primary); }
.icon-btn svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------
   Inputs
   ------------------------------------------------------------ */
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field__label {
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-secondary);
}
.field__label .optional { color: var(--text-muted); font-weight: 400; }

.input,
.textarea,
.select {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 var(--sp-4);
  height: 48px;
  color: var(--text-primary);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast), background-color var(--dur-fast);
}
.textarea {
  height: auto;
  min-height: 96px;
  padding: var(--sp-3) var(--sp-4);
  resize: vertical;
  line-height: var(--lh-body);
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--border-strong); }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.input.is-invalid { border-color: var(--error); }
.field__error { font-size: var(--text-meta); color: var(--error); }
.field__hint { font-size: var(--text-meta); color: var(--text-muted); }

.input-wrap { position: relative; }
.input-wrap .input { padding-inline-start: var(--sp-10); }
.input-wrap > svg {
  position: absolute;
  inset-inline-start: var(--sp-4);
  top: 50%;
  translate: 0 -50%;
  width: 18px; height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.password-toggle {
  position: absolute;
  inset-inline-end: var(--sp-2);
  top: 50%;
  translate: 0 -50%;
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
}
.password-toggle:hover { color: var(--text-primary); }
.password-toggle svg { width: 18px; height: 18px; }

/* Select */
.select-wrap { position: relative; }
.select {
  appearance: none;
  padding-inline-end: var(--sp-10);
  cursor: pointer;
}
.select-wrap::after {
  content: "";
  position: absolute;
  inset-inline-end: var(--sp-4);
  top: 50%;
  width: 8px; height: 8px;
  border-inline-start: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  rotate: -45deg;
  translate: 0 -65%;
  pointer-events: none;
}

/* Toggle switch */
.toggle { display: inline-flex; align-items: center; gap: var(--sp-3); cursor: pointer; }
.toggle input { position: absolute; opacity: 0; }
.toggle__track {
  width: 44px; height: 26px;
  border-radius: var(--radius-pill);
  background: var(--border-strong);
  position: relative;
  transition: background-color var(--dur-base) var(--ease-out);
  flex: none;
}
.toggle__track::after {
  content: "";
  position: absolute;
  top: 3px;
  inset-inline-start: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: translate var(--dur-base) var(--ease-out);
}
.toggle input:checked + .toggle__track { background: var(--primary); }
.toggle input:checked + .toggle__track::after { translate: -18px 0; }
.toggle input:focus-visible + .toggle__track { outline: 2px solid var(--primary); outline-offset: 2px; }
[dir="ltr"] .toggle input:checked + .toggle__track::after { translate: 18px 0; }

/* ------------------------------------------------------------
   Badges / chips / pills
   ------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-meta);
  font-weight: 600;
  line-height: 1;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--primary-soft);
  color: var(--on-soft);
}
.badge svg { width: 12px; height: 12px; }
.badge--success { background: var(--success-soft); color: var(--success); }
.badge--warning { background: var(--warning-soft); color: var(--warning); }
.badge--error { background: var(--error-soft); color: var(--error); }
.badge--neutral { background: var(--primary-soft); color: var(--text-secondary); }

.badge--live::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--error);
  animation: live-pulse 1.6s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--error-soft); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px var(--error-soft); }
}

/* Filter chips */
.chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: var(--text-caption);
  font-weight: 500;
  transition: all var(--dur-fast) var(--ease-out);
}
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-contrast);
}

/* Segmented control */
.segmented {
  display: inline-flex;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 3px;
  gap: 2px;
}
.segmented__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 var(--sp-4);
  border-radius: 9px;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease-out);
  flex: 1;
}
.segmented__item svg { width: 15px; height: 15px; }
.segmented__item:hover { color: var(--text-primary); }
.segmented__item.is-active {
  background: var(--surface-elevated);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ------------------------------------------------------------
   Avatars
   ------------------------------------------------------------ */
.avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--on-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-caption);
  font-weight: 700;
  flex: none;
  user-select: none;
}
.avatar--sm { width: 30px; height: 30px; font-size: var(--text-meta); }
.avatar--lg { width: 56px; height: 56px; font-size: var(--text-h3); }
.avatar--xl { width: 88px; height: 88px; font-size: 2rem; }
.avatar--online { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--success); }

.avatar-stack { display: flex; }
.avatar-stack .avatar {
  width: 30px; height: 30px;
  font-size: var(--text-meta);
  box-shadow: 0 0 0 2px var(--surface);
}
.avatar-stack .avatar + .avatar { margin-inline-start: -9px; }
.avatar-stack__more {
  display: inline-flex;
  align-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  margin-inline-start: -9px;
  padding-inline-start: 9px;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  font-size: var(--text-meta);
  color: var(--text-secondary);
  box-shadow: 0 0 0 2px var(--surface);
}

/* ------------------------------------------------------------
   Poster
   ------------------------------------------------------------ */
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
  background: var(--poster-fallback);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  flex: none;
}
.poster--wide { aspect-ratio: 16 / 9; }
.poster--fill { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; }
.poster__inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  padding: var(--sp-4);
}
.poster__inner svg { width: 30%; max-width: 64px; height: auto; opacity: 0.5; }
.poster__title {
  font-weight: 700;
  color: rgba(255, 255, 255, 0.75);
  font-size: var(--text-caption);
  letter-spacing: 0.02em;
  direction: ltr;
}
.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10, 6, 8, 0.55) 100%);
  pointer-events: none;
}

/* ------------------------------------------------------------
   Cards
   ------------------------------------------------------------ */
.room-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-base) var(--ease-out),
    border-color var(--dur-base) var(--ease-out),
    box-shadow var(--dur-base) var(--ease-out);
}
.room-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.room-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.room-card__media .poster--fill { transition: scale var(--dur-slow) var(--ease-out); }
.room-card:hover .room-card__media .poster--fill { scale: 1.04; }
.room-card__status {
  position: absolute;
  top: var(--sp-3);
  inset-inline-start: var(--sp-3);
  z-index: 2;
}
.room-card__type {
  position: absolute;
  top: var(--sp-3);
  inset-inline-end: var(--sp-3);
  z-index: 2;
}
.room-card__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
}
.room-card__title { font-size: var(--text-h3); font-weight: 700; line-height: 1.4; }
.room-card__movie { font-size: var(--text-caption); color: var(--text-secondary); direction: ltr; text-align: end; }
.room-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-top: auto;
}
.room-card__host { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--text-caption); color: var(--text-secondary); }
.room-card__meta { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--text-meta); color: var(--text-muted); }
.room-card__meta span { display: inline-flex; align-items: center; gap: 5px; }
.room-card__meta svg { width: 14px; height: 14px; }
.room-card__action { padding: 0 var(--sp-4) var(--sp-4); }

/* Hover join overlay */
.room-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--overlay);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.room-card:hover .room-card__overlay { opacity: 1; }
@media (hover: none) {
  .room-card__overlay { display: none; }
}

/* ------------------------------------------------------------
   Tabs
   ------------------------------------------------------------ */
.tabs {
  display: flex;
  gap: var(--sp-1);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-2);
}
.tab {
  position: relative;
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-caption);
  font-weight: 600;
  color: var(--text-muted);
  transition: color var(--dur-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.tab svg { width: 16px; height: 16px; }
.tab:hover { color: var(--text-secondary); }
.tab.is-active { color: var(--text-primary); }
.tab.is-active::after {
  content: "";
  position: absolute;
  inset-inline: var(--sp-3);
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.tab__count {
  background: var(--primary-soft);
  color: var(--on-soft);
  border-radius: var(--radius-pill);
  font-size: var(--text-meta);
  padding: 1px 7px;
}

/* ------------------------------------------------------------
   Modals / Bottom sheets
   ------------------------------------------------------------ */
.overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  background: var(--overlay);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-6);
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
}
.overlay.is-open { opacity: 1; }
.overlay[hidden] { display: none; }

.modal {
  width: 100%;
  max-width: 440px;
  max-height: calc(100dvh - 2 * var(--sp-10));
  overflow: auto;
  background: var(--surface-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-6);
  transform: scale(0.96) translateY(10px);
  transition: transform var(--dur-base) var(--ease-out);
}
.overlay.is-open .modal { transform: none; }
.modal--wide { max-width: 560px; }
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-2);
}
.modal__title { font-size: var(--text-h3); font-weight: 700; }
.modal__text { color: var(--text-secondary); font-size: var(--text-caption); margin-bottom: var(--sp-5); }
.modal__actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
}
.modal__actions .btn { flex: 1; }

/* Bottom sheet (mobile-native pattern) */
.sheet {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: var(--z-sheet);
  max-height: 82dvh;
  display: flex;
  flex-direction: column;
  background: var(--surface-modal);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  box-shadow: var(--shadow-lg);
  transform: translateY(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.sheet.is-open { transform: none; }
.sheet[hidden] { display: none; }

/* Sheet inside a backdrop overlay (mobile: docked bottom, desktop: centered) */
.overlay--sheet {
  padding: 0;
  align-items: flex-end;
  z-index: var(--z-sheet);
}
.overlay--sheet .sheet {
  position: relative;
  inset: auto;
  /* Neutralize the legacy standalone `.sheet` desktop rule
     (top/left 50% + translate) which double-shifts the sheet. */
  top: auto;
  left: auto;
  translate: none;
  transform: translateY(100%);
}
.overlay--sheet.is-open .sheet { transform: none; }
@media (min-width: 769px) {
  .overlay--sheet {
    padding: var(--sp-6);
    align-items: center;
    justify-content: center;
  }
  .overlay--sheet .sheet {
    max-width: 440px;
    border-radius: var(--radius-xl);
    transform: scale(0.96);
  }
  .overlay--sheet.is-open .sheet { transform: none; }
}
.sheet__grip {
  width: 40px; height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
  margin: var(--sp-3) auto var(--sp-1);
  flex: none;
}
.sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-2) var(--sp-5);
  border-bottom: 1px solid var(--border);
  flex: none;
}
.sheet__title { font-weight: 700; font-size: var(--text-h3); }
.sheet__body { overflow-y: auto; padding: var(--sp-5); flex: 1; }
.sheet__body--flush { padding: 0; }
.sheet__foot {
  flex: none;
  padding: var(--sp-4) var(--sp-5);
  padding-bottom: calc(var(--sp-4) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}
@media (min-width: 769px) {
  /* On desktop, sheets render as centered modals */
  .sheet {
    inset-inline: auto;
    bottom: auto;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    width: 100%;
    max-width: 440px;
    max-height: calc(100dvh - 2 * var(--sp-10));
    border-radius: var(--radius-xl);
    transform: scale(0.96);
  }
  .sheet.is-open { transform: none; }
  .sheet__grip { display: none; }
}

/* ------------------------------------------------------------
   Toasts
   ------------------------------------------------------------ */
.toast-container {
  position: fixed;
  bottom: calc(var(--sp-6) + env(safe-area-inset-bottom));
  inset-inline-start: 50%;
  translate: -50% 0;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-2);
  pointer-events: none;
  width: min(420px, calc(100vw - 2 * var(--sp-4)));
}
@media (min-width: 769px) {
  .toast-container { bottom: auto; top: calc(var(--header-h) + var(--sp-4)); }
}
.toast {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: fit-content;
  max-width: 100%;
  background: var(--surface-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--text-caption);
  font-weight: 500;
  animation: toast-in var(--dur-base) var(--ease-out);
  pointer-events: auto;
}
.toast.is-leaving { animation: toast-out var(--dur-base) var(--ease-out) forwards; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast--success svg { color: var(--success); }
.toast--error svg { color: var(--error); }
.toast--warning svg { color: var(--warning); }
.toast--info svg { color: var(--info); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
}
@keyframes toast-out {
  to { opacity: 0; transform: translateY(10px) scale(0.97); }
}

/* ------------------------------------------------------------
   Dropdown menus
   ------------------------------------------------------------ */
.menu-wrap { position: relative; }
.menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  min-width: 210px;
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: var(--z-header);
  opacity: 0;
  transform: translateY(-4px) scale(0.98);
  pointer-events: none;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.menu.is-open { opacity: 1; transform: none; pointer-events: auto; }
.menu__item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  width: 100%;
  padding: 9px var(--sp-3);
  border-radius: var(--radius-sm);
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--text-secondary);
  transition: background-color var(--dur-fast), color var(--dur-fast);
  text-align: start;
}
.menu__item svg { width: 17px; height: 17px; flex: none; }
.menu__item:hover { background: var(--primary-soft); color: var(--text-primary); }
.menu__item--danger { color: var(--error); }
.menu__item--danger:hover { background: var(--error-soft); color: var(--error); }
.menu__divider { height: 1px; background: var(--border); margin: 6px 0; }
.menu__label {
  padding: 8px var(--sp-3) 4px;
  font-size: var(--text-meta);
  color: var(--text-muted);
}

/* ------------------------------------------------------------
   Chat
   ------------------------------------------------------------ */
.chat { display: flex; flex-direction: column; gap: var(--sp-4); padding: var(--sp-4); }
.chat-msg { display: flex; gap: var(--sp-2); animation: msg-in var(--dur-base) var(--ease-out); }
@keyframes msg-in {
  from { opacity: 0; transform: translateY(6px); }
}
.chat-msg__bubble {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: 4px var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: var(--sp-2) var(--sp-3);
  max-width: 85%;
}
.chat-msg__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-bottom: 2px;
}
.chat-msg__name { font-size: var(--text-meta); font-weight: 700; color: var(--on-soft); }
.chat-msg__time { font-size: var(--text-meta); color: var(--text-muted); }
.chat-msg__text { font-size: var(--text-caption); line-height: 1.7; overflow-wrap: anywhere; }
.chat-msg--self { flex-direction: row-reverse; }
.chat-msg--self .chat-msg__bubble {
  background: var(--primary-soft);
  border-color: transparent;
  border-radius: var(--radius-lg) 4px var(--radius-lg) var(--radius-lg);
}
.chat-msg--self .chat-msg__name { color: var(--primary); }
.chat-msg--system { justify-content: center; }
.chat-msg--system .chat-msg__bubble {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: var(--text-meta);
  text-align: center;
  padding: 0;
}

.chat-input {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-2);
  padding: var(--sp-3);
  border-top: 1px solid var(--border);
  flex: none;
}
.chat-input .input { height: 42px; border-radius: var(--radius-pill); }
.chat-input__send {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-contrast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  transition: background-color var(--dur-fast), transform var(--dur-fast);
}
.chat-input__send:hover { background: var(--primary-hover); }
.chat-input__send:active { transform: scale(0.94); }
.chat-input__send svg { width: 18px; height: 18px; }

/* ------------------------------------------------------------
   Members
   ------------------------------------------------------------ */
.member-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  transition: background-color var(--dur-fast);
}
.member-item:hover { background: var(--primary-soft); }
.member-item__name { font-size: var(--text-caption); font-weight: 600; flex: 1; min-width: 0; }
.member-item__status { font-size: var(--text-meta); color: var(--text-muted); }
.member-item__actions { display: flex; gap: 2px; }
.member-item .icon-btn { width: 32px; height: 32px; }

/* ------------------------------------------------------------
   States: empty / error / skeleton
   ------------------------------------------------------------ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-4);
  padding: var(--sp-16) var(--sp-6);
}
.empty-state__icon {
  width: 88px; height: 88px;
  border-radius: var(--radius-xl);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--on-soft);
  margin-bottom: var(--sp-2);
}
.empty-state__icon svg { width: 40px; height: 40px; }
.empty-state__title { font-size: var(--text-h3); font-weight: 700; }
.empty-state__text { color: var(--text-secondary); font-size: var(--text-caption); max-width: 340px; }

.skeleton {
  position: relative;
  overflow: hidden;
  background: var(--surface-elevated);
  border-radius: var(--radius-md);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, var(--primary-soft), transparent);
  animation: shimmer 1.6s infinite;
  translate: -100% 0;
}
@keyframes shimmer {
  to { translate: 100% 0; }
}
.skeleton--poster { aspect-ratio: 16 / 9; }
.skeleton--text { height: 14px; }
.skeleton--title { height: 22px; width: 60%; }
.skeleton--circle { border-radius: 50%; width: 40px; height: 40px; }

/* ------------------------------------------------------------
   Copy link field
   ------------------------------------------------------------ */
.link-field {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--input-bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  direction: ltr;
}
.link-field__value {
  flex: 1;
  font-size: var(--text-caption);
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: all;
}
