/* =========================================================
   GLOBAL
========================================================= */

:root {
    --sidebar-width: 260px;

    --color-sidebar: #111827;
    --color-sidebar-hover: #1f2937;
    --color-sidebar-active: #2563eb;

    --color-border: #e5e7eb;

    --color-text: #111827;
    --color-text-light: #6b7280;

    --color-bg: #f3f4f6;
    --color-white: #ffffff;

    --shadow-sm: 0 2px 8px rgba(0,0,0,.05);
    --shadow-md: 0 4px 14px rgba(0,0,0,.08);

    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-sm: 8px;

    --transition: .2s ease;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    padding: 0;

    background: var(--color-bg);
    color: var(--color-text);

    font-size: 14px;
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

/* =========================================================
   WRAPPER
========================================================= */

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-main {
    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.admin-content {
    flex: 1;
    padding: 24px;
}

/* =========================================================
   SIDEBAR
========================================================= */

.admin-sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    height: 100vh;

    background: var(--color-sidebar);
    color: #fff;

    display: flex;
    flex-direction: column;

    position: sticky;
    top: 0;

    overflow: hidden;

    border-right: 1px solid rgba(255,255,255,.05);
}

/* =========================================================
   SIDEBAR BRAND
========================================================= */

.sidebar-brand {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 24px;

    border-bottom: 1px solid rgba(255,255,255,.06);
}

.sidebar-logo {
    width: 50px;
    height: 50px;

    border-radius: 14px;

    background: rgba(255,255,255,.10);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
}

.sidebar-brand-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.sidebar-brand-subtitle {
    font-size: 12px;
    opacity: .7;
    margin-top: 2px;
}

/* =========================================================
   USER
========================================================= */

.sidebar-user {
    flex-shrink: 0;

    display: flex;
    align-items: center;
    gap: 12px;

    padding: 20px 24px;
}

.sidebar-user-avatar {
    width: 48px;
    height: 48px;

    border-radius: 50%;

    background: rgba(255,255,255,.10);

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 24px;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 14px;
}

.sidebar-user-role {
    font-size: 12px;
    opacity: .7;
    margin-top: 2px;
}

/* =========================================================
   MENU
========================================================= */

.sidebar-menu {
    flex: 1;
    min-height: 0;

    padding: 10px 14px;

    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-menu-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;

    opacity: .5;

    padding: 10px 14px;

    margin-bottom: 8px;
}

.sidebar-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;

    color: rgba(255,255,255,.82);
    text-decoration: none;

    padding: 13px 14px;

    border-radius: 12px;

    transition: var(--transition);

    margin-bottom: 4px;
}

.sidebar-menu-item i {
    font-size: 18px;
}

.sidebar-menu-item:hover {
    background: var(--color-sidebar-hover);
    color: #fff;
}

.sidebar-menu-item.active {
    background: var(--color-sidebar-active);
    color: #fff;
}

.sidebar-menu-item.active:hover {
    background: var(--color-sidebar-active);
}

/* =========================================================
   SIDEBAR FOOTER / LOGOUT
========================================================= */

.sidebar-footer {
    flex-shrink: 0;

    padding: 16px 20px;

    border-top: 1px solid rgba(255,255,255,.08);

    background: var(--color-sidebar);
}

.sidebar-logout,
.sidebar-menu-logout {
    width: 100%;

    display: flex;
    align-items: center;
    gap: 12px;

    text-decoration: none;

    padding: 13px 14px;

    border-radius: 12px;

    background: rgba(255,255,255,.05);

    color: #ff8a8a !important;

    transition: var(--transition);
}

.sidebar-logout:hover,
.sidebar-menu-logout:hover {
    background: rgba(255,107,107,.14);
    color: #ffb3b3 !important;
}

/* =========================================================
   MOBILE TOPBAR
========================================================= */

.mobile-topbar {
    height: 60px;

    background: #fff;

    display: flex;
    align-items: center;

    padding: 0 16px;

    border-bottom: 1px solid var(--color-border);

    position: sticky;
    top: 0;

    z-index: 1030;
}

.mobile-topbar-title {
    margin-left: 14px;

    font-size: 16px;
    font-weight: 700;
}

.btn-sidebar-toggle {
    border: 0;
    background: transparent;

    font-size: 24px;

    padding: 0;
}

.btn-sidebar-toggle:focus {
    box-shadow: none;
}

/* =========================================================
   MOBILE SIDEBAR
========================================================= */

.mobile-sidebar {
    width: 280px !important;
    background: var(--color-sidebar);
    color: #fff;
}

.mobile-sidebar .offcanvas-header {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.mobile-sidebar .btn-close {
    filter: invert(1);
}

.mobile-sidebar .offcanvas-body {
    display: flex;
    flex-direction: column;

    min-height: 0;

    padding: 16px;
}

.sidebar-brand-mobile {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 18px;
    font-weight: 700;
}

/* =========================================================
   CONTENT
========================================================= */

.page-card {
    background: #fff;

    border-radius: var(--radius-lg);

    box-shadow: var(--shadow-sm);

    padding: 24px;
}

/* =========================================================
   ALERT
========================================================= */

.admin-alert {
    border: 0;
    border-radius: 14px;

    box-shadow: var(--shadow-sm);

    margin-bottom: 20px;
}

.admin-alert-icon {
    font-size: 18px;
    line-height: 1;
}

/* =========================================================
   FOOTER
========================================================= */

.admin-footer {
    padding: 18px 24px;

    border-top: 1px solid var(--color-border);

    background: #fff;
}

.admin-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    color: var(--color-text-light);
    font-size: 13px;
}

/* =========================================================
   OFFCANVAS
========================================================= */

.offcanvas {
    border-right: 0 !important;
}

/* =========================================================
   TABLE WRAPPER
========================================================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

/* =========================================================
   SCROLLBAR
========================================================= */

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 999px;
}

::-webkit-scrollbar-track {
    background: transparent;
}