@import url('https://fonts.bunny.net/css?family=Nunito');

body {
    font-family: 'Nunito', sans-serif;
    background-color: #f5f6fb;
    color: #182031;
}

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

.sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
    z-index: 1020;
    overflow: hidden;
}

.sidebar .sidebar-brand {
    padding: 1.5rem 1rem;
    flex-shrink: 0;
}

.sidebar .sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

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

.sidebar-group {
    display: flex;
    flex-direction: column;
}

.sidebar-link-wrapper {
    display: flex;
    align-items: center;
    position: relative;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: rgba(255, 255, 255, .7);
    padding: .65rem 1rem;
    border-radius: .65rem;
    text-decoration: none;
    transition: background .2s ease, color .2s ease;
    flex: 1;
}

.sidebar-link.active,
.sidebar-link:hover {
    background: rgba(255, 255, 255, .1);
    color: #fff;
}

.sidebar-collapse-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .7);
    padding: .65rem .5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .3s ease, color .2s ease;
    font-size: 0.875rem;
}

.sidebar-collapse-btn:hover {
    color: #fff;
}

.sidebar-collapse-btn[aria-expanded="true"] {
    transform: rotate(180deg);
}

.sidebar-group.active > .sidebar-link-wrapper > .sidebar-collapse-btn {
    color: #fff;
}

.sidebar-submenu {
    display: none;
    flex-direction: column;
    margin-left: 2.5rem;
    margin-top: .35rem;
    gap: .2rem;
    overflow: hidden;
}

.sidebar-submenu.collapse {
    display: none !important;
}

.sidebar-submenu.collapse.show,
.sidebar-submenu.show,
#sidebar .sidebar-submenu.show {
    display: flex !important;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar-sublink {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    font-size: .9rem;
    padding: .35rem 0;
}

.sidebar-sublink.active,
.sidebar-sublink:hover {
    color: #fff;
}

.main-panel {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: #fff;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #edf1f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #182031;
}

.user-role {
    font-size: 0.8rem;
    color: #6b7280;
}

.page-content {
    padding: 2rem;
    flex: 1;
}

.page-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .05);
}

.stat-card .label {
    text-transform: uppercase;
    letter-spacing: .08rem;
    font-size: .75rem;
    color: #6b7280;
    margin-bottom: .25rem;
}

.stat-card .icon {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    display: grid;
    place-content: center;
    font-size: 1.35rem;
}

.sidebar-toggle {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-toggle:hover {
    opacity: 0.8;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1019;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

.table-search {
    min-width: 220px;
}

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    padding: 2rem;
    gap: 2rem;
    align-items: center;
}

.auth-hero {
    background: radial-gradient(circle at top, #6366f1, #4338ca);
    color: #fff;
    border-radius: 1.5rem;
    padding: 3rem;
    box-shadow: 0 25px 45px rgba(67, 56, 202, 0.35);
}

.auth-hero__badge {
    display: inline-flex;
    padding: .5rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .15);
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.auth-hero__features {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: .5rem;
}

.auth-hero__features li {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.auth-card {
    background: #fff;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.auth-brand .logo {
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    background: #111827;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.auth-brand .title {
    font-weight: 700;
    margin: 0;
    font-size: 1.1rem;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }

    .sidebar.show,
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .main-panel {
        margin-left: 0;
        width: 100%;
    }

    .topbar {
        padding: 0.75rem 1rem;
    }

    .page-content {
        padding: 1rem;
    }

    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 575px) {
    .sidebar {
        width: 100%;
        max-width: 300px;
    }

    .topbar {
        padding: 0.75rem;
    }

    .topbar-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 0.5rem;
    }

    .user-meta {
        text-align: right;
    }

    .user-name {
        font-size: 0.9rem;
    }

    .user-role {
        font-size: 0.75rem;
    }

    .page-content {
        padding: 0.75rem;
    }

    .page-heading {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-heading h1 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767px) {
    .auth-page {
        padding: 1.5rem 1rem;
    }

    .auth-hero {
        padding: 2rem;
    }

    .auth-card {
        padding: 2rem;
    }
}

