/* 驾校后台 - Element UI 风格 */
:root {
    --sidebar-w: 220px;
    --header-h: 56px;
    --primary: #409EFF;
    --primary-light: #ecf5ff;
    --primary-dark: #3a8ee6;
    --success: #67C23A;
    --success-light: #f0f9eb;
    --warning: #E6A23C;
    --warning-light: #fdf6ec;
    --danger: #F56C6C;
    --danger-light: #fef0f0;
    --info: #909399;
    --body-bg: #F5F7FA;
    --card-bg: #fff;
    --border: #DCDFE6;
    --border-light: #E4E7ED;
    --text-primary: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
}

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

body {
    font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Microsoft YaHei", sans-serif;
    background: var(--body-bg);
    color: var(--text-primary);
    font-size: 14px;
}

/* 登录页 */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: url('bac.png') center center no-repeat;
    background-size: cover;
}

.login-box {
    width: 400px;
    padding: 40px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
}

.login-box h1 {
    font-size: 20px;
    text-align: center;
    margin-bottom: 28px;
    color: var(--text-primary);
    font-weight: 500;
}

.login-box .form-item {
    margin-bottom: 22px;
}

.login-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 400;
    color: var(--text-regular);
}

.login-box input {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    transition: border-color .2s;
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary);
}

.login-box .btn-login {
    width: 100%;
    height: 40px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition: background .2s;
}

.login-box .btn-login:hover {
    background: var(--primary-dark);
}

.login-box .err {
    color: var(--danger);
    font-size: 12px;
    margin-top: 8px;
    display: none;
}

.login-box .err.show {
    display: block;
}

/* 主布局 */
.admin-layout {
    display: none;
    height: 100vh;
    overflow: hidden;
}

.admin-layout.show {
    display: flex;
}

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: #304156;
    flex-shrink: 0;
    z-index: 101;
    overflow-y: auto;
}

.sidebar .logo {
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    background: rgba(0, 0, 0, .2);
}

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

.sidebar nav {
    padding: 12px 0 56px 0;
}

.sidebar .nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255, 255, 255, .7);
    text-decoration: none;
    font-size: 14px;
    transition: all .2s;
}

.sidebar .nav-item i {
    margin-right: 10px;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.sidebar .nav-item:hover {
    color: #fff;
    background: rgba(0, 0, 0, .1);
}

.sidebar .nav-item.active {
    color: #fff;
    background: var(--primary);
}

.sidebar-toggle {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    background: rgba(0, 0, 0, .2);
    color: rgba(255, 255, 255, .8);
    font-size: 14px;
    cursor: pointer;
    transition: background .2s, color .2s;
}

.sidebar-toggle:hover {
    background: rgba(0, 0, 0, .3);
    color: #fff;
}

.sidebar-toggle i {
    font-size: 16px;
}

/* 侧栏折叠态（PC） */
.admin-layout.sidebar-collapsed .sidebar {
    width: 64px;
}

.admin-layout.sidebar-collapsed .sidebar .logo span,
.admin-layout.sidebar-collapsed .sidebar .nav-item span,
.admin-layout.sidebar-collapsed .sidebar-toggle span {
    display: none;
}

.admin-layout.sidebar-collapsed .sidebar .logo i,
.admin-layout.sidebar-collapsed .sidebar .nav-item i {
    margin-right: 0;
}

.admin-layout.sidebar-collapsed .sidebar .nav-item {
    justify-content: center;
    padding: 12px 0;
}

.admin-layout.sidebar-collapsed .sidebar-toggle {
    justify-content: center;
    padding: 12px 0;
}

.admin-layout.sidebar-collapsed .main-wrap {
    margin-left: 64px;
}

.main-wrap {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

.header {
    flex-shrink: 0;
    height: var(--header-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.header .breadcrumb {
    font-size: 14px;
    color: var(--text-regular);
}

.header .user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header .user span {
    font-size: 14px;
    color: var(--text-regular);
}

.header .btn-logout {
    padding: 8px 16px;
    color: var(--danger);
    border: 1px solid var(--danger);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all .2s;
}

.header .btn-logout:hover {
    background: var(--danger-light);
    color: var(--danger);
}

.content {
    flex: 1;
    padding: 20px;
    overflow: auto;
    min-height: 0;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.card {
    background: var(--card-bg);
    border-radius: 4px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.card-title {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Element 风格按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all .2s;
    white-space: nowrap;
}

.btn i {
    font-size: 14px;
}

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

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

.btn-default {
    background: #fff;
    color: var(--text-regular);
    border-color: var(--border);
}

.btn-default:hover {
    color: var(--primary);
    border-color: #c6e2ff;
    background: var(--primary-light);
}

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

.btn-danger:hover {
    opacity: .9;
}

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

.btn-success:hover {
    opacity: .9;
}

.btn-small {
    padding: 7px 12px;
    font-size: 13px;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
}

.toolbar .search {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.toolbar input[type="text"],
.toolbar select {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    width: 180px;
    transition: border-color .2s;
}

.toolbar input:focus,
.toolbar select:focus {
    outline: none;
    border-color: var(--primary);
}

/* 表格 */
.table-wrap {
    overflow-x: auto;
}

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

.table-wrap th,
.table-wrap td {
    padding: 12px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.table-wrap th {
    background: #fafafa;
    font-weight: 500;
    color: var(--text-regular);
    font-size: 14px;
}

.table-wrap tbody tr:hover td {
    background: #f5f7fa;
}

@media (min-width: 769px) {
    .table-wrap.table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #studentsTable {
        min-width: 1400px;
    }

    #studentsTable th,
    #studentsTable td {
        padding: 14px 16px;
    }

    #studentsTable th:last-child,
    #studentsTable td:last-child {
        position: sticky;
        right: 0;
        z-index: 2;
        min-width: 120px;
        background: var(--card-bg);
        box-shadow: -4px 0 8px rgba(0, 0, 0, .06);
        white-space: nowrap;
    }

    #studentsTable th:last-child {
        background: #fafafa;
    }

    #studentsTable tbody tr:hover td:last-child {
        background: #f5f7fa;
    }
}

.table-wrap .actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}

.table-wrap .actions .btn {
    padding: 6px 12px;
    font-size: 13px;
}

.table-wrap .tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
}

.table-wrap .tag-success {
    background: var(--success-light);
    color: var(--success);
}

.table-wrap .tag-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.table-wrap .tag-default {
    background: #f4f4f5;
    color: var(--text-secondary);
}

.table-wrap .tag-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.table-wrap .tag-licensed {
    background: #e1f3f8;
    color: #0c5460;
    margin-left: 4px;
}

/* 分页 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    font-size: 14px;
}

.pagination .info {
    color: var(--text-secondary);
    margin-right: 16px;
}

.pagination button {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all .2s;
}

.pagination button:hover:not(:disabled) {
    color: var(--primary);
    border-color: var(--primary);
}

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

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

/* 弹窗 */
.modal-mask {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal-mask.show {
    display: flex;
}

.modal-box {
    background: #fff;
    border-radius: 4px;
    width: 100%;
    max-width: 640px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .2);
}

.modal-box.modal-box-lg {
    max-width: 720px;
}

.modal-head {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-head .close {
    font-size: 22px;
    cursor: pointer;
    color: var(--text-secondary);
    line-height: 1;
}

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

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-foot {
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单 - Element UI 风格 */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 24px;
}

.form-grid.full {
    grid-template-columns: 1fr;
}

.form-item {
    margin-bottom: 0;
}

.form-item.w-full {
    grid-column: 1 / -1;
}

/* 表单项标签：el-form-item__label 风格 */
.form-item>label:first-child {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 400;
    color: #606266;
    line-height: 1.5;
}

.form-item input,
.form-item select,
.form-item textarea {
    width: 100%;
    height: 40px;
    padding: 0 15px;
    border: 1px solid #DCDFE6;
    border-radius: 4px;
    font-size: 14px;
    color: #606266;
    background-color: #fff;
    transition: border-color .2s, box-shadow .2s;
}

.form-item input:hover,
.form-item select:hover,
.form-item textarea:hover {
    border-color: #C0C4CC;
}

.form-item input:focus,
.form-item select:focus,
.form-item textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.2);
}

.form-item input::placeholder,
.form-item textarea::placeholder {
    color: #C0C4CC;
}

.form-item select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23909399'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 36px;
}

.form-item textarea {
    height: 80px;
    padding: 10px 15px;
    resize: vertical;
    line-height: 1.5;
}

/* 单选组 - el-radio 风格 */
.form-item .radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    padding-top: 4px;
}

.form-item .radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0;
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    color: #606266;
    cursor: pointer;
    position: relative;
    padding-left: 20px;
    min-height: 20px;
    line-height: 20px;
}

/* 隐藏原生单选 */
.form-item .radio-group label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
}

/* 自定义单选外圈 */
.form-item .radio-group label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border: 1px solid #DCDFE6;
    border-radius: 50%;
    background: #fff;
    transition: border-color .2s, background-color .2s;
    box-sizing: border-box;
}

.form-item .radio-group label:hover::before {
    border-color: var(--primary);
}

/* 选中态：外圈变蓝 */
.form-item .radio-group label:has(input[type="radio"]:checked)::before {
    border-color: var(--primary);
}

/* 选中态：内圆 */
.form-item .radio-group label::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0;
    transition: opacity .2s;
}

.form-item .radio-group label:has(input[type="radio"]:checked)::after {
    opacity: 1;
}

/* 表单分区标题 */
.form-subtitle {
    font-size: 14px;
    font-weight: 500;
    color: #303133;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #EBEEF5;
}

.form-extra {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #EBEEF5;
}

.form-extra .form-subtitle {
    margin-top: 16px;
    margin-bottom: 12px;
}

.form-extra .form-subtitle:first-child {
    margin-top: 0;
}

.form-inline-date {
    margin-top: 8px;
    max-width: 160px;
}

/* 业绩统计 - 常规后台 + 美观样式 */
#pageStats .card-title {
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 12px;
}

.stats-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 20px 0;
    line-height: 1.6;
}

#pageStats .toolbar {
    background: #fafbfc;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

#pageStats .toolbar label {
    font-size: 13px;
    color: var(--text-regular);
    margin-right: 6px;
}

#pageStats .toolbar input[type="date"] {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    margin-right: 16px;
}

#pageStats .toolbar input[type="date"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.15);
}

.stats-summary-wrap {
    margin-bottom: 28px;
}

.stats-summary-table {
    width: 100%;
    max-width: 560px;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-summary-table th,
.stats-summary-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

.stats-summary-table tr:last-child th,
.stats-summary-table tr:last-child td {
    border-bottom: none;
}

.stats-summary-table tr:hover td {
    background: #fafbfc;
}

.stats-summary-table th {
    width: 110px;
    font-weight: 500;
    color: var(--text-secondary);
    background: #f8f9fa;
    font-size: 13px;
}

.stats-summary-table td {
    color: var(--text-primary);
    font-weight: 500;
}

.stats-summary-table .num-profit {
    color: var(--success);
    font-weight: 600;
    font-size: 15px;
}

.stats-summary-table .num-loss {
    color: var(--danger);
    font-weight: 600;
    font-size: 15px;
}

.stats-month-wrap {
    margin-bottom: 28px;
}

.stats-month-wrap .card-title-sm {
    margin-bottom: 14px;
}

.stats-month-wrap .stats-table {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.stats-detail-wrap {
    margin-bottom: 0;
}

.stats-detail-wrap .table-wrap {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-title-sm {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
    display: inline-block;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: var(--card-bg);
}

.stats-table th,
.stats-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}

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

.stats-table tbody tr:hover {
    background: #fafbfc;
}

.stats-table th {
    font-weight: 600;
    color: var(--text-regular);
    background: #f8f9fa;
    font-size: 13px;
}

.stats-table td {
    color: var(--text-primary);
}

/* 业绩明细表：学费、利润列右对齐 */
#statsDetailTable th:nth-child(6),
#statsDetailTable th:nth-child(7),
#statsDetailTable td:nth-child(6),
#statsDetailTable td:nth-child(7) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* 按月汇总表：学费、利润列右对齐 */
.stats-month-wrap .stats-table th:nth-child(3),
.stats-month-wrap .stats-table th:nth-child(4),
.stats-month-wrap .stats-table td:nth-child(3),
.stats-month-wrap .stats-table td:nth-child(4) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stats-table .num-profit {
    color: var(--success);
    font-weight: 600;
}

.stats-table .num-loss {
    color: var(--danger);
    font-weight: 600;
}

.tag.tag-profit {
    background: var(--success-light);
    color: var(--success);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag.tag-loss {
    background: var(--danger-light);
    color: var(--danger);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.tag.tag-flat {
    background: #f4f4f5;
    color: var(--text-secondary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stats-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 48px 24px;
    font-size: 14px;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px dashed var(--border-light);
}

.stats-empty i {
    display: block;
    font-size: 32px;
    color: var(--border);
    margin-bottom: 12px;
}

.stats-empty p {
    margin: 0;
    line-height: 1.5;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.dash-card {
    background: var(--card-bg);
    border-radius: 4px;
    padding: 24px;
    border: 1px solid var(--border-light);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    transition: box-shadow .2s;
}

.dash-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, .1);
}

.dash-card .label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.dash-card .subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.4;
    opacity: 0.9;
}

.dash-card .value {
    font-size: 26px;
    font-weight: 600;
    color: var(--text-primary);
}

.dash-card .gender-stats {
    display: flex;
    justify-content: space-around;
    margin: 10px 0 12px 0;
    padding: 10px 0;
    border-top: 1px solid var(--border-light);
}

.dash-card .gender-stat-item {
    text-align: center;
}

.dash-card .gender-stat-value {
    display: block;
    font-size: 18px;
    font-weight: 600;
}

.dash-card .gender-stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.dash-card .gender-male-stat {
    color: #1a6dcc;
}

.dash-card .gender-female-stat {
    color: #dc3545;
}

/* 科目支付状态卡片 */
.subject-payment-card {
    margin-bottom: 20px;
}

.subject-payment-card .card-title {
    margin-bottom: 6px;
}

.subject-payment-card .card-title i {
    margin-right: 8px;
    color: var(--primary);
}

.subject-payment-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.subject-payment-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.subject-payment-item {
    background: var(--body-bg);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    transition: box-shadow .2s, border-color .2s;
}

.subject-payment-item:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.subject-payment-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.subject-payment-row {
    display: flex;
    gap: 10px;
}

.subject-payment-block {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 6px;
    min-width: 0;
}

.subject-payment-block--unpaid {
    background: var(--danger-light);
    color: var(--danger);
}

.subject-payment-block--paid {
    background: var(--success-light);
    color: var(--success);
}

.subject-payment-num {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.subject-payment-label {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: .9;
}

/* 学费监管结算状态卡片 */
.subject-settlement-card {
    margin-bottom: 20px;
}

.subject-settlement-card .card-title {
    margin-bottom: 6px;
}

.subject-settlement-card .card-title i {
    margin-right: 8px;
    color: var(--primary);
}

.subject-settlement-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.subject-settlement-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.subject-settlement-item {
    background: var(--body-bg);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-light);
    transition: box-shadow .2s, border-color .2s;
}

.subject-settlement-item:hover {
    border-color: var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.subject-settlement-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
    text-align: center;
}

.subject-settlement-row {
    display: flex;
    gap: 8px;
}

.subject-settlement-block {
    flex: 1;
    text-align: center;
    padding: 10px 6px;
    border-radius: 6px;
    min-width: 0;
}

.subject-settlement-block--unsettled {
    background: var(--danger-light);
    color: var(--danger);
}

.subject-settlement-block--company {
    background: var(--primary-light);
    color: var(--primary);
}

.subject-settlement-block--personal {
    background: var(--warning-light);
    color: var(--warning);
}

.subject-settlement-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.subject-settlement-label {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: .9;
}

/* 工作台 - 图表区域 */
.dashboard-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card .card-title {
    margin: 0;
}

.chart-body {
    padding: 20px;
    min-height: 260px;
}

.chart-body.echarts-box {
    width: 100%;
    height: 280px;
}

/* 柱状图 */
.bar-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    gap: 12px;
    width: 100%;
    padding: 0 8px;
}

.bar-chart-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80px;
}

.bar-chart-col {
    width: 100%;
    height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.bar-chart-bar {
    width: 28px;
    min-height: 4px;
    border-radius: 4px 4px 0 0;
    transition: height .4s ease;
}

.bar-chart-label {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-regular);
    text-align: center;
    line-height: 1.3;
}

.bar-chart-value {
    margin-top: 2px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* 饼图 */
.pie-chart-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
}

.pie-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pie-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    justify-content: center;
    font-size: 13px;
    color: var(--text-regular);
}

.pie-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pie-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.empty-tip {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
    font-size: 14px;
}

.cell-empty {
    color: var(--text-secondary);
    font-weight: 400;
}

.settlement-date-wrap,
.payment-date-wrap {
    display: none;
}

.settlement-date-wrap.active,
.payment-date-wrap.active {
    display: inline-block;
    margin-left: 8px;
}

.payment-with-date small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-top: 2px;
}

.expiration-card {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid var(--warning);
}

.expiration-card .card-title {
    color: #856404;
    margin-bottom: 16px;
}

.expiration-card .card-title i {
    margin-right: 8px;
    color: var(--warning);
}

.expiration-card .expiration-desc {
    font-size: 12px;
    color: #856404;
    opacity: 0.85;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.expiration-expired {
    font-size: 13px;
    color: var(--danger);
    margin-bottom: 10px;
}

.expiration-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(133, 100, 4, 0.15);
}

.expiration-subtitle {
    font-size: 14px;
    color: #856404;
    opacity: 0.9;
}

.expiration-count {
    font-size: 15px;
    font-weight: 600;
    color: #856404;
    opacity: 0.9;
}

.expiration-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 8px;
}

.expiration-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 6px;
    border-bottom: 1px solid rgba(133, 100, 4, 0.1);
    transition: background-color 0.3s, transform 0.2s;
}

.expiration-item:hover {
    background-color: rgba(255, 193, 7, 0.15);
    transform: translateX(2px);
}

.expiration-item:last-child {
    border-bottom: none;
}

.expiration-info {
    flex: 1;
}

.expiration-info .expiration-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 14px;
}

.expiration-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
}

.expiration-details span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.expiration-details .expiration-date {
    color: var(--warning);
    font-weight: 500;
}

.expiration-days {
    flex-shrink: 0;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.expiration-days.info {
    background: #ecf5ff;
    color: var(--primary);
}

.expiration-days.warning {
    background: var(--warning-light);
    color: #856404;
}

.expiration-days.danger {
    background: var(--danger-light);
    color: var(--danger);
}

.expiration-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.expiration-empty i {
    font-size: 48px;
    color: var(--success);
    margin-bottom: 12px;
    display: block;
}

.expiration-empty div {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-regular);
    margin-bottom: 6px;
}

.expiration-empty p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.profit-block {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.profit-block .form-subtitle {
    margin-bottom: 12px;
}

.profit-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.profit-row.total {
    font-weight: 600;
    font-size: 14px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
}

.profit-row .neg {
    color: var(--danger);
}

.profit-row.total span:last-child {
    color: var(--success);
}

@media (max-width: 992px) {
    .dashboard-charts {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-charts {
        gap: 16px;
        margin-bottom: 16px;
    }

    .chart-card .card-title {
        font-size: 14px;
    }

    .chart-body.echarts-box {
        height: 300px;
        min-height: 300px;
        padding: 12px 10px;
    }

    .sidebar {
        width: 64px;
    }

    .sidebar-toggle {
        display: none;
    }

    .sidebar nav {
        padding-bottom: 12px;
    }

    .main-wrap {
        margin-left: 64px;
    }

    .sidebar .logo span {
        display: none;
    }

    .sidebar .nav-item span {
        display: none;
    }

    .sidebar .nav-item i {
        margin-right: 0;
    }

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

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dash-card {
        padding: 16px;
    }

    .dash-card .value {
        font-size: 22px;
    }

    .subject-payment-stats,
    .subject-settlement-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .subject-payment-item,
    .subject-settlement-item {
        padding: 14px;
    }

    .subject-payment-num,
    .subject-settlement-num {
        font-size: 18px;
    }

    .header {
        padding: 0 12px;
        flex-wrap: wrap;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 14px 16px;
    }

    .toolbar .search {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        width: 100%;
    }

    .toolbar .search input {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        height: 40px;
    }

    .toolbar .search select {
        width: 100%;
        min-width: 0;
        height: 40px;
    }

    .toolbar .search .btn {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
    }

    .toolbar>.btn-primary {
        width: 100%;
        min-height: 44px;
        font-size: 14px;
    }

    .content {
        padding: 12px;
    }

    .card {
        padding: 16px;
    }
}

/* 学员列表表格 - 平板横向滚动 / 移动端卡片式 */
@media (max-width: 992px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 768px) {
    .table-responsive {
        overflow: visible;
    }

    #studentsTable {
        min-width: 100%;
        display: block;
    }

    #studentsTable th:last-child,
    #studentsTable td:last-child {
        position: relative;
        right: auto;
        box-shadow: none;
    }

    #studentsTable thead {
        display: none;
    }

    #studentsTable tbody,
    #studentsTable tr,
    #studentsTable td {
        display: block;
        width: 100%;
    }

    #studentsTable tr {
        margin-bottom: 16px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        overflow: hidden;
        background: var(--card-bg);
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    }

    #studentsTable td {
        padding: 10px 14px;
        border-bottom: 1px solid var(--border-light);
        text-align: left;
        position: relative;
        padding-left: 42%;
    }

    #studentsTable td:last-child {
        border-bottom: none;
    }

    #studentsTable td:before {
        content: attr(data-label);
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 500;
        color: var(--text-secondary);
        font-size: 12px;
        width: 28%;
    }

    #studentsTable td[data-label="备注"] {
        word-break: break-word;
        white-space: normal;
    }

    #studentsTable td[data-label="备注"]:before {
        top: 14px;
        transform: none;
    }

    #studentsTable td[data-label="操作"]:before {
        top: 22px;
        transform: none;
        width: 20px;
    }

    #studentsTable td[data-label="操作"] {
        padding-top: 14px;
        padding-bottom: 14px;
        padding-left: 54px;
    }

    #studentsTable td[data-label="操作"] .actions {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
    }

    #studentsTable td[data-label="操作"] .actions .btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        min-width: 0;
    }

    #studentsTable td.empty-tip {
        padding: 24px;
        text-align: center;
    }

    #studentsTable td.empty-tip:before {
        display: none;
    }

    /* 数据概览（最近学员）- H5 与列表同风格卡片式 */
    #dashboardTable {
        min-width: 100%;
        display: block;
    }

    #dashboardTable thead {
        display: none;
    }

    #dashboardTable tbody,
    #dashboardTable tr,
    #dashboardTable td {
        display: block;
        width: 100%;
    }

    #dashboardTable tr {
        margin-bottom: 16px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        overflow: hidden;
        background: var(--card-bg);
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    }

    #dashboardTable td {
        padding: 10px 14px;
        border-bottom: 1px solid var(--border-light);
        text-align: left;
        position: relative;
        padding-left: 42%;
    }

    #dashboardTable td:last-child {
        border-bottom: none;
    }

    #dashboardTable td:before {
        content: attr(data-label);
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 500;
        color: var(--text-secondary);
        font-size: 12px;
        width: 28%;
    }

    /* 教练员列表 - H5 卡片式 */
    #coachesTable {
        min-width: 100%;
        display: block;
    }

    #coachesTable thead {
        display: none;
    }

    #coachesTable tbody,
    #coachesTable tr,
    #coachesTable td {
        display: block;
        width: 100%;
    }

    #coachesTable tr {
        margin-bottom: 16px;
        border: 1px solid var(--border-light);
        border-radius: 8px;
        overflow: hidden;
        background: var(--card-bg);
        box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
    }

    #coachesTable td {
        padding: 10px 14px;
        border-bottom: 1px solid var(--border-light);
        text-align: left;
        position: relative;
        padding-left: 42%;
    }

    #coachesTable td:last-child {
        border-bottom: none;
    }

    #coachesTable td:before {
        content: attr(data-label);
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: 500;
        color: var(--text-secondary);
        font-size: 12px;
        width: 28%;
    }

    #coachesTable td[data-label="操作"]:before {
        top: 22px;
        transform: none;
    }

    #coachesTable td[data-label="操作"] {
        padding-top: 14px;
        padding-bottom: 14px;
        padding-left: 54px;
    }

    #coachesTable td[data-label="操作"] .actions {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 10px;
    }

    #coachesTable td[data-label="操作"] .actions .btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        min-width: 0;
    }

    #coachesTable td.empty-tip {
        padding: 24px;
        text-align: center;
    }

    #coachesTable td.empty-tip:before {
        display: none;
    }

    #statsDetailTable { min-width: 100%; display: block; }
    #statsDetailTable thead { display: none; }
    #statsDetailTable tbody, #statsDetailTable tr, #statsDetailTable td { display: block; width: 100%; }
    #statsDetailTable tr { margin-bottom: 16px; border: 1px solid var(--border-light); border-radius: 8px; overflow: hidden; background: var(--card-bg); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
    #statsDetailTable td { padding: 10px 14px; border-bottom: 1px solid var(--border-light); text-align: left; position: relative; padding-left: 38%; }
    #statsDetailTable td:last-child { border-bottom: none; }
    #statsDetailTable td:before { content: attr(data-label); position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-weight: 500; color: var(--text-secondary); font-size: 12px; width: 32%; }
}

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

    .sidebar {
        width: 56px;
    }

    .main-wrap {
        margin-left: 56px;
    }

    .breadcrumb {
        font-size: 13px;
    }

    .user span {
        display: none;
    }
}

/* 全局提示 Message - Element UI 风格 */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.toast-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.15);
    animation: toast-in 0.3s ease;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: auto;
}

.toast-message.success {
    background: var(--success);
}

.toast-message.error {
    background: var(--danger);
}

.toast-message.warning {
    background: var(--warning);
}

.toast-message.info {
    background: var(--info);
}

.toast-message i {
    font-size: 16px;
    opacity: 0.9;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}