:root {
    /* Light theme */
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --primary: #0ea5e9;
    /* cyan-500 */
    --primary-contrast: #ffffff;
    --ring: rgba(14, 165, 233, .35);
    --sidebar-bg: #0b1120;
    /* slate-950 */
    --sidebar-text: #e5e7eb;
    --sidebar-active: #22d3ee;
    /* cyan-400 */
}

[data-theme="dark"] {
    --bg: #0b1020;
    /* --surface: #0f172a; */
    --surface: #ffffff;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #22d3ee;
    /* cyan-400 */
    --primary-contrast: #0b1120;
    --ring: rgba(34, 211, 238, .35);
    --sidebar-bg: #020617;
    /* slate-950 deeper */
    --sidebar-text: #cbd5e1;
    --sidebar-active: #67e8f9;
    /* cyan-300 */
}

html,
body {
    height: 100%;
    background: var(--bg);
    color: var(--text);
}

/* Layout */
.app {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

@media (max-width: 992px) {
    .app {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 80%;
        max-width: 320px;
        transform: translateX(-100%);
        transition: transform .3s ease;
        z-index: 1040;
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-backdrop {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, .35);
        backdrop-filter: blur(2px);
        display: none;
        z-index: 1039;
    }

    .sidebar-backdrop.show {
        display: block;
    }
}

.sidebar {
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 1.25rem 1rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.25rem;
}

.brand .logo {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, var(--primary), #7dd3fc);
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--primary-contrast);
    font-weight: 800;
}

.brand .title {
    font-weight: 700;
    letter-spacing: .3px;
}

.sidebar .nav-link {
    color: var(--sidebar-text);
    border-radius: .75rem;
    padding: .625rem .75rem;
    display: flex;
    align-items: center;
    gap: .625rem;
    font-weight: 500;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, .06);
}

.sidebar .nav-link.active {
    background: rgba(34, 211, 238, .15);
    color: var(--sidebar-active);
    box-shadow: 0 0 0 .2rem rgba(34, 211, 238, .15) inset;
}

.content {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
    background: var(--bg);
}

.app-header {
    background: var(--surface);
    border-bottom: 1px solid rgba(148, 163, 184, .25);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.app-header .btn-theme {
    border-radius: 999px;
}

.app-main {
    padding: 1.25rem;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: 1rem;
}

.card .card-header {
    background: transparent;
    border-bottom: 1px dashed rgba(148, 163, 184, .35);
    font-weight: 600;
}

.hero {
    background: radial-gradient(1200px 400px at 20% -10%, rgba(34, 211, 238, .25), transparent),
        radial-gradient(1000px 300px at 80% -20%, rgba(14, 165, 233, .25), transparent);
    border-radius: 1.25rem;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, .25);
}

.badge-soft {
    background: rgba(14, 165, 233, .15);
    color: var(--primary);
    border: 1px solid rgba(14, 165, 233, .25);
}

.pricing .card {
    transition: transform .2s ease, box-shadow .2s ease;
}

.pricing .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .35);
}

.footer {
    background: var(--surface);
    border-top: 1px solid rgba(148, 163, 184, .25);
}

/* Forms */
.form-control,
.form-select {
    background: transparent;
    color: var(--text);
    border-radius: .75rem;
    border-color: rgba(148, 163, 184, .35);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem var(--ring);
}

.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: #0891b2;
    --bs-btn-hover-border-color: #0891b2;
    --bs-btn-color: var(--primary-contrast);
    border-radius: .75rem;
}

.btn-outline-light {
    border-radius: .75rem;
}

/* Hide non-active sections */
section.app-section {
    display: none;
}

section.app-section.active {
    display: block;
}

/* Utilities */
.rounded-2xl {
    border-radius: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    color: #fff;
    font-size: 14px;
    text-decoration: none;
    transition: 0.3s ease;
}

.social-icon:hover {
    opacity: 0.8;
    transform: scale(1.1);
}

/* Brand Colors */
.bg-facebook {
    background: #1877f2;
}

.bg-linkedin {
    background: #0a66c2;
}

.bg-x {
    background: #000000;
}

.bg-instagram {
    background: radial-gradient(circle at 30% 107%,
            #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.bg-whatsapp {
    background: #25d366;
}