/* ============================================
   LEGTECH – Modern Cybersecurity Website
   ============================================ */

:root {
    /* Default theme (Midnight) — overridden by inline <style> from DB */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --accent: #06b6d4;
    --accent-light: #22d3ee;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --surface: #1e293b;
    --surface-light: #334155;
    --text: #e2e8f0;
    --text-muted: #94a3b8;
    --text-bright: #f8fafc;
    --grid-color: rgba(99,102,241,0.03);
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --gradient: linear-gradient(135deg, var(--primary), var(--accent));
    --gradient-subtle: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.1));
    --radius: 12px;
    --radius-lg: 20px;
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 20px 40px -12px rgba(0,0,0,0.5);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--dark);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Animated grid background */
.bg-grid {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(var(--grid-color) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-color) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    animation: gridMove 20s linear infinite;
}
@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(60px, 60px); }
}

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

/* ============ NAVIGATION ============ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    backdrop-filter: blur(20px);
    background: rgba(15,23,42,0.8);
    border-bottom: 1px solid rgba(99,102,241,0.1);
}
.navbar.scrolled {
    padding: 8px 0;
    background: rgba(15,23,42,0.95);
    box-shadow: var(--shadow);
}
.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-bright);
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.02em;
}
.logo-icon { width: 36px; height: 36px; }
.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}
.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 4px;
}
.nav-link:hover, .nav-link.active { color: var(--text-bright); background: rgba(99,102,241,0.1); }
.chevron { width: 16px; height: 16px; transition: var(--transition); }
.btn-nav {
    background: var(--gradient);
    color: white !important;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 8px;
}
.btn-nav:hover { opacity: 0.9; transform: translateY(-1px); }

/* Dropdown */
.nav-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 240px;
    list-style: none;
    box-shadow: var(--shadow-lg);
}
.nav-dropdown:hover .dropdown-menu { display: block; }
.nav-dropdown:hover .chevron { transform: rotate(180deg); }
.dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
}
.dropdown-menu a:hover { color: var(--text-bright); background: rgba(99,102,241,0.1); }

/* Mobile nav */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ============ HERO ============ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}
.hero-content {
    max-width: 680px;
    position: relative;
    z-index: 2;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent-light);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out;
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--success); border-radius: 50%; animation: pulse 2s infinite; }
.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    color: var(--text-bright);
    margin-bottom: 24px;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}
.hero h1 .gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 40px;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}
.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}
.hero-visual {
    position: absolute;
    right: -100px;
    top: 50%;
    transform: translateY(-50%);
    width: 600px;
    height: 600px;
    z-index: 1;
}
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 6s ease-in-out infinite;
}
.hero-orb-1 { width: 400px; height: 400px; background: var(--primary); top: 0; right: 0; }
.hero-orb-2 { width: 300px; height: 300px; background: var(--accent); bottom: 0; left: 0; animation-delay: -3s; }
.hero-orb-3 { width: 200px; height: 200px; background: #8b5cf6; top: 50%; left: 30%; animation-delay: -1.5s; }

/* Floating shield SVG */
.hero-shield {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    height: 280px;
    animation: floatSlow 8s ease-in-out infinite;
    opacity: 0.7;
}

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: inherit;
}
.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(99,102,241,0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(99,102,241,0.4); }
.btn-secondary {
    background: rgba(99,102,241,0.1);
    color: var(--text-bright);
    border: 1px solid rgba(99,102,241,0.2);
}
.btn-secondary:hover { background: rgba(99,102,241,0.2); transform: translateY(-2px); }

/* ============ SECTIONS ============ */
.section { padding: 100px 0; }
.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 64px;
}
.section-label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: 12px;
}
.section-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.section-desc { color: var(--text-muted); font-size: 1.05rem; }

/* ============ SERVICES CARDS ============ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}
.service-card {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}
.service-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99,102,241,0.2);
    box-shadow: var(--shadow-lg);
}
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}
.service-icon svg { width: 28px; height: 28px; color: var(--accent); }
.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 12px;
}
.service-card p { color: var(--text-muted); font-size: 0.95rem; }
.service-card .card-arrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 20px;
    transition: var(--transition);
}
.service-card:hover .card-arrow { gap: 12px; }

/* ============ FEATURE HIGHLIGHTS ============ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.feature-item {
    text-align: center;
    padding: 40px 24px;
    border-radius: var(--radius-lg);
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.08);
    transition: var(--transition);
}
.feature-item:hover { transform: translateY(-4px); border-color: rgba(99,102,241,0.2); }
.feature-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}
.feature-item h4 { color: var(--text-bright); margin-bottom: 8px; }
.feature-item p { color: var(--text-muted); font-size: 0.9rem; }

/* ============ CTA SECTION ============ */
.cta-section {
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-lg);
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.05;
    filter: blur(80px);
}
.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
}
.cta-section p {
    color: var(--text-muted);
    max-width: 500px;
    margin: 0 auto 32px;
}

/* ============ PAGE HERO (sub-pages) ============ */
.page-hero {
    padding: 160px 0 80px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient);
    opacity: 0.05;
}
.page-hero .container { position: relative; z-index: 2; }
.page-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--text-bright);
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}
.page-hero p { color: var(--text-muted); font-size: 1.15rem; max-width: 600px; }
.breadcrumb {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ============ SERVICE DETAIL ============ */
.service-detail { padding: 80px 0; }
.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.service-detail-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 20px;
}
.service-detail-content p {
    color: var(--text-muted);
    margin-bottom: 24px;
}
.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 24px;
}
.tech-tag {
    padding: 6px 16px;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent-light);
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}
.check-list { list-style: none; margin-top: 20px; }
.check-list li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    color: var(--text);
}
.check-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 16px;
    height: 16px;
    background: var(--gradient);
    border-radius: 50%;
    opacity: 0.6;
}

/* Service visual placeholder with SVG */
.service-visual {
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: var(--radius-lg);
    padding: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 360px;
    position: relative;
    overflow: hidden;
}
.service-visual svg {
    width: 100%;
    max-width: 300px;
    height: auto;
}

/* ============ ABOUT ============ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.about-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 20px;
}
.about-content p { color: var(--text-muted); margin-bottom: 16px; }
.about-visual {
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: var(--radius-lg);
    padding: 48px;
    text-align: center;
}
.stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 32px;
}
.stat-card {
    background: var(--surface);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid rgba(99,102,241,0.08);
    text-align: center;
}
.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; margin-top: 4px; }

/* ============ CONTACT ============ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
}
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 10px;
    padding: 14px 16px;
    color: var(--text-bright);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.form-group textarea { min-height: 140px; resize: vertical; }
.contact-info-cards { display: flex; flex-direction: column; gap: 20px; }
.contact-card {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.contact-card-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--gradient-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-card-icon svg { width: 20px; height: 20px; color: var(--accent); }
.contact-card h4 { color: var(--text-bright); font-size: 0.95rem; margin-bottom: 4px; }
.contact-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ============ FLASH MESSAGES ============ */
.flash-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.flash {
    padding: 14px 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
    backdrop-filter: blur(20px);
    animation: slideIn 0.3s ease-out;
}
.flash-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.3); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.3); color: var(--error); }
.flash-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.3rem;
    margin-left: auto;
    opacity: 0.7;
}
.flash-close:hover { opacity: 1; }

/* ============ FOOTER ============ */
.footer {
    border-top: 1px solid rgba(99,102,241,0.08);
    padding: 64px 0 32px;
    margin-top: 80px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
}
.footer-tagline { color: var(--text-muted); font-size: 0.9rem; margin-top: 12px; }
.footer-links h4, .footer-contact h4 {
    color: var(--text-bright);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}
.footer-links ul { list-style: none; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 4px 0;
    display: block;
    transition: var(--transition);
}
.footer-links a:hover { color: var(--accent); }
.footer-contact p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }
.footer-legal { margin-top: 12px; font-size: 0.8rem; opacity: 0.6; }
.footer-bottom {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(99,102,241,0.08);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-30px); }
}
@keyframes floatSlow {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) translateY(-20px) rotate(3deg); }
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ============ SLIDER / CAROUSEL ============ */
.slider-section { padding: 80px 0; overflow: hidden; }
.slider-track {
    display: flex;
    gap: 24px;
    animation: scroll 30s linear infinite;
}
.slider-track:hover { animation-play-state: paused; }
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.slide-card {
    flex-shrink: 0;
    width: 300px;
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
}
.slide-card svg { width: 64px; height: 64px; margin-bottom: 16px; }
.slide-card h4 { color: var(--text-bright); margin-bottom: 8px; }
.slide-card p { color: var(--text-muted); font-size: 0.9rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .hero-visual { display: none; }
    .service-detail-grid,
    .about-grid,
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .features-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--surface);
        border-top: 1px solid rgba(99,102,241,0.1);
        flex-direction: column;
        padding: 16px;
        gap: 4px;
    }
    .nav-menu.open { display: flex; }
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: rgba(99,102,241,0.05);
        margin-top: 4px;
    }
    .nav-dropdown:hover .dropdown-menu { display: none; }
    .nav-dropdown.open .dropdown-menu { display: block; }
    .services-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .section { padding: 60px 0; }
    .stat-grid { grid-template-columns: 1fr; }
    .theme-panel { width: 100%; }
}

/* ============ THEME PANEL ============ */
.theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.theme-toggle-btn:hover { color: var(--accent); background: rgba(99,102,241,0.1); }

.theme-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    height: 100vh;
    background: var(--dark-2);
    border-left: 1px solid rgba(99,102,241,0.1);
    z-index: 3000;
    overflow-y: auto;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.3);
}
.theme-panel.open { right: 0; }
.theme-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.theme-panel-overlay.open { opacity: 1; pointer-events: auto; }

.theme-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(99,102,241,0.08);
}
.theme-panel-header h3 {
    color: var(--text-bright);
    font-size: 1.1rem;
    font-weight: 600;
}
.theme-panel-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}
.theme-panel-close:hover { color: var(--text-bright); background: rgba(99,102,241,0.1); }

.theme-panel-section { padding: 24px; }
.theme-panel-section h4 {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.theme-options, .logo-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.theme-option, .logo-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
    font-family: inherit;
    color: inherit;
    width: 100%;
}
.theme-option:hover, .logo-option:hover {
    border-color: rgba(99,102,241,0.2);
    background: var(--surface-light);
}
.theme-option.active, .logo-option.active {
    border-color: var(--primary);
    background: var(--surface-light);
}

.theme-swatch {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.theme-option-info, .logo-option-info { display: flex; flex-direction: column; gap: 2px; }
.theme-option-name { color: var(--text-bright); font-size: 0.9rem; font-weight: 600; }
.theme-option-desc { color: var(--text-muted); font-size: 0.78rem; }

.logo-preview {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.logo-preview .logo-icon { width: 44px; height: 44px; }

/* Theme transition on all elements */
*, *::before, *::after {
    transition: background-color 0.4s ease, border-color 0.4s ease, color 0.2s ease;
}

/* ============ GDPR COOKIE BANNER ============ */
.gdpr-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    background: var(--dark-2);
    border-top: 1px solid rgba(99,102,241,0.15);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.4);
    backdrop-filter: blur(20px);
    animation: gdprSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes gdprSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}
.gdpr-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}
.gdpr-banner-content {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    flex: 1;
}
.gdpr-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    color: var(--accent);
    margin-top: 2px;
}
.gdpr-title {
    color: var(--text-bright);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.gdpr-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.6;
}
.gdpr-text a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.gdpr-text a:hover { color: var(--accent-light); }
.gdpr-banner-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}
.gdpr-btn { padding: 10px 20px; font-size: 0.85rem; white-space: nowrap; }

@media (max-width: 768px) {
    .gdpr-banner-inner { flex-direction: column; gap: 16px; }
    .gdpr-banner-actions { width: 100%; }
    .gdpr-banner-actions .btn { flex: 1; justify-content: center; }
}

/* ============ LEGAL / PRIVACY / GDPR PAGES ============ */
.legal-content { padding-bottom: 40px; }
.legal-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 48px;
    align-items: start;
}

/* Table of Contents sidebar */
.legal-toc {
    position: sticky;
    top: 100px;
}
.legal-toc h4 {
    color: var(--text-bright);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 16px;
}
.legal-toc nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.legal-toc nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    padding: 6px 12px;
    border-radius: 6px;
    border-left: 2px solid transparent;
    transition: var(--transition);
}
.legal-toc nav a:hover {
    color: var(--text-bright);
    background: rgba(99,102,241,0.06);
    border-left-color: var(--primary);
}
.legal-cta-card {
    margin-top: 24px;
    padding: 20px;
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: var(--radius);
}
.legal-cta-card p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* Legal body */
.legal-body { min-width: 0; }
.legal-section {
    margin-bottom: 48px;
    scroll-margin-top: 100px;
}
.legal-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(99,102,241,0.08);
}
.legal-section h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-top: 24px;
    margin-bottom: 10px;
}
.legal-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 8px;
}
.legal-section p {
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.8;
}

.legal-list {
    list-style: none;
    margin: 12px 0;
    padding: 0;
}
.legal-list li {
    padding: 8px 0 8px 24px;
    color: var(--text-muted);
    position: relative;
    line-height: 1.7;
}
.legal-list li::before {
    content: '';
    position: absolute;
    left: 4px;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gradient);
    opacity: 0.5;
}
.legal-list-ordered { counter-reset: legal-counter; }
.legal-list-ordered li { counter-increment: legal-counter; }
.legal-list-ordered li::before {
    content: counter(legal-counter);
    background: var(--gradient);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    opacity: 1;
    left: 0;
    top: 10px;
}

/* Cards and highlights */
.legal-card {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius);
    padding: 24px;
}
.legal-card p { margin-bottom: 4px; }
.legal-card p:last-child { margin-bottom: 0; }

.legal-highlight {
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.12);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius);
    padding: 20px 24px;
    margin: 16px 0;
}
.legal-highlight p { color: var(--text); }

/* Legal table */
.legal-table-wrap { overflow-x: auto; margin: 16px 0; }
.legal-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.legal-table th,
.legal-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(99,102,241,0.06);
}
.legal-table th {
    color: var(--text-bright);
    font-weight: 600;
    background: rgba(99,102,241,0.04);
    white-space: nowrap;
}
.legal-table td { color: var(--text-muted); }
.legal-table code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    background: rgba(99,102,241,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    color: var(--accent-light);
}

/* Rights grid */
.rights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.right-card {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius);
    padding: 20px;
}
.right-card h4 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 6px;
}
.right-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* GDPR principles grid */
.principles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.principle-card {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius);
    padding: 24px;
    position: relative;
}
.principle-number {
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 10px;
    opacity: 0.5;
}
.principle-card h4 { color: var(--text-bright); font-size: 0.95rem; margin-bottom: 8px; }
.principle-card p { color: var(--text-muted); font-size: 0.85rem; margin: 0; }

/* GDPR compliance badge */
.gdpr-badge-section { margin-bottom: 48px; }
.gdpr-badge {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    background: var(--gradient-subtle);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: var(--radius-lg);
}
.gdpr-badge svg { width: 80px; height: 80px; flex-shrink: 0; }
.gdpr-badge h3 {
    color: var(--text-bright);
    font-size: 1.3rem;
    margin-bottom: 8px;
}
.gdpr-badge p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Legal page responsive */
@media (max-width: 1024px) {
    .legal-grid { grid-template-columns: 1fr; gap: 32px; }
    .legal-toc { position: static; }
}
@media (max-width: 768px) {
    .rights-grid, .principles-grid { grid-template-columns: 1fr; }
    .gdpr-badge { flex-direction: column; text-align: center; }
}

/* ============ ASM WAF POLICY PAGE ============ */
.asm-dashboard {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: var(--radius-lg);
    padding: 36px;
    margin-bottom: 48px;
}
.asm-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.asm-stat {
    text-align: center;
    padding: 16px;
    background: var(--gradient-subtle);
    border-radius: var(--radius);
    border: 1px solid rgba(99,102,241,0.06);
}
.asm-stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.asm-stat-blocking { font-size: 1.2rem !important; }
.asm-stat-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 4px;
}
.asm-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.asm-import-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--dark);
    border: 1px solid rgba(99,102,241,0.1);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-light);
    overflow-x: auto;
}
.asm-copy-btn {
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.2);
    color: var(--accent);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}
.asm-copy-btn:hover { background: rgba(99,102,241,0.25); }

.asm-section {
    background: var(--surface);
    border: 1px solid rgba(99,102,241,0.08);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 24px;
}
.asm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-bright);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 20px;
}
.asm-section-title svg { color: var(--accent); flex-shrink: 0; }

.asm-table { margin: 0; }
.asm-table code { white-space: nowrap; }
.asm-desc-cell { max-width: 200px; font-size: 0.8rem; }

.asm-method {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    margin-right: 4px;
}
.asm-method-get { background: rgba(16,185,129,0.15); color: var(--success); }
.asm-method-post { background: rgba(99,102,241,0.15); color: var(--primary); }
.asm-method-head { background: rgba(148,163,184,0.15); color: var(--text-muted); }
.asm-method-options { background: rgba(148,163,184,0.1); color: var(--text-muted); }

.asm-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 600;
}
.asm-badge-active { background: rgba(16,185,129,0.15); color: var(--success); }
.asm-badge-default { background: rgba(148,163,184,0.1); color: var(--text-muted); }
.asm-badge-blocking { background: rgba(239,68,68,0.15); color: var(--error); }
.asm-badge-transparent { background: rgba(245,158,11,0.15); color: var(--warning); }

.asm-signatures-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 8px;
}
.asm-signature-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--gradient-subtle);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text);
}
.asm-sig-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    flex-shrink: 0;
}
.asm-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.asm-two-col .asm-section { margin-bottom: 0; }
.asm-list { display: flex; flex-direction: column; gap: 6px; }
.asm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(99,102,241,0.03);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text);
}
.asm-list-item code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    color: var(--accent-light);
}

.asm-features { display: flex; flex-direction: column; gap: 6px; }
.asm-feature {
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(99,102,241,0.03);
    display: flex;
    align-items: center;
    gap: 8px;
}
.asm-feature::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
}
.asm-feature.active { color: var(--text); }
.asm-feature.active::before { background: var(--success); opacity: 1; }

.asm-filetypes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.asm-param-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(99,102,241,0.1);
    border-radius: 4px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--accent-light);
    margin: 2px;
}
.asm-param-type {
    font-size: 0.65rem;
    color: var(--text-muted);
    padding-left: 4px;
    border-left: 1px solid rgba(99,102,241,0.2);
}

.asm-footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
.asm-footer code {
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-light);
    background: rgba(99,102,241,0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

@media (max-width: 1024px) {
    .asm-two-col { grid-template-columns: 1fr; }
    .asm-filetypes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .asm-stat-grid { grid-template-columns: repeat(2, 1fr); }
    .asm-signatures-grid { grid-template-columns: 1fr; }
}
