/* ================================================
   比高篮球 VI · 设计规范 （严格参考5张设计图）
   ================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* ---------- Logo 唯一配色域 ---------- */
    --bh-deep:    #0F2B47;   /* 外框深 · 侧边栏/主按钮 */
    --bh-dark:    #1D3A60;   /* 深蓝次 */
    --bh-navy:    #2B4A73;   /* 导航蓝 */
    --bh-blue:    #2C5F9E;   /* 主蓝 · 链接/标签/图标 */
    --bh-bright:  #4E81C4;   /* 亮蓝 · 渐变亮端 */
    --bh-accent:  #E63E7C;   /* 粉 · 选中/赛事/强调 */
    --bh-coral:   #F5A3BD;   /* 浅粉 */
    --bh-ball:    #D4845C;   /* 篮球橙 · 图标/营收 */
    --bh-ball-lt: #E0A782;   /* 浅橙 · 渐变端 */
    --bh-orange:  #C9703C;   /* 橙深 · 文字/箭头 */

    /* ---------- 中性层 ---------- */
    --bg-page:    #F5F6F8;   /* 页面背景灰 */
    --bg-card:    #FFFFFF;   /* 卡片 */
    --bg-soft:    #F2F4F7;   /* 表头/分割底色 */
    --bg-deep:    #EBEEF4;   /* 极浅蓝底 */
    --line:       #E8EAEE;   /* 细线边框 */
    --line-strong:#D9DCE3;   /* 粗边线/输入框 */

    --text-1:     #1F2937;   /* 主文字 */
    --text-2:     #4B5563;   /* 次文字 */
    --text-3:     #6B7280;   /* 弱文字 */
    --text-4:     #9CA3AF;   /* 辅助/占位 */

    /* ---------- 状态色（严格在logo域内） ---------- */
    --st-active:    var(--bh-blue);
    --st-active-bg: #E6EEF9;
    --st-wait:      var(--bh-orange);
    --st-wait-bg:   #F5E5D8;
    --st-rest:      #7D8799;
    --st-rest-bg:   #EEF0F4;
    --st-error:     var(--bh-accent);
    --st-error-bg:  #FCE8EE;
    --st-team:      var(--bh-bright);
    --st-team-bg:   #E6EEF9;

    /* ---------- 尺寸体系 ---------- */
    --r-xs:   4px;
    --r-sm:   6px;
    --r-md:   8px;
    --r-lg:   12px;
    --r-full: 999px;

    /* ---------- 阴影（扁平极弱） ---------- */
    --none:     none;
    --s-1:      0 1px 2px rgba(15,43,71,0.04);
    --s-hover:  0 4px 14px rgba(15,43,71,0.06);

    /* ---------- 过渡 ---------- */
    --t-f:  0.15s ease;
    --t-n:  0.2s ease;
}

html, body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC',
                 'Helvetica Neue', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-2);
    background: var(--bg-page);
    height: 100vh;
    overflow: hidden;
}

/* ======================================================
   侧边栏 · 设计图深蓝主导航 （230px）
   ====================================================== */
.sidebar {
    width: 230px;
    background: var(--bh-deep);
    color: #C8D1DF;
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 100;
}

.sidebar-logo {
    padding: 18px 18px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.logo-ball   { width:34px; height:34px; margin-right:10px; flex-shrink:0; }
.logo-ball-svg { width:100%; height:100%; }

.logo-text-wrap { display:flex; flex-direction:column; line-height:1.15; }
.logo-text-brand { display:none; }
.logo-text-cn {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    letter-spacing: 0.5px;
}
.logo-text-sub { display:none; }

/* ---------- 菜单 ---------- */
.sidebar-menu {
    flex: 1;
    padding: 10px 10px;
    overflow-y: auto;
}
.sidebar-menu::-webkit-scrollbar { width: 4px; }
.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.12);
    border-radius: 2px;
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    font-size: 13.5px;
    color: #9AA5B8;
    text-decoration: none;
    font-weight: 400;
    position: relative;
}
.menu-item:hover {
    background: rgba(255,255,255,0.05);
    color: #D8DEE8;
}
.menu-item.active {
    background: rgba(255,255,255,0.09);
    color: #FFFFFF;
    font-weight: 500;
}
.menu-item.active::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 8px; bottom: 8px;
    width: 3px;
    background: var(--bh-accent);
    border-radius: 2px;
}
.menu-icon {
    width: 18px; height: 18px;
    margin-right: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.menu-icon svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
    opacity: 0.9;
}

/* ---------- 侧边栏底部·小程序入口 ---------- */
.sidebar-mini-apps {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px 14px;
    margin-top: auto;
}
.mini-app-title {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.mini-app-link {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    margin: 2px 0;
    border-radius: var(--r-xs);
    cursor: pointer;
    color: #8D97AA;
    font-size: 12.5px;
    transition: all var(--t-f);
}
.mini-app-link:hover {
    color: #C8D1DF;
    background: rgba(255,255,255,0.04);
}
.mini-app-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--bh-accent);
    margin-right: 10px;
    flex-shrink: 0;
}

/* ---------- 退出 ---------- */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 12px 14px 16px;
}
.logout-btn {
    display: flex; align-items: center;
    padding: 8px 10px;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    font-size: 13px;
    color: #7D8799;
    text-decoration: none;
}
.logout-btn:hover {
    background: rgba(255,255,255,0.05);
    color: #C8D1DF;
}
.logout-icon {
    width: 18px; height: 18px;
    margin-right: 10px;
    display: flex; align-items: center; justify-content: center;
}
.logout-icon svg {
    width: 18px; height: 18px;
    stroke: currentColor; fill: none;
    stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ======================================================
   主布局
   ====================================================== */
.layout-wrap { display: flex; height: 100vh; overflow: hidden; }
.container   { display: flex; height: 100%; }

.layout-right {
    flex: 1;
    margin-left: 230px;
    height: 100vh;
    overflow: auto;
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
}
.layout-right::-webkit-scrollbar,
.main-content::-webkit-scrollbar,
.page-content::-webkit-scrollbar { width: 6px; }
.layout-right::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb,
.page-content::-webkit-scrollbar-thumb {
    background: #C8CDD6; border-radius: 3px;
}

.main-content {
    flex: 1;
    margin-left: 230px;
    background: var(--bg-page);
    overflow-y: auto;
    padding: 22px 28px 28px;
    height: 100vh;
}

.page-content {
    flex: 1;
    padding: 20px 28px 28px;
    overflow-y: auto;
}

/* ======================================================
   顶栏 · 页面标题 + 右上角日期+管理员
   ====================================================== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-1);
    letter-spacing: 0.2px;
}
.header-right {
    display: flex; align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-3);
}
.admin-name {
    color: var(--text-2);
    font-weight: 500;
}
.admin-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--bh-navy) 0%, var(--bh-blue) 100%);
    display: flex; align-items: center; justify-content: center;
    color: #FFFFFF;
    font-size: 12px;
    font-weight: 600;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.6);
}
.admin-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}

/* ---------- 全局校区选择器（由common.js自动注入） ---------- */
.global-campus-selector {
    display: flex;
    align-items: center;
    gap: 6px;
}
.global-campus-selector .gcs-label {
    font-size: 12px;
    color: var(--text-3);
    white-space: nowrap;
}
.global-campus-selector .gcs-select {
    padding: 4px 28px 4px 10px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text-1);
    cursor: pointer;
    min-width: 110px;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 14px;
    transition: border-color 0.15s;
}
.global-campus-selector .gcs-select:hover {
    border-color: var(--bh-blue);
}
.global-campus-selector .gcs-select:focus {
    border-color: var(--bh-blue);
    box-shadow: 0 0 0 2px rgba(44, 95, 158, 0.1);
}

/* ---------- 旧版 store-select-bar：改为极简内联显示 ---------- */
.store-select-bar {
    padding: 0 0 14px;
    background: transparent;
    position: static;
    border-bottom: none;
    z-index: 1;
    gap: 12px;
    display: flex; align-items: center;
    margin-bottom: 8px;
}
.store-select-bar .bar-left  { font-size:13px; color:var(--text-3); gap:8px; display:flex; align-items:center; }
.store-select-bar .bar-left strong { color:var(--text-1); font-weight:500; }
.store-select-bar .bar-right { font-size:13px; color:var(--text-3); gap:12px; display:flex; align-items:center; margin-left:auto; }

/* ======================================================
   统计卡片 （设计图极简风：1px边框·无顶部色条·右上角小图标）
   ====================================================== */
.stat-grid, .dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 1200px) {
    .stat-grid, .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px 18px 16px;
    transition: box-shadow var(--t-n), border-color var(--t-n);
    position: relative;
}
.stat-card:hover {
    box-shadow: var(--s-hover);
    border-color: var(--line-strong);
}
.stat-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: none;
}
.stat-card .card-title {
    font-size: 13px;
    color: var(--text-3);
    font-weight: 400;
    letter-spacing: 0.2px;
}
/* 图标方块 · 设计图小尺寸渐变块 */
.stat-card .card-icon {
    width: 32px; height: 32px;
    border-radius: var(--r-md);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    flex-shrink: 0;
}
.stat-card .card-icon svg {
    width: 17px; height: 17px;
    stroke: #FFFFFF; fill: none;
    stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
/* 图标渐变（蓝/绿→蓝/粉/橙 —— 严格logo配色内） */
.stat-card .card-icon.blue {
    background: linear-gradient(135deg, #3A6FB2 0%, #1D3A60 100%);
}
.stat-card .card-icon.cyan,
.stat-card .card-icon.green {
    background: linear-gradient(135deg, var(--bh-bright) 0%, var(--bh-blue) 100%);
}
.stat-card .card-icon.pink {
    background: linear-gradient(135deg, #F06090 0%, var(--bh-accent) 100%);
}
.stat-card .card-icon.orange {
    background: linear-gradient(135deg, var(--bh-ball-lt) 0%, var(--bh-ball) 100%);
}
.stat-card .card-icon.gray {
    background: linear-gradient(135deg, #8B95A7 0%, #6B7687 100%);
}

.stat-card .card-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-1);
    line-height: 1.2;
    margin-bottom: 6px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.3px;
}

.card-trend {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.card-trend .up {
    display: inline-flex; align-items: center;
    color: var(--bh-blue);
}
.card-trend .down {
    display: inline-flex; align-items: center;
    color: var(--bh-orange);
}
.trend-arrow {
    display: inline-block;
    width: 0; height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid transparent;
    margin-right: 2px;
}
.trend-arrow.up   { border-bottom: 5px solid var(--bh-blue); }
.trend-arrow.down { border-top: 5px solid var(--bh-orange); }

/* ======================================================
   卡片（门店/教练组/模块容器）
   ====================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    display: flex; align-items: center;
    gap: 8px;
}
.card-icon {
    width: 20px; height: 20px;
    background: var(--st-active-bg);
    border-radius: var(--r-xs);
    display: inline-flex; align-items: center; justify-content: center;
}
.card-icon svg {
    width: 12px; height: 12px;
    stroke: var(--bh-blue); fill: none;
    stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ======================================================
   筛选栏（扁平风·无阴影）
   ====================================================== */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}
.filter-bar .search-input,
.filter-bar .form-control {
    flex: 0 0 240px;
    width: 240px;
}
.filter-bar .form-select {
    width: auto;
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 160px;
}
.filter-label {
    font-size: 13px;
    color: var(--text-3);
}

/* 场地筛选按钮（参考课程管理图） */
.venue-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 6px 14px;
    font-size: 13px;
    color: var(--text-2);
    background: var(--bg-card);
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    white-space: nowrap;
}
.filter-btn:hover {
    border-color: var(--bh-blue);
    color: var(--bh-blue);
}
.filter-btn.active {
    background: var(--bh-blue);
    color: #FFFFFF;
    border-color: var(--bh-blue);
}

/* ======================================================
   按钮（设计图风：主=深蓝填充，次=白+灰边）
   - btn-primary / btn-secondary / btn-danger 均自包含基础样式
   - 无需额外添加 .btn 基础类
   ====================================================== */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    border: 1px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
    font-family: inherit;
    user-select: none;
}
.btn-primary {
    background: var(--bh-deep);
    color: #FFFFFF;
}
.btn-primary:hover { background: var(--bh-dark); }

.btn-secondary {
    background: #FFFFFF;
    color: var(--text-2);
    border-color: var(--line-strong);
}
.btn-secondary:hover {
    border-color: var(--bh-blue);
    color: var(--bh-blue);
}
.btn-danger {
    background: var(--bh-accent);
    color: #FFFFFF;
}
.btn-danger:hover { background: #C8305A; }

.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-disabled {
    background: var(--bg-deep) !important;
    color: var(--text-4) !important;
    border-color: var(--line) !important;
}

.btn-text {
    padding: 4px 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--bh-blue);
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    border-radius: var(--r-xs);
}
.btn-text:hover {
    color: var(--bh-accent);
    background: rgba(230, 62, 124, 0.05);
}

.btn-sm {
    padding: 4px 12px;
    font-size: 12px;
    line-height: 1.3;
    border-radius: var(--r-xs);
}
.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

/* ======================================================
   操作工具栏（批量操作按钮行）
   - batch-bar: 批量操作按钮容器（带右对齐主按钮）
   - batch-btn: 批量操作按钮（白底细边，等同btn-secondary）
   ====================================================== */
.batch-bar {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}
.batch-bar .btn-primary { margin-left: auto; }
.batch-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    background-color: #FFFFFF;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    font-family: inherit;
    white-space: nowrap;
    line-height: 1.4;
}
.batch-btn:hover {
    border-color: var(--bh-blue);
    color: var(--bh-blue);
}
.batch-btn.active {
    border-color: var(--bh-blue);
    background: var(--st-active-bg);
    color: var(--bh-blue);
}

/* ======================================================
   表单
   ====================================================== */
.form-control, .form-select, .form-date {
    padding: 7px 12px;
    font-size: 13px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    background: #FFFFFF;
    color: var(--text-1);
    transition: border-color var(--t-f);
    font-family: inherit;
    line-height: 1.5;
}
.form-control::placeholder { color: var(--text-4); }
.form-control:focus,
.form-select:focus,
.form-date:focus {
    outline: none;
    border-color: var(--bh-blue);
}
.form-select {
    min-width: 140px;
    cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

/* ======================================================
   表格（扁平·无阴影·极细线）
   ====================================================== */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.data-table thead th {
    text-align: left;
    padding: 11px 14px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--text-3);
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
    letter-spacing: 0.1px;
}
.data-table tbody td {
    padding: 12px 14px;
    font-size: 13.5px;
    color: var(--text-2);
    border-bottom: 1px solid var(--line);
    background: var(--bg-card);
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #FAFBFD; }

/* ======================================================
   标签 Tag（4px方圆角·胶囊）
   ====================================================== */
.tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--r-xs);
    line-height: 1.7;
    white-space: nowrap;
}

/* 状态类 */
.tag.ongoing, .tag.training, .tag.running, .tag.enabled {
    background: var(--st-active-bg); color: var(--st-active);
}
.tag.resting, .tag.break, .tag.ended {
    background: var(--st-rest-bg);   color: var(--st-rest);
}
.tag.upcoming, .tag.pending, .tag.recommend {
    background: var(--st-wait-bg);    color: var(--st-wait);
}
.tag.disabled, .tag.inactive {
    background: var(--st-error-bg);   color: var(--st-error);
}
.tag.matching, .tag.popular, .tag.match {
    background: var(--st-error-bg);   color: var(--st-error);
}

/* 课程类型 */
.tag.normal, .tag.base   { background: var(--st-active-bg); color: var(--st-active); }
.tag.advanced, .tag.elite { background: #E2E8F2;           color: #3D5A80; }
.tag.team, .tag.competition { background: var(--st-error-bg); color: var(--st-error); }

/* 段位 */
.tag.bronze { background: var(--st-wait-bg);   color: var(--bh-orange); }
.tag.silver { background: var(--st-rest-bg);   color: #5F697A; }
.tag.gold   { background: #F5E5D8;             color: #B8623C; }
.tag.platinum { background: #E8E4F0;           color: #6A5ACD; }
.tag.diamond { background: #D4EDF7;           color: #2E86AB; }
.tag.king   { background: var(--st-error-bg);  color: var(--bh-accent); }

.tag.featured { background: var(--st-team-bg); color: var(--bh-bright); }

/* ======================================================
   分页
   ====================================================== */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    margin-top: 18px;
}
.pagination-btn {
    padding: 6px 12px;
    font-size: 13px;
    color: var(--text-2);
    background: #FFFFFF;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t-f);
    min-width: 34px;
}
.pagination-btn:hover {
    border-color: var(--bh-blue);
    color: var(--bh-blue);
}
.pagination-btn.active {
    background: var(--bh-blue);
    color: #FFFFFF;
    border-color: var(--bh-blue);
}
.pagination-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ======================================================
   Tabs
   ====================================================== */
.tab-bar {
    display: inline-flex;
    margin-bottom: 18px;
    background: var(--bg-soft);
    border-radius: var(--r-sm);
    padding: 3px;
    gap: 2px;
}
.tab-item,
.tab-item:link,
.tab-item:visited {
    font-size: 13px;
    color: var(--text-3);
    padding: 6px 14px;
    border-radius: 5px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all var(--t-f);
    font-weight: 500;
    text-decoration: none;
    outline: none;
    user-select: none;
}
.tab-item:hover,
.tab-item:hover:visited { color: var(--text-2); text-decoration: none; }
.tab-item:active  { color: var(--text-2); text-decoration: none; }
.tab-item.active,
.tab-item.active:visited {
    background: #FFFFFF;
    color: var(--text-1);
    box-shadow: var(--s-1);
    font-weight: 600;
    pointer-events: none;
    cursor: default;
    text-decoration: none;
}

.sub-tab-bar {
    display: flex;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}
.sub-tab-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-3);
    padding: 10px 0;
    margin-right: 24px;
    cursor: pointer;
    position: relative;
    transition: color var(--t-f);
}
.sub-tab-item:hover        { color: var(--text-2); }
.sub-tab-item.active       { color: var(--bh-blue); font-weight: 600; }
.sub-tab-item.active::after {
    content: '';
    position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px;
    background: var(--bh-blue);
    border-radius: 2px;
}

/* ======================================================
   开关 / 进度条
   ====================================================== */
.toggle-switch {
    width: 36px; height: 20px;
    border-radius: 10px;
    cursor: pointer;
    position: relative;
    transition: background var(--t-f);
}
.toggle-switch.on  { background: var(--bh-blue); }
.toggle-switch.off { background: var(--line-strong); }
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 16px; height: 16px;
    border-radius: 50%;
    top: 2px; left: 2px;
    background: #FFFFFF;
    transition: transform var(--t-f);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.toggle-switch.on::after { transform: translateX(16px); }

.progress-bar-bg {
    height: 4px;
    background: var(--bg-soft);
    border-radius: 2px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: var(--bh-blue);
    border-radius: 2px;
    transition: width var(--t-n);
}

/* 徽章、价格 */
.badge {
    font-size: 11px; font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--r-full);
    background: var(--st-error-bg);
    color: var(--st-error);
    display: inline-block;
}
.price { color: var(--bh-accent); font-weight: 600; }

/* ======================================================
   通用布局
   ====================================================== */
.dual-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}
.single-column {
    display: flex; flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

/* ======================================================
   门店卡片（参考门店管理图）
   ====================================================== */
.store-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.store-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
    transition: box-shadow var(--t-n), border-color var(--t-n);
}
.store-card:hover {
    box-shadow: var(--s-hover);
    border-color: var(--line-strong);
}
.store-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.store-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 6px;
}
.store-meta {
    font-size: 12.5px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}
.store-meta svg {
    width: 13px; height: 13px; flex-shrink: 0;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}
.store-data-row {
    display: flex;
    gap: 24px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}
.store-data-col { flex: 1; }
.store-data-label {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 4px;
}
.store-data-value {
    font-size: 17px;
    font-weight: 700;
    color: var(--bh-blue);
    font-variant-numeric: tabular-nums;
}
.store-data-value.orange {
    color: var(--bh-orange);
}

/* ======================================================
   教练组卡片（3列布局）
   ====================================================== */
.coach-group-cards {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 16px;
}
@media (max-width: 860px) {
    .store-cards { grid-template-columns: 1fr 1fr; }
    .coach-group-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 600px)  {
    .store-cards { grid-template-columns: 1fr; }
    .coach-group-cards { grid-template-columns: 1fr !important; }
}
.coach-group-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 18px;
    transition: box-shadow var(--t-n), border-color var(--t-n);
}
.coach-group-card:hover {
    box-shadow: var(--s-hover);
    border-color: var(--line-strong);
}
.cg-title-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.cg-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}
.cg-head {
    font-size: 12.5px;
    color: var(--text-3);
    margin-bottom: 12px;
}
.cg-head strong { color: var(--text-2); font-weight: 500; }
.cg-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    margin-bottom: 12px;
}
.cg-stat {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}
.cg-stat-label { color: var(--text-3); }
.cg-stat-value { color: var(--text-1); font-weight: 500; }
.cg-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.cg-actions { display: flex; gap: 4px; }
.cg-action-btn {
    width: 28px; height: 28px;
    border-radius: var(--r-xs);
    display: flex; align-items: center; justify-content: center;
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    color: var(--text-3);
    transition: all var(--t-f);
}
.cg-action-btn:hover {
    border-color: var(--bh-blue);
    color: var(--bh-blue);
}
.cg-action-btn svg {
    width: 14px; height: 14px;
    stroke: currentColor; fill: none; stroke-width: 1.8;
    stroke-linecap: round; stroke-linejoin: round;
}

/* ======================================================
   球队卡片（4列，选中=粉边）
   ====================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 18px;
}
@media (max-width: 1200px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .team-grid { grid-template-columns: 1fr; } }

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px;
    transition: all var(--t-n);
    cursor: pointer;
    position: relative;
}
.team-card:hover {
    box-shadow: var(--s-hover);
    border-color: var(--line-strong);
}
.team-card.selected {
    border-color: var(--bh-accent);
    border-width: 2px;
    background: #FFFAFC;
    padding: 15px;
}
.team-card .team-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.team-avatar {
    width: 40px; height: 40px;
    border-radius: var(--r-md);
    background: linear-gradient(135deg, var(--bh-navy), var(--bh-blue));
    display: flex; align-items: center; justify-content: center;
    color: #FFFFFF;
    font-weight: 700;
    font-size: 13px;
}
.team-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 3px;
}
.team-sub-info {
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 10px;
}
.team-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 12px;
}
.team-info-row {
    display: flex;
    justify-content: space-between;
    font-size: 12.5px;
}
.team-info-label { color: var(--text-3); }
.team-info-value { color: var(--text-1); font-weight: 500; }
.team-schedule-box {
    background: var(--bg-soft);
    border-radius: var(--r-sm);
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-2);
    margin-bottom: 10px;
}
.team-schedule-title {
    font-size: 11px;
    color: var(--text-4);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.team-schedule-vs {
    margin-bottom: 2px;
}
.team-schedule-vs strong { color: var(--bh-accent); font-weight: 600; }
.team-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
}
.team-card-actions { display: flex; gap: 2px; }

/* ======================================================
   图表卡片容器（首页趋势图、学员分布图）
   ====================================================== */
.chart-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 20px;
}
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.chart-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-1);
}
.chart-select-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-3);
}
.chart-body {
    position: relative;
    min-height: 240px;
}
.chart-legend {
    display: flex;
    gap: 18px;
    margin-top: 14px;
    flex-wrap: wrap;
    justify-content: center;
}
.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
}
.chart-legend-dot {
    width: 10px; height: 10px;
    border-radius: 3px;
}

/* ======================================================
   周课表（参考课程管理图）
   ====================================================== */
.schedule-container {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    overflow: hidden;
}
.schedule-header {
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-1);
}
.schedule-header-row,
.schedule-grid-row {
    display: flex;
}
.schedule-header-empty,
.time-axis-col {
    width: 70px;
    flex-shrink: 0;
    background: var(--bg-soft);
}
.schedule-header-empty {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.schedule-header-cell {
    flex: 1;
    padding: 10px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-2);
    text-align: center;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--bg-soft);
}
.schedule-header-cell:last-child { border-right: none; }

.schedule-grid-wrapper {
    overflow-y: auto;
    max-height: calc(100vh - 420px);
}
.schedule-grid-wrapper::-webkit-scrollbar { width: 6px; }
.schedule-grid-wrapper::-webkit-scrollbar-thumb { background: #C8CDD6; border-radius: 3px; }

.schedule-grid-container { display: flex; }
.time-axis-col {
    position: relative;
    border-right: 1px solid var(--line);
}
.time-label {
    position: absolute;
    left: 0; right: 0;
    height: 0;
    font-size: 11px;
    color: var(--text-4);
    text-align: center;
    transform: translateY(-50%);
}
.day-columns-container {
    display: flex;
    flex: 1;
    position: relative;
}
.day-column {
    flex: 1;
    position: relative;
    border-right: 1px solid var(--line);
}
.day-column:last-child { border-right: none; }
.time-grid-line {
    position: absolute;
    left: 0; right: 0;
    height: 1px;
    background: var(--line);
}
.time-grid-line.hour-line { background: var(--line); }

/* 课程小卡片 */
.course-card {
    position: absolute;
    left: 4px; right: 4px;
    padding: 6px 8px 5px;
    border-radius: var(--r-md);
    cursor: pointer;
    z-index: 10;
    background: #FFFFFF;
    border: 1.5px solid var(--bh-blue);
    transition: all var(--t-f);
    overflow: hidden;
}
.course-card:hover { box-shadow: var(--s-hover); z-index: 20; }
.course-card.pink {
    border-color: var(--bh-accent);
    background: var(--st-error-bg);
}
.course-card.elite {
    border-color: #3D5A80;
    background: #F5F7FB;
}
.course-name {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.course-card:not(.pink):not(.elite) .course-name { color: var(--bh-blue); }
.course-card.pink .course-name            { color: var(--bh-accent); }
.course-card.elite .course-name           { color: #3D5A80; }

.course-info {
    font-size: 10.5px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.course-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}
.course-tag {
    font-size: 9.5px;
    padding: 1px 4px;
    border-radius: 2px;
    background: var(--bg-soft);
    color: var(--text-3);
    line-height: 1.5;
}
.course-card:not(.pink):not(.elite) .course-tag.primary {
    background: var(--st-active-bg); color: var(--bh-blue);
}
.course-card.pink .course-tag.primary {
    background: var(--st-error-bg); color: var(--bh-accent);
}
.course-card.elite .course-tag.primary {
    background: #E2E8F2; color: #3D5A80;
}

/* ======================================================
   其它小工具
   ====================================================== */
.muted { color: var(--text-3); }
.divider {
    height: 1px;
    background: var(--line);
    margin: 14px 0;
}
.view-more-link {
    font-size: 12.5px;
    color: var(--bh-blue);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.view-more-link:hover { color: var(--bh-accent); }

.notice-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 16px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.notice-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-color: var(--bh-accent, #e63e7c);
}
.notice-tag {
    flex-shrink: 0;
    padding: 1px 7px;
    border-radius: 2px;
    background: var(--st-wait-bg);
    color: var(--bh-orange);
    font-size: 11px;
    font-weight: 600;
}
.notice-tag.accent {
    background: var(--st-error-bg);
    color: var(--bh-accent);
}
.notice-content { flex: 1; }
.notice-text {
    font-size: 13px;
    color: var(--text-2);
    margin-bottom: 3px;
}
.notice-date {
    font-size: 11.5px;
    color: var(--text-4);
}

/* ---------- 响应式收尾 ---------- */
@media (max-width: 1100px) {
    .dual-column { grid-template-columns: 1fr; }
    .main-content { padding: 20px 18px; }
    .page-content { padding: 18px 18px 28px; }
}
