:root {
  --ink: #152b2d;
  --muted: #667879;
  --paper: #f5f1e8;
  --surface: #fffdf8;
  --line: #d9ddd6;
  --jade: #007b69;
  --jade-dark: #07594f;
  --coral: #ef755a;
  --shadow: 0 18px 60px rgba(23, 48, 46, .09);
}
[data-theme="dark"] {
  --ink: #eef5f1;
  --muted: #9eaeaa;
  --paper: #101817;
  --surface: #17211f;
  --line: #33433f;
  --jade: #4bc9af;
  --jade-dark: #167e6e;
  --coral: #ff8b70;
  --shadow: 0 18px 60px rgba(0,0,0,.28);
  color-scheme: dark;
}
[data-theme="dark"] .status-scheduled { color: #89e1cf; background: #173c35; }
[data-theme="dark"] .status-released { color: #b9d3e3; background: #263a46; }
[data-theme="dark"] .status-withdrawn { color: #ffab9b; background: #482923; }
[data-theme="dark"] .status-withdrawal-scheduled { color: #f4cf7a; background: #493c20; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: "DM Sans", sans-serif; }
button, input, select { font: inherit; }
button { cursor: pointer; }
.account-email { max-width: 260px; overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.button-compact { min-height: 34px; padding: 7px 12px; text-decoration: none; }
.login-shell { min-height: calc(100vh - 150px); display: grid; place-items: center; padding: 42px 20px; }
.login-card { width: min(430px, 100%); display: grid; gap: 15px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.login-card h1, .docs-shell h1 { margin: 0; font: 800 clamp(26px, 4vw, 38px)/1.05 Manrope, sans-serif; letter-spacing: -.035em; }
.login-card > p:not(.eyebrow):not(.login-error), .docs-lead { margin: 0; color: var(--muted); line-height: 1.55; }
.login-card label { display: grid; gap: 7px; color: var(--ink); font-size: 13px; font-weight: 700; }
.login-card input { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; color: var(--ink); background: var(--surface); outline: 0; }
.login-card input:focus { border-color: var(--jade); box-shadow: 0 0 0 3px color-mix(in srgb, var(--jade) 16%, transparent); }
.login-error { margin: 0; padding: 10px 12px; border-radius: 9px; color: #a33525; background: #fee8e3; font-size: 13px; }
.auth-message { margin: 0; padding: 10px 12px; border-radius: 9px; color: var(--jade-dark); background: var(--jade-soft); font-size: 13px; line-height: 1.45; }
.public-docs-link { justify-self: center; color: var(--jade-dark); font-size: 13px; font-weight: 700; }
.docs-shell { width: min(920px, calc(100% - 32px)); min-height: calc(100vh - 180px); margin: 34px auto; padding: clamp(24px, 5vw, 54px); border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); }
.docs-lead { max-width: 650px; margin-top: 14px; }
.docs-empty { min-height: 230px; margin-top: 30px; border: 1px dashed var(--line); border-radius: 12px; }
.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; }
.site-header { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px clamp(14px, 2vw, 34px); border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.brand { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--surface); font: 800 14px/1 Manrope; }
.brand strong, .brand small { display: block; }
.brand strong { font: 800 15px/1.1 Manrope; }
.brand small { margin-top: 4px; color: var(--muted); font-size: 12px; }
.main-nav { display: flex; align-items: center; justify-content: center; gap: 8px; }
.main-nav a, .main-nav span { padding: 9px 13px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 700; }
.main-nav a.is-active { color: var(--ink); background: color-mix(in srgb, var(--jade) 12%, transparent); }
.main-nav span { opacity: .55; cursor: default; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.header-meta { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.header-count { padding-left: 8px; border-left: 1px solid var(--line); white-space: nowrap; }
.header-count strong { color: var(--ink); }
.header-count-withdrawn strong { color: var(--coral); }
.theme-toggle { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: var(--surface); font-size: 15px; }
.theme-toggle:hover { border-color: var(--jade); }
.theme-dark { display: none; }
[data-theme="dark"] .theme-light { display: none; }
[data-theme="dark"] .theme-dark { display: inline; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #17ad8d; box-shadow: 0 0 0 4px rgba(23,173,141,.13); }
main { width: 100%; margin: 0 auto; padding: 12px clamp(10px, 1.5vw, 24px) 34px; }
.hero { padding: clamp(34px, 5vw, 62px) 0 34px; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: end; }
.eyebrow { margin: 0 0 14px; color: var(--jade); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.hero h1 { grid-column: 1; margin: 0; max-width: 760px; font: 800 clamp(38px, 5vw, 68px)/.95 Manrope; letter-spacing: -.05em; }
.hero-copy { grid-column: 2; grid-row: 1 / span 2; margin: 0 0 10px; max-width: 420px; color: var(--muted); font-size: 17px; line-height: 1.5; }
.hero-stats { grid-column: 1 / -1; display: flex; gap: 38px; padding-top: 28px; }
.hero-stats div { display: flex; align-items: baseline; gap: 9px; }
.hero-stats strong { font: 800 28px/1 Manrope; }
.hero-stats span { color: var(--muted); font-size: 13px; }
.catalog-shell { overflow: hidden; background: var(--surface); border: 1px solid rgba(21,43,45,.14); border-radius: 14px; box-shadow: 0 8px 30px rgba(23,48,46,.06); }
.catalog-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 46px; padding: 7px 14px; }
.catalog-heading h1 { margin: 0; font: 800 20px/1 Manrope; letter-spacing: -.025em; }
.dialog-heading h2 { margin: 0; font: 800 clamp(28px, 3vw, 42px)/1.05 Manrope; letter-spacing: -.035em; }
.button { border: 0; border-radius: 999px; padding: 9px 14px; font-size: 13px; font-weight: 700; transition: transform .15s ease, opacity .15s ease, background .15s ease; }
.button:not(:disabled):hover { transform: translateY(-1px); }
.button:disabled { opacity: .42; cursor: not-allowed; }
.button-primary { color: white; background: var(--jade-dark); }
.button-secondary { color: var(--ink); background: color-mix(in srgb, var(--paper) 75%, var(--surface)); }
.toolbar { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(220px, 320px); gap: 8px; padding: 0 14px 8px; }
.search-box, .sort-control { min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.search-box { display: flex; align-items: center; gap: 11px; padding: 0 15px; }
.search-box svg { width: 19px; fill: none; stroke: var(--muted); stroke-width: 1.8; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); }
.sort-control { display: flex; align-items: center; padding-left: 12px; color: var(--muted); font-size: 12px; }
.sort-control select { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0 14px; color: var(--ink); background: transparent; font-weight: 600; }
.selection-bar { min-height: 34px; padding: 0 14px; display: flex; align-items: center; gap: 14px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--jade) 6%, var(--surface)); font-size: 12px; color: var(--muted); }
.check-label { display: flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--jade); width: 15px; height: 15px; }
.text-button { margin-left: auto; border: 0; color: var(--jade-dark); background: none; font-weight: 700; }
.table-wrap { position: relative; min-height: 330px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 1380px; }
th { height: 32px; padding: 6px 9px; color: var(--muted); background: color-mix(in srgb, var(--paper) 55%, var(--surface)); border-bottom: 1px solid var(--line); text-align: left; font-size: 10px; letter-spacing: .065em; text-transform: uppercase; white-space: nowrap; }
th button { border: 0; padding: 0; color: inherit; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; }
th button span { margin-left: 5px; opacity: .5; }
td { height: 48px; padding: 5px 9px; border-bottom: 1px solid #eceee9; font-size: 12.5px; vertical-align: middle; }
tbody tr { transition: background .12s ease; }
tbody tr.product-row { height: 48px; }
tbody tr.product-row td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tbody tr:hover { background: color-mix(in srgb, var(--jade) 5%, transparent); }
tbody tr.is-selected { background: color-mix(in srgb, var(--jade) 10%, transparent); }
.check-cell { width: 38px; text-align: center; padding-left: 5px; padding-right: 2px; }
.expand-cell { width: 34px; padding-left: 2px; padding-right: 4px; text-align: center; }
.expand-button { display: grid; place-items: center; width: 24px; height: 24px; border: 0; border-radius: 6px; color: var(--jade); background: transparent; font-size: 17px; line-height: 1; }
.expand-button span { display: block; transform: translateY(-2px) rotate(-90deg); transition: transform .15s ease; }
.expand-button[aria-expanded="true"] span { transform: translateY(-2px) rotate(0); }
.expand-button:hover { border-color: var(--jade); background: #edf8f3; }
.artist-cell { width: 12%; font-weight: 600; }
.title-cell { width: 16%; }
.cell-main, .cell-meta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-main { font-weight: 600; }
.cell-meta { margin-top: 2px; color: var(--muted); font-size: 10.5px; line-height: 1.05; }
.track-count-cell { width: 62px; padding-right: 14px; text-align: center; }
.upc { width: 138px; padding-left: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; letter-spacing: .01em; }
.explicit-cell { width: 46px; text-align: center; }
.product-row .explicit-cell { overflow: visible; text-overflow: clip; }
.explicit-badge { display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1.5px solid currentColor; border-radius: 3px; color: var(--ink); font: 800 10px/1 Arial, sans-serif; }
.date, .secondary { color: var(--muted); }
.date { width: 132px; }
.date .cell-main { color: var(--ink); font-weight: 500; }
.date .cell-meta { color: var(--jade); }
.status-cell { width: 122px; }
.status-badge { display: inline-flex; max-width: 100%; padding: 4px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1; white-space: nowrap; }
.status-scheduled { color: #07594f; background: #dff5ed; }
.status-released { color: #35566f; background: #e8f0f5; }
.status-withdrawn { color: #a33525; background: #fee8e3; }
.status-withdrawal-scheduled { color: #8a5b00; background: #fff1c9; }
.licensor-cell { width: 13%; }
.track-detail-row:hover { background: transparent; }
.track-detail-row > td { height: auto; padding: 0 10px 8px 72px; background: color-mix(in srgb, var(--jade) 4%, var(--surface)); }
.tracks-panel { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.tracks-loading, .tracks-error { padding: 12px; color: var(--muted); font-size: 12px; }
.tracks-error { color: #b63a29; }
.tracks-heading { display: flex; justify-content: space-between; gap: 18px; padding: 15px 18px; border-bottom: 1px solid #e3e9e4; }
.tracks-heading strong { font-family: Manrope, sans-serif; }
.tracks-heading span { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.track-list { margin: 0; padding: 0; list-style: none; }
.track-list li { min-height: 44px; display: grid; grid-template-columns: 30px minmax(200px, 1.2fr) 34px 132px minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, .8fr); align-items: center; gap: 10px; padding: 5px 10px; border-bottom: 1px solid #edf0ec; }
.track-list li:last-child { border-bottom: 0; }
.track-position { color: var(--jade); font: 800 13px/1 Manrope, sans-serif; }
.track-info { min-width: 0; display: block; }
.track-info strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.track-explicit { display: grid; place-items: center; min-width: 0; }
.track-identifiers { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10.5px; }
.track-identifiers code { color: var(--ink); font-size: 10.5px; white-space: nowrap; }
.track-credit { min-width: 0; }
.track-credit small, .track-credit > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.track-credit small { color: var(--muted); font-size: 9.5px; text-transform: uppercase; letter-spacing: .05em; }
.track-credit > span { margin-top: 2px; font-size: 11px; }
.loading-state, .empty-state { display: grid; place-items: center; align-content: center; gap: 12px; min-height: 330px; color: var(--muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #dfe5df; border-top-color: var(--jade); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 10px 14px; }
.pagination button { border: 1px solid var(--line); border-radius: 999px; padding: 9px 15px; color: var(--ink); background: var(--surface); font-weight: 600; }
.pagination button:disabled { opacity: .35; cursor: not-allowed; }
.pagination span { color: var(--muted); font-size: 13px; }
footer { display: flex; justify-content: space-between; max-width: 1560px; margin: 0 auto; padding: 0 clamp(24px, 5vw, 76px) 38px; color: var(--muted); font-size: 12px; }
dialog { width: min(660px, calc(100% - 28px)); border: 0; border-radius: 24px; padding: 0; box-shadow: 0 30px 100px rgba(15,35,34,.28); background: var(--surface); }
dialog::backdrop { background: rgba(13,30,29,.52); backdrop-filter: blur(4px); }
.dialog-card { padding: 28px; }
.dialog-heading { display: flex; justify-content: space-between; gap: 20px; }
.icon-button { align-self: start; width: 38px; height: 38px; border: 0; border-radius: 50%; color: var(--ink); background: #edf0eb; font-size: 24px; }
fieldset { margin: 28px 0 20px; padding: 0; border: 0; }
legend { margin-bottom: 12px; font-weight: 700; }
.column-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.column-grid label, .export-scope label, .export-format label { display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.export-format { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.export-scope { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.export-scope strong { margin-left: auto; }
.dialog-error { margin: 14px 0 0; color: #b63a29; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 24px; }
@media (max-width: 760px) {
  .site-header { min-height: 52px; }
  .site-header { grid-template-columns: 1fr auto; }
  .main-nav, .header-meta { display: none; }
  .hero { grid-template-columns: 1fr; padding-top: 54px; }
  .hero-copy { grid-column: 1; grid-row: auto; margin-top: 28px; }
  .hero-stats { gap: 20px; justify-content: space-between; padding-top: 36px; }
  .hero-stats div { display: block; }
  .hero-stats span { display: block; margin-top: 5px; }
  .catalog-shell { border-radius: 20px; }
  .catalog-heading, .toolbar { padding-left: 18px; padding-right: 18px; }
  .catalog-heading { align-items: center; }
  .button { padding: 11px 15px; }
  .toolbar { grid-template-columns: 1fr; }
  .selection-bar { padding: 0 18px; }
  .selection-bar #resultSummary { display: none; }
  .column-grid, .export-scope, .export-format { grid-template-columns: 1fr; }
  .track-detail-row > td { padding: 0 14px 18px 58px; }
  .track-list li { grid-template-columns: 34px minmax(170px, 1fr) 30px; }
  .track-explicit { grid-column: 3; grid-row: 1; }
  .track-identifiers { grid-column: 2 / 4; }
}
