:root {
  --ink: #211c21;
  --muted: #746b72;
  --paper: #fbf9f8;
  --surface: #ffffff;
  --line: #e7dfdf;
  --accent: #9b315d;
  --accent-dark: #74213f;
  --soft: #f5e7ed;
  --shadow: 0 18px 55px rgba(59, 30, 44, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--paper); }
a { color: var(--accent-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.topbar { min-height: 68px; padding: 0 4vw; display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); font-weight: 750; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; color: white; background: var(--accent); letter-spacing: -.05em; }
nav { display: flex; align-items: center; gap: 24px; }
nav form { margin: 0; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--accent-dark); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.page-shell { width: min(1420px, 92vw); margin: 0 auto; padding: 56px 0 72px; }
footer { padding: 20px 4vw 32px; color: var(--muted); text-align: center; font-size: .86rem; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 34px; }
.page-heading.compact { margin-bottom: 20px; }
h1 { margin: 6px 0 8px; font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.045em; line-height: 1.04; }
h2 { letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.6; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .13em; }
.lead { margin-top: 0; font-size: 1.25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.stats-grid article { min-height: 145px; display: flex; flex-direction: column; justify-content: end; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stats-grid strong { font-size: 2.35rem; letter-spacing: -.05em; }
.stats-grid span { margin-top: 6px; color: var(--muted); }
.login-card { width: min(470px, 100%); margin: 7vh auto; padding: clamp(28px, 5vw, 48px); background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 2.45rem; }
.stacked-form { display: grid; gap: 10px; margin-top: 28px; }
label { font-size: .85rem; font-weight: 700; }
input, select { min-height: 43px; padding: 9px 12px; color: var(--ink); background: white; border: 1px solid #cfc4c8; border-radius: 8px; font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(155,49,93,.15); border-color: var(--accent); }
.primary-button, .secondary-button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; padding: 10px 18px; border-radius: 8px; font-weight: 750; cursor: pointer; text-decoration: none; }
.primary-button { margin-top: 10px; border: 1px solid var(--accent); color: white; background: var(--accent); }
.primary-button:hover { background: var(--accent-dark); }
.primary-button.small { margin: 0; }
.secondary-button { border: 1px solid var(--line); color: var(--ink); background: var(--surface); }
.alert { padding: 12px 14px; border-radius: 8px; color: #7f1833; background: #fde8ee; }
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; padding: 16px; margin-bottom: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.filters label.grow { flex-basis: 100%; }
.filters input.grow { flex: 1 1 320px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); background: #f8f3f5; font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
tbody tr:hover { background: #fdf8fa; }
.badge { white-space: nowrap; padding: 4px 8px; border-radius: 999px; color: var(--accent-dark); background: var(--soft); font-size: .78rem; }
.path { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .78rem; }
.path.full { max-width: none; white-space: normal; overflow-wrap: anywhere; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }
.pagination { justify-content: center; margin-top: 22px; }
.back-link { display: inline-block; margin-bottom: 24px; }
.detail-header { margin-bottom: 30px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.detail-grid div { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.detail-grid .wide { grid-column: 1 / -1; }
dt { color: var(--muted); font-size: .76rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
dd { margin: 8px 0 0; }
.tracks-section { margin-top: 36px; }
.tracks-section h2 span { color: var(--muted); font-weight: 400; }
.track-list { padding: 0; list-style-position: inside; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.track-list li { display: flex; justify-content: space-between; gap: 20px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.track-list li:last-child { border-bottom: 0; }
.track-list small { color: var(--muted); }
@media (max-width: 720px) {
  .topbar, .page-heading { align-items: flex-start; flex-direction: column; }
  .topbar { padding-block: 14px; }
  nav { width: 100%; justify-content: space-between; gap: 12px; }
  .page-shell { padding-top: 36px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .wide { grid-column: auto; }
}
