/* =========================================================
   Watchlist Online — biograf/streaming-tema
   ========================================================= */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/outfit-800-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../fonts/outfit-800-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

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

:root {
  /* Ytor */
  --bg: #07070c;
  --bg-soft: #0d0d14;
  --surface: #13131c;
  --surface-2: #1a1a25;
  --surface-3: #232331;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text: #f5f5f7;
  --text-muted: #a1a1b5;
  --text-dim: #6e6e85;

  /* Accent — biografröd till solnedgång */
  --accent: #ff3b5c;
  --accent-2: #ff8a3d;
  --accent-grad: linear-gradient(135deg, #ff3b5c 0%, #ff6a45 55%, #ff8a3d 100%);
  --gold: #f5c518;

  /* Status */
  --green: #22c55e;
  --green-soft: rgba(34, 197, 94, 0.12);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.12);
  --danger: #f87171;
  --focus: #ffb86b;

  /* Form */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-card: 0 10px 30px -12px rgba(0, 0, 0, 0.7);
  --shadow-glow: 0 10px 40px -10px rgba(255, 59, 92, 0.55);
  --touch: 44px;
  --maxw: 1200px;

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 59, 92, 0.12), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(255, 138, 61, 0.07), transparent 60%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--text);
  color: var(--bg);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 7, 12, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0.7rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.logo-text {
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.025em;
  white-space: nowrap;
}

.logo-text strong {
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.beta-badge {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.14rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.16);
  border: 1px solid rgba(255, 138, 61, 0.5);
  color: #ffb86b;
  line-height: 1.2;
}

.logo-small { font-size: 1rem; }
.logo-small .logo-mark { width: 28px; height: 28px; border-radius: 8px; box-shadow: none; }

.topnav {
  display: flex;
  gap: 0.25rem;
  flex: 1;
}

.topnav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}

.topnav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 2.6rem 1.5rem 1.35rem;
}

/* Filmremse-dekor */
.hero::before {
  content: '';
  position: absolute;
  inset: 1.5rem 1.5rem auto auto;
  width: 46%;
  height: 340px;
  border-radius: var(--radius-xl);
  background:
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 14px, transparent 14px 28px) top / 100% 10px no-repeat,
    radial-gradient(closest-side at 60% 50%, rgba(255, 59, 92, 0.22), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 40%);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 40%);
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-copy {
  position: relative;
  isolation: isolate;
  z-index: 20;
}

.hero-copy::after {
  content: '';
  position: absolute;
  right: -2rem;
  top: -1rem;
  width: min(380px, 82%);
  height: 310px;
  background: url('../hero-tv-bg.svg') center / contain no-repeat;
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0.6); }
  70% { box-shadow: 0 0 0 8px rgba(255, 59, 92, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 59, 92, 0); }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 5.4vw, 4.1rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
  margin: 1.1rem 0 1rem;
}

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-lead {
  font-size: clamp(0.98rem, 1.5vw, 1.1rem);
  color: var(--text-muted);
  max-width: 36rem;
}

/* Snabbsök- & spara-bubbla i Heron */
.hero-quick-box {
  position: relative;
  z-index: 35;
  margin-top: 1.25rem;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(rgba(20, 21, 33, 0.92), rgba(14, 15, 24, 0.95)) padding-box,
    linear-gradient(135deg, rgba(255, 59, 92, 0.75), rgba(255, 138, 61, 0.45) 55%, rgba(255, 255, 255, 0.12)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.45), 0 0 28px rgba(255, 59, 92, 0.14);
  backdrop-filter: blur(14px);
}

.hero-quick-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.hero-quick-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.hero-quick-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-2);
  pointer-events: none;
}

.hero-quick-input {
  width: 100%;
  padding: 0.82rem 0.95rem 0.82rem 2.65rem;
  font-size: 0.98rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-quick-input:focus {
  border-color: rgba(255, 138, 61, 0.65);
  background: rgba(255, 255, 255, 0.08);
}

.hero-quick-btn {
  padding: 0.82rem 1.25rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.hero-quick-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0 0.2rem;
}

.hero-quick-hint {
  font-size: 0.79rem;
  color: var(--text-muted);
}

.hero-quick-hint strong {
  color: var(--text);
}

.hero-quick-opt-btn {
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  border-radius: 6px;
}

.hero-quick-opt-btn:hover {
  background: rgba(255, 138, 61, 0.12);
}

.hero-quick-options {
  display: grid;
  grid-template-columns: minmax(135px, 0.8fr) 1.4fr;
  gap: 0.5rem;
  margin-top: 0.55rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--border);
}

.hero-quick-options[hidden],
.hero-suggestions-list[hidden] {
  display: none;
}

.hero-suggestions-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 80;
  max-height: 360px;
  overflow-y: auto;
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.72);
}

.hero-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-right: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-suggestion-item:last-child {
  border-bottom: none;
}

.hero-suggestion-main {
  flex: 1;
  min-width: 0;
}

.hero-sug-save {
  flex-shrink: 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.05rem;
}

.hero-stats {
  display: grid;
  gap: 0.85rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.stat-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--surface-3);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stat-green .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-amber .stat-icon { background: var(--amber-soft); color: var(--amber); }

.stat-value {
  display: block;
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Så funkar det */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
  margin-top: 1.65rem;
}

.step {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  padding: 0.78rem 1rem;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.step-num {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  font-weight: 800;
  flex-shrink: 0;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

.step p {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* ---------- Main ---------- */
.app-main {
  flex: 1;
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

/* Flytande status-toast (visas bara vid aktiva händelser) */
.status-bar.status-toast {
  position: fixed;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 140;
  width: min(680px, calc(100vw - 2rem));
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-radius: var(--radius-lg);
  background: rgba(18, 18, 28, 0.96);
  border: 1px solid rgba(255, 138, 61, 0.4);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.72), 0 0 24px rgba(255, 59, 92, 0.16);
  backdrop-filter: blur(14px);
}

.status-bar[hidden] {
  display: none;
}

.status-close-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.setup-grid-single {
  grid-template-columns: 1fr;
}

.services-drawer-panel {
  border-color: rgba(255, 138, 61, 0.35);
  background: linear-gradient(180deg, rgba(26, 26, 39, 0.96), rgba(16, 16, 26, 0.98));
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
}

.services-drawer-panel[hidden] {
  display: none;
}

.services-drawer-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.topnav a {
  white-space: nowrap;
  padding: 0.42rem 0.62rem;
  font-size: 0.88rem;
}

.topbar-cta {
  white-space: nowrap;
  flex-shrink: 0;
}

.cloud-pill {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 0;
  justify-content: flex-start;
}

.sync-status {
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 0.74rem;
}

.mobile-nav-btn {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* Färggraderat betyg (1-3 isblå -> 9-10 het röd) */
.rating-heat-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--heat-color, #facc15);
  background: color-mix(in srgb, var(--heat-color, #facc15) 14%, rgba(12, 12, 20, 0.85));
  border: 1px solid color-mix(in srgb, var(--heat-color, #facc15) 45%, transparent);
}

.actor-score-badge.rating-heat-pill {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  background: rgba(8, 8, 15, 0.86);
  backdrop-filter: blur(6px);
}

/* Klickbara streamingtjänster i detaljvyn */
.detail-stream-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.detail-stream-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.68rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
}

.detail-stream-chip:hover {
  border-color: var(--accent-2);
  background: rgba(255, 138, 61, 0.16);
  transform: translateY(-1px);
}

.detail-stream-chip.is-subscribed {
  border-color: rgba(34, 197, 94, 0.55);
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
}

.detail-stream-chip.is-rent {
  color: var(--text-muted);
}

.detail-stream-empty {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.is-checked-badge {
  pointer-events: none;
  opacity: 0.9;
}

/* Skådespelare & Regissörer: Profilkort + Favoriter */
.favorite-people-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-lg);
  background: rgba(245, 197, 24, 0.08);
  border: 1px solid rgba(245, 197, 24, 0.28);
}

.favorite-people-bar[hidden],
.actor-profile-card[hidden] {
  display: none;
}

.favorite-people-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.favorite-people-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.favorite-person-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.favorite-person-open {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0.55rem 0.25rem 0.28rem;
  background: none;
  border: none;
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.favorite-person-open:hover {
  color: var(--gold);
}

.favorite-person-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  font-size: 0.72rem;
}

.favorite-person-remove {
  background: none;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
}

.favorite-person-remove:hover {
  color: var(--danger);
  background: rgba(248, 113, 113, 0.14);
}

.actor-profile-card {
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 138, 61, 0.05));
  border: 1px solid var(--border-strong);
}

.actor-profile-inner {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.actor-profile-photo-wrap {
  width: 124px;
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
}

.actor-profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.actor-profile-photo-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 2.5rem;
}

.actor-profile-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.actor-profile-name {
  font-size: 1.35rem;
  font-weight: 800;
}

.actor-profile-meta {
  font-size: 0.86rem;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 0.55rem;
}

.actor-profile-bio {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.actor-bio-toggle {
  margin-top: 0.35rem;
  background: none;
  border: none;
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

@media (max-width: 720px) {
  .status-bar.status-toast {
    bottom: calc(4.8rem + env(safe-area-inset-bottom, 0px));
    width: calc(100vw - 1.25rem);
  }

  .actor-profile-inner {
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 0.85rem;
  }

  .actor-profile-photo-wrap {
    width: 88px;
  }
}

.status-icon { color: var(--accent-2); display: grid; place-items: center; flex-shrink: 0; }

.status-message {
  font-size: 0.95rem;
  font-weight: 600;
}

/* ---------- Panels ---------- */
.setup-grid,
.bottom-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--shadow-card);
}

.panel-highlight {
  position: relative;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(135deg, rgba(255, 59, 92, 0.6), rgba(255, 138, 61, 0.15) 50%, transparent) border-box;
  border: 1px solid transparent;
}

.panel-header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.panel-step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.panel-highlight .panel-step { background: var(--accent-grad); border-color: transparent; }

.panel h2 {
  font-size: 1.2rem;
  font-weight: 750;
  letter-spacing: -0.01em;
}

.panel-help {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---------- Form ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.input {
  min-height: var(--touch);
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background-color: var(--bg-soft);
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.input::placeholder { color: var(--text-dim); }

.input:hover { border-color: rgba(255, 255, 255, 0.24); }

.input:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(255, 138, 61, 0.18);
}

select.input {
  cursor: pointer;
}

select.input option { background: var(--surface-2); color: var(--text); }

.input-lg { min-height: 52px; font-size: 1.05rem; }

.input-icon-wrap,
.search-box {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  pointer-events: none;
}

.input-icon-wrap .input,
.search-box .input,
.hero-quick-input-wrap .input { padding-left: 2.65rem; }

.add-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

/* ---------- Service chips ---------- */
.services-fieldset {
  border: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.6rem;
  margin-top: 0.4rem;
}

.service-chip {
  --brand: #888;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.2s, background-color 0.2s, color 0.2s;
}

.service-chip:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.28); }

.chip-check {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid var(--text-dim);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  transition: background-color 0.2s, border-color 0.2s;
}

.service-chip.active {
  color: #fff;
  border-color: var(--brand);
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 28%, transparent), transparent 80%), var(--bg-soft);
}

.service-chip.active .chip-check {
  background: var(--brand);
  border-color: var(--brand);
}

.service-chip.active .chip-check::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.svc-netflix { --brand: #e50914; }
.svc-svt     { --brand: #1fa35a; }
.svc-max     { --brand: #3b5bff; }
.svc-disney  { --brand: #1d6fe0; }
.svc-viaplay { --brand: #c4126b; }
.svc-prime   { --brand: #00a8e1; }
.svc-apple   { --brand: #a3a3b8; }
.svc-sky     { --brand: #ff2d78; }
.svc-tv4         { --brand: #e11d48; }
.svc-sf          { --brand: #f97316; }
.svc-blockbuster { --brand: #fbbf24; }
.svc-youtube     { --brand: #ef4444; }
.svc-rakuten     { --brand: #eab308; }
.svc-tele2       { --brand: #38bdf8; }
.svc-cineasterna { --brand: #14b8a6; }

/* ---------- Section heads ---------- */
.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.section-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.section-title {
  font-family: var(--font);
  font-size: clamp(1.55rem, 2.8vw, 2.15rem);
  font-weight: 850;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.section-help {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.search-box {
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}

/* ---------- Kategori-tabs ---------- */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.category-tab {
  min-height: 40px;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-weight: 650;
  font-size: 0.9rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.category-tab:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

.category-tab.active {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
}

/* ---------- Watchlist-kolumner ---------- */
.watchlist-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.column {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.column-available { border-top: 3px solid var(--green); }
.column-waiting   { border-top: 3px solid var(--amber); }

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.column-title-wrap {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
}

.column-header h3 {
  font-size: 1.15rem;
  font-weight: 750;
}

.column-help {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.column-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 0.5rem;
  flex-shrink: 0;
}

.dot-green { background: var(--green); box-shadow: 0 0 12px var(--green); }
.dot-amber { background: var(--amber); box-shadow: 0 0 12px var(--amber); }

.count-badge {
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 750;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.count-green { background: var(--green-soft); color: #4ade80; }
.count-amber { background: var(--amber-soft); color: #fbbf24; }

.title-list,
.notification-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* ---------- Titelkort ---------- */
.title-card {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 1rem;
  padding: 0.85rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color 0.2s, transform 0.2s, background-color 0.2s;
}

.title-card:hover {
  border-color: var(--border-strong);
  background: var(--surface-2);
}

.title-card-watched { opacity: 0.55; }
.title-card-watched .title-name { text-decoration: line-through; text-decoration-color: var(--text-dim); }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.title-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}

.title-name {
  font-size: 1.05rem;
  font-weight: 750;
  line-height: 1.25;
}

.title-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.1rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.service-tag {
  --brand: #666;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand) 20%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 55%, transparent);
  color: #fff;
}

.service-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
}

.service-tag-muted {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
}

.status-note {
  font-size: 0.78rem;
  color: var(--text-dim);
}

.title-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}

/* ---------- Posters (genererade, utan bilder) ---------- */
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.45rem;
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.8), inset 0 0 0 1px rgba(255,255,255,0.08);
  isolation: isolate;
}

.poster::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,0.28), transparent 45%),
    linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.75));
  z-index: -1;
}

.poster-initials {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.45);
  opacity: 0.95;
}

.poster-kind {
  align-self: flex-start;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.5);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.poster-0 { background: linear-gradient(160deg, #ff3b5c, #5b0a2a); }
.poster-1 { background: linear-gradient(160deg, #f59e0b, #6b2105); }
.poster-2 { background: linear-gradient(160deg, #3b82f6, #0b1e4f); }
.poster-3 { background: linear-gradient(160deg, #10b981, #053b2c); }
.poster-4 { background: linear-gradient(160deg, #a855f7, #2e0b55); }
.poster-5 { background: linear-gradient(160deg, #06b6d4, #06323d); }
.poster-6 { background: linear-gradient(160deg, #eab308, #3d2c03); }
.poster-7 { background: linear-gradient(160deg, #ec4899, #4a0a2b); }

/* ---------- Upptäck-rad ---------- */
.catalog-row {
  list-style: none;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(160px, 1fr);
  gap: 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.25rem 0.1rem 1rem;
  scrollbar-width: thin;
  scrollbar-color: var(--surface-3) transparent;
}

.catalog-card {
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.catalog-card .poster {
  border-radius: var(--radius-md);
  padding: 0.6rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.catalog-card:hover .poster {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 18px 36px -12px rgba(0,0,0,0.9), inset 0 0 0 1px rgba(255,255,255,0.15);
}

.catalog-card .poster-initials { font-size: 2.6rem; }
.catalog-card .poster-kind { font-size: 0.65rem; }

.poster-add {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 2;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  background: var(--accent-grad);
  box-shadow: 0 6px 16px -4px rgba(255, 59, 92, 0.7);
  cursor: pointer;
  transition: transform 0.15s;
}

.poster-add:hover { transform: scale(1.1); }

.poster-add.is-added {
  background: rgba(255,255,255,0.92);
  color: #0a0a0f;
  font-size: 1.05rem;
  box-shadow: none;
}

.catalog-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.catalog-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.catalog-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---------- Notiser ---------- */
.notification-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.notification-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: var(--surface-3);
  flex-shrink: 0;
  font-size: 0.85rem;
}

.notification-hit {
  border-color: rgba(245, 197, 24, 0.4);
  background: linear-gradient(90deg, rgba(245, 197, 24, 0.1), transparent 70%), var(--bg-soft);
  color: var(--text);
}

.notification-hit .notification-icon { background: rgba(245, 197, 24, 0.18); }

.notification-text { padding-top: 0.25rem; }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  padding: 2rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.empty-icon { font-size: 1.8rem; opacity: 0.8; }

/* ---------- Verktyg ---------- */
.panel-tools { background: linear-gradient(180deg, var(--surface), var(--bg-soft)); }

.tools-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(245, 197, 24, 0.4);
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  margin-bottom: 0.4rem;
}

.controls-section {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* ---------- Knappar ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--touch);
  min-width: var(--touch);
  padding: 0.55rem 1.1rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  touch-action: manipulation;
  transition: transform 0.15s, background-color 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-sm { min-height: 38px; padding: 0.4rem 0.85rem; font-size: 0.84rem; border-radius: 10px; }
.btn-lg { min-height: 52px; padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 14px 44px -8px rgba(255, 59, 92, 0.75); filter: brightness(1.06); }

.btn-glass {
  background: rgba(255, 255, 255, 0.07);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-glass:hover { background: rgba(255, 255, 255, 0.12); }

.btn-secondary {
  background: var(--surface-3);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-secondary:hover { background: #2c2c3d; }

.btn-gold {
  background: rgba(245, 197, 24, 0.12);
  border-color: rgba(245, 197, 24, 0.45);
  color: #fde68a;
}
.btn-gold:hover { background: rgba(245, 197, 24, 0.2); }

.btn-stream {
  background: #fff;
  color: #0a0a0f;
}
.btn-stream:hover { background: #e9e9ee; }

.btn-alert-on {
  background: var(--amber-soft);
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text-muted);
}
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.3); }

.btn-icon {
  padding: 0;
  width: 38px;
  min-width: 38px;
}

.btn-danger-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-dim);
}
.btn-danger-ghost:hover { color: var(--danger); border-color: rgba(248, 113, 113, 0.4); }

.btn:focus-visible,
.service-chip:focus-visible,
.category-tab:focus-visible,
.poster-add:focus-visible,
.topnav a:focus-visible,
.logo:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Footer ---------- */
.app-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.footer-legal {
  font-size: 0.78rem;
  color: var(--text-dim);
  max-width: 46rem;
}

/* ---------- Responsivt ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
  .stat-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
  .hero::before { width: 90%; }
  .setup-grid,
  .bottom-grid,
  .watchlist-columns { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .topnav { display: none; }
  .topbar-inner { justify-content: space-between; }
  .steps { grid-template-columns: 1fr; margin-top: 2rem; }
  .hero { padding-top: 2.5rem; }
  .form-split { grid-template-columns: 1fr 1fr; }
  .form-split .field:last-child { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .hero, .app-main, .topbar-inner { padding-left: 1rem; padding-right: 1rem; }
  .hero-stats { gap: 0.5rem; }
  .stat-card { padding: 0.85rem; }
  .stat-icon { width: 36px; height: 36px; font-size: 0.95rem; }
  .stat-value { font-size: 1.4rem; }
  .stat-label { font-size: 0.75rem; }
  .panel { padding: 1.2rem; }
  .title-card { grid-template-columns: 60px 1fr; gap: 0.8rem; }
  .catalog-row { grid-auto-columns: 42%; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; }
  .hero::before { display: none; }
}

.poster-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* ---------- Autocomplete & TMDb-inställning ---------- */
.field-autocomplete {
  position: relative;
}

.suggestions-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  list-style: none;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.suggestions-list[hidden] {
  display: none;
}

.suggestion-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.suggestions-list li:last-child .suggestion-btn {
  border-bottom: none;
}

.suggestion-btn:hover,
.suggestion-btn:focus-visible {
  background: var(--surface-3);
  outline: none;
}

.suggestion-thumb {
  width: 34px;
  height: 50px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-3);
}

.suggestion-thumb-empty {
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.suggestion-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.suggestion-text strong {
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.suggestion-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.tmdb-box {
  margin-top: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tmdb-box-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.tmdb-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
}

.tmdb-badge.is-connected {
  background: var(--green-soft);
  color: #4ade80;
}

.tmdb-help {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.tmdb-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0.5rem;
}

.tmdb-form .input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

/* ---------- Har sett, betyg & Vill se igen ---------- */
.status-bar {
  flex-wrap: wrap;
}

.status-bar .status-message {
  flex: 1;
  min-width: 200px;
}

.undo-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0.4rem;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.view-tab {
  flex: 1 1 150px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--touch);
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.view-tab:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.view-tab.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.view-tab-count {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-variant-numeric: tabular-nums;
}

.view-tab:not(.active) .view-tab-count {
  background: var(--surface-3);
  color: var(--text-muted);
}

.btn-watched {
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.btn-watched:hover {
  background: rgba(34, 197, 94, 0.24);
}

.btn-watched.is-confirming {
  background: var(--green);
  border-color: var(--green);
  color: #052e16;
}

.btn-danger-confirm {
  background: rgba(248, 113, 113, 0.2);
  border-color: var(--danger);
  color: #fecaca;
}

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

.history-toolbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.history-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.history-note {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.rewatch-intro {
  margin-bottom: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}

.history-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.history-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.personal-rating-badge {
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
  white-space: nowrap;
}

.personal-rating-badge.has-rating {
  background: rgba(245, 197, 24, 0.16);
  border: 1px solid rgba(245, 197, 24, 0.45);
  color: var(--gold);
}

.rating-scale {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.3rem;
}

.rating-num {
  min-width: 32px;
  height: 32px;
  padding: 0 0.35rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s, transform 0.1s;
}

.rating-num:hover {
  color: var(--text);
  border-color: rgba(245, 197, 24, 0.6);
  transform: translateY(-1px);
}

.rating-num.active {
  background: var(--gold);
  border-color: var(--gold);
  color: #09090d;
}

.rating-clear {
  margin-left: 0.25rem;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  text-decoration: underline;
}

.rating-clear:hover {
  color: var(--text);
}

@media (max-width: 900px) {
  .history-grid { grid-template-columns: 1fr; }
  .history-controls { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .rating-num {
    min-width: 34px;
    height: 36px;
  }
}

.view-tab:focus-visible,
.rating-num:focus-visible,
.rating-clear:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- Delbara listor ---------- */
.list-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  justify-content: flex-end;
}

.share-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.2rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.share-panel[hidden],
.share-result[hidden],
.shared-section[hidden] {
  display: none;
}

.share-panel-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
}

.share-panel-row .field {
  min-width: 190px;
  flex: 1 1 200px;
}

.share-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--touch);
  font-size: 0.88rem;
  color: var(--text-muted);
  cursor: pointer;
}

.share-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.share-result {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.share-result .input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.85rem;
}

.shared-section {
  background: var(--surface);
  border: 1px solid rgba(255, 138, 61, 0.35);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  box-shadow: var(--shadow-card);
}

.shared-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

/* ---------- Molnsynk & aktiva live-delningar ---------- */
.cloud-pill.is-synced {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.cloud-panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-card);
}

.cloud-panel[hidden],
.cloud-auth-form[hidden],
.cloud-logged-in[hidden],
.active-shares-wrap[hidden] {
  display: none;
}

.cloud-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.cloud-head h2 {
  font-size: 1.15rem;
  font-weight: 750;
}

.cloud-auth-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.85rem;
}

.cloud-auth-form .field {
  flex: 1 1 200px;
}

.cloud-auth-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cloud-logged-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.cloud-user-info {
  font-size: 0.9rem;
  color: var(--text);
}

.active-shares-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.active-shares-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.active-share-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.active-share-label {
  font-size: 0.88rem;
  font-weight: 600;
}

.active-share-btns {
  display: flex;
  gap: 0.4rem;
}

/* ---------- Streamingtjänster (services.html) ---------- */
.hero-compact {
  padding-bottom: 1.5rem;
}

.services-guide-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  font-weight: 650;
  color: var(--accent-2);
  text-decoration: none;
}

.services-guide-link:hover {
  text-decoration: underline;
}

.services-directory {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.service-info-card {
  --brand: #888;
  background: linear-gradient(160deg, color-mix(in srgb, var(--brand) 14%, transparent), transparent 55%), var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius-xl);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  box-shadow: var(--shadow-card);
}

.service-info-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
}

.service-info-head h2 {
  font-size: 1.15rem;
  font-weight: 800;
}

.service-type-badge {
  font-size: 0.72rem;
  font-weight: 750;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-muted);
  white-space: nowrap;
}

.badge-free {
  background: var(--green-soft);
  color: #4ade80;
}

.badge-rent {
  background: var(--amber-soft);
  color: #fbbf24;
}

.service-info-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.service-info-facts {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  flex: 1;
}

.service-info-facts li::before {
  content: '• ';
  color: var(--brand);
  font-weight: 800;
}

.service-info-link {
  align-self: flex-start;
  margin-top: 0.25rem;
}

@media (max-width: 960px) {
  .services-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .services-directory { grid-template-columns: 1fr; }
  .hero-compact h1 {
    font-size: clamp(2.1rem, 9vw, 2.8rem);
    overflow-wrap: anywhere;
  }
}

/* ---------- Mobilanpassning & fast bottenmeny ---------- */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 720px) {
  .app-footer {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
    background: rgba(20, 20, 32, 0.98);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-top: 2px solid rgba(255, 59, 92, 0.55);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.75);
    padding: 0.45rem 0.45rem calc(0.45rem + env(safe-area-inset-bottom, 0px));
  }

  .mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 50px;
    padding: 0.35rem 0.25rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    text-decoration: none;
    color: #e6e6f0;
    font-size: 0.76rem;
    font-weight: 750;
  }

  .mobile-nav-link span:first-child {
    font-size: 1.2rem;
    line-height: 1;
  }

  .mobile-nav-link[aria-current="page"],
  .mobile-nav-link:active {
    color: var(--text);
    background: rgba(255, 59, 92, 0.16);
  }

  .mobile-nav-link:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: -2px;
  }

  .topbar-inner {
    gap: 0.5rem;
    padding: 0.65rem 1rem;
  }

  .topbar-cta {
    display: none;
  }

  .cloud-pill {
    margin-left: auto;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .view-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .view-tab {
    flex: none;
    width: 100%;
    min-height: 44px;
  }

  .title-card-actions {
    gap: 0.5rem;
  }

  .title-card-actions .btn:not(.btn-icon) {
    flex: 1 1 auto;
    min-height: 44px;
  }

  .title-card-actions .btn-icon {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .cloud-auth-actions,
  .share-result,
  .tmdb-form {
    flex-direction: column;
    align-items: stretch;
  }

  .cloud-auth-actions .btn,
  .share-result .btn,
  .tmdb-form .btn {
    width: 100%;
    min-height: 44px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
  }

  .list-head-actions {
    flex: none;
    width: 100%;
  }

  .list-head-actions .search-box {
    min-width: 0;
    max-width: none;
    flex: 1 1 100%;
  }

  .list-head-actions #toggle-share-btn {
    width: 100%;
    min-height: 44px;
  }
}

/* ---------- Admin & statistik (admin.html) ---------- */
.admin-main {
  gap: 2rem;
}

.admin-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}

.admin-actions {
  display: flex;
  gap: 0.5rem;
}

.admin-actions[hidden],
.admin-login-panel[hidden],
.admin-dashboard[hidden],
.admin-error[hidden] {
  display: none;
}

.admin-login-panel {
  max-width: 520px;
}

.admin-error {
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.admin-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.admin-kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.admin-kpi-accent {
  border-color: rgba(255, 59, 92, 0.45);
  background: linear-gradient(160deg, rgba(255, 59, 92, 0.14), transparent 60%), var(--surface);
}

.admin-kpi-val {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.admin-kpi-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-clicks-list,
.admin-top-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-click-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.admin-click-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.admin-click-nums {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.admin-bar-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-soft);
  overflow: hidden;
}

.admin-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--accent-grad);
}

.admin-click-sub {
  font-size: 0.74rem;
  color: var(--text-dim);
}

.admin-top-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-size: 0.9rem;
}

.admin-top-item strong {
  color: var(--gold);
  font-size: 0.82rem;
}

/* ---------- Slumpa, Se tillsammans, Filmår, Notering & Avsnitt ---------- */
.want-extras-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.random-pick-card {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.15rem;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255, 59, 92, 0.16), rgba(255, 138, 61, 0.08));
  border: 1px solid rgba(255, 59, 92, 0.45);
}

.random-pick-card[hidden],
.together-results[hidden],
.wrapped-card[hidden],
.card-note-form[hidden] {
  display: none;
}

.random-pick-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.random-pick-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.random-pick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.together-results {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.together-match-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.55rem;
}

.together-match-item {
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.wrapped-card {
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.14), rgba(255, 59, 92, 0.1));
  border: 1px solid rgba(245, 197, 24, 0.35);
  border-radius: var(--radius-xl);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wrapped-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
}

.wrapped-head h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
}

.wrapped-sub {
  font-size: 0.88rem;
  color: var(--text);
}

.wrapped-favs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.wrapped-fav-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 700;
}

.wrapped-fav-pill {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-strong);
}

.card-note-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.card-note-text {
  font-size: 0.82rem;
  color: #fde68a;
  background: rgba(245, 197, 24, 0.08);
  border-left: 2px solid var(--gold);
  padding: 0.3rem 0.55rem;
  border-radius: 0 6px 6px 0;
}

.card-note-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.input-xs {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  font-size: 0.84rem;
}

.season-progress-bar {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.season-progress-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.25rem;
}

.season-step-btn {
  min-width: 30px;
  height: 28px;
  padding: 0 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--surface-3);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

.season-step-btn:hover {
  border-color: var(--accent-2);
}

/* ---------- Integritetspolicy & Villkor (privacy.html) ---------- */
.policy-nav-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.policy-main {
  gap: 1.5rem;
}

.policy-card h2 {
  font-size: 1.3rem;
}

.policy-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.policy-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.policy-list li::before {
  content: '• ';
  color: var(--accent-2);
  font-weight: 800;
}

.policy-list code {
  font-size: 0.85em;
  background: var(--surface-3);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  color: var(--text);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.1rem;
  font-size: 0.84rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* ---------- Vanliga frågor (FAQ) ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.15rem;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.2rem;
  color: var(--accent-2);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin-top: 0.65rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.faq-item a {
  color: var(--accent-2);
}

@media (max-width: 720px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- AI-chattbubbla i hörnet ---------- */
.chat-widget {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 75;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
}

.chat-fab {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: var(--accent-grad);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  box-shadow: 0 14px 34px -6px rgba(255, 59, 92, 0.65);
  cursor: pointer;
  transition: transform 0.15s, filter 0.15s;
}

.chat-fab:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.chat-window {
  width: min(390px, calc(100vw - 2rem));
  max-height: min(560px, 74vh);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-window[hidden] {
  display: none;
}

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.chat-header strong {
  display: block;
  font-size: 0.95rem;
}

.chat-subtitle {
  display: block;
  font-size: 0.74rem;
  color: var(--text-muted);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.chat-msg {
  max-width: 88%;
  padding: 0.6rem 0.85rem;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.45;
}

.chat-msg-bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-msg-user {
  align-self: flex-end;
  background: var(--accent-grad);
  color: #fff;
}

.chat-suggestions-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.chat-suggestion-card {
  background: var(--bg-soft);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-suggestion-top {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.chat-suggestion-img {
  width: 42px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.chat-suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.chat-suggestion-info strong {
  font-size: 0.88rem;
}

.chat-suggestion-meta {
  font-size: 0.76rem;
  color: var(--green);
  font-weight: 600;
}

.chat-suggestion-meta-missing {
  color: var(--amber);
}

.chat-affiliate-btn {
  flex: 1;
}

.chat-header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.chat-header-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.chat-avatar-sm {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.85);
}

.chat-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-2);
  flex-shrink: 0;
}

.chat-suggestion-reason {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.chat-suggestion-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.chat-suggestion-actions select {
  flex: 1;
  min-width: 0;
}

.chat-quick-row {
  display: flex;
  gap: 0.35rem;
  overflow-x: auto;
  padding: 0.45rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  scrollbar-width: none;
}

.chat-quick-row::-webkit-scrollbar {
  display: none;
}

.chat-quick-btn {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
}

.chat-quick-btn:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.chat-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.65rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

.chat-form .input {
  flex: 1;
  min-width: 0;
}

@media (max-width: 720px) {
  .chat-widget {
    right: 0.85rem;
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }
  .chat-window {
    width: calc(100vw - 1.7rem);
    max-height: 65vh;
  }
}

/* ---------- Sök skådespelare ---------- */
.actor-head {
  align-items: center;
  margin-bottom: 0;
}

.actor-search-form {
  display: flex;
  align-items: center;
  align-self: center;
  gap: 0.5rem;
  flex: 1 1 280px;
  max-width: 420px;
}

.actor-search-form .input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
}

.actor-search-form .btn {
  height: 44px;
  flex-shrink: 0;
}

.actor-matches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.actor-matches[hidden],
.actor-grid[hidden] {
  display: none;
}

.actor-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 1rem;
}

.actor-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.actor-card .poster-initials {
  font-size: 2rem;
}

.actor-score-badge {
  position: absolute;
  top: 0.45rem;
  left: 0.45rem;
  z-index: 2;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(7, 7, 12, 0.84);
  border: 1px solid rgba(245, 197, 24, 0.5);
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 800;
}

/* ---------- Kompakt tjänstepanel, loggor & listväljare ---------- */
.panel-header-split {
  justify-content: space-between;
  align-items: flex-start;
}

.panel-header-left {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.services-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.services-summary[hidden],
.services-body[hidden],
.list-picker-popover[hidden] {
  display: none;
}

.svc-logo {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--brand);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.list-picker-popover {
  position: fixed;
  z-index: 200;
  min-width: 175px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.85);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.list-picker-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  padding: 0.3rem 0.55rem 0.2rem;
}

.list-picker-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
}

.list-picker-item:hover,
.list-picker-item:focus-visible {
  background: var(--accent-grad);
  color: #fff;
  outline: none;
}

.list-picker-count {
  font-size: 0.72rem;
  opacity: 0.75;
  font-variant-numeric: tabular-nums;
}

/* ---------- Avsnittskoll (kryssrutor) & Se tillsammans-hint ---------- */
.want-extras-bar {
  align-items: center;
}

.want-extras-hint {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.season-tracker {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.season-tracker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.season-switch-btns {
  display: flex;
  gap: 0.25rem;
}

.episode-check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ep-check-btn {
  min-width: 34px;
  height: 30px;
  padding: 0 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  background: var(--bg-soft);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.ep-check-btn:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

.ep-check-btn.is-watched {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.55);
  color: #4ade80;
}

.ep-more-btn {
  border-style: dashed;
  color: var(--accent-2);
}

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


/* ===== IMDb Topp 100 ===== */
.imdb-section {
  margin-top: 1.5rem;
}

.imdb-head {
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
}

.imdb-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.imdb-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.imdb-filter-input {
  min-width: 210px;
  flex: 1 1 200px;
}

.imdb-grid {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.65rem;
}

.imdb-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  min-width: 0;
}

.imdb-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

.imdb-rank {
  flex-shrink: 0;
  min-width: 2.35rem;
  text-align: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: var(--gold, #fbbf24);
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 999px;
  padding: 0.2rem 0.45rem;
}

.imdb-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.imdb-title {
  font-size: 0.9rem;
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imdb-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.imdb-add-btn {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(244, 63, 94, 0.18);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, background 0.15s ease;
}

.imdb-add-btn:hover:not(:disabled) {
  background: var(--accent, #f43f5e);
  transform: scale(1.06);
}

.imdb-add-btn.is-added,
.imdb-add-btn:disabled {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
  cursor: default;
}

.imdb-empty {
  grid-column: 1 / -1;
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
}

.imdb-footer-actions {
  display: flex;
  justify-content: center;
  margin-top: 0.75rem;
}

.imdb-footer-actions [hidden] {
  display: none;
}


/* ===== Detail Modal (Handling & Skådespelare) ===== */
.is-detail-clickable {
  cursor: pointer;
}

body.modal-open {
  overflow: hidden;
}

.detail-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.detail-modal[hidden] {
  display: none;
}

.detail-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 7, 13, 0.78);
  backdrop-filter: blur(6px);
}

.detail-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg, 18px);
  padding: 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
}

.detail-modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1rem;
  cursor: pointer;
}

.detail-modal-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.detail-content {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.detail-top {
  display: flex;
  gap: 1.15rem;
  align-items: flex-start;
}

.detail-poster {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 2 / 3;
  border-radius: var(--radius-md);
}

.detail-head-info {
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.detail-title {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.detail-meta {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.detail-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.detail-genre-chip {
  font-size: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.detail-stream-line {
  font-size: 0.86rem;
  color: #86efac;
}

.detail-actions {
  margin-top: 0.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.detail-ext-link {
  text-decoration: none;
}

.detail-section h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.detail-overview {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

.detail-cast-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.detail-cast-head h3 {
  margin-bottom: 0;
}

.detail-cast-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.detail-cast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.5rem;
}

.detail-cast-chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  min-width: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.detail-cast-chip:hover {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.45);
}

.detail-cast-avatar {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  object-fit: cover;
  flex-shrink: 0;
}

.detail-cast-initials {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  font-size: 0.85rem;
}

.detail-cast-names {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.1rem;
}

.detail-cast-names strong {
  font-size: 0.84rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.detail-cast-char {
  font-size: 0.74rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 600px) {
  .detail-top {
    flex-direction: column;
  }
  .detail-poster {
    width: 96px;
    min-width: 96px;
  }
  .detail-cast-grid {
    grid-template-columns: 1fr;
  }
}

.cloud-auth-error {
  margin: 0;
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  border: 1px solid rgba(244, 63, 94, 0.45);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.4;
}

.cloud-auth-error[hidden] {
  display: none;
}

@media (max-width: 640px) {
  .view-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.35rem;
    padding: 0.3rem;
  }

  .view-tab {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    white-space: nowrap;
    padding: 0.45rem 0.45rem;
    font-size: 0.78rem;
    justify-content: center;
  }

  .chat-fab {
    padding: 0.42rem 0.72rem;
    font-size: 0.8rem;
    gap: 0.4rem;
  }

  .app-footer {
    padding-bottom: 5.5rem;
  }
}

/* Shared controls and responsive library layout. */
[hidden] { display: none !important; }
.sync-status { font-size: .75rem; color: #86efac; max-width: 16rem; }
.sync-status[data-state="error"] { color: #fda4af; }
.library-settings, .advanced-tools, .watch-diary { border: 1px solid var(--border); border-radius: 12px; padding: .7rem; margin: .6rem 0; }
summary { cursor: pointer; }
.settings-row, .diary-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: end; margin: .8rem 0; }
.diary-form { border-bottom: 1px solid var(--border); padding-bottom: .8rem; }
.diary-form label, .card-more label, .library-settings > label { display: flex; flex-direction: column; gap: .35rem; font-size: .8rem; color: var(--text-muted); }
.diary-form input, .diary-form select, .card-more select, .settings-row input { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: 8px; padding: .5rem; min-width: 0; max-width: 100%; }
.diary-form small { flex-basis: 100%; }
.library-settings > label { margin-top: 1rem; }
.included-filter { display: flex; align-items: center; gap: .5rem; margin: .8rem 0; font-size: .85rem; }
.last-check, .next-episode { font-size: .8rem; line-height: 1.5; color: var(--text-muted); }
.card-more { padding: .4rem .6rem; border: 1px solid var(--border); border-radius: 8px; }
.card-more[open] { flex-basis: 100%; display: flex; flex-wrap: wrap; }
.card-more[open] > * { margin: .3rem; }
.watch-diary { width: 100%; font-size: .85rem; }
.is-logged-in .hero { padding-top: 1.1rem; padding-bottom: 1rem; }
.is-logged-in .hero-intro,
.is-logged-in .hero-actions,
.is-logged-in .steps,
.is-logged-in .hero-copy::after { display: none; }
.is-logged-in .hero-inner { display: grid; grid-template-columns: 1fr; gap: 0.95rem; }
.is-logged-in .hero-quick-box { margin-top: 0; }
.is-logged-in .hero-stats { width: 100%; }
.topbar-nav a { white-space: nowrap; }
@media (max-width: 720px) {
  .mobile-bottom-nav { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .2rem; }
  .mobile-bottom-nav .chat-fab { position: static; display: flex; flex-direction: column; justify-content: center; padding: .3rem; min-width: 0; border-radius: 10px; box-shadow: none; gap: .15rem; font-size: .58rem; line-height: 1.1; }
  .mobile-bottom-nav .chat-fab img { width: 20px; height: 20px; }
  .mobile-bottom-nav .chat-fab span { white-space: normal; }
  .mobile-nav-link { padding: .3rem; font-size: .63rem; min-width: 0; }
  .chat-window { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); max-height: calc(100dvh - 7rem); z-index: 100; }
  .sync-status { font-size: .63rem; max-width: 6rem; }
  .topbar-inner { flex-wrap: wrap; gap: .35rem; }
  .diary-form > label { flex: 1 1 100%; }
  .title-card-actions { gap: .4rem; }
}

@media (max-width: 720px) {
  .mobile-bottom-nav:has(.chat-fab[hidden]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ===== Auth Gate, Google OAuth, Modal Undo & Narrow Actor Search ===== */
.cloud-oauth-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cloud-oauth-row[hidden] {
  display: none;
}

.cloud-oauth-divider {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-google {
  background: #fff;
  color: #1f2937;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-google:hover {
  background: #f3f4f6;
}

.google-g {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #4285f4, #34a853, #fbbc05, #ea4335);
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.auth-gate-card {
  text-align: center;
  padding: 2rem 1.4rem;
  align-items: center;
}

.auth-gate-card[hidden] {
  display: none;
}

.auth-gate-actions {
  margin-top: 0.5rem;
}

.detail-undo-btn {
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

@media (max-width: 900px) {
  .actor-head {
    flex-direction: column;
    align-items: stretch;
    gap: 0.85rem;
  }

  .actor-search-form {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    align-self: stretch;
  }
}

.cloud-logged-main {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.cloud-account-settings {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.notification-settings { width: 100%; padding: 1.25rem; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; background: rgba(255,255,255,.035); }
.notification-settings h3 { margin-bottom: .6rem; font-size: 1.15rem; }
.notification-settings > p, .notification-help { color: #b9bacb; font-size: .86rem; line-height: 1.7; margin: .5rem 0 .9rem; }
.notification-settings form { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; margin: 1.15rem 0; }
.notification-settings .share-check { display: flex; align-items: flex-start; gap: .6rem; line-height: 1.5; color: #e7e7ee; font-size: .94rem; }
.notification-settings input[type="checkbox"] { width: 18px; height: 18px; margin-top: .1rem; accent-color: #ff6845; flex-shrink: 0; }
.notification-device { margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.12); }
.notification-buttons { display: flex; flex-wrap: wrap; gap: .6rem; margin: .8rem 0; }
.notification-settings [role="status"] { color: #b6e9c7; margin-top: .8rem; min-height: 1.5em; line-height: 1.6; }
.notification-settings button:disabled { opacity: .5; cursor: default; }
@media (max-width: 620px) {
  .cloud-logged-in { padding: 0; background: transparent; border: 0; }
  .notification-settings { padding: .85rem; scroll-margin-top: 105px; }
  .notification-buttons { flex-direction: column; align-items: stretch; }
}

.cloud-mail-preview-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
  font-size: 0.9rem;
}

.cloud-mail-preview-bar[hidden] {
  display: none;
}

.cloud-newsletter-check {
  width: 100%;
}

/* ===== Admin Users & Broadcast Generator ===== */
.admin-broadcast-panel,
.admin-users-panel {
  margin-bottom: 1.5rem;
}

.admin-broadcast-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.admin-broadcast-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.admin-textarea {
  height: auto;
  min-height: 76px;
  padding: 0.65rem 0.8rem;
  resize: vertical;
  font-family: inherit;
}

.admin-broadcast-checks,
.admin-broadcast-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
}

.admin-users-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
}

.admin-users-table-wrap {
  overflow-x: auto;
  margin-top: 0.5rem;
}

.admin-users-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-users-table th,
.admin-users-table td {
  padding: 0.75rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  vertical-align: middle;
}

.admin-users-table th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.admin-user-name {
  display: block;
  color: var(--text);
}

.admin-user-email {
  font-size: 0.82rem;
  color: #93c5fd;
}

.admin-user-svcs {
  max-width: 240px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.admin-country-select {
  min-width: 140px;
}

.admin-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.admin-split-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.admin-split-insights h3 {
  margin-bottom: 0.5rem;
}

.service-chip[hidden] {
  display: none !important;
}

/* ===== Dagens Puls (Födelsedagsbubbla & Temafilmer) ===== */
.daily-pulse-wrap {
  margin: 0.75rem 0 1.4rem;
}

.daily-pulse-wrap[hidden],
.daily-pulse-bubble[hidden],
.daily-pulse-collapsed-pill[hidden],
.daily-theme-box[hidden] {
  display: none !important;
}

.daily-pulse-bubble {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.2rem 1.35rem;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(520px 220px at 0% 0%, rgba(245, 197, 24, 0.14), transparent 65%),
    radial-gradient(520px 220px at 100% 100%, rgba(255, 59, 92, 0.14), transparent 65%),
    var(--surface);
  border: 1px solid rgba(255, 184, 107, 0.32);
  box-shadow: 0 14px 36px -14px rgba(0, 0, 0, 0.75);
}

.pulse-star-col {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-width: 0;
}

.pulse-actor-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 78px;
  height: 102px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid rgba(245, 197, 24, 0.48);
  background: linear-gradient(145deg, rgba(255, 59, 92, 0.25), rgba(245, 197, 24, 0.18));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 20px -8px rgba(245, 197, 24, 0.45);
}

.pulse-actor-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pulse-actor-fallback {
  font-size: 1.45rem;
  font-weight: 800;
  color: #fde68a;
}

.pulse-star-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.pulse-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.pulse-date-badge,
.pulse-star-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  line-height: 1.3;
}

.pulse-date-badge {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
}

.pulse-star-badge {
  background: rgba(245, 197, 24, 0.16);
  color: #fde68a;
  border: 1px solid rgba(245, 197, 24, 0.45);
}

.pulse-star-name {
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text);
}

.pulse-star-note {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pulse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.pulse-event-col {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-left: 1.25rem;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.pulse-event-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pulse-theme-title {
  font-size: 1.05rem;
  font-weight: 750;
  color: var(--text);
  line-height: 1.25;
}

.pulse-theme-desc {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.pulse-trivia {
  margin-top: auto;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.daily-pulse-collapsed-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(245, 197, 24, 0.4);
  background: rgba(245, 197, 24, 0.12);
  color: #fde68a;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}

.daily-pulse-collapsed-pill:hover {
  transform: translateY(-1px);
  background: rgba(245, 197, 24, 0.2);
}

.pulse-pill-open {
  color: #fff;
  font-weight: 600;
  opacity: 0.85;
}

.daily-theme-box {
  margin-bottom: 1.6rem;
  border-color: rgba(255, 138, 61, 0.32);
  background:
    radial-gradient(600px 200px at 90% 0%, rgba(255, 138, 61, 0.1), transparent 60%),
    var(--surface);
}

.daily-theme-head {
  margin-bottom: 0.75rem;
  align-items: flex-start;
}

.daily-theme-grid {
  grid-auto-flow: row;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-auto-columns: unset;
  overflow-x: visible;
  padding-bottom: 0.25rem;
}

@media (max-width: 860px) {
  .daily-pulse-bubble {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .pulse-event-col {
    padding-left: 0;
    padding-top: 0.9rem;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
}

@media (max-width: 600px) {
  .daily-pulse-bubble {
    padding: 0.95rem 1rem;
  }

  .pulse-actor-avatar-wrap {
    width: 64px;
    height: 84px;
  }

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

/* ===== Admin: Levande kalender & Datumsimulator ===== */
.admin-pulse-panel {
  margin-bottom: 1.5rem;
}

.admin-pulse-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.admin-pulse-preview-card {
  margin-top: 0.9rem;
  padding: 0.9rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(245, 197, 24, 0.3);
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.admin-pulse-preview-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.admin-pulse-preview-movies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.25rem;
}

.admin-pulse-movie-chip {
  font-size: 0.78rem;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 59, 92, 0.14);
  border: 1px solid rgba(255, 138, 61, 0.35);
  color: #fed7aa;
}

/* ===== 8 Nya Funktioner: Trailers, Abonnemangskollen, Film/Serie-vy, Nedräkning, Filter & Swipe ===== */
.detail-trailer-box {
  margin: 1rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 138, 61, 0.35);
  background: #000;
  aspect-ratio: 16 / 9;
}

.detail-trailer-box[hidden],
.subscription-advisor[hidden],
.series-tracker-panel[hidden],
.swipe-panel[hidden],
.swipe-room-view[hidden],
.swipe-matches-box[hidden] {
  display: none !important;
}

.detail-trailer-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.subscription-advisor {
  margin: 0.85rem 0 1rem;
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(245, 197, 24, 0.12), rgba(255, 59, 92, 0.1));
  border: 1px solid rgba(245, 197, 24, 0.35);
}

.advisor-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
}

.advisor-copy {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1 1 280px;
}

.advisor-kicker {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fde68a;
}

.advisor-title {
  font-size: 0.98rem;
  color: var(--text);
}

.advisor-sub {
  font-size: 0.83rem;
  color: var(--text-muted);
}

.media-kind-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.35rem;
  margin: 0.4rem 0 0.9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
}

.media-kind-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.48rem 1rem;
  border-radius: 999px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s, color 0.18s;
}

.media-kind-btn.active {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: 0 6px 18px -6px rgba(255, 59, 92, 0.6);
}

.mood-runtime-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.filter-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.filter-pill {
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}

.filter-pill:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
}

.filter-pill.active {
  background: rgba(255, 138, 61, 0.18);
  border-color: rgba(255, 138, 61, 0.55);
  color: #ffedd5;
}

/* Dedikerad Serieöversikt & Nedräkning */
.series-tracker-panel {
  margin-bottom: 1.15rem;
  border-color: rgba(56, 189, 248, 0.3);
  background:
    radial-gradient(500px 180px at 100% 0%, rgba(56, 189, 248, 0.1), transparent 65%),
    var(--surface);
}

.series-tracker-title {
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.series-tracker-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

.series-tracker-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.series-tracker-thumb {
  width: 48px;
  height: 70px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.series-tracker-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.series-tracker-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.series-tracker-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.series-tracker-name {
  background: none;
  border: 0;
  padding: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}

.series-tracker-name:hover {
  text-decoration: underline;
}

.series-countdown-badge {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.18rem 0.58rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.13);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
}

.series-countdown-badge.is-urgent {
  background: rgba(245, 197, 24, 0.18);
  border-color: rgba(245, 197, 24, 0.5);
  color: #fde68a;
}

.series-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.series-progress-track {
  flex: 1 1 140px;
  max-width: 260px;
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.series-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #22c55e);
  border-radius: 999px;
}

.series-progress-label {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.series-tracker-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

/* Swipe-läge */
.swipe-setup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.swipe-setup-actions,
.swipe-join-group,
.swipe-room-bar,
.swipe-share-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.swipe-room-view {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.swipe-room-bar {
  justify-content: space-between;
}

.swipe-matches-box {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(34, 197, 94, 0.13);
  border: 1px solid rgba(34, 197, 94, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.swipe-matches-title {
  color: #bbf7d0;
  font-size: 0.92rem;
}

.swipe-matches-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.swipe-match-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(34, 197, 94, 0.35);
  font-size: 0.86rem;
}

.swipe-movie-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 1.15rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  align-items: center;
}

.swipe-poster-wrap {
  width: 150px;
  height: 222px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.swipe-poster-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swipe-poster-fallback {
  font-size: 2.2rem;
}

.swipe-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.swipe-card-title {
  font-size: 1.2rem;
}

.swipe-card-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.swipe-decision-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

.swipe-done-card {
  padding: 1.4rem;
  text-align: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
}

.wrapped-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .series-tracker-row {
    flex-wrap: wrap;
  }

  .swipe-movie-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .swipe-decision-btns {
    justify-content: center;
  }

  .hero-quick-row {
    flex-wrap: wrap;
  }

  .hero-quick-btn {
    width: 100%;
  }

  .hero-quick-options {
    grid-template-columns: 1fr;
  }
}

/* ---------- Admin Databas-backup ---------- */
.admin-backup-panel {
  border-color: rgba(16, 185, 129, 0.25);
}

.admin-backup-summary {
  padding: 0.7rem 0.95rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.22);
  font-size: 0.9rem;
  color: var(--text);
}

.admin-restore-label {
  cursor: pointer;
}

.admin-backup-list-wrap {
  margin-top: 1.1rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--border);
}

.admin-subhead {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 0.65rem;
}

.admin-backup-snapshots-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.admin-backup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.admin-backup-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

/* ---------- Personliga Streamingerbjudanden ---------- */
.watchlist-deals-banner {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.watchlist-deals-banner[hidden] {
  display: none;
}

.deal-promo-card {
  padding: 0.95rem 1.15rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(245, 197, 24, 0.12), rgba(255, 138, 61, 0.08) 55%, rgba(20, 20, 31, 0.95));
  border: 1px solid rgba(245, 197, 24, 0.36);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

.deal-promo-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.deal-promo-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.deal-promo-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.deal-promo-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: rgba(245, 197, 24, 0.16);
  border: 1px solid rgba(245, 197, 24, 0.4);
  color: #fde68a;
}

.deal-promo-expiry {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.deal-promo-body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.deal-promo-logo {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  background: var(--surface-2);
}

.deal-promo-copy {
  flex: 1 1 280px;
  min-width: 0;
}

.deal-promo-headline {
  display: block;
  font-size: 1.04rem;
  color: var(--text);
  margin-bottom: 0.2rem;
}

.deal-promo-unlock {
  font-size: 0.88rem;
  font-weight: 600;
  color: #bbf7d0;
  margin-bottom: 0.2rem;
}

.deal-promo-details {
  font-size: 0.81rem;
  color: var(--text-muted);
}

.deal-source-link {
  color: var(--accent-2);
  text-decoration: none;
}

.deal-source-link:hover {
  text-decoration: underline;
}

.deal-promo-cta {
  white-space: nowrap;
  flex-shrink: 0;
}

.admin-deals-panel {
  border-color: rgba(245, 197, 24, 0.28);
}

.admin-deal-form {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.admin-deal-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chat-title-row {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-ai-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.48);
  color: #7dd3fc;
  line-height: 1.3;
}


/* ===== Gemensamma listor (2+ användare) ===== */
.group-invite-banner {
  margin-bottom: 1.15rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid rgba(56, 189, 248, 0.45);
  background:
    radial-gradient(460px 180px at 0% 0%, rgba(56, 189, 248, 0.14), transparent 65%),
    radial-gradient(460px 180px at 100% 100%, rgba(255, 59, 92, 0.12), transparent 65%),
    var(--surface);
}

.group-invite-banner[hidden] {
  display: none !important;
}

.group-invite-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.group-invite-copy {
  min-width: 240px;
  flex: 1 1 320px;
}

.group-invite-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 0.25rem;
}

.group-invite-title {
  margin: 0 0 0.25rem;
  font-size: 1.12rem;
  color: var(--text);
}

.group-invite-meta {
  margin: 0;
  font-size: 0.87rem;
  color: var(--text-muted);
}

.group-invite-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.groups-view[hidden] {
  display: none !important;
}

.groups-toolbar {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.groups-toolbar-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.groups-toolbar-form .input {
  flex: 1;
  min-width: 0;
}

.groups-empty-card {
  padding: 1.6rem 1.4rem;
  text-align: center;
  border-style: dashed;
}

.groups-empty-card h3 {
  margin: 0 0 0.45rem;
}

.group-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.group-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.48rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.group-pill:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
}

.group-pill.active {
  border-color: rgba(56, 189, 248, 0.72);
  background: rgba(56, 189, 248, 0.15);
  color: #e0f2fe;
}

.group-pill-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
}

.group-workspace {
  padding: 1.2rem 1.3rem;
}

.group-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  padding-bottom: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.group-title {
  margin: 0 0 0.25rem;
  font-family: var(--font-display);
  font-size: 1.32rem;
}

.group-subtitle {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.group-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.group-members-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin: 0.9rem 0;
}

.group-members-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-right: 0.15rem;
}

.group-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.group-member-chip.is-owner {
  border-color: rgba(245, 197, 24, 0.42);
  background: rgba(245, 197, 24, 0.1);
}

.group-member-remove {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0 0.15rem;
}

.group-member-remove:hover {
  color: #fb7185;
}

.group-add-bar {
  margin: 0.95rem 0 1.2rem;
}

.group-add-form {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
}

.group-add-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.group-add-input-wrap .input {
  width: 100%;
}

.group-add-suggestions {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 40;
  background: #141824;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.72);
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
}

.group-add-suggestions[hidden] {
  display: none !important;
}

.group-suggestion-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.group-suggestion-item:last-child {
  border-bottom: none;
}

.group-suggestion-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.group-suggestion-poster {
  width: 34px;
  height: 50px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
}

.group-suggestion-info {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.group-suggestion-info strong {
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.group-suggestion-info span {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.group-items-empty {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

.group-cards-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 0.85rem;
}

.group-item-card {
  display: flex;
  gap: 0.85rem;
  padding: 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--border);
  transition: border-color 0.16s ease, opacity 0.16s ease;
}

.group-item-card:hover {
  border-color: rgba(255, 255, 255, 0.22);
}

.group-item-card.is-watched {
  opacity: 0.68;
}

.group-item-poster-btn {
  flex-shrink: 0;
  width: 68px;
  height: 102px;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  display: grid;
  place-items: center;
}

.group-item-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.group-item-poster-fallback {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-muted);
}

.group-item-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.group-item-title {
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  line-height: 1.25;
}

.group-item-title:hover {
  color: var(--accent-2);
}

.group-item-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.group-item-rating {
  font-weight: 700;
}

.group-item-added-by {
  padding: 0.06rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 0.72rem;
}

.group-item-services {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.1rem;
}

.group-svc-chip {
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.48rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  cursor: pointer;
}

.group-svc-chip.is-matched {
  border-color: rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.group-item-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 0.25rem;
}

.group-vote-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-strong);
  color: var(--text);
}

.group-vote-btn.is-voted {
  background: rgba(245, 197, 24, 0.18);
  border-color: rgba(245, 197, 24, 0.65);
  color: #fde68a;
}

.group-remove-btn {
  margin-left: auto;
  padding-inline: 0.5rem;
}

.detail-group-select {
  max-width: 195px;
}

@media (max-width: 720px) {
  .groups-toolbar {
    grid-template-columns: 1fr;
  }

  .group-cards-grid {
    grid-template-columns: 1fr;
  }

  .group-add-form {
    flex-direction: column;
  }

  .group-add-form .btn {
    width: 100%;
  }
}
