:root {
    --brand: #0f766e;
    --brand-dark: #115e59;
    --brand-soft: #ccfbf1;
    --sidebar-bg: #0f2d2b;
    --sidebar-bg-2: #123c39;
    --sidebar-text: #9fd8cf;
    --sidebar-width: 272px;
    --bs-body-bg: #f4f6f8;
    --bs-body-color: #1f2937;
}

body {
    background-color: var(--bs-body-bg);
}

.min-w-0 {
    min-width: 0;
}

.text-brand {
    color: var(--brand) !important;
}

.bg-brand {
    background-color: var(--brand) !important;
}

.btn-brand {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-focus-shadow-rgb: 15, 118, 110;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}

.btn-outline-brand {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: 15, 118, 110;
}

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

.app-sidebar {
    --bs-offcanvas-width: var(--sidebar-width);
    --bs-offcanvas-bg: var(--sidebar-bg);
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
    color: var(--sidebar-text);
    border-right: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1.1rem 1.25rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex: 0 0 auto;
}

.sidebar-brand strong {
    display: block;
    font-size: 1.05rem;
    letter-spacing: .04em;
}

.sidebar-brand small {
    display: block;
    font-size: .68rem;
    opacity: .7;
}

.sidebar-nav {
    padding: .75rem .85rem 1rem;
    gap: .15rem;
    overflow-y: auto;
}

.sidebar-section {
    padding: 1rem .65rem .35rem;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #6ee7b7;
    opacity: .75;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .58rem .7rem;
    border-radius: .6rem;
    color: var(--sidebar-text);
    font-size: .92rem;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-nav .nav-link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
}

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

.sidebar-nav .nav-link.active {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 16px rgba(15, 118, 110, .35);
}

.sidebar-foot {
    padding: .9rem 1.4rem;
    font-size: .78rem;
    color: #6ee7b7;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.app-main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
    flex: 1 1 auto;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .7rem 1.1rem;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid #e5e7eb;
}

.avatar {
    width: 34px;
    height: 34px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 700;
    font-size: .95rem;
}

.avatar-lg {
    width: 96px;
    height: 96px;
    font-size: 2.4rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--brand-soft);
}

.app-content {
    flex: 1 1 auto;
    padding: 1.5rem 1.25rem;
}

.app-footer {
    padding: 1rem 1.25rem;
    font-size: .82rem;
    color: #6b7280;
    border-top: 1px solid #e5e7eb;
    background: #fff;
}

.stat-card,
.table-card {
    border: 0;
    border-radius: .9rem;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
    overflow: hidden;
}

.stat-card {
    transition: transform .15s ease, box-shadow .15s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 24, 40, .1);
}

.stat-icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: .75rem;
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.1;
}

.table-card .card-header {
    border-bottom: 1px solid #eef1f4;
    padding: .9rem 1.1rem;
}

.detail-list dt {
    font-weight: 600;
    color: #6b7280;
}

.detail-list dd {
    margin-bottom: .85rem;
}

.detail-list dt,
.detail-list dd {
    padding-bottom: .35rem;
    border-bottom: 1px dashed #eef1f4;
}

.table > :not(caption) > * > * {
    padding: .7rem .85rem;
}

.table thead th {
    font-size: .76rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    background: #fafbfc;
    border-bottom-width: 1px;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: linear-gradient(120deg, rgba(6, 78, 74, .9), rgba(15, 118, 110, .78)),
        url('../img/bg-login.png') center / cover no-repeat fixed;
}

.login-card {
    width: 100%;
    max-width: 430px;
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    background: rgba(255, 255, 255, .97);
    backdrop-filter: blur(4px);
}

.login-logo {
    width: 200px;
    max-width: 80%;
    height: auto;
}

@media (min-width: 992px) {
    .app-shell {
        display: flex;
        align-items: flex-start;
    }

    .app-sidebar {
        position: sticky;
        top: 0;
        flex: 0 0 var(--sidebar-width);
        width: var(--sidebar-width);
        height: 100vh;
    }

    .app-sidebar .offcanvas-body {
        height: 100%;
        overflow-y: auto;
    }

    .app-content {
        padding: 1.75rem 2rem;
    }
}

@media (max-width: 575.98px) {
    .stat-value {
        font-size: 1.4rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
