:root {
    --fx-bg: #f3f6f3;
    --fx-surface: #ffffff;
    --fx-border: #e2ebe4;
    --fx-text: #0f172a;
    --fx-muted: #64748b;
    --fx-accent: #00a34d;
    --fx-accent-2: #d4ff00;
    --fx-sidebar: #050505;
    --fx-sidebar-text: #cbd5e1;
    --fx-radius: 14px;
    --fx-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

[data-bs-theme="dark"] {
    --fx-bg: #0a0a0a;
    --fx-surface: #121212;
    --fx-border: #243044;
    --fx-text: #e2e8f0;
    --fx-muted: #94a3b8;
    --fx-sidebar: #000000;
    --fx-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

* { box-sizing: border-box; }

body.fx-body {
    margin: 0;
    font-family: "DM Sans", system-ui, sans-serif;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(0, 163, 77, .14), transparent 55%),
        radial-gradient(900px 400px at 100% 0%, rgba(212, 255, 0, .08), transparent 50%),
        var(--fx-bg);
    color: var(--fx-text);
    min-height: 100vh;
}

.fx-shell { min-height: 100vh; }

.fx-sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--fx-sidebar), #101827 80%);
    color: var(--fx-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1030;
}

.fx-brand-logo {
    display: block;
    width: 100%;
    max-width: 196px;
    height: auto;
}

.fx-auth-logo-wrap {
    background: #000;
    border-radius: 14px;
    padding: .9rem 1.1rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(212, 255, 0, .25);
}

.fx-auth-logo {
    display: block;
    width: min(240px, 70vw);
    height: auto;
}

.fx-brand-title {
    color: #fff;
    font-weight: 700;
    letter-spacing: .02em;
    line-height: 1.1;
}

.fx-brand-sub {
    font-size: .72rem;
    color: #94a3b8;
}

.fx-nav-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .9rem;
    border-radius: 10px;
    color: #94a3b8;
    text-decoration: none;
    margin-bottom: .25rem;
    transition: .15s ease;
}

.fx-nav-link:hover,
.fx-nav-link.active {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.fx-nav-link.active {
    box-shadow: inset 3px 0 0 var(--fx-accent-2);
}

.fx-main { min-width: 0; }

.fx-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background: color-mix(in srgb, var(--fx-bg) 80%, transparent);
    border-bottom: 1px solid var(--fx-border);
    min-height: 74px;
}

.fx-page-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.fx-page-sub { font-size: .85rem; }

.fx-card {
    background: var(--fx-surface);
    border: 1px solid var(--fx-border);
    border-radius: var(--fx-radius);
    box-shadow: var(--fx-shadow);
}

.fx-stat {
    padding: 1.1rem 1.2rem;
}

.fx-stat .label {
    color: var(--fx-muted);
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.fx-stat .value {
    font-size: 1.7rem;
    font-weight: 700;
    font-family: "JetBrains Mono", monospace;
    margin-top: .2rem;
}

.fx-table thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--fx-muted);
    border-bottom-color: var(--fx-border) !important;
}

.btn-primary {
    background: linear-gradient(135deg, #00a34d, #007a39);
    border: none;
}

.btn-primary:hover { background: #007a39; }

.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--fx-border);
    background: var(--fx-surface);
    color: var(--fx-text);
}

.fx-auth-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(900px 400px at 20% 0%, rgba(0,163,77,.22), transparent 50%),
        radial-gradient(700px 400px at 90% 20%, rgba(212,255,0,.10), transparent 45%),
        #050505;
}

.fx-auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(255,255,255,.96);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0,0,0,.35);
}

[data-bs-theme="dark"] .fx-auth-card {
    background: #121a2b;
    color: #e2e8f0;
}

.fx-qr-preview {
    max-width: 420px;
    width: 100%;
    height: auto;
    image-rendering: pixelated;
    image-rendering: crisp-edges;
}

@media (max-width: 991.98px) {
    .fx-sidebar {
        position: fixed;
        left: -280px;
        transition: .2s ease;
    }
    .fx-sidebar.open { left: 0; }
}
