:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --secondary: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --success: #10B981;
    --dark: #1F2937;
    --light: #F9FAFB;
    --gray: #6B7280;
    --gray-light: #E5E7EB;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

body.dark-mode {
    --dark: #F9FAFB;
    --light: #111827;
    --gray: #9CA3AF;
    --gray-light: #374151;
    background: #0F172A;
}

html {
    scroll-behavior: smooth;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--dark);
    background: var(--light);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

body.rtl {
    direction: rtl;
    text-align: right;
}

.navbar {
    background: white;
    box-shadow: var(--shadow);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.navbar-nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-nav a:hover { color: var(--primary); }

.hero {
    background: linear-gradient(135deg, rgba(99,91,255,0.85) 0%, rgba(67,56,202,0.88) 50%, rgba(49,46,129,0.92) 100%),
                url('/assets/images/hero-bg.png') center/cover no-repeat;
    color: white;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 40px),
                repeating-radial-gradient(circle at 80% 30%, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1.5px, transparent 1.5px, transparent 50px);
    animation: heroDots 20s linear infinite;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at 60% 70%, rgba(255,255,255,0.02) 0px, rgba(255,255,255,0.02) 2px, transparent 2px, transparent 35px),
                repeating-radial-gradient(circle at 30% 80%, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px, transparent 1px, transparent 45px);
    animation: heroDots 25s linear infinite reverse;
    pointer-events: none;
}

@keyframes heroDots {
    0% { transform: translateY(0); }
    100% { transform: translateY(-20px); }
}

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

@keyframes floatScanBox {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    animation: fadeInUp 0.8s ease-out both;
    position: relative;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
    position: relative;
}

.scan-box {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 0.5rem;
    background: white;
    border-radius: 50px;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
    animation: floatScanBox 4s ease-in-out infinite;
    position: relative;
}

.scan-box input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    border-radius: 50px;
    outline: none;
    background: transparent;
    color: var(--dark);
}

.scan-box button {
    background: linear-gradient(90deg, var(--primary) 0%, var(--primary-light) 50%, var(--primary) 100%);
    background-size: 200% auto;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    animation: shimmer 3s linear infinite;
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.3);
}

.scan-box button:hover {
    background: linear-gradient(90deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-dark) 100%);
    background-size: 200% auto;
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.5);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    text-align: center;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--gray-light); color: var(--dark); }
.btn-secondary:hover { background: #D1D5DB; }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.85rem; white-space: nowrap; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-light);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-light);
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 3rem 0;
}

.feature-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    text-align: center;
    border: 1px solid var(--gray-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card .icon {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-card .icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--gray);
    font-size: 0.9rem;
}

.pricing-section {
    padding: 4rem 2rem;
    background: white;
}

.pricing-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.pricing-section .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.pricing-card {
    border: 2px solid var(--gray-light);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    position: relative;
    background: white;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.pricing-card.featured {
    border-color: var(--primary);
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(79, 70, 229, 0.15);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.25);
}

.pricing-card.featured::before {
    content: attr(data-badge);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.pricing-card .price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}

.pricing-card .price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--gray);
}

.pricing-card .price.free-price {
    font-size: 1.75rem;
    color: var(--success);
}

.pricing-card ul {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
}

.rtl .pricing-card ul { text-align: right; }

.pricing-card ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
}

.pricing-card ul li::before {
    content: '✓ ';
    color: var(--success);
    font-weight: bold;
}

.comparison-table-wrapper {
    margin-top: 4rem;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.comparison-table-wrapper h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.comparison-table-wrapper .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.comparison-table th {
    background: var(--light);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
    border-bottom: 2px solid var(--gray-light);
}

.comparison-table th:first-child {
    text-align: left;
}

.comparison-table th.highlight {
    background: var(--primary);
    color: white;
}

.comparison-table td {
    padding: 0.85rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--gray-light);
    font-size: 0.9rem;
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table td.highlight {
    background: #EEF2FF;
}

.comparison-table tbody tr:nth-child(even) {
    background: var(--light);
}

.comparison-table tbody tr:nth-child(even) td.highlight {
    background: #E8ECFF;
}

.comparison-table tbody tr:hover {
    background: #F3F4F6;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th, table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

.rtl table th, .rtl table td { text-align: right; }

table th {
    background: var(--light);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--gray);
}

table tr:hover { background: #F3F4F6; }

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.bg-success { background: #D1FAE5; color: #065F46; }
.bg-warning { background: #FEF3C7; color: #92400E; }
.bg-danger { background: #FEE2E2; color: #991B1B; }
.bg-primary { background: #EEF2FF; color: #3730A3; }
.bg-info { background: #DBEAFE; color: #1E40AF; }

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

select.form-control {
    appearance: auto;
}

.auth-page {
    display: flex;
    min-height: 100vh;
}

.auth-left {
    flex: 0 0 55%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #312E81 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.auth-left::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-radial-gradient(circle at 20% 50%, rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 2px, transparent 2px, transparent 40px),
                repeating-radial-gradient(circle at 80% 30%, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1.5px, transparent 1.5px, transparent 50px);
    pointer-events: none;
}

.auth-left-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 400px;
}

.auth-left-content .brand {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.auth-left-content .tagline {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

.auth-left-features {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    text-align: left;
}

.auth-left-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.auth-left-feature svg {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    stroke: white;
    fill: none;
}

.auth-left-feature span {
    font-weight: 500;
    font-size: 0.95rem;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    background: var(--light);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.password-strength {
    height: 4px;
    background: var(--gray-light);
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-bar {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s, background 0.3s;
    width: 0;
}

.strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    min-height: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-info { background: #DBEAFE; color: #1E40AF; border: 1px solid #BFDBFE; }

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--dark);
    color: white;
    padding: 1.5rem 0;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.rtl .admin-sidebar { order: 2; }
.rtl .admin-content { order: 1; }

.admin-sidebar .brand {
    padding: 0 1.5rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1rem;
    color: var(--primary-light);
}

.admin-sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 1.5rem;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    color: white;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.admin-header h1 {
    font-size: 1.75rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.rtl .stat-card {
    border-left: none;
    border-right: 4px solid var(--primary);
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 0.25rem;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.rtl .stat-card.success { border-right-color: var(--success); }
.rtl .stat-card.warning { border-right-color: var(--warning); }
.rtl .stat-card.danger { border-right-color: var(--danger); }

.stat-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.stat-trend {
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.stat-trend.up { color: var(--success); background: #F0FDF4; }
.stat-trend.down { color: var(--danger); background: #FEF2F2; }
.stat-trend.neutral { color: var(--gray); background: var(--gray-light); }

body.dark-mode .stat-trend.up { background: #14532D; }
body.dark-mode .stat-trend.down { background: #451A1A; }
body.dark-mode .stat-trend.neutral { background: #374151; }

.stat-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.stat-sparkline {
    margin-top: 0.75rem;
}

.sparkline {
    display: block;
    width: 100%;
    height: 30px;
}

.audit-filters {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    align-items: center;
    padding: 0 1.5rem;
}

.filter-input {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    flex: 1;
    min-width: 180px;
    background: var(--light);
    color: var(--dark);
}

.filter-select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--light);
    color: var(--dark);
    cursor: pointer;
}

body.dark-mode .filter-input,
body.dark-mode .filter-select {
    background: #1E293B;
    border-color: #374151;
    color: #F9FAFB;
}

.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.btn-danger:hover {
    background: #DC2626;
}

.quick-scan-card .scan-box {
    padding: 0.25rem;
}

.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    margin: 0 auto 1rem;
    border: 6px solid;
}

.score-circle.good { border-color: var(--success); color: var(--success); }
.score-circle.warning { border-color: var(--warning); color: var(--warning); }
.score-circle.critical { border-color: var(--danger); color: var(--danger); }

.collapsible {
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.collapsible-header {
    padding: 1rem 1.25rem;
    background: var(--light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.collapsible-header:hover { background: var(--gray-light); }

.collapsible-body {
    padding: 1.25rem;
    display: none;
}

.collapsible.open .collapsible-body { display: block; }

.collapsible-header .arrow {
    transition: transform 0.2s;
}

.collapsible.open .collapsible-header .arrow {
    transform: rotate(180deg);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.25rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-light);
}

.auth-divider span {
    padding: 0 1rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.google-signin-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.google-signin-btn:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
    box-shadow: var(--shadow);
}

.report-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.report-header-actions .report-btn-separator {
    width: 1px;
    height: 20px;
    background: var(--gray-light);
    display: inline-block;
}

.report-layout {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 1.5rem;
}

.report-layout > div:first-child,
.report-layout > div:last-child {
    position: sticky;
    top: 100px;
    align-self: start;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .report-layout { grid-template-columns: 1fr; }
    .report-layout > div:first-child {
        order: 1;
        position: static;
        max-height: none;
        overflow: visible;
    }
    .report-layout > div:nth-child(2) {
        order: 2;
    }
    .report-layout > div:last-child {
        order: 3;
        position: static;
        max-height: none;
        overflow: visible;
    }
    .report-header-actions .report-btn-separator {
        display: none;
    }
}

.lang-switcher {
    position: relative;
    display: inline-block;
}

.lang-btn {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.lang-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.1);
}

.lang-flyout {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    min-width: 180px;
    z-index: 1001;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.lang-flyout.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.rtl .lang-flyout {
    right: auto;
    left: 0;
    transform-origin: top left;
}

.lang-flyout-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.lang-flyout-item:first-child {
    border-radius: 10px 10px 0 0;
}

.lang-flyout-item:last-child {
    border-radius: 0 0 10px 10px;
}

.lang-flyout-item:hover {
    background: var(--light);
}

.user-profile-wrapper {
    position: relative;
    display: inline-block;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: inherit;
    transition: box-shadow 0.2s, transform 0.2s;
}

.user-avatar:hover {
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    transform: scale(1.05);
}

.user-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    z-index: 1001;
    opacity: 0;
    transform: scale(0.95);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.user-menu.open {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.rtl .user-menu {
    right: auto;
    left: 0;
    transform-origin: top left;
}

.user-menu-item {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--dark);
    font-size: 0.9rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.user-menu-item:first-child {
    border-radius: 10px 10px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 10px 10px;
}

.user-menu-item:hover {
    background: var(--light);
    color: var(--primary);
}

.user-menu-logout:hover {
    color: var(--danger);
}

.stats-bar {
    background: white;
    padding: 3rem 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.stats-bar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.stats-bar-item {
    padding: 1rem;
}

.stats-bar-item .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
    animation: countUpFade 1s ease-out both;
}

.stats-bar-item .stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

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

.stats-bar-item:nth-child(2) .stat-number { animation-delay: 0.15s; }
.stats-bar-item:nth-child(3) .stat-number { animation-delay: 0.3s; }
.stats-bar-item:nth-child(4) .stat-number { animation-delay: 0.45s; }

.how-it-works {
    padding: 4rem 2rem;
    background: var(--light);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.how-it-works .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 3rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 60px;
    left: calc(16.67% + 1rem);
    right: calc(16.67% + 1rem);
    height: 2px;
    border-top: 2px dashed var(--gray-light);
    z-index: 0;
}

.step-card {
    text-align: center;
    position: relative;
    z-index: 1;
    padding: 1.5rem;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.step-card .step-icon {
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step-card .step-icon svg {
    width: 48px;
    height: 48px;
}

.step-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.step-card p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

.testimonials-section {
    padding: 4rem 2rem;
    background: var(--light);
}

.testimonials-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.testimonials-section .subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 2rem;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-light);
}

.testimonial-stars {
    color: #F59E0B;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.testimonial-text {
    color: var(--dark);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.testimonial-role {
    color: var(--gray);
    font-size: 0.8rem;
}

.footer {
    background: var(--dark);
    color: rgba(255,255,255,0.7);
    padding: 0;
}

.footer a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer a:hover {
    color: var(--primary-light);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.footer-brand {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
}

.footer-brand-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.footer-social a:hover {
    background: var(--primary);
}

.footer-social svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
    color: white;
}

.footer-col h4 {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.5rem;
}

.footer-col ul a {
    font-size: 0.9rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 2rem;
    text-align: center;
    font-size: 0.85rem;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--gray-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.progress-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.ai-suggestion {
    border-left: 5px solid;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.2s ease;
    border: 1px solid var(--gray-light);
    border-left-width: 5px;
    position: relative;
}

.ai-suggestion:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.rtl .ai-suggestion {
    border-left: none;
    border-right: 5px solid;
    border-radius: 8px;
    border-right-width: 5px;
}

.ai-suggestion.critical { 
    border-left-color: var(--danger); 
    background: #FEF2F2;
    border-color: rgba(239, 68, 68, 0.2);
}

.ai-suggestion.warning { 
    border-left-color: var(--warning); 
    background: #FFFBEB;
    border-color: rgba(245, 158, 11, 0.2);
}

.ai-suggestion.good { 
    border-left-color: var(--success); 
    background: #F0FDF4;
    border-color: rgba(16, 185, 129, 0.2);
}

.ai-suggestion.info { 
    border-left-color: var(--primary); 
    background: #EEF2FF;
    border-color: rgba(79, 70, 229, 0.2);
}

.ai-suggestion strong {
    display: block;
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.ai-suggestion p {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--dark);
}

.ai-suggestion-category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    background: rgba(0,0,0,0.05);
    color: var(--dark);
    margin-top: 0.5rem;
}

.ai-suggestion-category-inline {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    padding: 0.15rem 0.5rem;
    border-radius: 12px;
    background: rgba(0,0,0,0.06);
    color: var(--gray);
    white-space: nowrap;
}

.suggestion-snippet-area {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.08);
    position: relative;
}


.section-score-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--gray-light);
}

.section-score-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.section-score-dot.bg-success { background: var(--success); }
.section-score-dot.bg-warning { background: var(--warning); }
.section-score-dot.bg-danger { background: var(--danger); }

.detail-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    margin-right: 0.35rem;
    flex-shrink: 0;
    vertical-align: middle;
}

.detail-status-icon.status-good {
    background: #D1FAE5;
    color: #065F46;
}

.detail-status-icon.status-warning {
    background: #FEF3C7;
    color: #92400E;
}

.detail-status-icon.status-critical {
    background: #FEE2E2;
    color: #991B1B;
}

.detail-status-icon.status-info {
    background: #DBEAFE;
    color: #1E40AF;
}

.report-layout > div:first-child .card p,
.report-layout > div:first-child .card div {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.ai-suggestion pre {
    background: #1F2937;
    color: #F3F4F6;
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.85rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0.75rem 0 0.75rem 0;
    line-height: 1.4;
    font-family: 'Courier New', Courier, monospace;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    display: inline-block;
}

.toggle-switch input { display: none; }

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--gray-light);
    border-radius: 26px;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    top: 3px;
    left: 3px;
    transition: transform 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active { display: flex; }

.modal {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal h3 { margin-bottom: 1rem; }

body.dark-mode .navbar {
    background: #1E293B;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3);
}
body.dark-mode .navbar-brand img.logo-light,
body.dark-mode .footer-brand img.logo-light,
body.dark-mode .admin-sidebar .brand img.logo-light {
    display: none;
}
body.dark-mode .navbar-brand img.logo-dark,
body.dark-mode .footer-brand img.logo-dark,
body.dark-mode .admin-sidebar .brand img.logo-dark {
    display: inline-block;
}
img.logo-dark {
    display: none;
}
img.logo-light {
    display: inline-block;
}

body.dark-mode .card,
body.dark-mode .feature-card,
body.dark-mode .pricing-card,
body.dark-mode .testimonial-card {
    background: #1E293B;
    border-color: #374151;
}

body.dark-mode .auth-card {
    background: #1E293B;
}

body.dark-mode .auth-right {
    background: #0F172A;
}

body.dark-mode .form-control {
    background: #1E293B;
    border-color: #374151;
    color: #F9FAFB;
}

body.dark-mode .footer {
    background: #0F172A;
}

body.dark-mode .admin-sidebar {
    background: #0F172A;
}

body.dark-mode table th {
    background: #1E293B;
}

body.dark-mode table tr:hover {
    background: #1E293B;
}

body.dark-mode .collapsible {
    border-color: #374151;
}

body.dark-mode .collapsible-header {
    background: #1E293B;
}

body.dark-mode .collapsible-header:hover {
    background: #374151;
}

body.dark-mode .collapsible-body {
    background: #1E293B;
}

body.dark-mode .alert-success {
    background: #064E3B;
    color: #A7F3D0;
    border-color: #065F46;
}

body.dark-mode .alert-danger {
    background: #7F1D1D;
    color: #FECACA;
    border-color: #991B1B;
}

body.dark-mode .alert-warning {
    background: #78350F;
    color: #FDE68A;
    border-color: #92400E;
}

body.dark-mode .alert-info {
    background: #1E3A5F;
    color: #BFDBFE;
    border-color: #1E40AF;
}

body.dark-mode .comparison-table th {
    background: #1E293B;
}

body.dark-mode .comparison-table td.highlight {
    background: #312E81;
}

body.dark-mode .comparison-table tbody tr:nth-child(even) {
    background: #1E293B;
}

body.dark-mode .comparison-table tbody tr:nth-child(even) td.highlight {
    background: #3730A3;
}

body.dark-mode .comparison-table tbody tr:hover {
    background: #374151;
}

body.dark-mode .stats-bar {
    background: #1E293B;
    border-color: #374151;
}

body.dark-mode .modal {
    background: #1E293B;
}

body.dark-mode .scan-box {
    background: #1E293B;
}

body.dark-mode .scan-box input {
    color: #F9FAFB;
}

body.dark-mode .pricing-section {
    background: #0F172A;
}

body.dark-mode .lang-btn {
    background: #1E293B;
    border-color: #374151;
    color: #F9FAFB;
}

body.dark-mode .lang-flyout {
    background: #1E293B;
}

body.dark-mode .lang-flyout-item:hover {
    background: #374151;
}

body.dark-mode .user-menu {
    background: #1E293B;
}

body.dark-mode .user-menu-item {
    color: #F9FAFB;
}

body.dark-mode .user-menu-item:hover {
    background: #374151;
}

body.dark-mode .google-signin-btn {
    background: #1E293B;
    border-color: #374151;
    color: #F9FAFB;
}

body.dark-mode .google-signin-btn:hover {
    background: #374151;
}

body.dark-mode .ai-suggestion {
    background: #1E293B;
    border-color: #374151;
}

body.dark-mode .ai-suggestion.critical {
    background: #451A1A;
    border-left-color: var(--danger);
    border-color: rgba(239, 68, 68, 0.3);
}

body.dark-mode .ai-suggestion.warning {
    background: #451A00;
    border-left-color: var(--warning);
    border-color: rgba(245, 158, 11, 0.3);
}

body.dark-mode .ai-suggestion.good {
    background: #14532D;
    border-left-color: var(--success);
    border-color: rgba(16, 185, 129, 0.3);
}

body.dark-mode .ai-suggestion.info {
    background: #312E81;
    border-left-color: var(--primary);
    border-color: rgba(79, 70, 229, 0.3);
}

body.dark-mode .ai-suggestion strong {
    color: #F3F4F6;
}

body.dark-mode .ai-suggestion p {
    color: #D1D5DB;
}

body.dark-mode .ai-suggestion-category {
    background: rgba(255,255,255,0.1);
    color: #D1D5DB;
}

body.dark-mode .stat-card {
    background: #1E293B;
}

body.dark-mode .how-it-works {
    background: #0F172A;
}

body.dark-mode .testimonials-section {
    background: #0F172A;
}

body.dark-mode .hamburger span {
    background: #F9FAFB;
}

body.dark-mode .bg-success { background: #064E3B; color: #A7F3D0; }
body.dark-mode .bg-warning { background: #78350F; color: #FDE68A; }
body.dark-mode .bg-danger { background: #7F1D1D; color: #FECACA; }
body.dark-mode .bg-primary { background: #312E81; color: #C7D2FE; }
body.dark-mode .bg-info { background: #1E3A5F; color: #BFDBFE; }

body.dark-mode .modal-overlay {
    background: rgba(0,0,0,0.7);
}

body.dark-mode .auth-divider::before,
body.dark-mode .auth-divider::after {
    background: #374151;
}

body.dark-mode .password-strength {
    background: #374151;
}

.dark-mode-toggle {
    background: none;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    color: var(--dark);
}

.dark-mode-toggle:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.05);
}

body.dark-mode .dark-mode-toggle {
    border-color: #374151;
    color: #F9FAFB;
}

body.dark-mode .dark-mode-toggle:hover {
    border-color: var(--primary);
    background: rgba(79, 70, 229, 0.15);
}

body.dark-mode .scan-module-item {
    background: #1E293B;
}

body.dark-mode .scan-module-item.active {
    background: #312E81;
}

body.dark-mode .guest-save-banner {
    background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%);
    border-color: var(--primary-dark);
}

body.dark-mode .guest-save-content strong {
    color: #F9FAFB;
}

body.dark-mode .guest-history-item {
    background: #1E293B;
    border-color: #374151;
}

body.dark-mode .guest-history-url {
    color: var(--primary-light);
}

body.dark-mode .url-validation-feedback.valid {
    background: #064E3B;
    color: #A7F3D0;
}

body.dark-mode .url-validation-feedback.invalid {
    background: #7F1D1D;
    color: #FECACA;
}

body.dark-mode .url-validation-feedback.warning {
    background: #78350F;
    color: #FDE68A;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
}

.form-control:focus-visible {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.hamburger:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.dark-mode-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.lang-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

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

.container,
.auth-page,
.admin-content {
    animation: pageIn 0.4s ease-out both;
}

.feature-card,
.pricing-card,
.testimonial-card,
.step-card {
    animation: pageIn 0.4s ease-out both;
}

.feature-card:nth-child(1),
.pricing-card:nth-child(1),
.testimonial-card:nth-child(1),
.step-card:nth-child(1) { animation-delay: 0.1s; }

.feature-card:nth-child(2),
.pricing-card:nth-child(2),
.testimonial-card:nth-child(2),
.step-card:nth-child(2) { animation-delay: 0.2s; }

.feature-card:nth-child(3),
.pricing-card:nth-child(3),
.testimonial-card:nth-child(3),
.step-card:nth-child(3) { animation-delay: 0.3s; }

.feature-card:nth-child(4),
.pricing-card:nth-child(4),
.testimonial-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card:nth-child(5),
.pricing-card:nth-child(5),
.testimonial-card:nth-child(5) { animation-delay: 0.5s; }

.feature-card:nth-child(6),
.pricing-card:nth-child(6),
.testimonial-card:nth-child(6) { animation-delay: 0.6s; }

/* ==========================================================================
   HAMBURGER MENU BASE STYLES (hidden by default, shown in mobile)
   ========================================================================== */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 30px;
    height: 24px;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* ==========================================================================
   TABLET BREAKPOINT - max-width: 1024px
   ========================================================================== */
@media (max-width: 1024px) {
    .pricing-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-bar-grid { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 2.75rem; }
    .pricing-section { padding: 3rem 1.5rem; }
    .how-it-works { padding: 3rem 1.5rem; }
    .testimonials-section { padding: 3rem 1.5rem; }
    .features-section { padding: 3rem 1.5rem; }
    .navbar-nav { gap: 1rem; }
    .admin-content { padding: 1.5rem; }
}

/* ==========================================================================
   MOBILE BREAKPOINT - max-width: 768px
   ========================================================================== */
@media (max-width: 768px) {

    /* --- Hamburger & Navbar --- */
    .hamburger { display: flex; }

    .navbar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .navbar-brand img { max-height: 28px; }

    .navbar-nav {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
        font-size: 0.85rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s ease;
    }

    .navbar-nav.active {
        max-height: 600px;
    }

    .navbar-nav .btn-primary.btn-sm {
        width: 100%;
        display: block;
        text-align: center;
    }

    .user-profile-wrapper {
        width: 100%;
    }

    .user-menu {
        position: static;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        display: none;
        width: 100%;
        border-radius: 8px;
        background: var(--light);
        margin-top: 0.5rem;
    }

    .user-menu.open {
        display: block;
    }

    /* --- Admin Layout --- */
    .admin-mobile-toggle {
        display: flex !important;
    }

    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        display: block !important;
        width: 260px;
    }

    body.rtl .admin-sidebar {
        left: auto;
        right: 0;
        transform: translateX(100%);
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-sidebar-close {
        display: block !important;
    }

    .admin-sidebar .brand img { max-height: 20px; }

    .admin-content {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        padding: 1rem;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .admin-header > div {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .admin-header .btn,
    .admin-header a.btn {
        width: 100%;
        text-align: center;
    }

    .admin-content [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .admin-content [style*="display:grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .admin-content [style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .admin-content [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    .admin-content [style*="grid-template-columns:repeat"] {
        grid-template-columns: 1fr !important;
    }

    .admin-content [style*="display:flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }
    .admin-content [style*="display: flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }
    .admin-content [style*="display:flex"][style*="gap:1.5rem"] {
        flex-direction: column !important;
    }
    .admin-content [style*="display:flex"][style*="gap:1rem"] {
        flex-direction: column !important;
    }

    .admin-content [style*="display:inline-block"] {
        display: block !important;
        width: 100% !important;
    }

    .admin-content input[style*="max-width"],
    .admin-content select[style*="max-width"] {
        max-width: 100% !important;
    }

    .admin-content input[style*="width:80px"],
    .admin-content input[style*="width: 80px"] {
        width: 100% !important;
    }

    .admin-content [style*="min-width:250px"],
    .admin-content [style*="min-width: 250px"] {
        min-width: 0 !important;
    }

    .admin-content [style*="max-width:1000px"],
    .admin-content [style*="max-width:1100px"],
    .admin-content [style*="max-width: 1000px"],
    .admin-content [style*="max-width: 1100px"] {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .admin-content td[style*="max-width"] {
        max-width: 150px !important;
        word-break: break-all;
    }

    .admin-content form[method="GET"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .admin-content form[method="GET"] .form-control {
        max-width: 100% !important;
        width: 100% !important;
    }
    .admin-content form[method="GET"] select.form-control {
        max-width: 100% !important;
    }

    .admin-content form .form-group {
        width: 100%;
    }

    .admin-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    #livePreview {
        max-width: 100% !important;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* --- Landing Page --- */
    .hero {
        padding: 4rem 1.5rem;
    }

    .hero h1 { font-size: 2rem; }

    .hero p { font-size: 1rem; }

    .scan-box {
        flex-direction: column;
        border-radius: var(--border-radius);
        animation: none;
    }

    .scan-box input,
    .scan-box button {
        border-radius: 8px;
    }

    .features-grid { grid-template-columns: 1fr; }

    .steps-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .steps-grid::before { display: none; }

    .testimonials-grid { grid-template-columns: 1fr; }

    .pricing-grid { grid-template-columns: 1fr; }

    .pricing-card.featured {
        transform: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px);
    }

    .stats-bar-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .stats-bar { padding: 2rem 1rem; }
    .stats-bar-item { padding: 0.75rem 0.5rem; }
    .stats-bar-item .stat-number { font-size: 1.75rem; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .scan-module-list {
        grid-template-columns: 1fr;
    }

    /* --- Auth Pages --- */
    .auth-page {
        flex-direction: column;
    }

    .auth-left { display: none; }

    .auth-right {
        width: 100% !important;
        flex: none;
        padding: 2rem;
    }

    /* --- Report Layout --- */
    .report-layout {
        grid-template-columns: 1fr !important;
    }

    .report-layout > div:first-child,
    .report-layout > div:last-child {
        position: static !important;
    }

    /* --- User Pages - Inline Style Overrides --- */
    .container [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .container [style*="display:grid"][style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    .container [style*="max-width:1000px"],
    .container [style*="max-width:1100px"],
    .container [style*="max-width: 1000px"],
    .container [style*="max-width: 1100px"],
    [style*="max-width:1000px"],
    [style*="max-width:1100px"] {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .container [style*="min-width:250px"],
    .container [style*="min-width: 250px"] {
        min-width: 0 !important;
    }

    .container [style*="display:flex"][style*="gap"] {
        flex-wrap: wrap !important;
    }

    .container [style*="width:80px"],
    .container [style*="width: 80px"] {
        width: 100% !important;
    }

    /* --- Tables --- */
    table th, table td {
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .table-wrapper,
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .container table,
    .admin-content table {
        min-width: 600px;
    }

    .comparison-table-wrapper { overflow-x: auto; }

    /* --- Forms --- */
    .filter-bar,
    .audit-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar > *,
    .audit-filters > * {
        width: 100%;
    }

    .filter-input {
        min-width: 0;
    }

    .form-group-row,
    .form-row,
    .form-inline {
        flex-direction: column;
    }

    .form-group-row > *,
    .form-row > *,
    .form-inline > * {
        width: 100%;
    }

    .form-control,
    select.form-control,
    textarea.form-control {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* --- Modals --- */
    .modal,
    .share-modal {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }

    .modal [style*="display:flex"],
    .modal [style*="display: flex"] {
        flex-wrap: wrap !important;
    }

    .modal .btn {
        flex: 1;
        min-width: 120px;
    }

    /* --- Cards --- */
    .card {
        padding: 1.25rem;
    }

    /* --- Language Switcher --- */
    .lang-switcher {
        width: 100%;
    }

    .lang-btn {
        width: 100%;
        justify-content: center;
    }

    .lang-flyout {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid var(--gray-light);
        margin-top: 0.5rem;
    }

    /* --- Guest Banner --- */
    .guest-save-banner {
        flex-direction: column;
        text-align: center;
    }

    /* --- AI Suggestion Cards Mobile --- */
    .ai-suggestion {
        padding: 1rem;
    }

    .ai-suggestion p {
        font-size: 0.9rem;
    }

    .ai-suggestion pre {
        font-size: 0.75rem;
    }

    .ai-suggestion .badge {
        font-size: 0.7rem !important;
    }
}

/* ==========================================================================
   SMALL MOBILE BREAKPOINT - max-width: 480px
   ========================================================================== */
@media (max-width: 480px) {

    /* --- Hero --- */
    .hero h1 { font-size: 1.5rem; }
    .hero { padding: 3rem 1rem; }
    .hero p { font-size: 1rem; }

    .scan-box button {
        width: 100%;
        font-size: 0.9rem;
    }

    /* --- Layout --- */
    .container { padding: 1rem; }

    .stats-bar-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .stats-bar-item { padding: 0.5rem; }
    .stats-bar-item .stat-number { font-size: 1.5rem; }
    .stats-bar { padding: 1.5rem 1rem; }

    /* --- Cards --- */
    .card { padding: 1rem; }
    .pricing-card { padding: 1.25rem; }
    .auth-card { padding: 1.5rem; }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* --- Buttons --- */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-lg {
        display: block;
        width: 100%;
    }

    .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.95rem; }

    .admin-content .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.25rem;
    }

    /* --- Score --- */
    .score-circle { width: 90px; height: 90px; font-size: 1.5rem; border-width: 5px; }

    /* --- Admin Stats --- */
    .stats-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card .value {
        font-size: 1.5rem;
    }

    /* --- Admin Header --- */
    .admin-header h1 {
        font-size: 1.25rem;
    }

    /* --- Pricing --- */
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* --- Forms --- */
    .form-control,
    select.form-control,
    textarea.form-control {
        width: 100%;
    }

    /* --- Edit Actions --- */
    .edit-actions {
        flex-direction: column !important;
        width: 100%;
        gap: 0.5rem;
    }

    .edit-actions .btn {
        width: 100%;
    }

    /* --- User Page Inline Overrides --- */
    .container [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .container [style*="max-width:1000px"],
    .container [style*="max-width:1100px"],
    [style*="max-width:1000px"],
    [style*="max-width:1100px"] {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .container [style*="min-width:250px"] {
        min-width: 0 !important;
    }

    /* --- Comparison Table --- */
    .comparison-table th,
    .comparison-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    /* --- Guest History --- */
    .guest-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* --- AI Suggestions --- */
    .ai-suggestion {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .ai-suggestion strong {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .ai-suggestion pre {
        font-size: 0.7rem;
        padding: 0.5rem;
    }

    .suggestion-step-number {
        width: 24px;
        height: 24px;
        min-width: 24px;
        font-size: 0.75rem;
    }

    .ai-suggestion .badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
    }
}

.scan-progress-card {
    padding: 2rem;
}

.scan-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scan-progress-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.scan-progress-percent {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.scan-module-list {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.scan-module-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    background: var(--light);
    transition: background 0.2s;
}

.scan-module-status {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.9rem;
}

.scan-module-status.pending {
    color: var(--gray);
}

.scan-module-status.running {
    color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.scan-module-status.done {
    color: var(--success);
}

.scan-module-status.error {
    color: var(--danger);
}

.scan-module-item.active {
    background: #EEF2FF;
    font-weight: 500;
}

.guest-save-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-light);
    margin-top: 1.5rem;
    gap: 1.5rem;
}

.guest-save-content strong {
    font-size: 1.05rem;
    display: block;
    margin-bottom: 0.25rem;
    color: var(--dark);
}

.guest-save-content p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.guest-history-section {
    margin-top: 2rem;
}

.guest-history-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.guest-history-list {
    display: grid;
    gap: 0.75rem;
}

.guest-history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.guest-history-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.guest-history-url {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

.guest-history-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.score-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.score-badge.good {
    background: #D1FAE5;
    color: #065F46;
}

.score-badge.warning {
    background: #FEF3C7;
    color: #92400E;
}

.score-badge.critical {
    background: #FEE2E2;
    color: #991B1B;
}

.guest-history-date {
    font-size: 0.8rem;
    color: var(--gray);
}

.guest-history-note {
    text-align: center;
    color: var(--gray);
    font-size: 0.85rem;
    margin-top: 1rem;
}

.url-validation-feedback {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    transition: opacity 0.2s;
}

.url-validation-feedback.valid {
    color: #065F46;
    background: #D1FAE5;
}

.url-validation-feedback.invalid {
    color: #991B1B;
    background: #FEE2E2;
}

.url-validation-feedback.warning {
    color: #92400E;
    background: #FEF3C7;
}

.url-validation-feedback.hidden {
    display: none;
}

.share-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.share-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.share-modal {
    background: var(--light);
    border-radius: var(--border-radius);
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    position: relative;
}

body.dark-mode .share-modal {
    background: #1E293B;
    border: 1px solid var(--gray-light);
}

.share-modal h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.share-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    line-height: 1;
}

body.rtl .share-modal-close {
    right: auto;
    left: 1rem;
}

.share-link-group {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.share-link-group input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--light);
    color: var(--dark);
}

body.dark-mode .share-link-group input {
    background: #0F172A;
    border-color: #374151;
    color: #F9FAFB;
}

.share-link-group .btn-copy {
    padding: 0.75rem 1.25rem;
    border: none;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
}

.share-link-group .btn-copy:hover {
    background: var(--primary-dark);
}

.share-link-group .btn-copy.copied {
    background: var(--success);
}

.view-only-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.comparison-panel {
    margin-top: 1.5rem;
    display: none;
}

.comparison-panel.active {
    display: block;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
}

body.rtl .comparison-table th,
body.rtl .comparison-table td {
    text-align: right;
}

.comparison-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

body.dark-mode .comparison-table th {
    background: #312E81;
}

.comparison-table tr:hover td {
    background: rgba(79,70,229,0.05);
}

body.dark-mode .comparison-table tr:hover td {
    background: rgba(129,140,248,0.1);
}

.delta-up { color: var(--success); font-weight: 700; }
.delta-down { color: var(--danger); font-weight: 700; }
.delta-same { color: var(--gray); font-weight: 600; }

.admin-mobile-toggle {
    display: none;
    background: var(--primary);
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
    position: sticky;
    top: 10px;
    z-index: 100;
}

.admin-mobile-toggle span {
    display: block;
    width: 22px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.admin-sidebar-close {
    display: none;
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    transition: background 0.2s;
}
.admin-sidebar-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}
.rtl .admin-sidebar-close {
    right: auto;
    left: 0.75rem;
}

.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 998;
}

.admin-sidebar-overlay.active {
    display: block;
}

.edit-actions {
    display: flex;
    gap: 0.25rem;
    align-items: center;
}

.edit-input {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
}

.user-actions {
    min-width: 140px;
}

.score-grade {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: 0.05em;
}

.suggestion-step-number {
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
}

.suggestion-step-number.critical {
    background: var(--danger);
}

.suggestion-step-number.warning {
    background: var(--warning);
    color: #92400E;
}

.suggestion-step-number.info {
    background: var(--primary);
}

.scan-module-item.ai-step {
    border-top: 1px dashed var(--gray-light);
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

@media print {
    .navbar, .footer, .admin-header .btn, .share-modal-overlay, .comparison-toggle-btn { display: none !important; }
    .report-layout { display: block !important; }
    .report-layout > div { position: static !important; max-height: none !important; overflow: visible !important; }
    .collapsible-body { display: block !important; }
    .collapsible .arrow { display: none !important; }
    body { background: white !important; color: black !important; }
    .card { box-shadow: none !important; border: 1px solid #ddd !important; page-break-inside: avoid; }
    .score-circle { border-width: 4px !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .ai-suggestion { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
    .badge { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
