#mass-upload-by-file-container {
    display:flex;
    flex-direction:column;
    width:100%;
}

div#mass-upload-select-agents, div#mass-upload-select-display, #mass-upload-select-status-container, div#mass-upload-select-affiliates-container-table, div#mass-upload-select-affiliates-container-file {
    width: 33%;
}

div#mass-upload-select-display {
    padding: 7px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    font-weight: 500;
}

select#mass-upload-select-status, select#mass-upload-select-affiliate-file {
    padding: 10px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    font-weight: 500;
}

#mass-upload-by-file-selects {
    display:flex;
    gap:10px;
    width:100%;
}

#mass-upload-select-display, #mass-upload-select-agents-list {
    width:50%;
}


div#mass-upload-upload-container {
    height: 60vh;
    padding: 50px;
    border: 1px solid #cccccc;
    margin-top: 20px;
    border-radius: 12px;
    background-color: #f3f9ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition-duration: 0.4s;
}

span.mass-upload-heading3 {
    font-size: 16px;
    font-weight: 600;
    color: black;
}

span.mass-upload-drop-here {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
}

/* === Agents Dropdown === */
#mass-upload-select-agents {
    cursor: pointer;
}

#mass-upload-select-agents-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    z-index: 999;
    margin-top: 2px;
}

.agent-option-item {
    padding: 6px 10px;
    cursor: pointer;
}

.agent-option-item:hover {
    background: #f1f1f1;
}

.agent-option-item.selected {
    background: #e6f4ff;
    font-weight: bold;
    color: #0056b3;
}

/* === Selected Agents Display === */
.mass-upload-selected-option-box {
    display: inline-flex;
    align-items: center;
    background: #e6f4ff;
    border: 1px solid #99c9ff;
    border-radius: 4px;
    padding: 3px 6px;
    margin: 3px;
    font-size: 13px;
    max-height: 20px;
}

.mass-upload-selected-option-name {
    margin-right: 5px;
}

.mass-upload-selected-option-remove {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.mass-upload-selected-option-remove svg {
    width: 12px;
    height: 12px;
    fill: #666;
}

/* === File Upload === */
#mass-upload-upload-container {
    border: 2px dashed #2ca9bc;
    padding: 20px;
    margin-top: 15px;
    text-align: center;
    border-radius: 6px;
    cursor: pointer;
}

#mass-upload-upload-container.drag-over {
    background: #f0f8ff;
}

.mass-upload-drop-here {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

button#submit-mass-upload-by-file {
    margin-top: 20px;
    background-color: #414141;
}


/* BY TABLE */

/* === Container for By-Table Shortcode === */
#mass-upload-by-table-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* === Table Selects (Agents + Status) === */
#mass-upload-by-table-selects {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-bottom: 15px;
}

div#mass-upload-select-agents-table,
div#mass-upload-select-display-table,
#mass-upload-select-status-container-table, div#mass-upload-select-affiliates-container-table {
    width: 50%;
}

div#mass-upload-select-display-table {
    padding: 7px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    font-weight: 500;
    cursor: pointer;
}

select#mass-upload-select-status-table, select#mass-upload-select-affiliate-table {
    padding: 10px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    font-weight: 500;
}

/* === Agents Dropdown (By-Table) === */
#mass-upload-select-agents-table {
    position: relative;
    cursor: pointer;
}

#mass-upload-select-agents-list-table {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    z-index: 999;
    margin-top: 2px;
}

.agent-option-item-table {
    padding: 6px 10px;
    cursor: pointer;
}

.agent-option-item-table:hover {
    background: #f1f1f1;
}

.agent-option-item-table.selected {
    background: #e6f4ff;
    font-weight: bold;
    color: #0056b3;
}

/* === Selected Agents Display (By-Table) === */
.mass-upload-selected-option-box-table {
    display: inline-flex;
    align-items: center;
    background: #e6f4ff;
    border: 1px solid #99c9ff;
    border-radius: 4px;
    padding: 3px 6px;
    margin: 3px;
    font-size: 13px;
    max-height: 20px;
}

.mass-upload-selected-option-name-table {
    margin-right: 5px;
}

.mass-upload-selected-option-remove-table {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.mass-upload-selected-option-remove-table svg {
    width: 12px;
    height: 12px;
    fill: #666;
}

/* === Editable Table === */
#mass-upload-table-wrapper {
    max-width: 100%;
    overflow-x: auto;
    margin-top: 10px;
}

#mass-upload-free-table {
    border-collapse: collapse;
    width: 100%;
}

#mass-upload-free-table th,
#mass-upload-free-table td {
    border: 1px solid #ddd;
    padding: 4px;
    text-align: center;
}

#mass-upload-free-table .row-number {
    background: #f3f3f3;
    font-weight: bold;
    width: 40px;
}

#mass-upload-free-table .input-cell {
    width: 100%;
    border: none;
    padding: 4px;
    outline: none;
    font-weight:500;
}

/* ✅ Selected cells */
#mass-upload-free-table .input-cell.selected {
    background-color: #c8e6ff;
    color: black;
}

/* ✅ Selected-first cell */
#mass-upload-free-table .input-cell.selected-first {
    background-color: #82bfff;
    color: black;
}

/* ✅ Placeholder colors for selected cells */
#mass-upload-free-table .input-cell.selected::placeholder {
    color: #333; /* Dark placeholder for light-blue background */
    opacity: 0.7;
}

#mass-upload-free-table .input-cell.selected-first::placeholder {
    color: #f1f1f1; /* Light placeholder for darker blue background */
    opacity: 0.9;
}


table#mass-upload-free-table td {
    padding: 0px;
}

button#submit-mass-upload-by-table {
    margin-top: 20px;
    background-color: #414141;
}

.input-cell.invalid-country {
    background-color: #ffe6e6!important; /* light reddish background */
    border: 1px solid #ff4d4d!important; /* bright red border */
    color: #b30000!important; /* dark red text */
}

#list-of-countries {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 250px;
    width: 260px;
    overflow-y: auto;
    padding: 6px;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#list-of-countries.hidden {
    display: none;
}

.country-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.country-option:hover {
    background: #f1f7ff;
}

.country-option-flag {
    font-size: 18px;
}

.country-option-name {
    flex-grow: 1;
    margin-left: 6px;
    font-weight: 500;
}

.country-option-code {
    color: #555;
    font-size: 12px;
}

.country-option-flag img {
    width:24px;
}


/* Upload History */
div#upload-history-container {
    height: calc(100vh - 250px);
    max-height: calc(100vh - 250px);
    display: flex;
    gap: 10px;
}

div#upload-history-list {
    width: 50%;
    overflow-y: scroll;
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-history-item {
    background-color: #f1f2f3;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #cccccc;
    display: flex;
    justify-content: space-between;
    transition-duration:0.4s;
    cursor:pointer;
    font-weight: 500;
    text-transform: capitalize;
    font-size: 14px;
}

.upload-history-item:hover{
    background-color:#dadada;
}

.upload-history-item.selected {
    background-color: #BBD6ED;
    color: black;
}

.upload-history-item.selected:hover {
    background-color: #BBD6ED;
    color: black;
}

div.upload-history-meta, span.upload-history-author, span.upload-history-created {
    width: 33%;
    display: flex;
    align-items: center;
    justify-content: center;
}

div#upload-history-data-list {
    width: 50%;
    font-size: 1.2em;
    overflow-y: auto;
}

.upload-leads-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upload-lead-item {
    padding: 5px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    transition-duration: 0.4s;
    display: flex;
    justify-content: space-between;
}

.upload-lead-item span {
    width: 33%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 500;
    color: black;
}

/* ===== Bulk Upload page shell ===== */
.bulk-upload-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.bulk-upload-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    background: #fff;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.bulk-upload-tab {
    appearance: none;
    border: 0;
    background: transparent;
    padding: 14px 22px;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
}

.bulk-upload-tab.is-active {
    color: #0f172a;
    background: #eef6ff;
    border-bottom-color: #2ca9bc;
}

.bulk-upload-panel.hidden,
.bulk-stage.hidden,
.hidden {
    display: none !important;
}

.bulk-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px 20px;
    margin-top: 16px;
}

.bulk-selects-row {
    display: flex;
    gap: 10px;
    width: 100%;
    align-items: stretch;
}

.bulk-selects-row > * {
    flex: 1;
    min-width: 0;
}

div#mass-upload-select-agents,
div#mass-upload-select-agents-table,
#mass-upload-select-status-container,
#mass-upload-select-status-container-table,
div#mass-upload-select-affiliates-container-file,
div#mass-upload-select-affiliates-container-table {
    width: auto;
}

#mass-upload-select-display,
#mass-upload-select-display-table,
#mass-upload-select-agents-list,
#mass-upload-select-agents-list-table {
    width: 100%;
}

#mass-upload-select-display,
#mass-upload-select-display-table {
    min-height: 42px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    cursor: pointer;
}

button#submit-mass-upload-by-file,
button#submit-mass-upload-by-table,
.bulk-upload-all {
    margin-top: 16px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: #2d2d2d;
    color: #fff;
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 16px 20px;
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

button#submit-mass-upload-by-file:hover:not(:disabled),
button#submit-mass-upload-by-table:hover:not(:disabled),
.bulk-upload-all:hover:not(:disabled) {
    background: #1a1a1a;
}

button#submit-mass-upload-by-file:disabled,
.bulk-upload-all:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

#mass-upload-upload-container {
    height: min(52vh, 420px);
    border: 2px dashed #2ca9bc;
    background: #f3f9ff;
}

#mass-upload-upload-container.drag-over {
    background: #e5f4ff;
    border-color: #178a9b;
}

/* Stage heads / actions */
.bulk-stage-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.bulk-stage-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.bulk-stage-head p {
    margin: 0;
    color: #6b7280;
    font-size: 13px;
}

.bulk-stage-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.bulk-btn-primary,
.bulk-btn-ghost {
    appearance: none;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 16px;
    cursor: pointer;
}

.bulk-btn-primary {
    border: 0;
    background: #2ca9bc;
    color: #fff;
}

.bulk-btn-primary:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bulk-btn-ghost {
    border: 1px solid #d1d5db;
    background: #fff;
    color: #374151;
}

.bulk-mapping-meta {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #475569;
    font-weight: 600;
}

.bulk-mapping-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 18px;
}

@media (max-width: 900px) {
    .bulk-mapping-grid {
        grid-template-columns: 1fr;
    }

    .bulk-selects-row {
        flex-direction: column;
    }
}

.bulk-mapping-sources h3,
.bulk-mapping-targets h3 {
    margin: 0 0 10px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.bulk-source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 120px;
    padding: 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
}

.bulk-source-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    cursor: grab;
    user-select: none;
}

.bulk-source-chip.is-mapped {
    opacity: 0.45;
}

.bulk-source-chip.is-dragging {
    opacity: 0.7;
}

.bulk-target-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bulk-target-slot {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: center;
}

.bulk-target-label {
    font-size: 13px;
    font-weight: 600;
    color: #0f172a;
}

.bulk-target-label .req {
    color: #dc2626;
}

.bulk-target-label .soft-req {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #94a3b8;
}

.bulk-target-dropzone {
    min-height: 44px;
    border: 2px dashed #cbd5e1;
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    background: #fff;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.bulk-target-dropzone.drag-over,
.bulk-target-dropzone.has-value {
    border-style: solid;
    border-color: #2ca9bc;
    background: #f0fbfd;
}

.bulk-target-placeholder {
    color: #94a3b8;
    font-size: 13px;
}

.bulk-mapped-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #e6f4ff;
    border: 1px solid #99c9ff;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 600;
}

.bulk-unmap {
    appearance: none;
    border: 0;
    background: transparent;
    color: #64748b;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
}

.bulk-hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: #64748b;
}

.bulk-hint.is-ok {
    color: #15803d;
}

.bulk-hint.is-bad {
    color: #b45309;
}

.bulk-country-summary,
.bulk-preview-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.bulk-stat {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 10px 14px;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bulk-stat strong {
    font-size: 18px;
    color: #0f172a;
}

.bulk-stat span {
    font-size: 12px;
    color: #64748b;
}

.bulk-unmatched-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    background: #fff7f7;
    border-radius: 10px;
    margin-bottom: 8px;
}

.bulk-unmatched-row.is-resolved {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.bulk-unmatched-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.bulk-unmatched-info span {
    font-size: 12px;
    color: #64748b;
}

.bulk-unmatched-pick {
    display: flex;
    gap: 8px;
    align-items: center;
    min-width: min(420px, 100%);
}

.bulk-country-search,
.bulk-country-select {
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
}

.bulk-country-search {
    width: 150px;
}

.bulk-country-select {
    flex: 1;
    min-width: 180px;
}

.bulk-all-matched {
    padding: 14px;
    border-radius: 10px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-weight: 600;
}

.bulk-country-actions {
    justify-content: space-between;
}

.bulk-preview-table-wrap {
    overflow: auto;
    max-height: 360px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.bulk-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.bulk-preview-table th,
.bulk-preview-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.bulk-preview-table th {
    position: sticky;
    top: 0;
    background: #f8fafc;
    font-weight: 700;
    z-index: 1;
}

.bulk-note-cell {
    max-width: 260px;
    white-space: normal;
    color: #475569;
    font-size: 12px;
}

.bulk-preview-more {
    text-align: center;
    color: #64748b;
    font-weight: 600;
}

.bulk-country-help {
    appearance: none;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 12px;
    color: #2ca9bc;
}

#mass-upload-table-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    max-height: min(60vh, 560px);
    overflow: auto;
}

.country-option-flag img {
    width: 24px;
    height: auto;
    display: block;
}

.bulk-dupe-option {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 650;
    color: #334155;
    cursor: pointer;
    user-select: none;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}

.bulk-dupe-option input {
    width: 16px;
    height: 16px;
    accent-color: #2ca9bc;
}

.bulk-campaign-unified {
    margin: 12px 0;
    padding: 14px 16px;
}

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

.bulk-campaign-input {
    flex: 1 1 220px;
    min-width: 180px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    font-size: 14px;
}

.bulk-campaign-check-btn {
    flex: 0 0 auto;
}

.bulk-campaign-status {
    flex: 1 1 220px;
    font-size: 13px;
    font-weight: 650;
    color: #64748b;
}

.bulk-campaign-status.is-exists {
    color: #92400e;
}

.bulk-campaign-status.is-new {
    color: #047857;
}

.bulk-campaign-tick {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.4em;
    height: 1.4em;
    margin-right: 4px;
    border-radius: 999px;
    background: color-mix(in srgb, #10b981 18%, #fff);
    color: #047857;
    font-weight: 800;
}

.bulk-upload-all.hidden,
#submit-mass-upload-by-table[hidden] {
    display: none !important;
}

body.bulk-upload-busy {
    overflow: hidden;
}

.bulk-upload-progress {
    position: fixed;
    inset: 0;
    z-index: 13000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.bulk-upload-progress.hidden {
    display: none !important;
}

.bulk-upload-progress-card {
    width: min(640px, 100%);
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
    padding: 22px 22px 20px;
    max-height: calc(100vh - 40px);
    overflow: auto;
}

.bulk-upload-progress-head h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.bulk-upload-progress-head p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.bulk-upload-progress-meter {
    margin-top: 18px;
}

.bulk-upload-progress-pct {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: #0f172a;
    margin-bottom: 10px;
}

.bulk-upload-progress-track {
    height: 14px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
    position: relative;
}

.bulk-upload-progress-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2ca9bc, #1e88e5 55%, #7c3aed);
    box-shadow: 0 0 18px rgba(44, 169, 188, 0.65), 0 0 6px rgba(124, 58, 237, 0.45);
    transition: width 0.35s ease;
    position: relative;
}

.bulk-upload-progress-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        transparent 0%,
        rgba(255, 255, 255, 0.45) 45%,
        transparent 70%
    );
    background-size: 220% 100%;
    animation: bulkUploadGlow 1.6s linear infinite;
}

@keyframes bulkUploadGlow {
    0% { background-position: 120% 0; }
    100% { background-position: -40% 0; }
}

.bulk-upload-tip {
    margin-top: 18px;
    padding: 14px 14px 12px;
    border-radius: 12px;
    background: linear-gradient(180deg, #f8fafc, #eef6f8);
    border: 1px solid #e2e8f0;
    min-height: 110px;
}

.bulk-upload-tip-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #2ca9bc;
    margin-bottom: 6px;
}

.bulk-upload-tip-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.bulk-upload-tip-body {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #475569;
}

/* Subnav: Upload | History */
.bulk-subnav {
    display: flex;
    gap: 8px;
    margin-bottom: 4px;
}
.bulk-subnav-link {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    color: #475569;
    background: #f1f5f9;
}
.bulk-subnav-link.is-active {
    background: #0f766e;
    color: #fff;
}
.bulk-flash {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 14px;
}
.bulk-flash.is-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bulk-flash.is-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bulk-history-filters { display: flex; gap: 12px; align-items: end; }
.bulk-history-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #64748b; }
.bulk-history-filters select { min-width: 160px; padding: 8px 10px; border-radius: 8px; border: 1px solid #cbd5e1; }
.bulk-history-table-wrap { overflow: auto; background: #fff; border-radius: 10px; border: 1px solid #e2e8f0; }
.bulk-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bulk-history-table th, .bulk-history-table td { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; text-align: left; }
.bulk-history-table th { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #64748b; }
.bulk-history-empty { text-align: center; color: #64748b; padding: 28px !important; }
.bulk-job-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: #e2e8f0; color: #334155; }
.bulk-job-status.is-completed { background: #d1fae5; color: #065f46; }
.bulk-job-status.is-processing { background: #dbeafe; color: #1e40af; }
.bulk-job-status.is-failed { background: #fee2e2; color: #991b1b; }
.bulk-job-status.is-reverted { background: #fef3c7; color: #92400e; }
.bulk-link { color: #0f766e; font-weight: 700; text-decoration: none; }
.bulk-history-detail { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 18px; }
.bulk-history-detail-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.bulk-history-title { margin: 0; font-size: 20px; }
.bulk-history-sub { margin: 6px 0 0; color: #64748b; font-size: 13px; }
.bulk-history-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.bulk-history-stats > div { background: #f8fafc; border-radius: 8px; padding: 10px 12px; }
.bulk-history-stats span { display: block; font-size: 11px; color: #64748b; text-transform: uppercase; font-weight: 700; }
.bulk-history-stats strong { font-size: 16px; }
.bulk-chip { display: inline-flex; margin: 0 6px 6px 0; padding: 4px 10px; border-radius: 999px; background: #ecfeff; color: #155e75; font-size: 12px; font-weight: 600; }
.bulk-muted { color: #64748b; font-size: 13px; }
.btn-danger { background: #b91c1c; color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; }
.bulk-history-pager { margin-top: 12px; }

/* ===== Leads-upload hub shell ===== */
html, body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", Candara, sans-serif;
    background: #f3f6fa;
    color: #0f172a;
}

.hub-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 420px at 12% -8%, rgba(44, 169, 188, 0.16), transparent 55%),
        #eef3f8;
}

.hub-login-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 28px 26px 24px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.hub-login-card h1 {
    margin: 0 0 4px;
    font-size: 22px;
}

.hub-login-card .muted {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 13px;
}

.hub-login-card label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 12px;
}

.hub-login-card input {
    font: inherit;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
}

.hub-login-card button[type="submit"] {
    width: 100%;
    margin-top: 8px;
    border: 0;
    border-radius: 10px;
    background: #0f766e;
    color: #fff;
    font: inherit;
    font-weight: 700;
    padding: 12px 14px;
    cursor: pointer;
}

.hub-login-error {
    min-height: 1.2em;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 650;
}

.hub-shell {
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 18px 48px;
}

.hub-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.hub-top h1 {
    margin: 0 0 4px;
    font-size: 26px;
}

.hub-top .muted {
    margin: 0;
    color: #64748b;
    font-size: 13px;
}

.hub-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hub-who {
    font-size: 13px;
    font-weight: 650;
    color: #475569;
}

.hub-toast {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 14000;
    max-width: min(420px, calc(100vw - 32px));
    background: #0f172a;
    color: #fff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.28);
}

.hub-toast h3 {
    margin: 0 0 4px;
    font-size: 14px;
}

.hub-toast p {
    margin: 0;
    font-size: 13px;
    color: #cbd5e1;
}

.hub-toast.is-error { background: #7f1d1d; }
.hub-toast.is-success { background: #065f46; }
.hub-toast.is-info { background: #1e3a5f; }

.office-picker {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 16px 18px;
}

.office-picker-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.office-picker-head h2 {
    margin: 0;
    font-size: 15px;
}

.office-picker-actions {
    display: flex;
    gap: 8px;
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.office-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
}

.office-check input {
    margin-top: 2px;
    accent-color: #0f766e;
}

.office-check.is-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.office-check small {
    display: block;
    font-weight: 500;
    color: #64748b;
}

select#mass-upload-select-status {
    padding: 10px 20px;
    border: 1px solid #cccccc;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    width: 100%;
    font-weight: 500;
}

.campaign-office-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campaign-office-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    border-radius: 10px;
    font-size: 13px;
}

.campaign-office-row input {
    margin-top: 3px;
    accent-color: #b45309;
}

.campaign-office-row strong {
    display: block;
}

.campaign-office-row span {
    color: #92400e;
}

.campaign-unreachable {
    border-color: #fecaca;
    background: #fef2f2;
}

.campaign-unreachable span {
    color: #991b1b;
}

.job-office-list {
    margin-top: 8px;
    font-size: 13px;
    max-height: 280px;
    overflow: auto;
}

.job-office-head {
    margin: 16px 0 8px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
}

.job-office-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid #e2e8f0;
}

.job-office-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: baseline;
}

.job-office-meta span {
    color: #64748b;
    font-size: 12px;
    text-align: right;
}

.job-office-meter {
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-office-pct {
    width: 36px;
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
}

.job-office-track {
    flex: 1;
    height: 8px;
    border-radius: 999px;
    background: #e8eef5;
    overflow: hidden;
}

.job-office-fill {
    height: 100%;
    width: 0%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2ca9bc, #1e88e5 55%, #7c3aed);
    box-shadow: 0 0 10px rgba(44, 169, 188, 0.45);
    transition: width 0.35s ease;
}

.job-office-row.is-failed .job-office-fill {
    background: linear-gradient(90deg, #ef4444, #b91c1c);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.35);
}

.job-office-row.is-failed .job-office-meta span {
    color: #b91c1c;
}

.job-office-row.is-skipped .job-office-fill {
    background: #cbd5e1;
    box-shadow: none;
}

.job-office-row.is-done .job-office-fill {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.35);
}

.hub-nav {
    display: flex;
    gap: 8px;
    margin: 0 0 16px;
    padding: 4px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    width: fit-content;
}

.hub-nav-btn {
    border: 0;
    background: transparent;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
}

.hub-nav-btn.is-active {
    background: #0f766e;
    color: #fff;
}

.offices-manage-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}

.office-manage-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px 16px;
}

.office-manage-card h3 {
    margin: 0 0 2px;
    font-size: 16px;
}

.office-manage-card h4 {
    margin: 12px 0 8px;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6b7280;
}

.contact-repeater {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-row {
    display: flex;
    gap: 8px;
}

.contact-row input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 13px;
}

.contact-remove {
    min-width: 36px;
    padding: 0 8px;
}

.office-manage-actions {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.sheets-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}

.sheets-toolbar h2 {
    margin: 0 0 4px;
    font-size: 16px;
}

.sheets-toolbar-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.sheets-filter-grid {
    margin-bottom: 12px;
}

.sheets-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
}

.sheets-errors p {
    margin: 0 0 4px;
}

.sheets-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sheet-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.sheet-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 10px;
}

.sheet-card-head h3 {
    margin: 0 0 4px;
    font-size: 17px;
}

.sheet-office-list {
    border-top: 1px solid #f3f4f6;
}

.sheet-office-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.sheet-office-row .muted {
    display: block;
    font-size: 12px;
}

.sheet-office-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.camp-ticker-label {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.camp-public-ticker {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    border-radius: 999px;
    padding: 3px 8px 3px 3px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 800;
}

.camp-public-ticker.is-off {
    background: #e5e7eb;
    color: #4b5563;
}

.camp-public-ticker.is-on {
    background: #dcfce7;
    color: #166534;
}

.camp-ticker-knob {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.camp-public-ticker.is-on .camp-ticker-knob {
    background: #22c55e;
}

.camp-public-ticker.is-pending {
    opacity: 0.65;
    pointer-events: none;
}

.hub-btn-danger {
    border: 0;
    background: #b91c1c;
    color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.hub-modal {
    position: fixed;
    inset: 0;
    z-index: 14000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.55);
}

.hub-modal.hidden {
    display: none !important;
}

.hub-modal-card {
    width: min(480px, 100%);
    background: #fff;
    border-radius: 14px;
    padding: 18px 18px 16px;
}

.hub-modal-card h2 {
    margin: 0 0 6px;
}

.sheets-delete-offices {
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 240px;
    overflow: auto;
}

.sheets-delete-confirm {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    margin-bottom: 12px;
}

.sheets-delete-confirm input {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 8px 10px;
}


