:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --line: #d9dee7;
  --muted: #667085;
  --text: #1f2937;
  --text-strong: #111827;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --blue: #2563eb;
  --amber: #b45309;
  --red: #b91c1c;
  --green: #15803d;
  --shadow: 0 12px 28px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a.button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 12px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}

button:hover,
a.button:hover {
  background: var(--teal-dark);
}

button.secondary,
a.button.secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

button.secondary:hover,
a.button.secondary:hover {
  background: #f3f6f8;
}

button.danger {
  background: var(--red);
}

button.danger:hover {
  background: #991b1b;
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 9px 10px;
}

textarea {
  min-height: 86px;
  resize: vertical;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 500px) minmax(0, 1fr);
  background: #030409;
  overflow: hidden;
}

.auth-panel {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 48px;
  display: grid;
  align-content: center;
  gap: 28px;
  background: rgba(255, 255, 255, 0.96);
  border-right: 1px solid rgba(255, 255, 255, 0.14);
}

.setup-panel {
  background: rgba(255, 255, 255, 0.98);
}

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

.auth-logo {
  width: 74px;
  height: 74px;
  border-radius: 16px;
  object-fit: cover;
  background: #020308;
  box-shadow: 0 18px 32px rgba(14, 20, 31, 0.18);
}

.brand-eyebrow {
  margin: 0 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.auth-brand h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 26px;
  line-height: 1.15;
}

.auth-card {
  width: 100%;
  max-width: 392px;
  display: grid;
  gap: 16px;
}

.auth-card h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 28px;
  line-height: 1.15;
}

.auth-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-card input {
  min-height: 44px;
  border-color: #cfd6e3;
  background: #f8fafc;
}

.auth-card input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.18);
  border-color: #38bdf8;
  background: #fff;
}

.auth-card button {
  min-height: 44px;
  margin-top: 2px;
  background: linear-gradient(100deg, #0ea5e9, #2563eb 48%, #d946ef);
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.24);
}

.auth-card button:hover {
  filter: brightness(0.98);
}

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.auth-foot a {
  color: #2563eb;
  font-weight: 750;
  text-decoration: none;
}

.auth-foot a:hover {
  text-decoration: underline;
}

.auth-showcase {
  position: relative;
  min-width: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 28px;
  padding: 56px;
  background:
    linear-gradient(115deg, rgba(0, 212, 255, 0.14), transparent 34%),
    linear-gradient(245deg, rgba(236, 72, 153, 0.22), transparent 38%),
    repeating-linear-gradient(90deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 84px),
    #030409;
}

.showcase-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.08) 48%, transparent 58%);
  animation: scanLight 5.5s linear infinite;
  pointer-events: none;
}

.showcase-header {
  position: relative;
  z-index: 1;
  width: min(580px, 86%);
  height: 300px;
  display: grid;
  place-items: center;
}

.showcase-header img {
  width: auto;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 26px 48px rgba(0, 0, 0, 0.55));
  animation: logoFloat 6s ease-in-out infinite;
}

.slider-window {
  position: relative;
  z-index: 1;
  width: min(620px, 92%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(6, 10, 20, 0.72);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.36);
}

.slider-track {
  display: flex;
  animation: slideShow 12s ease-in-out infinite;
}

.slide {
  flex: 0 0 100%;
  min-height: 154px;
  padding: 24px;
  color: #fff;
  display: grid;
  align-content: center;
  gap: 16px;
}

.slide p {
  margin: 0;
  color: #67e8f9;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
}

.slide h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1;
}

.slide-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  color: #dbeafe;
}

.slide-grid strong {
  color: #f0abfc;
  font-size: 18px;
}

.slider-dots {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 9px;
}

.slider-dots span {
  width: 34px;
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.32);
  animation: dotPulse 12s ease-in-out infinite;
}

.slider-dots span:nth-child(2) {
  animation-delay: 4s;
}

.slider-dots span:nth-child(3) {
  animation-delay: 8s;
}

.sidebar-logo {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  background: #000;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
}

@keyframes slideShow {
  0%, 27% { transform: translateX(0); }
  34%, 60% { transform: translateX(-100%); }
  67%, 93% { transform: translateX(-200%); }
  100% { transform: translateX(0); }
}

@keyframes dotPulse {
  0%, 28% { background: #22d3ee; }
  34%, 100% { background: rgba(255, 255, 255, 0.32); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes scanLight {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
}

.login-panel {
  background: var(--surface);
  padding: 44px;
  display: grid;
  align-content: center;
  gap: 24px;
  border-right: 1px solid var(--line);
}

.login-visual {
  display: grid;
  align-content: center;
  padding: 56px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.12), rgba(37, 99, 235, 0.08)),
    #eef3f5;
}

.brand-row,
.topbar,
.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}

.brand-copy h1,
.login-panel h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-strong);
}

.brand-copy p,
.muted {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.auth-grid {
  display: grid;
  gap: 22px;
}

.auth-box,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.auth-box {
  padding: 20px;
  display: grid;
  gap: 14px;
}

.auth-box h2,
.panel h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  align-items: end;
}

.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-8 { grid-column: span 8; }
.col-12 { grid-column: span 12; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  background: var(--bg);
}

.sidebar {
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 16, 29, 0.99), rgba(17, 24, 39, 0.99) 56%, rgba(28, 22, 38, 0.99)),
    #0f172a;
  color: #e5e7eb;
  padding: 20px 16px 18px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.08);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.08), transparent 36%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 44px);
  pointer-events: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #22d3ee, #14b8a6 42%, #e11d48);
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .brand-mark {
  background: #0f766e;
}

.sidebar .nav-brand {
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.58);
  box-shadow: 0 16px 32px rgba(2, 6, 23, 0.22);
}

.sidebar-title {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
  font-weight: 750;
  color: #f8fafc;
}

.sidebar-subtitle {
  margin: 4px 0 0;
  font-size: 11px;
  color: #96a3b7;
}

.nav-list {
  display: grid;
  gap: 18px;
  align-content: start;
  overflow-y: auto;
  padding: 4px 2px 4px 0;
}

.nav-list::-webkit-scrollbar {
  width: 0;
}

.nav-section {
  display: grid;
  gap: 7px;
}

.nav-section-label {
  padding: 0 12px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.nav-button {
  position: relative;
  width: 100%;
  min-height: 52px;
  justify-content: flex-start;
  gap: 11px;
  padding: 0 12px;
  border-radius: 8px;
  border-color: rgba(148, 163, 184, 0);
  background: rgba(15, 23, 42, 0);
  color: #d6dbe6;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-button::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #22d3ee, #e11d48);
  opacity: 0;
}

.nav-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: #9fb0c7;
}

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

.nav-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.nav-label {
  color: inherit;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-meta {
  color: #8794a8;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
}

.nav-button:hover,
.nav-button.active {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-button:hover {
  border-color: rgba(148, 163, 184, 0.14);
  transform: translateX(2px);
}

.nav-button.active {
  border-color: rgba(34, 211, 238, 0.28);
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.18), rgba(255, 255, 255, 0.07));
  box-shadow: 0 14px 28px rgba(2, 6, 23, 0.22);
}

.nav-button.active::before {
  opacity: 1;
}

.nav-button.active .nav-icon {
  border-color: rgba(125, 211, 252, 0.26);
  background: linear-gradient(135deg, #0891b2, #0f766e 58%, #be123c);
  color: #fff;
}

.nav-button.active .nav-meta {
  color: #b8c7d9;
}

.sidebar-footer {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(2, 6, 23, 0.28);
}

.nav-status-dot {
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.1);
}

.sidebar-footer div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.sidebar-footer strong,
.sidebar-footer span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar-footer strong {
  color: #f8fafc;
  font-size: 13px;
}

.sidebar-footer span {
  color: #96a3b7;
  font-size: 12px;
}

.main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto 1fr;
}

.topbar {
  min-height: 64px;
  padding: 14px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
}

.content {
  padding: 24px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.page-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.page-head h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 24px;
}

.panel {
  padding: 18px;
  display: grid;
  gap: 16px;
}

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

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

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 8px;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.metric strong {
  color: var(--text-strong);
  font-size: 30px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  background: #fff;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

.cell-title {
  font-weight: 700;
  color: var(--text-strong);
}

.cell-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 750;
  background: #eef2f7;
  color: var(--text);
}

.chip.ready,
.chip.published,
.chip.active,
.chip.authorized {
  background: #dcfce7;
  color: var(--green);
}

.chip.uploading,
.chip.publishing,
.chip.scheduled {
  background: #dbeafe;
  color: var(--blue);
}

.chip.pending,
.chip.unauthorized {
  background: #fef3c7;
  color: var(--amber);
}

.chip.failed,
.chip.disabled,
.chip.archived,
.chip.cancelled,
.chip.expired {
  background: #fee2e2;
  color: var(--red);
}

.inline-note {
  align-self: start;
  border: 1px solid #fde68a;
  background: #fffbeb;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.clip-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 18px;
  align-items: start;
}

.clip-player,
.clip-controls {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.clip-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f172a;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.clip-resource-name {
  display: grid;
  gap: 4px;
}

.clip-resource-name strong {
  color: var(--text-strong);
}

.clip-resource-name span {
  color: var(--muted);
  font-size: 13px;
}

.standards-intro p {
  margin: 0;
  color: var(--text);
  line-height: 1.75;
}

.standard-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.standard-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 10px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

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

.standard-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.standard-section h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 17px;
}

.standard-list,
.standard-checklist {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
  line-height: 1.72;
}

.standard-list li,
.standard-checklist li {
  padding: 4px 0;
}

.standard-list strong {
  color: var(--text-strong);
}

.is-hidden {
  display: none !important;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.modal {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  padding: 20px;
  display: grid;
  gap: 18px;
}

.modal.compact {
  width: min(560px, 100%);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.modal-head h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 20px;
}

.icon-button {
  width: 36px;
  min-height: 36px;
  padding: 0;
  border-color: var(--line);
  background: #fff;
  color: var(--text);
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  background: #f3f6f8;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  border-radius: 8px;
  padding: 10px 12px;
}

.toast.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.visual-board {
  max-width: 760px;
  display: grid;
  gap: 18px;
}

.visual-board h2 {
  margin: 0;
  font-size: 36px;
  line-height: 1.15;
  color: var(--text-strong);
}

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

.flow-step {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  padding: 16px;
  min-height: 112px;
}

.flow-step strong {
  display: block;
  color: var(--text-strong);
  margin-bottom: 8px;
}

.flow-step span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 940px) {
  .auth-screen,
  .login-screen,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .auth-showcase,
  .login-visual,
  .sidebar {
    display: none;
  }

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

  .form-grid,
  .standards-grid,
  .clip-layout {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    justify-content: stretch;
  }

  .modal-actions button {
    flex: 1;
  }

  .col-2,
  .col-3,
  .col-4,
  .col-5,
  .col-6,
  .col-8,
  .col-12 {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .auth-panel,
  .login-panel,
  .content,
  .topbar {
    padding: 18px;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  .auth-card h2 {
    font-size: 24px;
  }

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