:root {
    --sidebar-width: 260px;
    --topbar-height: 76px;

    --primary: #2563eb;
    --primary-dark: #1d4ed8;

    --dark: #0f172a;
    --dark-soft: #1e293b;

    --background: #f8fafc;
    --card-background: #ffffff;

    --border: #e2e8f0;

    --text: #0f172a;
    --text-muted: #64748b;

    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
}


* {
    box-sizing: border-box;
}


html,
body {
    margin: 0;
    padding: 0;

    min-height: 100%;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;

    background: var(--background);
    color: var(--text);
}


body {
    overflow-x: hidden;
}


/* =====================================
   DASHBOARD WRAPPER
===================================== */

.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
}


/* =====================================
   SIDEBAR
===================================== */

.sidebar {
    width: var(--sidebar-width);

    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    background:
        linear-gradient(
            180deg,
            #0f172a 0%,
            #172554 100%
        );

    color: #ffffff;

    display: flex;
    flex-direction: column;

    z-index: 1050;

    transition: transform 0.3s ease;
}


/* Brand */

.sidebar-brand {
    height: var(--topbar-height);

    padding: 0 22px;

    display: flex;
    align-items: center;
    gap: 12px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}


.brand-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(255, 255, 255, 0.12);

    font-size: 20px;
}


.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}


.brand-title {
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}


.brand-subtitle {
    font-size: 11px;

    color: rgba(255, 255, 255, 0.58);

    white-space: nowrap;
}


/* Sidebar menu */

.sidebar-menu {
    flex: 1;

    padding: 22px 14px;

    overflow-y: auto;
}


.menu-section {
    margin-bottom: 28px;
}


.menu-section-title {
    display: block;

    padding: 0 12px;
    margin-bottom: 9px;

    font-size: 10px;
    font-weight: 700;

    letter-spacing: 0.1em;

    color: rgba(255, 255, 255, 0.4);
}


.menu-item {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 11px 13px;

    margin-bottom: 3px;

    border-radius: 9px;

    color: rgba(255, 255, 255, 0.72);

    text-decoration: none;

    font-size: 14px;
    font-weight: 500;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}


.menu-item i {
    width: 20px;

    font-size: 16px;

    text-align: center;
}


.menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    transform: translateX(2px);
}


.menu-item.active {
    background: rgba(37, 99, 235, 0.9);
    color: #ffffff;

    box-shadow:
        0 5px 15px rgba(37, 99, 235, 0.2);
}


.logout-item {
    color: #fca5a5;
}


.logout-item:hover {
    background: rgba(220, 38, 38, 0.15);
    color: #fecaca;
}


/* Sidebar footer */

.sidebar-footer {
    padding: 15px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}


.user-mini-profile {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px;
}


.user-avatar,
.topbar-avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.14);

    font-weight: 700;
    font-size: 13px;
}


.user-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
}


.user-name {
    color: #ffffff;

    font-size: 12px;
    font-weight: 600;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.user-role {
    margin-top: 2px;

    color: rgba(255, 255, 255, 0.48);

    font-size: 10px;
}


/* =====================================
   MAIN AREA
===================================== */

.main-area {
    margin-left: var(--sidebar-width);

    min-height: 100vh;
    width: calc(100% - var(--sidebar-width));

    display: flex;
    flex-direction: column;
}


/* =====================================
   TOPBAR
===================================== */

.topbar {
    height: var(--topbar-height);

    position: sticky;
    top: 0;

    display: flex;
    align-items: center;

    padding: 0 28px;

    background: rgba(255, 255, 255, 0.96);

    border-bottom: 1px solid var(--border);

    backdrop-filter: blur(12px);

    z-index: 1000;
}


.sidebar-toggle {
    display: none;

    border: 0;
    background: transparent;

    color: var(--text);

    font-size: 24px;
}


.topbar-title {
    display: flex;
    flex-direction: column;
}


.page-title {
    font-size: 18px;
    font-weight: 700;
}


.page-subtitle {
    margin-top: 2px;

    color: var(--text-muted);

    font-size: 11px;
}


.topbar-actions {
    margin-left: auto;

    display: flex;
    align-items: center;
    gap: 20px;
}


.topbar-date {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-muted);

    font-size: 13px;
}


.topbar-avatar {
    width: 34px;
    height: 34px;

    background: #dbeafe;

    color: var(--primary);
}


/* =====================================
   CONTENT
===================================== */

.content-area {
    flex: 1;

    padding: 30px;
}


.dashboard-alert {
    border: none;

    border-radius: 10px;

    box-shadow:
        0 4px 15px rgba(15, 23, 42, 0.05);
}


/* =====================================
   FOOTER
===================================== */

.dashboard-footer {
    padding: 18px 30px;

    background: #ffffff;

    border-top: 1px solid var(--border);

    color: var(--text-muted);

    font-size: 12px;

    display: flex;
    justify-content: space-between;
    gap: 15px;
}


/* =====================================
   RESPONSIVE
===================================== */

@media (max-width: 991px) {

    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    .main-area {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        display: block;

        margin-right: 15px;
    }

    .content-area {
        padding: 22px;
    }

}


@media (max-width: 576px) {

    :root {
        --topbar-height: 68px;
    }


    .topbar {
        padding: 0 16px;
    }


    .page-subtitle {
        display: none;
    }


    .topbar-date {
        display: none;
    }


    .content-area {
        padding: 16px;
    }


    .dashboard-footer {
        padding: 15px 16px;

        flex-direction: column;
    }

}