:root {
  --blue: #2456d8;
  --blue-dark: #1d49bd;
  --green: #00a86b;
  --green-soft: #e9f8f2;
  --ink: #14213d;
  --text: #182433;
  --muted: #667085;
  --bg: #f4f6fa;
  --border: #dce3ec;
  --border-strong: #c8d2e0;
  --white: #ffffff;
  --danger: #c2353f;
  --danger-soft: #fdecec;
  --shadow: 0 16px 44px rgba(20, 33, 61, 0.08);
  --shadow-sm: 0 1px 2px rgba(20, 33, 61, 0.04);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

a {
  color: var(--blue);
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.icon--small {
  width: 16px;
  height: 16px;
}

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

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* Header */
.cab-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.header-inner {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.cab-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  flex: 0 0 auto;
}

.cab-brand img {
  width: 166px;
  height: 50px;
  object-fit: contain;
}

.brand-badge {
  padding: 4px 9px;
  border-radius: 999px;
  background: #eaf0ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cab-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  font-weight: 700;
}

.cab-nav a {
  color: #344054;
  white-space: nowrap;
}

.cab-nav a:hover {
  color: var(--blue);
}

.cab-user {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding-left: 24px;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  flex: 0 0 auto;
}

.user-name {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* Main */
.cab-main {
  flex: 1;
  padding: 42px 0 72px;
}

.page-head {
  margin-bottom: 28px;
}

.breadcrumb {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
}

.page-head h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(34px, 4.4vw, 50px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-head p {
  margin: 14px 0 0;
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
}

/* Stats */
.stats-band {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 38px;
  padding: 17px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  flex: 1;
  min-width: 0;
  padding: 2px 28px;
}

.stat + .stat {
  border-left: 1px solid var(--border);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Sections */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.format-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding-bottom: 2px;
}

/* Dropzone */
.dropzone {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 30px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 18px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--blue);
  background: #fbfcff;
  box-shadow: 0 14px 34px rgba(36, 86, 216, 0.08);
}

.dropzone:focus-visible {
  outline: 3px solid rgba(36, 86, 216, 0.2);
  outline-offset: 2px;
}

.dropzone-icon {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  background: #eaf0ff;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.dropzone-icon .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.7;
}

.dropzone-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.dropzone-copy h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  letter-spacing: -0.01em;
}

.dropzone-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.dropzone-meta {
  font-size: 12px !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.005em;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(1px);
}

.button--primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 20px rgba(36, 86, 216, 0.2);
}

.button--primary:hover {
  background: var(--blue-dark);
}

.button--secondary {
  background: #fff;
  color: #344054;
  border-color: var(--border);
}

.button--secondary:hover {
  border-color: #b8c5d6;
  background: #f8fafc;
}

/* Upload queue */
.upload-queue {
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.upload-queue[hidden] {
  display: none;
}

.upload-queue-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.upload-queue-head strong {
  color: var(--ink);
  font-size: 13px;
}

.upload-queue-head span {
  color: var(--muted);
  font-size: 12px;
}

.upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px 30px;
  align-items: center;
  gap: 18px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--border);
}

.upload-item:last-child {
  border-bottom: 0;
}

.upload-file {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.upload-file-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #eef2f6;
  color: var(--ink);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.upload-file-meta {
  min-width: 0;
}

.upload-file-name {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.upload-file-sub {
  color: var(--muted);
  font-size: 12px;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-progress-bar {
  height: 7px;
  border-radius: 999px;
  background: #eef2f6;
  flex: 1;
  overflow: hidden;
}

.upload-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #4c77e8, var(--blue));
  width: 0%;
  transition: width 0.15s ease;
}

.upload-progress-text {
  width: 44px;
  text-align: right;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.upload-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.upload-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

/* Library */
.library-section {
  margin-top: 38px;
}

.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.library-head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.library-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.search {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 240px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--muted);
}

.search:focus-within {
  border-color: #aebddb;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, 0.12);
}

.search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.search input::placeholder {
  color: #98a2b3;
}

/* Table */
.table-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.video-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.video-table thead th {
  padding: 13px 14px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-align: left;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.video-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.video-table tbody tr:last-child td {
  border-bottom: 0;
}

.video-table tbody tr {
  transition: background 0.15s ease;
}

.video-table tbody tr:hover {
  background: #fbfcfd;
}

.col-video {
  width: 46%;
}

.col-status {
  width: 16%;
}

.col-num {
  width: 14%;
}

.col-date {
  width: 14%;
}

.col-actions {
  width: 110px;
  text-align: right;
}

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

.thumb {
  position: relative;
  width: 96px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex: 0 0 auto;
  background:
    radial-gradient(circle at 75% 20%, rgba(0, 168, 107, 0.28), transparent 30%),
    linear-gradient(135deg, #243759, #14213d);
}

.thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #14213d;
}

.thumb-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(7, 12, 22, 0.18);
  color: #fff;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.video-cell:hover .thumb-play {
  opacity: 1;
}

.thumb-play .icon {
  width: 22px;
  height: 22px;
  fill: currentColor;
  stroke: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.28));
}

.video-meta {
  min-width: 0;
}

.video-title {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.video-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status--ready {
  color: #008f5a;
  background: var(--green-soft);
}

.cell-num {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.cell-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.row-action {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.row-action:hover {
  background: #eef2f6;
  color: var(--ink);
}

.row-action.is-danger:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.row-action .icon {
  width: 17px;
  height: 17px;
}

/* Empty state */
.empty-state {
  padding: 60px 24px;
  text-align: center;
}

.empty-state[hidden] {
  display: none;
}

.empty-state-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 17px;
  background: #eaf0ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}

.empty-state-icon .icon {
  width: 25px;
  height: 25px;
}

.empty-state h3 {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
}

.empty-state p {
  margin: 6px 0 18px;
  color: var(--muted);
  font-size: 13px;
}

/* Toast */
.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 18px 44px rgba(20, 33, 61, 0.18);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast .icon {
  width: 17px;
  height: 17px;
  color: #8ce7c0;
}

/* Modal */
body.modal-open {
  overflow: hidden;
}

.preview-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 24px;
}

.preview-overlay {
  position: absolute;
  inset: 0;
  background: rgba(20, 33, 61, 0.66);
  backdrop-filter: blur(8px);
}

.preview-panel {
  position: relative;
  width: min(760px, 100%);
  border-radius: 18px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(20, 33, 61, 0.32);
  animation: preview-in 0.22s ease both;
}

@keyframes preview-in {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.preview-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: rgba(20, 33, 61, 0.58);
  color: #fff;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
}

.preview-media {
  aspect-ratio: 16 / 9;
  background: #0d1728;
  display: grid;
  place-items: center;
}

.preview-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 13px;
}

.preview-placeholder .icon {
  width: 46px;
  height: 46px;
  fill: currentColor;
  stroke: none;
  opacity: 0.9;
}

.preview-info {
  padding: 18px 20px 20px;
}

.preview-info h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
}

.preview-info p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

/* Responsive */
@media (max-width: 860px) {
  .cab-nav a {
    display: none;
  }

  .cab-user {
    margin-left: auto;
  }

  .stats-band {
    gap: 0;
  }

  .stat {
    padding: 2px 16px;
  }

  .col-num,
  .col-date {
    display: none;
  }

  .col-video {
    width: 58%;
  }

  .upload-item {
    grid-template-columns: minmax(0, 1fr) 170px 30px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    height: 66px;
  }

  .cab-brand img {
    width: 142px;
    height: 44px;
  }

  .brand-badge {
    display: none;
  }

  .user-name {
    display: none;
  }

  .cab-user {
    padding-left: 12px;
  }

  .cab-main {
    padding: 28px 0 48px;
  }

  .page-head h1 {
    font-size: 32px;
  }

  .stats-band {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .stat + .stat {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .section-heading,
  .library-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .search {
    width: 100%;
  }

  .dropzone {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px;
  }

  .dropzone-copy {
    width: 100%;
    align-items: center;
    text-align: center;
  }

  .upload-item {
    grid-template-columns: minmax(0, 1fr) 30px;
    gap: 10px;
  }

  .upload-progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .video-table thead {
    display: none;
  }

  .video-table,
  .video-table tbody,
  .video-table tbody tr,
  .video-table tbody td {
    display: block;
    width: 100%;
  }

  .video-table tbody tr {
    padding: 13px;
    border-bottom: 1px solid var(--border);
  }

  .video-table tbody tr:last-child {
    border-bottom: 0;
  }

  .video-table tbody td {
    border: 0;
    padding: 0;
  }

  .video-table tbody td.col-status,
  .video-table tbody td.col-num,
  .video-table tbody td.col-date {
    display: inline-block;
    width: auto;
    margin: 6px 8px 0 0;
  }

  .video-table tbody td.col-actions {
    display: block;
    margin-top: 10px;
  }

  .cell-actions {
    justify-content: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
/* Description and sharing */
.preview-description {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}

.preview-description:empty {
  display: none;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.preview-actions .button {
  min-height: 36px;
  padding: 0 12px;
  font-size: 12px;
}

/* Edit modal */
.edit-panel {
  position: relative;
  width: min(520px, 100%);
  border-radius: 20px;
  background: #ffffff;
  padding: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.32);
  animation: preview-in 0.22s ease both;
}

.edit-panel h3 {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 19px;
  letter-spacing: -0.02em;
}

.edit-field {
  display: block;
  margin-bottom: 14px;
}

.edit-field span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.edit-field input,
.edit-field textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  outline: 0;
}

.edit-field input:focus,
.edit-field textarea:focus {
  border-color: #aebddb;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, 0.12);
}

.edit-field textarea {
  resize: vertical;
  line-height: 1.55;
}

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

@media (max-width: 620px) {
  .edit-panel {
    padding: 18px;
  }
}
/* Channel slug */
.channel-section {
  margin-bottom: 30px;
}

.channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.channel-row input {
  flex: 1;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  outline: 0;
}

.channel-row input:focus {
  border-color: #aebddb;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, 0.12);
}

.channel-slug {
  color: var(--muted);
  font-size: 12px;
  padding: 0 4px;
  white-space: nowrap;
}

.channel-slug::before {
  content: "/";
  margin-right: 3px;
  color: #98a2b3;
}

@media (max-width: 620px) {
  .channel-row {
    flex-wrap: wrap;
  }

  .channel-row input {
    flex-basis: 100%;
  }

  .channel-slug {
    order: 3;
  }
}
.channel-description {
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.55;
  resize: vertical;
  outline: 0;
}

.channel-description:focus {
  border-color: #aebddb;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, 0.12);
}
/* Streams */
.streams-section {
  margin-bottom: 30px;
}

.stream-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.stream-form > input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  padding: 0 12px;
  font-size: 14px;
  outline: 0;
}

.stream-source-picker,
.studio-preview-wrap,
.obs-intro,
.stream-form-note {
  grid-column: 1 / -1;
}

.stream-source-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stream-source-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.stream-source-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.stream-source-option span {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.stream-source-option strong {
  color: var(--ink);
  font-size: 13px;
}

.stream-source-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.stream-source-option input:checked + span {
  border-color: var(--blue);
  background: #eef3ff;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, .1);
}

.stream-source-option input:focus-visible + span {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.studio-preview-wrap {
  position: relative;
  overflow: hidden;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  background: #101a31;
}

.studio-preview-wrap video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.studio-preview-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(10, 18, 36, .76);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.studio-preview-badge span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff4d5f;
}

.obs-intro {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f7fb;
  color: var(--muted);
  font-size: 12px;
}

.stream-form-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.stream-form > input:focus {
  border-color: #aebddb;
  box-shadow: 0 0 0 3px rgba(36, 86, 216, 0.12);
}

.stream-form .button {
  grid-column: 1 / -1;
}

.stream-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.stream-empty {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.stream-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.stream-item-main {
  flex: 1;
  min-width: 0;
}

.stream-item-main h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
}

.stream-item-main p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stream-status {
  display: inline-flex;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.stream-status--scheduled {
  color: var(--blue);
  background: #eaf0ff;
}

.stream-status--live {
  color: #008f5a;
  background: var(--green-soft);
}

.stream-status--ended {
  color: var(--muted);
  background: #eef2f6;
}

.stream-time {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
}

.stream-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.stream-obs-setup {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.stream-obs-field {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}

.stream-obs-field span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.stream-obs-field code {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stream-start-video {
  width: 160px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  padding: 0 8px;
  font-size: 12px;
}

@media (max-width: 700px) {
  .stream-form {
    grid-template-columns: 1fr;
  }

  .stream-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .stream-item-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .stream-start-video {
    flex: 1;
  }

  .stream-source-picker,
  .stream-obs-setup {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 680px) {
  .cab-user {
    display: none;
  }

  .cab-nav a[href="/"],
  .cab-nav a[href*="/api/logout"] {
    display: inline-block;
  }

  .cab-nav a[href="https://crm.limgo.ru/"] {
    display: none;
  }
}

@media (max-width: 360px) {
  .header-inner {
    gap: 12px;
  }

  .cab-brand img {
    width: 110px;
  }

  .cab-nav {
    gap: 12px;
  }
}
