/* ===========================================================================
   客户端授权管理系统 —— 自定义样式
   在 Bootstrap 5 基础上补充布局与细节样式
   =========================================================================== */

:root {
    --sidebar-width: 220px;
    --navbar-height: 56px;
}

body {
    background-color: #f4f6f9;
    font-family: "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
}

/* 顶部导航固定，内容区整体下移 */
#wrapper {
    margin-top: var(--navbar-height);
    min-height: calc(100vh - var(--navbar-height));
}

/* 左侧菜单 */
#sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    flex-shrink: 0;
    position: sticky;
    top: var(--navbar-height);
    align-self: flex-start;
    height: calc(100vh - var(--navbar-height));
    overflow-y: auto;
    transition: margin-left .2s ease-in-out;
}

#sidebar .list-group-item {
    border: none;
    border-radius: 0;
    padding: .75rem 1.25rem;
    color: #495057;
}

#sidebar .list-group-item:hover {
    background-color: #e9ecef;
}

#sidebar .list-group-item.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    font-weight: 600;
    border-left: 3px solid #0d6efd;
}

/* 移动端收起侧边栏 */
@media (max-width: 768px) {
    #sidebar {
        position: fixed;
        z-index: 1030;
        left: 0;
        top: var(--navbar-height);
        margin-left: calc(-1 * var(--sidebar-width));
        box-shadow: 2px 0 8px rgba(0, 0, 0, .1);
    }
    #sidebar.show {
        margin-left: 0;
    }
}

/* 仪表盘统计卡片 */
.stat-card {
    transition: transform .15s ease;
}
.stat-card:hover {
    transform: translateY(-2px);
}
.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* 登录页 */
.login-body {
    background: linear-gradient(135deg, #0d6efd 0%, #6610f2 100%);
}
.login-card {
    border-radius: 16px;
}

/* 表格细节 */
.table code {
    color: #495057;
}
