/* ==========================================================================
   StartAi.IdentityCore - Scoped Module Stylesheet (Batch 5 Frontend)
   Strictly scoped under .startai-identity-container to avoid DNN skin conflicts
   ========================================================================== */

.startai-identity-container {
    --idv-primary: #00b4a7;
    --idv-primary-dark: #00968b;
    --idv-primary-light: #e6f7f6;
    --idv-secondary: #4b5563;
    --idv-surface: #ffffff;
    --idv-bg: #f8fafc;
    --idv-border: #e2e8f0;
    --idv-border-focus: #00b4a7;
    --idv-text-main: #0f172a;
    --idv-text-muted: #64748b;
    --idv-text-light: #94a3b8;
    --idv-success: #10b981;
    --idv-success-bg: #ecfdf5;
    --idv-warning: #f59e0b;
    --idv-warning-bg: #fffbeb;
    --idv-danger: #ef4444;
    --idv-danger-bg: #fef2f2;
    --idv-info: #3b82f6;
    --idv-info-bg: #eff6ff;
    --idv-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --idv-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --idv-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --idv-radius: 8px;
    --idv-radius-lg: 12px;

    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--idv-text-main);
    background-color: var(--idv-bg);
    padding: 24px;
    border-radius: var(--idv-radius-lg);
    border: 1px solid var(--idv-border);
    box-sizing: border-box;
    position: relative;
}

.startai-identity-container *,
.startai-identity-container *::before,
.startai-identity-container *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Header & Badges
   ========================================================================== */

.startai-identity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--idv-border);
}

.startai-identity-badge {
    display: inline-block;
    background: var(--idv-primary);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.startai-identity-badge.admin-badge {
    background: #6366f1;
}

.startai-identity-title {
    margin: 4px 0 2px 0;
    font-size: 22px;
    font-weight: 700;
    color: var(--idv-text-main);
}

.startai-identity-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--idv-text-muted);
}

/* Status Badges */
.idv-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

.idv-badge-info {
    background-color: var(--idv-info-bg);
    color: var(--idv-info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.idv-badge-success {
    background-color: var(--idv-success-bg);
    color: var(--idv-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.idv-badge-warning {
    background-color: var(--idv-warning-bg);
    color: var(--idv-warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.idv-badge-danger {
    background-color: var(--idv-danger-bg);
    color: var(--idv-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.idv-badge-muted {
    background-color: #f1f5f9;
    color: var(--idv-text-muted);
    border: 1px solid #e2e8f0;
}

/* ==========================================================================
   Alerts & Notifications
   ========================================================================== */

.idv-alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-radius: var(--idv-radius);
    margin-bottom: 20px;
    font-size: 13px;
    background-color: var(--idv-info-bg);
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.idv-alert-danger {
    background-color: var(--idv-danger-bg);
    border-color: #fecaca;
    color: #b91c1c;
}

.idv-alert-success {
    background-color: var(--idv-success-bg);
    border-color: #a7f3d0;
    color: #065f46;
}

.idv-alert-warning {
    background-color: var(--idv-warning-bg);
    border-color: #fde68a;
    color: #92400e;
}

.idv-alert-icon {
    font-size: 16px;
    margin-right: 10px;
    flex-shrink: 0;
}

.idv-alert-message {
    flex-grow: 1;
}

.idv-alert-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
    padding: 0;
    margin-left: 10px;
}

.idv-alert-close:hover {
    opacity: 1;
}

/* ==========================================================================
   Stepper Navigation
   ========================================================================== */

.idv-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    background: var(--idv-surface);
    padding: 16px 24px;
    border-radius: var(--idv-radius);
    border: 1px solid var(--idv-border);
}

.idv-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    cursor: default;
    z-index: 1;
}

.idv-step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: #f1f5f9;
    color: var(--idv-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    border: 2px solid var(--idv-border);
    transition: all 0.2s ease-in-out;
}

.idv-step-label {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--idv-text-muted);
}

.idv-step.active .idv-step-circle {
    background-color: var(--idv-primary);
    color: #ffffff;
    border-color: var(--idv-primary);
    box-shadow: 0 0 0 4px var(--idv-primary-light);
}

.idv-step.active .idv-step-label {
    color: var(--idv-primary-dark);
}

.idv-step.completed .idv-step-circle {
    background-color: var(--idv-success);
    color: #ffffff;
    border-color: var(--idv-success);
}

.idv-step.completed .idv-step-label {
    color: var(--idv-success);
}

.idv-step-line {
    flex-grow: 1;
    height: 2px;
    background-color: var(--idv-border);
    margin: -16px 12px 0 12px;
    z-index: 0;
}

/* ==========================================================================
   Cards & Layouts
   ========================================================================== */

.idv-card {
    background: var(--idv-surface);
    border-radius: var(--idv-radius);
    border: 1px solid var(--idv-border);
    margin-bottom: 20px;
    box-shadow: var(--idv-shadow-sm);
    overflow: hidden;
}

.idv-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--idv-border);
    background-color: #fafbfc;
}

.idv-card-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--idv-text-main);
}

.idv-card-body {
    padding: 20px;
}

.idv-hint {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--idv-text-muted);
}

.idv-step-pane {
    display: none;
}

.idv-step-pane.active {
    display: block;
}

/* ==========================================================================
   Form Controls & Radio Cards
   ========================================================================== */

.idv-form-group {
    margin-bottom: 18px;
}

.idv-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--idv-text-main);
    margin-bottom: 6px;
}

.idv-required {
    color: var(--idv-danger);
}

.idv-input,
.idv-select,
.idv-textarea {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--idv-text-main);
    background-color: #ffffff;
    border: 1px solid var(--idv-border);
    border-radius: var(--idv-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.idv-input:focus,
.idv-select:focus,
.idv-textarea:focus {
    outline: none;
    border-color: var(--idv-border-focus);
    box-shadow: 0 0 0 3px rgba(0, 180, 167, 0.15);
}

.idv-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.idv-counter {
    position: absolute;
    right: 12px;
    font-size: 11px;
    color: var(--idv-text-light);
    pointer-events: none;
}

.idv-form-row {
    display: flex;
    gap: 16px;
}

.idv-col-6 {
    flex: 1;
}

.idv-field-error {
    color: var(--idv-danger);
    font-size: 12px;
    margin-top: 4px;
    font-weight: 500;
}

/* Radio Cards (Business Type Selection) */
.idv-radio-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.idv-radio-card {
    position: relative;
    border: 2px solid var(--idv-border);
    border-radius: var(--idv-radius);
    padding: 16px;
    cursor: pointer;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
    display: flex;
    flex-direction: column;
}

.idv-radio-card:hover {
    border-color: #cbd5e1;
    background-color: #f8fafc;
}

.idv-radio-card.active {
    border-color: var(--idv-primary);
    background-color: var(--idv-primary-light);
}

.idv-radio-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.idv-radio-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.idv-radio-indicator {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--idv-border);
    display: inline-block;
    position: relative;
    transition: all 0.2s ease-in-out;
}

.idv-radio-card.active .idv-radio-indicator {
    border-color: var(--idv-primary);
    background-color: var(--idv-primary);
}

.idv-radio-card.active .idv-radio-indicator::after {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #ffffff;
}

.idv-radio-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--idv-text-main);
}

.idv-radio-card-desc {
    margin: 0;
    font-size: 12px;
    color: var(--idv-text-muted);
    line-height: 1.4;
}

/* ==========================================================================
   File Dropzones & Document Uploads
   ========================================================================== */

.idv-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.idv-upload-card {
    border: 1px solid var(--idv-border);
    border-radius: var(--idv-radius);
    padding: 16px;
    background: #ffffff;
}

.idv-upload-card-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--idv-text-main);
}

.idv-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: var(--idv-radius);
    padding: 24px 16px;
    text-align: center;
    background-color: #fafbfc;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.idv-dropzone:hover,
.idv-dropzone.drag-over {
    border-color: var(--idv-primary);
    background-color: var(--idv-primary-light);
}

.idv-upload-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: inline-block;
}

.idv-dropzone-text {
    margin: 0 0 4px 0;
    font-size: 13px;
    font-weight: 500;
}

.idv-browse-link {
    color: var(--idv-primary-dark);
    font-weight: 700;
    text-decoration: underline;
}

.idv-dropzone-subtext {
    font-size: 11px;
    color: var(--idv-text-light);
}

/* File Preview Box */
.idv-preview-box {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.idv-preview-img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
    border-radius: 4px;
    border: 1px solid var(--idv-border);
    margin-bottom: 8px;
}

.idv-preview-info {
    font-size: 12px;
    margin-bottom: 8px;
    text-align: center;
}

.idv-preview-name {
    font-weight: 600;
    display: block;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.idv-preview-size {
    color: var(--idv-text-light);
    font-size: 11px;
    display: block;
    margin-bottom: 4px;
}

.idv-preview-actions {
    display: flex;
    gap: 12px;
}

.idv-btn-link {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--idv-primary-dark);
    cursor: pointer;
    padding: 0;
    text-decoration: underline;
}

.idv-danger-text {
    color: var(--idv-danger) !important;
}

/* ==========================================================================
   Summary & Decree 13 Consent
   ========================================================================== */

.idv-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--idv-border);
    margin-bottom: 20px;
}

.idv-summary-item {
    display: flex;
    flex-direction: column;
}

.idv-summary-label {
    font-size: 12px;
    color: var(--idv-text-muted);
}

.idv-summary-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--idv-text-main);
    word-break: break-word;
}

.idv-consent-box {
    background-color: #fafbfc;
    border: 1px solid var(--idv-border);
    border-radius: var(--idv-radius);
    padding: 16px;
}

.idv-consent-box h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--idv-text-main);
}

.idv-consent-terms {
    max-height: 120px;
    overflow-y: auto;
    font-size: 12px;
    color: var(--idv-text-muted);
    border: 1px solid var(--idv-border);
    background: #ffffff;
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 14px;
}

.idv-consent-terms p {
    margin: 0 0 6px 0;
}

.idv-consent-terms p:last-child {
    margin-bottom: 0;
}

.idv-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.idv-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ==========================================================================
   Step 5: Result Tracking & History
   ========================================================================== */

.idv-result-card {
    text-align: center;
    padding: 20px;
}

.idv-result-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.idv-text-center {
    text-align: center;
}

.idv-result-meta-box {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid var(--idv-border);
    border-radius: var(--idv-radius);
    padding: 16px 24px;
    margin: 20px auto;
    text-align: left;
    min-width: 320px;
}

.idv-meta-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.idv-meta-row:last-child {
    margin-bottom: 0;
}

.idv-meta-label {
    color: var(--idv-text-muted);
    margin-right: 16px;
}

.idv-text-highlight {
    color: var(--idv-danger);
    font-weight: 600;
}

.idv-need-info-container {
    background: var(--idv-warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: var(--idv-radius);
    padding: 16px;
    margin: 20px 0;
    text-align: left;
}

.idv-need-info-container h4 {
    margin: 0 0 6px 0;
    color: #92400e;
}

.idv-need-info-container .idv-textarea {
    margin: 10px 0;
}

.idv-history-section {
    margin-top: 30px;
    text-align: left;
    border-top: 1px solid var(--idv-border);
    padding-top: 20px;
}

.idv-history-section h4 {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 700;
}

.idv-timeline {
    position: relative;
    padding-left: 24px;
    border-left: 2px solid var(--idv-border);
}

.idv-timeline-item {
    position: relative;
    margin-bottom: 16px;
}

.idv-timeline-item:last-child {
    margin-bottom: 0;
}

.idv-timeline-dot {
    position: absolute;
    left: -31px;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--idv-primary);
    border: 2px solid #ffffff;
}

.idv-timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 2px;
}

.idv-timeline-time {
    font-size: 11px;
    color: var(--idv-text-light);
}

.idv-timeline-notes {
    font-size: 12px;
    color: var(--idv-text-muted);
}

/* ==========================================================================
   Buttons & Action Bars
   ========================================================================== */

.idv-actions-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.idv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--idv-radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    line-height: 1.2;
}

.idv-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.idv-btn-primary {
    background-color: var(--idv-primary);
    color: #ffffff;
}

.idv-btn-primary:hover {
    background-color: var(--idv-primary-dark);
}

.idv-btn-secondary {
    background-color: #f1f5f9;
    color: var(--idv-secondary);
    border-color: #cbd5e1;
}

.idv-btn-secondary:hover {
    background-color: #e2e8f0;
}

.idv-btn-outline {
    background-color: transparent;
    color: var(--idv-text-main);
    border-color: var(--idv-border);
}

.idv-btn-outline:hover {
    background-color: #f8fafc;
    border-color: #cbd5e1;
}

.idv-btn-success {
    background-color: var(--idv-success);
    color: #ffffff;
}

.idv-btn-success:hover {
    background-color: #059669;
}

.idv-btn-warning {
    background-color: var(--idv-warning);
    color: #ffffff;
}

.idv-btn-warning:hover {
    background-color: #d97706;
}

.idv-btn-danger {
    background-color: var(--idv-danger);
    color: #ffffff;
}

.idv-btn-danger:hover {
    background-color: #dc2626;
}

.idv-btn:disabled,
.idv-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   Admin Queue Styling
   ========================================================================== */

.startai-identity-admin {
    background-color: #f1f5f9;
}

.idv-filter-card {
    padding: 16px;
    margin-bottom: 20px;
}

.idv-filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
}

.idv-filter-item label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--idv-text-muted);
    margin-bottom: 4px;
}

.idv-table-responsive {
    overflow-x: auto;
}

.idv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.idv-table th {
    background-color: #f8fafc;
    color: var(--idv-text-muted);
    font-weight: 600;
    padding: 12px 16px;
    border-bottom: 1px solid var(--idv-border);
    white-space: nowrap;
}

.idv-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--idv-border);
    vertical-align: middle;
}

.idv-table tr:hover td {
    background-color: #f8fafc;
}

.idv-pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    background: #fafbfc;
    border-top: 1px solid var(--idv-border);
    font-size: 13px;
}

.idv-pagination-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.idv-current-page {
    font-weight: 700;
    padding: 0 6px;
}

/* ==========================================================================
   Admin Drawer & Modals
   ========================================================================== */

.idv-drawer-backdrop,
.idv-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    z-index: 99999;
    display: flex;
    justify-content: flex-end;
}

.idv-modal-backdrop {
    justify-content: center;
    align-items: center;
}

.idv-drawer {
    width: 720px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: var(--idv-shadow-lg);
    display: flex;
    flex-direction: column;
    animation: idvSlideInRight 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes idvSlideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

.idv-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid var(--idv-border);
    background: #fafbfc;
}

.idv-drawer-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.idv-drawer-header-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.idv-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--idv-text-muted);
}

.idv-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.idv-detail-nav {
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--idv-border);
    margin-bottom: 20px;
}

.idv-detail-nav-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--idv-text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease-in-out;
}

.idv-detail-nav-btn.active {
    color: var(--idv-primary);
    border-bottom-color: var(--idv-primary);
}

.idv-detail-tab-pane {
    display: none;
}

.idv-detail-tab-pane.active {
    display: block;
}

.idv-detail-section {
    margin-bottom: 24px;
}

.idv-detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--idv-text-main);
    padding-bottom: 6px;
    border-bottom: 1px solid #f1f5f9;
}

.idv-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
}

.idv-detail-field label {
    display: block;
    font-size: 11px;
    color: var(--idv-text-muted);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.4px;
}

.idv-detail-field span,
.idv-detail-field strong {
    font-size: 13px;
    word-break: break-word;
}

.idv-col-full {
    grid-column: span 2;
}

.idv-drawer-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-top: 1px solid var(--idv-border);
    background: #fafbfc;
}

.idv-drawer-footer-right {
    display: flex;
    gap: 10px;
}

/* Modals */
.idv-modal {
    background: #ffffff;
    width: 480px;
    max-width: 90vw;
    border-radius: var(--idv-radius-lg);
    box-shadow: var(--idv-shadow-lg);
    overflow: hidden;
    animation: idvFadeInScale 0.2s ease-out;
}

@keyframes idvFadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.idv-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--idv-border);
    background: #fafbfc;
}

.idv-modal-header h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.idv-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--idv-text-muted);
}

.idv-modal-body {
    padding: 20px;
}

.idv-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    background: #fafbfc;
    border-top: 1px solid var(--idv-border);
}

/* Viewer Modal */
.idv-viewer-modal {
    width: 850px;
    max-width: 95vw;
}

.idv-viewer-body {
    padding: 10px;
    background: #0f172a;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Review Documents Grid */
.idv-docs-review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.idv-review-doc-card {
    border: 1px solid var(--idv-border);
    border-radius: var(--idv-radius);
    padding: 12px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

.idv-review-doc-type {
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.idv-review-doc-name {
    font-size: 11px;
    color: var(--idv-text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 10px;
}

/* Loading Spinner Overlay */
.idv-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(1px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: var(--idv-radius-lg);
}

.idv-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--idv-border);
    border-top-color: var(--idv-primary);
    border-radius: 50%;
    animation: idvSpin 0.7s linear infinite;
    margin-bottom: 10px;
}

@keyframes idvSpin {
    to { transform: rotate(360deg); }
}

.idv-loading-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--idv-text-main);
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 768px) {
    .startai-identity-container {
        padding: 16px;
    }

    .idv-stepper {
        padding: 12px 16px;
    }

    .idv-step-label {
        display: none;
    }

    .idv-radio-cards {
        grid-template-columns: 1fr;
    }

    .idv-form-row {
        flex-direction: column;
        gap: 0;
    }

    .idv-summary-grid {
        grid-template-columns: 1fr;
    }

    .idv-filter-grid {
        grid-template-columns: 1fr;
    }

    .idv-drawer {
        width: 100vw;
        max-width: 100vw;
    }

    .idv-detail-grid {
        grid-template-columns: 1fr;
    }

    .idv-col-full {
        grid-column: span 1;
    }
}
