:root {
    --app-sidebar-width: 270px;
    --app-bg: #f4f6f9;
    --app-sidebar-bg: #111827;
    --app-sidebar-border: rgba(255,255,255,.08);
}

body {
    font-size: 14px;
}

.auth-body {
    background: radial-gradient(circle at top left, #e8f0ff 0, #f8fafc 42%, #edf2f7 100%);
}

.auth-card {
    width: 100%;
    max-width: 430px;
    background: #fff;
    border-radius: 22px;
    padding: 34px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #2563eb;
    color: #fff;
    font-weight: 800;
    letter-spacing: .04em;
}

.app-body {
    background: var(--app-bg);
}

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

.app-sidebar {
    width: var(--app-sidebar-width);
    min-height: 100vh;
    background: var(--app-sidebar-bg);
    color: #fff;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    padding: 18px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--app-sidebar-border);
    margin-bottom: 18px;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,.76);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
}

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

.sidebar-nav .nav-link.disabled {
    opacity: .38;
}

.sidebar-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,.45);
    margin: 18px 12px 8px;
}

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

.app-topbar {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.app-content {
    padding: 28px;
}

.metric-card {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
    min-height: 130px;
}

.metric-label {
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 28px;
    font-weight: 800;
    color: #0f172a;
}

.metric-value.small-value {
    font-size: 18px;
}

.metric-help {
    margin-top: 8px;
    color: #64748b;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .app-sidebar {
        position: static;
        width: 100%;
        min-height: auto;
        border-radius: 0 0 18px 18px;
    }

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

    .app-topbar {
        position: static;
        padding: 14px 18px;
    }

    .app-content {
        padding: 18px;
    }
}

.compact-table th,
.compact-table td {
    white-space: nowrap;
}

.role-check {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    cursor: pointer;
}

.role-check:hover {
    background: #f8fafc;
}

.role-check input {
    margin-top: 4px;
}

.sticky-card {
    position: sticky;
    top: 92px;
}

.detail-list dt {
    color: #64748b;
    font-weight: 600;
}

.detail-list dd {
    margin-bottom: 10px;
}

.code-sample {
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 14px;
    font-size: 12px;
    white-space: pre-wrap;
}
