/* ==========
   Global base
   ========== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg: #08162f;
  --app-bg-base: linear-gradient(180deg, #0b1d3d 0%, #08162f 55%, #071126 100%);
  --card-bg: #ffffff;
  --border-subtle: #e5e7eb;
  --text-main: #111827;
  --text-muted: #6b7280;
  --brand-blue-start: #3aa7ff;
  --brand-blue-mid: #1f76ff;
  --brand-blue-end: #1a49e6;
  --brand-blue-gradient: linear-gradient(120deg, var(--brand-blue-start) 0%, var(--brand-blue-mid) 52%, var(--brand-blue-end) 100%);
  --brand-blue-gradient-hover: linear-gradient(120deg, #57b6ff 0%, #3889ff 52%, #2558f0 100%);
  --brand-blue-shadow: rgba(31, 118, 255, 0.32);
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #b91c1c;
  --success: #16a34a;
  --radius-md: 10px;
  --shadow-soft: 0 10px 25px rgba(0,0,0,0.06);
  --transition-fast: 0.15s ease-in-out;
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
}

body {
  position: relative;
  isolation: isolate;
  font-family: var(--font-main);
  background: var(--app-bg-base);
  background-attachment: fixed;
  overflow-x: hidden;
  color: var(--text-main);
}

body::before {
  content: "";
  position: fixed;
  inset: -18% -14%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(46% 40% at 82% 8%, rgba(59, 130, 246, 0.38) 0%, rgba(59, 130, 246, 0.22) 44%, transparent 74%),
    radial-gradient(44% 36% at 7% 30%, rgba(37, 99, 235, 0.34) 0%, rgba(37, 99, 235, 0.18) 40%, transparent 74%),
    radial-gradient(40% 34% at 86% 90%, rgba(14, 116, 144, 0.30) 0%, rgba(14, 116, 144, 0.16) 38%, transparent 72%);
  filter: blur(6px) saturate(108%);
  opacity: 0.92;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: 50% 50%;
  animation: bg-highlight-drift 16s ease-in-out infinite;
  will-change: transform, opacity;
}

@keyframes bg-highlight-drift {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.82;
  }
  30% {
    transform: translate3d(-1.8%, -2.4%, 0) scale(1.07);
    opacity: 1;
  }
  68% {
    transform: translate3d(2.2%, 2.8%, 0) scale(0.95);
    opacity: 0.86;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.82;
  }
}

/* ==========
   Layouts
   ========== */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar (header) */
.topbar {
  background: #111827;
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.1;
}

.topbar__brand-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
}

.topbar__brand-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  padding-left: 10px;
  margin-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.25);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #e5e7eb;
}

.topbar a {
  color: #e5e7eb;
  text-decoration: none;
  margin-left: 12px;
}

.topbar a:hover {
  text-decoration: underline;
}
.topbar .topbar__btn {
  border-color: rgba(255,255,255,0.5);
  color: #e5e7eb;
  padding: 6px 12px;
}
.topbar .topbar__btn:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
  text-decoration: none;
}
.topbar__logo-img {
  height: 34px;
  max-width: 172px;
  width: auto;
  display: block;
  object-fit: contain;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-radius: 7px;
  padding: 2px 4px;
  border: 1px solid rgba(255,255,255,0.26);
}
.topbar__logo-placeholder {
  height: 30px;
  width: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #111827;
  background: #e5e7eb;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.12);
}

/* Main content card */
.page-main {
  flex: 1;
  display: flex;
  justify-content: center;
  padding: 32px 24px 48px;
  background: transparent;
}

.card {
  width: 100%;
  max-width: 1100px;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  padding: 20px 24px;
}

.card.watch-card {
  max-width: 1600px;
  position: relative;
  overflow: visible;
  background:
    repeating-radial-gradient(
      circle at 18% 22%,
      rgba(17, 24, 39, 0.035) 0px,
      rgba(17, 24, 39, 0.035) 1px,
      transparent 1px,
      transparent 32px
    ),
    repeating-radial-gradient(
      circle at 82% 78%,
      rgba(15, 23, 42, 0.03) 0px,
      rgba(15, 23, 42, 0.03) 1px,
      transparent 1px,
      transparent 34px
    ),
    linear-gradient(160deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.page--watch .gdpr-footer {
  display: none;
}

.watch-gdpr-tag-wrap {
  position: absolute;
  left: clamp(14px, 2vw, 24px);
  top: calc(100% + 2px);
  display: inline-flex;
  z-index: 4;
}

.watch-gdpr-tag.btn,
.watch-gdpr-tag.btn.btn-outline {
  opacity: 0.74;
  transform: none;
  box-shadow: none;
}

.watch-gdpr-tag.btn:hover,
.watch-gdpr-tag.btn.btn-outline:hover {
  opacity: 0.98;
}
.card--contours {
  background:
    repeating-radial-gradient(
      circle at 18% 22%,
      rgba(17, 24, 39, 0.035) 0px,
      rgba(17, 24, 39, 0.035) 1px,
      transparent 1px,
      transparent 32px
    ),
    repeating-radial-gradient(
      circle at 82% 78%,
      rgba(15, 23, 42, 0.03) 0px,
      rgba(15, 23, 42, 0.03) 1px,
      transparent 1px,
      transparent 34px
    ),
    linear-gradient(160deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
}

.page--customer-dashboard .card {
  max-width: 1400px;
}


.page--attendance .page-main {
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
}
.page--attendance .webinar-hero,
.page--attendance .card {
  width: 100%;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}
.page--attendance .webinar-hero {
  background-size: cover, contain;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
}
.page--attendance .webinar-hero__content {
  max-width: 100%;
  width: 100%;
}
.page--attendance .title-row {
  width: 100%;
}
.page--attendance .hero-meta.stats-grid {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

/* Headings / text */
.card h1 {
  margin-top: 0;
  font-size: 22px;
  margin-bottom: 6px;
}

.card .subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.title-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 8px;
  }
  .watch-card .title-row {
    align-items: flex-start;
  }
  .title-row h1 {
    margin: 0;
    line-height: 1.2;
  }
  .watch-card .title-row h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.2px;
  }
  .watch-card .title-row .subtitle {
    font-size: 14px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
  }
  .watch-status-pill {
    padding: 8px 18px;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    min-height: 34px;
  }
  .watch-end-transition {
    position: fixed;
    inset: 0;
    z-index: 130;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms ease;
    background:
      radial-gradient(120% 90% at 50% 50%, rgba(30, 64, 175, 0.24), transparent 70%),
      rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(3px);
  }
  .watch-end-transition__inner {
    width: min(640px, 92vw);
    text-align: center;
    padding: 28px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.86));
    color: #f8fafc;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.52);
    opacity: 0;
    transform: scale(1.34);
  }
  .watch-end-transition__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.95);
  }
  .watch-end-transition__inner h2 {
    margin: 0;
    font-size: clamp(28px, 4.8vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.02em;
  }
  .watch-end-transition__inner p {
    margin: 12px 0 0;
    font-size: clamp(14px, 2.2vw, 18px);
    color: rgba(224, 231, 255, 0.95);
  }
  .watch-entry-transition {
    position: fixed;
    inset: 0;
    z-index: 129;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
    background:
      radial-gradient(120% 90% at 50% 50%, rgba(30, 64, 175, 0.24), transparent 70%),
      rgba(2, 6, 23, 0.42);
    backdrop-filter: blur(3px);
  }
  .watch-entry-transition__inner {
    width: min(700px, 92vw);
    text-align: center;
    padding: 28px 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: linear-gradient(160deg, rgba(15, 23, 42, 0.9), rgba(30, 58, 138, 0.86));
    color: #f8fafc;
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.52);
    opacity: 0;
    transform: scale(1.16);
    filter: blur(6px);
  }
  .watch-entry-transition__eyebrow {
    margin: 0 0 10px;
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(191, 219, 254, 0.95);
  }
  .watch-entry-transition__inner h2 {
    margin: 0;
    font-size: clamp(28px, 4.8vw, 48px);
    line-height: 1.06;
    letter-spacing: -0.02em;
  }
  .watch-entry-transition__inner p {
    margin: 12px 0 0;
    font-size: clamp(14px, 2.2vw, 18px);
    color: rgba(224, 231, 255, 0.95);
  }
  .watch-entry-transition__actions {
    margin-top: 18px;
    display: flex;
    justify-content: center;
  }
  .watch-entry-transition__ok {
    min-width: 120px;
  }
  .watch-entry-transition.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  .watch-entry-transition.is-visible .watch-entry-transition__inner {
    animation: watch-entry-intro-in 560ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  .watch-entry-transition.is-visible.is-leaving {
    opacity: 0;
    transition-duration: 820ms;
  }
  .watch-entry-transition.is-visible.is-leaving .watch-entry-transition__inner {
    animation: watch-entry-intro-out 820ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  }
  body.watch-intro-active .page-main {
    pointer-events: none;
  }
  body.watch-ending .page-main {
    pointer-events: none;
  }
  body.watch-ending .watch-card {
    transform-origin: 50% 44%;
    animation: watch-card-zoom-away 950ms cubic-bezier(0.16, 0.84, 0.22, 1) forwards;
  }
  body.watch-ending .watch-end-transition {
    opacity: 1;
  }
  body.watch-ending .watch-end-transition__inner {
    animation: watch-thanks-in 860ms cubic-bezier(0.16, 1, 0.3, 1) 220ms forwards;
  }
  html.autostart-preblack body.page--watch {
    background: #000 !important;
  }
  html.autostart-preblack body.page--watch .page-main {
    visibility: hidden;
  }
.autostart-stage {
  --autostart-burst-ms: 1400ms;
  position: fixed;
  inset: 0;
    z-index: 136;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
  }
  .autostart-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
      radial-gradient(140% 110% at 50% 54%, rgba(59, 130, 246, 0.62) 0%, rgba(30, 64, 175, 0.55) 42%, rgba(15, 23, 42, 0.62) 100%),
      linear-gradient(180deg, rgba(37, 99, 235, 0.62), rgba(30, 64, 175, 0.63));
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    opacity: 0;
  }
  .autostart-stage.is-burst {
    animation: autostart-stage-burst var(--autostart-burst-ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .autostart-stage.is-final {
    opacity: 1;
  visibility: visible;
}

.autostart-zero-blur {
  position: fixed;
  inset: 0;
  z-index: 131;
  pointer-events: none;
  opacity: 0;
  background: rgba(2, 6, 23, 0);
  -webkit-backdrop-filter: blur(0);
  backdrop-filter: blur(0);
  will-change: opacity, backdrop-filter, background;
}

.autostart-zero-blur.is-visible {
  animation: autostart-zero-blur-pulse 2080ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes autostart-zero-blur-pulse {
  0% {
    opacity: 0;
    background: rgba(2, 6, 23, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
  34% {
    opacity: 1;
    background: rgba(2, 6, 23, 0.24);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }
  100% {
    opacity: 0;
    background: rgba(2, 6, 23, 0);
    -webkit-backdrop-filter: blur(0);
    backdrop-filter: blur(0);
  }
}
  .autostart-stage.is-burst::before {
    animation: autostart-stage-drench var(--autostart-burst-ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .autostart-stage.is-final::before {
    opacity: 0.44;
  }
  .autostart-stage__card {
    position: relative;
    z-index: 1;
    width: min(560px, 94vw);
    text-align: center;
    border-radius: 18px;
    border: 1px solid rgba(191, 219, 254, 0.7);
    color: #eff6ff;
    background:
      radial-gradient(110% 90% at 20% 18%, rgba(191, 219, 254, 0.34), transparent 60%),
      radial-gradient(110% 90% at 84% 12%, rgba(37, 99, 235, 0.34), transparent 56%),
      linear-gradient(165deg, rgba(29, 78, 216, 0.96), rgba(30, 64, 175, 0.98));
    box-shadow: 0 30px 90px rgba(2, 6, 23, 0.62), 0 0 0 1px rgba(147, 197, 253, 0.26) inset;
    padding: 28px 30px 30px;
    transform: scale(0.82);
    opacity: 0;
    filter: blur(7px) saturate(0.84);
    will-change: transform, opacity, filter;
  }
  .autostart-stage.is-burst .autostart-stage__card,
  .autostart-stage__card.is-burst {
    animation: autostart-card-burst var(--autostart-burst-ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  .autostart-stage.is-final .autostart-stage__card {
    transform: scale(1);
    opacity: 1;
    filter: none;
  }
  .autostart-stage__kicker {
    margin: 0 0 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: rgba(219, 234, 254, 0.94);
  }
  .autostart-stage__value {
    margin: 0;
    font-size: clamp(38px, 10vw, 90px);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.03em;
    text-shadow: 0 10px 30px rgba(15, 23, 42, 0.48);
  }
  .autostart-stage__meta {
    margin-top: 12px;
    font-size: clamp(13px, 2.8vw, 20px);
    color: rgba(219, 234, 254, 0.96);
  }
  .autostart-blackout {
    position: fixed;
    inset: 0;
    z-index: 141;
    pointer-events: none;
    background: #000;
    opacity: 0;
    transition: opacity 560ms ease;
  }
  .autostart-blackout.is-visible {
    opacity: 1;
    pointer-events: auto;
  }
  .autostart-blackout.is-revealing {
    transition: none;
  }
  .autostart-live-splash {
    --autostart-live-card-opacity: 0;
    --autostart-live-curtain-opacity: 0;
    --autostart-live-curtain-open: 0;
    position: fixed;
    inset: 0;
    z-index: 140;
    pointer-events: none;
    display: block;
    overflow: hidden;
    visibility: hidden;
  }
  .autostart-live-splash.is-visible {
    visibility: visible;
  }
  .autostart-live-splash__curtain {
    position: absolute;
    top: -3%;
    bottom: -3%;
    width: 58%;
    z-index: 2;
    opacity: var(--autostart-live-curtain-opacity);
    will-change: transform, opacity;
    background:
      linear-gradient(180deg, rgba(237, 246, 255, 0.23) 0%, rgba(237, 246, 255, 0.05) 14%, rgba(4, 12, 30, 0.48) 100%),
      repeating-linear-gradient(90deg, rgba(8, 18, 48, 0.48) 0%, rgba(23, 47, 113, 0.4) 4.2%, rgba(7, 15, 39, 0.44) 8.4%, rgba(37, 66, 147, 0.34) 12.6%, rgba(7, 14, 36, 0.48) 16.8%),
      linear-gradient(180deg, #355cb8 0%, #254a9f 32%, #183373 64%, #0e214f 100%);
    box-shadow: inset -24px 0 28px rgba(5, 11, 30, 0.5), inset 0 30px 32px rgba(214, 230, 255, 0.17), inset 0 -20px 26px rgba(3, 8, 21, 0.54), 0 24px 36px rgba(0, 0, 0, 0.42);
  }
  .autostart-live-splash__curtain::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 28px;
    opacity: 0.54;
    background: linear-gradient(180deg, rgba(226, 236, 255, 0.56), rgba(10, 20, 52, 0.62));
  }
  .autostart-live-splash__curtain::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 30px;
    opacity: 0.42;
    background: linear-gradient(180deg, rgba(2, 7, 19, 0.75), rgba(12, 28, 70, 0.66));
  }
  .autostart-live-splash__curtain--left {
    left: -8%;
    transform: translate3d(calc(var(--autostart-live-curtain-open) * -112%), 0, 0);
    border-right: 1px solid rgba(207, 225, 255, 0.34);
  }
  .autostart-live-splash__curtain--left::before {
    right: 0;
  }
  .autostart-live-splash__curtain--left::after {
    right: 14px;
  }
  .autostart-live-splash__curtain--right {
    right: -8%;
    transform: translate3d(calc(var(--autostart-live-curtain-open) * 112%), 0, 0);
    border-left: 1px solid rgba(207, 225, 255, 0.34);
  }
  .autostart-live-splash__curtain--right::before {
    left: 0;
  }
  .autostart-live-splash__curtain--right::after {
    left: 14px;
  }
  .autostart-live-splash__center {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: var(--autostart-live-card-opacity);
    transform: scale(calc(1 - (var(--autostart-live-curtain-open) * 0.1)));
    will-change: opacity, transform;
  }
  .autostart-live-splash__title {
    margin: 0;
    width: min(920px, 92vw);
    text-align: center;
    color: #f1f6ff;
    font-size: clamp(30px, 6.1vw, 64px);
    font-weight: 900;
    line-height: 1.02;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    text-shadow: 0 12px 34px rgba(4, 10, 28, 0.7), 0 2px 0 rgba(224, 236, 255, 0.14);
  }
  body.autostart-blackout-active .page-main {
    pointer-events: none;
  }
  @keyframes watch-card-zoom-away {
    0% {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
      filter: blur(0);
    }
    100% {
      opacity: 0;
      transform: translate3d(0, -10vh, 0) scale(0.15);
      filter: blur(6px);
    }
  }
  @keyframes watch-thanks-in {
    0% {
      opacity: 0;
      transform: scale(1.34);
      filter: blur(6px);
    }
    100% {
      opacity: 1;
      transform: scale(1);
      filter: blur(0);
    }
  }
  @keyframes autostart-stage-burst {
    0% {
      opacity: 0;
      visibility: visible;
    }
    14% {
      opacity: 1;
      visibility: visible;
    }
    82% {
      opacity: 1;
      visibility: visible;
    }
    100% {
      opacity: 0;
      visibility: hidden;
    }
  }
  @keyframes autostart-stage-drench {
    0% {
      opacity: 0;
    }
    18% {
      opacity: 0.5;
    }
    74% {
      opacity: 0.3;
    }
    100% {
      opacity: 0;
    }
  }
  @keyframes autostart-card-burst {
    0% {
      opacity: 0;
      transform: translate3d(0, 22px, 0) scale(0.68);
      filter: blur(8px) saturate(0.82);
    }
    22% {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1.06);
      filter: blur(0) saturate(1.08);
    }
    78% {
      opacity: 1;
      transform: translate3d(0, 0, 0) scale(1);
      filter: blur(0) saturate(1.02);
    }
    100% {
      opacity: 0;
      transform: translate3d(0, -8px, 0) scale(0.98);
      filter: blur(2px) saturate(0.96);
    }
  }
  @keyframes watch-entry-intro-in {
    0% {
      opacity: 0;
      transform: scale(1.16);
      filter: blur(6px);
    }
    100% {
      opacity: 1;
      transform: scale(1);
      filter: blur(0);
    }
  }
  @keyframes watch-entry-intro-out {
    0% {
      opacity: 1;
      transform: scale(1);
      filter: blur(0);
    }
    100% {
      opacity: 0;
      transform: scale(0.95);
      filter: blur(5px);
    }
  }
  .title-block {
    flex: 1;
    min-width: 0;
  }
  .title-block h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
}
.customer-logo-wrap {
  flex-shrink: 0;
}
.customer-logo-wrap--stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.btn-profile-link {
  min-width: 120px;
}
.customer-logo {
  max-height: 64px;
  max-width: 180px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  box-shadow: var(--shadow-soft);
}
.customer-logo--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-muted);
  background: #f3f4f6;
}
.branding-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.customer-logo-preview {
  max-height: 70px;
  max-width: 220px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
}
.customer-logo-preview--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
  background: #f9fafb;
  min-width: 120px;
  min-height: 60px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
}
.logo-form input[type="file"] {
  padding-left: 0;
}

/* ==========
   Forms
   ========== */

.form-row {
  margin-bottom: 12px;
}

label {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="datetime-local"],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 7px 14px;
  border-radius: 6px;
  border: none;
  font-size: 13px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary {
  background: var(--brand-blue-gradient);
  color: #fff;
  border: 1px solid rgba(26, 73, 230, 0.42);
}

.btn-primary:hover {
  background: var(--brand-blue-gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px var(--brand-blue-shadow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(37,99,235,0.05);
}

.btn-danger {
  background: #b91c1c;
  color: #fff;
}

.btn-danger:hover {
  background: #991b1b;
}

.btn-success {
  background: #16a34a;
  color: #fff;
}

.btn-success:hover {
  background: #15803d;
}

.btn-vod-live {
  background: linear-gradient(120deg, #7f1d1d, #ef4444, #f97316, #ef4444);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
  animation: shimmer-red 3.5s ease-in-out infinite;
  border: 1px solid rgba(239, 68, 68, 0.6);
}

.btn-vod-live:hover {
  background-size: 200% 200%;
  color: #fff;
}

/* Alerts / messages */
.alert-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 10px;
}

.alert-success {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 9999;
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--success);
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-soft);
  animation: toast-fadeout 5s forwards;
}

@keyframes toast-fadeout {
  0% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); visibility: hidden; }
}

/* ==========
   Tables
   ========== */

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 8px 6px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
}

.table th {
  background: #f9fafb;
  text-align: left;
  font-weight: 600;
}

.table code {
  font-size: 11px;
  background: #f3f4f6;
  padding: 2px 4px;
  border-radius: 3px;
}

.table-row-answered {
  background: #f3f4f6;
}

/* ==========
   Embed page
   ========== */
.embed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.embed-box {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  background: #f9fafb;
  box-shadow: var(--shadow-soft);
}

.embed-box__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.embed-title {
  font-weight: 600;
}

.embed-desc {
  color: var(--text-muted);
  font-size: 12px;
  margin-top: 2px;
}

.embed-code {
  width: 100%;
  min-height: 140px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #fff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 12px;
  padding: 10px;
  resize: vertical;
}

.embed-note {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.poster-thumb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.poster-thumb {
  width: 140px;
  height: 80px;
  object-fit: cover;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
  display: block;
}

/* Utilities */
.text-muted {
  color: var(--text-muted);
  font-size: 12px;
}

.badge-live {
  color: #b91c1c;
  font-weight: 600;
}

.badge-ready {
  color: #d97706;
  font-weight: 500;
}

.badge-disabled {
  color: #6b7280;
}

.viewers {
  font-size: 12px;
  margin-top: 2px;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }

/* ==========
   Demo callouts
   ========== */

.demo-anchor {
  position: relative;
}

.demo-callout {
  position: absolute;
  z-index: 20;
  max-width: 240px;
  background: linear-gradient(140deg, rgba(248, 251, 255, 0.98), rgba(226, 242, 255, 0.98));
  border: 1px solid rgba(14, 116, 144, 0.22);
  border-radius: 22px;
  padding: 12px 14px;
  box-shadow: 0 24px 48px rgba(14, 116, 144, 0.18), 0 6px 16px rgba(15, 23, 42, 0.08);
  font-size: 12px;
  color: #111827;
  backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(10px);
  animation: demo-pop 0.6s ease-out forwards;
}

.demo-callout__title {
  display: block;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0e7490;
  font-weight: 700;
  margin-bottom: 4px;
}

.demo-callout.demo-right::after,
.demo-callout.demo-left::after,
.demo-callout.demo-top::after,
.demo-callout.demo-below::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: linear-gradient(140deg, rgba(248, 251, 255, 0.98), rgba(226, 242, 255, 0.98));
  border: 1px solid rgba(14, 116, 144, 0.22);
  transform: rotate(45deg);
  border-radius: 4px;
  box-shadow: 0 10px 20px rgba(14, 116, 144, 0.16);
}

.demo-callout.demo-right::after {
  left: -7px;
  top: 20px;
}

.demo-callout.demo-left::after {
  right: -7px;
  top: 20px;
}

.demo-callout.demo-logo {
  width: 240px;
  max-width: 240px;
}

.demo-callout.demo-top::after {
  left: 22px;
  bottom: -7px;
}

.demo-callout.demo-below::after {
  left: 22px;
  top: -7px;
}

@keyframes demo-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 900px) {
  .demo-callout {
    display: none;
  }
}

/* ==========
   Landing modal
   ========== */

body.modal-open {
  overflow: hidden;
}

body.modal-open .landing-shell {
  filter: blur(6px);
}
body.modal-open .page-main {
  filter: blur(4px);
}

.landing-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2000;
  pointer-events: none;
}

.landing-modal--open {
  display: flex;
  pointer-events: auto;
}

.landing-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
  z-index: 0;
}

.landing-modal__content {
  position: relative;
  z-index: 1;
  width: min(92vw, 560px);
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.08);
  pointer-events: auto;
}

.landing-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #0f172a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.landing-modal__title {
  margin: 0 0 6px;
  font-size: 24px;
}

.landing-modal__subtitle {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.landing-modal__error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 10px;
}

.landing-modal__success {
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0f172a;
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 16px;
}

/* ==========
   Edit modal
   ========== */

.edit-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 2200;
}

.edit-modal--open {
  display: flex;
}

.edit-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.edit-modal__content {
  position: relative;
  z-index: 1;
  width: min(92vw, 520px);
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.edit-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: #0f172a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.edit-modal__title {
  margin: 0 0 6px;
  font-size: 22px;
}

.edit-modal__subtitle {
  margin: 0 0 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.edit-modal__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.edit-modal__form label {
  font-size: 13px;
  font-weight: 600;
}

.edit-modal__form input[type="text"],
.edit-modal__form input[type="datetime-local"] {
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  font-size: 14px;
}

.edit-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}

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

.landing-auth-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: #111827;
}

.landing-auth-form input,
.landing-auth-form textarea {
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
}

.landing-auth-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.landing-auth-foot {
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

/* ==========
   Login layout
   ========== */

.auth-page {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
  .watch-entry-transition,
  .watch-entry-transition.is-visible,
  .watch-entry-transition.is-visible.is-leaving {
    transition: none;
  }
  .watch-entry-transition.is-visible .watch-entry-transition__inner,
  .watch-entry-transition.is-visible.is-leaving .watch-entry-transition__inner {
    animation: none;
    opacity: 1;
    transform: none;
    filter: none;
  }
  #player-shell.player-shell--go-live-in,
  .player-overlay.player-overlay--go-live-out {
    animation: none;
  }
  .autostart-zero-blur.is-visible {
    animation: none;
    opacity: 0.18;
    background: rgba(2, 6, 23, 0.2);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
  body.page--watch.watch-go-live::after {
    animation: none;
    opacity: 0.2;
    transform: none;
    filter: none;
  }
  body.watch-go-live .player-container {
    transform: none;
  }
  body.watch-ending .watch-card,
  body.watch-ending .watch-end-transition__inner {
    animation: none;
  }
  body.watch-ending .watch-card {
    opacity: 0;
  }
  body.watch-ending .watch-end-transition {
    opacity: 1;
  }
  body.watch-ending .watch-end-transition__inner {
    opacity: 1;
    transform: none;
    filter: none;
  }
  .autostart-stage,
  .autostart-stage.is-burst,
  .autostart-stage.is-final,
  .autostart-stage__card,
  .autostart-stage__card.is-burst,
  .autostart-blackout,
  .autostart-blackout.is-visible,
  .autostart-live-splash,
  .autostart-live-splash.is-visible,
  .autostart-live-splash__curtain,
  .autostart-live-splash__center {
    transition: none !important;
    animation: none !important;
    filter: none !important;
  }
  .autostart-live-splash__curtain,
  .autostart-live-splash__center {
    transform: none !important;
  }
  .autostart-stage.is-burst {
    visibility: visible !important;
    opacity: 1 !important;
  }
  .autostart-stage.is-final {
    visibility: visible !important;
    opacity: 1 !important;
  }
  .autostart-stage.is-burst::before {
    opacity: 0.5 !important;
  }
  .autostart-stage.is-final::before {
    opacity: 0.5 !important;
  }
  .autostart-stage.is-burst .autostart-stage__card,
  .autostart-stage__card.is-burst {
    opacity: 1 !important;
  }
  .autostart-live-splash.is-visible {
    opacity: 1 !important;
  }
  .autostart-live-splash.is-visible .autostart-live-splash__curtain {
    opacity: 1 !important;
  }
  .autostart-live-splash.is-visible .autostart-live-splash__center {
    opacity: 1 !important;
  }
}

.auth-card {
  background: #fff;
  padding: 24px 28px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  width: 320px;
}

/* ==========
   Live / watch page
   ========== */

.live-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(320px, 420px);
  gap: 20px;
  align-items: stretch;
}

.video-wrapper {
  flex: 2;
  min-width: 0;
}

.player-container {
  position: relative;
  width: 100%;
  max-width: none;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.20);
  transition: box-shadow 0.35s ease, transform 0.35s ease;
}

.waiting-music-shell {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: linear-gradient(158deg, rgba(255, 255, 255, 0.97), rgba(241, 245, 249, 0.92));
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  display: flex;
  align-items: center;
  gap: 10px;
}

.waiting-music-shell.is-hidden {
  display: none;
}

.waiting-music-shell__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #334155;
  white-space: nowrap;
}

.waiting-music-player {
  width: min(460px, 100%);
  height: 34px;
  flex: 1 1 auto;
}

body.page--watch::after {
  content: "";
  position: fixed;
  inset: -34% -24%;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.78) translate3d(0, 4%, 0);
  filter: blur(18px) saturate(1.12);
  will-change: opacity, transform, filter;
  background:
    radial-gradient(46% 42% at 50% 56%, rgba(239, 68, 68, 0.86) 0%, rgba(239, 68, 68, 0.42) 48%, transparent 74%),
    radial-gradient(62% 54% at 50% 50%, rgba(220, 38, 38, 0.66) 0%, rgba(220, 38, 38, 0.28) 44%, transparent 78%),
    radial-gradient(92% 82% at 50% 50%, rgba(127, 29, 29, 0.44) 0%, transparent 74%);
}

body.page--watch.watch-go-live::after {
  animation: watch-go-live-bg-bloom 2400ms cubic-bezier(0.22, 0.82, 0.2, 1) forwards;
}

body.watch-go-live .player-container {
  box-shadow: 0 24px 50px rgba(2, 6, 23, 0.45), 0 0 0 1px rgba(96, 165, 250, 0.28);
  transform: translateY(-1px);
}

body.watch-go-live .waiting-music-shell,
body.watch-ending .waiting-music-shell {
  display: none;
}

#player-shell {
  position: relative;
  z-index: 1;
}

#player-shell.player-shell--prewarm {
  opacity: 0;
  visibility: hidden;
}

#player-shell.player-shell--go-live-in {
  animation: watch-player-shell-go-live-in 1100ms cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

/* Allow demo callouts to sit outside the player shell */
.demo-mode .player-container {
  overflow: visible;
}

/* Keep rounded corners even when overflow is visible in demo mode */
.demo-mode .player-container .live-player,
.demo-mode .player-container .player-overlay {
  border-radius: var(--radius-md);
  overflow: hidden;
  clip-path: inset(0 round var(--radius-md));
}

.player-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #fff;
  font-size: 28px;
  background-color: rgba(0, 0, 0, 0.5);
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  pointer-events: none;
  text-shadow: 0 6px 18px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.85);
  will-change: opacity, transform, filter;
}

#overlay-main-text {
  width: min(94%, 1120px);
  margin: 0 auto;
  font-size: clamp(34px, 5.6vw, 76px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-align: center;
  text-wrap: balance;
  transition: opacity 180ms ease, transform 180ms ease;
}

.player-overlay.player-overlay--final-countdown #overlay-main-text {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(0.97);
}

.player-overlay.player-overlay--go-live-out {
  animation: watch-player-overlay-go-live-out 1100ms cubic-bezier(0.2, 0.85, 0.2, 1) forwards;
}

/* Ensure poster covers the player area */
mux-player.live-player::part(poster),
mux-player.live-player::part(poster-image) {
  object-fit: cover;
}

.player-overlay__countdown {
  font-size: 18px;
  opacity: 0.9;
}

#live-countdown-overlay {
  margin-top: 10px;
  font-size: clamp(24px, 4.1vw, 52px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

@keyframes watch-player-shell-go-live-in {
  0% {
    opacity: 0.42;
    transform: scale(1.02);
    filter: blur(10px) saturate(0.9);
  }
  38% {
    opacity: 0.72;
    transform: scale(1.035);
    filter: blur(30px) saturate(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0) saturate(1);
  }
}

@keyframes watch-player-overlay-go-live-out {
  0% {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  45% {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(26px);
  }
  75% {
    opacity: 0.72;
    transform: scale(1.01);
    filter: blur(10px);
  }
  100% {
    opacity: 0;
    transform: scale(1);
    filter: blur(0);
  }
}

@keyframes watch-go-live-bg-bloom {
  0% {
    opacity: 0;
    transform: scale(0.74) translate3d(0, 6%, 0);
    filter: blur(24px) saturate(1.02);
  }
  16% {
    opacity: 0.98;
    transform: scale(1.1) translate3d(0, -1.8%, 0);
    filter: blur(10px) saturate(1.55);
  }
  100% {
    opacity: 0;
    transform: scale(1.44) translate3d(0, -6.8%, 0);
    filter: blur(25px) saturate(1.04);
  }
}

.chat-panel {
  flex: 1;
  min-width: 260px;
  max-width: 420px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: #fff;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.30);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.chat-header {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-weight: 600;
  font-size: 14px;
  background: #f9fafb;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

.chat-messages {
  flex: 1;
  min-height: 0;
   max-height: 100%;
  padding: 10px;
  overflow-y: auto;
  font-size: 13px;
  background: #f8fafc;
}

.chat-input {
  border-top: 1px solid var(--border-subtle);
  padding: 10px;
  background: #fff;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.chat-input form {
  display: flex;
  gap: 8px;
}

.chat-input input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.chat-input button {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
}

.chat-main {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  background: #fff;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.question-box {
  border-top: none;
  padding: 10px 10px 6px;
  margin-top: 6px;
  background: #fff;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  flex: 0 0 auto;
}

.question-header {
  font-weight: 600;
  font-size: 14px;
  transition: color var(--transition-fast);
}

.question-box form,
.question-card form {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.question-box input[type="text"],
.question-card input[type="text"] {
  flex: 1;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #b91c1c;
  border-radius: 6px;
}

.question-box input[type="text"]:focus,
.question-card input[type="text"]:focus {
  outline: none;
  border-color: #991b1b;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.18);
}

.question-card {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff;
  border-radius: var(--radius-md);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.question-box .btn-primary,
.question-card .btn-primary {
  background: #b91c1c;
  border-color: #b91c1c;
}

.question-box .btn-primary:hover,
.question-card .btn-primary:hover {
  background: #991b1b;
  border-color: #991b1b;
}

.chat-msg {
  margin-bottom: 8px;
}

.chat-msg-self {
  text-align: right;
}

.chat-name {
  font-weight: 600;
  margin-right: 4px;
}

.chat-time {
  color: #9ca3af;
  font-size: 11px;
  margin-left: 4px;
}

.chat-text {
  word-wrap: break-word;
}

.chat-main.chat-active .chat-header {
  color: var(--accent);
  transform: none;
}

.chat-main.chat-active {
  transform: scale(1.01);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.25);
}

.question-box.question-active .question-header,
.question-card.question-active .question-header {
  color: #b91c1c;
}

.question-card.question-active {
  transform: scale(1.01);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  background: #fff;
  border-radius: var(--radius-md);
}

.question-box.question-active {
  transform: scale(1.01);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  background: #fff;
  border-radius: var(--radius-md);
}

.live-player {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 1100px) {
  .live-layout {
    grid-template-columns: 1fr;
  }
  .chat-panel {
    max-width: none;
    height: auto;
    min-height: 260px;
  }
}

.page--customer-dashboard .webinar-controls .btn,
.page--customer-dashboard .chat-controls .btn {
  min-width: 140px;
  min-height: 32px;
  text-align: center;
}

.page--customer-dashboard .inline-edit-form .btn,
.page--customer-dashboard .actions .btn,
.page--customer-dashboard .poster-thumb-row .btn {
  min-width: auto;
  min-height: 24px;
  padding: 4px 8px;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
}

.edit-btn {
  padding: 2px 6px;
  font-size: 11px;
  min-width: auto;
  min-height: 24px;
}

.edit-save-btn {
  padding: 4px 8px;
  font-size: 12px;
  min-width: auto;
  min-height: 28px;
}

.input-inline {
  width: 100%;
  margin-bottom: 6px;
}

.inline-edit-popover {
  position: absolute;
  right: 0;
  top: 100%;
  transform: translateY(6px);
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(0,0,0,0.18);
  padding: 10px;
  min-width: 240px;
  z-index: 5;
}

.inline-edit-popover .input-inline {
  margin-bottom: 8px;
}

/* ================
   Webinar detail
   ================ */
.page--webinar-detail .card {
  max-width: 1300px;
  position: relative;
}

.webinar-card {
  position: relative;
}

.webinar-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  border-radius: 14px;
  padding: 28px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  margin-bottom: 18px;
  min-height: 220px;
  display: flex;
  align-items: stretch;
}

.webinar-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  min-height: 180px;
}

/* Keep title/content clear of the fixed top-right action area */
.page--webinar-detail .webinar-hero__content {
  padding-right: 220px;
}

.hero-subtitle {
  margin: 0;
  color: #e5e7eb;
  font-size: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.hero-marker {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,255,255,0.92);
  color: #111827;
  padding: 10px 12px;
  border-radius: 10px;
  text-align: right;
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  cursor: pointer;
  z-index: 6;
}
.hero-marker * {
  pointer-events: none;
}
.hero-right .hero-marker {
  position: static;
}

.hero-marker__label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
}

.hero-marker__text {
  font-size: 14px;
  font-weight: 700;
}

.hero-right {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  z-index: 5;
}

.hero-top-actions {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 8px;
}

.hero-live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 10px !important;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-height: 44px;
}

.viewer-card {
  background: rgba(255,255,255,0.92);
  color: #111827;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 4px;
  align-self: flex-end;
}
.viewer-count {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
}
.viewer-icon {
  display: inline-flex;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
}
.viewer-label {
  font-size: 12px;
  color: var(--text-muted);
}

.webinar-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

/* Prevent long content from forcing horizontal overflow in grid children */
.webinar-grid > * {
  min-width: 0;
}

.files-panel {
  grid-column: 1;
}

.control-panel {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.panel {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.poster-figure {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow-soft);
}

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

.poster-upload {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.poster-upload__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.poster-upload input[type="file"] {
  flex: 1;
  min-width: 220px;
}

.file-upload-inline {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border: 1px dashed rgba(37, 99, 235, 0.35);
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.05);
}

.file-upload-inline__label {
  font-weight: 600;
  font-size: 13px;
}

.file-upload-inline__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file-upload-inline input[type="file"] {
  flex: 1;
  min-width: 220px;
}

.file-upload-inline__help {
  font-size: 12px;
}

.control-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}

.control-form .btn {
  width: 100%;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.toggle-card {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 12px;
  background:
    repeating-radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.06) 0px,
      rgba(37, 99, 235, 0.06) 2px,
      transparent 2px,
      transparent 10px
    ),
    repeating-radial-gradient(
      circle at 85% 75%,
      rgba(20, 184, 166, 0.05) 0px,
      rgba(20, 184, 166, 0.05) 2px,
      transparent 2px,
      transparent 12px
    ),
    linear-gradient(160deg, #f5f8ff 0%, #eef3fb 100%);
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-soft);
}

.toggle-card__label {
  font-weight: 600;
}

.toggle-card__state {
  font-size: 12px;
  color: var(--text-muted);
}


.toggle-card .btn {
  align-self: flex-start;
}

.state-on {
  color: var(--success);
  font-weight: 700;
}

.state-off {
  color: var(--text-muted);
}

.status-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.status-label {
  font-size: 12px;
  color: var(--text-muted);
}

.status-value {
  font-weight: 700;
}

.small-text {
  font-size: 12px;
  word-break: break-all;
}

.actions-panel {
  margin-top: 6px;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.action-card {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px;
  background:
    repeating-radial-gradient(
      circle at 20% 20%,
      rgba(37, 99, 235, 0.06) 0px,
      rgba(37, 99, 235, 0.06) 2px,
      transparent 2px,
      transparent 10px
    ),
    repeating-radial-gradient(
      circle at 85% 75%,
      rgba(20, 184, 166, 0.05) 0px,
      rgba(20, 184, 166, 0.05) 2px,
      transparent 2px,
      transparent 12px
    ),
    linear-gradient(160deg, #f5f8ff 0%, #eef3fb 100%);
  border-color: #dbeafe;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.action-card__top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  align-items: flex-start;
}

.action-card__top > div {
  flex: 1;
  min-width: 0;
}

.action-card .pill {
  align-self: flex-start;
  margin-top: 2px;
}

.action-card__title {
  font-weight: 700;
  line-height: 1.2;
}

.action-card__desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  line-height: 1.35;
}

.table .webinar-row {
  transition: background 0.15s ease;
}
.table .webinar-row--signal {
  background: #e4f6e8 !important;
  box-shadow: inset 3px 0 0 #2fbf5b;
}
.table .webinar-row:hover {
  background: #eef2ff !important;
}
.table .webinar-row--signal:hover {
  background: #d8f2dd !important;
}
.status-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pill--signal {
  background: #16a34a;
  color: #fff;
  border: 1px solid #15803d;
}

/* ==========
   Dashboard cards
   ========== */
@media (max-width: 900px) {
  .page--customer-dashboard .dashboard-webinars-table {
    display: block;
    width: 100%;
    overflow: visible;
  }

  .page--customer-dashboard .dashboard-webinars-table thead {
    display: none;
  }

  .page--customer-dashboard .dashboard-webinars-table tbody {
    display: block;
  }

  .page--customer-dashboard .dashboard-webinars-table .webinar-row {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: #fff !important;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    margin-bottom: 12px;
  }

  .page--customer-dashboard .dashboard-webinars-table .webinar-row--signal {
    box-shadow: inset 4px 0 0 #2fbf5b, var(--shadow-soft);
  }

  .page--customer-dashboard .dashboard-webinars-table td {
    display: block;
    width: 100%;
    border: none;
    padding: 6px 0;
    white-space: normal;
  }

  .page--customer-dashboard .dashboard-webinars-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 3px;
  }

  .page--customer-dashboard .dashboard-title-cell h2 {
    font-size: 19px !important;
    line-height: 1.25;
    margin-bottom: 8px !important;
  }

  .page--customer-dashboard .dashboard-start-cell .field-row {
    justify-content: flex-start;
  }

  .page--customer-dashboard .dashboard-status-cell .status-cell {
    gap: 8px;
  }

  .page--customer-dashboard .dashboard-registrations-cell .pill {
    justify-content: center;
    width: 100%;
  }

  .page--customer-dashboard .dashboard-delete-cell .btn {
    width: 100%;
  }

  .page--customer-dashboard .dashboard-webinars-table .poster-thumb {
    width: 100%;
    max-width: 240px;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .page--customer-dashboard .dashboard-webinars-table .poster-thumb-row {
    margin-top: 8px;
  }
}

.owner-top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.owner-top-actions__form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.owner-top-actions__input {
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  min-width: 160px;
}

@media (max-width: 900px) {
  .page--owner-dashboard .owner-top-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .page--owner-dashboard .owner-top-actions > .btn,
  .page--owner-dashboard .owner-top-actions > a.btn,
  .page--owner-dashboard .owner-top-actions__form .btn {
    width: 100%;
  }

  .page--owner-dashboard .owner-top-actions__form {
    width: 100%;
  }

  .page--owner-dashboard .owner-top-actions__form--embed {
    grid-column: 1 / -1;
  }

  .page--owner-dashboard .owner-top-actions__input {
    width: 100%;
    min-width: 0;
  }

  .page--owner-dashboard .owner-customers-table {
    display: block;
    width: 100%;
    overflow: visible;
  }

  .page--owner-dashboard .owner-customers-table thead {
    display: none;
  }

  .page--owner-dashboard .owner-customers-table tbody {
    display: block;
  }

  .page--owner-dashboard .owner-customers-table tr {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
    padding: 12px;
    margin-bottom: 12px;
  }

  .page--owner-dashboard .owner-customers-table td {
    display: block;
    width: 100%;
    border: none;
    padding: 6px 0;
    white-space: normal;
  }

  .page--owner-dashboard .owner-customers-table td[data-label]::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 3px;
  }

  .page--owner-dashboard .owner-customers-table td[data-label="Handlinger"] .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .page--owner-dashboard .owner-top-actions {
    grid-template-columns: 1fr;
  }

  .page--owner-dashboard .owner-top-actions__form--embed {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

.action-card .btn {
  align-self: flex-start;
  margin-top: auto;
  background: var(--brand-blue-gradient);
  color: #fff;
  border-color: rgba(26, 73, 230, 0.42);
}

.action-card .btn:hover {
  background: var(--brand-blue-gradient-hover);
  border-color: rgba(26, 73, 230, 0.55);
  color: #fff;
}

.action-card .btn.btn-success {
  background: var(--success);
  border-color: #15803d;
  color: #fff;
}

.action-card .btn.btn-success:hover {
  background: #15803d;
  border-color: #166534;
}

.action-card .btn.btn-danger {
  background: var(--danger);
  border-color: #991b1b;
  color: #fff;
}

.action-card .btn.btn-danger:hover {
  background: #991b1b;
  border-color: #7f1d1d;
}

.title-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .edit-title-btn {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.65);
    min-width: auto;
    padding: 6px 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  }
  .edit-title-btn:hover {
    background: rgba(255,255,255,0.25);
    color: #fff;
  }
  .title-edit-form {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 8px;
  }
  .stat-chip {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.45);
    color: #fff;
    padding: 12px 14px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    min-width: 0;
  }
  .stat-label {
    font-size: 12px;
    letter-spacing: 0.3px;
    color: #e5e7eb;
    margin-bottom: 4px;
    text-transform: uppercase;
  }
  .stat-value {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
  }
  .info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
  }
  .info-card {
    background: #f9fafb;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: var(--shadow-soft);
  }
  .section-title {
    font-size: 16px;
    margin: 0 0 8px;
  }

.stream-box {
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.stream-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 10px;
  transition: background 0.15s ease;
}
.stream-row--alt {
  background: #f3f4f6;
}
.stream-row:hover {
  background: #e9eef5;
}
.stream-box .btn.btn-outline:hover {
  background: #b91c1c;
  border-color: #b91c1c;
  color: #fff;
}
.stream-row--no-wrap {
  flex-wrap: nowrap;
}
.stream-value {
  flex: 1 1 auto;
  min-width: 0;
}
.stream-label {
  font-weight: 700;
}
.stream-code {
  display: block;
  word-break: break-all;
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
}
.stream-code--truncate {
  max-width: 520px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(0,0,0,0.08);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill--light {
  background: rgba(255,255,255,0.18);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.pill--status {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

.pill--ghost {
  background: #eef2f7;
  color: var(--text-main);
  border: 1px solid var(--border-subtle);
}

a.pill--ghost:hover {
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.35);
  color: #1d4ed8;
}

.pill--live {
  background: linear-gradient(120deg, #7f1d1d, #ef4444, #f97316, #ef4444);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
  animation: shimmer-red 3.5s ease-in-out infinite;
}

.pill--scheduled {
  background: #16a34a;
  color: #fff;
}

.pill--ended {
  background: #6b7280;
  color: #fff;
}

.pill--vod-live {
  background: linear-gradient(120deg, #7f1d1d, #ef4444, #f97316, #ef4444);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
  animation: shimmer-red 3.5s ease-in-out infinite;
}

.pill--vod-ready {
  background: #16a34a;
  color: #fff;
}

.pill--status.pill--vod-live {
  background: linear-gradient(120deg, #7f1d1d, #ef4444, #f97316, #ef4444);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
  animation: shimmer-red 3.5s ease-in-out infinite;
}

.pill--rtmp {
  background: rgba(255,255,255,0.16);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
}

@keyframes shimmer-red {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.pill--rtmp.idle {
  background: #111827;
  color: #fff;
}

.pill--rtmp.active {
  background: linear-gradient(120deg, #7f1d1d, #ef4444, #f97316, #ef4444);
  background-size: 200% 200%;
  color: #fff;
  box-shadow: 0 10px 22px rgba(239, 68, 68, 0.25);
  animation: shimmer-red 3.5s ease-in-out infinite;
}

.pill--rtmp.disabled,
.pill--rtmp.error {
  background: #b91c1c;
  color: #fff;
}

/* ================
   VOD trimming
   ================ */
.vod-section {
  margin-bottom: 22px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
}

.vod-section--trim {
  padding: 0;
  overflow: hidden;
}

.vod-section-toggle {
  width: 100%;
  border: 0;
  background: linear-gradient(135deg, #e0ebff, #f2f7ff);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  align-items: center;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
}

.vod-section-toggle__title {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.vod-section-toggle__hint {
  grid-column: 1 / 2;
  font-size: 12px;
  color: #475569;
}

.vod-section-toggle__icon {
  grid-column: 2 / 3;
  grid-row: 1 / span 2;
  font-size: 16px;
  color: #1d4ed8;
  transition: transform 0.18s ease;
}

.vod-section--trim .vod-section__content {
  padding: 14px;
  border-top: 1px solid var(--border-subtle);
}

.vod-section--trim.is-collapsed .vod-section-toggle {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  box-shadow: inset 4px 0 0 #2563eb;
}

.vod-section--trim.is-collapsed .vod-section-toggle__hint {
  color: #1e40af;
  font-weight: 600;
}

.vod-section--trim.is-collapsed .vod-section-toggle__icon {
  transform: rotate(-180deg);
}

.vod-overview {
  margin: 12px 0 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.vod-overview__item {
  border: 1px solid var(--border-subtle);
  background: #f8fafc;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vod-overview__label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.vod-section__header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
}

.vod-section__header h2 {
  margin: 0;
  font-size: 16px;
}

.vod-section__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.player-loading {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
}

.player-loading__text {
  white-space: nowrap;
}

.vod-player-shell {
  margin-bottom: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #f9fafb;
  cursor: pointer;
}

.vod-player-missing {
  margin-bottom: 12px;
}

.vod-preview-hint {
  margin-top: 8px;
}

.vod-asset-meta {
  margin-top: 6px;
  font-size: 12px;
}

.vod-form__actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-top: 6px;
  flex-wrap: wrap;
}

.vod-form__quick {
  display: flex;
  gap: 6px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.vod-form__numeric {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 4px;
}

.vod-trim-validation {
  margin-top: 6px;
  font-size: 13px;
}

.vod-trim-validation--ok {
  color: #166534;
}

.vod-trim-validation--error {
  color: #b91c1c;
}

.vod-summary-card {
  margin-top: 8px;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 12px;
  font-size: 13px;
}

.vod-timeline {
  margin: 14px 0 10px;
}

.vod-timeline__bar {
  position: relative;
  height: 12px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
  touch-action: none;
}

.vod-timeline__range {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
}

.vod-timeline__marker {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: var(--shadow-soft);
  cursor: ew-resize;
  touch-action: none;
  z-index: 2;
}

body.is-vod-marker-dragging {
  cursor: ew-resize;
  user-select: none;
}

.vod-timeline__marker--start {
  left: 0;
}

.vod-timeline__marker--end {
  left: 100%;
}

.vod-timeline__labels {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 8px 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
}

.vod-latest-card {
  padding: 14px;
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vod-latest__meta {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.vod-latest__label {
  margin-top: 2px;
}

.vod-latest__thumb-wrap {
  max-width: 520px;
}

.vod-library {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.vod-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.vod-item:hover,
.vod-item:focus-within {
  border-color: #93c5fd;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.12);
  transform: translateY(-1px);
}

.vod-item--selected {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.vod-item--ready {
  border-color: #16a34a;
}

.vod-item--selected.vod-item--ready {
  border-color: #2563eb;
}

.vod-item--live {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.14);
}

.vod-item--selected.vod-item--live {
  border-color: #ef4444;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.28), 0 12px 22px rgba(239, 68, 68, 0.2);
}

.vod-item__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.vod-item__meta {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.vod-item__actions {
  margin-top: auto;
}

.vod-select-btn {
  width: 100%;
}

.vod-thumb {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  width: 100%;
  box-shadow: var(--shadow-soft);
}

.vod-thumb--small {
  border-radius: 10px;
  aspect-ratio: 16 / 9;
}

.vod-thumb img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.vod-thumb--disabled {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  border: 1px dashed #d1d5db;
  background: #f3f4f6;
  box-shadow: none;
  cursor: default;
}

.vod-thumb__empty {
  font-size: 12px;
  color: #6b7280;
}

.vod-thumb__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(17, 24, 39, 0.75);
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.vod-publish-form {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.vod-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.vod-modal--open {
  display: flex;
}

.vod-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.vod-modal__content {
  position: relative;
  width: min(92vw, 960px);
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
  z-index: 1;
}

.vod-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #111827;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.vod-modal__player {
  width: 100%;
}

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

  .vod-form__numeric {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .webinar-grid {
    grid-template-columns: 1fr;
  }
  .files-panel,
  .control-panel {
    grid-column: auto;
    grid-row: auto;
  }
  .hero-marker {
    position: static;
    align-self: flex-start;
    margin-top: 12px;
  }
}

@media (max-width: 1200px) {
  .page-main {
    padding: 24px 16px 32px;
  }
  .card {
    padding: 18px;
  }
}

@media (max-width: 900px) {
  .topbar {
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  .topbar__brand-link {
    margin-left: 0;
    max-width: 100%;
  }
  .topbar__brand-text {
    min-width: 0;
    max-width: 65vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .topbar__right {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .topbar a {
    margin-left: 0;
  }

  .page-main {
    padding: 14px 10px 24px;
  }

  .card {
    padding: 14px 12px;
  }

  .title-row {
    align-items: flex-start;
    gap: 10px;
  }
  .title-block h1,
  .watch-card .title-row h1 {
    font-size: 22px;
  }

  .customer-logo {
    max-height: 54px;
    max-width: 140px;
  }

  .player-overlay {
    font-size: 22px;
    text-align: center;
    padding: 12px;
  }
  .player-overlay__countdown {
    font-size: 16px;
  }

  .chat-input form,
  .question-box form,
  .question-card form {
    flex-wrap: wrap;
  }
  .chat-input .btn,
  .question-box .btn,
  .question-card .btn {
    width: 100%;
  }

  .table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .webinar-hero {
    padding: 18px 14px;
    min-height: 0;
  }
  .webinar-hero__content {
    min-height: 0;
    max-width: 100%;
  }
  .page--webinar-detail .webinar-hero__content {
    padding-right: 0;
    padding-top: 54px;
  }
  .hero-right {
    position: static;
    width: 100%;
    margin-top: 10px;
    justify-content: flex-start;
  }
  .hero-marker {
    position: static;
    text-align: left;
    align-items: flex-start;
  }

  .page--webinar-detail .hero-right {
    position: absolute;
    top: 12px;
    right: 12px;
    width: auto;
    margin-top: 0;
    align-items: flex-end;
    align-self: auto;
    gap: 8px;
  }

  .page--webinar-detail .hero-top-actions {
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 8px;
  }

  .page--webinar-detail .hero-marker {
    position: static;
    text-align: right;
    align-items: flex-end;
  }

  .page--webinar-detail .hero-live-pill {
    align-self: stretch;
    min-height: 44px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1;
  }

  .hero-meta.stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .action-grid {
    grid-template-columns: 1fr;
  }

  .stream-row {
    align-items: flex-start;
  }

  .landing-modal {
    padding: 14px;
  }
  .landing-modal__content {
    width: 100%;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    padding: 20px 16px;
    border-radius: 14px;
  }
  .landing-modal__title {
    font-size: 20px;
    padding-right: 30px;
  }

  .edit-modal {
    padding: 14px;
  }
  .edit-modal__content {
    width: 100%;
    max-height: min(90vh, 720px);
    overflow-y: auto;
    padding: 18px 14px;
  }
  .edit-modal__actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
  .edit-modal__actions .btn {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  .topbar__brand-text {
    max-width: 54vw;
  }

  .watch-card .title-row .subtitle {
    display: block;
    min-height: 0;
    line-height: 1.4;
  }
  .watch-status-pill {
    min-height: 0;
  }

  .live-layout {
    gap: 12px;
  }
  .watch-gdpr-tag-wrap {
    left: 12px;
    top: calc(100% + 2px);
  }
  .waiting-music-shell {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
  }
  .waiting-music-player {
    width: 100%;
  }
  .chat-panel {
    min-width: 0;
    min-height: 220px;
  }

  .chat-input input[type="text"],
  .question-box input[type="text"],
  .question-card input[type="text"] {
    width: 100%;
  }

  .hero-meta.stats-grid {
    grid-template-columns: 1fr;
  }
  .stat-value {
    font-size: 18px;
  }

  .poster-upload__controls,
  .file-upload-inline__controls {
    flex-direction: column;
    align-items: stretch;
  }
  .poster-upload input[type="file"],
  .file-upload-inline input[type="file"] {
    min-width: 0;
    width: 100%;
  }

  .stream-row--no-wrap {
    flex-wrap: wrap;
  }
  .stream-code--truncate {
    max-width: 100%;
  }

  .page--webinar-detail .webinar-grid {
    gap: 12px;
  }

  .page--webinar-detail .panel {
    padding: 12px;
  }

  .page--webinar-detail .section-header {
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
  }

  .page--webinar-detail .section-header .customer-logo-wrap {
    align-self: flex-start;
  }

  .page--webinar-detail .file-row-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    align-items: stretch;
  }

  .page--webinar-detail .file-row-actions .btn,
  .page--webinar-detail .file-row-delete-form .btn {
    width: 100%;
  }

  .page--webinar-detail .stream-box {
    padding: 10px;
    gap: 8px;
  }

  .page--webinar-detail .files-panel .stream-row,
  .page--webinar-detail .control-panel .stream-row {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .page--webinar-detail .control-panel .stream-row .btn {
    width: 100%;
  }

  .page--webinar-detail .control-panel .toggle-grid {
    grid-template-columns: 1fr;
  }

  .page--webinar-detail .control-panel .toggle-card .btn {
    width: 100%;
    align-self: stretch;
  }

  .page--webinar-detail .poster-upload__controls .btn,
  .page--webinar-detail .file-upload-inline__controls .btn {
    width: 100%;
  }

  .page--webinar-detail {
    overflow-x: hidden;
  }

  .page--webinar-detail .card {
    padding: 10px;
  }

  .page--webinar-detail .poster-panel .poster-figure {
    aspect-ratio: auto;
    height: clamp(130px, 40vw, 170px);
  }

  .page--webinar-detail .files-panel .stream-row > div,
  .page--webinar-detail .control-panel .stream-row > div,
  .page--webinar-detail .control-panel .stream-value {
    min-width: 0;
    width: 100%;
  }

  .page--webinar-detail .files-panel .btn,
  .page--webinar-detail .control-panel .btn {
    font-size: 12px;
    padding: 6px 10px;
  }

  .page--webinar-detail .files-panel .stream-label,
  .page--webinar-detail .control-panel .stream-label {
    font-size: 13px;
  }

  .page--webinar-detail .control-panel .stream-code,
  .page--webinar-detail .files-panel .stream-code {
    font-size: 11px;
    padding: 6px;
  }

  .page--webinar-detail .file-upload-inline__help {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  .page--webinar-detail .poster-figure {
    aspect-ratio: auto;
    height: clamp(116px, 36vw, 148px);
  }

  .page--webinar-detail .file-upload-inline {
    padding: 8px;
  }

  .page--webinar-detail .control-stack {
    gap: 6px;
    margin-bottom: 10px;
  }

  .page--webinar-detail .file-row-actions {
    grid-template-columns: 1fr;
  }

  .page--webinar-detail .panel {
    padding: 10px;
    border-radius: 10px;
  }
}

/* ==========
   Questions page
   ========== */
.page--questions .page-main {
  align-items: flex-start;
}

.questions-card {
  max-width: 1280px;
}

.questions-subtitle {
  margin-bottom: 10px;
}

.questions-empty {
  margin: 0 0 12px;
}

.questions-empty--hidden {
  display: none;
}

.questions-table--hidden {
  display: none;
}

.questions-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.questions-stat {
  background: #f9fafb;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: var(--shadow-soft);
}

.questions-stat__label {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 2px;
}

.questions-stat__value {
  font-size: 22px;
  line-height: 1.1;
}

.questions-table__question {
  line-height: 1.45;
}

.questions-table__answered-at {
  font-size: 11px;
  margin-top: 4px;
}

.questions-action-form {
  margin: 0;
}

.questions-row--new {
  animation: question-row-new 3.2s ease;
}

@keyframes question-row-new {
  0% {
    background: #eef6ff;
  }
  100% {
    background: transparent;
  }
}

@media (max-width: 900px) {
  .page--questions .page-main {
    padding-top: 12px;
  }

  .questions-back-btn {
    width: 100%;
  }

  .questions-card h1 {
    font-size: 24px;
    line-height: 1.2;
  }

  .questions-table {
    display: block;
    width: 100%;
    overflow: visible;
  }

  .questions-table thead {
    display: none;
  }

  .questions-table tbody {
    display: block;
  }

  .questions-table .questions-row {
    display: block;
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 12px;
    background: #fff;
    box-shadow: var(--shadow-soft);
  }

  .questions-table .questions-row.table-row-answered {
    background: #f3f4f6;
  }

  .questions-table .questions-row td {
    display: block;
    width: 100%;
    border: none;
    padding: 6px 0;
    white-space: normal;
  }

  .questions-table .questions-row td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--text-muted);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 3px;
  }

  .questions-table__question {
    font-size: 16px;
    line-height: 1.5;
  }

  .questions-action-form .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .questions-stats {
    grid-template-columns: 1fr;
  }

  .questions-stat__value {
    font-size: 20px;
  }
}

/* ==========
   GDPR footer + modal
   ========== */

.gdpr-footer {
  margin-top: 18px;
  border-top: 0;
  background: transparent;
}

.gdpr-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 8px 20px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.gdpr-footer__left {
  color: inherit;
  opacity: 0.62;
  font-size: 12px;
}

.gdpr-footer__btn {
  white-space: nowrap;
}

.gdpr-footer__btn.btn,
.gdpr-footer__btn.btn.btn-outline {
  background: transparent;
  border-color: rgba(100, 116, 139, 0.28);
  color: #64748b;
  box-shadow: none;
}

.gdpr-footer__btn.btn:hover {
  background: rgba(100, 116, 139, 0.08);
  border-color: rgba(100, 116, 139, 0.45);
  color: #334155;
}

body.gdpr-modal-open {
  overflow: hidden;
}

.gdpr-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 2600;
}

.gdpr-modal--open {
  display: flex;
}

.gdpr-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(3px);
}

.gdpr-modal__content {
  position: relative;
  z-index: 1;
  width: min(96vw, 980px);
  max-height: 90vh;
  overflow: auto;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.35);
  padding: 22px;
}

.gdpr-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #0f172a;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

.gdpr-modal__title {
  margin: 0 0 4px;
  font-size: 24px;
}

.gdpr-modal__subtitle {
  margin: 0 0 14px;
  color: var(--text-muted);
}

.gdpr-modal__section + .gdpr-modal__section {
  margin-top: 18px;
}

.gdpr-modal__section h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.gdpr-modal__note,
.gdpr-modal__context {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.gdpr-table-wrap {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: hidden;
}

.gdpr-table {
  width: 100%;
  border-collapse: collapse;
}

.gdpr-table th,
.gdpr-table td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 13px;
  vertical-align: top;
}

.gdpr-table thead th {
  background: #f8fafc;
  font-size: 12px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #475569;
}

.gdpr-table tbody tr:last-child td {
  border-bottom: none;
}

.gdpr-table--policy {
  table-layout: fixed;
}

.gdpr-table--policy th:nth-child(1),
.gdpr-table--policy td:nth-child(1) {
  width: 32%;
}

.gdpr-table--policy th:nth-child(2),
.gdpr-table--policy td:nth-child(2) {
  width: 16%;
  white-space: nowrap;
}

.gdpr-table--policy th:nth-child(3),
.gdpr-table--policy td:nth-child(3) {
  width: 52%;
}

.gdpr-table--countdown {
  table-layout: fixed;
}

.gdpr-table--countdown th:nth-child(1),
.gdpr-table--countdown td:nth-child(1) {
  width: 42%;
}

.gdpr-table--countdown th:nth-child(2),
.gdpr-table--countdown td:nth-child(2) {
  width: 22%;
  text-align: center;
  white-space: nowrap;
}

.gdpr-table--countdown th:nth-child(3),
.gdpr-table--countdown td:nth-child(3) {
  width: 36%;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .gdpr-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .gdpr-modal__content {
    padding: 18px;
  }

  .gdpr-table th,
  .gdpr-table td {
    font-size: 12px;
    padding: 8px;
  }

  .gdpr-table--policy,
  .gdpr-table--countdown {
    table-layout: auto;
  }

  .gdpr-table--countdown th:nth-child(2),
  .gdpr-table--countdown td:nth-child(2) {
    text-align: left;
  }
}
