/* ==========================================================================
   AUDIT MODULE UNIFIED STYLESHEET
   ========================================================================== */

/* ── 1. Module Layouts ─────────────────────────────────────────────────── */

/* 1 Column Layout */
.layout-1-column {
    background: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}
.main-content-full {
    max-width: 1366px;
    margin: 0 auto;
    padding: 2rem 1rem;
    flex: 1;
}

@media (max-width: 576px) {
    .main-content-full {
        padding: 1rem 0.5rem;
    }
}

/* Common Layout Wrapper */
.main-wrapper {
    display: flex;
    flex: 1;
}

/* 2 Column Left Layout */
.layout-2-column-left {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8f9fa;
}
.left-sidebar {
    width: 280px;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: 100vh;
    overflow-y: auto;
}
.main-content-right {
    flex: 1;
    background: #f8f9fa;
    padding: 2rem;
}

/* 2 Column Right Layout */
.layout-2-column-right {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8f9fa;
}
.right-sidebar {
    width: 300px;
    background: #ffffff;
    border-left: 1px solid #dee2e6;
    padding: 1.5rem;
    position: sticky;
    top: 0;
    height: fit-content;
    max-height: 100vh;
    overflow-y: auto;
}
.main-content-left {
    flex: 1;
    background: #f8f9fa;
    padding: 2rem;
}

@media (max-width: 991.98px) {
    .left-sidebar, .right-sidebar {
        display: none;
    }
    .main-content-right, .main-content-left {
        padding: 1rem;
    }
}

/* 3 Column Layout */
.layout-3-column {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.left-nav {
    width: 240px;
    background: #ffffff;
    border-right: 1px solid #dee2e6;
    flex-shrink: 0;
    overflow-y: auto;
}
.center-main {
    flex: 1;
    background: #f8f9fa;
    overflow-x: auto;
    min-width: 0;
    padding: 2rem;
}
.right-panel {
    width: 240px;
    background: #ffffff;
    border-left: 1px solid #dee2e6;
    flex-shrink: 0;
    overflow-y: auto;
    padding: 1.5rem;
}

@media (max-width: 1199.98px) {
    .right-panel {
        display: none;
    }
}

@media (max-width: 991.98px) {
    .left-nav {
        position: fixed;
        left: -240px;
        top: 0;
        height: 100vh;
        z-index: 1050;
        transition: left 0.3s ease;
    }
    .left-nav.show {
        left: 0;
    }
    .center-main {
        width: 100%;
    }
}

/* 2 Column Equal Layout */
.layout-2-column-equal {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #f8f9fa;
}
.column-left, .column-right {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 0 0.5rem;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

@media (max-width: 767.98px) {
    .column-left, .column-right {
        margin: 0.5rem 0;
        height: auto;
        min-height: 300px;
    }
}


/* ── 2. Landing Page Styles ─────────────────────────────────────────────── */

.audit-landing {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
}

/* Hero Section */
.audit-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: -32px;
    padding: 120px 20px 140px;
    background-color: #ffffff;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(13, 110, 253, 0.04), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(70, 228, 186, 0.04), transparent 25%),
        linear-gradient(rgba(15, 23, 42, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.02) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-position: 0 0, 0 0, -1px -1px, -1px -1px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    margin-bottom: 80px;
}

.audit-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.audit-hero-title {
    font-size: 4.5rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 24px;
    color: #0f172a;
    letter-spacing: -2px;
}

.audit-hero-title span {
    color: #0d6efd;
    background: none;
    -webkit-text-fill-color: initial;
}

.audit-hero-subtitle {
    font-size: 1.35rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

.audit-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-audit-primary {
    background: #0d6efd;
    color: #ffffff;
    font-weight: 700;
    font-size: 1.15rem;
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 14px 0 rgba(13, 110, 253, 0.39);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-audit-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    color: #ffffff;
    background: #0b5ed7;
}

.btn-audit-secondary {
    background: #ffffff;
    color: #0f172a;
    font-weight: 600;
    font-size: 1.15rem;
    padding: 16px 40px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid #cbd5e1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.btn-audit-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-2px);
}

/* Hero Form */
.audit-hero-form {
    max-width: 650px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.audit-input-group {
    display: flex;
    background: #ffffff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.audit-input-group:focus-within {
    box-shadow: 0 15px 40px rgba(13, 110, 253, 0.15), 0 0 0 2px #0d6efd;
}

.audit-url-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 16px 24px;
    font-size: 1.15rem;
    color: #0f172a;
    outline: none;
    min-width: 0;
}

.audit-url-input::placeholder {
    color: #94a3b8;
}

.audit-input-group .btn-audit-primary {
    margin: 0;
    padding: 16px 36px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .audit-input-group {
        flex-direction: column;
        padding: 0;
        background: transparent;
        box-shadow: none;
        gap: 12px;
    }
    .audit-url-input {
        background: #ffffff;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08), 0 0 0 1px rgba(0,0,0,0.05);
        padding: 16px 20px;
        text-align: center;
        width: 100%;
    }
    .audit-input-group .btn-audit-primary {
        width: 100%;
        justify-content: center;
        padding: 16px 24px;
        border-radius: 12px;
    }
}

/* Features Grid */
.audit-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: -60px;
    position: relative;
    z-index: 2;
    padding: 0 20px;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 1024px) {
    .audit-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .audit-features {
        grid-template-columns: 1fr;
    }
}

.audit-feature-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audit-feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.feature-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.icon-seo { background: #e0e7ff; color: #4338ca; }
.icon-perf { background: #dcfce7; color: #15803d; }
.icon-sec { background: #fee2e2; color: #b91c1c; }
.icon-access { background: #fef3c7; color: #b45309; }

.audit-feature-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.audit-feature-desc {
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .audit-hero {
        padding: 60px 15px 100px;
    }
    .audit-hero-title {
        font-size: 2.5rem;
    }
    .audit-hero-subtitle {
        font-size: 1.1rem;
    }
    .audit-actions {
        flex-direction: column;
    }
    .btn-audit-primary, .btn-audit-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* How It Works Section */
.audit-how-it-works {
    padding: 100px 20px;
    text-align: center;
}

.audit-section-heading {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 20px;
}

.audit-section-subheading {
    font-size: 1.15rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

.audit-steps-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.audit-step {
    flex: 1;
    min-width: 250px;
    position: relative;
    padding: 30px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
    border: 1px solid #f3f4f6;
    transition: transform 0.3s ease;
}

.audit-step:hover {
    transform: translateY(-5px);
}

.audit-step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #0d6efd, #0b5ed7);
    color: white;
    font-size: 1.25rem;
    font-weight: 800;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.audit-step-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
}

.audit-step-desc {
    color: #6b7280;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Detailed Highlights Section */
.audit-highlight-section {
    padding: 100px 20px;
    background: #f9fafb;
    border-radius: 40px;
    margin: 0 20px 100px;
}

.audit-highlight-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    max-width: 1100px;
    margin: 0 auto;
    align-items: center;
}

.audit-highlight-grid.reverse {
    direction: rtl;
}

.audit-highlight-grid.reverse > * {
    direction: ltr;
}

.audit-highlight-content {
    padding: 20px;
}

.audit-highlight-label {
    display: inline-block;
    padding: 6px 16px;
    background: #e0e7ff;
    color: #4338ca;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    border-radius: 50px;
    margin-bottom: 20px;
}

.audit-highlight-title {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 24px;
    line-height: 1.2;
}

.audit-highlight-text {
    font-size: 1.1rem;
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 24px;
}

.audit-highlight-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.audit-highlight-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.05rem;
    color: #374151;
    margin-bottom: 16px;
    font-weight: 500;
}

.audit-highlight-list li i {
    color: #10b981;
    font-size: 1.2rem;
}

.audit-highlight-image {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.06);
    border: 1px solid #f3f4f6;
    text-align: center;
}

.audit-mock-score {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: conic-gradient(#10b981 92%, #e5e7eb 0);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    position: relative;
}

.audit-mock-score::before {
    content: '';
    position: absolute;
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
}

.audit-mock-score-text {
    position: relative;
    font-size: 3rem;
    font-weight: 800;
    color: #111827;
    z-index: 1;
}

.audit-mock-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.audit-mock-bar {
    height: 12px;
    background: #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.audit-mock-bar-fill {
    height: 100%;
    background: #0d6efd;
    border-radius: 10px;
}

/* Issue Prioritization Mockup */
.audit-issue-list {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
}

.audit-issue-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    border-bottom: 1px solid #f3f4f6;
}

.audit-issue-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.audit-issue-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.audit-issue-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-error { background: #fee2e2; color: #b91c1c; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-notice { background: #e0e7ff; color: #4338ca; }

/* Historical Chart Mockup */
.audit-mock-chart {
    position: relative;
    height: 180px;
    width: 100%;
    background: repeating-linear-gradient(to top, transparent, transparent 39px, #f3f4f6 39px, #f3f4f6 40px);
    margin-top: 20px;
}

.audit-chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,80 L20,60 L40,65 L60,30 L80,35 L100,10" fill="none" stroke="%230d6efd" stroke-width="4" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    filter: drop-shadow(0 10px 10px rgba(13, 110, 253, 0.2));
}

.audit-chart-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><path d="M0,80 L20,60 L40,65 L60,30 L80,35 L100,10 L100,100 L0,100 Z" fill="rgba(13,110,253,0.1)" stroke="none"/></svg>');
    background-size: 100% 100%;
    background-repeat: no-repeat;
}

/* Feature Grid 3-col */
.audit-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto 100px;
    padding: 0 20px;
}

.audit-feature-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #f3f4f6;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
    transition: transform 0.3s ease;
}

.audit-feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.06);
}

/* Bottom CTA */
.audit-bottom-cta {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(135deg, #111827, #1f2937);
    border-radius: 40px;
    margin: 0 20px 60px;
    color: white;
}

.audit-bottom-cta .audit-section-heading {
    color: white;
}

.audit-bottom-cta .audit-section-subheading {
    color: #9ca3af;
}

@media (max-width: 992px) {
    .audit-highlight-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .audit-highlight-grid.reverse {
        direction: ltr;
    }
}

@media (max-width: 768px) {
    .audit-highlight-section {
        padding: 60px 20px;
        margin: 0 15px 60px;
        border-radius: 24px;
    }
    .audit-bottom-cta {
        padding: 60px 20px;
        margin: 0 15px 40px;
        border-radius: 24px;
    }
    .audit-how-it-works {
        padding: 60px 20px;
    }
    .audit-section-heading,
    .audit-highlight-title {
        font-size: 2rem;
    }
}


/* ── 3. Dashboard & Component Styles ───────────────────────────────────── */

.audit-dashboard-container {
    padding: 2rem 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.audit-stats-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.audit-stats-card:nth-child(1) { animation-delay: 0.1s; }
.audit-stats-card:nth-child(2) { animation-delay: 0.2s; }
.audit-stats-card:nth-child(3) { animation-delay: 0.3s; }
.audit-stats-card:nth-child(4) { animation-delay: 0.4s; }

.status-badge {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.status-completed {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border-color: #b8dacc;
}

.status-in-progress {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-color: #f0d43a;
    animation: pulse 2s infinite;
}

.status-failed {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    border-color: #f1b0b7;
}

.score-circle {
    position: relative;
    overflow: hidden;
}

.score-circle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(-45deg);
    transition: transform 0.6s;
}

.score-circle:hover::before {
    transform: rotate(45deg);
}

.audit-table tbody tr {
    transition: all 0.3s ease;
}

.audit-table tbody tr:hover {
    background-color: #f8f9ff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
