/* ==========================================================
   PORTAL DE VERIFICACIÓN DE ORLAS DE PRUEBA (FRONTEND)
   N~FOQUE ESTUDIO
   ========================================================== */

.ovr-portal-container {
    max-width: 1200px;
    margin: 20px auto 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    padding: 0 15px;
    box-sizing: border-box;
}

/* 1. CABECERA */
.ovr-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.ovr-user-badge {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

.ovr-user-name {
    margin: 4px 0 2px 0;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.ovr-campaign-title {
    margin: 0;
    font-size: 14px;
    color: #64748b;
}

.ovr-deadline-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.ovr-badge-active {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.ovr-badge-expired {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.ovr-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
}

/* 2. BANNERS DE ESTADO */
.ovr-status-banner-wrapper {
    margin-bottom: 20px;
}

.ovr-status-banner {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.ovr-banner-icon {
    font-size: 24px;
    line-height: 1;
}

.ovr-banner-text strong {
    display: block;
    font-size: 15px;
    margin-bottom: 2px;
}

.ovr-banner-text p {
    margin: 0;
}

.ovr-banner-pending {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.ovr-banner-approved {
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.ovr-banner-tacit {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.ovr-banner-correction {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.ovr-banner-expired {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

/* 3. VISOR INTERACTIVO */
.ovr-viewer-wrapper {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.25);
    margin-bottom: 25px;
}

.ovr-viewer-toolbar {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 20;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(8px);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.15);
}

.ovr-tool-btn {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}

.ovr-tool-btn:hover {
    background: rgba(255,255,255,0.25);
}

.ovr-zoom-level-badge {
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    padding: 0 4px;
}

.ovr-canvas-stage {
    width: 100%;
    height: 65vh;
    min-height: 480px;
    position: relative;
    overflow: hidden;
    cursor: grab;
    touch-action: none;
    background: #0f172a;
    display: block;
}

.ovr-panzoom-target {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 0;
    will-change: transform;
    user-select: none;
    -webkit-user-select: none;
    display: block;
    margin: 0;
    padding: 0;
    line-height: 0;
}

#ovr-canvas {
    display: block !important;
    max-width: none !important;
    max-height: none !important;
    width: auto !important;
    height: auto !important;
    pointer-events: none;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.ovr-watermark-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.12;
    transform: rotate(-25deg);
    font-size: 32px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 4px;
    text-align: center;
}

.ovr-loading-spinner {
    position: absolute;
    z-index: 15;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.ovr-spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255,255,255,0.2);
    border-top-color: #38bdf8;
    border-radius: 50%;
    animation: ovr-spin 0.8s linear infinite;
}

@keyframes ovr-spin {
    to { transform: rotate(360deg); }
}

.ovr-mobile-gesture-tip {
    background: #0f172a;
    padding: 8px 15px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* 4. BARRA DE ACCIONES (APROBAR / CORREGIR) */
.ovr-action-bar-container {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
}

.ovr-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.ovr-action-title {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: #0f172a;
}

.ovr-action-sub {
    font-size: 13px;
    color: #64748b;
}

.ovr-action-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.ovr-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.ovr-btn-action .ovr-btn-icon {
    font-size: 22px;
}

.ovr-btn-action strong {
    display: block;
    font-size: 15px;
    line-height: 1.2;
}

.ovr-btn-action small {
    display: block;
    font-size: 11px;
    opacity: 0.85;
}

.ovr-btn-approve {
    background: #10b981;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3);
}

.ovr-btn-approve:hover {
    background: #059669;
    transform: translateY(-1px);
}

.ovr-btn-correct {
    background: #f59e0b;
    color: #ffffff;
    box-shadow: 0 4px 6px -1px rgba(245, 158, 11, 0.3);
}

.ovr-btn-correct:hover {
    background: #d97706;
    transform: translateY(-1px);
}

.ovr-already-ok {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
}

.ovr-ok-check {
    background: #10b981;
    color: #ffffff;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* 5. MODALES */
.ovr-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.ovr-modal-box {
    background: #ffffff;
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    padding: 28px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.ovr-modal-close {
    position: absolute;
    top: 18px;
    right: 20px;
    background: none;
    border: none;
    font-size: 26px;
    color: #94a3b8;
    cursor: pointer;
}

.ovr-modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.ovr-modal-icon-top {
    font-size: 36px;
    display: block;
    margin-bottom: 8px;
}

.ovr-modal-header h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.ovr-modal-header p {
    margin: 0;
    font-size: 13px;
    color: #64748b;
}

.ovr-confirm-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 18px;
    font-size: 14px;
}

.ovr-confirm-summary p {
    margin: 4px 0;
}

.ovr-legal-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
    cursor: pointer;
    background: #f1f5f9;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
}

.ovr-legal-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: #10b981;
}

.ovr-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

.ovr-btn-cancel {
    background: #e2e8f0;
    color: #475569;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}

.ovr-btn-confirm-ok {
    background: #10b981;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.ovr-btn-confirm-ok:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.ovr-form-group {
    margin-bottom: 16px;
}

.ovr-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #1e293b;
}

.ovr-select, .ovr-textarea, .ovr-token-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
}

.ovr-btn-submit-corr {
    background: #f59e0b;
    color: #ffffff;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
}

.ovr-token-prompt-box {
    max-width: 500px;
    margin: 40px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 35px;
    text-align: center;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.06);
}

.ovr-btn-primary {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
}

@media (max-width: 768px) {
    .ovr-portal-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .ovr-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .ovr-action-buttons {
        flex-direction: column;
    }
    .ovr-btn-action {
        width: 100%;
    }
    .ovr-canvas-stage {
        height: 55vh;
        min-height: 380px;
    }
}

/* Aviso de Normativa Ortográfica RAE */
.ovr-rae-notice-box {
    background: #f0f7ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid #2563eb;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 13px;
    line-height: 1.5;
    color: #1e3a8a;
    box-shadow: 0 1px 3px rgba(37,99,235,0.06);
}

.ovr-rae-notice-header {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 5px;
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
}

.ovr-rae-notice-box p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #334155;
}
