:root {
    --brand: #0b5e4f;
    --brand-dark: #084a3e;
}

body {
    background: #f4f6f8;
    color: #1f2937;
}

/* ── App shell: fixed left sidebar on desktop, slide-out panel below 992px ── */
:root { --sidebar-w: 240px; }

.app-sidebar {
    background: var(--brand);
    color: #fff;
    display: flex;
    flex-direction: column;
}
@media (min-width: 992px) {
    .app-sidebar {
        /* Bootstrap's .offcanvas-lg sets background-color: transparent !important at this width. */
        background-color: var(--brand) !important;
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-w);
        z-index: 1030;
    }
    .app-main { margin-left: var(--sidebar-w); }
}
@media (max-width: 991.98px) {
    .app-sidebar.offcanvas-lg { --bs-offcanvas-bg: var(--brand); --bs-offcanvas-width: 260px; }
}

.app-sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.1rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.app-sidebar-brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
    font-weight: 600;
    font-size: 1.05rem;
    text-decoration: none;
}
.app-sidebar-brand i { font-size: 1.35rem; }
.app-sidebar-brand:hover { color: #fff; }

.app-sidebar-nav {
    flex: 1 1 auto;
    padding: .9rem .6rem;
    overflow-y: auto;
}
.app-nav-section {
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.55);
    padding: 1rem .75rem .4rem;
}
.app-nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .6rem .75rem;
    margin-bottom: .15rem;
    border-radius: .45rem;
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: .93rem;
    border-left: 3px solid transparent;
}
.app-nav-link i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.app-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.app-nav-link.active {
    background: rgba(255,255,255,.15);
    color: #fff;
    font-weight: 600;
    border-left-color: #fff;
}

.app-sidebar-foot {
    padding: .9rem 1rem 1rem;
    border-top: 1px solid rgba(255,255,255,.12);
}
.app-sidebar-user {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    color: rgba(255,255,255,.85);
    margin-bottom: .6rem;
    min-width: 0;
}
.app-sidebar-user span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-build {
    margin-top: .6rem;
    font-size: .72rem;
    color: rgba(255,255,255,.55);
    text-align: center;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    background: var(--brand);
    color: #fff;
    padding: .6rem 1rem;
}
.app-topbar-brand { color: #fff; font-weight: 600; text-decoration: none; }
.app-topbar-brand:hover { color: #fff; }

.app-content {
    padding: 1.75rem 2rem;
    max-width: 1400px;
}
@media (max-width: 575.98px) {
    .app-content { padding: 1.1rem 1rem; }
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,.08);
    border-radius: .6rem;
}

.btn-brand {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}
.btn-brand:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    color: #fff;
}

a { color: var(--brand); }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.login-card {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: .8rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,.25);
}

.module-card {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    transition: transform .08s ease, box-shadow .08s ease;
}
.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
}
.module-card .icon {
    font-size: 2rem;
    color: var(--brand);
}

.table thead th {
    background: #eef2f1;
    white-space: nowrap;
}
