/* ========================================================================
   赤水市体育赛事管理系统 - 后台管理界面自定义样式
   重点：强化侧边栏菜单层级、统一视觉风格
   ======================================================================== */

/* ==================== 侧边栏品牌区 ==================== */
.app-sidebar .sidebar-brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.9rem 0.5rem;
}
.app-sidebar .sidebar-brand .brand-text {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1px;
}

/* 用户面板 */
.app-sidebar .user-panel {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.25rem;
}
.app-sidebar .user-panel .info a,
.app-sidebar .user-panel .info span {
    font-size: 0.95rem;
    font-weight: 500;
}

/* ==================== 侧边栏菜单 - 分组标题（层级核心） ==================== */
.app-sidebar .sidebar-menu .nav-header {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: none;
    color: #6dd5fa;
    padding: 0.85rem 1.25rem 0.35rem;
    margin-top: 0.6rem;
    letter-spacing: 1.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.app-sidebar .sidebar-menu .nav-header::before {
    content: "";
    display: inline-block;
    width: 3px;
    height: 14px;
    background: linear-gradient(180deg, #29b6f6, #0288d1);
    border-radius: 2px;
    flex-shrink: 0;
}
/* 第一个分组标题不需要上边框和上边距 */
.app-sidebar .sidebar-menu > .nav-header:first-of-type {
    margin-top: 0.25rem;
    border-top: none;
}

/* ==================== 侧边栏菜单项 ==================== */
.app-sidebar .sidebar-menu .nav-item .nav-link {
    padding: 0.6rem 1.25rem;
    margin: 2px 8px;
    border-radius: 8px;
    transition: all 0.18s ease;
    font-size: 0.92rem;
    color: rgba(255, 255, 255, 0.82);
}
.app-sidebar .sidebar-menu .nav-item .nav-link .nav-icon {
    width: 1.5em;
    text-align: center;
    margin-right: 0.35rem;
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.18s ease;
}
.app-sidebar .sidebar-menu .nav-item .nav-link p {
    margin-bottom: 0;
}

/* 悬停效果 */
.app-sidebar .sidebar-menu .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.app-sidebar .sidebar-menu .nav-item .nav-link:hover .nav-icon {
    color: #4fc3f7;
}

/* 活跃菜单项 - 高亮 */
.app-sidebar .sidebar-menu .nav-item .nav-link.active {
    background: linear-gradient(90deg, rgba(41, 182, 246, 0.28), rgba(41, 182, 246, 0.06));
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #29b6f6;
}
.app-sidebar .sidebar-menu .nav-item .nav-link.active .nav-icon {
    color: #4fc3f7;
}

/* 折叠模式下的子菜单（treeview） */
.app-sidebar .sidebar-menu .nav-treeview {
    padding-left: 0.5rem;
    background: rgba(0, 0, 0, 0.15);
}
.app-sidebar .sidebar-menu .nav-treeview .nav-link {
    padding-left: 2.5rem;
    font-size: 0.88rem;
}
.app-sidebar .sidebar-menu .nav-treeview .nav-link .nav-icon {
    font-size: 0.55rem;
    width: 1.2em;
}

/* ==================== 顶部导航栏 ==================== */
.app-header.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    border-bottom: 2px solid #0288d1;
}

/* ==================== 内容区 ==================== */
.app-content {
    padding: 1.25rem 0.5rem;
}
.app-content-header {
    padding: 0.75rem 1rem 1rem;
}
.app-content-header h3 {
    font-weight: 600;
    color: #2c3e50;
}

/* 卡片 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
}
.card .card-header {
    background: #fff;
    border-bottom: 1px solid #eef1f5;
    border-radius: 10px 10px 0 0;
    padding: 0.85rem 1.1rem;
}
.card .card-header h3,
.card .card-header .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
}

/* 表格 */
.table thead th {
    background: #f4f6f9;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    color: #495057;
    white-space: nowrap;
}
.table-hover tbody tr:hover {
    background: #f0f7ff;
}

/* 按钮 */
.btn-primary {
    background: linear-gradient(135deg, #29b6f6, #0288d1);
    border: none;
    box-shadow: 0 2px 4px rgba(2, 136, 209, 0.25);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #03a9f4, #0277bd);
    box-shadow: 0 3px 8px rgba(2, 136, 209, 0.35);
}

/* 面包屑 */
.breadcrumb {
    background: transparent;
    margin-bottom: 0;
    padding: 0.5rem 0;
}

/* ==================== 登录页 ==================== */
.login-page,
.register-page {
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
}
.login-logo,
.register-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.login-card-body,
.register-card-body {
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    border: none;
}

/* ==================== 仪表盘小部件 ==================== */
.small-box {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}
.small-box .icon {
    opacity: 0.25;
}

/* ==================== 消息提示 ==================== */
.alert {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* ==================== 页脚 ==================== */
.app-footer {
    border-top: 1px solid #e9ecef;
    font-size: 0.85rem;
    color: #6c757d;
}

/* ==================== 暗色模式适配 ==================== */
[data-bs-theme="dark"] .app-content-header h3,
[data-bs-theme="dark"] .card .card-header h3,
[data-bs-theme="dark"] .card .card-header .card-title {
    color: #e0e0e0;
}
[data-bs-theme="dark"] .card .card-header {
    background: #1e1e2f;
    border-bottom-color: #2d2d44;
}
[data-bs-theme="dark"] .table thead th {
    background: #1e1e2f;
    border-bottom-color: #2d2d44;
    color: #b0b0c0;
}
[data-bs-theme="dark"] .table-hover tbody tr:hover {
    background: #252540;
}
