:root {
    --editor-surface: rgba(15, 15, 18, 0.78);
    --editor-line-soft: rgba(255, 255, 255, 0.12);
    --editor-text: #ffffff;
    --editor-muted: #b6c0d4;
    --editor-pill: rgba(255, 255, 255, 0.18);
    --editor-pill-active: rgba(255, 255, 255, 0.95);
    --editor-pill-active-text: #0d0d12;
}

.editor-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 28px 28px 40px;
}

.editor-hero {
    margin-bottom: 18px;
}

.editor-hero .subhead {
    margin-top: 8px;
}

.editor-surface {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    width: 100%;
}

.mock-layout {
    display: grid;
    grid-template-columns: minmax(360px, 0.92fr) minmax(460px, 1.08fr);
    gap: 28px;
    align-items: start;
    min-height: calc(100vh - 180px);
}

.file-pane,
.detail-pane {
    min-width: 0;
}

.file-pane {
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr);
    min-height: 0;
    gap: 10px;
}

.detail-pane {
    position: sticky;
    top: 28px;
    align-self: start;
}

.editor-sidebar-note {
    align-items: start;
    padding: 14px;
    background: #151515;
    border: 1px solid #202020;
    border-radius: 14px;
    margin-bottom: 4px;
}

.editor-sidebar-kicker {
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.editor-sidebar-copy {
    color: var(--editor-muted);
    font-size: 13px;
    line-height: 1.45;
}

.tab-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--editor-pill);
    border-radius: 999px;
    padding: 4px;
}

.tab-switch-btn {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 11px;
    border-radius: 999px;
}

.tab-switch-btn.active {
    background: var(--editor-pill-active);
    color: var(--editor-pill-active-text);
    font-weight: 700;
    box-shadow: 0 10px 22px rgba(255, 255, 255, 0.14);
}

.filter-wrap {
    display: block;
}

.filter-wrap input {
    width: 100%;
    height: 42px;
    border-radius: 12px;
    border: 1px solid #3b3f48;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    padding: 0 12px;
    font-size: 14px;
}

.filter-wrap input::placeholder {
    color: #8a93a5;
}

.filter-wrap input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.32);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.list-summary {
    display: block;
    font-size: 13px;
    color: var(--editor-muted);
    min-height: 18px;
}

.file-list {
    display: grid;
    align-content: start;
    max-height: calc(100vh - 292px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 8px;
    scrollbar-gutter: stable;
    border-top: 1px solid var(--editor-line-soft);
}

.file-row {
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid var(--editor-line-soft);
    background: transparent;
    color: var(--editor-text);
    text-align: left;
}

.file-row.active {
    background: rgba(255, 255, 255, 0.04);
    box-shadow: inset 2px 0 0 var(--accent-color);
}

.file-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.file-icon,
.result-icon,
.identified-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.album-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: inline-block;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1d2430;
    background-image: linear-gradient(135deg, #253647, #161d26);
    border: 1px solid #334558;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
    overflow: hidden;
}

.album-placeholder.has-cover {
    border-color: rgba(255, 255, 255, 0.22);
}

.file-meta,
.result-main,
.identified-main {
    min-width: 0;
}

.file-headline,
.result-line {
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

.file-secondary {
    margin-top: 4px;
    font-size: 13px;
    color: var(--editor-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-name,
.result-title,
.no-match-btn,
.apply-btn {
    font-weight: 700;
    color: #fff;
}

.file-primary {
    font-size: 15px;
    line-height: 1.3;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-name,
.result-title {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist,
.result-artist,
.identified-artist {
    font-size: 15px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.detail-body {
    display: grid;
    gap: 16px;
}

.identified-wrap,
.search-form {
    display: grid;
    gap: 10px;
}

.identified-label {
    font-size: 20px;
    line-height: 1.15;
    color: #fff;
}

.identified-card {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.identified-icon {
    width: 76px;
    height: 76px;
}

.identified-icon .album-placeholder {
    width: 76px;
    height: 76px;
    border-radius: 16px;
}

.identified-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.15;
    color: #fff;
}

.identified-artist {
    font-size: 16px;
}

.identified-sub,
.result-sub,
.identified-file {
    font-size: 14px;
    line-height: 1.35;
    color: #fff;
}

.identified-file {
    color: var(--editor-muted);
}

.field-group {
    display: grid;
    gap: 6px;
}

.field-label {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}

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

.search-btn,
.ghost-btn,
.apply-btn {
    border-radius: 999px;
    min-height: 36px;
    padding: 0 14px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}

.search-btn,
.apply-btn {
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: #ffffff;
    color: #0d0d12;
}

.ghost-btn {
    border: 1px solid rgba(255, 255, 255, 0.26);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
}

.search-btn:hover,
.ghost-btn:hover,
.apply-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.search-btn:disabled,
.ghost-btn:disabled,
.apply-btn:disabled,
.no-match-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.search-input {
    width: 100%;
    height: 44px;
    border: 1px solid #3b3f48;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    padding: 0 12px;
    font-size: 15px;
    font-weight: 600;
}

.search-input::placeholder {
    color: #8a93a5;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.search-section-label {
    font-size: 14px;
    margin-top: 4px;
    color: #fff;
    font-weight: 700;
}

.lookup-status {
    min-height: 18px;
    font-size: 13px;
    color: var(--editor-muted);
}

.lookup-status.ok {
    color: #d8f9df;
}

.lookup-status.warn {
    color: #ffe39e;
}

.lookup-status.error {
    color: #ff9a9a;
}

.results-list {
    display: grid;
    gap: 12px;
}

.results-empty {
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    padding: 12px;
    font-size: 14px;
    color: var(--editor-muted);
}

.result-card,
.no-match-btn {
    width: 100%;
    border: 1px solid #3b3f48;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
}

.result-card {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    text-align: left;
    padding: 11px 13px;
}

.result-main {
    display: grid;
    gap: 8px;
}

.result-actions {
    display: flex;
    justify-content: flex-start;
}

.apply-btn {
    min-height: 32px;
    padding: 0 12px;
    font-size: 12px;
}

.no-match-btn {
    text-align: left;
    padding: 11px 13px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.no-match-btn:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.feedback-note {
    font-size: 13px;
    line-height: 1.4;
    margin-top: 2px;
    color: var(--editor-muted);
}

.empty-state {
    font-size: 15px;
    color: #fff;
    padding-top: 16px;
}

.save-status {
    min-height: 20px;
    color: var(--editor-muted);
    font-size: 14px;
}

.save-status.ok {
    color: #d8f9df;
}

.save-status.error {
    color: #ff9a9a;
}

.editor-empty-state {
    max-width: 720px;
}

@media (max-width: 1180px) {
    .mock-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        min-height: 0;
    }

    .file-pane {
        grid-template-rows: auto auto auto minmax(220px, 1fr);
    }

    .file-list {
        max-height: 50vh;
        overflow: auto;
        padding-right: 0;
    }

    .detail-pane {
        position: static;
    }
}

@media (max-width: 920px) {
    .editor-sidebar {
        position: static;
        width: auto;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid #1c1c1c;
    }

    .editor-page {
        padding: 18px;
    }

    .file-row {
        grid-template-columns: 44px minmax(0, 1fr);
    }
}

@media (max-width: 760px) {
    .editor-hero {
        flex-direction: column;
        align-items: start;
        gap: 10px;
    }

    .tab-switch-btn {
        font-size: 14px;
        padding: 8px 10px;
    }

    .identified-card,
    .result-card {
        grid-template-columns: 1fr;
    }

    .identified-icon,
    .result-icon {
        width: 56px;
        height: 56px;
    }

    .identified-icon .album-placeholder,
    .result-icon .album-placeholder {
        width: 56px;
        height: 56px;
    }

    .search-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .search-btn,
    .ghost-btn {
        width: 100%;
    }
}
