:root {
  --bg: #071018;
  --bg-soft: #0c1622;
  --card: rgba(10, 18, 28, 0.84);
  --card-2: rgba(13, 24, 37, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(86, 209, 255, 0.22);
  --text: #f4f7fb;
  --muted: #a7b4c6;
  --primary: #66d9ff;
  --primary-2: #8cf0b6;
  --accent: #ffb36b;
  --shadow: 0 26px 70px rgba(0, 0, 0, 0.38);
  --radius: 24px;
  --radius-lg: 34px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(102, 217, 255, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(140, 240, 182, 0.12), transparent 22%),
    radial-gradient(circle at 20% 80%, rgba(255, 179, 107, 0.08), transparent 24%),
    linear-gradient(180deg, #050b12 0%, #071018 38%, #08121b 100%);
  font-family: Inter, "Segoe UI", "Avenir Next", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  width: min(1440px, calc(100% - 28px));
  margin: 18px auto 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(9, 17, 26, 0.92), rgba(7, 13, 20, 0.84));
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.3), rgba(140, 240, 182, 0.24));
  border: 1px solid var(--line-2);
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong {
  display: block;
  font-size: 1rem;
}

.brand span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.86rem;
}

.nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.nav-tab {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.nav-tab:hover {
  transform: translateY(-1px);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-tab.is-active {
  color: #07131d;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.96), rgba(140, 240, 182, 0.92));
  border-color: transparent;
  box-shadow: 0 12px 30px rgba(102, 217, 255, 0.14);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease, color 180ms ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.98), rgba(140, 240, 182, 0.94));
  color: #061018;
  box-shadow: 0 14px 30px rgba(102, 217, 255, 0.16);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line);
}

.btn-soft {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-color: var(--line);
}

.workspace {
  display: grid;
  gap: 20px;
  margin-top: 20px;
}

.card,
.panel {
  background:
    linear-gradient(180deg, rgba(10, 18, 28, 0.94), rgba(9, 15, 24, 0.96)),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 18px;
  padding: 30px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 320px;
  height: 320px;
  right: -120px;
  top: -130px;
  background: radial-gradient(circle, rgba(102, 217, 255, 0.16), transparent 68%);
}

.hero::after {
  width: 220px;
  height: 220px;
  left: 22%;
  bottom: -110px;
  background: radial-gradient(circle, rgba(140, 240, 182, 0.12), transparent 72%);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 5rem);
  line-height: 0.92;
  letter-spacing: -0.06em;
  max-width: 11ch;
}

.lead {
  margin: 18px 0 0;
  max-width: 72ch;
  color: var(--muted);
  line-height: 1.8;
}

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

.hero-stats article,
.summary-card,
.program-card,
.field,
.logo-preview,
.template-box,
.hover-tip,
.lightbox-surface {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
}

.hero-stats article {
  padding: 16px;
  border-radius: 22px;
}

.hero-stats strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.hero-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.panel {
  padding: 20px;
}

.editor-panel {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 1.32rem;
}

.panel-subhead {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.panel-subhead h3 {
  margin: 0;
  font-size: 1rem;
}

.panel-subhead span,
.muted {
  color: var(--muted);
}

.pill {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(126, 225, 255, 0.1);
  border: 1px solid rgba(126, 225, 255, 0.2);
  color: var(--primary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.stack {
  display: grid;
  gap: 14px;
}

.form-section + .template-box {
  margin-top: 16px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(7, 13, 21, 0.82);
  color: var(--text);
  outline: none;
}

.field textarea {
  min-height: 112px;
  padding: 12px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #7280a3;
}

.media-attach-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.media-attach-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1 1 320px;
}

.media-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.82rem;
}

.media-tag span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-tag button {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
}

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

.logo-uploader {
  position: relative;
}

.logo-uploader input[type="file"] {
  padding: 10px 0 0;
  border: 0;
  background: transparent;
}

.logo-preview {
  height: 112px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  font-weight: 700;
}

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

.template-box {
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 16px;
  background: rgba(255, 255, 255, 0.035);
}

.template-controls {
  display: grid;
  gap: 12px;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.step-list {
  display: grid;
  gap: 12px;
}

.step-card {
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(7, 12, 20, 0.92), rgba(10, 16, 26, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.step-card-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.step-card-title {
  font-weight: 700;
}

.step-card-meta {
  color: var(--muted);
  font-size: 0.86rem;
}

.step-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mini-btn {
  min-height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid var(--line);
  cursor: pointer;
}

.mini-btn-primary {
  background: rgba(102, 217, 255, 0.16);
  border-color: rgba(102, 217, 255, 0.28);
  color: var(--primary);
}

.board-panel {
  display: grid;
  gap: 14px;
}

.board-head {
  margin-bottom: 0;
}

.board-banner {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) 110px;
  gap: 14px;
  align-items: center;
  flex: 1;
}

.board-logo {
  height: 88px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 800;
}

.board-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  display: block;
}

.board-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.search-field {
  min-width: min(380px, 100%);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.chip {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}

.chip.is-active {
  background: rgba(102, 217, 255, 0.12);
  border-color: rgba(102, 217, 255, 0.24);
  color: var(--primary);
}

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

.summary-card {
  padding: 14px 16px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.summary-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1.05rem;
}

.schedule-board {
  display: grid;
  gap: 12px;
}

.program-list,
.detail-board,
.control-board {
  display: grid;
  gap: 12px;
}

.program-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 0;
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.92), rgba(8, 13, 21, 0.96));
}

.program-card.is-selected {
  border-color: rgba(126, 225, 255, 0.32);
  box-shadow: 0 18px 40px rgba(126, 225, 255, 0.08), var(--shadow);
}

.program-rail {
  padding: 16px 12px;
  display: grid;
  place-items: center;
  gap: 10px;
  align-content: start;
  background:
    linear-gradient(180deg, rgba(102, 217, 255, 0.16), rgba(255, 255, 255, 0.02)),
    rgba(5, 11, 19, 0.82);
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.rail-pill,
.order-pill,
.duration-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.rail-pill {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
}

.order-pill {
  background: rgba(102, 217, 255, 0.14);
  color: var(--primary);
  font-weight: 700;
}

.duration-pill {
  background: rgba(140, 240, 182, 0.12);
  color: #9ff0c8;
  font-weight: 700;
}

.program-card-main {
  padding: 16px;
}

.program-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.program-time {
  font-size: 0.96rem;
  font-weight: 700;
}

.program-activity {
  margin: 0;
  font-size: 1.06rem;
  font-weight: 780;
}

.program-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.program-info,
.media-block {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
}

.info-row strong {
  color: var(--text);
}

.notes {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.media-block {
  display: grid;
  gap: 10px;
}

.media-preview-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-label {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
}

.media-thumb {
  width: 100%;
  height: 150px;
  border-radius: 16px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  cursor: pointer;
}

.media-thumb img,
.media-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.audio-widget {
  display: grid;
  grid-template-columns: 40px minmax(120px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.audio-play,
.video-trigger,
.lightbox-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

.audio-play {
  min-height: 40px;
  border-radius: 14px;
}

.audio-track {
  position: relative;
  height: 40px;
  border-radius: 999px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
}

.audio-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: linear-gradient(90deg, rgba(102, 217, 255, 0.95), rgba(140, 240, 182, 0.95));
}

.audio-time {
  min-width: 92px;
  text-align: right;
  color: var(--muted);
  font-size: 0.84rem;
}

.video-block {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.is-dense .program-card-main {
  padding-top: 12px;
  padding-bottom: 12px;
}

.video-trigger {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 14px;
  cursor: pointer;
}

.video-trigger:hover {
  border-color: rgba(102, 217, 255, 0.32);
}

.video-empty {
  color: var(--muted);
  font-size: 0.86rem;
}

.hover-tip {
  position: fixed;
  z-index: 400;
  width: min(320px, calc(100vw - 24px));
  border-radius: 22px;
  padding: 12px;
  box-shadow: var(--shadow);
  background: rgba(6, 10, 17, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.hover-tip video,
.hover-tip img {
  width: 100%;
  height: 180px;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.hover-tip h4 {
  margin: 10px 0 4px;
}

.hover-tip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hover-tip-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 5, 10, 0.82);
  backdrop-filter: blur(8px);
}

.lightbox[hidden],
.hover-tip[hidden] {
  display: none !important;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
}

.lightbox-surface {
  position: relative;
  width: min(96vw, 1240px);
  max-height: 92vh;
  overflow: auto;
  border-radius: 30px;
  padding: 18px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(8, 14, 22, 0.98), rgba(4, 8, 13, 0.99));
}

.lightbox-head {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
}

.lightbox-head h3 {
  margin: 0;
  font-size: 1.2rem;
}

.lightbox-meta {
  margin: 0;
  color: var(--muted);
}

.lightbox-body {
  display: grid;
  place-items: center;
  min-height: 320px;
}

.lightbox-body img,
.lightbox-body video,
.lightbox-body iframe {
  width: 100%;
  max-height: 70vh;
  border: 0;
  border-radius: 22px;
  background: #000;
  object-fit: contain;
}

.ppt-placeholder {
  width: 100%;
  min-height: 360px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 30px;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.12), rgba(140, 240, 182, 0.08));
  border: 1px solid var(--line);
}

.ppt-placeholder strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.lightbox-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

body.control-mode {
  overflow: auto;
  width: 100%;
}

body.control-mode .app-shell {
  display: none;
}

.control-page {
  width: min(1600px, calc(100% - 24px));
  margin: 18px auto 24px;
  display: grid;
  gap: 16px;
}

.control-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(9, 17, 26, 0.94), rgba(7, 13, 20, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.control-page-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.control-page-title {
  min-width: 0;
  text-align: center;
  justify-self: center;
}

.control-page-logos {
  flex: 0 0 auto;
  justify-self: start;
}

.control-page-head .control-page-logo {
  width: 168px;
  height: 168px;
  min-width: 168px;
  min-height: 168px;
  aspect-ratio: 1 / 1;
  border-radius: 32px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-sizing: border-box;
}

.control-page-head .control-page-logo img {
  padding: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  background: transparent;
  display: block;
  transform: none;
}

.detail-head-logo img {
  padding: 0;
  object-fit: cover;
}

.control-page-head h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.control-page-surface {
  padding: 18px 18px 16px;
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(8, 14, 22, 0.98), rgba(4, 8, 13, 0.99));
}

body.control-mode .control-modal {
  position: relative;
  inset: auto;
  display: grid !important;
  place-items: start;
  min-height: 100vh;
  padding: 16px;
  background: transparent;
  backdrop-filter: none;
}

body.control-mode .control-backdrop {
  display: none;
}

body.control-mode .control-surface {
  width: min(100%, 1600px);
  max-height: none;
  height: auto;
  margin: 0 auto;
}

body.control-mode .control-board {
  max-height: none;
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.2rem;
  cursor: pointer;
}

.drag-handle {
  color: var(--muted);
  user-select: none;
}

.divider {
  height: 1px;
  background: var(--line);
}

.view {
  display: none;
  opacity: 0;
  transform: translateY(10px);
}

.view.is-active {
  display: block;
  opacity: 1;
  transform: translateY(0);
  animation: viewEnter 260ms ease;
}

.view-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(0, 1.1fr);
  gap: 20px;
}

.templates-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
}

.template-flow {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(102, 217, 255, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(8, 13, 22, 0.95), rgba(8, 14, 23, 0.88));
  border: 1px solid rgba(102, 217, 255, 0.12);
}

.template-flow-copy {
  display: grid;
  gap: 10px;
}

.template-flow-copy h3 {
  margin: 0;
  font-size: 1.12rem;
}

.template-flow-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.template-flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.template-flow-poster {
  min-height: 168px;
  border-radius: 22px;
  padding: 14px;
  background:
    linear-gradient(145deg, rgba(8, 14, 24, 0.98), rgba(12, 18, 30, 0.9)),
    radial-gradient(circle at 30% 20%, rgba(102, 217, 255, 0.18), transparent 28%),
    radial-gradient(circle at 70% 70%, rgba(124, 92, 255, 0.18), transparent 36%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.template-flow-poster-head {
  display: flex;
  gap: 8px;
}

.poster-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
}

.template-flow-poster-body {
  display: grid;
  gap: 14px;
  align-content: center;
}

.poster-stage {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(102, 217, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(102, 217, 255, 0.16);
}

.poster-stage strong {
  font-size: 1rem;
}

.poster-stage small {
  color: var(--muted);
}

.poster-stage-chip {
  display: inline-flex;
  align-self: start;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(102, 217, 255, 0.18);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.poster-lines {
  display: grid;
  gap: 8px;
}

.poster-lines span {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(102, 217, 255, 0.38), rgba(255, 255, 255, 0.08));
}

.poster-lines span:nth-child(2) { width: 84%; }
.poster-lines span:nth-child(3) { width: 72%; }
.poster-lines span:nth-child(4) { width: 90%; }
.poster-lines span:nth-child(5) { width: 64%; }

.template-library-column,
.template-studio-column {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.template-pick {
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
}

.template-pick-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.template-gallery {
  display: grid;
  gap: 12px;
}

.template-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(7, 12, 20, 0.92), rgba(10, 16, 26, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

.template-card-thumb {
  padding: 14px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(102, 217, 255, 0.12), rgba(255, 255, 255, 0.03)),
    radial-gradient(circle at top right, rgba(124, 92, 255, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(11, 18, 31, 0.95), rgba(8, 13, 21, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  gap: 12px;
}

.template-card-thumb-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.template-card-thumb-body {
  display: grid;
  gap: 4px;
}

.template-card-thumb-body strong {
  font-size: 1.02rem;
}

.template-card-thumb-body small {
  color: var(--muted);
}

.template-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.template-card h3 {
  margin: 2px 0 0;
  font-size: 1.02rem;
}

.template-card-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.template-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.template-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(102, 217, 255, 0.1);
  border: 1px solid rgba(102, 217, 255, 0.15);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.template-preview {
  display: grid;
  gap: 12px;
}

.template-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.template-preview-board {
  display: grid;
  gap: 8px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.setting-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(7, 12, 20, 0.92), rgba(10, 16, 26, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.setting-preview {
  min-height: 160px;
  border-radius: 20px;
}

.settings-actions {
  margin-top: 18px;
  justify-content: flex-end;
}

.view-create .create-stack {
  display: grid;
  gap: 20px;
}

.view-create .panel {
  min-width: 0;
}

.app-shell {
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  gap: 16px;
  width: min(1600px, calc(100% - 24px));
}

.shell-main {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.sidebar {
  position: sticky;
  top: 12px;
  height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(7, 13, 21, 0.95), rgba(8, 15, 24, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.sidebar-head,
.home-item-main,
.home-item-actions,
.topbar-copy,
.nav-copy {
  display: flex;
  flex-direction: column;
}

.sidebar-head {
  gap: 12px;
}

.sidebar-head,
.topbar {
  align-items: center;
}

.sidebar-head {
  justify-content: space-between;
}

.sidebar-brand-copy strong,
.topbar-copy strong {
  font-size: 1rem;
}

.sidebar-brand-copy span,
.topbar-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.sidebar-nav {
  display: grid;
  gap: 8px;
}

.sidebar-link {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border-radius: 18px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
}

.nav-copy strong {
  font-size: 0.96rem;
}

.nav-copy small {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 2px;
}

.sidebar-link.is-active {
  border-color: rgba(102, 217, 255, 0.24);
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.16), rgba(140, 240, 182, 0.08));
}

.sidebar-summary {
  margin-top: auto;
  gap: 10px;
}

.summary-mini {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
}

.summary-mini span {
  color: var(--muted);
  font-size: 0.8rem;
}

.summary-mini strong {
  font-size: 1rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(9, 17, 26, 0.94), rgba(7, 13, 20, 0.9));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.topbar-copy {
  gap: 2px;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 16px;
  padding: 24px;
}

.home-brand {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 2.8vw, 2.2rem);
  line-height: 1.05;
  letter-spacing: -0.05em;
  max-width: 14ch;
}

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

.home-metrics article,
.quick-card,
.home-item {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  border-radius: 18px;
}

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 146px;
  padding: 18px;
  display: grid;
  align-items: center;
  gap: 14px;
  background:
    linear-gradient(180deg, rgba(16, 28, 41, 0.94), rgba(10, 18, 28, 0.98)),
    rgba(255, 255, 255, 0.03);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: auto -36px -44px auto;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(102, 217, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.metric-card-count {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.metric-card-feature {
  align-content: space-between;
  background:
    linear-gradient(135deg, rgba(102, 217, 255, 0.14), rgba(140, 240, 182, 0.08) 34%, rgba(10, 18, 28, 0.98) 100%),
    rgba(255, 255, 255, 0.03);
}

.metric-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #07131d;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.08) 36%),
    linear-gradient(135deg, rgba(102, 217, 255, 0.98), rgba(140, 240, 182, 0.94));
  box-shadow: 0 18px 34px rgba(102, 217, 255, 0.16);
}

.metric-orb-secondary {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.08) 36%),
    linear-gradient(135deg, rgba(255, 179, 107, 0.98), rgba(255, 236, 171, 0.92));
  box-shadow: 0 18px 34px rgba(255, 179, 107, 0.16);
}

.metric-copy {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.metric-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.68rem;
  color: var(--primary);
  font-weight: 700;
}

.metric-card strong {
  display: block;
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.1;
}

.metric-card-count strong {
  font-size: 1rem;
}

.metric-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.metric-card-feature strong {
  font-size: 1.28rem;
  line-height: 1.05;
  max-width: 15ch;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
}

.home-list {
  display: grid;
  gap: 10px;
}

.home-item {
  padding: 12px 14px;
}

.home-item.is-selected {
  border-color: rgba(102, 217, 255, 0.24);
  box-shadow: 0 14px 30px rgba(102, 217, 255, 0.08);
}

.home-item-main {
  gap: 10px;
}

.home-item-title {
  margin: 0;
  font-weight: 760;
  font-size: 1rem;
}

.home-item-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.home-item-stats {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 0.84rem;
  margin-top: 8px;
}

.home-item-stats strong {
  color: var(--text);
}

.home-item-actions {
  flex-direction: row;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.home-item-actions-iconbar {
  align-items: center;
}

.home-item-actions-iconbar .icon-action-btn {
  width: 40px;
  height: 40px;
}

.quick-grid {
  display: grid;
  gap: 10px;
}

.quick-card {
  padding: 14px 16px;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: rgba(102, 217, 255, 0.22);
  background: linear-gradient(180deg, rgba(102, 217, 255, 0.08), rgba(255, 255, 255, 0.035));
}

.quick-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.06em;
  color: #07111a;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.quick-icon-create {
  background: linear-gradient(135deg, #66d9ff, #8cf0b6);
}

.quick-icon-programs {
  background: linear-gradient(135deg, #8f8dff, #66d9ff);
}

.quick-icon-detail {
  background: linear-gradient(135deg, #ffd166, #ff7fb6);
}

.quick-card strong {
  display: block;
  font-size: 0.96rem;
}

.quick-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.board-logos {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.detail-head-copy {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
}

.view[data-view="detail"] .detail-head-copy {
  grid-template-columns: 1fr;
  justify-items: center;
}

.view[data-view="detail"] .detail-head-logo {
  display: none;
}

.detail-head-title {
  min-width: 0;
  text-align: center;
  justify-self: center;
}

.detail-head-logo {
  width: 96px;
  height: 64px;
  border-radius: 16px;
}

.board-logo {
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 760;
}

.detail-head-copy > :first-child,
.control-page-copy > :first-child {
  justify-self: start;
}

.detail-head-copy > :last-child,
.control-page-copy > :last-child {
  justify-self: end;
}

.detail-head-copy > :nth-child(2),
.control-page-copy > :nth-child(2) {
  justify-self: center;
}

.step-list {
  display: grid;
  gap: 8px;
}

.step-helper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.09), rgba(255, 255, 255, 0.03));
  border: 1px solid rgba(102, 217, 255, 0.16);
}

.step-helper strong {
  display: block;
  font-size: 0.98rem;
}

.step-helper p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.step-helper span {
  color: var(--primary);
  font-weight: 700;
}

.step-modal {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 16px;
}

.step-modal[hidden] {
  display: none !important;
}

.step-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(18px);
}

.step-modal-surface {
  position: relative;
  width: min(960px, calc(100vw - 24px));
  max-height: calc(100vh - 28px);
  overflow: auto;
  border-radius: 28px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(8, 15, 24, 0.98), rgba(8, 14, 22, 0.95));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 36px 80px rgba(0, 0, 0, 0.55);
}

.step-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
}

.step-modal-head {
  margin-right: 58px;
}

.step-modal-form {
  margin-top: 18px;
}

.step-modal-actions {
  margin-top: 14px;
}

.step-card {
  padding: 12px;
  border-radius: 18px;
}

.step-card-head {
  gap: 12px;
}

.step-card-title {
  font-size: 0.98rem;
}

.step-card-meta {
  font-size: 0.82rem;
}

.step-card-actions {
  margin-top: 10px;
  gap: 6px;
}

.program-list,
.detail-board,
.control-board {
  gap: 10px;
}

.schedule-row,
.control-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(10, 18, 28, 0.92), rgba(8, 13, 21, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.section-row {
  display: grid;
}

.section-bar {
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(102, 217, 255, 0.96), rgba(35, 107, 192, 0.95));
  color: #08131c;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  justify-self: center;
  margin: 2px 0 -2px;
  box-shadow: 0 10px 24px rgba(102, 217, 255, 0.18);
}

.control-board .section-bar {
  justify-self: start;
}

.schedule-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.25fr) minmax(180px, 1fr) minmax(170px, 1fr) minmax(180px, 0.95fr);
  gap: 0;
  align-items: stretch;
}

.schedule-cell {
  padding: 8px 10px;
  min-height: 36px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: grid;
  align-items: center;
  font-size: 0.88rem;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-detail,
.schedule-responsible {
  white-space: normal;
  line-height: 1.25;
}

.schedule-time {
  font-weight: 700;
  color: var(--primary);
}

.schedule-activity {
  font-weight: 700;
}

.schedule-activity-editable {
  appearance: none;
  text-align: left;
  width: 100%;
  background: rgba(102, 217, 255, 0.05);
  cursor: pointer;
  border: 0;
  gap: 3px;
  justify-items: start;
}

.schedule-activity-editable:hover {
  background: rgba(102, 217, 255, 0.12);
}

.schedule-activity-editable strong {
  white-space: normal;
  line-height: 1.2;
}

.schedule-detail,
.schedule-responsible {
  color: var(--muted);
}

.schedule-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 12px 12px;
  justify-content: flex-end;
  align-items: center;
}

.schedule-actions-iconbar {
  margin-top: 2px;
}

.icon-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.icon-action-btn svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.icon-action-btn.is-edit {
  background: rgba(102, 217, 255, 0.12);
  border-color: rgba(102, 217, 255, 0.24);
  color: var(--primary);
}

.icon-action-btn:hover {
  background: rgba(255, 255, 255, 0.09);
}

@media (max-width: 760px) {
  .schedule-actions-iconbar,
  .schedule-actions {
    justify-content: flex-start;
  }
}

.control-row {
  grid-template-columns: 124px minmax(0, 1fr);
}

.control-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(130px, 0.9fr);
}

.control-grid .schedule-cell {
  min-height: 34px;
}

.media-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  min-height: 36px;
}

.media-audio-cell {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  min-height: 36px;
}

.audio-mini {
  display: grid;
  min-width: 0;
}

.audio-widget-mini {
  grid-template-columns: 34px minmax(88px, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.audio-widget-mini .audio-play {
  min-height: 34px;
  width: 34px;
  border-radius: 10px;
}

.audio-widget-mini .audio-track {
  height: 28px;
}

.audio-widget-mini .audio-time {
  min-width: 82px;
  font-size: 0.76rem;
}

.media-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.media-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.media-icon-btn.is-video {
  border-color: rgba(255, 92, 92, 0.28);
  color: #ff6b6b;
}

.hover-tip-media {
  position: relative;
}

.hover-tip-audio {
  height: 180px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(102, 217, 255, 0.12), rgba(140, 240, 182, 0.08));
}

.audio-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
}

.audio-bars span {
  width: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(102, 217, 255, 0.95), rgba(140, 240, 182, 0.95));
  animation: barsPulse 1.1s ease-in-out infinite;
}

.audio-bars span:nth-child(1) { height: 24px; }
.audio-bars span:nth-child(2) { height: 50px; animation-delay: 0.1s; }
.audio-bars span:nth-child(3) { height: 32px; animation-delay: 0.2s; }
.audio-bars span:nth-child(4) { height: 60px; animation-delay: 0.3s; }
.audio-bars span:nth-child(5) { height: 36px; animation-delay: 0.4s; }

.hover-tip-doc {
  height: 180px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255, 179, 107, 0.1), rgba(255, 255, 255, 0.02));
}

.doc-icon {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

@keyframes barsPulse {
  0%, 100% { transform: scaleY(0.72); opacity: 0.7; }
  50% { transform: scaleY(1); opacity: 1; }
}

.brand-mark-image {
  overflow: hidden;
  padding: 0;
}

.brand-mark-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-mark-glyph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: inherit;
  background:
    radial-gradient(circle at 50% 18%, rgba(95, 223, 255, 0.18), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
}

.brand-mark-large {
  width: 84px;
  height: 84px;
  border-radius: 22px;
}

.control-modal {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(2, 5, 10, 0.82);
  backdrop-filter: blur(8px);
}

.control-modal[hidden] {
  display: none !important;
}

.program-card {
  grid-template-columns: 82px minmax(0, 1fr);
  border-radius: 20px;
}

.program-rail {
  padding: 12px 10px;
  gap: 8px;
}

.program-card-main {
  padding: 12px;
}

.program-card-top {
  margin-bottom: 10px;
}

.program-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 10px;
  margin-top: 10px;
}

.program-info,
.media-block {
  padding: 12px;
  border-radius: 16px;
}

.info-row {
  font-size: 0.86rem;
  line-height: 1.35;
}

.media-block {
  gap: 8px;
}

.media-thumb {
  height: 120px;
}

.audio-widget {
  grid-template-columns: 38px minmax(120px, 1fr) auto;
  gap: 8px;
}

.audio-track {
  height: 34px;
}

.video-block {
  gap: 8px;
}

.control-surface {
  width: min(98vw, 1500px);
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 30px;
  padding: 18px 18px 16px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
  background: linear-gradient(180deg, rgba(8, 14, 22, 0.98), rgba(4, 8, 13, 0.99));
  position: relative;
}

.control-headline {
  display: grid;
  grid-template-columns: 124px minmax(170px, 1.2fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(130px, 0.9fr);
}

.detail-headline {
  display: grid;
  grid-template-columns: 124px minmax(118px, 0.95fr) minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 1fr);
}

.view[data-view="detail"] .detail-board .schedule-row {
  grid-template-columns: 124px minmax(0, 1fr);
}

.view[data-view="detail"] .detail-board .program-rail {
  padding: 12px 10px;
}

.view[data-view="detail"] .detail-board .schedule-grid {
  grid-template-columns: minmax(118px, 0.95fr) minmax(0, 1.15fr) minmax(0, 1.25fr) minmax(0, 1fr);
}

.control-row .control-grid {
  display: grid;
  grid-template-columns: minmax(170px, 1.2fr) minmax(180px, 1fr) minmax(150px, 0.8fr) minmax(190px, 1fr) minmax(130px, 0.9fr);
}

.detail-headline {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-headline {
  margin: 10px 0 8px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.control-headline span {
  padding: 0 10px;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.detail-headline span {
  padding: 0 10px;
  min-width: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.control-headline span:last-child {
  border-right: 0;
}

.detail-headline span:last-child {
  border-right: 0;
}

.control-row .control-grid .schedule-cell {
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.control-row .control-grid .schedule-cell:last-child {
  border-right: 0;
}

.control-head {
  padding-right: 62px;
  margin-bottom: 10px;
}

.control-board {
  max-height: calc(100vh - 112px);
  overflow: auto;
  padding-right: 4px;
}

.control-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  cursor: pointer;
  z-index: 1;
}

.board-summary {
  gap: 10px;
}

.summary-card {
  padding: 14px 16px;
  border-radius: 18px;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 5, 10, 0.6);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
  z-index: 180;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar-link {
  grid-template-columns: 40px;
  justify-items: center;
}

body.sidebar-collapsed .sidebar-brand-copy,
body.sidebar-collapsed .nav-copy,
body.sidebar-collapsed .topbar-copy {
  display: none;
}

body.sidebar-collapsed .sidebar {
  padding-inline: 12px;
}

body.sidebar-collapsed .sidebar-head {
  justify-content: center;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 12px auto 12px 12px;
    width: min(320px, calc(100vw - 24px));
    transform: translateX(calc(-100% - 16px));
    transition: transform 220ms ease;
    z-index: 220;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-collapsed .app-shell {
    grid-template-columns: 1fr;
  }

  .home-hero,
  .home-grid,
  .view-grid,
  .templates-grid,
  .board-logos,
  .detail-headline,
  .control-headline,
  .schedule-row,
  .control-row,
  .schedule-grid,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .detail-head-copy,
  .control-page-copy {
    flex-direction: column;
    align-items: stretch;
  }

  .detail-head-logos,
  .control-page-logos {
    justify-content: flex-start;
  }

  .control-page-head .control-page-logo {
    width: 136px;
    height: 136px;
    min-width: 136px;
    min-height: 136px;
    border-radius: 28px;
  }

  .control-page-head .control-page-logo img {
    padding: 0;
    width: 100%;
    height: 100%;
    transform: none;
  }

  .topbar {
    position: sticky;
    top: 12px;
    z-index: 120;
  }

  .topbar-actions {
    display: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 1600px);
    margin-top: 8px;
  }

  .sidebar {
    top: 8px;
    bottom: 8px;
    left: 8px;
  }

  .home-hero {
    padding: 20px;
  }

  .home-brand {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .home-metrics {
    grid-template-columns: 1fr;
  }

  .program-card {
    grid-template-columns: 1fr;
  }

  .program-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    place-items: stretch;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .step-helper {
    flex-direction: column;
    align-items: stretch;
  }

  .program-grid,
  .field-grid,
  .logo-grid,
  .board-summary,
  .control-toolbar,
  .schedule-row,
  .control-row,
  .schedule-grid,
  .control-grid {
    grid-template-columns: 1fr;
  }

  .audio-widget {
    grid-template-columns: 38px 1fr;
  }

  .audio-time {
    grid-column: 1 / -1;
    text-align: left;
  }

  .topbar {
    padding: 12px 14px;
  }
}

.panel-head {
  position: relative;
}

.panel-head::after {
  content: "";
  position: absolute;
  inset: auto 0 -12px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(102, 217, 255, 0.22), transparent);
}

@keyframes viewEnter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .hero,
  .main-grid,
  .view-grid,
  .templates-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .template-flow {
    grid-template-columns: 1fr;
  }

  .editor-panel {
    position: static;
    max-height: none;
  }
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 16px, 1440px);
    margin-top: 8px;
  }

  .topbar {
    border-radius: 24px;
    padding: 14px;
  }

  .topbar-actions {
    width: 100%;
  }

  .btn {
    flex: 1 1 0;
  }

  .hero {
    padding: 22px;
  }

  .detail-head-copy,
  .control-page-copy {
    flex-direction: column;
    align-items: stretch;
  }

  .hero-stats,
  .field-grid,
  .logo-grid,
  .board-summary,
  .program-grid {
    grid-template-columns: 1fr;
  }

  .board-actions {
    justify-items: stretch;
  }

  .chip-row {
    justify-content: flex-start;
  }

  .program-card {
    grid-template-columns: 1fr;
  }

  .program-rail {
    grid-template-columns: repeat(4, auto);
    place-items: center start;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .program-grid {
    gap: 10px;
  }

  .audio-widget {
    grid-template-columns: 36px minmax(110px, 1fr) auto;
  }

  .audio-time {
    grid-column: 2 / -1;
    text-align: left;
  }

  .lightbox {
    padding: 10px;
  }

  .lightbox-surface {
    width: 100%;
    max-height: 96vh;
    border-radius: 22px;
  }

  .lightbox-body img,
  .lightbox-body video,
  .lightbox-body iframe {
    max-height: 62vh;
  }
}

@media print {
  @page {
    size: landscape;
    margin: 6mm;
  }

  body {
    background: #fff;
    color: #000;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .topbar,
  .sidebar,
  .sidebar-backdrop,
  .editor-panel,
  .board-actions,
  .hero,
  .hover-tip,
  .lightbox,
  .control-modal,
  .btn,
  .action-row,
  .template-box:first-of-type {
    display: none !important;
  }

  .app-shell,
  .main-grid,
  .board-panel {
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .board-summary,
  .panel-head .action-row,
  .topbar-actions,
  .control-page-actions {
    display: none !important;
  }

  .detail-head-copy {
    position: relative;
    display: block;
    min-height: 118px;
    padding: 4px 104px 0;
  }

  .view[data-view="detail"] .detail-head-logo,
  .view[data-view="detail"] .control-page-logo {
    position: absolute;
    top: 4px;
    display: grid !important;
    width: 76px;
    height: 76px;
    min-width: 76px;
    min-height: 76px;
    margin: 0 !important;
  }

  .view[data-view="detail"] .detail-head-copy > :first-child,
  .view[data-view="detail"] .detail-head-copy > :last-child,
  .view[data-view="detail"] .control-page-copy > :first-child,
  .view[data-view="detail"] .control-page-copy > :last-child {
    position: absolute;
    top: 4px;
    justify-self: unset !important;
  }

  .view[data-view="detail"] .detail-head-copy > :first-child,
  .view[data-view="detail"] .control-page-copy > :first-child {
    left: 0;
  }

  .view[data-view="detail"] .detail-head-copy > :last-child,
  .view[data-view="detail"] .control-page-copy > :last-child {
    right: 0;
  }

  .view[data-view="detail"] .detail-head-logo img,
  .view[data-view="detail"] .control-page-logo img {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0;
    transform: none;
  }

  .detail-head-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: #fff !important;
    margin: 0;
  }

  .detail-head-title .eyebrow {
    display: none !important;
    visibility: hidden !important;
    height: 0;
    margin: 0;
    padding: 0;
  }

  .detail-head-title h2,
  .detail-head-title .muted {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
  }

  .detail-head-logo {
    width: 76px;
    height: 76px;
  }

  .detail-headline {
    grid-template-columns: 124px minmax(108px, 0.85fr) minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
    margin: 8px 0 6px;
    background: #fff;
    border-color: #d6dbe3;
  }

  .schedule-time,
  .schedule-actions {
    display: grid !important;
  }

  .detail-headline span {
    color: #111 !important;
    font-weight: 700;
    padding: 0 8px;
  }

  .detail-headline span:first-child {
    color: #111 !important;
  }

  .board-panel {
    border: 0;
    box-shadow: none;
    background: #fff;
  }

  .program-card,
  .summary-card {
    break-inside: avoid;
    color: #000;
    background: #fff;
    border-color: #ddd;
  }

  .detail-headline,
  .control-headline {
    color: #000;
    background: #fff;
    border-color: #ccc;
  }

  .detail-headline span,
  .control-headline span,
  .schedule-cell,
  .board-logo,
  .section-bar,
  .summary-card {
    color: #000 !important;
  }

  .schedule-actions {
    display: none !important;
  }

  .schedule-row,
  .control-row {
    background: #fff;
    border-color: #ddd;
  }

  .schedule-row {
    grid-template-columns: 92px minmax(0, 1fr);
  }

  .program-rail {
    padding: 6px 5px;
    gap: 4px;
    align-content: center;
  }

  .order-pill,
  .rail-pill,
  .duration-pill {
    padding: 3px 7px;
    min-height: 18px;
    font-size: 0.66rem;
    line-height: 1;
  }

  .order-pill {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #111 !important;
    box-shadow: none !important;
  }

  .rail-pill,
  .duration-pill {
    display: inline-flex !important;
  }

  .rail-pill {
    display: none !important;
  }

  .schedule-grid {
    grid-template-columns: minmax(108px, 0.85fr) minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, 0.95fr);
  }

  .schedule-cell {
    min-height: 18px;
    padding: 3px 8px;
    font-size: 0.74rem;
    white-space: normal;
  }

  .schedule-activity strong {
    font-size: 0.78rem;
    line-height: 1.1;
  }

  .section-bar {
    margin: 0;
    padding: 5px 10px;
    font-size: 0.68rem;
  }

  .program-list,
  .detail-board,
  .control-board {
    gap: 6px;
  }

  .board-logo {
    border-color: #ccc;
    background: #fff;
  }

  .detail-head-copy,
  .control-page-copy {
    gap: 12px;
  }
}
