:root {
    --sidebar-bg: #14243a;
    --sidebar-bg-soft: #1d3350;
    --sidebar-text: #c7d3e3;
    --accent: #2f80ed;
    --accent-soft: #e8f1fd;
}

body {
    font-size: 0.925rem;
}

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

.app-sidebar {
    width: 250px;
    flex: 0 0 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
}

.app-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 16px;
    text-decoration: none;
    color: #fff;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2f80ed, #56ccf2);
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-text small {
    color: var(--sidebar-text);
    font-size: 0.72rem;
    opacity: 0.75;
}

.app-nav {
    padding: 8px 12px;
    gap: 2px;
    flex: 1;
}

.app-nav .nav-link {
    color: var(--sidebar-text);
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.app-nav .nav-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.app-nav .nav-link:hover {
    background: var(--sidebar-bg-soft);
    color: #fff;
}

.app-nav .nav-link.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 8px 18px rgba(47, 128, 237, 0.35);
}

.app-sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip i {
    font-size: 1.6rem;
    color: #fff;
}

.user-chip div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    color: #fff;
}

.user-chip small {
    color: var(--sidebar-text);
    opacity: 0.75;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.page-head h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e9eef5;
    box-shadow: 0 6px 18px rgba(20, 36, 58, 0.05);
    height: 100%;
}

.stat-card .stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 1.3rem;
    background: var(--accent-soft);
    color: var(--accent);
    margin-bottom: 12px;
}

.stat-card .stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.stat-card .stat-label {
    color: #6b7a90;
    font-size: 0.82rem;
}

.card {
    border-radius: 16px;
    border: 1px solid #e9eef5;
    box-shadow: 0 6px 18px rgba(20, 36, 58, 0.04);
}

.card-header {
    background: #fff;
    border-bottom: 1px solid #eef2f7;
    border-radius: 16px 16px 0 0 !important;
    font-weight: 600;
}

.table > :not(caption) > * > * {
    padding: 0.7rem 0.75rem;
    vertical-align: middle;
}

.table thead th {
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7a90;
    font-weight: 600;
    background: #f7f9fc;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--accent-soft);
    color: var(--accent);
    display: inline-grid;
    place-items: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a97a8;
    font-weight: 700;
    margin-bottom: 12px;
}

.form-label {
    font-weight: 500;
    font-size: 0.82rem;
    color: #48566b;
    margin-bottom: 4px;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px 22px;
}

.detail-item .detail-label {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a97a8;
}

.detail-item .detail-value {
    font-weight: 500;
    color: #1f2d3d;
    word-break: break-word;
}

.empty-state {
    text-align: center;
    color: #8a97a8;
    padding: 36px 16px;
}

.empty-state i {
    font-size: 2rem;
    display: block;
    margin-bottom: 8px;
}

.nav-tabs .nav-link {
    color: #5b6b80;
    font-weight: 500;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
}

.nav-tabs .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: transparent;
}

.badge-soft {
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 600;
}

.small-muted {
    color: #8a97a8;
    font-size: 0.78rem;
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 20% 20%, #1d3350, #0d1726 60%);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

@media (max-width: 991.98px) {
    .app-sidebar {
        width: 72px;
        flex: 0 0 72px;
    }
    .brand-text,
    .app-nav .nav-link span,
    .user-chip div {
        display: none;
    }
    .app-nav .nav-link {
        justify-content: center;
    }
    .app-brand {
        justify-content: center;
        padding: 16px 8px;
    }
    .app-sidebar-footer {
        padding: 10px;
    }
}
