html {
    scroll-behavior: smooth;
    background: #080c10;
    color-scheme: dark;
}

:root {
    --glow: #0084E6;
    --glow-rgb: 0, 132, 230;
    --bg-base: #080c10;
    --bg-card: #0c1018;
    --bg-input: #0a0e14;
    --bg-dropdown: #0d1219;
    --border: rgba(255, 255, 255, .08);
    --text: #e2e8f0;
    --text-muted: #8b9bb4;
    --radius: 14px;
    --glow-size: 400px;
}

* {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .05) transparent;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg-base);
    color: var(--text);
    line-height: 1.6;
}

body.has-sidebar {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.global-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 18px;
    transition: opacity 0.3s, visibility 0.3s;
}

body:not(.loading) .global-loader {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.05);
    border-left-color: var(--glow);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

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

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

body.loading>aside,
body.loading>main,
body.loading>.fab,
body.loading>.page-content {
    opacity: 0 !important;
    pointer-events: none;
}

body>aside,
body>main,
body>.fab,
body>.page-content {
    transition: opacity 0.3s;
    opacity: 1;
}

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .05);
    border-radius: 10px;
}

:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, .15);
}

.glow-target {
    position: relative;
    z-index: 1;
}

.glow-target::before {
    content: '';
    position: absolute;
    inset: -1px;
    z-index: -2;
    opacity: 0;
    transition: opacity .35s;
    pointer-events: none;
    border-radius: inherit;
}

.glow-target::after {
    content: '';
    position: absolute;
    inset: 1px;
    z-index: -1;
    pointer-events: none;
    border-radius: inherit;
}

.glow-target:hover::before,
.glow-target:focus-within::before {
    opacity: 1;
}

.main-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    z-index: 1;
}

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 5px;
    position: relative;
}

.header-bar h2 {
    margin: 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.status-badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: #000;
    background: var(--glow);
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0.3px;
}

.welcome-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.welcome-text span {
    color: var(--glow);
    font-weight: 700;
}

.tab-section {
    display: none;
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tab-section.active {
    display: block;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.glow-sidebar {
    width: 260px;
    background: rgba(255, 255, 255, .01);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 50;
    padding: 24px 0;
}

.brand-logo {
    padding: 0 24px 30px;
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--glow);
    letter-spacing: 0.5px;
}

.nav-item {
    padding: 14px 24px;
    color: var(--text-muted);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 3px solid transparent;
    text-decoration: none;
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    flex-shrink: 0;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
}

.nav-item.active {
    color: var(--glow);
    background: rgba(var(--glow-rgb), 0.05);
    border-left-color: var(--glow);
    font-weight: 600;
}

.flex-row-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-wrapper {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    width: 100%;
    align-items: center;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 10px;
}

h1,
h2,
h3 {
    color: #fff;
    letter-spacing: -0.5px;
}

/* Light theme overrides */
[data-theme="light"] html {
    background: #f0f2f5;
    color-scheme: light;
}

[data-theme="light"] body {
    background: #f0f2f5;
    color: #0f172a;
}

[data-theme="light"] {
    --bg-base: #f0f2f5;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --bg-dropdown: #f1f5f9;
    --border: rgba(0, 0, 0, 0.06);
    --text: #0f172a;
    --text-muted: #64748b;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3 {
    color: #0f172a;
}

[data-theme="light"] .glow-sidebar {
    background: rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .top-nav {
    background: rgba(240, 242, 245, 0.75);
}

[data-theme="light"] .global-loader {
    background: #f0f2f5;
}

[data-theme="light"] .welcome-text {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .service-card::after,
[data-theme="light"] .showcase-card::after {
    background: var(--bg-card);
}

@media (max-width: 768px) {
    body {
        flex-direction: column;
    }

    .main-content {
        padding: 20px 15px 100px 15px;
    }

    .glow-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 75px;
        padding: 0;
        border-right: none;
        border-top: 1px solid var(--border);
        flex-direction: row;
        justify-content: space-around;
        align-items: center;
        background: rgba(8, 12, 16, .98);
        z-index: 100;
    }

    [data-theme="light"] .glow-sidebar {
        background: rgba(255, 255, 255, 0.95);
    }

    .brand-logo {
        display: none;
    }

    .nav-item {
        padding: 12px 10px 18px 10px;
        border-left: none;
        flex: 1;
        text-align: center;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 0;
        margin: 0;
        position: relative;
    }

    .nav-item span {
        display: none;
    }

    .nav-item svg {
        width: 24px;
        height: 24px;
        margin: 0 auto;
        transition: transform 0.2s;
    }

    .nav-item:hover {
        background: transparent;
    }

    .nav-item.active {
        background: transparent;
        border-color: transparent;
    }

    .nav-item.active svg {
        transform: translateY(-2px);
    }

    .nav-item.active::after {
        content: '';
        position: absolute;
        bottom: 6px;
        width: 5px;
        height: 5px;
        background: var(--glow);
        border-radius: 50%;
        left: 50%;
        transform: translateX(-50%);
    }

    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .user-controls {
        width: 100%;
        justify-content: space-between;
    }

    .glow-card {
        padding: 20px 15px;
    }

    .search-wrapper {
        flex-wrap: wrap;
    }
}