:root {
    --bg: #f5f5f7;
    --card: #fff;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text)
}

.auth-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left,
            rgba(34, 197, 94, .12),
            transparent 35%),
        radial-gradient(circle at bottom right,
            rgba(16, 185, 129, .12),
            transparent 35%),
        linear-gradient(
            180deg,
            #f8fafc 0%,
            #f1f5f9 100%
        );
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px
}

.login-card {
    width: 100%;
    max-width: 480px;
    background: rgba(255,255,255,.75);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255,255,255,.4);

    box-shadow:
        0 10px 40px rgba(15,23,42,.08),
        0 40px 120px rgba(15,23,42,.10);

    border-radius: 36px;
    padding: 42px;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo img {
    max-height: 90px;
}

.logo-badge {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    background: #111;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    margin-bottom: 22px
}

.login-card h1 {
    font-size: 28px;
    font-weight: 800
}

.login-card p {
    color: var(--muted)
}

.app-shell {
    display: flex;
    min-height: 100vh
}

.sidebar {
    width: 265px;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: blur(22px);
    border-right: 1px solid var(--line);
    padding: 24px;
    position: sticky;
    top: 0;
    height: 100vh
}

.brand {
    font-weight: 900;
    font-size: 24px;
    margin-bottom: 30px
}

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.sidebar a {
    color: #374151;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 16px
}

.sidebar a:hover {
    background: #f0f2f5;
    color: #000
}

.main-area {
    flex: 1
}

/* ==========================
   TOPBAR
========================== */

.topbar {
    height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 18px 30px;

    background: rgba(245,245,247,.85);
    backdrop-filter: blur(18px);

    border-bottom: 1px solid var(--line);

    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar small {
    display: block;
    color: var(--muted);
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ==========================
   MOBILE BRAND
========================== */

.mobile-brand {
    display: none;
    align-items: center;
    gap: 12px;
}

.mobile-brand img {
    height: 38px;
}

.btn-menu-mobile {
    width: 44px;
    height: 44px;

    border-radius: 14px;

    background: #111827;
    color: white;

    border: 0;

    font-size: 20px;

    display: none;

    align-items: center;
    justify-content: center;
}

/* ==========================
   SIDEBAR
========================== */

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 12px;

    color: #374151;
    text-decoration: none;

    padding: 14px 16px;

    border-radius: 16px;

    transition: .2s;
}

.sidebar nav a i {
    font-size: 18px;
}

.sidebar nav a:hover {
    background: #9bfa5d;
}

.sidebar nav a.active {
    background: #16a34a;
    color: white;
}

/* ==========================
   MOBILE MENU
========================== */

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav a {
    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;

    color: #111827;

    padding: 14px;

    border-radius: 14px;

    font-weight: 600;
}

.mobile-nav a:hover {
    background: #f1f5f9;
}

/* ==========================
   CONTENT
========================== */

.content-area {
    padding: 30px;
}

.page-header h1 {
    font-size: 34px;
    font-weight: 850;
    margin: 0;
}

.page-header p {
    color: var(--muted);
    margin-top: 6px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 18px;
}

.metric-card,
.panel-card {
    background: var(--card);

    border: 1px solid rgba(229,231,235,.8);

    box-shadow: 0 20px 50px rgba(15,23,42,.06);

    border-radius: 28px;

    padding: 24px;
}

.metric-card span {
    color: var(--muted);
    display: block;
}

.metric-card strong {
    font-size: 28px;
    margin-top: 10px;
    display: block;
}

.panel-card h3 {
    font-weight: 800;
}

.panel-card p {
    color: var(--muted);
}

.empty-chart {
    height: 260px;

    border: 1px dashed #cbd5e1;

    border-radius: 24px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;

    margin-top: 20px;

    background: #fafafa;
}

/* ==========================
   FORMS
========================== */

.form-control {
    border-radius: 16px;
    border-color: #e5e7eb;
    padding: 12px 14px;
}

.modal-content {
    border: 0;
    box-shadow: 0 35px 100px rgba(15,23,42,.25);
}

/* ==========================
   MOBILE
========================== */

@media (max-width: 900px) {

    .app-shell {
        display: block;
    }

    .sidebar {
        display: none;
    }

    .main-area {
        width: 100%;
        overflow-x: hidden;
    }

    .mobile-brand {
        display: flex;
    }

    .btn-menu-mobile {
        display: flex;
    }

    .topbar {
        height: auto;
        padding: 14px 16px;
        flex-wrap: wrap;
    }

    .top-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 10px;
    }

    .content-area {
        padding: 20px 16px;
    }

    .page-header h1 {
        font-size: 28px;
    }

    .grid-cards {
        grid-template-columns: 1fr;
    }

    .panel-card {
        padding: 16px;
        border-radius: 22px;
        overflow-x: auto;
    }

    table {
        min-width: 650px;
    }

    .btn {
        white-space: nowrap;
    }
}