/* ============================================================
 * 雲中書院武术培训馆教务管理系统 - Material Design 样式系统
 * 基于 Google Material Design 极简风格
 * 色彩 / 布局 / 卡片 / 按钮 / 表单 / 表格 / 弹窗 / Toast / 分页
 * ============================================================ */

/* ============================================================
 * 一、基础重置
 * ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", "PingFang SC", "Hiragino Sans GB",
        "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

ul,
ol {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* 滚动条美化 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-hint);
}

/* ============================================================
 * 二、色彩系统（CSS 变量）
 * ============================================================ */
:root {
    /* 主色 - 谷歌蓝，低饱和 */
    --primary: #1a73e8;
    --primary-light: #4285f4;
    --primary-dark: #1557b0;
    --primary-bg: #e8f0fe;

    /* 语义色 */
    --success: #1e8e3e;
    --success-bg: #e6f4ea;
    --error: #d93025;
    --error-bg: #fce8e6;
    --warning: #f9ab00;
    --warning-bg: #fef7e0;
    --info: #4285f4;
    --info-bg: #e8f0fe;

    /* 文字色 */
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-hint: #9aa0a6;

    /* 背景色 */
    --bg-page: #f8f9fa;
    --bg-card: #ffffff;
    --bg-hover: #f1f3f4;
    --bg-active: #e8f0fe;

    /* 分割线 */
    --border: #e0e0e0;
    --border-light: #f0f0f0;

    /* 圆角 */
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
    --radius-pill: 9999px;

    /* 阴影 */
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.1);
    --shadow-2: 0 2px 8px rgba(0, 0, 0, 0.12);
    --shadow-3: 0 4px 16px rgba(0, 0, 0, 0.14);

    /* 间距 */
    --topbar-height: 56px;
    --sidebar-width: 240px;

    /* 过渡 */
    --transition: 0.2s ease;
}

/* ============================================================
 * 三、排版
 * ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 12px; }

p { margin-bottom: 0; }

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-secondary); }
.text-hint { color: var(--text-hint); }
.text-primary { color: var(--text-primary); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-warning { color: var(--warning); }

/* ============================================================
 * 四、应用布局
 * ============================================================ */
.app-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 顶部导航栏 */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background-color: var(--bg-card);
    box-shadow: var(--shadow-1);
    display: flex;
    align-items: center;
    padding: 0 16px;
    z-index: 1000;
    transition: box-shadow var(--transition);
}

.topbar__menu-btn {
    display: flex;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-right: 8px;
    transition: background-color var(--transition);
}

.topbar__menu-btn:hover {
    background-color: var(--bg-hover);
}

.topbar__logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 500;
    color: var(--primary);
    white-space: nowrap;
}

.topbar__logo .material-icons {
    font-size: 28px;
}

.topbar__title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    margin-left: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar__spacer {
    flex: 1;
}

.topbar__user {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-pill);
    transition: background-color var(--transition);
}

.topbar__user:hover {
    background-color: var(--bg-hover);
}

.topbar__avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.topbar__username {
    font-size: 14px;
    color: var(--text-secondary);
    white-space: nowrap;
}

.topbar__logout {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background-color var(--transition), color var(--transition);
}

.topbar__logout:hover {
    background-color: var(--error-bg);
    color: var(--error);
}

/* 侧边栏 */
.sidebar {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-light);
    overflow-y: auto;
    padding: 8px 0;
    z-index: 900;
    transition: transform var(--transition);
}

.sidebar__section {
    padding: 8px 0;
}

.sidebar__section-title {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-hint);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 24px;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    margin-top: var(--topbar-height);
    padding: 24px;
    min-height: calc(100vh - var(--topbar-height));
    transition: margin-left var(--transition);
}

.main-content--full {
    margin-left: 0;
}

/* 移动端侧边栏隐藏（教练/家长角色或窄屏） */
.sidebar--mobile {
    transform: translateX(-100%);
    box-shadow: var(--shadow-3);
}

.sidebar--mobile.sidebar--mobile-open {
    transform: translateX(0);
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.page-header__title {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
}

.page-header__subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.page-header__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 移动端遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 850;
    opacity: 0;
    transition: opacity var(--transition);
}

.overlay--visible {
    display: block;
    opacity: 1;
}

/* ============================================================
 * 五、菜单样式
 * ============================================================ */
.menu-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
    border-left: 3px solid transparent;
    white-space: nowrap;
    user-select: none;
}

.menu-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.menu-item--active {
    background-color: var(--primary-bg);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 500;
}

.menu-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.menu-text {
    font-size: 14px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
 * 六、卡片
 * ============================================================ */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    overflow: hidden;
    transition: box-shadow var(--transition);
}

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

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

.card-header__title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.card-header__subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.card-body {
    padding: 16px 24px;
}

.card-body--tight {
    padding: 0;
}

.card-footer {
    padding: 12px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* ============================================================
 * 七、按钮
 * ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 24px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color var(--transition), box-shadow var(--transition),
        transform var(--transition), opacity var(--transition);
    white-space: nowrap;
    user-select: none;
    text-decoration: none;
    outline: none;
}

.btn .material-icons {
    font-size: 18px;
}

/* 实心按钮 */
.btn--primary {
    background-color: var(--primary);
    color: #fff;
}

.btn--primary:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-1);
}

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

.btn--success:hover {
    background-color: #166534;
    box-shadow: var(--shadow-1);
}

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

.btn--danger:hover {
    background-color: #b3261e;
    box-shadow: var(--shadow-1);
}

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

.btn--warning:hover {
    background-color: #e09600;
    box-shadow: var(--shadow-1);
}

/* 镂空按钮 */
.btn--outlined {
    background-color: transparent;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn--outlined:hover {
    background-color: var(--primary-bg);
}

.btn--outlined.btn--danger {
    color: var(--error);
    border-color: var(--error);
}

.btn--outlined.btn--danger:hover {
    background-color: var(--error-bg);
}

.btn--outlined.btn--success {
    color: var(--success);
    border-color: var(--success);
}

.btn--outlined.btn--success:hover {
    background-color: var(--success-bg);
}

/* 文字按钮 */
.btn--text {
    background-color: transparent;
    color: var(--primary);
    padding: 8px 12px;
}

.btn--text:hover {
    background-color: var(--primary-bg);
}

/* 按钮尺寸 */
.btn--sm {
    padding: 4px 12px;
    font-size: 13px;
}

.btn--sm .material-icons {
    font-size: 16px;
}

.btn--lg {
    padding: 12px 32px;
    font-size: 16px;
}

.btn--lg .material-icons {
    font-size: 20px;
}

.btn--block {
    display: flex;
    width: 100%;
}

.btn--icon {
    padding: 8px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.btn--icon.btn--sm {
    width: 32px;
    height: 32px;
    padding: 4px;
}

/* 按钮交互状态 */
.btn:active {
    transform: scale(0.97);
}

.btn:disabled,
.btn--disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 按钮组 */
.btn-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

/* ============================================================
 * 八、表单控件
 * ============================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

/* 输入框 */
.input,
.form-input,
.select,
.textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--text-primary);
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input:hover,
.form-input:hover,
.select:hover,
.textarea:hover {
    border-color: var(--text-hint);
}

.input:focus,
.form-input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.select,
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6368' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    cursor: pointer;
}

/* 输入框带图标 */
.input-with-icon {
    position: relative;
}

.input-with-icon .input {
    padding-left: 40px;
}

.input-with-icon .material-icons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 20px;
    color: var(--text-hint);
    pointer-events: none;
}

/* 表单错误提示 */
.form-error {
    display: block;
    font-size: 12px;
    color: var(--error);
    margin-top: 4px;
    min-height: 16px;
}

.form-hint {
    display: block;
    font-size: 12px;
    color: var(--text-hint);
    margin-top: 4px;
}

/* 表单错误状态 */
.form-group.has-error .input,
.form-group.has-error .form-input,
.form-group.has-error .select,
.form-group.has-error .textarea {
    border-color: var(--error);
}

.form-group.has-error .input:focus,
.form-group.has-error .form-input:focus,
.form-group.has-error .select:focus,
.form-group.has-error .textarea:focus {
    box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.15);
}

/* 复选框与单选框 */
.checkbox,
.radio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    user-select: none;
}

.checkbox input,
.radio input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* 开关 */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: var(--border);
    border-radius: var(--radius-pill);
    transition: background-color var(--transition);
}

.switch__slider::before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform var(--transition);
}

.switch input:checked + .switch__slider {
    background-color: var(--primary);
}

.switch input:checked + .switch__slider::before {
    transform: translateX(20px);
}

/* ============================================================
 * 九、表格
 * ============================================================ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table th {
    text-align: left;
    padding: 12px 16px;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: var(--bg-page);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 1;
}

.table td {
    padding: 12px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

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

.table tbody tr {
    transition: background-color var(--transition);
}

/* 斑马纹 */
.table--striped tbody tr:nth-child(even) {
    background-color: var(--bg-page);
}

/* hover 效果 */
.table--hover tbody tr:hover {
    background-color: var(--bg-hover);
}

/* 边框 */
.table--bordered {
    border: 1px solid var(--border);
}
.table--bordered th,
.table--bordered td {
    border: 1px solid var(--border);
}

/* 表格操作列 */
.table__actions {
    display: flex;
    gap: 4px;
    align-items: center;
    white-space: nowrap;
}

.table__actions .btn {
    padding: 4px 8px;
    font-size: 13px;
}

/* ============================================================
 * 十、弹窗 Dialog
 * ============================================================ */
.dialog-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(32, 33, 36, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity var(--transition);
    padding: 16px;
}

.dialog-overlay--visible {
    opacity: 1;
}

.dialog {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    transform: translateY(-16px);
    transition: transform var(--transition);
    overflow: hidden;
}

.dialog-overlay--visible .dialog {
    transform: translateY(0);
}

.dialog--sm { max-width: 360px; }
.dialog--md { max-width: 600px; }
.dialog--lg { max-width: 800px; }

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
}

.dialog-header__title {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-primary);
}

.dialog-header__close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-hint);
    transition: background-color var(--transition), color var(--transition);
}

.dialog-header__close:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.dialog-body {
    padding: 12px 24px 20px;
    overflow-y: auto;
    font-size: 14px;
    color: var(--text-primary);
    flex: 1;
}

.dialog-body p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 24px 20px;
}

/* ============================================================
 * 十一、标签 / 徽章
 * ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    line-height: 1.6;
    white-space: nowrap;
}

.badge--success {
    background-color: var(--success-bg);
    color: var(--success);
}

.badge--warning {
    background-color: var(--warning-bg);
    color: #b07000;
}

.badge--error {
    background-color: var(--error-bg);
    color: var(--error);
}

.badge--info {
    background-color: var(--info-bg);
    color: var(--primary);
}

.badge--default {
    background-color: var(--bg-hover);
    color: var(--text-secondary);
}

.badge .material-icons {
    font-size: 14px;
}

/* ============================================================
 * 十二、分页
 * ============================================================ */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px 0;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--text-secondary);
    background-color: transparent;
    border: none;
    transition: background-color var(--transition), color var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.pagination button:hover:not(:disabled):not(.active) {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.pagination button.active {
    background-color: var(--primary);
    color: #fff;
    font-weight: 500;
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination__info {
    font-size: 13px;
    color: var(--text-hint);
    margin-left: 12px;
}

/* ============================================================
 * 十三、Toast 通知
 * ============================================================ */
.toast-container {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-3);
    font-size: 14px;
    color: var(--text-primary);
    min-width: 280px;
    max-width: 420px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease forwards;
}

.toast.toast-hide {
    animation: toastSlideOut 0.3s ease forwards;
}

.toast .material-icons {
    font-size: 22px;
    flex-shrink: 0;
}

.toast--success {
    border-left: 4px solid var(--success);
}

.toast--success .material-icons {
    color: var(--success);
}

.toast--error {
    border-left: 4px solid var(--error);
}

.toast--error .material-icons {
    color: var(--error);
}

.toast--warning {
    border-left: 4px solid var(--warning);
}

.toast--warning .material-icons {
    color: var(--warning);
}

.toast--info {
    border-left: 4px solid var(--info);
}

.toast--info .material-icons {
    color: var(--info);
}

.toast__message {
    flex: 1;
    line-height: 1.4;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ============================================================
 * 十四、加载动画
 * ============================================================ */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading--sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.loading--lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 全屏加载遮罩 */
.loading-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 4000;
    backdrop-filter: blur(1px);
}

.loading-overlay__text {
    font-size: 14px;
    color: var(--text-secondary);
}

/* 行内加载 */
.loading-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

/* ============================================================
 * 十五、统计卡片
 * ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: box-shadow var(--transition), transform var(--transition);
}

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

.stat-card__info {
    flex: 1;
}

.stat-card__label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.stat-card__value {
    font-size: 28px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card__value .unit {
    font-size: 14px;
    color: var(--text-hint);
    font-weight: 400;
    margin-left: 4px;
}

.stat-card__icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: 16px;
}

.stat-card__icon .material-icons {
    font-size: 26px;
}

.stat-card__icon--primary {
    background-color: var(--primary-bg);
    color: var(--primary);
}

.stat-card__icon--success {
    background-color: var(--success-bg);
    color: var(--success);
}

.stat-card__icon--warning {
    background-color: var(--warning-bg);
    color: var(--warning);
}

.stat-card__icon--error {
    background-color: var(--error-bg);
    color: var(--error);
}

.stat-card__icon--info {
    background-color: var(--info-bg);
    color: var(--info);
}

/* ============================================================
 * 十六、空状态
 * ============================================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
    text-align: center;
}

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

.empty-state__text {
    font-size: 14px;
    color: var(--text-hint);
    margin-bottom: 16px;
}

/* ============================================================
 * 十七、搜索栏
 * ============================================================ */
.search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-page);
    border-radius: var(--radius-pill);
    padding: 4px 4px 4px 16px;
    transition: background-color var(--transition), box-shadow var(--transition);
    flex: 1;
    max-width: 400px;
}

.search-bar:focus-within {
    background-color: var(--bg-card);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.15);
}

.search-bar .material-icons {
    font-size: 20px;
    color: var(--text-hint);
    flex-shrink: 0;
}

.search-bar input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    padding: 8px 0;
}

.search-bar input::placeholder {
    color: var(--text-hint);
}

.search-bar button {
    padding: 6px 16px;
    border-radius: var(--radius-pill);
    background-color: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    transition: background-color var(--transition);
    flex-shrink: 0;
}

.search-bar button:hover {
    background-color: var(--primary-dark);
}

/* ============================================================
 * 十八、筛选栏与移动端页面
 * ============================================================ */
.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    align-items: center;
}

.filter-item {
    flex-shrink: 0;
}

.filter-item .form-input {
    min-width: 120px;
}

/* 移动端页面容器（教练端/家长端流程页） */
.mobile-page {
    max-width: 600px;
    margin: 0 auto;
}

.mobile-page .btn {
    min-height: 48px;
}

/* 移动端卡片（可点击列表项） */
.mobile-card {
    background-color: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    padding: 16px 20px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow var(--transition), transform var(--transition);
}

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

.mobile-card:active {
    transform: scale(0.98);
}

/* 表单网格（两列布局） */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* 表单操作区（底部按钮） */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* ============================================================
 * 十九、工具类
 * ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-col {
    display: flex;
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-1 {
    flex: 1;
}

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

/* 外边距 */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }

.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }

/* 文本截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 显示控制 */
.hidden { display: none !important; }
.visible { display: block !important; }

/* 字号 */
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-16 { font-size: 16px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }

.fw-500 { font-weight: 500; }
.fw-700 { font-weight: 700; }

.w-100 { width: 100%; }
.w-auto { width: auto; }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }

.position-relative { position: relative; }
.position-absolute { position: absolute; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }

/* ============================================================
 * 十九、登录页样式
 * ============================================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8f0fe 0%, #f8f9fa 100%);
    padding: 16px;
}

.login-card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-3);
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    animation: fadeInUp 0.4s ease;
}

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

.login-card__logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--primary-bg);
    color: var(--primary);
    margin-bottom: 16px;
}

.login-card__logo .material-icons {
    font-size: 36px;
}

.login-card__title {
    font-size: 22px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-card__subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

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

.login-card__footer {
    text-align: center;
    margin-top: 24px;
    font-size: 12px;
    color: var(--text-hint);
}

.login-card__btn {
    width: 100%;
    padding: 12px;
    font-size: 15px;
    margin-top: 8px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
 * 二十、通用辅助
 * ============================================================ */
.divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 16px 0;
}

.divider--vertical {
    border: none;
    border-left: 1px solid var(--border-light);
    width: 1px;
    height: 24px;
    margin: 0 8px;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

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

.info-list__item {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 14px;
}

.info-list__label {
    color: var(--text-secondary);
    min-width: 80px;
    flex-shrink: 0;
}

.info-list__value {
    color: var(--text-primary);
    flex: 1;
    word-break: break-all;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 16px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ============================================================
 * 二十一、移动端适配
 * ============================================================ */
.mobile-only { display: none; }

@media (max-width: 768px) {
    :root {
        --sidebar-width: 260px;
    }

    /* 侧边栏移动端隐藏 */
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-3);
    }

    .sidebar--mobile-open {
        transform: translateX(0);
    }

    /* 主内容区全宽 */
    .main-content {
        margin-left: 0;
        padding: 16px;
    }

    .main-content--full {
        margin-left: 0;
    }

    /* 移动端显示菜单按钮 */
    .topbar__menu-btn {
        display: flex;
    }

    .topbar__title {
        font-size: 15px;
    }

    .topbar__username {
        display: none;
    }

    /* 显示控制 */
    .mobile-only { display: flex; }
    .pc-only { display: none !important; }

    /* 统计卡片单列 */
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-card__value {
        font-size: 22px;
    }

    /* 网格单列 */
    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid {
        grid-template-columns: 1fr;
    }

    /* 表单单列 */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        min-width: 0;
    }

    /* 大按钮全宽 */
    .btn--block-mobile {
        width: 100%;
        display: flex;
    }

    /* 弹窗全宽 */
    .dialog {
        max-width: 100%;
        max-height: 85vh;
        border-radius: var(--radius);
    }

    .dialog--md,
    .dialog--lg {
        max-width: 100%;
    }

    /* 页面头部堆叠 */
    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .page-header__actions {
        flex-wrap: wrap;
    }

    .page-header__actions .btn {
        flex: 1;
        min-width: 0;
    }

    /* 表格横向滚动 */
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Toast 全宽 */
    .toast {
        min-width: auto;
        max-width: calc(100vw - 32px);
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    /* 搜索栏全宽 */
    .search-bar {
        max-width: 100%;
    }

    /* 登录卡片 */
    .login-card {
        padding: 32px 24px;
    }

    .login-card__title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .stat-grid {
        grid-template-columns: 1fr;
    }

    .stat-card__value {
        font-size: 24px;
    }

    .main-content {
        padding: 12px;
    }

    .card-body {
        padding: 12px 16px;
    }

    .card-header {
        padding: 12px 16px;
    }

    .topbar {
        padding: 0 8px;
    }
}

/* ============================================================
 * 二十二、PC端隐藏控制
 * ============================================================ */
.pc-only { display: flex; }

/* 当未登录时隐藏布局 */
.no-auth .topbar,
.no-auth .sidebar,
.no-auth .main-content {
    display: none;
}

/* ============================================================
 * 二十三、动画
 * ============================================================ */
.fade-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 过渡工具类 */
.transition {
    transition: all var(--transition);
}
