.bulk-page {
    --maroon: #7a1a2d;
    --muted: #655351;
    --line: #e8d5b8;
}

.bulk-page .container { padding-bottom: 94px; }
.bulk-page [hidden] { display: none !important; }
.bulk-page button, .bulk-page input { font: inherit; }
.bulk-page :focus-visible { outline: 3px solid #7a1a2d; outline-offset: 3px; }
.bulk-page .bottom-nav { gap: clamp(4px, 4vw, 40px); }
.bulk-page .bottom-nav a { padding-inline: clamp(8px, 2vw, 24px); }

.bulk-intro {
    margin: 0 0 18px;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    color: #4a0e1b;
    background: #fdf8f0;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: clamp(14px, 3vw, 24px);
}
.bulk-intro h2 { margin: 0 0 6px; color: var(--maroon); font-size: clamp(1.25rem, 3vw, 1.65rem); }
.bulk-intro p { margin: 0; max-width: 48ch; line-height: 1.5; }
.bulk-template {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    color: #4a0e1b;
    background: linear-gradient(135deg, #d4af37, #c9a84c);
    border-radius: 9px;
    font-size: .9rem;
    font-weight: 750;
    text-decoration: none;
}
.bulk-template svg { width: 18px; height: 18px; }
.bulk-template:hover { background: #e5c66d; }

.bulk-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    margin: 0 0 16px;
    list-style: none;
}
.bulk-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 10px;
    color: var(--muted);
    font-size: .85rem;
    font-weight: 650;
}
.bulk-steps li[aria-current] { border-color: #d4af37; background: #fdf3df; color: var(--maroon); }
.bulk-steps li span {
    display: grid;
    flex: 0 0 22px;
    height: 22px;
    place-items: center;
    border-radius: 50%;
    background: #f6ecdf;
    font-size: .75rem;
}
.bulk-steps li[aria-current] span { background: var(--maroon); color: #fff; }

.bulk-upload { padding: clamp(14px, 3vw, 24px); border: 1px dashed #c9a84c; border-radius: 12px; background: #fdf8f0; }
.bulk-upload label { display: block; font-size: 1.12rem; font-weight: 750; }
#bulkFileHelp { margin: 4px 0 14px; color: var(--muted); font-size: .88rem; }
#bulkFile { display: block; width: 100%; max-width: 410px; color: var(--muted); font-size: .88rem; }
#bulkFile::file-selector-button {
    margin-right: 9px;
    border: 1px solid #d4af37;
    border-radius: 8px;
    background: #fff;
    color: var(--maroon);
    padding: 9px 12px;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}
#bulkFile:disabled::file-selector-button { cursor: wait; }
#bulkFilename { margin: 10px 0 0; overflow-wrap: anywhere; font-size: .85rem; }
#bulkStatus { margin: 14px 0; padding: 10px 12px; background: #fdf8f0; border-radius: 8px; font-size: .9rem; line-height: 1.5; }
[data-state="error"] #bulkStatus, #bulkIssues { color: #87233c; background: #fff0f3; }
[data-state="done"] #bulkStatus { color: #22563b; background: #eaf7ef; }
#bulkIssues { margin: 0 0 16px; padding: 10px 14px 10px 32px; border-radius: 8px; font-size: .9rem; overflow-wrap: anywhere; }
#bulkIssues li + li { margin-top: 5px; }

.bulk-review-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px; margin: 22px 0 10px; }
.bulk-review-heading h2 { margin: 0; font-size: 1.1rem; }
#bulkCount { color: var(--muted); font-size: .84rem; font-weight: 650; }
.bulk-preview { max-height: 390px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.bulk-preview table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .86rem; }
.bulk-preview th, .bulk-preview td { min-width: 94px; max-width: 270px; padding: 9px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.bulk-preview th:first-child, .bulk-preview td:first-child { min-width: 54px; }
.bulk-preview th { position: sticky; top: 0; background: #7a1a2d; color: #fff7df; }
.bulk-preview tr:nth-child(even) td { background: #fdf8f0; }
.bulk-preview tr[data-issue] td { background: #fff0f3; }
.bulk-preview tr:last-child td { border-bottom: 0; }

.bulk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.bulk-actions button { padding: 10px 18px; border: 1px solid transparent; border-radius: 9px; font-weight: 750; cursor: pointer; }
#bulkSave { color: #fff; background: var(--maroon); }
#bulkSave:not(:disabled):hover { background: #571427; }
#bulkSave:disabled { color: #66565d; background: #eee7ea; cursor: not-allowed; }
#bulkDownload { background: #d4af37; border-color: #c9a84c; color: #4a0e1b; }
#bulkDownload:hover { background: #e5c66d; }

@media (max-width: 480px) {
    .bulk-steps li { padding: 7px 6px; gap: 4px; font-size: .73rem; }
    .bulk-steps li span { flex-basis: 18px; height: 18px; }
    .bulk-actions button { flex: 1 1 130px; }
}
