body {
    font-family: 'Inter', 'Noto Sans SC', sans-serif;
}

.converter-shell {
    display: grid;
    gap: 1.2rem;
}

.wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.32rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: rgba(8, 8, 8, 0.32);
}

.wizard-step,
.report-tab {
    border: 0;
    border-radius: calc(var(--radius-lg) - 0.32rem);
    padding: 0.78rem 0.9rem;
    background: transparent;
    color: var(--ink-400);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wizard-step:hover,
.report-tab:hover {
    color: var(--gold-light);
    box-shadow: 0 0 0 1px rgba(247, 215, 134, 0.22);
}

.wizard-step.is-active,
.report-tab.is-active {
    color: var(--bg-base);
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
    box-shadow: 0 4px 16px rgba(191, 149, 63, 0.28);
}

.source-type-switch {
    display: inline-grid;
    grid-template-columns: repeat(2, minmax(7rem, 1fr));
    width: min(100%, 18rem);
    gap: 0.28rem;
    padding: 0.28rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    background: rgba(8, 8, 8, 0.32);
}

.source-type-btn {
    border: 0;
    border-radius: calc(var(--radius-md) - 0.28rem);
    padding: 0.62rem 0.8rem;
    background: transparent;
    color: var(--ink-400);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
}

.source-type-btn:hover {
    color: var(--gold-light);
}

.source-type-btn.is-active {
    color: var(--bg-base);
    background: linear-gradient(135deg, var(--gold-light), var(--gold-primary));
}

.wizard-panel {
    display: none;
    gap: 1rem;
}

.wizard-panel.is-active {
    display: grid;
}

.panel-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--hairline);
    padding-bottom: 1rem;
}

.panel-heading h2 {
    color: var(--ink-100);
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.panel-heading p {
    color: var(--ink-400);
    font-size: 0.9rem;
    line-height: 1.55;
}

.dropzone {
    display: grid;
    place-items: center;
    gap: 0.55rem;
    min-height: 13rem;
    border: 1px dashed rgba(247, 215, 134, 0.42);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.025);
    color: var(--ink-300);
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dropzone.is-dragging,
.dropzone:hover {
    border-color: rgba(247, 215, 134, 0.75);
    background: rgba(247, 215, 134, 0.055);
    box-shadow: 0 0 30px rgba(191, 149, 63, 0.12);
}

.dropzone input {
    display: none;
}

.dropzone-icon {
    display: inline-grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border: 1px solid rgba(247, 215, 134, 0.45);
    border-radius: 50%;
    color: var(--gold-light);
    font-size: 1.8rem;
    line-height: 1;
}

.file-list,
.candidate-grid,
.validation-list,
.report-preview {
    display: grid;
    gap: 0.75rem;
}

.empty-state {
    /* 视觉由 _shared.css 统一；此处仅保留页面布局需要的最小覆盖 */
    min-height: 4.5rem;
}

.file-item,
.candidate-card,
.validation-item {
    border: 1px solid var(--hairline);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    padding: 0.95rem 1rem;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.file-item strong,
.candidate-card strong {
    color: var(--ink-100);
}

.file-meta,
.candidate-meta {
    color: var(--ink-400);
    font-size: 0.82rem;
    margin-top: 0.25rem;
}

.candidate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.candidate-card {
    display: grid;
    gap: 0.7rem;
}

.candidate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.confidence {
    display: inline-flex;
    align-items: center;
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.55rem;
    border: 1px solid var(--hairline-gold);
    color: var(--gold-light);
    font-size: 0.74rem;
}

.candidate-select {
    width: 100%;
}

.base-info-grid,
.export-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.export-grid {
    grid-template-columns: minmax(180px, 260px) 1fr;
}

.report-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
    padding: 0.3rem;
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    background: rgba(8, 8, 8, 0.32);
}

.table-wrap {
    max-height: 62vh;
    overflow: auto;
    border: 1px solid var(--hairline-gold);
    border-radius: var(--radius-md);
    background: rgba(8, 8, 8, 0.45);
}

.preview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 820px;
}

.preview-table th,
.preview-table td {
    border-bottom: 1px solid var(--hairline);
    border-right: 1px solid var(--hairline);
    padding: 0.62rem 0.72rem;
    background: #070707;
    color: var(--ink-300);
    font-size: 0.84rem;
    vertical-align: middle;
}

.preview-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    color: var(--gold-light);
    background: #11100d;
    text-align: left;
    font-weight: 600;
}

.preview-table td:first-child,
.preview-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #0d0c0a;
    color: var(--ink-100);
    min-width: 210px;
}

.preview-table th:first-child {
    z-index: 4;
}

.equity-table th {
    top: 0;
}

.equity-table {
    min-width: 3400px;
}

.equity-table th {
    min-width: 8.4rem;
}

.equity-table th:first-child,
.equity-table td:first-child {
    min-width: 220px;
}

.equity-table .amount-input {
    width: 7.6rem;
}

.amount-input {
    width: 8.5rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--ink-200);
    padding: 0.38rem 0.45rem;
    font: inherit;
    text-align: right;
}

.amount-input:focus {
    outline: none;
    border-color: rgba(247, 215, 134, 0.55);
    box-shadow: 0 0 0 2px rgba(247, 215, 134, 0.12);
}

.status-badge {
    display: inline-flex;
    border-radius: var(--radius-pill);
    padding: 0.18rem 0.48rem;
    border: 1px solid var(--hairline);
    color: var(--ink-400);
    font-size: 0.72rem;
    white-space: nowrap;
}

.status-badge.mapped,
.status-badge.edited,
.status-badge.fuzzy {
    border-color: rgba(159, 217, 184, 0.4);
    color: var(--success-soft);
}

.status-badge.fuzzy {
    border-color: rgba(247, 215, 134, 0.4);
    color: var(--gold-light);
}

.status-badge.missing {
    border-color: rgba(240, 163, 155, 0.38);
    color: var(--warn-soft);
}

.validation-list {
    max-height: 12rem;
    overflow: auto;
}

.validation-item {
    color: var(--warn-soft);
    border-color: rgba(240, 163, 155, 0.22);
}

.export-summary {
    display: grid;
    gap: 0.35rem;
}

.export-summary strong {
    color: var(--ink-100);
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .wizard-steps,
    .candidate-grid,
    .base-info-grid,
    .report-tabs,
    .export-grid {
        grid-template-columns: 1fr;
    }

    .panel-heading,
    .file-item {
        flex-direction: column;
        align-items: stretch;
    }
}
