:root {
    --eh-bulk-ink: #00285f;
    --eh-bulk-red: #ed1c24;
    --eh-bulk-green: #07843f;
    --eh-bulk-blue: #0b6fc2;
    --eh-bulk-pale: #eef4fb;
    --eh-bulk-line: #cedbeb;
    --eh-bulk-muted: #5d6f86;
    --eh-bulk-white: #fff;
}

.eh-bulk-page {
    margin: 0 !important;
    max-width: none !important;
    padding: 0 !important;
}

.eh-bulk-shell {
    background: #f3f7fc;
    color: var(--eh-bulk-ink);
    min-height: calc(100vh - 80px);
    padding: 18px;
}

.eh-bulk-shell,
.eh-bulk-shell * {
    box-sizing: border-box;
}

.eh-bulk-shell button,
.eh-bulk-shell input,
.eh-bulk-shell select,
.eh-bulk-shell textarea {
    font: inherit;
    letter-spacing: 0;
}

.eh-bulk-header {
    align-items: center;
    background: var(--eh-bulk-ink);
    border-radius: 6px;
    color: var(--eh-bulk-white);
    display: grid;
    gap: 18px;
    grid-template-columns: auto 1fr;
    margin: 0 auto;
    max-width: 1500px;
    padding: 18px 22px;
}

.eh-bulk-header h1 {
    color: inherit;
    font-size: clamp(24px, 3vw, 40px);
    line-height: 1.05;
    margin: 3px 0 0;
}

.eh-bulk-eyebrow,
.eh-bulk-kicker {
    color: var(--eh-bulk-red);
    display: block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.eh-bulk-back,
.eh-bulk-card-link {
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 5px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    text-decoration: none;
}

.eh-bulk-steps {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(3, 1fr);
    margin: 12px auto;
    max-width: 1500px;
}

.eh-bulk-steps span {
    align-items: center;
    background: #dfe8f4;
    border-bottom: 3px solid transparent;
    color: var(--eh-bulk-muted);
    display: flex;
    font-size: 13px;
    font-weight: 750;
    gap: 9px;
    min-height: 44px;
    padding: 7px 12px;
}

.eh-bulk-steps b {
    align-items: center;
    background: #b8c8dc;
    border-radius: 50%;
    color: var(--eh-bulk-ink);
    display: inline-flex;
    height: 25px;
    justify-content: center;
    width: 25px;
}

.eh-bulk-steps .active {
    background: #fff;
    border-color: var(--eh-bulk-red);
    color: var(--eh-bulk-ink);
}

.eh-bulk-steps .active b,
.eh-bulk-steps .done b {
    background: var(--eh-bulk-ink);
    color: #fff;
}

.eh-bulk-notice {
    border-left: 4px solid var(--eh-bulk-green);
    margin: 10px auto;
    max-width: 1500px;
    padding: 12px 14px;
    background: #e9f8ef;
    font-weight: 700;
}

.eh-bulk-notice.error {
    background: #fff0f0;
    border-color: var(--eh-bulk-red);
}

.eh-bulk-layout {
    display: grid;
    gap: 14px;
    grid-template-columns: 240px minmax(0, 1fr);
    margin: 0 auto;
    max-width: 1500px;
}

.eh-bulk-sessions,
.eh-bulk-workspace {
    background: #fff;
    border: 1px solid var(--eh-bulk-line);
    border-radius: 6px;
}

.eh-bulk-sessions {
    align-self: start;
    padding: 12px;
    position: sticky;
    top: 16px;
}

.eh-bulk-sessions h2 {
    font-size: 13px;
    margin: 20px 2px 8px;
    text-transform: uppercase;
}

.eh-bulk-session-list {
    display: grid;
    gap: 6px;
}

.eh-bulk-session-row {
    display: grid;
    gap: 4px;
}

.eh-bulk-session-row.failed {
    border-left: 3px solid var(--eh-bulk-red);
    padding-left: 5px;
}

.eh-bulk-session-list button {
    background: transparent;
    border: 1px solid var(--eh-bulk-line);
    border-radius: 4px;
    color: var(--eh-bulk-ink);
    cursor: pointer;
    display: grid;
    gap: 2px;
    padding: 10px;
    text-align: left;
}

.eh-bulk-session-list button.selected {
    background: var(--eh-bulk-pale);
    border-color: var(--eh-bulk-blue);
}

.eh-bulk-session-list .eh-bulk-discard,
.eh-bulk-discard {
    background: #fff0f0;
    border: 1px solid #e59a9d;
    color: #a40f17;
    font-weight: 800;
    justify-content: center;
    text-align: center;
}

.eh-bulk-detection-failed {
    align-items: center;
    background: #fff0f0;
    border-left: 4px solid var(--eh-bulk-red);
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
    padding: 12px 14px;
}

.eh-bulk-detection-failed .eh-bulk-discard {
    justify-self: start;
    padding: 9px 12px;
}

.eh-bulk-session-list span,
.eh-bulk-muted {
    color: var(--eh-bulk-muted);
    font-size: 11px;
}

.eh-bulk-workspace {
    min-height: 520px;
    padding: 18px;
}

.eh-bulk-title-row {
    align-items: start;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    margin-bottom: 18px;
}

.eh-bulk-title-row h2 {
    color: var(--eh-bulk-ink);
    font-size: 25px;
    margin: 4px 0;
}

.eh-bulk-title-row p {
    color: var(--eh-bulk-muted);
    margin: 0;
}

.eh-bulk-form {
    display: grid;
    gap: 16px;
}

.eh-bulk-new-form {
    grid-template-columns: 1fr 1fr auto;
}

.eh-bulk-new-form.eh-bulk-seller-new-form {
    align-items: stretch;
    grid-template-columns: minmax(0, 1fr) minmax(180px, 32%);
}

.eh-bulk-system-name {
    background: #f4f8fc;
    border: 1px solid #b8c9dd;
    border-radius: 5px;
    display: grid;
    gap: 3px;
    min-height: 60px;
    padding: 9px 11px;
}

.eh-bulk-system-name > span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.eh-bulk-system-name > strong {
    color: var(--eh-bulk-ink);
}

.eh-bulk-form label {
    display: grid;
    gap: 6px;
}

.eh-bulk-form label > span {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.eh-bulk-form input,
.eh-bulk-form select,
.eh-bulk-form textarea {
    background: #fff;
    border: 1px solid #b8c9dd;
    border-radius: 5px;
    color: var(--eh-bulk-ink);
    min-height: 46px;
    padding: 9px 11px;
    width: 100%;
}

.eh-bulk-form textarea {
    min-height: 90px;
}

.eh-bulk-form small {
    color: var(--eh-bulk-muted);
}

.eh-bulk-primary,
.eh-bulk-secondary,
.eh-bulk-compact-actions button,
.eh-bulk-media-controls button,
.eh-bulk-inline-input button {
    border-radius: 5px;
    cursor: pointer;
    font-weight: 800;
    min-height: 42px;
    padding: 9px 14px;
}

.eh-bulk-primary {
    background: var(--eh-bulk-green);
    border: 1px solid var(--eh-bulk-green);
    color: #fff;
}

.eh-bulk-secondary,
.eh-bulk-compact-actions button,
.eh-bulk-media-controls button,
.eh-bulk-inline-input button {
    background: #fff;
    border: 1px solid #b9cade;
    color: var(--eh-bulk-ink);
}

.eh-bulk-primary:disabled,
.eh-bulk-secondary:disabled {
    cursor: wait;
    opacity: .55;
}

.eh-bulk-instruction-band {
    background: var(--eh-bulk-pale);
    border-left: 4px solid var(--eh-bulk-red);
    display: grid;
    gap: 3px;
    margin-top: 20px;
    padding: 14px;
}

.eh-bulk-upload-zone {
    border: 2px dashed #9ab3d1;
    border-radius: 6px;
    min-height: 150px;
    position: relative;
}

.eh-bulk-upload-zone input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

.eh-bulk-upload-zone label {
    align-items: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    inset: 0;
    justify-content: center;
    position: absolute;
}

.eh-bulk-upload-zone strong {
    font-size: 20px;
}

.eh-bulk-upload-zone span {
    color: var(--eh-bulk-muted);
}

.eh-bulk-progress {
    align-items: center;
    display: grid;
    gap: 7px 12px;
    grid-template-columns: 1fr auto;
    margin: 16px 0;
}

.eh-bulk-progress > div {
    background: #dbe5f1;
    grid-column: 1 / -1;
    height: 10px;
    overflow: hidden;
}

.eh-bulk-progress > div span {
    background: var(--eh-bulk-green);
    display: block;
    height: 100%;
    transition: width .2s ease;
}

.eh-bulk-progress small {
    color: var(--eh-bulk-muted);
}

.eh-bulk-media-strip,
.eh-bulk-group-media {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    margin: 16px 0;
}

.eh-bulk-media {
    min-width: 0;
}

.eh-bulk-media-image {
    aspect-ratio: 1 / 1;
    background: #e5edf7;
    border: 1px solid var(--eh-bulk-line);
    overflow: hidden;
    position: relative;
}

.eh-bulk-media-image img,
.eh-bulk-media-image video {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.eh-bulk-media small {
    display: block;
    overflow: hidden;
    padding: 4px 1px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.eh-bulk-video-label {
    background: var(--eh-bulk-ink);
    bottom: 6px;
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    left: 6px;
    padding: 3px 5px;
    position: absolute;
}

.eh-bulk-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 18px;
}

.eh-bulk-wait,
.eh-bulk-finish {
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 420px;
    text-align: center;
}

.eh-bulk-wait.compact {
    min-height: 220px;
}

.eh-bulk-wait h2,
.eh-bulk-finish h2 {
    margin: 14px 0 4px;
}

.eh-bulk-wait p,
.eh-bulk-finish p {
    color: var(--eh-bulk-muted);
    margin: 0 0 16px;
}

.eh-bulk-current-phase {
    color: var(--eh-bulk-navy);
    margin-top: 10px;
}

.eh-bulk-detection-steps {
    list-style: none;
    margin: 18px auto;
    max-width: 440px;
    padding: 0;
    text-align: left;
    width: 100%;
}

.eh-bulk-detection-steps li {
    border-left: 4px solid #d5e0ed;
    color: var(--eh-bulk-muted);
    padding: 9px 14px;
}

.eh-bulk-detection-steps li.current {
    border-left-color: var(--eh-bulk-red);
    color: var(--eh-bulk-navy);
    font-weight: 800;
}

.eh-bulk-detection-steps li.done {
    border-left-color: var(--eh-bulk-green);
    color: var(--eh-bulk-green);
}

.eh-bulk-spinner {
    animation: eh-bulk-spin .8s linear infinite;
    border: 4px solid #d5e0ed;
    border-radius: 50%;
    border-top-color: var(--eh-bulk-red);
    height: 46px;
    width: 46px;
}

@keyframes eh-bulk-spin {
    to { transform: rotate(360deg); }
}

.eh-bulk-confidence {
    background: #e9f8ef;
    color: var(--eh-bulk-green);
    font-size: 11px;
    font-weight: 800;
    padding: 7px 9px;
    text-transform: uppercase;
}

.eh-bulk-groups {
    display: grid;
    gap: 14px;
}

.eh-bulk-group {
    border: 1px solid var(--eh-bulk-line);
    border-radius: 5px;
    overflow: hidden;
}

.eh-bulk-group > header {
    align-items: center;
    background: var(--eh-bulk-pale);
    display: flex;
    justify-content: space-between;
    padding: 10px 12px;
}

.eh-bulk-group > header div:first-child {
    display: grid;
}

.eh-bulk-group > header span {
    color: var(--eh-bulk-red);
    font-size: 10px;
    font-weight: 900;
}

.eh-bulk-group-media {
    margin: 0;
    padding: 12px;
}

.eh-bulk-review-media {
    border: 2px solid transparent;
    min-width: 0;
    padding: 3px;
}

.eh-bulk-review-media.hero {
    border-color: var(--eh-bulk-green);
}

.eh-bulk-review-media > .eh-bulk-media {
    width: 100%;
}

.eh-bulk-media-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.eh-bulk-media-controls button,
.eh-bulk-compact-actions button {
    font-size: 10px;
    min-height: 30px;
    padding: 4px 7px;
}

.eh-bulk-media-controls .eh-bulk-remove-media {
    border-color: #f3a2a8;
    color: #c7192d;
}

.eh-bulk-sticky-actions {
    background: rgba(255, 255, 255, .96);
    bottom: 0;
    border-top: 1px solid var(--eh-bulk-line);
    margin: 20px -18px -18px;
    padding: 12px 18px;
    position: sticky;
}

.eh-bulk-lot-status-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.eh-bulk-lot-status-grid article {
    align-items: center;
    border: 1px solid var(--eh-bulk-line);
    display: grid;
    gap: 9px;
    grid-template-columns: 52px 1fr;
    min-height: 64px;
    padding: 7px;
}

.eh-bulk-lot-status-grid article.active {
    border-color: var(--eh-bulk-red);
}

.eh-bulk-lot-status-grid article.complete {
    align-items: start;
    grid-template-columns: 72px 1fr;
}

.eh-bulk-lot-status-grid img,
.eh-bulk-no-image {
    background: #e6edf6;
    height: 50px;
    object-fit: cover;
    width: 50px;
}

.eh-bulk-lot-status-grid article.complete img,
.eh-bulk-lot-status-grid article.complete .eh-bulk-no-image {
    height: 70px;
    width: 70px;
}

.eh-bulk-lot-status-grid div {
    display: grid;
}

.eh-bulk-lot-status-grid span,
.eh-bulk-lot-status-grid small {
    color: var(--eh-bulk-muted);
    font-size: 11px;
}

.eh-bulk-lot-status-grid a {
    font-size: 11px;
    grid-column: 1 / -1;
}

.eh-bulk-result-title {
    font-size: 12px;
    line-height: 1.25;
    margin-top: 4px;
}

.eh-bulk-result-metrics {
    display: grid !important;
    gap: 4px !important;
    grid-column: 1 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 7px;
}

.eh-bulk-result-metrics span {
    background: #edf3fa;
    border-radius: 4px;
    color: #34506f;
    display: grid;
    padding: 5px 6px;
}

.eh-bulk-result-metrics b {
    color: var(--eh-bulk-ink);
    font-size: 12px;
}

.eh-bulk-question-panel {
    border-top: 3px solid var(--eh-bulk-red);
    margin-top: 22px;
    padding-top: 16px;
}

.eh-bulk-question-panel > header {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 100px 1fr;
    margin-bottom: 18px;
}

.eh-bulk-question-panel > header img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100px;
}

.eh-bulk-question-panel h2 {
    margin: 3px 0;
}

.eh-bulk-question-panel p {
    color: var(--eh-bulk-muted);
    margin: 0;
}

.eh-bulk-operational {
    background: var(--eh-bulk-pale);
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 160px 1fr;
    padding: 14px;
}

.eh-bulk-additional-info {
    background: #fff;
    border: 1px solid var(--eh-bulk-line);
    border-left: 4px solid var(--eh-bulk-red);
    display: grid;
    gap: 10px;
    padding: 14px;
}

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

.eh-bulk-dictation-row small {
    color: var(--eh-bulk-muted);
}

.eh-bulk-inline-input {
    display: grid;
    grid-template-columns: 1fr auto;
}

.eh-bulk-inline-input input {
    border-radius: 5px 0 0 5px;
}

.eh-bulk-inline-input button {
    border-radius: 0 5px 5px 0;
}

.eh-bulk-ai-questions {
    display: grid;
    gap: 13px;
}

.eh-bulk-ai-questions label {
    border-bottom: 1px solid var(--eh-bulk-line);
    padding-bottom: 13px;
}

.eh-bulk-no-questions {
    background: #edf9f2;
    border-left: 4px solid var(--eh-bulk-green);
    display: grid;
    padding: 14px;
}

.eh-bulk-evidence-field {
    border: 1px dashed #9ab3d1 !important;
    cursor: pointer;
    padding: 12px !important;
}

.eh-bulk-evidence-field input {
    min-height: 36px;
}

.valid {
    color: var(--eh-bulk-green) !important;
}

.invalid {
    color: var(--eh-bulk-red) !important;
}

.eh-bulk-loading,
.eh-bulk-fatal,
.eh-bulk-access {
    margin: 30px auto;
    max-width: 900px;
    padding: 30px;
}

@media (max-width: 900px) {
    .eh-bulk-shell { padding: 8px; }
    .eh-bulk-header { grid-template-columns: 1fr; padding: 14px; }
    .eh-bulk-header > div { grid-column: 1 / -1; grid-row: 1; }
    .eh-bulk-back { grid-row: 2; }
    .eh-bulk-layout { grid-template-columns: 1fr; }
    .eh-bulk-sessions { position: static; }
    .eh-bulk-sessions h2,
    .eh-bulk-session-list { display: none; }
    .eh-bulk-sessions.has-failed .eh-bulk-session-list { display: grid; }
    .eh-bulk-sessions.has-failed .eh-bulk-session-row:not(.failed) { display: none; }
    .eh-bulk-new-form,
    .eh-bulk-operational { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
    .eh-bulk-header h1 { font-size: 25px; }
    .eh-bulk-back { font-size: 11px; padding: 8px; }
    .eh-bulk-steps span { align-items: center; flex-direction: column; font-size: 10px; justify-content: center; text-align: center; }
    .eh-bulk-workspace { padding: 12px; }
    .eh-bulk-title-row { display: grid; }
    .eh-bulk-title-row h2 { font-size: 21px; }
    .eh-bulk-media-strip,
    .eh-bulk-group-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .eh-bulk-question-panel > header { grid-template-columns: 74px 1fr; }
    .eh-bulk-question-panel > header img { height: 74px; width: 74px; }
    .eh-bulk-actions .eh-bulk-primary,
    .eh-bulk-actions .eh-bulk-secondary { flex: 1 1 100%; }
}
