/* ========================================
   Java笔记管理系统 - 主样式文件
   白蓝科技风设计
   ======================================== */

/* 全局重置和基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4A90E2;
    --primary-dark: #2C5AA0;
    --primary-light: #66A3E8;
    --bg-white: #FFFFFF;
    --bg-light: #F5F7FA;
    --text-dark: #333333;
    --text-gray: #666666;
    --text-light: #999999;
    --border-color: #E0E0E0;
    --success-color: #52C41A;
    --warning-color: #FA8C16;
    --error-color: #F5222D;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* 应用容器 */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ========================================
   侧边栏样式
   ======================================== */
.sidebar {
    width: 260px;
    background: var(--bg-white);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-size: 18px;
    color: var(--primary-color);
    font-weight: 600;
}

.sidebar-header i {
    margin-right: 8px;
}

/* 用户信息 */
.user-info {
    padding: 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar {
    font-size: 36px;
    color: var(--primary-color);
    margin-right: 12px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
}

.user-role {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 2px;
}

/* 导航菜单 */
.nav-menu {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-gray);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-light);
    color: var(--primary-color);
}

.nav-item.active {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.nav-item i {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.nav-divider {
    height: 1px;
    background: var(--border-color);
    margin: 12px 20px;
}

.nav-section-title {
    padding: 8px 20px;
    font-size: 12px;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
}

/* 侧边栏底部 */
.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background: var(--bg-light);
    color: var(--text-gray);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: var(--error-color);
    color: white;
}

.logout-btn i {
    margin-right: 8px;
}

/* ========================================
   主内容区样式
   ======================================== */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 20px 24px;
    overflow-y: auto;
    height: 100vh;
}

/* 页面标题 */
.page-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========================================
   卡片样式
   ======================================== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    margin-bottom: 16px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.card-body {
    padding: 0;
}

/* ========================================
   按钮样式
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn i {
    margin-right: 6px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(74, 144, 226, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-gray);
}

.btn-secondary:hover {
    background: var(--border-color);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #47a818;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #e07a14;
}

.btn-danger {
    background: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background: #d91a1a;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* ========================================
   表单样式
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.3s;
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ========================================
   表格样式
   ======================================== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    border-bottom: 2px solid var(--border-color);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: var(--bg-light);
}

/* ========================================
   徽章样式
   ======================================== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 12px;
}

.badge-primary {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
}

.badge-success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(250, 140, 22, 0.1);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

/* ========================================
   登录页面样式
   ======================================== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.login-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.login-subtitle {
    font-size: 14px;
    color: var(--text-light);
}

.login-form .form-group {
    margin-bottom: 24px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 16px;
}

.login-tip {
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-light);
    border-radius: var(--radius-md);
    font-size: 12px;
    color: var(--text-light);
}

.login-tip i {
    color: var(--primary-color);
    margin-right: 6px;
}

/* ========================================
   仪表盘样式
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    transition: all 0.3s;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-right: 16px;
}

.stat-icon.blue {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
}

.stat-icon.green {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
}

.stat-icon.orange {
    background: rgba(250, 140, 22, 0.1);
    color: var(--warning-color);
}

.stat-icon.red {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    margin-top: 4px;
}

/* ========================================
   笔记列表样式
   ======================================== */
.note-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.note-card:hover {
    box-shadow: var(--shadow-md);
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.note-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13px;
    color: var(--text-light);
}

.note-content {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 12px;
}

.note-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.note-actions {
    display: flex;
    gap: 8px;
}

/* ========================================
   任务卡片样式
   ======================================== */
.task-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.task-card.overdue {
    border-left-color: var(--error-color);
}

.task-card.completed {
    border-left-color: var(--success-color);
    opacity: 0.8;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.task-deadline {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-light);
    margin-top: 4px;
}

.task-description {
    color: var(--text-gray);
    margin-bottom: 16px;
}

.task-progress {
    margin-bottom: 12px;
}

.progress-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transition: width 0.3s;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* ========================================
   空状态样式
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    color: var(--border-color);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.empty-description {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 24px;
}

/* ========================================
   提示消息
   ======================================== */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.alert i {
    margin-right: 10px;
    font-size: 16px;
}

.alert-success {
    background: rgba(82, 196, 26, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(82, 196, 26, 0.3);
}

.alert-warning {
    background: rgba(250, 140, 22, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(250, 140, 22, 0.3);
}

.alert-danger {
    background: rgba(245, 34, 45, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(245, 34, 45, 0.3);
}

.alert-info {
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(74, 144, 226, 0.3);
}

/* ========================================
   模态框样式
   ======================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
}

.modal-close:hover {
    color: var(--text-dark);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   补充修复样式
   ======================================== */
.badge-secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-gray);
}

/* 移动端菜单按钮（桌面端隐藏） */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 1300;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 10px;
    background: var(--primary-color);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-content: center;
}

/* 笔记阅读模式：首行不要被额外的上边距顶开 */
.note-reader {
    padding-top: 40px;
}

/* 监控页、首页两栏在窄屏下改为单栏（覆盖行内样式） */
@media (max-width: 900px) {
    .monitor-layout,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-wrap {
        height: auto !important;
        min-height: 0;
    }

    .dashboard-wrap .dashboard-grid {
        flex: none !important;
    }

    .dashboard-wrap .dashboard-grid > .card {
        max-height: none;
    }

    .dashboard-wrap .dashboard-grid .card-body {
        overflow-y: visible !important;
    }
}

@media (max-width: 768px) {
    .group-stats {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .mobile-menu-toggle.active {
        left: auto;
        right: 12px;
    }

    .sidebar {
        z-index: 1250;
        transition: transform 0.3s;
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 64px 14px 20px 14px;
        height: 100vh;
    }

    .page-title {
        font-size: 20px;
    }

    .page-header {
        margin-bottom: 14px;
    }

    .card {
        padding: 14px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 10px 10px;
    }

    .modal-content {
        width: 94%;
    }
}

/* ========================================
   通知、分页、退出表单
   ======================================== */
.nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--error-color);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    width: 100%;
    border: none;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
}

.notification-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-white);
}

.notification-item.unread {
    background: rgba(74, 144, 226, 0.04);
    border-color: rgba(74, 144, 226, 0.35);
}

.notification-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(74, 144, 226, 0.1);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

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

.notification-head {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.notification-message {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 14px;
}

.notification-meta {
    color: var(--text-light);
    font-size: 12px;
    margin-top: 8px;
}

.notification-actions {
    flex-shrink: 0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-link {
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-gray);
    text-decoration: none;
    font-size: 13px;
    background: #fff;
}

.page-link.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.page-link.disabled {
    opacity: 0.45;
}

.page-ellipsis {
    padding: 0 4px;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .notification-item {
        flex-wrap: wrap;
    }

    .notification-actions {
        width: 100%;
        padding-left: 54px;
    }

    .notification-actions .btn {
        width: 100%;
    }
}

/* =========================================================
   2026 视觉优化：深色侧栏 + 更清晰的层级
   ========================================================= */
:root {
    --sidebar-bg: #0a1d34;
    --sidebar-bg-2: #0d2a4a;
    --sidebar-line: rgba(157, 203, 255, 0.12);
    --sidebar-text: rgba(226, 240, 255, 0.72);
    --sidebar-muted: rgba(176, 205, 236, 0.48);
    --content-bg: #f3f7fc;
    --card-line: #e6eef8;
    --ink-strong: #10253d;
}

body {
    background: var(--content-bg);
}

.main-content {
    background:
        radial-gradient(circle at 100% 0, rgba(74, 144, 226, 0.075), transparent 34%),
        radial-gradient(circle at 8% 92%, rgba(111, 214, 255, 0.045), transparent 30%),
        var(--content-bg);
}

/* 侧边栏 */
.sidebar {
    background: linear-gradient(180deg, var(--sidebar-bg) 0%, #0b2340 58%, var(--sidebar-bg-2) 100%);
    box-shadow: 8px 0 32px rgba(6, 22, 42, 0.16);
    border-right: 1px solid rgba(133, 184, 238, 0.08);
}

.sidebar-header {
    padding: 22px 20px 17px;
    border-bottom: 1px solid var(--sidebar-line);
}

.sidebar-header h2 {
    color: #f3f9ff;
    font-size: 17px;
    letter-spacing: 0.1px;
}

.sidebar-header h2 i {
    color: #72ccff;
    text-shadow: 0 0 18px rgba(114, 204, 255, 0.32);
}

.sidebar-tagline {
    margin: 7px 0 0 28px;
    color: var(--sidebar-muted);
    font-size: 9px;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.user-info {
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.025);
    border-bottom: 1px solid var(--sidebar-line);
}

.user-avatar {
    width: 42px;
    height: 42px;
    margin-right: 11px;
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(112, 195, 255, 0.22), rgba(67, 124, 220, 0.12));
    border: 1px solid rgba(134, 203, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 21px;
    color: #8dd7ff;
    flex-shrink: 0;
}

.user-name {
    color: #f1f8ff;
    font-size: 14px;
}

.user-role {
    color: var(--sidebar-muted);
    font-size: 11px;
}

.nav-menu {
    padding: 12px 0 10px;
}

.nav-item {
    margin: 2px 12px;
    padding: 11px 12px;
    border-left: 0;
    border-radius: 10px;
    color: var(--sidebar-text);
    font-size: 13px;
    position: relative;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.065);
    color: #f7fbff;
    transform: translateX(1px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(71, 151, 255, 0.28), rgba(71, 151, 255, 0.07));
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(117, 190, 255, 0.1);
    border-left-color: transparent;
}

.nav-item.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 18px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #8ce4ff, #5b8cff);
    transform: translateY(-50%);
    box-shadow: 0 0 12px rgba(111, 214, 255, 0.65);
}

.nav-item i {
    color: rgba(164, 204, 244, 0.62);
    width: 22px;
    margin-right: 11px;
    font-size: 15px;
    text-align: center;
}

.nav-item.active i,
.nav-item:hover i {
    color: #8fd5ff;
}

.nav-divider {
    background: var(--sidebar-line);
    margin: 12px 20px;
}

.nav-section-title {
    color: var(--sidebar-muted);
    padding: 7px 24px;
    font-size: 9px;
    letter-spacing: 1.4px;
}

.sidebar-footer {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--sidebar-line);
}

.logout-btn {
    background: rgba(255, 255, 255, 0.055);
    color: rgba(216, 235, 255, 0.66);
    border: 1px solid rgba(157, 203, 255, 0.08);
}

.logout-btn:hover {
    background: rgba(245, 65, 78, 0.9);
    color: #fff;
    border-color: transparent;
}

.nav-badge {
    margin-left: auto;
    background: linear-gradient(135deg, #ff6b6b, #e43d4f);
    box-shadow: 0 3px 10px rgba(228, 61, 79, 0.36);
}

/* 主内容层级 */
.page-header {
    border-bottom: 1px solid #e3ebf5;
    padding-bottom: 15px;
    margin-bottom: 18px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-strong);
    font-size: 23px;
    letter-spacing: -0.3px;
}

.page-title::before {
    content: "";
    width: 4px;
    height: 22px;
    border-radius: 3px;
    background: linear-gradient(180deg, #67b7ff, #3f7ef0);
    box-shadow: 0 3px 9px rgba(63, 126, 240, 0.28);
    flex-shrink: 0;
}

.page-title i {
    color: #4a90e2;
    font-size: 20px;
}

.page-subtitle {
    color: #7d8da3;
    font-size: 13px;
    margin-top: 6px;
}

/* 卡片 */
.card {
    border: 1px solid var(--card-line);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(25, 55, 95, 0.045);
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-header {
    border-bottom-color: #edf3fa;
}

.card-title {
    color: #1b3552;
    display: flex;
    align-items: center;
    gap: 2px;
}

.card-title i {
    color: #4a90e2;
}

/* 统计卡 */
.stats-grid {
    gap: 14px;
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 18px 20px;
    border: 1px solid var(--card-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(25, 55, 95, 0.045);
}

.stat-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #78c8ff, #3f7ef0);
}

.stat-card:nth-child(2)::before {
    background: linear-gradient(180deg, #ffd477, #f49b20);
}

.stat-card:nth-child(3)::before {
    background: linear-gradient(180deg, #8ae4ac, #34b46a);
}

.stat-card:nth-child(4)::before {
    background: linear-gradient(180deg, #ff9b9b, #e04455);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    font-size: 23px;
    margin-right: 14px;
}

.stat-value {
    color: #10253d;
    font-size: 26px;
    letter-spacing: -0.4px;
}

.stat-label {
    color: #8493a8;
    font-size: 12px;
    margin-top: 3px;
}

/* 按钮、表单、表格 */
.btn {
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.btn-primary {
    box-shadow: 0 6px 16px rgba(74, 144, 226, 0.2);
}

.btn-secondary {
    background: #f2f6fc;
    color: #4c6078;
    border: 1px solid #e4ebf5;
}

.btn-secondary:hover {
    background: #eaf1fa;
}

.form-control {
    border-color: #dee8f4;
    border-radius: 10px;
    background: #fbfdff;
}

.form-control:hover {
    border-color: #c9d9ec;
}

.form-control:focus {
    background: #fff;
    border-color: #73a9f5;
    box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.1);
}

.table-responsive {
    border: 1px solid #ecf2f9;
    border-radius: 12px;
}

.table thead {
    background: #f7fafd;
}

.table th {
    color: #63758b;
    border-bottom: 1px solid #e9f0f8;
    font-size: 12px;
}

.table td {
    border-bottom: 1px solid #eff4fa;
    color: #34495f;
}

.table tbody tr:last-child td {
    border-bottom: 0;
}

.table tbody tr:hover {
    background: #f8fbff;
}

/* 任务、笔记、弹窗 */
.task-card,
.note-card {
    border: 1px solid #e8eff8;
    box-shadow: 0 4px 16px rgba(25, 55, 95, 0.04);
}

.task-card {
    padding: 18px;
}

.note-card {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.note-card:hover {
    border-color: #d6e5f6;
    box-shadow: 0 8px 24px rgba(25, 55, 95, 0.07);
}

.modal {
    background: rgba(6, 18, 34, 0.64);
    backdrop-filter: blur(5px);
}

.modal-content {
    border-radius: 16px;
    box-shadow: 0 30px 80px rgba(2, 15, 33, 0.28);
}

.modal-header {
    border-bottom-color: #edf3fa;
}

.modal-title {
    color: #162c46;
}

.progress-bar {
    background: #eaf1fa;
}

.progress-fill {
    background: linear-gradient(90deg, #3f7ef0, #7cc9ff);
}

.badge {
    border-radius: 999px;
    font-weight: 600;
}

.empty-icon {
    color: #c4d4e7;
}

.alert {
    border-radius: 11px;
    gap: 8px;
}

/* 滚动条 */
.main-content::-webkit-scrollbar,
.card-body::-webkit-scrollbar,
.nav-menu::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.main-content::-webkit-scrollbar-thumb,
.card-body::-webkit-scrollbar-thumb,
.nav-menu::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #c5d5e8;
    border-radius: 6px;
}

.main-content::-webkit-scrollbar-track,
.card-body::-webkit-scrollbar-track,
.nav-menu::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: transparent;
}

/* 移动端按钮与侧栏 */
.mobile-menu-toggle {
    background: #0d2a4a;
    border: 1px solid rgba(120, 190, 255, 0.18);
    color: #9ddcff;
}

@media (max-width: 768px) {
    .page-title {
        font-size: 20px;
    }

    .page-title::before {
        height: 19px;
    }

    .card,
    .stat-card,
    .task-card {
        border-radius: 13px;
    }
}

/* 管理员的小组仓库切换 */
.group-repo-switcher {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.group-repo-chip {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid #e3edf8;
    border-radius: 12px;
    background: #fff;
    color: #334a63;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.group-repo-chip:hover {
    border-color: #b9d6f7;
    box-shadow: 0 6px 18px rgba(29, 72, 132, 0.08);
    transform: translateY(-1px);
}

.group-repo-chip.active {
    border-color: #8dbbff;
    background: linear-gradient(145deg, #f2f8ff, #e9f3ff);
    box-shadow: 0 6px 18px rgba(47, 111, 237, 0.1);
}

.group-repo-chip-name {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #2c4562;
    font-size: 13px;
    font-weight: 700;
}

.group-repo-chip-name i {
    color: #4a90e2;
    font-size: 12px;
}

.group-repo-chip.active .group-repo-chip-name {
    color: #1f5eb8;
}

.group-repo-chip-meta {
    padding-left: 19px;
    color: #91a2b6;
    font-size: 10px;
}

@media (max-width: 1100px) {
    .group-repo-switcher {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .group-repo-switcher {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.nav-badge-info {
    background: rgba(91, 168, 255, 0.18);
    color: #9fd4ff;
}
