/* =====================================================
   audit.css — SEO Report Dashboard Styles
   ===================================================== */

/* ── Report Page Layout ── */
.report-page { background: #f0f4f8; min-height: 100vh; }

/* ── Dashboard Layout ── */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 200px);
}

.dashboard-sidebar {
    width: 260px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    padding: 2rem 0;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.dashboard-sidebar-header {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.dashboard-sidebar-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #0a2540;
    margin: 0;
}

.dashboard-sidebar-header p {
    font-size: 0.8rem;
    color: #718096;
    margin: 0.25rem 0 0;
}

.dashboard-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.dashboard-nav li {
    margin: 0;
}

.dashboard-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #4a5568;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.dashboard-nav a:hover {
    background: #f7fafc;
    color: #0a2540;
}

.dashboard-nav a.active {
    background: #f0f4f8;
    color: #003a7a;
    border-left-color: #003a7a;
}

.dashboard-nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.dashboard-main {
    flex: 1;
    padding: 2rem;
    max-width: calc(100% - 260px);
}

.dashboard-section {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.dashboard-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0a2540;
    margin: 0 0 1.5rem;
}

/* Responsive dashboard */
@media (max-width: 900px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
        padding: 1rem 0;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .dashboard-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    
    .dashboard-nav a {
        padding: 0.5rem 1rem;
        border-left: none;
        border-radius: 6px;
    }
    
    .dashboard-main {
        max-width: 100%;
        padding: 1rem;
    }
}

.report-hero {
    background: linear-gradient(135deg, #0a2540 0%, #003a7a 100%);
    padding: 120px 0 60px;
    color: white;
}

.report-hero-inner {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

/* Screenshot */
.report-screenshot {
    flex-shrink: 0;
    margin-left: auto;
}
@media (max-width: 768px) {
    .report-screenshot { margin-left: 0; }
    .report-screenshot div { width: 100% !important; max-width: 260px; }
}

/* Score Ring */
.report-score-ring {
    position: relative;
    width: 160px;
    height: 160px;
    flex-shrink: 0;
}

.report-score-ring svg {
    width: 100%;
    height: 100%;
}

.report-score-ring circle {
    transition: stroke-dasharray 1s ease;
}

.score-label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.score-number {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1;
}

.score-grade {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Hero Text */
.report-domain-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.25rem;
}

.report-domain {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.25rem;
    background: none;
    -webkit-text-fill-color: white;
    filter: none;
}

.report-tally {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.tally {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
}

.tally span {
    font-size: 1.5rem;
    font-weight: 800;
}

.tally.pass span { color: #22c55e; }
.tally.warn span { color: #f59e0b; }
.tally.fail span { color: #ef4444; }

.btn-unlock {
    display: inline-block;
    background: #f97316;
    color: white;
    padding: 12px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    transition: background 0.2s;
}

.btn-unlock:hover { background: #ea6c0a; }

.unlocked-badge {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.4);
    color: #22c55e;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: inline-block;
}

/* ── Report Body ── */
.report-body { padding: 50px 0 80px; }

.report-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Critical: prevents grid tracks from overflowing their specified fraction */
.report-col-main,
.report-col-side {
    min-width: 0;
}

/* Make the right column sticky */
.report-col-side {
    position: sticky;
    top: 20px;
    align-self: start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 1.25rem;
}

/* ── Results List ── */
.results-list { display: flex; flex-direction: column; gap: 0.75rem; }

.result-item {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 4px solid transparent;
    transition: box-shadow 0.2s;
    min-width: 0; /* prevent item itself from overflowing */
}

.result-item:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }

.result-pass { border-left-color: #22c55e; }
.result-warn { border-left-color: #f59e0b; }
.result-fail { border-left-color: #ef4444; }

.result-icon { font-size: 1.25rem; flex-shrink: 0; margin-top: 2px; }

.result-content { min-width: 0; flex: 1; }

.result-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: #1a202c;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 3px;
}

.result-value {
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 4px;
    font-family: monospace;
    word-break: break-all;   /* wrap long URLs instead of overflowing */
    background: #f7fafc;
    padding: 2px 8px;
    border-radius: 4px;
    display: block;          /* block so word-break works */
    max-width: 100%;
}

.result-message {
    font-size: 0.875rem;
    color: #718096;
    line-height: 1.5;
}

/* ── Responsive ── */

/* Medium screens — tighten hero gap, shrink domain font */
@media (max-width: 1300px) {
    .report-hero-inner { gap: 2.5rem; }
    .report-domain { font-size: 2rem; }
}

/* Below 1100px — switch to single column */
@media (max-width: 1100px) {
    .report-grid { grid-template-columns: 1fr; }
    .report-hero-inner { flex-direction: column; text-align: center; gap: 2rem; }
    .report-tally { justify-content: center; }
    .report-domain { font-size: 1.75rem; }
}

/* Mobile */
@media (max-width: 600px) {
    .report-hero { padding: 100px 0 40px; }
    .report-domain { font-size: 1.4rem; }
    .report-body { padding: 30px 0 60px; }
    .rform-grid { grid-template-columns: 1fr; }
    .rform-full { grid-column: 1; }
    .register-card { padding: 2rem 1.5rem; }
    .report-screenshot { display: none; }
}

.locked-panel {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 2px dashed #e2e8f0;
    margin-top: 100px;
}

.locked-icon { font-size: 3rem; margin-bottom: 1rem; }

.locked-panel h3 {
    font-size: 1.4rem;
    color: #1a202c;
    margin-bottom: 0.75rem;
}

.locked-panel p {
    color: #718096;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.locked-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0;
    text-align: left;
}

.locked-list li {
    padding: 7px 0;
    font-size: 0.9rem;
    color: #4a5568;
    border-bottom: 1px solid #f0f4f8;
}

/* ── Stage 2 Panels ── */
.stage2-panel {
    background: white;
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.stage2-panel h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 0.4rem;
}

.panel-hint {
    font-size: 0.82rem;
    color: #a0aec0;
    margin-bottom: 1rem;
}

.tag-input-area {
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    background: #f7fafc;
    align-content: flex-start;
}

.kw-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #003a7a, #0056b3);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,86,179,0.2);
    transition: transform 0.15s;
}

.kw-tag:hover {
    transform: translateY(-1px);
}

.remove-tag {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    cursor: pointer;
    padding: 2px 6px;
    font-size: 0.85rem;
    line-height: 1;
    border-radius: 4px;
    margin-left: 2px;
    transition: background 0.15s;
}
.remove-tag:hover { 
    background: rgba(255,255,255,0.3);
}

.panel-input-row {
    display: flex;
    gap: 0.5rem;
}

.panel-input-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #1a202c;
}

.panel-input-row input:focus {
    outline: none;
    border-color: var(--color-primary, #0056b3);
    box-shadow: 0 0 0 3px rgba(0,86,179,0.1);
}

.btn-sm {
    background: var(--color-primary, #0056b3);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.btn-sm:hover { background: #003a7a; }
.btn-full { width: 100%; }

/* Social Fields */
.social-fields { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }

.social-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icon { font-size: 1.1rem; width: 24px; flex-shrink: 0; }

.social-input {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.85rem;
    color: #1a202c;
}
.social-input:focus {
    outline: none;
    border-color: var(--color-primary, #0056b3);
}

.cta-panel {
    background: linear-gradient(135deg, #0a2540, #003a7a);
    color: white;
}
.cta-panel h3 { color: white; }
.cta-panel p  { color: rgba(255,255,255,0.8); margin-bottom: 1.25rem; font-size: 0.9rem; line-height: 1.6; }

/* ── Scan Progress Overlay ── */
#scan-progress {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10,37,64,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2rem;
    color: white;
    text-align: center;
}

#scan-progress.visible { display: flex; }

.progress-logo {
    font-size: 1.5rem;
    font-weight: 800;
    opacity: 0.7;
    letter-spacing: 0.05em;
}

.progress-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid rgba(255,255,255,0.15);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

#progress-step {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.85);
    min-height: 1.5em;
    transition: opacity 0.3s;
}

.progress-bar {
    width: 300px;
    max-width: 80vw;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    overflow: hidden;
}

#progress-bar-fill {
    height: 100%;
    background: #f97316;
    border-radius: 2px;
    width: 0%;
    transition: width 0.8s ease;
}

/* ── Scan Error ── */
#scan-error {
    display: none;
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a202c;
    color: white;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 9998;
}

.toast.toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast.toast-error { background: #c53030; }

/* ── Registration Card ── */
.register-card {
    background: white;
    border-radius: 24px;
    padding: 3rem;
    max-width: 760px;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.register-header { text-align: center; margin-bottom: 2rem; }
.register-header h1 { font-size: 2rem; color: #1a202c; margin-bottom: 0.75rem; }
.register-header p  { color: #718096; line-height: 1.6; }

.register-skip {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #a0aec0;
}

.register-skip:hover { color: var(--color-primary, #0056b3); }

.rform-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.rform-full { grid-column: 1 / -1; }

.form-error-banner {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .report-grid { grid-template-columns: 1fr; }
    .report-hero-inner { flex-direction: column; text-align: center; }
    .report-tally { justify-content: center; }
    .rform-grid { grid-template-columns: 1fr; }
    .rform-full { grid-column: 1; }
}
