.cli-upload-bar {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.cli-upload-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cli-sample-row {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.cli-sample-link {
    font-size: 13px;
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.cli-sample-link:hover {
    color: #005177;
}

.cli-sample-link-secondary {
    font-size: 12px;
    color: #666;
}

.cli-sample-link-secondary:hover {
    color: #333;
}

.cli-upload-btn {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.cli-upload-btn:hover {
    background: #005177;
}

.cli-upload-helper {
    font-size: 13px;
    color: #666;
}

.cli-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cli-modal-content {
    background: #fff;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.cli-modal-header {
    padding: 20px;
    border-bottom: 1px solid #ddd;
}

.cli-modal-header h2 {
    margin: 0 0 5px 0;
    font-size: 20px;
}

.cli-modal-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Warning line in the popup header when one or more rows have flagged data. */
.cli-modal-notice {
    margin: 8px 0 0 0;
    color: #d63638;
    font-size: 13px;
    font-weight: 500;
}

/* A read-only cell whose value failed validation (bad phone/email, or a server-side
   Gravity Forms error). Lets the message wrap instead of forcing the row wider. */
.cli-confirm-table td.cli-cell-error {
    background-color: #fcf0f1;
    color: #d63638;
    font-weight: 600;
    white-space: normal;
}

.cli-table-container {
    flex: 1;
    overflow: auto;
    padding: 0;
}

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

.cli-table th, .cli-table td {
    border: 1px solid #eee;
    padding: 8px;
    vertical-align: top;
}

.cli-table th {
    background: #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 10;
    text-align: left;
    font-weight: 600;
}

.cli-table input[type="text"], 
.cli-table select, 
.cli-table textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 4px;
    border: 1px solid #ccc;
    border-radius: 3px;
}

.cli-table textarea {
    resize: vertical;
    min-height: 40px;
}

.cli-needs-fix {
    border: 1px solid #d63638 !important;
    background-color: #fcf0f1 !important;
}

.cli-remove-btn {
    background: #d63638;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 4px 8px;
    font-weight: bold;
}

.cli-remove-btn:hover {
    background: #b32d2e;
}

.cli-error-msg {
    color: #d63638;
    font-size: 11px;
    margin-top: 4px;
}

.cli-row-error td {
    background-color: #fcf0f1;
    color: #d63638;
    font-weight: 500;
    padding: 8px;
}

.cli-modal-footer {
    padding: 20px;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    background: #fafafa;
}

.cli-status-text {
    font-size: 14px;
    color: #666;
}

.cli-btn-primary {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.cli-btn-primary:hover:not(:disabled) {
    background: #005177;
}

.cli-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cli-btn-secondary {
    background: #f3f4f5;
    color: #3c434a;
    border: 1px solid #8c8f94;
    padding: 9px 19px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.cli-btn-secondary:hover:not(:disabled) {
    background: #f1f1f1;
}

.cli-btn-secondary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Final "verify everything looks correct" popup — sits on top of the review table. */
.cli-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cli-confirm-box {
    background: #fff;
    width: 95%;
    max-width: 1400px;
    max-height: 85vh;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 6px 30px rgba(0,0,0,0.25);
}

.cli-confirm-header {
    padding: 20px 20px 15px;
}

.cli-confirm-header h2 {
    margin: 0 0 5px 0;
    font-size: 19px;
}

.cli-confirm-subtitle {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.cli-confirm-body {
    flex: 1;
    overflow: auto;
    padding: 0 20px;
}

.cli-confirm-table-wrap {
    overflow: auto;
    max-height: 100%;
}

/* Read-only verify table: values shown as plain text, not inputs. */
.cli-confirm-table td {
    color: #333;
    white-space: nowrap;
}

.cli-confirm-rownum {
    color: #888;
    font-weight: 600;
    text-align: center;
    width: 36px;
}

.cli-confirm-empty {
    color: #bbb;
    text-align: center;
}

.cli-confirm-footer {
    padding: 15px 20px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
    background: #fafafa;
    border-radius: 0 0 5px 5px;
}

/* Success view shown in the popup after a successful import. */
.cli-success {
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cli-success-check {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #edf7ee;
    color: #1e8e3e;
    font-size: 34px;
    line-height: 64px;
    margin-bottom: 18px;
    animation: cli-pop 0.25s ease-out;
}

@keyframes cli-pop {
    0%   { transform: scale(0.5); opacity: 0; }
    70%  { transform: scale(1.08); }
    100% { transform: scale(1); opacity: 1; }
}

.cli-success-title {
    margin: 0 0 6px 0;
    font-size: 22px;
    color: #1d2327;
}

.cli-success-message {
    margin: 0 0 24px 0;
    color: #666;
    font-size: 15px;
}

.cli-success .cli-btn-primary {
    min-width: 120px;
}
