/* ── Variables ───────────────────────────────────────────────────────────── */
:root {
    /* Zinc palette */
    --bg: #18181b;
    --panel: #27272a;
    --panel2: #3f3f46;
    --line: #52525b;
    --txt: #fafafa;
    --muted: #a1a1aa;
    --dim: #71717a;
    --accent: #38bdf8;
    --accent-h: #7dd3fc;
    --good: #4ade80;
    --warm: #fb923c;
    --hot: #f87171;
    --gold: #facc15;
    --fit-hi: #4ade80;
    --fit-mid: #facc15;
    --fit-lo: #71717a;
    /* legacy aliases — existing pages continue to work unchanged */
    --c-bg: var(--bg);
    --c-surface: var(--panel);
    --c-border: var(--line);
    --c-text: var(--txt);
    --c-muted: var(--muted);
    --c-accent: var(--accent);
    --c-up: var(--good);
    --c-down: var(--hot);
    --c-p1: var(--warm);
    --c-p2: var(--gold);
    --c-nav-bg: var(--panel);
    --c-nav-text: var(--txt);
    --radius: 8px;
}

/* ── Reset ───────────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.5;
}

a {
    color: var(--c-accent);
    text-decoration: none;
}

    a:hover {
        color: var(--accent-h);
    }

    a:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
        border-radius: 2px;
    }

/* ── App layout (sidebar) ─────────────────────────────────────────────────── */
.app {
    display: flex;
    min-height: 100vh;
    background: var(--bg);
}

    .app.side-collapsed .side {
        width: 54px;
    }

    .app.side-collapsed .brand-text,
    .app.side-collapsed .nav-label,
    .app.side-collapsed .nav-section-label,
    .app.side-collapsed .side-foot,
    .app.side-collapsed .side-user-name {
        display: none;
    }

    .app.side-collapsed .nav a {
        justify-content: center;
        padding: 10px 0;
    }

    .app.side-collapsed .nav-admin-toggle {
        justify-content: center;
        padding: 10px 0;
    }

.side {
    width: 212px;
    flex-shrink: 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: width 0.2s;
    z-index: 10;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--txt);
    white-space: nowrap;
}

.brand-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    flex-shrink: 0;
    box-shadow: 0 0 8px var(--accent);
}

.brand-text {
    flex: 1;
    overflow: hidden;
}

.side-collapse-btn {
    margin: 4px 10px 6px;
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--dim);
    font-size: 0.8rem;
    padding: 4px 8px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    align-self: flex-start;
}

    .side-collapse-btn:hover {
        color: var(--txt);
        border-color: var(--muted);
    }

.side-foot {
    margin-top: auto;
    padding: 10px 14px 14px;
    font-size: 0.72rem;
    color: var(--dim);
    white-space: nowrap;
}

.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 9;
    background: rgba(24,24,27,.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 22px;
    gap: 1rem;
}

.topbar-titles {
    min-width: 0;
    flex-shrink: 1;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--txt);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-sub {
    font-size: 0.75rem;
    color: var(--muted);
    margin-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640px) {
    .edition-badge {
        display: none;
    }
}

.edition-badge {
    font-size: 12px;
    color: var(--muted);
    border: 1px solid var(--line);
    padding: 6px 11px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .edition-badge b {
        color: var(--accent);
    }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.topbar-user-name {
    font-size: 0.75rem;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.topbar-signout {
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 7px;
    line-height: 1;
    transition: color 0.15s, border-color 0.15s;
}

    .topbar-signout:hover {
        color: var(--txt);
        border-color: var(--muted);
    }

@media (max-width: 640px) {
    .topbar-user-name {
        display: none;
    }
}

.content {
    padding: 18px 22px 90px;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    overflow-x: hidden;
}

/* ── Sidebar nav ──────────────────────────────────────────────────────────── */
.nav {
    padding: 6px 8px;
    flex: 1;
    overflow-y: auto;
}

    .nav a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 11px;
        border-radius: 8px;
        color: var(--muted);
        font-weight: 500;
        font-size: 0.875rem;
        text-decoration: none;
        transition: background 0.12s, color 0.12s;
        white-space: nowrap;
        overflow: hidden;
    }

        .nav a:hover {
            background: var(--panel2);
            color: var(--txt);
        }

        .nav a.active {
            background: rgba(56,189,248,.12);
            color: var(--accent);
            font-weight: 600;
        }

    .nav .ic {
        font-size: 1rem;
        flex-shrink: 0;
        font-style: normal;
        width: 20px;
        text-align: center;
    }

.nav-label {
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-sep {
    height: 1px;
    background: var(--line);
    margin: 8px 4px;
}

.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dim);
    padding: 6px 12px 4px;
}

.nav-admin-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 500;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    overflow: hidden;
    font-family: inherit;
}

    .nav-admin-toggle:hover {
        background: var(--panel2);
        color: var(--txt);
    }

.nav-arrow {
    font-size: 0.68rem;
    opacity: 0.55;
    margin-left: 4px;
}

.nav-submenu {
    display: flex;
    flex-direction: column;
}

    .nav-submenu a {
        padding-left: 22px !important;
        font-size: 0.84rem !important;
    }

/* ── Sidebar user strip ───────────────────────────────────────────────────── */
.side-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-top: 1px solid var(--line);
    white-space: nowrap;
}

.side-user-name {
    font-size: 0.75rem;
    color: var(--muted);
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
}

.side-signout {
    background: none;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 7px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s, border-color 0.15s;
}

    .side-signout:hover {
        color: var(--txt);
        border-color: var(--muted);
    }

/* ── Mobile bottom nav ────────────────────────────────────────────────────── */
.botnav {
    display: none;
}

@media (max-width: 860px) {
    .side {
        display: none;
    }

    .grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .span8, .span6, .span4, .span3 {
        grid-column: span 6;
    }

    .botnav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--panel);
        border-top: 1px solid var(--line);
        z-index: 20;
        padding: 0;
    }

        .botnav a {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 3px;
            padding: 8px 4px;
            color: var(--dim);
            font-size: 0.68rem;
            text-decoration: none;
            transition: color 0.12s;
        }

            .botnav a.active {
                color: var(--accent);
            }

        .botnav .ic {
            font-size: 1.1rem;
            font-style: normal;
        }

    .side.mobile-open {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 101;
        animation: slide-in-left 0.2s ease;
    }

    .content {
        padding: 14px 12px 84px;
    }
}

.mobile-sidebar-backdrop {
    display: none;
}

@media (max-width: 860px) {
    .mobile-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        z-index: 100;
    }
}

.botnav-menu-btn {
    display: none;
}

@media (max-width: 860px) {
    .botnav-menu-btn {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        padding: 8px 4px;
        color: var(--dim);
        font-size: 0.68rem;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
        transition: color 0.12s;
    }

        .botnav-menu-btn.active,
        .botnav-menu-btn:hover {
            color: var(--accent);
        }
}

@keyframes slide-in-left {
    from { transform: translateX(-100%); }
    to   { transform: translateX(0); }
}

/* ── Admin pages ─────────────────────────────────────────────────────────── */
.admin-form-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.admin-form-panel--inline {
    margin: 0.5rem 0 0.75rem;
    box-shadow: none;
    background: var(--c-bg);
}

.admin-form-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--c-border);
}

/* ── Page header ─────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

    .page-header > * {
        min-width: 0;
    }

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.page-subtitle {
    display: block;
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-top: 0.2rem;
}

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 600px) {
    .toolbar {
        flex-basis: 100%;
    }
}

.search-input,
.sort-select {
    height: 34px;
    padding: 0 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.875rem;
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
}

    .search-input:focus,
    .sort-select:focus {
        border-color: var(--c-accent);
    }

.search-input {
    min-width: 200px;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
    color: var(--c-muted);
    cursor: pointer;
    user-select: none;
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--c-surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

    .data-table thead th {
        background: var(--c-surface);
        border-bottom: 2px solid var(--c-border);
        padding: 0.5rem 0.9rem;
        text-align: left;
        font-size: 0.72rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: var(--c-muted);
        white-space: nowrap;
    }

    .data-table tbody tr {
        border-bottom: 1px solid var(--c-border);
    }

        .data-table tbody tr:last-child {
            border-bottom: none;
        }

        .data-table tbody tr:hover {
            background: var(--panel2);
        }

    .data-table td {
        padding: 0.4rem 0.9rem;
        vertical-align: middle;
    }

.num-col {
    text-align: right;
    font-variant-numeric: tabular-nums;
    text-align: center !important;
}

.center-col {
    text-align: center;
}

/* ── Artist name & tags ──────────────────────────────────────────────────── */
.artist-name {
    font-weight: 500;
    color: inherit;
}

    .artist-name:hover {
        color: var(--c-text);
        text-decoration: underline;
    }

.tag {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.1rem 0.5rem;
    background: rgba(56,189,248,.14);
    color: #38bdf8;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* ── Delta indicators ────────────────────────────────────────────────────── */
.delta-up {
    color: var(--c-up);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

.delta-down {
    color: var(--c-down);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

.delta-flat {
    color: var(--c-muted);
    font-size: 0.78rem;
    margin-left: 0.3rem;
}

.muted {
    color: var(--c-muted);
}

/* ── Signal badges (table) ───────────────────────────────────────────────── */
.signal-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.55rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}

    .signal-badge.priority-1 {
        background: rgba(240,163,94,.18);
        color: var(--warm);
        border: 1px solid rgba(240,163,94,.35);
    }

    .signal-badge.priority-2 {
        background: rgba(227,179,65,.14);
        color: var(--gold);
        border: 1px solid rgba(227,179,65,.30);
    }

    .signal-badge.priority-3 {
        background: var(--panel2);
        color: var(--muted);
        border: 1px solid var(--line);
    }

/* ── Signal cards ────────────────────────────────────────────────────────── */
.signal-group {
    margin-bottom: 2.5rem;
}

.signal-group-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 0.5rem;
    margin-bottom: 0.9rem;
    border-bottom: 2px solid var(--c-border);
    color: var(--c-muted);
}

    .signal-group-header.priority-1 {
        color: var(--c-p1);
        border-color: var(--c-p1);
    }

    .signal-group-header.priority-2 {
        color: var(--c-p2);
        border-color: #f1c21b;
    }

.signal-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 0.65rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: opacity 0.2s;
}

    .signal-card.actioned {
        opacity: 0.45;
    }

.signal-card-header {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    margin-bottom: 0.35rem;
}

.signal-artist {
    font-weight: 700;
    font-size: 0.95rem;
}

.signal-type {
    font-size: 0.78rem;
    color: var(--c-muted);
    background: var(--c-bg);
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
}

.signal-score {
    margin-left: auto;
    font-size: 0.78rem;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

.signal-detail {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-bottom: 0.75rem;
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-card-footer {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.signal-date {
    font-size: 0.78rem;
    color: var(--c-muted);
}

.btn-actioned {
    padding: 0.25rem 0.75rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.78rem;
    cursor: pointer;
    color: var(--c-text);
    transition: background 0.15s;
}

    .btn-actioned:hover {
        background: var(--c-bg);
    }

.actioned-label {
    font-size: 0.78rem;
    color: var(--c-accent);
}

/* ── Add Artist button ───────────────────────────────────────────────────── */
.btn-add {
    height: 34px;
    padding: 0 0.9rem;
    background: var(--c-accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    white-space: nowrap;
}

    .btn-add:hover {
        opacity: 0.85;
    }

.btn-add--open {
    background: transparent;
    border: 1px solid var(--c-border);
    color: var(--c-muted);
}

    .btn-add--open:hover {
        background: var(--c-bg);
        opacity: 1;
    }

/* ── Spotify search panel ────────────────────────────────────────────────── */
.search-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.search-panel-input {
    width: 100%;
    min-width: 0;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.search-hint {
    font-size: 0.85rem;
    color: var(--c-muted);
    padding: 0.25rem 0;
}

.artist-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.artist-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--c-border);
}

    .artist-result:last-child {
        border-bottom: none;
    }

.artist-result-info {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    min-width: 0;
}

.artist-result-name {
    font-weight: 500;
    white-space: nowrap;
}

.artist-result-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--c-muted);
}

.pop-pill {
    display: inline-block;
    padding: 0.05rem 0.45rem;
    background: var(--c-bg);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

.btn-track {
    padding: 0.25rem 0.75rem;
    background: var(--c-accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.15s;
    flex-shrink: 0;
}

    .btn-track:hover {
        opacity: 0.85;
    }

.tracking-check {
    font-size: 0.8rem;
    color: var(--c-accent);
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── Remove (untrack) button ─────────────────────────────────────────────── */
.action-col {
    width: 36px;
    text-align: center;
}

.btn-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--c-muted);
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s, color 0.15s;
}

tr:hover .btn-remove {
    opacity: 1;
}

.btn-remove:hover {
    background: rgba(248,113,113,.12);
    border-color: var(--c-down);
    color: var(--c-down);
}

.btn-remove--active {
    opacity: 1;
    background: var(--c-bg);
    border-color: var(--c-border);
    color: var(--c-text);
}

/* ── States ──────────────────────────────────────────────────────────────── */
.loading, .empty-state {
    padding: 4rem 2rem;
    text-align: center;
    color: var(--c-muted);
    font-size: 0.9rem;
}

.spotify-error {
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    background: rgba(250,204,21,.12);
    border: 1px solid rgba(250,204,21,.30);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #facc15;
}

.mf-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    background: rgba(74,222,128,.14);
    border: 1px solid rgba(74,222,128,.25);
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    color: #4ade80;
    white-space: nowrap;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb {
    font-size: 0.8rem;
    color: var(--c-muted);
    margin-bottom: 0.25rem;
}

    .breadcrumb a {
        color: var(--c-muted);
    }

        .breadcrumb a:hover {
            color: var(--c-text);
        }

/* ── Festival editions grid ──────────────────────────────────────────────── */
.edition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.edition-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow 0.15s, transform 0.12s;
}

    .edition-card:hover {
        box-shadow: 0 4px 14px rgba(0,0,0,0.1);
        transform: translateY(-2px);
    }

.edition-year {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--c-text);
    margin-bottom: 0.35rem;
}

.edition-dates {
    font-size: 0.82rem;
    color: var(--c-muted);
    margin-bottom: 0.75rem;
}

.edition-status {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.edition-status--planning {
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

.edition-status--announced {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.edition-status--historic {
    background: rgba(113,113,122,.12);
    color: var(--dim);
}

.edition-status--draft {
    background: rgba(113,113,122,.10);
    color: var(--dim);
}

.edition-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.edition-stat {
    font-size: 0.78rem;
    color: var(--c-muted);
}

    .edition-stat strong {
        color: var(--c-text);
        font-weight: 600;
    }

/* ── View tabs ───────────────────────────────────────────────────────────── */
.view-tabs {
    display: flex;
    gap: 0.1rem;
    border-bottom: 2px solid var(--c-border);
    margin-bottom: 1.25rem;
}

.view-tab {
    padding: 0.5rem 1.1rem;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--c-muted);
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: color 0.12s;
    font-family: inherit;
}

    .view-tab:hover {
        color: var(--c-text);
    }

    .view-tab.active {
        color: var(--c-text);
        font-weight: 600;
        border-bottom-color: var(--c-text);
    }

/* ── Quick-add bar ───────────────────────────────────────────────────────── */
.quick-add-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.quick-add-input {
    flex: 1;
    min-width: 200px;
}

.artist-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    margin-top: 2px;
    overflow: hidden;
}

.artist-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
}

    .artist-suggestion-item:hover {
        background: var(--c-bg);
    }

.suggestion-tracked {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    border: 1px solid var(--c-border);
    border-radius: 100px;
    padding: 0.05rem 0.4rem;
}

/* ── Pipeline board ──────────────────────────────────────────────────────── */
.pipeline-layout {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
}

.pipeline-board-wrap {
    flex: 1;
    overflow-x: auto;
    min-width: 0;
    padding-bottom: 0.5rem;
}

.pipeline-board {
    display: flex;
    gap: 0.65rem;
    min-width: max-content;
}

.kanban-col {
    width: 195px;
    flex-shrink: 0;
    background: var(--c-bg);
    border-radius: var(--radius);
    padding: 0.75rem;
    transition: outline 0.1s;
}

.kanban-col--drag-over {
    outline: 2px dashed var(--c-muted);
    outline-offset: -3px;
    background: var(--c-surface);
}

.kanban-col-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 0.65rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.kanban-col-count {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 100px;
    padding: 0.05rem 0.45rem;
    font-size: 0.7rem;
}

.kanban-col-empty {
    font-size: 0.78rem;
    color: var(--c-muted);
    text-align: center;
    padding: 0.75rem 0;
    opacity: 0.5;
}

/* ── Kanban cards ────────────────────────────────────────────────────────── */
.kanban-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.45rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    cursor: grab;
    user-select: none;
}

    .kanban-card:active {
        cursor: grabbing;
    }

.kanban-card--expanded {
    border-color: var(--c-accent);
}

.kanban-card-name {
    font-weight: 600;
    font-size: 0.875rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.25rem;
    margin-bottom: 0.3rem;
}

.btn-expand {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--c-muted);
    font-size: 0.65rem;
    padding: 0;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

    .btn-expand:hover {
        color: var(--c-text);
    }

.kanban-card-meta {
    font-size: 0.75rem;
    color: var(--c-muted);
    margin-bottom: 0.2rem;
}

.kanban-signal-badge {
    display: inline-block;
    font-size: 0.7rem;
    color: var(--c-p1);
    background: rgba(251,146,60,.14);
    padding: 0.05rem 0.35rem;
    border-radius: 4px;
    margin-bottom: 0.3rem;
}

.kanban-card-actions {
    display: flex;
    gap: 0.3rem;
    margin-top: 0.5rem;
}

.btn-move {
    padding: 0.15rem 0.5rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

    .btn-move:hover {
        background: var(--c-accent);
        border-color: var(--c-accent);
        color: #000;
    }

/* ── Card inline edit ────────────────────────────────────────────────────── */
.card-edit-form {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.card-edit-archive {
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--c-border);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: var(--c-muted);
}

.btn-archive-decline,
.btn-archive-cancel {
    padding: 0.15rem 0.5rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: color 0.12s, border-color 0.12s;
}

    .btn-archive-decline:hover {
        color: var(--c-down);
        border-color: var(--c-down);
    }

    .btn-archive-cancel:hover {
        color: var(--c-down);
        border-color: var(--c-down);
    }

.btn-remove-entry {
    margin-left: auto;
    padding: 0.15rem 0.5rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.72rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: color 0.12s;
}

    .btn-remove-entry:hover {
        color: var(--c-down);
    }

/* ── Signal side panel ───────────────────────────────────────────────────── */
.signal-panel {
    width: 255px;
    flex-shrink: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    position: sticky;
    top: 1rem;
}

.signal-panel-header {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--c-border);
}

.panel-signal-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--c-border);
}

    .panel-signal-row:last-child {
        border-bottom: none;
    }

.panel-signal-artist {
    font-weight: 600;
    font-size: 0.83rem;
}

.panel-signal-type {
    font-size: 0.72rem;
    color: var(--c-muted);
}

.panel-signal-score {
    font-size: 0.7rem;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

.btn-add-to-pipeline {
    margin-top: 0.25rem;
    padding: 0.18rem 0.6rem;
    background: var(--c-accent);
    color: #000;
    border: none;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.12s;
    align-self: flex-start;
}

    .btn-add-to-pipeline:hover {
        opacity: 0.85;
    }

.btn-already-in-pipeline {
    margin-top: 0.25rem;
    padding: 0.18rem 0.6rem;
    background: transparent;
    color: var(--c-accent);
    border: 1px solid var(--c-accent);
    border-radius: 4px;
    font-size: 0.7rem;
    align-self: flex-start;
    cursor: default;
}

/* ── Archive section ─────────────────────────────────────────────────────── */
.archive-section {
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--c-border);
}

.archive-toggle {
    background: transparent;
    border: none;
    font-size: 0.8rem;
    color: var(--c-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0;
    margin-bottom: 0.75rem;
    font-family: inherit;
}

    .archive-toggle:hover {
        color: var(--c-text);
    }

/* ── Booking status pills ────────────────────────────────────────────────── */
.status-pill {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-onradar {
    background: rgba(161,161,170,.12);
    color: #a1a1aa;
}

.status-interested {
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

.status-reachingout {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

.status-offersent {
    background: rgba(248,113,113,.14);
    color: #f87171;
}

.status-negotiating {
    background: rgba(250,204,21,.14);
    color: #facc15;
}

.status-confirmed {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.status-declined {
    background: rgba(113,113,122,.12);
    color: #71717a;
}

.status-cancelled {
    background: rgba(113,113,122,.12);
    color: #71717a;
}

.status-performed {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

/* ── Lineup grid ─────────────────────────────────────────────────────────── */
.lineup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
}

.lineup-artist-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}

.lineup-artist-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
}

.lineup-artist-meta {
    font-size: 0.78rem;
    color: var(--c-muted);
    margin-bottom: 0.15rem;
}

/* ── Form panel ──────────────────────────────────────────────────────────── */
.form-panel {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 130px;
}

.form-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
}

.form-input,
.form-select {
    height: 34px;
    padding: 0 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.875rem;
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
}

.form-textarea {
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.875rem;
    color: var(--c-text);
    outline: none;
    transition: border-color 0.15s;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
}

    .form-input:focus,
    .form-select:focus,
    .form-textarea:focus {
        border-color: var(--c-accent);
    }

.form-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
}

.btn-primary {
    height: 34px;
    padding: 0 1rem;
    background: var(--c-accent);
    color: #000;
    border: none;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.15s;
    font-family: inherit;
}

    .btn-primary:hover {
        opacity: 0.85;
    }

.btn-secondary {
    height: 34px;
    padding: 0 0.9rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: background 0.15s;
    font-family: inherit;
}

    .btn-secondary:hover {
        background: var(--c-bg);
    }

/* ── Anchor styled as secondary button ───────────────────────────────────── */
a.btn-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Artist detail — header ──────────────────────────────────────────────── */
.artist-header-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
}

.artist-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--c-accent);
    color: #000;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.artist-pills-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}

.status-active {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.status-inactive {
    background: rgba(113,113,122,.12);
    color: #71717a;
}

.status-untracked {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

/* ── Inactive banner ─────────────────────────────────────────────────────── */
.inactive-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.65rem 1rem;
    margin-bottom: 1.25rem;
    background: rgba(251,146,60,.10);
    border: 1px solid rgba(251,146,60,.30);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #fb923c;
}

/* ── Artist detail — two-column layout ───────────────────────────────────── */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 500px;
    gap: 1.5rem;
    align-items: start;
    min-width: 0;
}

.detail-left {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-right {
    grid-column: 2;
    grid-row: 1 / 3;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.detail-bottom-grid {
    grid-column: 1;
    grid-row: 2;
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
}

@media (max-width: 1300px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1fr) 420px;
    }
}

@media (max-width: 1100px) {
    .detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .detail-right {
        grid-column: 1;
        grid-row: 2;
    }

    .detail-bottom-grid {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .detail-bottom-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* ── Widget card ─────────────────────────────────────────────────────────── */
.widget {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid var(--c-border);
}

.widget-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
}

/* ── Metrics widget ──────────────────────────────────────────────────────── */
.metric-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
}

.metric-card {
    background: var(--c-bg);
    border-radius: var(--radius);
    padding: 0.7rem 0.85rem;
}

.metric-label {
    font-size: 0.67rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    margin-bottom: 0.3rem;
}

.metric-value {
    font-size: 1.1rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1.25;
}

/* ── Releases widget ─────────────────────────────────────────────────────── */
.releases-filter {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.releases-filter-btn {
    padding: 0.2rem 0.65rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: 100px;
    font-size: 0.75rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    font-family: inherit;
}

    .releases-filter-btn:hover {
        border-color: var(--c-text);
        color: var(--c-text);
    }

    .releases-filter-btn.active {
        background: var(--c-text);
        border-color: var(--c-text);
        color: #fff;
    }

.releases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.65rem;
}

.release-card {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
}

.release-card--upcoming {
    border-color: var(--accent);
    background: rgba(29, 185, 84, 0.08);
}

.release-card-title {
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    line-height: 1.3;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.release-card-type {
    font-size: 0.67rem;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.release-card-date {
    font-size: 0.72rem;
    color: var(--c-muted);
    margin-top: 0.15rem;
}

.release-upcoming-badge {
    display: inline-block;
    margin-top: 0.3rem;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #1a73e8;
    color: #fff;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
}

/* ── External sources widget ─────────────────────────────────────────────── */

.ex-row {
    border-bottom: 1px solid var(--c-border);
    padding: 0.55rem 0;
}

    .ex-row:last-child {
        border-bottom: none;
    }

.ex-row-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ex-row-label {
    width: 7rem;
    font-size: 0.83rem;
    font-weight: 600;
}

.ex-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    white-space: nowrap;
}

.ex-badge--unlinked {
    background: var(--c-bg);
    color: var(--c-muted);
    border: 1px solid var(--c-border);
}

.ex-badge--unverified {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

.ex-badge--needsreview {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

.ex-badge--verified {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.ex-row-data {
    flex: 1;
    font-size: 0.76rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ex-row-btns {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
}

.ex-row-warning {
    font-size: 0.75rem;
    color: var(--warm);
    background: rgba(255, 152, 0, 0.12);
    border-radius: var(--radius);
    padding: 0.25rem 0.6rem;
    margin-top: 0.3rem;
}

/* Small action buttons */
.btn-sm {
    font-size: 0.74rem;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius);
    border: 1px solid var(--c-accent);
    background: var(--c-accent);
    color: #fff;
    cursor: pointer;
    line-height: 1.4;
    white-space: nowrap;
    font-weight: 500;
}

    .btn-sm:hover:not(:disabled) {
        opacity: 0.88;
    }

    .btn-sm:disabled {
        opacity: 0.45;
        cursor: default;
    }

.btn-sm--ghost {
    background: transparent;
    color: var(--c-accent);
}

    .btn-sm--ghost:hover:not(:disabled) {
        background: var(--c-bg);
    }

.btn-sm--danger {
    background: transparent;
    border-color: var(--hot);
    color: var(--hot);
}

    .btn-sm--danger:hover:not(:disabled) {
        background: rgba(248,113,113,.12);
    }

.btn-sm--success {
    background: rgba(74,222,128,.14);
    border-color: rgba(74,222,128,.35);
    color: #4ade80;
}

/* Inline panel */
.ex-panel {
    margin-top: 0.55rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.75rem;
}

.ex-panel-error {
    background: rgba(248,113,113,.12);
    color: #f87171;
    font-size: 0.78rem;
    padding: 0.3rem 0.55rem;
    border-radius: var(--radius);
    margin-bottom: 0.55rem;
}

.ex-panel-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.6rem;
}

.ex-tab {
    padding: 0.2rem 0.65rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: 0.77rem;
    cursor: pointer;
}

    .ex-tab.active {
        background: var(--c-accent);
        border-color: var(--c-accent);
        color: #fff;
        font-weight: 600;
    }

.ex-panel-row {
    display: flex;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.ex-panel-input {
    flex: 1;
    min-width: 0;
    font-size: 0.82rem !important;
    padding: 0.3rem 0.6rem !important;
}

.ex-panel-close {
    margin-top: 0.5rem;
}

/* Results list */
.ex-results {
    list-style: none;
    padding: 0;
    margin: 0 0 0.4rem;
    max-height: 13rem;
    overflow-y: auto;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
}

.ex-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.82rem;
}

    .ex-result-item:last-child {
        border-bottom: none;
    }

.ex-result-item--sel {
    background: rgba(74,222,128,.10);
}

.ex-result-info {
    flex: 1;
    min-width: 0;
}

/* Confirm card */
.ex-confirm-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: var(--c-surface);
    border: 1px solid var(--c-accent);
    border-radius: var(--radius);
    padding: 0.5rem 0.75rem;
    margin-top: 0.4rem;
}

.ex-confirm-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    font-size: 0.82rem;
    min-width: 0;
}

.ex-confirm-actions {
    display: flex;
    gap: 0.3rem;
    flex-shrink: 0;
}

/* ── Edit page ───────────────────────────────────────────────────────────── */

.edit-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 860px;
}

.edit-section {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}

.edit-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.edit-section-title {
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--c-muted);
}

/* Alert banners */
.edit-alert {
    border-radius: var(--radius);
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.edit-alert--error {
    background: rgba(248,113,113,.12);
    color: #f87171;
    border: 1px solid rgba(248,113,113,.25);
}

.edit-alert--danger {
    background: rgba(251,146,60,.12);
    border: 1px solid rgba(251,146,60,.25);
    color: #fb923c;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.edit-alert-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

/* Form layout */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem 1.25rem;
}

.form-grid--compact {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-group--checkbox {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
}

.form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-muted);
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
}

.form-required {
    color: #c0392b;
}

.form-hint {
    font-weight: 400;
    font-size: 0.73rem;
    color: var(--c-muted);
}

.form-hint--private {
    background: rgba(251,146,60,.14);
    color: #fb923c;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-text);
    font-size: 0.875rem;
    line-height: 1.4;
    font-family: inherit;
    width: 100%;
}

    .form-control:focus {
        outline: none;
        border-color: var(--c-accent);
        box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.15);
    }

textarea.form-control {
    resize: vertical;
}

select.form-control {
    cursor: pointer;
}

.tag-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.2rem;
}

.form-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.75rem;
}

/* Contacts */
.contact-group {
    margin-bottom: 1.25rem;
}

    .contact-group:last-child {
        margin-bottom: 0;
    }

.contact-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.contact-group-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.5rem;
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--c-bg);
    border-radius: var(--radius);
    padding: 0.45rem 0.65rem;
    font-size: 0.83rem;
}

.contact-row--confirm {
    background: rgba(251,146,60,.12);
    border: 1px solid rgba(251,146,60,.25);
    color: #fb923c;
    justify-content: space-between;
}

.contact-row-name {
    font-weight: 600;
    min-width: 7rem;
}

.contact-row-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    flex: 1;
    font-size: 0.78rem;
    color: var(--c-muted);
}

    .contact-row-meta a {
        color: var(--c-accent);
        text-decoration: none;
    }

        .contact-row-meta a:hover {
            text-decoration: underline;
        }

.contact-row-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}

.primary-star {
    color: var(--c-accent);
    font-size: 0.85rem;
}

.dos-badge {
    display: inline-block;
    background: var(--c-p1);
    color: #1a1206;
    border-radius: 3px;
    padding: 0.05rem 0.4rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-left: 0.4rem;
    vertical-align: middle;
}

.contact-form {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.85rem;
}

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.history-entry {
    background: var(--c-bg);
    border-radius: var(--radius);
    padding: 0.6rem 0.85rem;
    font-size: 0.83rem;
}

.history-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.6rem;
    margin-bottom: 0.2rem;
}

.history-subject {
    font-weight: 600;
    flex: 1;
}

.htype-badge, .hdir-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.htype-note {
    background: rgba(161,161,170,.12);
    color: #a1a1aa;
}

.htype-email {
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

.htype-call {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.htype-meeting {
    background: rgba(250,204,21,.14);
    color: #facc15;
}

.htype-offer {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

.htype-contract {
    background: rgba(167,139,250,.14);
    color: #c4b5fd;
}

.hdir-internal {
    background: rgba(161,161,170,.12);
    color: #a1a1aa;
}

.hdir-inbound {
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

.hdir-outbound {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.history-body {
    white-space: pre-wrap;
    font-size: 0.8rem;
    color: var(--c-muted);
    line-height: 1.5;
    margin: 0.3rem 0 0.2rem;
}

.history-body--collapsed {
    max-height: 2.8rem;
    overflow: hidden;
}

.history-expand {
    font-size: 0.72rem !important;
    padding: 0.1rem 0.35rem !important;
    margin-bottom: 0.2rem;
}

.history-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.3rem;
    font-size: 0.73rem;
}

/* Similar artists */
.similar-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.similar-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--c-bg);
    border-radius: var(--radius);
    padding: 0.4rem 0.65rem;
}

.similar-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--c-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.similar-info {
    flex: 1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem;
    font-size: 0.85rem;
}

/* Edit page footer */
.edit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 0.5rem;
    border-top: 1px solid var(--c-border);
    margin-top: 0.5rem;
}

.edit-footer-right {
    display: flex;
    gap: 0.5rem;
}

.btn-stop-tracking {
    background: none;
    border: none;
    color: #c0392b;
    font-size: 0.83rem;
    cursor: pointer;
    padding: 0.2rem 0;
    text-decoration: underline;
    text-decoration-style: dotted;
}

    .btn-stop-tracking:hover:not(:disabled) {
        color: #922b21;
    }

    .btn-stop-tracking:disabled {
        color: var(--c-muted);
        cursor: default;
        text-decoration: none;
    }

/* ── Source dots (artist list quick-link) ────────────────────────────────── */
.sources-col {
    width: 118px;
    text-align: center;
    white-space: nowrap;
}

.src-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 17px;
    border-radius: 3px;
    border: 1px solid transparent;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    cursor: pointer;
    line-height: 1;
    transition: transform 0.1s, opacity 0.1s, box-shadow 0.1s;
    margin: 0 1px;
}

.src-dot--unlinked {
    background: var(--c-bg);
    border-color: var(--c-border);
    color: var(--c-muted);
    opacity: 0.4;
}

.src-dot--unverified {
    background: rgba(251,146,60,.14);
    border-color: rgba(251,146,60,.30);
    color: #fb923c;
}

.src-dot--verified {
    background: rgba(74,222,128,.14);
    border-color: rgba(74,222,128,.30);
    color: #4ade80;
}

.src-dot:hover {
    opacity: 1;
    transform: scale(1.2);
}

.src-dot--active {
    opacity: 1;
    transform: scale(1.15);
    box-shadow: 0 0 0 2px var(--c-accent);
}

/* Link popover row */
.link-popover-row > td {
    padding: 0 !important;
    background: var(--panel2);
    border-bottom: 2px solid var(--c-accent) !important;
}

.link-popover {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.55rem 1rem 0.65rem;
}

.link-popover-top {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.link-popover-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-muted);
    white-space: nowrap;
    margin-right: 0.35rem;
}

.link-tab {
    padding: 0.15rem 0.6rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    color: var(--c-muted);
    font-size: 0.75rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

    .link-tab:hover {
        border-color: var(--c-text);
        color: var(--c-text);
    }

    .link-tab.active {
        background: var(--c-accent);
        border-color: var(--c-accent);
        color: #fff;
        font-weight: 600;
    }

.link-popover-close {
    margin-left: auto;
    font-size: 1rem;
    line-height: 1;
    padding: 0.1rem 0.45rem !important;
}

.link-popover-input-row {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.link-popover-input {
    flex: 1;
    min-width: 180px;
    max-width: 420px;
    height: 28px !important;
    padding: 0 0.6rem !important;
    font-size: 0.82rem !important;
}

.link-popover-error {
    font-size: 0.75rem;
    color: #f87171;
    background: rgba(248,113,113,.12);
    border-radius: var(--radius);
    padding: 0.2rem 0.55rem;
}

.link-results {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 11rem;
    overflow-y: auto;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
}

.link-result-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.6rem;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.82rem;
}

    .link-result-item:last-child {
        border-bottom: none;
    }

    .link-result-item:hover {
        background: var(--panel2);
    }

.link-result-name {
    flex: 1;
    font-weight: 500;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.link-result-select {
    flex-shrink: 0;
}

.link-popover-confirm-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.link-popover-confirm {
    font-size: 0.82rem;
    font-weight: 600;
    background: var(--c-surface);
    border: 1px solid var(--c-accent);
    border-radius: var(--radius);
    padding: 0.15rem 0.65rem;
    white-space: nowrap;
}

/* ── Context menu section (inside link-popover) ─────────────────────────── */
.context-menu-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding: 0.35rem 0;
}

.context-menu-section-label {
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--c-muted);
    white-space: nowrap;
    margin-right: 0.25rem;
}

/* ── Metric charts ───────────────────────────────────────────────────────── */
.chart-section {
    margin-top: 1.1rem;
    border-top: 1px solid var(--c-border);
    padding-top: 0.85rem;
}

.chart-metric-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 2px solid var(--c-border);
    margin-bottom: 0.65rem;
}

.chart-metric-tab {
    padding: 0.35rem 0.85rem;
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--c-muted);
    font-family: inherit;
    margin-bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: color 0.12s;
}

    .chart-metric-tab:hover {
        color: var(--c-text);
    }

    .chart-metric-tab.active {
        color: var(--c-text);
        font-weight: 700;
        border-bottom-color: var(--c-accent);
    }

.chart-section-controls {
    display: flex;
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}

.chart-range-btn {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: transparent;
    color: var(--c-muted);
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

    .chart-range-btn:hover {
        background: var(--c-bg);
        color: var(--c-text);
        border-color: var(--c-accent);
    }

    .chart-range-btn.active {
        background: var(--c-accent);
        color: #fff;
        border-color: var(--c-accent);
    }

.chart-wrap {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem 0.55rem;
}

.chart-canvas-wrap {
    position: relative;
    height: 220px;
}

@media (max-width: 900px) {
    .chart-canvas-wrap {
        height: 190px;
    }
}

@media (max-width: 480px) {
    .chart-canvas-wrap {
        height: 160px;
    }
}

/* ── Filter bar ──────────────────────────────────────────────────────────── */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.75rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.filter-label {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    white-space: nowrap;
    margin-right: 0.15rem;
}

.filter-sep {
    width: 1px;
    height: 20px;
    background: var(--c-border);
    flex-shrink: 0;
}

/* Source filter cycle buttons */
.src-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.18rem 0.45rem;
    border-radius: 3px;
    border: 1px solid var(--c-border);
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
    white-space: nowrap;
    font-family: inherit;
    line-height: 1;
}

.src-filter--any {
    background: var(--c-bg);
    color: var(--c-muted);
    opacity: 0.65;
}

.src-filter--unset {
    background: rgba(248,113,113,.14);
    border-color: rgba(248,113,113,.30);
    color: #f87171;
    opacity: 1;
}

.src-filter--set {
    background: rgba(251,146,60,.14);
    border-color: rgba(251,146,60,.30);
    color: #fb923c;
    opacity: 1;
}

.src-filter--verified {
    background: rgba(74,222,128,.14);
    border-color: rgba(74,222,128,.30);
    color: #4ade80;
    opacity: 1;
}

.src-filter:hover {
    transform: scale(1.08);
    box-shadow: 0 0 0 1px var(--c-accent);
    opacity: 1;
}

.src-filter-state {
    font-size: 0.58rem;
    font-weight: 600;
    opacity: 0.85;
    text-transform: lowercase;
}

/* Signal filter controls */
.filter-select {
    height: 26px;
    padding: 0 0.45rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.78rem;
    color: var(--c-text);
    cursor: pointer;
    font-family: inherit;
    outline: none;
}

    .filter-select:focus {
        border-color: var(--c-accent);
    }

.filter-check {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.78rem;
    color: var(--c-muted);
    cursor: pointer;
    white-space: nowrap;
    user-select: none;
}

    .filter-check input[type="checkbox"] {
        cursor: pointer;
    }

.filter-clear {
    margin-left: auto;
    background: transparent;
    border: none;
    font-size: 0.75rem;
    color: var(--c-accent);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    padding: 0;
    font-family: inherit;
}

    .filter-clear:hover {
        color: var(--c-text);
        text-decoration-style: solid;
    }

/* ── Sortable column headers ─────────────────────────────────────────────── */
.sort-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    font-weight: 600;
    color: inherit;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.15em;
}

    .sort-btn:hover {
        color: var(--c-accent);
    }

.sort-indicator {
    font-size: 0.75em;
    color: var(--c-accent);
    font-weight: 700;
}

/* ── Upcoming shows badge (artist list) ─────────────────────────────────── */
.shows-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

/* ── Tracking status pill (artist list) ──────────────────────────────────── */
.track-pill {
    display: inline-block;
    margin-left: 0.4rem;
    padding: 0.05rem 0.4rem;
    border-radius: 100px;
    font-size: 0.65rem;
    font-weight: 600;
    vertical-align: middle;
    letter-spacing: 0.01em;
}

.track-pill--tracking {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.track-pill--untracked {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

/* ── Secondary button active state ──────────────────────────────────────── */
.btn-secondary--active {
    background: rgba(248,113,113,.14);
    border-color: var(--c-down);
    color: var(--c-down);
}

/* ── Festival discovery — row states ─────────────────────────────────────── */
.row-cancelled td {
    opacity: 0.5;
}

.row-excluded td {
    opacity: 0.35;
    text-decoration: line-through;
    text-decoration-color: var(--c-border);
}

/* ── Artist detail — shows widget ───────────────────────────────────────── */
.show-row {
    padding: 0.45rem 0;
    border-bottom: 1px solid var(--c-border);
}

    .show-row:last-child {
        border-bottom: none;
    }

.show-row--past {
    opacity: 0.55;
}

.show-date {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--c-muted);
    margin-bottom: 0.05rem;
}

.show-venue {
    font-size: 0.83rem;
    font-weight: 500;
    overflow-wrap: break-word;
    margin-bottom: 0.05rem;
}

.show-location {
    font-size: 0.75rem;
}

.show-section-label {
    font-size: 0.67rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    margin: 0.65rem 0 0.35rem;
}

.shows-past-toggle {
    display: block;
    margin-top: 0.6rem;
    background: transparent;
    border: none;
    font-size: 0.75rem;
    color: var(--c-accent);
    cursor: pointer;
    text-decoration: underline;
    text-decoration-style: dotted;
    padding: 0;
    font-family: inherit;
}

    .shows-past-toggle:hover {
        color: var(--c-text);
        text-decoration-style: solid;
    }

/* ── Artist detail — signals widget ─────────────────────────────────────── */
.sig-widget {
    /*margin-top: 1.5rem;*/
}

.sig-widget-controls {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.sig-list {
    display: flex;
    flex-direction: column;
}

.sig-row {
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--c-border);
    transition: opacity 0.2s;
}

    .sig-row:last-child {
        border-bottom: none;
    }

.sig-row--actioned {
    opacity: 0.4;
}

.sig-row-main {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.sig-type {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--c-text);
}

.sig-date {
    font-size: 0.78rem;
}

.sig-score {
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.sig-done-btn {
    margin-left: auto;
}

.sig-actioned-label {
    margin-left: auto;
    font-size: 0.75rem;
}

.sig-detail {
    margin-top: 0.2rem;
    font-size: 0.75rem;
    color: var(--c-muted);
    font-family: ui-monospace, 'Cascadia Code', monospace;
    padding-left: 2.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Service tracking badges (artist list row) ────────────────────────────── */

.service-badges {
    display: inline-flex;
    gap: 3px;
    align-items: center;
    flex-wrap: nowrap;
}

.svc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.4;
    white-space: nowrap;
    cursor: default;
    user-select: none;
}

/* green — linked + actively tracked */
.badge--tracked {
    background: rgba(74,222,128,.14);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.25);
}

/* orange — linked but not tracked (paused) */
.badge--linked {
    background: rgba(250,204,21,.14);
    color: #facc15;
    border: 1px solid rgba(250,204,21,.25);
}

/* red — explicitly archived / untracked by user */
.badge--archived {
    background: rgba(248,113,113,.14);
    color: #f87171;
    border: 1px solid rgba(248,113,113,.25);
}

/* gray — no ID linked for this service */
.badge--unlinked {
    background: rgba(113,113,122,.10);
    color: #71717a;
    border: 1px solid rgba(113,113,122,.20);
    opacity: 0.6;
}

.svc-badge--clickable {
    cursor: pointer;
    border-style: solid;
}

    .svc-badge--clickable:hover {
        filter: brightness(1.2);
    }

.widget-header-actions {
    display: flex;
    gap: 0.4rem;
}

.btn-sm--active {
    background: rgba(74,222,128,.14);
    border-color: rgba(74,222,128,.30);
    color: #4ade80;
}

    .btn-sm--active:hover:not(:disabled) {
        background: rgba(74,222,128,.22);
    }

/* ── Service tracking panel (artist detail right column) ─────────────────── */

.svc-tracking-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.svc-tracking-row {
    display: grid;
    grid-template-columns: 2.4rem 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.25rem;
    border-bottom: 1px solid var(--c-border);
}

    .svc-tracking-row:last-child {
        border-bottom: none;
    }

    /* The badge chip inside the detail panel — slightly larger than the list pill */
    .svc-tracking-row .svc-badge {
        font-size: 0.65rem;
        padding: 2px 5px;
    }

.svc-name {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--c-text);
}

.svc-id {
    font-size: 0.72rem;
    font-family: ui-monospace, 'Cascadia Code', monospace;
    color: var(--c-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 14ch;
}

.svc-not-linked {
    font-size: 0.72rem;
    color: var(--c-muted);
    font-style: italic;
}

.svc-toggle {
    width: 1.1rem;
    height: 1.1rem;
    cursor: pointer;
    accent-color: var(--c-accent);
}

    .svc-toggle:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

.svc-tracking-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

    .svc-tracking-actions .btn-sm {
        flex: 1;
    }

/* ── Table side navigation ───────────────────────────────────────────────── */
.table-nav-layout {
    display: grid;
    grid-template-columns: 30px 1fr 30px;
    gap: 6px;
    align-items: start;
    overflow-x: auto;
}

.page-nav-side {
    position: sticky;
    top: 68px;
    height: 56px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    color: var(--c-muted);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    padding: 0;
}

    .page-nav-side:hover:not(:disabled) {
        background: var(--c-bg);
        color: var(--c-accent);
        border-color: var(--c-accent);
    }

    .page-nav-side:disabled {
        opacity: 0.18;
        cursor: default;
        box-shadow: none;
    }

/* ── Pagination bar ──────────────────────────────────────────────────────── */
.pagination-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 0.25rem 0.25rem;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 0.2rem;
}

.page-btn {
    min-width: 30px;
    height: 28px;
    padding: 0 0.4rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.82rem;
    cursor: pointer;
    color: var(--c-muted);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

    .page-btn:hover:not(:disabled) {
        background: var(--c-bg);
        color: var(--c-text);
        border-color: var(--c-accent);
    }

.page-btn--active {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #000;
    font-weight: 700;
    cursor: default;
}

.page-btn:disabled {
    opacity: 0.28;
    cursor: default;
}

.page-ellipsis {
    padding: 0 0.15rem;
    color: var(--c-muted);
    font-size: 0.82rem;
    line-height: 28px;
    user-select: none;
}

.pagination-info {
    font-size: 0.78rem;
    color: var(--c-muted);
    white-space: nowrap;
    min-width: 7rem;
}

.pagination-size {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    cursor: default;
}

.pagination-size-label {
    font-size: 0.75rem;
    color: var(--c-muted);
    white-space: nowrap;
}

/* ── Favorite star (artist list row) ────────────────────────────────────── */
.btn-fav {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
    color: var(--c-muted);
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
}

tr:hover .btn-fav {
    opacity: 1;
}

.btn-fav:hover {
    color: #f4c430;
}

.btn-fav--active {
    opacity: 1 !important;
    color: #f4c430;
}

    .btn-fav--active:hover {
        color: #d4a017;
    }

/* ── Favorite button (artist detail toolbar) ─────────────────────────────── */
.btn-fav-detail {
    height: 34px;
    padding: 0 0.9rem;
    background: transparent;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    color: var(--c-muted);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

    .btn-fav-detail:hover {
        background: rgba(250,204,21,.14);
        border-color: rgba(250,204,21,.30);
        color: #facc15;
    }

.btn-fav-detail--active {
    background: rgba(250,204,21,.14);
    border-color: rgba(250,204,21,.30);
    color: #facc15;
    font-weight: 600;
}

    .btn-fav-detail--active:hover {
        background: rgba(250,204,21,.22);
    }

/* ── Favorite pill (artist detail header) ────────────────────────────────── */
.fav-pill {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    background: rgba(250,204,21,.14);
    color: #facc15;
    border: 1px solid rgba(250,204,21,.30);
}

/* ── Advance status pills ────────────────────────────────────────────────── */
.advance-status-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.advance-status-notstarted {
    background: rgba(113,113,122,.12);
    color: #a1a1aa;
    border: 1px solid rgba(113,113,122,.25);
}

.advance-status-inprogress {
    background: rgba(250,204,21,.14);
    color: #facc15;
    border: 1px solid rgba(250,204,21,.30);
}

.advance-status-complete {
    background: rgba(74,222,128,.14);
    color: #4ade80;
    border: 1px solid rgba(74,222,128,.30);
}

/* Row dimming for completed acts */
.row-complete td {
    opacity: 0.65;
}

/* ── Timetable: absolute-position column layout ──────────────────────────── */

/* Outer wrapper: flex row, one col per stage + the time col */
.tt-wrap {
    display: flex;
    margin-top: 1rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.8rem;
    background: var(--c-bg);
}

/* Time label column */
.tt-timecol {
    flex: 0 0 52px;
    background: var(--c-surface);
    border-right: 1px solid var(--c-border);
    position: relative;
    z-index: 3;
}

/* Stage columns */
.tt-stagecol {
    flex: 1;
    min-width: 150px;
    border-right: 1px solid var(--c-border);
    position: relative;
}

    .tt-stagecol:last-child {
        border-right: none;
    }

/* Sticky headers */
.tt-col-header {
    background: var(--c-surface);
    padding: 0.45rem 0.6rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-align: center;
    color: var(--c-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--c-border);
    position: sticky;
    top: 0;
    z-index: 4;
}

/* Column body: relative container for absolute children */
.tt-col-body {
    position: relative;
}

/* Time tick labels — absolute, centered on the tick line */
.tt-tick-label {
    position: absolute;
    right: 0.45rem;
    transform: translateY(-50%);
    font-size: 0.64rem;
    font-weight: 600;
    color: var(--c-text);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
    line-height: 1;
}

/* Drop cells — absolute, fill the slot row */
.tt-drop-cell {
    position: absolute;
    left: 0;
    right: 0;
    box-sizing: border-box;
}

.tt-drop-major {
    border-top: 1px solid var(--c-border);
}

/* Hover highlight: only the targeted cell, with time badge */
.tt-drop-hover {
    background: rgba(56,189,248,.15) !important;
    border-top: 2px solid #38bdf8 !important;
    z-index: 2;
}

.tt-drop-badge {
    position: absolute;
    top: 1px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
    line-height: 1.4;
}

/* When actively dragging: subtle blue tint on major tick lines */
.tt-is-dragging .tt-drop-major {
    border-top-color: #bfdbfe;
}

/* Act blocks — absolute, layered above drop cells */
.timetable-act {
    position: absolute;
    left: 1px;
    right: 1px;
    z-index: 1;
    background: var(--c-surface);
    border-left: 3px solid #cbd5e1;
    border-radius: 2px;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    padding: 0.25rem 0.4rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.07);
    box-sizing: border-box;
}

    .timetable-act:active {
        cursor: grabbing;
        opacity: 0.7;
    }

/* When the inline edit popover is open, allow overflow */
.timetable-act--editing {
    overflow: visible;
    z-index: 10;
}

.timetable-act.advance-complete {
    border-left-color: #4ade80;
    background: rgba(74,222,128,.10);
}

.timetable-act.advance-inprogress {
    border-left-color: #facc15;
    background: rgba(250,204,21,.10);
}

.timetable-act.advance-notstarted {
    border-left-color: #cbd5e1;
}

.timetable-act.timetable-conflict {
    outline: 2px solid #ef4444;
    outline-offset: -1px;
}

.timetable-act-link {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
}

.timetable-act-name {
    font-weight: 600;
    font-size: 0.78rem;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timetable-act-time {
    font-size: 0.67rem;
    color: var(--c-muted);
}

.timetable-headliner-badge {
    font-size: 0.65rem;
    color: #d97706;
}

.timetable-edit-btn {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--c-muted);
    opacity: 0;
    transition: opacity 0.1s;
    padding: 0.1rem 0.2rem;
    border-radius: var(--radius);
}

.timetable-act:hover .timetable-edit-btn {
    opacity: 1;
}

.timetable-edit-btn:hover {
    background: var(--c-border);
    color: var(--c-fg);
}

.timetable-edit-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 380px;
    z-index: 20;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.6rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

/* ── Timetable: unscheduled panel ────────────────────────────────────────── */
.timetable-unscheduled-panel {
    margin-top: 1.5rem;
    padding: 0.85rem 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}

.timetable-unscheduled-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 0.65rem;
}

.timetable-unscheduled-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.timetable-unscheduled-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.55rem;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    flex-direction: column;
    align-items: flex-start;
    transition: border-color 0.1s, box-shadow 0.1s;
}

    .timetable-unscheduled-chip:hover {
        border-color: var(--c-accent);
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }

.timetable-unscheduled-chip--dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.timetable-unscheduled-name {
    font-weight: 600;
    font-size: 0.82rem;
}

.timetable-chip-edit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--c-muted);
    font-size: 0.75rem;
    padding: 0;
    margin-top: 0.1rem;
    align-self: flex-end;
}

    .timetable-chip-edit-btn:hover {
        color: var(--c-text);
    }

/* ── Advance hub utility ─────────────────────────────────────────────────── */
.text-warning {
    color: #dc2626;
    font-weight: 600;
}

.text-caution {
    color: #d97706;
}

.headliner-badge {
    color: #d97706;
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

/* ── Pipeline: two cards per column ──────────────────────────────────────── */
.kanban-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

/* Expanded card spans both columns */
.kanban-card--full {
    grid-column: span 2;
}

/* Widen columns to fit two cards side by side */
.kanban-col {
    width: 320px !important;
}

.kanban-artist-link,
.lineup-artist-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

    .kanban-artist-link:hover,
    .lineup-artist-link:hover {
        color: var(--c-accent);
        text-decoration: underline;
    }

/* ── Sortable table column headers ───────────────────────────────────────── */
.sortable-col {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

    .sortable-col:hover {
        color: var(--c-accent);
    }

/* ── Advance detail — layout ─────────────────────────────────────────────── */
.advance-tab-content {
    padding-top: 0.25rem;
}

.advance-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 860px) {
    .advance-two-col {
        grid-template-columns: 1fr;
    }
}

.advance-col {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.advance-section {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.advance-section-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 0.85rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--c-border);
}

.section-link {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--c-accent);
    margin-left: auto;
}

    .section-link:hover {
        text-decoration: underline;
    }

/* ── Advance detail — key-value table ────────────────────────────────────── */
.detail-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

    .detail-table tr {
        border-bottom: 1px solid var(--c-border);
    }

        .detail-table tr:last-child {
            border-bottom: none;
        }

    .detail-table td {
        padding: 0.4rem 0;
        vertical-align: top;
    }

.detail-label {
    width: 9rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-muted);
    padding-right: 0.75rem;
    white-space: nowrap;
}

/* ── Checklist ───────────────────────────────────────────────────────────── */
.checklist-progress-badge {
    display: inline-block;
    padding: 0.1rem 0.5rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-transform: none;
    margin-left: auto;
}

.checklist-summary {
    font-size: 0.8rem;
    color: var(--c-muted);
    font-variant-numeric: tabular-nums;
}

.checklist-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 0.35rem;
    border-bottom: 1px solid var(--c-border);
    font-size: 0.875rem;
    border-radius: 3px;
    transition: background 0.1s;
}

    .checklist-item:last-child {
        border-bottom: none;
    }

    .checklist-item:hover {
        background: var(--c-bg);
    }

.checklist-confirmed {
}

.checklist-pending {
    opacity: 0.8;
}

.checklist-na {
    opacity: 0.5;
}

.checklist-icon {
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.checklist-confirmed .checklist-icon {
    color: #22c55e;
}

.checklist-pending .checklist-icon {
    color: var(--c-muted);
}

.checklist-na .checklist-icon {
    color: var(--c-muted);
}

.checklist-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.checklist-confirmed .checklist-label {
    font-weight: 500;
}

.checklist-auto-badge {
    display: inline-block;
    font-size: 0.63rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.05rem 0.35rem;
    background: rgba(56,189,248,.14);
    color: #38bdf8;
    border-radius: 3px;
}

.checklist-note {
    font-size: 0.78rem;
    color: var(--c-muted);
}

.checklist-actions {
    display: flex;
    gap: 0.3rem;
    margin-left: auto;
    flex-shrink: 0;
}

.btn-checklist-confirm,
.btn-checklist-undo,
.btn-checklist-na {
    padding: 0.18rem 0.55rem;
    border-radius: var(--radius);
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    font-family: inherit;
    white-space: nowrap;
    transition: opacity 0.12s;
}

.btn-checklist-confirm {
    background: rgba(74,222,128,.14);
    border-color: rgba(74,222,128,.30);
    color: #4ade80;
}

    .btn-checklist-confirm:hover {
        opacity: 0.8;
    }

.btn-checklist-undo {
    background: transparent;
    border-color: var(--c-border);
    color: var(--c-muted);
}

    .btn-checklist-undo:hover {
        background: var(--c-bg);
        color: var(--c-text);
    }

.btn-checklist-na {
    background: transparent;
    border-color: var(--c-border);
    color: var(--c-muted);
    font-weight: 400;
}

    .btn-checklist-na:hover {
        background: var(--c-bg);
        color: var(--c-text);
    }

/* ── Documents tab ───────────────────────────────────────────────────────── */
.doc-group {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.85rem 1.1rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.doc-drop-zone {
    outline: 2px dashed transparent;
    outline-offset: -4px;
    transition: outline-color 0.12s, background-color 0.12s;
}

.doc-drop-zone--active {
    outline-color: var(--c-accent);
    background: rgba(56, 189, 248, 0.08);
}

.doc-preview-btn {
    font-size: 0.75rem;
    padding: 0.15rem 0.55rem;
    flex-shrink: 0;
}

.doc-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.doc-group-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-text);
}

.btn-upload-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    height: 28px;
    padding: 0 0.75rem;
    font-size: 0.78rem;
}

.doc-empty {
    font-size: 0.83rem;
    padding: 0.3rem 0;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0;
    border-top: 1px solid var(--c-border);
    font-size: 0.875rem;
}

.doc-row--old {
    opacity: 0.55;
    font-size: 0.82rem;
}

.doc-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.doc-name {
    font-weight: 500;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-meta {
    font-size: 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.doc-note {
    font-size: 0.75rem;
    flex-shrink: 0;
}

.doc-history-toggle {
    display: block;
    background: transparent;
    border: none;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 0.2rem 0;
    font-family: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
}

    .doc-history-toggle:hover {
        color: var(--c-text);
        text-decoration-style: solid;
    }

/* ── Hotel overview ──────────────────────────────────────────────────────── */
.hotel-summary-bar {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.hotel-summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.75rem 1.25rem;
    min-width: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.hotel-summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--c-text);
    line-height: 1.2;
}

.hotel-summary-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    margin-top: 0.2rem;
}

.badge-festival {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(56,189,248,.14);
    color: #38bdf8;
    border: 1px solid rgba(56,189,248,.25);
}

.badge-artist {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(167,139,250,.14);
    color: #c4b5fd;
    border: 1px solid rgba(167,139,250,.25);
}

.badge-unconfirmed {
    font-size: 0.72rem;
    font-weight: 500;
}

.link-subtle {
    color: var(--c-text);
    font-weight: 500;
}

    .link-subtle:hover {
        color: var(--c-accent);
        text-decoration: underline;
    }

/* ── Settlement tab ──────────────────────────────────────────────────────── */
.toggle-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.875rem;
    cursor: pointer;
    user-select: none;
}

.settlement-unsettled td {
    opacity: 0.85;
}

/* ── Alert banners ───────────────────────────────────────────────────────── */
.alert-error {
    padding: 0.65rem 1rem;
    margin-bottom: 1rem;
    background: rgba(248,113,113,.12);
    border: 1px solid rgba(248,113,113,.25);
    border-radius: var(--radius);
    font-size: 0.85rem;
    color: #f87171;
}

/* ── Pipeline: two cards per column ──────────────────────────────────────── */
.kanban-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
}

/* Expanded cards take the full column width */
.kanban-card--full {
    grid-column: span 2;
}

/* Widen columns to fit two cards */
.kanban-col {
    width: 320px;
}

.kanban-artist-link,
.lineup-artist-link {
    color: inherit;
    text-decoration: none;
    font-weight: 600;
}

    .kanban-artist-link:hover,
    .lineup-artist-link:hover {
        color: var(--c-accent);
        text-decoration: underline;
    }

/* ── Sortable table columns ──────────────────────────────────────────────── */
.sortable-col {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
}

    .sortable-col:hover {
        color: var(--c-accent);
    }

/* ── Timetable: 5-min grid ───────────────────────────────────────────────── */
.timetable-row-minor .timetable-time-label,
.timetable-time-label.timetable-row-minor {
    padding: 0;
    min-height: 10px;
    font-size: 0;
    background: var(--c-bg);
}

.timetable-empty-cell {
    min-height: 10px;
}

.timetable-time-label {
    min-height: 10px;
    padding: 0 0.4rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.timetable-row-major {
    min-height: 18px;
    border-top: 1px solid var(--c-border);
    font-size: 0.65rem;
}

/* ── Timetable: unscheduled panel ────────────────────────────────────────── */
.timetable-unscheduled-panel {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
}

.timetable-unscheduled-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--c-muted);
    margin-bottom: 0.75rem;
}

.timetable-unscheduled-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.timetable-unscheduled-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: grab;
    user-select: none;
    flex-direction: column;
    align-items: flex-start;
}

    .timetable-unscheduled-chip:active {
        cursor: grabbing;
    }

/* ── 12-column grid ──────────────────────────────────────────────────────── */

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 14px;
}

.span3 {
    grid-column: span 3;
}

.span4 {
    grid-column: span 4;
}

.span6 {
    grid-column: span 6;
}

.span8 {
    grid-column: span 8;
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .span3, .span4, .span6, .span8 {
        grid-column: span 1;
    }
}

/* ── Widget panel ─────────────────────────────────────────────────────────── */

.w {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    overflow: hidden;
    min-width: 0;
}

.w--drag-over {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--accent);
}

.w-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

    .w-head h3 {
        font-size: 0.72rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.07em;
        color: var(--muted);
    }

.grip {
    color: var(--dim);
    font-size: 0.75rem;
    cursor: grab;
    letter-spacing: 0.05em;
    user-select: none;
    opacity: 0.5;
}

/* ── Widget body (scrollable) ────────────────────────────────────────────── */

.w-body {
    max-height: 380px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line) transparent;
}

/* ── Sparkline ───────────────────────────────────────────────────────────── */

.spark {
    height: 22px;
    display: block;
}

/* ── Fitbar ──────────────────────────────────────────────────────────────── */

.fitbar {
    width: 46px;
    height: 6px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
}

    .fitbar > i {
        display: block;
        height: 100%;
    }

.fitbar--unknown {
    width: 46px;
    display: inline-block;
    text-align: center;
    vertical-align: middle;
    color: var(--dim);
    font-size: 11px;
}

/* ── Growth / Score / Countdown ─────────────────────────────────────────── */

.grow {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

    .grow.up {
        color: var(--warm);
    }

    .grow.hot {
        color: var(--hot);
    }

    .grow.down {
        color: var(--dim);
    }

.score {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.countdown {
    font-weight: 700;
}

.cd-hot {
    color: var(--hot);
}

.cd-warn {
    color: var(--warm);
}

.cd-ok {
    color: var(--good);
}

/* ── Signal Feed (feed-item) ─────────────────────────────────────────────── */

.feed-item {
    display: flex;
    gap: 9px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
    cursor: pointer;
}

    .feed-item:hover {
        background: var(--panel2);
    }

    .feed-item:last-child {
        border-bottom: 0;
    }

    .feed-item .ago {
        width: 40px;
        color: var(--dim);
        font-size: 11px;
        flex-shrink: 0;
        padding-top: 2px;
    }

/* ── Heatmap grid (.heat) ────────────────────────────────────────────────── */

.heat {
    display: grid;
    grid-template-columns: 88px repeat(6, 1fr) 28px;
    gap: 3px;
    font-size: 10px;
}

    .heat .hc {
        height: 22px;
        border-radius: 3px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: var(--panel2);
        color: var(--dim);
        cursor: pointer;
    }

    .heat .hdr {
        color: var(--dim);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
        cursor: default;
    }

    .heat .lbl {
        display: flex;
        align-items: center;
        color: var(--muted);
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        padding-right: 4px;
    }

/* ── Context menu (⋯ button + inline action row) ─────────────────────────── */

.btn-ctx {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    color: var(--dim);
    font-size: 16px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: background .12s, color .12s;
}

    .btn-ctx:hover {
        background: var(--panel2);
        color: var(--txt);
    }

.ctx-row td {
    padding: 0;
    background: var(--panel2);
    border-top: 1px solid var(--line);
}

.ctx-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 6px 8px;
}

.ctx-btn {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--muted);
    font-size: 11px;
    cursor: pointer;
    transition: border-color .12s, color .12s, background .12s;
}

    .ctx-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(56,189,248,.08);
    }

.ctx-btn--danger:hover {
    border-color: var(--hot);
    color: var(--hot);
    background: rgba(248,113,113,.08);
}

.ctx-btn--active {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(250,204,21,.08);
    cursor: default;
}

    .ctx-btn--active:hover {
        border-color: var(--gold);
        color: var(--gold);
        background: rgba(250,204,21,.14);
        cursor: pointer;
    }

/* ── Widget tables (breakout radar, bookability window) ──────────────────── */

.w table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.w th {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    padding: 0 6px 7px;
    text-align: left;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

.w td {
    padding: 6px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.w tbody tr:hover td {
    background: var(--panel2);
    cursor: pointer;
}

.w tbody tr:last-child td {
    border-bottom: 0;
}

/* ── Alert cards ─────────────────────────────────────────────────────────── */

.alerts {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 6px;
    margin-bottom: 18px;
    scrollbar-width: none;
}

    .alerts::-webkit-scrollbar {
        display: none;
    }

.alert {
    flex: 0 0 auto;
    min-width: 248px;
    background: linear-gradient(135deg, #1c2230, #161b22);
    border: 1px solid var(--line);
    border-left: 3px solid var(--hot);
    border-radius: 10px;
    padding: 11px 13px;
    position: relative;
    cursor: pointer;
    transition: border-color 0.15s;
}

    .alert.warn {
        border-left-color: var(--warm);
    }

    .alert.tour {
        border-left-color: var(--good);
    }

    .alert h4 {
        font-size: 13px;
        font-weight: 600;
        color: var(--txt);
    }

    .alert p {
        font-size: 12px;
        color: var(--muted);
        margin-top: 3px;
    }

.alert-dismiss {
    position: absolute;
    top: 6px;
    right: 8px;
    background: none;
    border: none;
    color: var(--dim);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0 2px;
}

/* ── Signal chip taxonomy ─────────────────────────────────────────────────── */

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--panel2);
    color: var(--muted);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 0.15rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

    .chip.p1 {
        background: #3a1417;
        color: #ff9b94;
        border-color: #5e1f23;
    }

    .chip.tour {
        background: #102a18;
        color: #7ee08b;
        border-color: #1c4426;
    }

    .chip.press {
        background: #241a33;
        color: #c9a6f5;
        border-color: #3a2a52;
    }

    .chip.play {
        background: #13283a;
        color: #8fc6f5;
        border-color: #234a66;
    }

    .chip.radio {
        background: #2c2410;
        color: #e7cd7c;
        border-color: #4a3d1a;
    }

    .chip.rel {
        background: #10302c;
        color: #7bd8c6;
        border-color: #1c4d45;
    }

    .chip.growth {
        background: #2a1c10;
        color: #f0a35e;
        border-color: #4a3320;
    }

/* kept for pages not yet on .w-head */
.widget-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.widget-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.widget-subtitle {
    font-size: 0.72rem;
    color: var(--muted);
}

/* ── Breakout Radar ──────────────────────────────────────────────────────── */

.breakout-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
}

    .breakout-row:hover {
        background: var(--panel2);
    }

.breakout-row--urgent {
    background: rgba(240,163,94,.08);
}

    .breakout-row--urgent:hover {
        background: rgba(240,163,94,.14);
    }

.breakout-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.breakout-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
}

.fit-bar-wrap {
    width: 60px;
    height: 5px;
    background: var(--c-border);
    border-radius: 3px;
    overflow: hidden;
}

.fit-bar-fill {
    height: 100%;
    background: var(--c-accent);
    border-radius: 3px;
    transition: width 0.3s;
}

/* ── Signal Feed ─────────────────────────────────────────────────────────── */

.signal-feed-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
}

    .signal-feed-row:hover {
        background: var(--panel2);
    }

.signal-feed-artist {
    flex: 1;
    font-weight: 500;
    font-size: 0.85rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.signal-feed-date {
    font-size: 0.72rem;
    flex-shrink: 0;
}

/* ── Heatmap ─────────────────────────────────────────────────────────────── */

.heatmap-legend {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    padding-left: 100px;
}

.heatmap-legend-item {
    width: 26px;
    text-align: center;
    font-size: 0.78rem;
    color: var(--c-muted);
}

.heatmap-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
}

    .heatmap-row:hover {
        background: var(--panel2);
    }

.heatmap-row--multi {
    background: rgba(63,185,80,.08);
}

    .heatmap-row--multi:hover {
        background: rgba(63,185,80,.14);
    }

.heatmap-name {
    width: 96px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.heatmap-cells {
    display: flex;
    gap: 0.25rem;
}

.heatmap-cell {
    width: 26px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    font-size: 0.78rem;
    background: var(--panel2);
    border: 1px solid var(--line);
    color: transparent;
}

.heatmap-cell--active {
    background: rgba(63,185,80,.18);
    border-color: var(--good);
    color: inherit;
}

/* ── Bookability Window ──────────────────────────────────────────────────── */

.window-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
}

    .window-row:hover {
        background: var(--panel2);
    }

.window-row-name {
    font-size: 0.85rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.window-row-score {
    flex-shrink: 0;
}

.window-label {
    font-size: 0.72rem;
    color: var(--c-muted);
    flex-shrink: 0;
    white-space: nowrap;
}

.window-label--urgent {
    color: var(--c-p1);
    font-weight: 700;
}

/* ── Playlist Movers ─────────────────────────────────────────────────────── */

.playlist-mover-row {
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 0.25rem;
}

    .playlist-mover-row:hover {
        background: var(--panel2);
    }

.playlist-mover-artist {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Favourites NL/BE ────────────────────────────────────────────────────── */

.fav-show-row {
    display: grid;
    grid-template-columns: 50px 1fr;
    gap: 0.25rem 0.6rem;
    padding: 0.35rem 0.4rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
    align-items: start;
}

    .fav-show-row:hover {
        background: var(--panel2);
    }

.fav-show-date {
    font-size: 0.75rem;
    padding-top: 0.1rem;
    grid-row: span 2;
    align-self: center;
}

.fav-show-artist {
    font-weight: 600;
    font-size: 0.85rem;
}

/* ── Press Wire ──────────────────────────────────────────────────────────── */

.press-row {
    padding: 0.5rem 0.6rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background 0.12s;
    margin-bottom: 0.3rem;
    border-left: 3px solid transparent;
}

    .press-row:hover {
        background: var(--panel2);
    }

.press-row--bnm {
    border-left-color: var(--accent);
    background: rgba(110,168,254,.06);
}

    .press-row--bnm:hover {
        background: rgba(110,168,254,.1);
    }

.bnm-badge {
    display: inline-block;
    background: var(--c-accent);
    color: #fff;
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-right: 0.35rem;
}

.hype-badge {
    display: inline-block;
    background: #7c3aed;
    color: #fff;
    border-radius: 3px;
    padding: 0.1rem 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    margin-right: 0.35rem;
}

.press-source {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.35rem;
}

.press-title {
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

.press-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

.press-artist {
    font-size: 0.78rem;
    color: var(--c-muted);
}

/* ── Pipeline Funnel ─────────────────────────────────────────────────────── */

.funnel-row {
    display: grid;
    grid-template-columns: 90px 1fr 28px 36px;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
}

.funnel-status {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--c-text);
}

.funnel-bar-wrap {
    height: 8px;
    background: var(--c-bg);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--c-border);
}

.funnel-bar-fill {
    height: 100%;
    background: #3b5ea6;
    border-radius: 4px;
    transition: width 0.3s;
}

.funnel-bar-fill--confirmed {
    background: var(--c-accent);
}

.funnel-count {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.funnel-fee {
    font-size: 0.72rem;
    text-align: right;
}

.funnel-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--c-border);
    font-size: 0.85rem;
}

/* ── Artist Drawer ───────────────────────────────────────────────────────── */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 200;
}

.drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 100vw;
    background: var(--c-surface);
    border-left: 1px solid var(--c-border);
    z-index: 201;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.drawer-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--c-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}

    .drawer-close:hover {
        color: var(--c-text);
    }

.drawer-header {
    padding: 1.25rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--c-border);
}

.drawer-score-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.drawer-tabs {
    display: flex;
    border-bottom: 1px solid var(--c-border);
    padding: 0 1rem;
}

.drawer-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--c-muted);
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

    .drawer-tab:hover {
        color: var(--c-text);
    }

.drawer-tab--active {
    color: var(--c-text);
    border-bottom-color: var(--c-accent);
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.drawer-actions {
    padding: 0.85rem 1.25rem;
    border-top: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.actioned-label {
    font-size: 0.82rem;
    color: var(--c-accent);
    font-weight: 600;
}

.history-entry {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--c-border);
}

    .history-entry:last-child {
        border-bottom: none;
    }

.history-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
}

.htype-badge {
    display: inline-block;
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
}

.btn-link-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

@media (max-width: 768px) {
    .drawer-panel {
        width: 100vw;
    }
}

/* ── Document viewer panel ───────────────────────────────────────────────── */
.doc-viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 210;
}

.doc-viewer-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 60vw;
    min-width: 480px;
    max-width: 900px;
    background: var(--c-surface);
    border-left: 1px solid var(--c-border);
    z-index: 211;
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
}

.doc-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--c-border);
}

.doc-viewer-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-weight: 600;
    font-size: 0.95rem;
    min-width: 0;
    overflow-wrap: break-word;
}

.doc-viewer-subtitle {
    font-weight: 400;
    font-size: 0.78rem;
}

.doc-viewer-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.doc-viewer-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--c-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0.2rem 0.4rem;
}

    .doc-viewer-close:hover {
        color: var(--c-text);
    }

.doc-viewer-body {
    flex: 1;
    overflow: auto;
    padding: 0;
    display: flex;
}

.doc-viewer-frame {
    flex: 1;
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

@media (max-width: 900px) {
    .doc-viewer-panel {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
    }
}

/* ── Discovery page ──────────────────────────────────────────────────────── */

.disc-filters {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.disc-filter-text {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.85rem;
    color: var(--c-text);
    min-width: 180px;
}

    .disc-filter-text:focus {
        outline: none;
        border-color: var(--c-accent);
    }

.disc-filter-select {
    padding: 0.4rem 0.65rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    background: var(--c-surface);
    font-size: 0.85rem;
    color: var(--c-text);
    cursor: pointer;
}

.disc-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    cursor: pointer;
    user-select: none;
}

.disc-filter-clear {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
    color: var(--c-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

    .disc-filter-clear:hover {
        border-color: var(--c-down);
        color: var(--c-down);
    }

.disc-filter-clear--hidden {
    visibility: hidden;
}

.disc-type-chips {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.disc-type-chip {
    background: var(--c-bg);
    border: 1px solid var(--c-border);
    border-radius: 20px;
    padding: 0.25rem 0.7rem;
    font-size: 0.78rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
    color: var(--c-text);
}

    .disc-type-chip:hover {
        border-color: var(--c-accent);
    }

.disc-type-chip--active {
    background: var(--c-accent);
    border-color: var(--c-accent);
    color: #fff;
}

/* ── Discovery card grid ─────────────────────────────────────────────────── */

.disc-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.85rem;
}

.disc-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    transition: box-shadow 0.15s, opacity 0.2s;
    touch-action: pan-y;
}

    .disc-card:hover {
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    }

.disc-card--actioned {
    opacity: 0.55;
}

.disc-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.disc-card-name {
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

    .disc-card-name:hover {
        color: var(--c-accent);
    }

.disc-card-country {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--c-muted);
    background: var(--c-bg);
    border-radius: 3px;
    padding: 0.1rem 0.3rem;
}

.disc-card-score-col {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

/* ── Signal chips on discovery cards ────────────────────────────────────── */

.disc-signal-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.5rem;
}

.disc-signal-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 4px;
    font-size: 0.73rem;
    font-weight: 500;
}

    .disc-signal-chip.priority-1 {
        background: #3a1417;
        color: #ff9b94;
        border-color: #5e1f23;
    }

    .disc-signal-chip.priority-2 {
        background: #2c2410;
        color: #e7cd7c;
        border-color: #4a3d1a;
    }

    .disc-signal-chip.priority-3 {
        background: var(--panel2);
        color: var(--muted);
    }

.disc-chip-date {
    font-weight: 400;
    opacity: 0.7;
    font-size: 0.68rem;
}

.disc-chip-more {
    font-size: 0.72rem;
    color: var(--c-muted);
    align-self: center;
    padding: 0 0.25rem;
}

/* ── Stats row ───────────────────────────────────────────────────────────── */

.disc-stats-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}

.disc-tags {
    font-size: 0.72rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 120px;
}

.disc-sparkline {
    width: 80px;
    height: 28px;
    flex-shrink: 0;
    overflow: visible;
}

/* ── Card action row ─────────────────────────────────────────────────────── */

.disc-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.1rem;
}

.disc-btn {
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
}

.disc-btn-dismiss {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    color: var(--c-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

    .disc-btn-dismiss:hover {
        border-color: var(--c-down);
        color: var(--c-down);
    }

.disc-btn-deactivate {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.55rem;
    font-size: 0.8rem;
    color: var(--c-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

    .disc-btn-deactivate:hover {
        border-color: var(--c-p2);
        color: var(--c-p2);
    }

.disc-btn-link {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    text-decoration: none;
}

.disc-pipeline-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(74,222,128,.14);
    color: #4ade80;
    border-radius: 4px;
    padding: 0.2rem 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Card context menu ───────────────────────────────────────────────────── */

.disc-menu-wrap {
    position: relative;
}

.disc-menu-btn {
    background: none;
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
    line-height: 1;
    color: var(--c-muted);
    cursor: pointer;
    letter-spacing: 0.05em;
    transition: border-color 0.15s, color 0.15s;
}

    .disc-menu-btn:hover {
        border-color: var(--c-text);
        color: var(--c-text);
    }

.disc-menu-dropdown {
    position: absolute;
    bottom: calc(100% + 6px);
    right: 0;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    z-index: 200;
    min-width: 168px;
    padding: 0.25rem 0;
}

.disc-menu-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.42rem 0.85rem;
    font-size: 0.83rem;
    color: var(--c-text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.1s;
}

    .disc-menu-item:hover {
        background: var(--c-bg);
    }

    .disc-menu-item:disabled {
        opacity: 0.5;
        cursor: default;
    }

.disc-menu-item--danger {
    color: var(--c-muted);
}

    .disc-menu-item--danger:hover {
        color: var(--c-down);
        background: rgba(239, 68, 68, 0.08);
    }

.disc-menu-divider {
    height: 1px;
    background: var(--c-border);
    margin: 0.25rem 0;
}

.disc-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 199;
}

@media (max-width: 768px) {
    .disc-cards {
        grid-template-columns: 1fr;
    }
}

/* ── Bookability matrix ───────────────────────────────────────────────────── */

.bm-legend {
    display: flex;
    align-items: center;
    font-size: 0.8rem;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.bm-legend-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.bm-chart-wrap {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 1rem;
    height: 520px;
    margin-bottom: 1rem;
}

.bm-scrub {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.bm-scrub-range {
    flex: 1;
    max-width: 320px;
    accent-color: var(--c-accent);
}

.bm-scrub-label {
    font-size: 0.8rem;
    font-weight: 600;
    min-width: 40px;
    color: var(--c-text);
}

/* ── Festival kanban enrichment ──────────────────────────────────────────── */

.kanban-score-row {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.2rem 0 0.1rem;
}

.kanban-window-label {
    font-size: 0.68rem;
    color: var(--c-muted);
}

/* ── Routing Radar page ───────────────────────────────────────────────────── */
.routing-page {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.routing-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

    .routing-filters .filter-toggle {
        padding: 0.25rem 0.75rem;
        border-radius: 999px;
        border: 1px solid var(--c-border);
        background: var(--c-surface);
        font-size: 0.78rem;
        cursor: pointer;
        transition: background 0.15s, color 0.15s;
    }

        .routing-filters .filter-toggle.active {
            background: var(--c-accent);
            color: #fff;
            border-color: var(--c-accent);
        }

.routing-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.75rem;
    color: var(--c-muted);
}

.routing-legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.routing-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.routing-dot--opp {
    background: #ff4d00;
}

.routing-dot--pipeline {
    background: var(--c-accent);
}

.routing-dot--tour {
    background: #3b82f6;
}

.routing-dot--venue {
    background: #f59e0b;
}

.routing-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.routing-map-col {
    flex: 0 0 40%;
    min-width: 0;
    position: sticky;
    top: 62px;
}

.routing-table-col {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

@media (max-width: 960px) {
    .routing-layout {
        flex-direction: column;
    }

    .routing-map-col {
        position: static;
        flex: none;
        width: 100%;
    }
}

.routing-pagination {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0 0.25rem;
    font-size: 0.82rem;
    color: var(--muted);
}

    .routing-pagination button {
        background: var(--panel2);
        border: 1px solid var(--line);
        color: var(--txt);
        padding: 0.25rem 0.65rem;
        border-radius: var(--radius);
        cursor: pointer;
        font-size: 0.82rem;
        transition: background 0.12s;
    }

        .routing-pagination button:hover:not(:disabled) {
            background: var(--line);
        }

        .routing-pagination button:disabled {
            opacity: 0.35;
            cursor: default;
        }

    .routing-pagination .page-info {
        margin: 0 auto;
    }

.routing-map-wrap {
    width: 100%;
    height: 600px;
    border-radius: 8px;
    border: 1px solid var(--c-border);
    overflow: hidden;
    background: #e8ecf0;
}

.routing-table-wrap {
    overflow-x: auto;
}

.routing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

    .routing-table th {
        text-align: left;
        font-size: 0.7rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .05em;
        color: var(--c-muted);
        padding: 0.4rem 0.6rem;
        border-bottom: 2px solid var(--c-border);
        white-space: nowrap;
    }

    .routing-table td {
        padding: 0.4rem 0.6rem;
        border-bottom: 1px solid var(--c-border);
        vertical-align: middle;
    }

.routing-row--opp td:first-child {
    border-left: 3px solid #ff4d00;
}

.routing-row--pipeline td:first-child {
    border-left: 3px solid var(--c-accent);
}

.routing-badge {
    display: inline-block;
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.7rem;
    font-weight: 700;
    white-space: nowrap;
}

.routing-badge--opp {
    background: rgba(251,146,60,.14);
    color: #fb923c;
}

.routing-badge--pipeline {
    background: rgba(74,222,128,.14);
    color: #4ade80;
}

.routing-badge--tour {
    background: rgba(56,189,248,.14);
    color: #38bdf8;
}

.routing-badge--venue {
    background: rgba(250,204,21,.14);
    color: #facc15;
}

.routing-empty {
    text-align: center;
    color: var(--c-muted);
    padding: 2rem;
    font-size: 0.9rem;
}
