/* 设计系统变量 */
:root {
    --primary: #1f2937;
    --primary-2: #111827;
    --sidebar-bg: #0b1220;
    --sidebar-hover: #111827;
    --text-muted: #94a3b8;
    --surface: #ffffff;
    --page-bg: #f5f7fb;
    --nav-height: 58px;
}

/* 全局样式 */
body {
    font-size: .93rem;
    background-color: var(--page-bg);
    padding-top: var(--nav-height);
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* 导航栏样式 */
.admin-navbar {
    background: var(--primary);
    padding: 0.6rem 1rem;
}

.admin-navbar .navbar-brand {
    font-size: 1rem;
    padding: 0;
}

.admin-navbar .navbar-collapse {
    flex-wrap: nowrap;
}

/* 布局 */
.admin-layout {
    display: flex;
    min-height: calc(100vh - var(--nav-height));
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background: var(--sidebar-bg);
    color: #e5e7eb;
    padding: 1.2rem 0;
    position: sticky;
    top: var(--nav-height);
    height: calc(100vh - var(--nav-height));
}

.sidebar-title {
    letter-spacing: .05em;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #e5e7eb;
    padding: .9rem 1.25rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    border-left: 3px solid transparent;
    transition: all .15s ease;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: var(--primary);
}

.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .04);
    border-left-color: var(--primary);
}

.sidebar .nav-link i {
    width: 20px;
    text-align: center;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    padding: 1.5rem 1.75rem;
}

.content-shell {
    background: transparent;
}

/* 卡片样式 */
.card {
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 40px -24px rgba(15, 23, 42, 0.35);
    border-radius: .8rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, .05);
    font-weight: 600;
}

/* 表格样式 */
.table th {
    border-top: none;
    background-color: #f8f9fa;
}

/* 登录页样式 */
.form-signin {
    width: 100%;
    max-width: 330px;
    padding: 15px;
    margin: auto;
}

.form-signin .form-floating:focus-within {
    z-index: 2;
}

.form-signin input[type="text"] {
    margin-bottom: -1px;
    border-bottom-right-radius: 0;
    border-bottom-left-radius: 0;
}

.form-signin input[type="password"] {
    margin-bottom: 10px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

/* 统计卡片样式 */
.card-stats {
    border: none;
    border-radius: .5rem;
}

.card-stats .card-body {
    padding: 1.5rem;
}

.card-stats .card-title {
    font-size: .875rem;
    margin-bottom: .5rem;
}

.card-stats .card-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0;
}

/* 响应式调整 */
@media (max-width: 767.98px) {
    body {
        padding-top: calc(var(--nav-height) + 6px);
    }

    .admin-layout {
        flex-direction: column;
    }

    .group-picker {
        width: 100%;
    }

    .group-picker .form-select {
        min-width: 0;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        border-bottom: 1px solid rgba(255, 255, 255, .08);
    }

    .sidebar .nav-link {
        padding: .85rem 1rem;
    }
}
