:root {
    --bg: #050505;
    --bg-soft: #121212;
    --panel: rgba(24, 24, 24, 0.96);
    --panel-strong: #1f1f1f;
    --panel-hover: #282828;
    --line: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --muted: #b3b3b3;
    --accent: #1ed760;
    --accent-strong: #1fdf64;
    --accent-soft: rgba(30, 215, 96, 0.16);
    --danger: #f15e6c;
    --warn: #f8c45d;
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(30, 215, 96, 0.16), transparent 22%),
        radial-gradient(circle at top right, rgba(30, 215, 96, 0.08), transparent 20%),
        linear-gradient(180deg, #191414 0%, #0d0d0d 32%, #050505 100%);
    color: var(--text);
}

img,
svg,
canvas {
    max-width: 100%;
}

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

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.mobile-topbar,
.mobile-nav-backdrop,
.sidebar-mobile-head,
.hamburger-button,
.sidebar-close {
    display: none;
}

.sidebar {
    padding: 32px 24px;
    border-right: 1px solid var(--line);
    background:
        linear-gradient(180deg, rgba(31, 31, 31, 0.96) 0%, rgba(12, 12, 12, 0.98) 100%);
    backdrop-filter: blur(18px);
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.brand {
    display: grid;
    gap: 10px;
}

.brand h1 {
    font-size: 1.8rem;
}

.sidebar nav {
    display: grid;
    gap: 12px;
}

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

.nav-dropdown {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
    overflow: hidden;
}

.nav-dropdown summary {
    list-style: none;
    cursor: pointer;
    padding: 12px 14px;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease;
}

.nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.nav-dropdown .nav-group {
    padding: 0 10px 10px;
}

.sidebar nav a,
.filter-row a {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sidebar nav {
    align-content: start;
}

.sidebar nav a:hover,
.filter-row a:hover,
.nav-dropdown summary:hover {
    border-color: rgba(30, 215, 96, 0.22);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    transform: translateY(-1px);
}

.nav-subitem {
    margin-left: 18px;
    font-size: 0.95rem;
    color: var(--muted);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.content {
    padding: 32px;
    display: grid;
    gap: 24px;
    min-width: 0;
}

.toast {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    position: relative;
    box-shadow: var(--shadow);
}

.toast-body {
    display: grid;
    gap: 4px;
}

.toast-observe {
    border: 1px solid rgba(248, 196, 93, 0.22);
    background: linear-gradient(135deg, rgba(248, 196, 93, 0.14), rgba(255, 255, 255, 0.05));
    color: #ffe1a2;
}

.toast-suspicious {
    border: 1px solid rgba(255, 146, 76, 0.24);
    background: linear-gradient(135deg, rgba(255, 146, 76, 0.16), rgba(255, 255, 255, 0.05));
    color: #ffd1b0;
}

.toast-critical {
    border: 1px solid rgba(241, 94, 108, 0.28);
    background: linear-gradient(135deg, rgba(241, 94, 108, 0.18), rgba(255, 255, 255, 0.04));
    color: #ffc1c8;
}

.toast-close {
    width: auto;
    min-width: 40px;
    margin: 0;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    box-shadow: none;
    flex-shrink: 0;
}

.brand-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 700;
}

.page-header,
.with-actions {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: end;
    flex-wrap: wrap;
}

.report-logo-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.report-logo {
    display: block;
    max-height: 38px;
    width: auto;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 24px;
    backdrop-filter: blur(16px);
    min-width: 0;
}

.stats-grid,
.detail-grid,
.grid-list {
    display: grid;
    gap: 18px;
}

.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.compact-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-list {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.artists-list-layout {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
    max-width: none;
    margin: 0;
}

.stat-card strong {
    display: block;
    font-size: 2.2rem;
    margin-top: 12px;
}

.stat-card span {
    color: var(--muted);
}

.artist-stats-sections {
    display: grid;
    gap: 16px;
}

.artist-stats-section {
    display: grid;
    gap: 12px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.artist-stats-section-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
    flex-wrap: wrap;
}

.artist-stats-section-head h4 {
    margin: 0;
}

.artist-stats-section-head .muted {
    margin: 0;
    max-width: 38rem;
}

.artist-card,
.report-card {
    display: grid;
    gap: 12px;
}

.reports-filter-panel {
    width: 100%;
}

.reports-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    align-items: end;
}

.reports-filter-form label {
    display: grid;
    gap: 8px;
}

.reports-filter-form label span {
    color: var(--muted);
    font-size: 0.88rem;
}

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

.artists-list-layout .artist-card {
    padding: 18px 20px;
    border-radius: 20px;
}

.artists-list-layout .artist-meta {
    justify-content: start;
    align-items: start;
    gap: 8px;
}

.artists-list-layout .artist-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
    font-size: 0.92rem;
}

.artists-list-layout .artist-stats-grid strong {
    display: inline;
    margin-right: 6px;
    font-size: 1rem;
}

.artist-card-head {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.artist-list-avatar,
.artist-list-image,
.artist-list-placeholder {
    width: 52px;
    height: 52px;
}

.artist-list-avatar {
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.artist-list-image,
.artist-list-placeholder {
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.artist-list-placeholder {
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(30, 215, 96, 0.18), rgba(16, 185, 129, 0.12));
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 800;
    border: 1px solid rgba(30, 215, 96, 0.22);
}

.artist-card-copy {
    min-width: 0;
}

.artist-card-copy h3,
.artist-card-copy .muted {
    margin: 0;
}

.artist-card-copy .muted {
    margin-top: 4px;
}

.artist-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    color: var(--muted);
    font-size: 0.95rem;
}

.artist-stats-grid strong {
    color: var(--text);
    display: block;
    font-size: 1.1rem;
}

@media (max-width: 900px) {
    .artists-list-layout {
        grid-template-columns: 1fr;
    }
}

.artist-meta,
.report-head,
.report-badges,
.section-head,
.filter-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th, td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    word-break: normal;
    overflow-wrap: normal;
}

thead th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

tbody tr {
    transition: background 0.16s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.clickable-table-row {
    cursor: pointer;
}

.clickable-table-row:hover,
.clickable-table-row:focus-visible {
    background: rgba(255, 255, 255, 0.05);
}

.pill,
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
}

.green { background: rgba(30, 215, 96, 0.16); color: #5cff95; }
.yellow { background: rgba(248, 196, 93, 0.16); color: #ffd36f; }
.orange { background: rgba(255, 146, 76, 0.16); color: #ffb071; }
.red { background: rgba(241, 94, 108, 0.16); color: #ff8d98; }
.score-badge { background: var(--accent-soft); color: var(--accent); min-width: 48px; }

.report-list {
    display: grid;
    gap: 18px;
}

.report-card {
    padding: 20px 22px;
    border-radius: 22px;
}

.report-card-track {
    border-left: 4px solid rgba(29, 185, 84, 0.75);
}

.report-card-artist {
    border-left: 4px solid rgba(124, 92, 255, 0.75);
}

.report-title-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 6px;
}

.report-kind-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: 700;
}

.report-kind-track {
    background: rgba(29, 185, 84, 0.14);
    color: #76f0a5;
}

.report-kind-artist {
    background: rgba(124, 92, 255, 0.16);
    color: #c4b4ff;
}

.report-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px 14px;
}

.report-meta-grid p {
    margin: 0;
}

.report-empty-state {
    text-align: center;
}

.muted { color: var(--muted); }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-card {
    width: min(460px, 100%);
    padding: 32px;
    border-radius: 28px;
    background:
        linear-gradient(180deg, rgba(30, 30, 30, 0.94) 0%, rgba(18, 18, 18, 0.98) 100%);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

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

input,
button,
select {
    width: 100%;
    margin-top: 8px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--bg-soft);
    color: var(--text);
}

input:focus,
select:focus {
    outline: none;
    border-color: rgba(30, 215, 96, 0.45);
    box-shadow: 0 0 0 3px rgba(30, 215, 96, 0.12);
}

.multi-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}

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

button {
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #041408;
    font-weight: 700;
    cursor: pointer;
    border-color: transparent;
    box-shadow: 0 10px 28px rgba(30, 215, 96, 0.22);
    transition: transform 0.16s ease, filter 0.16s ease;
}

button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
}

button:disabled,
input:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    filter: none;
}

button:disabled:hover {
    transform: none;
}

.button-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 14px;
    background: linear-gradient(180deg, var(--accent-strong), var(--accent));
    color: #041408;
    font-weight: 700;
    box-shadow: 0 10px 28px rgba(30, 215, 96, 0.22);
    white-space: nowrap;
}

.danger-card {
    border-color: rgba(255, 99, 125, 0.3);
}

.danger-button {
    background: linear-gradient(135deg, #ff7b7b, #ff4d6d);
    color: white;
}

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

.inline-form {
    display: inline-flex;
    max-width: 100%;
}

.inline-form button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: auto;
    margin: 0;
    max-width: 100%;
    white-space: nowrap;
}

.button-spinner {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid rgba(4, 20, 8, 0.25);
    border-top-color: rgba(4, 20, 8, 0.95);
    display: none;
    flex-shrink: 0;
}

.loading-form.is-loading button {
    cursor: wait;
    opacity: 0.92;
}

.loading-form.is-loading .button-spinner {
    display: inline-block;
    animation: button-spin 0.8s linear infinite;
}

@keyframes button-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

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

.control-panel {
    border-top: 1px solid var(--line);
    padding-top: 16px;
}

.collapsible-panel summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    white-space: nowrap;
}

.collapsible-panel summary::-webkit-details-marker {
    display: none;
}

.collapsible-panel summary::after {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--accent);
}

.collapsible-panel[open] summary::after {
    content: "-";
}

.collapsible-panel summary small {
    color: var(--muted);
    font-weight: 600;
    white-space: nowrap;
}

.stack-form {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-width: 320px;
}

.stack-form input {
    width: 100%;
}

.checkbox-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.checkbox-row label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.top-gap {
    margin-top: 16px;
}

.link-button {
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    width: auto;
    color: var(--accent);
    cursor: pointer;
}

.danger-text {
    color: #ff8ea1;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(241, 94, 108, 0.12);
    color: #ffb1ba;
    border: 1px solid rgba(241, 94, 108, 0.22);
}

.alert-success {
    background: rgba(30, 215, 96, 0.12);
    color: #8ff2b0;
    border-color: rgba(30, 215, 96, 0.2);
}

.control-running-alert {
    background: linear-gradient(135deg, rgba(248, 196, 93, 0.16), rgba(255, 255, 255, 0.04));
    color: #ffe1a2;
    border-color: rgba(248, 196, 93, 0.24);
}

.simple-list {
    margin: 0;
    padding-left: 18px;
}

pre {
    overflow-x: auto;
    padding: 16px;
    border-radius: 16px;
    background: rgba(8, 8, 8, 0.86);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

code {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.artist-profile-summary {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.artist-profile-image {
    width: 88px;
    height: 88px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 999px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.artist-profile-copy {
    min-width: 0;
}

.artist-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
    flex-wrap: wrap;
}

.artist-profile-score {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.artist-profile-copy h3,
.artist-profile-copy p {
    margin-top: 0;
}

.artist-profile-copy h3 {
    margin-bottom: 8px;
}

.artist-profile-meta {
    display: grid;
    gap: 6px;
    font-size: 0.95rem;
}

.artist-profile-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 14px;
}

.artist-profile-meta p {
    margin: 0;
    line-height: 1.4;
}

.artist-profile-copy p:last-child {
    margin-bottom: 0;
}

.artist-profile-note {
    margin: 0;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--muted);
    line-height: 1.5;
    font-size: 0.96rem;
}

.track-cover-image {
    width: 100%;
    max-width: 220px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    margin-bottom: 18px;
    box-shadow: var(--shadow);
}

.track-primary-artist {
    margin-left: 6px;
    color: var(--text);
}

.release-list {
    display: grid;
    gap: 18px;
}

.artist-track-toolbar {
    display: flex;
    justify-content: flex-start;
}

.artist-track-list-container {
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.012));
}

.artist-track-list-panel[open] > summary {
    margin-bottom: 4px;
}

.artist-action-groups {
    display: grid;
    gap: 14px;
}

.artist-action-group {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.artist-action-group h4 {
    margin: 0 0 10px;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    color: var(--muted);
}

.artist-action-group .action-row {
    margin-top: 0;
}

.artist-analysis-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.artist-track-search {
    width: min(100%, 340px);
    padding: 10px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
}

.artist-track-search::placeholder {
    color: var(--muted);
}

.artist-track-search-empty {
    padding: 10px 0 0;
}

.release-card {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 18px;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    background: linear-gradient(180deg, rgba(36, 36, 36, 0.92), rgba(20, 20, 20, 0.98));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

@media (max-width: 720px) {
    .artist-action-group {
        padding: 14px;
    }

    .artist-track-list-container {
        padding: 14px;
    }
}

.release-cover-wrap {
    display: flex;
    align-items: start;
    justify-content: center;
}

.release-cover-image,
.release-cover-placeholder {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.release-cover-image {
    object-fit: cover;
}

.release-cover-placeholder {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 2rem;
}

.release-content {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.release-track-link {
    display: inline-grid;
    grid-template-columns: 48px 1fr;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.release-track-link:hover .release-track-title,
.release-track-link:focus-visible .release-track-title {
    text-decoration: underline;
}

.release-track-thumb,
.release-track-thumb-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.release-track-thumb {
    object-fit: cover;
}

.release-track-thumb-placeholder {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 1rem;
}

.release-track-title {
    font-weight: 700;
}

.youtube-candidate-list {
    display: grid;
    gap: 14px;
}

.youtube-candidate {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.youtube-candidate-thumb {
    width: 120px;
    height: 68px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--line);
}

.youtube-candidate-body {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.chart-wrap {
    overflow-x: auto;
}

.spotify-chart {
    width: 100%;
    min-width: 720px;
    height: auto;
}

.chart-grid-line {
    stroke: rgba(255, 255, 255, 0.08);
    stroke-width: 1;
}

.chart-line {
    fill: none;
    stroke: var(--accent);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-dot {
    fill: #ffffff;
    stroke: var(--accent);
    stroke-width: 3;
}

.chart-axis-label {
    fill: var(--muted);
    font-size: 12px;
}

.chart-axis-date {
    text-anchor: middle;
}

.report-track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
}

.report-track-card {
    display: grid;
    gap: 14px;
}

.report-track-head {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 14px;
    align-items: center;
}

.report-track-cover-wrap {
    width: 88px;
}

.report-track-cover,
.report-track-cover-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 18px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.report-track-cover {
    object-fit: cover;
}

.report-track-cover-placeholder {
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 1.4rem;
}

.sfa-track-page-header,
.sfa-track-stats-grid,
.sfa-track-detail-grid {
    width: 100%;
}

.sfa-track-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.sfa-track-card {
    padding: 18px;
}

.sfa-track-chart-wrap {
    overflow-x: hidden;
}

.sfa-track-chart {
    width: 100%;
    min-width: 0;
}

.sfa-track-table-wrap {
    overflow-x: visible;
}

.sfa-track-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.sfa-track-table th,
.sfa-track-table td {
    padding: 10px 10px;
    font-size: 0.95rem;
}

.sfa-track-table th:nth-child(2),
.sfa-track-table td:nth-child(2) {
    width: 28%;
}

.sfa-track-table th:nth-child(3),
.sfa-track-table td:nth-child(3) {
    width: 18%;
}

.sfa-artist-page-header,
.sfa-artist-stats-grid,
.sfa-artist-detail-grid {
    width: 100%;
}

.sfa-artist-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
}

.sfa-artist-card {
    padding: 18px;
}

.sfa-artist-table-wrap {
    overflow-x: visible;
}

.sfa-artist-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.sfa-artist-table th,
.sfa-artist-table td {
    padding: 10px 10px;
    font-size: 0.95rem;
}

.sfa-artist-table td .top-gap {
    margin-top: 6px;
}

.report-track-head-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.report-warning-box {
    border: 1px solid rgba(241, 94, 108, 0.35);
    background: rgba(241, 94, 108, 0.08);
    border-radius: 18px;
    padding: 14px;
}

.danger-list {
    color: #ff8d98;
}

.compact-list {
    display: grid;
    gap: 6px;
}

.compact-report-item {
    padding: 12px;
}

@media (max-width: 700px) {
    .report-track-head {
        grid-template-columns: 1fr;
    }

    .report-track-cover-wrap {
        width: 100%;
    }
}

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

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        border-right: 0;
        border-bottom: 1px solid var(--line);
        padding: 20px 16px;
        gap: 16px;
    }

    .brand h1 {
        font-size: 1.35rem;
    }

    .sidebar nav {
        grid-auto-flow: column;
        grid-auto-columns: minmax(140px, 1fr);
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .sidebar nav a,
    .nav-dropdown {
        min-width: 140px;
    }

    .nav-dropdown .nav-group {
        padding: 0 8px 8px;
    }

    .sidebar-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        padding-top: 10px;
    }

    .content {
        padding: 20px;
    }

    .page-header,
    .with-actions,
    .artist-meta,
    .report-head,
    .report-badges,
    .section-head,
    .filter-row,
    .action-row {
        align-items: start;
    }

    .filter-row,
    .action-row {
        flex-direction: column;
    }

    .inline-form,
    .inline-form button,
    .action-row > a,
    .action-row > button,
    .action-row > form {
        width: 100%;
    }

    .button-link {
        width: 100%;
    }

    .card {
        padding: 20px;
        border-radius: 20px;
    }

    .stats-grid,
    .detail-grid,
    .grid-list {
        grid-template-columns: 1fr;
    }

    .youtube-candidate {
        grid-template-columns: 1fr;
    }

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

    .release-cover-image,
    .release-cover-placeholder {
        width: 100%;
        max-width: 220px;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .artist-profile-summary {
        grid-template-columns: 72px minmax(0, 1fr);
        gap: 12px;
    }

    .artist-profile-meta-grid {
        grid-template-columns: 1fr;
    }

    .track-cover-image {
        max-width: 180px;
    }

    .artist-profile-image {
        width: 72px;
        height: 72px;
    }

    .toast {
        top: 12px;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 16px;
        gap: 18px;
    }

    .sidebar {
        padding: 16px 12px;
    }

    .sidebar nav {
        grid-auto-columns: minmax(124px, 1fr);
        gap: 8px;
    }

    .sidebar nav a,
    .nav-dropdown,
    .nav-dropdown summary {
        font-size: 0.95rem;
    }

    .page-header h2,
    .with-actions h2 {
        font-size: 1.45rem;
    }

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

    .form-grid {
        gap: 12px;
    }

    input,
    button,
    select {
        padding: 13px 14px;
    }

    th,
    td {
        padding: 10px 8px;
        font-size: 0.92rem;
    }

    thead th {
        font-size: 0.72rem;
    }

    .stat-card strong {
        font-size: 1.8rem;
    }

    .toast {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 14px;
    }

    .toast-close {
        align-self: flex-end;
    }

    .spotify-chart {
        min-width: 620px;
    }

    .sfa-track-chart {
        min-width: 0;
    }

    .sfa-track-table-wrap {
        overflow-x: auto;
    }

    .sfa-track-table {
        min-width: 420px;
    }

    .sfa-artist-table-wrap {
        overflow-x: auto;
    }

    .sfa-artist-table {
        min-width: 460px;
    }
}

@media (max-width: 480px) {
    .brand-eyebrow {
        font-size: 0.68rem;
        letter-spacing: 0.12em;
    }

    .brand h1 {
        font-size: 1.15rem;
    }

    .sidebar-footer {
        flex-direction: column;
        align-items: start;
    }

    .nav-subitem {
        margin-left: 8px;
    }

    .artist-profile-summary {
        grid-template-columns: 60px minmax(0, 1fr);
        gap: 10px;
    }

    .track-cover-image {
        max-width: 140px;
    }

    .artist-profile-image {
        width: 60px;
        height: 60px;
    }

    .release-card,
    .youtube-candidate {
        padding: 12px;
    }

    .youtube-candidate-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .spotify-chart {
        min-width: 560px;
    }

    .sfa-track-card {
        padding: 14px;
    }

    .sfa-track-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    .sfa-artist-card {
        padding: 14px;
    }

    .sfa-artist-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
        gap: 12px;
    }

    .sfa-artist-table {
        min-width: 380px;
    }

    .sfa-artist-table th,
    .sfa-artist-table td {
        padding: 9px 8px;
        font-size: 0.9rem;
    }

    .sfa-track-table {
        min-width: 360px;
    }

    .sfa-track-table th,
    .sfa-track-table td {
        padding: 9px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 900px) {
    .mobile-topbar {
        display: flex;
        align-items: center;
        gap: 14px;
        position: sticky;
        top: 0;
        z-index: 50;
        padding: 14px 16px;
        border-bottom: 1px solid var(--line);
        background: linear-gradient(180deg, rgba(20, 20, 20, 0.98) 0%, rgba(10, 10, 10, 0.96) 100%);
        backdrop-filter: blur(18px);
    }

    .mobile-topbar-brand {
        display: grid;
        gap: 2px;
    }

    .mobile-topbar-brand strong {
        font-size: 1rem;
        letter-spacing: -0.02em;
    }

    .hamburger-button,
    .sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        border: 1px solid rgba(255, 255, 255, 0.08);
        background: rgba(255, 255, 255, 0.04);
        color: var(--text);
        box-shadow: none;
    }

    .hamburger-button {
        width: 46px;
        min-width: 46px;
        height: 46px;
        border-radius: 14px;
        flex-direction: column;
        gap: 5px;
    }

    .hamburger-button span {
        display: block;
        width: 18px;
        height: 2px;
        border-radius: 999px;
        background: var(--text);
    }

    .mobile-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        border: 0;
        background: rgba(0, 0, 0, 0.56);
        opacity: 0;
        pointer-events: none;
        z-index: 39;
        transition: opacity 0.18s ease;
    }

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

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(320px, 88vw);
        z-index: 40;
        border-right: 1px solid var(--line);
        border-bottom: 0;
        padding: 18px 16px 20px;
        gap: 16px;
        overflow-y: auto;
        transform: translateX(-108%);
        transition: transform 0.22s ease;
    }

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

    .sidebar-mobile-head {
        display: flex;
        align-items: start;
        justify-content: space-between;
        gap: 12px;
        padding-bottom: 8px;
    }

    .sidebar > .brand {
        display: none;
    }

    .sidebar-close {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 14px;
        font-size: 1.5rem;
        line-height: 1;
    }

    .sidebar nav {
        grid-auto-flow: row;
        grid-auto-columns: unset;
        overflow: visible;
        padding-bottom: 0;
        gap: 10px;
    }

    .sidebar nav a,
    .nav-dropdown {
        min-width: 0;
    }

    .sidebar-footer {
        flex-direction: column;
        align-items: start;
        gap: 10px;
    }

    .content {
        padding: 14px 16px 18px;
        gap: 16px;
    }

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

    .page-header,
    .with-actions {
        gap: 10px;
    }

    .page-header > *,
    .with-actions > * {
        min-width: 0;
        width: 100%;
    }

    .page-header h2,
    .with-actions h2 {
        font-size: 1.45rem;
    }

    .stat-card strong {
        font-size: 1.65rem;
        margin-top: 8px;
    }

    .section-head,
    .report-head,
    .report-badges,
    .filter-row,
    .action-row {
        align-items: stretch;
    }

    .filter-row,
    .action-row {
        flex-direction: column;
    }

    .inline-form,
    .inline-form button,
    .action-row > a,
    .action-row > button,
    .action-row > form,
    .filter-row > a,
    .button-link {
        width: 100%;
    }

    .stats-grid,
    .detail-grid,
    .grid-list,
    .artist-stats-grid {
        grid-template-columns: 1fr;
    }

    .artist-profile-summary,
    .release-card,
    .youtube-candidate {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .mobile-topbar {
        padding: 12px 14px;
    }

    .sidebar {
        width: min(300px, 92vw);
        padding: 16px 12px 18px;
    }

    .sidebar nav a,
    .nav-dropdown summary {
        padding: 11px 12px;
        border-radius: 12px;
        font-size: 0.95rem;
    }

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

    .content {
        padding: 12px 12px 16px;
        gap: 12px;
    }

    th,
    td {
        padding: 9px 7px;
        font-size: 0.88rem;
    }

    thead th {
        font-size: 0.7rem;
    }

    table {
        min-width: 560px;
    }

    .card pre {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .mobile-topbar-brand strong {
        font-size: 1.02rem;
    }

    .hamburger-button {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-radius: 12px;
    }

    .sidebar-footer {
        font-size: 0.9rem;
    }

    table {
        min-width: 520px;
    }
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.metadata-row {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.sidebar nav a,
.filter-row a,
.action-row > a,
.action-row > button,
.action-row > form,
.section-head h3,
.section-head h4,
.stat-card span,
.stat-card strong,
.metadata-row strong,
.metadata-row span,
.artist-stats-grid span,
.artist-stats-grid strong,
.report-meta-item,
.report-type-badge {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.report-detail-list {
    display: grid;
    gap: 14px;
}

.report-detail-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
}

.report-cover-image {
    max-width: 220px;
}

.plain-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}
