[x-cloak] { display: none !important; }

:root {
    --color-primary: #4f46e5;
    --color-primary-hover: #4338ca;
    --color-primary-light: rgba(79, 70, 229, 0.08);
    --color-secondary: #7C3AED;
    --color-accent: #10B981;
    --color-danger: #ef4444;
    --color-warning: #f59e0b;
    --color-dark: #0A1628;
    --color-light: #F8FAFC;
    --color-admin-sidebar: #1e293b;
    --color-admin-sidebar-hover: rgba(255, 255, 255, 0.06);
    --color-admin-sidebar-active: rgba(79, 70, 229, 0.15);
    --color-app-sidebar: #F1F5F9;
    --font-heading: 'Inter', sans-serif;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --transition-base: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #334155;
    background: #f1f5f9;
}
h1, h2, h3, h4, h5, h6, .font-heading { font-family: var(--font-heading); color: #0f172a; }

/* ──────────────────────────────────────────
   Hero gradient animation (D-05)
   ────────────────────────────────────────── */
.hero-gradient {
    background: linear-gradient(135deg, var(--color-dark) 0%, #1a2f5e 50%, #1d4ed8 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Feature card hover lift (D-05) */
.feature-card {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.15);
}

/* ──────────────────────────────────────────
   Admin Sidebar
   ────────────────────────────────────────── */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    z-index: 100;
    overflow-y: auto;
    flex-shrink: 0;
}
.admin-sidebar.collapsed { width: 68px; overflow: hidden; }

.admin-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.admin-sidebar .sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.admin-sidebar .sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.admin-sidebar .sidebar-nav {
    padding: 0.75rem 0.75rem;
    flex-grow: 1;
}
.admin-sidebar .nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 1rem 0.75rem 0.4rem;
    font-weight: 600;
}
.admin-sidebar .nav-link {
    color: #94a3b8;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    font-size: 0.875rem;
    font-weight: 450;
    position: relative;
}
.admin-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: color var(--transition-base);
}
.admin-sidebar .nav-link:hover {
    color: #e2e8f0;
    background: var(--color-admin-sidebar-hover);
    border-left-color: rgba(255, 255, 255, 0.15);
}
.admin-sidebar .nav-link.active {
    color: #fff;
    background: var(--color-admin-sidebar-active);
    border-left-color: var(--color-primary);
    font-weight: 500;
}
.admin-sidebar .nav-link.active i {
    color: var(--color-primary);
}

/* Sidebar user card at bottom */
.admin-sidebar .sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ──────────────────────────────────────────
   Top Bar
   ────────────────────────────────────────── */
.admin-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    padding: 0 1.5rem;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}
.admin-topbar .topbar-toggle {
    border: none;
    background: none;
    color: #64748b;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    font-size: 1.2rem;
}
.admin-topbar .topbar-toggle:hover {
    color: #1e293b;
    background: #f1f5f9;
}
.admin-topbar .topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.admin-topbar .topbar-user .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}
.admin-topbar .topbar-user .user-email {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 450;
}

/* ──────────────────────────────────────────
   Page Content Area
   ────────────────────────────────────────── */
.admin-content {
    flex-grow: 1;
    padding: 2rem;
    background: #f1f5f9;
    min-height: calc(100vh - 60px);
}
.admin-content .page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}
.admin-content .page-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

/* ──────────────────────────────────────────
   Dashboard Stat Cards
   ────────────────────────────────────────── */
.stat-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: transparent;
}
.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    font-family: var(--font-heading);
}
.stat-card .stat-label {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 0.5rem;
}
.stat-card .stat-detail {
    font-size: 0.75rem;
    color: #94a3b8;
}

/* Stat card color variants */
.stat-card.stat-primary::before { background: linear-gradient(90deg, var(--color-primary), #818cf8); }
.stat-card.stat-primary .stat-icon { background: var(--color-primary-light); color: var(--color-primary); }

.stat-card.stat-purple::before { background: linear-gradient(90deg, #7c3aed, #a78bfa); }
.stat-card.stat-purple .stat-icon { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }

.stat-card.stat-green::before { background: linear-gradient(90deg, #10b981, #34d399); }
.stat-card.stat-green .stat-icon { background: rgba(16, 185, 129, 0.08); color: #10b981; }

.stat-card.stat-amber::before { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.stat-card.stat-amber .stat-icon { background: rgba(245, 158, 11, 0.08); color: #f59e0b; }

/* ──────────────────────────────────────────
   Cards (general)
   ────────────────────────────────────────── */
.admin-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.admin-card .admin-card-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #1e293b;
}
.admin-card .admin-card-header i {
    color: var(--color-primary);
    font-size: 1rem;
}
.admin-card .admin-card-body {
    padding: 1.5rem;
}

/* ──────────────────────────────────────────
   System Health Badges
   ────────────────────────────────────────── */
.health-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.health-indicator.health-ok { background: rgba(16, 185, 129, 0.1); color: #059669; }
.health-indicator.health-warn { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.health-indicator.health-off { background: rgba(100, 116, 139, 0.1); color: #64748b; }

/* ──────────────────────────────────────────
   Tables (Users, etc.)
   ────────────────────────────────────────── */
.admin-table {
    margin-bottom: 0;
}
.admin-table thead th {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    padding: 0.875rem 1rem;
    white-space: nowrap;
}
.admin-table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
    color: #334155;
}
.admin-table tbody tr {
    transition: background var(--transition-base);
}
.admin-table tbody tr:hover {
    background: #f8fafc;
}
.admin-table tbody tr:nth-child(even) {
    background: #fafbfc;
}
.admin-table tbody tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* Role & status badges */
.badge-pill {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.badge-role-admin { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-role-editor { background: var(--color-primary-light); color: var(--color-primary); }
.badge-role-viewer { background: rgba(100, 116, 139, 0.1); color: #64748b; }

.badge-status-active { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-status-suspended { background: rgba(245, 158, 11, 0.1); color: #d97706; }
.badge-status-pending { background: rgba(59, 130, 246, 0.1); color: #2563eb; }

/* Action buttons in table */
.action-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #64748b;
    transition: all var(--transition-base);
    font-size: 0.8rem;
}
.action-btn:hover { border-color: var(--color-primary); color: var(--color-primary); background: var(--color-primary-light); }
.action-btn.action-warning:hover { border-color: var(--color-warning); color: var(--color-warning); background: rgba(245,158,11,0.08); }
.action-btn.action-success:hover { border-color: var(--color-accent); color: var(--color-accent); background: rgba(16,185,129,0.08); }
.action-btn.action-danger:hover { border-color: var(--color-danger); color: var(--color-danger); background: rgba(239,68,68,0.08); }

/* ──────────────────────────────────────────
   Settings Tabs
   ────────────────────────────────────────── */
.settings-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 0;
    margin-bottom: 1.5rem;
}
.settings-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 0.75rem 1.25rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: 0;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}
.settings-tabs .nav-link:hover {
    color: #1e293b;
    border-bottom-color: #cbd5e1;
    background: transparent;
}
.settings-tabs .nav-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
    background: transparent;
    font-weight: 600;
}
.settings-tabs .nav-link i {
    font-size: 0.9rem;
}

/* Settings form styling */
.settings-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: var(--shadow-sm);
}
.settings-card .card-body {
    padding: 1.5rem 2rem;
}
.settings-card .form-label {
    font-weight: 550;
    font-size: 0.8125rem;
    color: #374151;
    margin-bottom: 0.375rem;
}
.settings-card .form-control,
.settings-card .form-select {
    border-radius: var(--radius-sm);
    border-color: #d1d5db;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.settings-card .form-control:focus,
.settings-card .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}
.settings-card .form-text {
    font-size: 0.75rem;
    color: #94a3b8;
}
.settings-card .form-check-input:checked {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
}

/* ──────────────────────────────────────────
   Quick Actions
   ────────────────────────────────────────── */
.quick-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

/* ──────────────────────────────────────────
   Alerts
   ────────────────────────────────────────── */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-size: 0.875rem;
}
.alert-info {
    background: rgba(59, 130, 246, 0.08);
    color: #1d4ed8;
}
.alert-success {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}
.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

/* ──────────────────────────────────────────
   Pagination
   ────────────────────────────────────────── */
.pagination .page-link {
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.8125rem;
    font-weight: 500;
    margin: 0 2px;
    padding: 0.4rem 0.75rem;
    transition: all var(--transition-base);
}
.pagination .page-link:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.pagination .page-item.active .page-link {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ──────────────────────────────────────────
   Modal
   ────────────────────────────────────────── */
.modal-content {
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: var(--shadow-lg);
}
.modal-header {
    border-bottom: 1px solid #f1f5f9;
    padding: 1.25rem 1.5rem;
}
.modal-header .modal-title {
    font-weight: 600;
    font-size: 1.05rem;
}
.modal-body { padding: 1.5rem; }
.modal-footer { border-top: 1px solid #f1f5f9; padding: 1rem 1.5rem; }

/* ──────────────────────────────────────────
   Search Input
   ────────────────────────────────────────── */
.search-input-group .form-control {
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    border-color: #d1d5db;
    font-size: 0.875rem;
    padding: 0.5rem 0.875rem;
}
.search-input-group .form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
    z-index: 1;
}
.search-input-group .btn {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* ──────────────────────────────────────────
   Buttons Override
   ────────────────────────────────────────── */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-base);
}
.btn-primary { background-color: var(--color-primary); border-color: var(--color-primary); }
.btn-primary:hover { background-color: var(--color-primary-hover); border-color: var(--color-primary-hover); box-shadow: 0 4px 12px rgba(79,70,229,0.25); }
.btn-outline-secondary { border-color: #d1d5db; color: #475569; }
.btn-outline-secondary:hover { background: #f1f5f9; border-color: #94a3b8; color: #1e293b; }
.btn-outline-danger { border-color: #fecaca; color: #dc2626; }
.btn-outline-danger:hover { background: rgba(239,68,68,0.08); border-color: #dc2626; color: #dc2626; }
.btn-lg { padding: 0.65rem 1.5rem; font-size: 0.9375rem; border-radius: var(--radius-md); }

/* ──────────────────────────────────────────
   App sidebar (matches admin sidebar styling)
   ────────────────────────────────────────── */
.app-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    z-index: 100;
    overflow-y: auto;
    flex-shrink: 0;
}
.app-sidebar.collapsed { width: 68px; overflow: hidden; }

.app-sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.app-sidebar .sidebar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}
.app-sidebar .sidebar-brand .brand-text {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    letter-spacing: -0.01em;
}

.app-sidebar .sidebar-nav {
    padding: 0.75rem 0.75rem;
    flex-grow: 1;
}
.app-sidebar .nav-section-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #475569;
    padding: 1rem 0.75rem 0.4rem;
    font-weight: 600;
}
.app-sidebar .nav-link {
    color: #94a3b8;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 2px;
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
    font-size: 0.875rem;
    font-weight: 450;
    position: relative;
}
.app-sidebar .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
    transition: color var(--transition-base);
}
.app-sidebar .nav-link:hover {
    color: #e2e8f0;
    background: var(--color-admin-sidebar-hover);
    border-left-color: rgba(255, 255, 255, 0.15);
}
.app-sidebar .nav-link.active {
    color: #fff;
    background: var(--color-admin-sidebar-active);
    border-left-color: var(--color-primary);
    font-weight: 500;
}
.app-sidebar .nav-link.active i {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .app-sidebar.mobile-open {
        transform: translateX(0);
    }
}

/* ──────────────────────────────────────────
   Auth layout
   ────────────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark) 0%, #1d4ed8 100%);
    display: flex; align-items: center; justify-content: center;
}
.auth-card { width: 100%; max-width: 420px; border-radius: var(--radius-xl); }

/* Homepage sections */
.py-6 { padding-top: 5rem; padding-bottom: 5rem; }

/* ──────────────────────────────────────────
   Pricing cards
   ────────────────────────────────────────── */
.pricing-card {
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-xl);
    padding: 2rem;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.pricing-card.featured {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
    position: relative;
}
.pricing-card .price { font-size: 2.5rem; font-weight: 700; color: var(--color-dark); font-family: var(--font-heading); }
.pricing-card .price-period { color: #94A3B8; font-size: 0.875rem; }
.pricing-card .feature-list li { padding: 0.4rem 0; border-bottom: 1px solid #F1F5F9; font-size: 0.9rem; }

/* SEO Score demo mockup */
.seo-demo-mockup {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.5rem;
}
.seo-score-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

/* Testimonials */
.testimonial-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.75rem;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* How It Works steps */
.step-number {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading);
    margin: 0 auto 1rem;
}

/* SEO Sidebar */
.seo-sidebar {
    width: 320px;
    min-width: 320px;
    background: #fff;
    border-left: 1px solid #E2E8F0;
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 80px);
    position: sticky;
    top: 0;
    border-radius: 0.5rem;
    transition: width 0.2s ease, min-width 0.2s ease, padding 0.2s ease;
}
.seo-sidebar.collapsed {
    width: 40px;
    min-width: 40px;
    padding: 8px 4px;
    overflow: hidden;
}
.seo-sidebar-toggle {
    cursor: pointer;
    padding: 4px;
    text-align: center;
    margin-bottom: 8px;
    border-radius: 4px;
    color: #64748B;
}
.seo-sidebar-toggle:hover {
    background: #F1F5F9;
    color: var(--color-primary);
}
.seo-grade-badge {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    text-align: center;
}
.seo-grade-badge .grade-letter {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
    font-family: var(--font-heading);
}
.seo-grade-badge .grade-score {
    font-size: 0.7rem;
    opacity: 0.9;
}
.grade-excellent { background: #198754; color: #fff; }
.grade-good { background: #0d6efd; color: #fff; }
.grade-average { background: #ffc107; color: #1a1a1a; }
.grade-poor { background: #dc3545; color: #fff; }
.seo-score-card {
    padding: 8px;
    border-radius: 6px;
    background: #f8f9fa;
}
.seo-grade-mini {
    font-weight: 700;
    font-size: 0.75rem;
    display: block;
    margin-top: 4px;
}
/* Mobile SEO toggle button */
.seo-mobile-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1050;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
/* Responsive: hide sidebar on narrow screens, show via mobile toggle */
@media (max-width: 992px) {
    .seo-sidebar {
        display: none;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        max-height: 100vh;
        z-index: 1040;
        box-shadow: -4px 0 16px rgba(0,0,0,0.1);
        border-radius: 0;
    }
    .seo-sidebar.seo-sidebar-mobile-open {
        display: block;
    }
}

/* ──────────────────────────────────────────
   Responsive Admin Sidebar
   ────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1049;
    backdrop-filter: blur(2px);
}
.sidebar-overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px !important;
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .admin-sidebar.mobile-open {
        transform: translateX(0);
    }

    .admin-content {
        padding: 1rem;
    }
    .admin-topbar {
        padding: 0 1rem;
    }
    .admin-topbar .topbar-user .user-email {
        display: none;
    }

    .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .admin-table {
        font-size: 0.8rem;
    }
    .admin-table thead th,
    .admin-table tbody td {
        padding: 0.625rem 0.5rem;
    }

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

    .quick-action-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8rem;
    }

    .modal-dialog {
        margin: 0.5rem;
    }

    .settings-card .card-body {
        padding: 1rem;
    }

    .search-input-group {
        max-width: 100% !important;
    }
}
