:root {
  color-scheme: light;
  --navy: #10233f;
  --ink: #172033;
  --muted: #687188;
  --line: #e7e4dc;
  --ivory: #fafaf8;
  --card: #ffffff;
  --gold: #d4a72c;
  --teal: #2f7c7a;
  --green: #2e7d55;
  --red: #b95050;
  --shadow: 0 18px 55px rgba(16, 35, 63, .08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ivory);
  color: var(--ink);
}

a { color: inherit; }

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 28px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  text-decoration: none;
  margin-bottom: 36px;
}

.brand img { width: 42px; height: 42px; }
.brand strong { display: block; letter-spacing: .08em; color: var(--navy); }
.brand small { color: var(--muted); }

nav { display: grid; gap: 8px; }
nav a {
  text-decoration: none;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
}
nav a:hover { background: #f0eee8; color: var(--navy); }

.main-content {
  width: min(1180px, 100%);
  margin: 0 auto;
  padding: 40px;
}

.hero {
  padding: 38px;
  background: linear-gradient(135deg, #fff 0%, #fbf7ea 100%);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.eyebrow, .pill {
  color: var(--teal);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 700;
}

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; font-size: clamp(42px, 7vw, 76px); line-height: .92; letter-spacing: 0; color: var(--navy); margin-bottom: 18px; }
h2 { color: var(--navy); margin-bottom: 8px; }
p { color: var(--muted); line-height: 1.6; }

.hero-actions, .migration-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.button, .file-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button:hover, .file-button:hover { transform: translateY(-2px); }
.primary { background: var(--navy); color: #fff; box-shadow: 0 10px 24px rgba(16, 35, 63, .16); }
.secondary, .file-button { background: #efe9d8; color: var(--navy); }
.quiet { background: #f7e5e5; color: var(--red); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.file-button input { display: none; }
.status-message { margin: 18px 0 0; color: var(--navy); font-weight: 700; }

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

.card {
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
  overflow: hidden;
}

.card-header { margin-bottom: 18px; }
.card-header.horizontal {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.profile-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.profile-panel img {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  border: 1px solid var(--line);
}
.profile-panel strong { display: block; color: var(--navy); font-size: 20px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.stats-grid div {
  padding: 16px;
  border-radius: 18px;
  background: #f7f5ef;
}
.stats-grid span, .subtle { display: block; color: var(--muted); font-size: 13px; }
.stats-grid strong { display: block; color: var(--navy); font-size: 26px; margin-top: 4px; }

.video-list {
  display: grid;
  gap: 12px;
}
.video-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
.video-row img {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
  background: #f1eee6;
}
.video-row h3 {
  margin: 0 0 4px;
  color: var(--navy);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-row p {
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-metrics {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 6px 12px;
  text-align: right;
  white-space: nowrap;
  color: var(--muted);
  font-size: 13px;
}
.video-metrics strong { color: var(--navy); }

.empty {
  color: var(--muted);
  background: #f7f5ef;
  border-radius: 18px;
  padding: 18px;
}

.notice { border-color: rgba(212, 167, 44, .35); }
.safety { border-color: rgba(47, 124, 122, .28); }
.safety ul { color: var(--muted); line-height: 1.8; padding-left: 20px; }
code { color: var(--navy); background: #f0eee8; border-radius: 6px; padding: 2px 6px; }

@media (max-width: 900px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main-content { padding: 22px; }
  .two { grid-template-columns: 1fr; }
  .video-row { grid-template-columns: 64px minmax(0, 1fr); }
  .video-row img { width: 64px; height: 64px; }
  .video-metrics { grid-column: 1 / -1; text-align: left; grid-template-columns: repeat(4, auto); }
}
