:root {
    --sidebar-width: 270px;
    --app-bg: #f3f6f8;
    --app-sidebar: #17212b;
    --app-sidebar-muted: #9fb0bf;
    --app-primary: #137f75;
}

body {
    min-height: 100vh;
    background: var(--app-bg);
}

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

.app-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--app-sidebar);
    color: #fff;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    transition: transform .2s ease;
}

.sidebar-brand {
    height: 72px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand small {
    display: block;
    color: var(--app-sidebar-muted);
}

.brand-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: rgba(19,127,117,.2);
    color: #4dd4c6;
}

.sidebar-nav {
    padding: 1rem;
}

.sidebar-nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .8rem;
    margin-bottom: .25rem;
    color: var(--app-sidebar-muted);
    text-decoration: none;
    border-radius: .5rem;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.08);
}

.app-main {
    width: 100%;
    margin-left: var(--sidebar-width);
}

.stat-card {
    border: 0;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .06);
}

.stat-card strong {
    display: block;
    margin-top: .5rem;
    font-size: 2rem;
}

.btn-primary {
    --bs-btn-bg: var(--app-primary);
    --bs-btn-border-color: var(--app-primary);
    --bs-btn-hover-bg: #0f6e66;
    --bs-btn-hover-border-color: #0f6e66;
}

.card-header {
    flex-wrap: wrap;
    gap: 0.75rem;
}

.table-responsive {
    -webkit-overflow-scrolling: touch;
}

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

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .app-main {
        margin-left: 0;
    }

    .stat-card strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 575.98px) {
    .card-header .btn {
        width: 100%;
    }

    .table td .btn,
    .table td form {
        display: block;
        width: 100%;
        margin-bottom: 0.35rem;
    }

    .table td .btn:last-child,
    .table td form:last-child {
        margin-bottom: 0;
    }

    .auth-body {
        height: auto !important;
        min-height: 100vh;
        padding: 1.5rem 0;
    }

    .auth-card {
        padding: 1.75rem 1.25rem;
    }
}
