/* ==========================================================================
   SELF VERIFICATION & APPROVAL MODULE CSS
   ========================================================================== */

:root {
    --sv-primary: #00875a;
    --sv-primary-hover: #006644;
    --sv-primary-glow: rgba(0, 135, 90, 0.4);
    --sv-accent-blue: #0052cc;
    --sv-accent-purple: #6554c0;
    --sv-danger: #de350b;
    --sv-warning: #ffab00;
    --sv-card-bg: rgba(255, 255, 255, 0.95);
    --sv-card-border: rgba(226, 232, 240, 0.8);
    --sv-text-main: #172b4d;
    --sv-text-muted: #5e6c84;
}

[data-theme="dark"] {
    --sv-card-bg: rgba(30, 41, 59, 0.9);
    --sv-card-border: rgba(51, 65, 85, 0.7);
    --sv-text-main: #f1f5f9;
    --sv-text-muted: #94a3b8;
}

.sv-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 10px 0 40px;
}

/* ==========================================================================
   STEPPER
   ========================================================================== */
.sv-stepper-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--sv-card-bg);
    border: 1px solid var(--sv-card-border);
    border-radius: 16px;
    padding: 16px 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
}

.sv-step {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.sv-step.active {
    opacity: 1;
}

.sv-step.completed .sv-step-num {
    background: #00875a;
    color: #fff;
}

.sv-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #475569;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.sv-step.active .sv-step-num {
    background: linear-gradient(135deg, #0052cc, #00875a);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(0, 135, 90, 0.2);
}

.sv-step-text {
    display: flex;
    flex-direction: column;
}

.sv-step-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sv-text-main);
    line-height: 1.2;
}

.sv-step-sub {
    font-size: 11px;
    color: var(--sv-text-muted);
}

.sv-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 16px;
    position: relative;
}

.sv-step-line.active {
    background: linear-gradient(90deg, #00875a, #0052cc);
}

/* ==========================================================================
   PANEL & HEADERS
   ========================================================================== */
.sv-panel {
    background: var(--sv-card-bg);
    border: 1px solid var(--sv-card-border);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
}

.sv-panel-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--sv-card-border);
}

.sv-panel-header-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(0, 82, 204, 0.1), rgba(0, 135, 90, 0.15));
    color: #00875a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.sv-panel-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin: 0 0 4px 0;
}

.sv-panel-subtitle {
    font-size: 13px;
    color: var(--sv-text-muted);
    margin: 0;
}

.sv-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--sv-text-main);
    margin-bottom: 8px;
}

/* ==========================================================================
   TYPE SELECTOR CARDS
   ========================================================================== */
.sv-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.sv-type-card {
    position: relative;
    border: 2px solid var(--sv-card-border);
    border-radius: 14px;
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .sv-type-card {
    background: #1e293b;
}

.sv-type-card:hover {
    border-color: #00875a;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 135, 90, 0.12);
}

.sv-type-card.active {
    border-color: #00875a;
    background: linear-gradient(135deg, rgba(0, 135, 90, 0.04), rgba(0, 82, 204, 0.04));
    box-shadow: 0 0 0 1px #00875a, 0 8px 24px rgba(0, 135, 90, 0.15);
}

.sv-type-radio-custom {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sv-type-card.active .sv-type-radio-custom {
    border-color: #00875a;
    background: #00875a;
}

.sv-type-card.active .sv-type-radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.sv-type-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #f1f5f9;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.sv-type-card.active .sv-type-icon {
    background: linear-gradient(135deg, #00875a, #0052cc);
    color: #fff;
}

.sv-type-info {
    flex: 1;
}

.sv-type-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin-bottom: 2px;
}

.sv-type-desc {
    display: block;
    font-size: 12px;
    color: var(--sv-text-muted);
    line-height: 1.4;
}

.sv-type-tag {
    font-size: 11px;
    font-weight: 700;
    background: rgba(0, 135, 90, 0.1);
    color: #00875a;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

/* ==========================================================================
   DROPDOWN & GLOWING BUTTON ROW
   ========================================================================== */
.sv-dropdown-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.sv-dropdown-wrap {
    flex: 1;
}

.sv-custom-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    font-size: 14px;
    font-weight: 500;
    color: var(--sv-text-main);
    background: #fff;
    transition: all 0.2s ease;
    outline: none;
}

[data-theme="dark"] .sv-custom-select {
    background: #1e293b;
    border-color: #475569;
}

.sv-custom-select:focus {
    border-color: #00875a;
    box-shadow: 0 0 0 3px rgba(0, 135, 90, 0.15);
}

.sv-dropdown-hint {
    display: block;
    font-size: 11px;
    color: var(--sv-text-muted);
    margin-top: 6px;
}

.sv-btn-wrap {
    flex-shrink: 0;
}

/* Glowing Pulsating Start Button */
.sv-glow-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #00875a, #0052cc);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 135, 90, 0.35);
}

.sv-glow-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
    animation: none;
}

.sv-glow-btn:not(:disabled) {
    animation: sv-pulse-glow 2s infinite;
}

.sv-glow-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 135, 90, 0.5);
}

@keyframes sv-pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 135, 90, 0.6);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(0, 135, 90, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 135, 90, 0);
    }
}

/* ==========================================================================
   WORKSPACE GRID (LEFT PROFILE / RIGHT OCR)
   ========================================================================== */
.sv-workspace {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .sv-workspace {
        grid-template-columns: 1fr;
    }
}

/* Left Profile Card */
.sv-profile-panel {
    background: var(--sv-card-bg);
    border: 1px solid var(--sv-card-border);
    border-radius: 16px;
    padding: 24px;
    height: fit-content;
}

.sv-profile-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sv-profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0052cc, #00875a);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.sv-profile-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin: 0 0 4px 0;
}

.sv-profile-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sv-profile-badge.pending {
    background: #fff0b3;
    color: #172b4d;
}

.sv-profile-badge.approved {
    background: #e3fcef;
    color: #006644;
}

.sv-profile-divider {
    height: 1px;
    background: var(--sv-card-border);
    margin: 18px 0;
}

.sv-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.sv-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #edf2f7;
}

[data-theme="dark"] .sv-detail-item {
    background: #1e293b;
    border-color: #334155;
}

.sv-detail-label {
    font-size: 12px;
    color: var(--sv-text-muted);
    font-weight: 500;
}

.sv-detail-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--sv-text-main);
}

.sv-instruction-box {
    margin-top: 20px;
    padding: 14px;
    border-radius: 10px;
    background: rgba(0, 82, 204, 0.06);
    border: 1px solid rgba(0, 82, 204, 0.15);
    display: flex;
    gap: 10px;
}

.sv-instruction-icon {
    color: #0052cc;
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}

.sv-instruction-text {
    font-size: 12px;
    color: var(--sv-text-main);
    line-height: 1.45;
}

/* ==========================================================================
   RIGHT OCR STUDIO & DROPZONE
   ========================================================================== */
.sv-ocr-panel {
    background: var(--sv-card-bg);
    border: 1px solid var(--sv-card-border);
    border-radius: 16px;
    padding: 24px;
}

.sv-ocr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.sv-ocr-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin: 0;
}

.sv-ocr-country-badge {
    font-size: 11px;
    font-weight: 600;
    color: #0052cc;
    background: rgba(0, 82, 204, 0.08);
    padding: 4px 10px;
    border-radius: 20px;
}

/* Dropzone */
.sv-dropzone {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .sv-dropzone {
    background: #0f172a;
    border-color: #334155;
}

.sv-dropzone:hover, .sv-dropzone.dragover {
    border-color: #00875a;
    background: rgba(0, 135, 90, 0.03);
}

.sv-dropzone-inner {
    text-align: center;
    padding: 30px;
}

.sv-dropzone-icon {
    font-size: 42px;
    color: #94a3b8;
    margin-bottom: 12px;
}

.sv-dropzone:hover .sv-dropzone-icon {
    color: #00875a;
}

.sv-dropzone-prompt {
    font-size: 15px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin: 0 0 6px 0;
}

.sv-dropzone-sub {
    font-size: 13px;
    color: var(--sv-text-muted);
    margin: 0 0 10px 0;
}

.sv-link-btn {
    background: none;
    border: none;
    color: #0052cc;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.sv-dropzone-tips {
    font-size: 11px;
    color: #94a3b8;
}

/* Preview Wrap */
.sv-preview-wrap {
    width: 100%;
    height: 280px;
    position: relative;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sv-preview-wrap img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.sv-preview-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
}

.sv-preview-action-btn {
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}

.sv-preview-action-btn:hover {
    background: #00875a;
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */
.sv-scan-progress {
    margin-top: 18px;
    padding: 16px;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .sv-scan-progress {
    background: #1e293b;
    border-color: #334155;
}

.sv-progress-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 700;
    color: var(--sv-text-main);
    margin-bottom: 8px;
}

.sv-progress-track {
    height: 8px;
    background: #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.sv-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00875a, #0052cc);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.sv-progress-sub {
    font-size: 11px;
    color: var(--sv-text-muted);
    margin-top: 6px;
}

/* Scan Action Button */
.sv-scan-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.sv-scan-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 30px;
    background: #00875a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 135, 90, 0.3);
}

.sv-scan-btn:hover:not(:disabled) {
    background: #006644;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 135, 90, 0.4);
}

.sv-scan-btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* ==========================================================================
   COMPARISON & MATCH MATRIX
   ========================================================================== */
.sv-match-matrix {
    margin-top: 24px;
    padding: 20px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    animation: dash-fadeUp 0.4s ease-out both;
}

[data-theme="dark"] .sv-match-matrix {
    background: #0f172a;
    border-color: #334155;
}

.sv-matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sv-matrix-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--sv-text-main);
}

.sv-matrix-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    text-transform: uppercase;
}

.sv-matrix-badge.matched {
    background: #e3fcef;
    color: #006644;
    border: 1px solid #36b37e;
}

.sv-matrix-badge.mismatch {
    background: #ffebe6;
    color: #de350b;
    border: 1px solid #ff5630;
}

.sv-matrix-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 14px;
    align-items: center;
    margin-bottom: 20px;
}

.sv-matrix-box {
    padding: 14px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
}

[data-theme="dark"] .sv-matrix-box {
    background: #1e293b;
    border-color: #334155;
}

.sv-matrix-box-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--sv-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
}

.sv-matrix-val-row {
    display: flex;
    flex-direction: column;
}

.sv-matrix-raw-val {
    font-size: 17px;
    font-weight: 800;
    color: var(--sv-text-main);
    letter-spacing: 0.5px;
}

.sv-matrix-norm-val {
    font-size: 11px;
    font-family: monospace;
    color: #00875a;
    font-weight: 600;
    margin-top: 2px;
}

.sv-matrix-connector {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sv-matrix-connector.matched {
    background: #00875a;
    color: #fff;
}

.sv-matrix-connector.mismatch {
    background: #de350b;
    color: #fff;
}

/* API Execution Log Box */
.sv-api-call-log {
    background: #1e293b;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 18px;
}

.sv-api-log-row {
    display: flex;
    flex-direction: column;
    margin-bottom: 8px;
}

.sv-api-log-row:last-child {
    margin-bottom: 0;
}

.sv-api-log-label {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
    margin-bottom: 3px;
}

.sv-api-code {
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    color: #38bdf8;
    background: #0f172a;
    padding: 4px 8px;
    border-radius: 4px;
    word-break: break-all;
}

.sv-api-code.json {
    color: #4ade80;
}

.sv-audit-status {
    font-size: 12px;
    color: #a7f3d0;
    font-weight: 600;
}

.sv-matrix-actions {
    display: flex;
    justify-content: flex-end;
}

.sv-secondary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: var(--sv-text-main);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

/* ==========================================================================
   MODAL & TOAST
   ========================================================================== */
.sv-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.sv-modal-dialog {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.sv-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 32px;
    cursor: pointer;
}

.sv-modal-body img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.sv-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #fff;
    border-radius: 12px;
    padding: 14px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 5px solid #00875a;
    display: flex;
    align-items: center;
    gap: 14px;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99999;
}

[data-theme="dark"] .sv-toast {
    background: #1e293b;
}

.sv-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.sv-toast.error {
    border-left-color: #de350b;
}

.sv-toast-icon {
    font-size: 20px;
}

.sv-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--sv-text-main);
}

.sv-toast-msg {
    font-size: 12px;
    color: var(--sv-text-muted);
}
