.idav2-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 920px;
    margin: 24px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 30px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    color: #1e293b;
    box-sizing: border-box;
}

.idav2-wrapper *,
.idav2-wrapper *::before,
.idav2-wrapper *::after {
    box-sizing: border-box;
}

.idav2-wrapper.idav2-busy {
    opacity: 0.72;
    pointer-events: none;
}

.idav2-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.idav2-title {
    margin: 0 0 4px 0;
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
}

.idav2-subtitle {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.idav2-badge-free {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.idav2-notice-bar,
.idav2-alert {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.idav2-notice-bar {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.idav2-alert-warn {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    text-align: center;
}

.idav2-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.idav2-card {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    background: #f8fafc;
    transition: border-color 0.2s ease, background 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.idav2-card:hover {
    border-color: #2563eb;
    background: #ffffff;
}

.idav2-card.idav2-has-file {
    border-style: solid;
    border-color: #10b981;
    background: #ffffff;
}

.idav2-card-top {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 24px;
    margin-bottom: 8px;
}

.idav2-req-tag,
.idav2-opt-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    text-transform: uppercase;
}

.idav2-req-tag {
    background: #dbeafe;
    color: #1d4ed8;
}

.idav2-opt-tag {
    background: #f1f5f9;
    color: #475569;
}

.idav2-btn-clear {
    background: #fee2e2;
    color: #b91c1c;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.idav2-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.idav2-preview-wrap {
    width: 100%;
    height: 110px;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
    background: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.idav2-card h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
    color: #0f172a;
}

.idav2-card p {
    margin: 0 0 14px 0;
    font-size: 13px;
    color: #64748b;
    min-height: 36px;
}

.idav2-btn-select {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.idav2-btn-select:hover {
    border-color: #2563eb;
    color: #2563eb;
}

.idav2-file-meta {
    margin-top: 10px;
    font-size: 12px;
    color: #64748b;
    word-break: break-all;
}

.idav2-file-meta.idav2-ok {
    color: #047857;
    font-weight: 600;
}

.idav2-turnstile-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    min-height: 65px;
}

.idav2-actions {
    text-align: center;
}

.idav2-btn-main {
    width: 100%;
    padding: 15px 20px;
    background: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
}

.idav2-btn-main:hover:not(:disabled) {
    background: #1d4ed8;
}

.idav2-btn-main:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.idav2-privacy-note {
    margin: 10px 0 0 0;
    font-size: 12px;
    color: #64748b;
}

.idav2-loading {
    text-align: center;
    padding: 24px 0 10px;
    color: #2563eb;
}

.idav2-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: idav2Spin 0.85s linear infinite;
    margin: 0 auto 12px;
}

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

.idav2-result {
    margin-top: 26px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.idav2-res-header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    border-bottom: 1px solid #e2e8f0;
}

.idav2-res-header h3 {
    margin: 0;
    font-size: 18px;
}

.idav2-res-header.idav2-accept {
    background: #ecfdf5;
    color: #065f46;
    border-top: 4px solid #10b981;
}

.idav2-res-header.idav2-review {
    background: #fffbeb;
    color: #92400e;
    border-top: 4px solid #f59e0b;
}

.idav2-res-header.idav2-reject {
    background: #fef2f2;
    color: #991b1b;
    border-top: 4px solid #ef4444;
}

.idav2-res-tx {
    font-size: 12px;
    font-family: monospace;
    opacity: 0.85;
}

.idav2-res-scores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 18px 22px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.idav2-score-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    text-align: center;
}

.idav2-score-label {
    display: block;
    font-size: 12px;
    color: #64748b;
    margin-bottom: 4px;
}

.idav2-res-section {
    padding: 18px 22px;
    border-bottom: 1px solid #f1f5f9;
}

.idav2-res-section h4 {
    margin: 0 0 12px 0;
    font-size: 15px;
    color: #0f172a;
}

.idav2-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}

.idav2-data-item {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
}

.idav2-data-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #64748b;
    display: block;
    margin-bottom: 4px;
}

.idav2-data-val {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.idav2-conf-tag {
    font-size: 11px;
    color: #047857;
    margin-left: 6px;
    font-weight: 500;
}

.idav2-warning-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.idav2-warning-item {
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
    color: #78350f;
}

.idav2-warning-item.idav2-sev-high {
    border-left-color: #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.idav2-warning-item.idav2-sev-ok {
    border-left-color: #10b981;
    background: #ecfdf5;
    color: #065f46;
}

.idav2-res-footer {
    padding: 16px 22px;
    text-align: center;
}

.idav2-btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
    border: 1px solid #cbd5e1;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

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

@media (max-width: 640px) {
    .idav2-wrapper {
        padding: 18px;
    }
    .idav2-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .idav2-res-scores {
        grid-template-columns: 1fr;
    }
}