/* 全局样式 */
:root {
    --primary-color: #007aff;
    --secondary-color: #5ac8fa;
    --success-color: #34c759;
    --danger-color: #ff3b30;
    --warning-color: #ffcc00;
    --background-color: #f2f2f7;
    --card-color: #ffffff;
    --text-color: #1c1c1e;
    --text-secondary: #8e8e93;
    --border-color: #e5e5ea;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* 隐藏localhost:8000显示的样式 */
.modal-content h3,
.modal-header h3,
.search-modal-header h3,
.search-results-container h3,
.search-form h3,
.modal-content > div:first-child,
.modal-header:first-child,
.modal-content:before,
.search-modal .modal-content:before,
.search-modal .modal-header:before,
.modal:before {
    position: relative !important;
    overflow: hidden !important;
}

.modal-content h3:before,
.modal-header h3:before {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: inherit !important;
    z-index: 10 !important;
}

/* 修复之前隐藏模态框标题的样式 */
.search-modal .modal-content:first-child, 
.search-modal .modal-content > *:first-child, 
.search-results-container > *:first-child, 
.modal-content > *:first-child {
    /* 移除这些样式，因为它们导致modal-header被隐藏 */
    /* visibility: hidden !important;
    position: relative !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    display: none !important; */
}

/* 确保标题显示 */
.modal-header.search-modal-header h3 {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
    margin: 0 !important;
    color: var(--primary-color) !important;
    font-size: 1.2rem !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 搜索框模态窗口强制样式 */
#search-modal.modal .modal-content {
    background: #fff !important;
}

.search-results-container,
.search-results-table {
    display: block !important;
}

.search-results-table {
    display: table !important;
}

.modal.show {
    display: flex !important;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    left: 0;
    width: 100%;
}

/* 头部样式 */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    margin-bottom: 20px;
    width: 100%;
}

header h1 {
    font-weight: 600;
    font-size: 24px;
    color: var(--primary-color);
}

.header-right {
    display: flex;
    align-items: center;
}

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

/* 登出按钮样式 */
.btn-logout {
    margin-left: 15px;
    padding: 5px 10px;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: #f1f1f1;
    color: var(--danger-color);
}

/* 导航栏样式 */
nav {
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow-x: auto;
    width: 100%;
}

nav ul {
    display: flex;
    list-style: none;
    min-width: max-content;
    justify-content: flex-start;
    width: 100%;
}

nav li {
    padding: 15px 18px;
    position: relative;
    white-space: nowrap;
    text-align: center;
}

nav li.active {
    background-color: rgba(0, 122, 255, 0.1);
}

nav li.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px 3px 0 0;
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav li.active a {
    color: var(--primary-color);
    font-weight: 600;
}

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

/* 主要内容区样式 */
main {
    width: 100%;
}

.dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 0 !important;
}

.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 !important;
    padding: 0 !important;
}

.card {
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin: 0 !important;
}

/* 解决margin问题的特定样式 */
.search-summary, 
.sales-summary {
    margin: 0 !important;
    width: 100%;
}

.search-results-wrapper {
    margin: 15px 0 0 0 !important;
    width: 100%;
}

.card-body {
    padding: 20px;
    margin: 0 !important;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    margin: 0 !important;
}

.card-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-left: 10px;
}

.card-header h3 {
    margin-right: auto;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    margin-left: 0 !important;
    font-size: 16px;
    color: var(--text-color);
}

.month-selector {
    padding: 4px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-color);
    background-color: var(--card-color);
    outline: none;
    cursor: pointer;
}

.month-selector:hover {
    border-color: var(--primary-color);
}

.month-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

/* 指标样式 */
.metric {
    display: flex;
    align-items: baseline;
    margin-bottom: 15px;
}

.value {
    font-size: 32px;
    font-weight: 700;
    margin-right: 10px;
}

.change {
    font-size: 14px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.positive {
    color: var(--success-color);
}

.negative {
    color: var(--danger-color);
}

/* 图表容器 */
.chart-container {
    height: 150px;
    position: relative;
}

/* 日历样式 */
.calendar-container {
    margin-top: 10px;
}

.calendar-container .card-body {
    padding: 10px;
}

#calendar {
    height: 500px;
}

/* 按钮样式 */
.btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

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

.modal.show {
    display: flex !important;
}

/* 当模态框打开时禁止body滚动 */
body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 95vw !important;
    max-width: 1400px !important;
    margin: 0 auto;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 20px;
}

/* 修复服务器信息显示问题 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    position: relative;
    overflow: hidden;
}

.modal-header:before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: #fff;
    z-index: -1;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
    position: relative;
    z-index: 2;
}

/* 只针对学员信息搜索模态框的标题进行替换 */
#studentSearchModal .modal-header h3 {
    content: "学员信息搜索";
    display: block;
    position: relative;
    z-index: 2;
}

/* 清除模态框内可能存在的服务器信息 */
.modal-content > *:first-child:not(.modal-header),
.modal-header > *:first-child:not(h3),
.search-results-container > *:first-child:not(div) {
    display: none !important;
}

.search-results-container {
    width: 100% !important;
    overflow-x: auto !important;
    margin: 15px 0 !important;
    position: relative;
}

.search-results-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: 13px;
}

.search-results-table th, 
.search-results-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results-table th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    color: #444;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #ddd;
}

.search-results-table tr:hover {
    background-color: rgba(0, 122, 255, 0.03);
    cursor: pointer;
}

.wider-modal {
    max-width: 1300px;
    width: 98%;
}

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

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.modal-body {
    margin-bottom: 20px;
}

.modal .close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
}

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

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

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

textarea {
    height: 100px;
    resize: vertical;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .card-container {
        grid-template-columns: 1fr;
    }
    
    nav ul {
        flex-wrap: wrap;
    }
    
    .metric {
        flex-direction: column;
    }
    
    .value {
        margin-bottom: 5px;
    }
    
    .refund-input {
        width: 100%;
        padding: 4px;
        font-size: 12px;
    }
    
    .save-refund-btn {
        padding: 4px 8px;
        font-size: 11px;
        display: block;
        width: 100%;
    }
}

/* 学员搜索区域样式 */
.student-search-container {
    margin-top: 20px;
}

.search-form {
    display: flex;
    margin-bottom: 10px;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.search-form input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.search-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: rgba(0, 122, 255, 0.05);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

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

.search-results {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 10px;
}

.search-results table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1200px;
}

.search-results th, 
.search-results td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.search-results th:first-child, 
.search-results td:first-child {
    background-color: rgba(0, 122, 255, 0.03);
    font-weight: 500;
    color: var(--primary-color);
    white-space: nowrap;
}

.search-results th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: var(--card-color);
    box-shadow: 0 1px 0 var(--border-color);
}

.search-results tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
    cursor: pointer;
}

.no-results {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* 加载状态 */
.loading {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #666;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    border: 2px solid #007aff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 错误提示样式 */
.error-message {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background-color: rgba(255, 59, 48, 0.1);
    border-radius: 8px;
    margin: 15px 0;
}

.error-icon {
    margin-right: 10px;
    font-size: 20px;
    color: var(--danger-color);
}

.error-text {
    color: var(--text-color);
    font-size: 14px;
    line-height: 1.5;
}

/* 遮罩层 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    cursor: pointer;
}

/* 学员详情模态框 */
.student-details-modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background-color: var(--card-color);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s ease;
    padding: 20px;
}

.student-details-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

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

.details-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.student-details-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.student-details-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.student-details-table td.label {
    width: 120px;
    color: var(--text-secondary);
    font-weight: 500;
}

.student-details-table td.section-header {
    padding: 20px 12px 10px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
    border-bottom: 2px solid var(--primary-color);
}

/* 搜索结果警告样式 */
.search-warning {
    background-color: rgba(255, 204, 0, 0.1);
    border-left: 4px solid var(--warning-color);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.warning-icon {
    margin-right: 10px;
    font-size: 16px;
}

.warning-text {
    color: var(--text-color);
    line-height: 1.4;
}

/* 搜索提示样式 */
.search-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.search-results-container {
    margin-top: 15px;
    max-height: 600px;
    overflow-y: auto;
    overflow-x: auto;
    display: block !important;
    margin-bottom: 15px;
    background-color: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 4px;
}

.search-results-table {
    width: 100%;
    min-width: 1200px;
    border-collapse: collapse;
    font-size: 14px;
    overflow-x: auto;
    white-space: nowrap;
    background-color: #ffffff;
    display: table !important;
}

.search-results-table th, 
.search-results-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-results-table th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    color: var(--text-color);
    position: sticky;
    top: 0;
    z-index: 1;
}

.search-results-table tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
    cursor: pointer;
}

.search-message {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* 学员详情模态框 */
.wider-modal {
    max-width: 900px;
    width: 90%;
}

.student-details-container {
    padding: 10px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #ffffff;
}

.details-table tr {
    border-bottom: 1px solid var(--border-color);
}

.details-table th {
    width: 140px;
    text-align: right;
    padding: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    vertical-align: top;
}

.details-table td {
    padding: 10px;
}

.details-section {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.details-section h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.reviews-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.reviews-table th,
.reviews-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.reviews-table th {
    background-color: rgba(0, 122, 255, 0.05);
}
.no-reviews {
    color: var(--text-secondary);
    font-style: italic;
}

/* 销售数据展示区域样式 */
.sales-data-card {
    margin-bottom: 25px;
}

.card-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-left: 10px;
}

.sales-summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.summary-item {
    flex: 1;
    padding: 15px;
    background-color: rgba(0, 122, 255, 0.05);
    border-radius: 8px;
    text-align: center;
}

.summary-item h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
    font-weight: 500;
}

.summary-item .value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 5px;
}

.summary-item .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.change-rate {
    font-weight: 600;
}

.change-rate.increase {
    color: var(--success-color);
}

.change-rate.decrease {
    color: var(--danger-color);
}

.sales-chart-wrapper {
    height: 400px;
    margin-top: 20px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.02);
}

.advisor-ranking h4 {
    font-size: 15px;
    margin-bottom: 10px;
    color: var(--text-color);
}

#advisor-ranking-list {
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: var(--text-secondary);
    color: white;
    font-weight: 600;
    font-size: 12px;
    margin-right: 12px;
}

.rank-badge.rank-1 {
    background-color: #FFD700; /* 金色 */
}

.rank-badge.rank-2 {
    background-color: #C0C0C0; /* 银色 */
}

.rank-badge.rank-3 {
    background-color: #CD7F32; /* 铜色 */
}

.advisor-info {
    flex: 1;
}

.advisor-name {
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 3px;
}

.advisor-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.empty-message, .loading {
    padding: 15px;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
}

/* 日历卡片样式 */
.calendar-card {
    margin-top: 20px;
}

/* 悬浮搜索按钮 */
.floating-search-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s ease;
}

.floating-search-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-icon {
    font-size: 24px;
    color: white;
}

/* 搜索模态框样式 */
.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.search-form input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 15px;
}

.search-tip {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.search-results-table {
    width: 100%;
    border-collapse: collapse;
    display: table;
}

.search-results-table th,
.search-results-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.search-results-table th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    color: var(--text-color);
}

.search-results-table tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
    cursor: pointer;
}

.search-message {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
}

/* 学员详情模态框 */
.wider-modal {
    max-width: 900px;
    width: 90%;
}

.student-details-container {
    padding: 10px;
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #ffffff;
}

.details-table tr {
    border-bottom: 1px solid var(--border-color);
}

.details-table th {
    width: 140px;
    text-align: right;
    padding: 10px;
    color: var(--text-secondary);
    font-weight: 600;
    vertical-align: top;
}

.details-table td {
    padding: 10px;
}

.details-section {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.details-section h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.reviews-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
}

.reviews-table th,
.reviews-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid var(--border-color);
}

.reviews-table th {
    background-color: rgba(0, 122, 255, 0.05);
}
.no-reviews {
    color: var(--text-secondary);
    font-style: italic;
}

/* 顾问排行榜相关样式 */
.advisor-ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.advisor-ranking-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--text-color);
}

.month-selector {
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
    color: var(--text-color);
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.month-selector:hover {
    border-color: var(--primary-color);
}

.month-selector:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.advisor-ranking-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.rank-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #f0f0f0;
    color: var(--text-color);
    font-size: 14px;
    font-weight: bold;
    margin-right: 10px;
}

.rank-badge.rank-1 {
    background-color: gold;
    color: #333;
}

.rank-badge.rank-2 {
    background-color: silver;
    color: #333;
}

.rank-badge.rank-3 {
    background-color: #cd7f32; /* 铜色 */
    color: white;
}

.advisor-info {
    flex: 1;
}

.advisor-name {
    font-weight: bold;
    margin-bottom: 4px;
    color: var(--text-color);
}

.advisor-stats {
    font-size: 12px;
    color: var(--text-secondary);
}

.advisor-stats .sales {
    margin-right: 10px;
    color: #ff6b6b;
    font-weight: bold;
}

.advisor-stats .count {
    color: #339af0;
}

.loading-indicator, .error-message {
    padding: 15px;
    text-align: center;
    border-radius: 8px;
    margin: 10px 0;
}

.loading-indicator {
    color: var(--text-secondary, #6c757d);
    background-color: #f8f9fa;
}

.error-message {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
}

/* 刷新按钮样式 */
.btn-refresh {
    margin-left: auto;
    font-size: 13px;
    padding: 4px 10px;
    background-color: #f8f9fa;
    color: #007bff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-refresh:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.btn-refresh:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-refresh i {
    margin-right: 5px;
    font-size: 14px;
}

/* 骨架屏加载样式 */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    height: 20px;
    border-radius: 4px;
    width: 100%;
}

.skeleton-ranking-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.skeleton-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    margin-right: 15px;
}

.skeleton-content {
    flex: 1;
}

.skeleton-line {
    height: 14px;
    margin-bottom: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 缓存信息样式 */
.cache-info {
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
    margin-bottom: 8px;
    padding-left: 2px;
    display: block;
}

/* 排行榜加载状态样式 */
.loading-indicator {
    text-align: center;
    padding: 15px;
    color: #666;
    font-size: 14px;
}

.loading-indicator::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 122, 255, 0.2);
    border-top-color: rgba(0, 122, 255, 0.8);
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
    animation: spin 0.8s linear infinite;
}

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

/* Toast提示样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 250px;
    max-width: 400px;
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(-20px);
    z-index: 9999;
    color: #fff;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

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

.toast-info {
    background-color: #007aff;
}

.toast-success {
    background-color: #34c759;
}

.toast-error {
    background-color: #ff3b30;
}

.toast-warning {
    background-color: #ff9500;
}

/* 日期输入框样式，确保readonly状态下依然看起来正常 */
input[type="date"][readonly] {
    background-color: #fff; /* 保持背景色为白色 */
    cursor: pointer; /* 鼠标指针为指针形状 */
    opacity: 1; /* 保持完全不透明 */
    color: inherit; /* 保持文字颜色正常 */
}

input[type="date"][readonly]:hover {
    border-color: var(--primary-color); /* 悬停时边框颜色 */
    box-shadow: 0 0 0 1px rgba(0, 122, 255, 0.2); /* 添加轻微阴影效果 */
}

/* 确保日期选择器图标依然可见 */
input[type="date"]::-webkit-calendar-picker-indicator {
    opacity: 1;
    cursor: pointer;
}

/* 确保禁用键盘输入的日期字段看起来依然可交互 */
input[type="date"][onkeydown="return false;"] {
    background-color: #fff;
    cursor: pointer;
}

/* 退费编辑相关样式 */
.refund-input {
    width: 90%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    text-align: right;
    background-color: #fff;
}

.refund-input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.1);
}

.save-refund-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-align: center;
}

.save-refund-btn::after {
    content: "退费";
}

.save-refund-btn:hover {
    background-color: #0062cc;
}

.save-refund-btn:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* 退费更新进度对话框样式 */
.progress-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-dialog.show {
    display: block;
    opacity: 1;
}

.progress-dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.progress-title {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 500;
    color: #333;
}

.progress-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

#refund-progress-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: none;
    transition: background-color 0.3s;
    margin: 0 auto;
}

#refund-progress-confirm:hover {
    background-color: #0069d9;
}

/* 媒体查询 - 移动端适配 */
@media screen and (max-width: 576px) {
    .progress-dialog-content {
        width: 95%;
        padding: 15px;
    }
    
    .progress-title {
        font-size: 1.3rem;
    }
}

/* 退费按钮样式 */
.refund-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.refund-btn:hover {
    background-color: #0062cc;
}

/* 退费表单对话框样式 */
#refund-form-dialog {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

#refund-form-dialog .modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#refund-form-dialog .modal-header {
    background-color: #f5f7fa;
    color: #333;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e0e0e0;
}

#refund-form-dialog .modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
    /* 解决重叠问题 */
    position: relative;
    z-index: 2;
}

/* 移除标题的before伪元素，防止文字重叠 */
#refund-form-dialog .modal-header h3:before {
    content: none !important;
}

#refund-form-dialog .close {
    color: #666;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

#refund-form-dialog .close:hover {
    color: #333;
}

#refund-form-dialog .modal-body {
    padding: 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

#refund-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 15px;
    gap: 15px;
}

#refund-form .form-group {
    flex: 1 1 calc(50% - 15px);
    display: flex;
    flex-direction: column;
}

#refund-form .form-group.full-width {
    flex: 1 1 100%;
}

#refund-form label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

#refund-form .required {
    color: #e74c3c;
}

#refund-form input[type="text"],
#refund-form input[type="number"],
#refund-form input[type="date"],
#refund-form select,
#refund-form textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 100%;
}

#refund-form input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

#refund-form textarea {
    resize: vertical;
    min-height: 60px;
}

#refund-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

#refund-form .btn {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s;
}

#refund-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

#refund-form .btn-primary:hover {
    background-color: #0069d9;
}

#refund-form .btn-secondary {
    background-color: #6c757d;
    color: white;
}

#refund-form .btn-secondary:hover {
    background-color: #5a6268;
}

/* 媒体查询 - 适配小屏幕设备 */
@media screen and (max-width: 768px) {
    #refund-form-dialog .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    #refund-form .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    #refund-form .form-group {
        flex: 1 1 100%;
    }
}

/* 修改金额列的对齐方式为右对齐 */
.search-results-table td:nth-child(8), /* 缴费列 */
.search-results-table td:nth-child(9) input, /* 退费输入框 */
.search-results-table td:nth-child(10) { /* 推荐费列 */
    /* 已由通用样式类替代，不再需要 */
}

/* 修改ID列和操作列的样式 */
.search-results-table th:first-child,
.search-results-table td:first-child {
    font-weight: 500;
    color: var(--primary-color);
    background-color: rgba(0, 122, 255, 0.02);
    /* 移除对齐样式，使用通用样式类 */
}

.search-results-table th:last-child,
.search-results-table td:last-child {
    /* 移除对齐样式，使用通用样式类 */
}

/* 表头样式 */
.search-results-table th {
    background-color: rgba(0, 122, 255, 0.05);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    color: #444;
    border-bottom: 2px solid #ddd;
}

/* 鼠标悬停效果 */
.search-results-table tr:hover {
    background-color: rgba(0, 122, 255, 0.03);
    cursor: pointer;
}

/* 确保表格行的高度一致 */
.search-results-table tr {
    height: 40px;
}

/* 整体搜索结果容器样式 */
.search-results-container {
    margin-top: 15px;
    overflow-x: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* 退费表单样式 */
#refund-form-dialog .modal-content {
    max-width: 800px;
}

#refund-form .form-row {
    display: flex;
    margin-bottom: 15px;
    gap: 20px;
}

#refund-form .form-group {
    flex: 1;
}

#refund-form .form-group.full-width {
    flex: 0 0 100%;
}

#refund-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

#refund-form input, 
#refund-form select, 
#refund-form textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

#refund-form input[readonly] {
    background-color: #f9f9f9;
    cursor: not-allowed;
}

#refund-form input[type="date"] {
    cursor: pointer;
    padding-right: 10px;
    background-image: none;
}

#refund-form .required {
    color: red;
}

#refund-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* 进度对话框样式 */
#refund-progress-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: none;
    transition: background-color 0.3s;
}

#refund-progress-confirm:hover {
    background-color: #0069d9;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 进度对话框样式 */
.progress-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s;
}

.progress-dialog.show {
    display: block;
    opacity: 1;
}

.progress-dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.progress-title {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 500;
    color: #333;
}

.progress-message {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

#refund-progress-confirm {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    display: none;
    transition: background-color 0.3s;
    margin: 0 auto;
}

#refund-progress-confirm:hover {
    background-color: #0069d9;
}

/* 隐藏localhost显示信息 */
.search-results-container::before {
    display: none !important;
}

/* 移除任何可能的服务器信息显示 */
.search-modal-header, 
.search-modal-body,
.search-results-container {
    position: relative;
}

.search-modal-header::before, 
.search-modal-body::before,
.search-results-container::before,
.search-results-container > div::before {
    display: none !important;
    content: none !important;
}

/* 确保搜索容器不显示任何自动生成的前置内容 */
#search-results-container::before,
#search-modal::before,
#search-modal .modal-content::before,
#search-modal .modal-body::before {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
}

/* 防止任何服务器信息在页面顶部显示 */
body::before, 
html::before,
main::before,
.container::before,
.modal::before {
    display: none !important;
    content: none !important;
}

/* 确保搜索输入框上方不会显示服务器信息 */
.search-form::before {
    display: none !important;
}

/* 修复学员详情模态框标题显示 */
#student-details-modal .modal-header h3 {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 2 !important;
    margin: 0 !important;
    color: var(--primary-color) !important;
    font-size: 1.2rem !important;
}

/* 只针对学员信息搜索模态框的标题进行替换 */
#studentSearchModal .modal-header h3 {
    content: "学员信息搜索";
    display: block;
    position: relative;
    z-index: 2;
}

/* 删除针对特定模态框标题内容设置 */
#student-details-modal .modal-header h3:before,
#search-modal .modal-header h3:before {
    content: none !important;
}

/* 娜娜特殊显示，隐藏提成、旧微信管理费和工资字段 */
tr[data-advisor="娜娜"] td.commission-field,
tr[data-advisor="娜娜"] td.wechat-fee-field,
tr[data-advisor="娜娜"] td.salary-field {
    color: transparent !important;
    position: relative !important;
}

tr[data-advisor="娜娜"] td.commission-field::before,
tr[data-advisor="娜娜"] td.wechat-fee-field::before,
tr[data-advisor="娜娜"] td.salary-field::before {
    content: "-";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-color);
    font-weight: normal;
}

/* 详情模态框样式 */
.detail-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.detail-modal.show {
    opacity: 1;
    visibility: visible;
}

.detail-modal .modal-content {
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.detail-modal .modal-header {
    padding: 15px 20px;
    background-color: #ffffff;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.detail-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.detail-modal .close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s;
}

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

.detail-modal .modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
}

.commission-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    background-color: #f5f8ff;
    padding: 15px;
    border-radius: 6px;
}

.summary-item {
    flex: 1;
    min-width: 200px;
}

.summary-item .label {
    font-weight: 500;
    color: #555;
}

.summary-item .value {
    font-weight: 600;
    font-size: 18px;
    color: #333;
    margin-left: 5px;
}

.summary-item .value.highlight {
    color: #4a6fdc;
}

.commission-rules {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.commission-rules h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.commission-rules ul {
    margin: 0;
    padding-left: 20px;
}

.commission-rules li {
    margin-bottom: 5px;
}

.commission-details {
    overflow-x: auto;
}

.commission-detail-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.commission-detail-table th,
.commission-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e0e0e0;
}

.commission-detail-table th {
    background-color: #f5f5f5;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
    z-index: 1;
}

.commission-detail-table tbody tr:hover {
    background-color: #f9f9f9;
}

.commission-detail-table tfoot tr {
    font-weight: 600;
    background-color: #f0f4ff;
}

.commission-detail-table td.amount {
    text-align: right;
}

.commission-detail-table td.total-label {
    text-align: right;
}

@media (max-width: 768px) {
    .commission-summary {
        flex-direction: column;
        gap: 10px;
    }
    
    .summary-item {
        min-width: 100%;
    }
    
    .commission-detail-table {
        font-size: 14px;
    }
    
    .commission-detail-table th,
    .commission-detail-table td {
        padding: 8px;
    }
}

/* 学员搜索页专用规则 - 防止边距叠加 */
.student-search-page .container {
    display: block;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    max-width: 1280px;
}

.student-search-page .dashboard {
    display: block;
    overflow: hidden; /* 创建BFC，阻止边距叠加 */
    width: 100%;
    margin: 0;
    padding: 0;
}

.student-search-page .card-container {
    display: block; 
    margin: 0;
    padding: 0;
    width: 100%;
    overflow: hidden; /* 创建BFC，阻止边距叠加 */
}

.student-search-page .card {
    margin: 0;
    width: 100%;
}

.student-search-page .card-header,
.student-search-page .card-body {
    margin: 0;
}

/* 添加统一的表格对齐样式类 */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

/* 表格通用对齐规则 - 根据内容类型设置默认对齐方式 */
/* ID、名称类 - 左对齐 */
.table-id,
.table-name,
.table-text,
.table-channel,
.table-partner,
.table-course,
.table-admin,
.table-advisor {
    text-align: left !important;
}

/* 日期、状态类 - 居中对齐 */
.table-date,
.table-status,
.table-center {
    text-align: center !important;
}

/* 金额、数字类 - 右对齐 */
.table-amount,
.table-number,
.table-fee,
.table-commission,
.table-refund {
    text-align: right !important;
}

/* 操作按钮列 - 居中对齐 */
.table-action {
    text-align: center !important;
}

/* 通用表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    background-color: transparent;
    font-size: 0.9rem;
}

/* 统一表格对齐样式类 */
/* 基于内容类型的对齐规则 */
.table-name,
th.table-name,
td.table-name {
    text-align: left; /* ID、名称等标识信息：左对齐 */
}

.table-fee,
.table-commission,
.table-refund,
th.table-fee,
td.table-fee,
th.table-commission,
td.table-commission,
th.table-refund,
td.table-refund {
    text-align: right; /* 金额、数字等数值信息：右对齐 */
}

.table-number,
.table-date,
.table-status,
.table-action,
th.table-number,
td.table-number,
th.table-date,
td.table-date,
th.table-status,
td.table-status,
th.table-action,
td.table-action {
    text-align: center; /* 日期、状态、操作按钮等：居中对齐 */
}

/* 表格头部和单元格通用样式 */
.table th,
.table td {
    padding: 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #dee2e6;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    background-color: #f8f9fa;
}

/* 表格行悬停效果 */
.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

/* 条纹表格 */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* 紧凑表格 */
.table-sm th,
.table-sm td {
    padding: 0.3rem;
}

/* 固定表格宽度布局，尤其适用于有很多数据的表格 */
.table-fixed {
    table-layout: fixed;
}

/* 带边框表格 */
.table-bordered {
    border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
    border: 1px solid #dee2e6;
}

/* 表格内文本溢出处理 */
.table-fixed td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 滚动表格容器 */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 删除学员详情页面相关样式 */
.review-records {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.details-section {
    margin-bottom: 20px;
}

.details-section h4 {
    font-size: 16px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.reviews-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
}

.reviews-table th, 
.reviews-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.reviews-table th {
    background-color: #f5f8ff;
    font-weight: 500;
    color: var(--text-color);
}

.reviews-table td {
    color: var(--text-secondary);
}

/* 学员详情基本信息表格样式 */
.details-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.details-table th, 
.details-table td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color-light);
}

.details-table th {
    font-weight: 500;
    color: var(--text-secondary);
    width: 20%;
}

.details-table td {
    color: var(--text-color);
    width: 30%;
}

/* 在详情模态框中应用的样式 */
#student-details-modal .modal-body {
    padding: 20px;
}

#student-details-container {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 5px;
}

#student-details-container::-webkit-scrollbar {
    width: 6px;
}

#student-details-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#student-details-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#student-details-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 编辑姓名按钮样式 */
.edit-name-btn {
    background: transparent;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 14px;
    margin-left: 5px;
    opacity: 0;
    padding: 0;
    transition: all 0.2s ease;
}

.table-name {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.table-name:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.table-name:hover .edit-name-btn {
    opacity: 1;
}

.student-name {
    display: inline-block;
    padding: 2px 0;
    border-bottom: 1px dashed transparent;
    transition: all 0.2s ease;
}

.table-name:hover .student-name {
    border-bottom-color: var(--primary-color);
}

.edit-name-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* 编辑姓名表单样式 */
.edit-name-form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.name-input {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    flex-grow: 1;
    font-size: 14px;
    height: 28px;
    padding: 4px 8px;
    width: calc(100% - 60px);
}

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

.edit-actions {
    display: flex;
    margin-left: 5px;
}

.save-name-btn,
.cancel-edit-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 14px;
    margin-left: 2px;
    padding: 2px 5px;
    transition: all 0.2s ease;
}

.save-name-btn {
    color: var(--success-color);
}

.cancel-edit-btn {
    color: var(--danger-color);
}

.save-name-btn:hover,
.cancel-edit-btn:hover {
    transform: scale(1.2);
}

/* 保存中状态样式 */
.saving {
    color: var(--text-secondary);
    font-style: italic;
}

/* 消息提示样式 */
.toast {
    align-items: center;
    background-color: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    min-width: 200px;
    opacity: 0;
    padding: 12px 15px;
    position: fixed;
    right: 20px;
    top: 20px;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: slideIn 0.3s forwards;
}

.toast-icon {
    font-size: 18px;
    margin-right: 10px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

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

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

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

.toast-error .toast-icon {
    color: var(--danger-color);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-20px);
}

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

/* 确认对话框样式 */
.confirm-dialog {
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    height: 100%;
    justify-content: center;
    left: 0;
    opacity: 0;
    position: fixed;
    top: 0;
    transition: opacity 0.3s ease;
    width: 100%;
    z-index: 2000;
}

.confirm-dialog.show {
    opacity: 1;
}

.confirm-dialog-content {
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
    width: 400px;
}

.confirm-dialog.show .confirm-dialog-content {
    opacity: 1;
    transform: translateY(0);
}

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

.confirm-dialog-header h3 {
    color: var(--primary-color);
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.confirm-dialog-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 22px;
    margin: -15px -10px -15px 0;
    padding: 10px;
    transition: color 0.2s;
}

.confirm-dialog-close:hover {
    color: var(--primary-color);
}

.confirm-dialog-body {
    padding: 20px;
}

.confirm-dialog-body p {
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.confirm-dialog-footer {
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    padding: 15px 20px;
}

.confirm-dialog-footer button {
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    height: 34px;
    margin-left: 10px;
    min-width: 80px;
    padding: 0 16px;
    transition: all 0.2s;
}

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

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

.btn-cancel {
    background-color: #f1f1f1;
    color: var(--text-primary);
}

.btn-cancel:hover {
    background-color: #e5e5e5;
}

@media (max-width: 576px) {
    .confirm-dialog-content {
        max-width: 95%;
        width: 320px;
    }
    
    .confirm-dialog-header {
        padding: 12px 15px;
    }
    
    .confirm-dialog-body {
        padding: 15px;
    }
    
    .confirm-dialog-footer {
        padding: 12px 15px;
    }
}

/* 确认对话框样式更新 */
.confirm-dialog .loading-spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.confirm-dialog .save-status,
.confirm-dialog .success-status {
    text-align: center;
    padding: 15px 0;
}

.confirm-dialog .success-icon {
    background-color: var(--success-color);
    border-radius: 50%;
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    height: 40px;
    width: 40px;
    margin-bottom: 15px;
}

.confirm-dialog .status-message {
    color: var(--text-primary);
    font-size: 16px;
    margin: 0;
}

/* 删除btn-ok样式，现在使用btn-confirm */
/* 
.confirm-dialog .btn-ok {
    background-color: var(--success-color);
    color: white;
}

.confirm-dialog .btn-ok:hover {
    background-color: var(--success-hover, #2c9e5c);
}
*/

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
} 

/* 新增群模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 15px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.modal-body {
    padding: 20px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

.form-group {
    margin-bottom: 15px;
}

.form-control {
    display: block;
    width: 100%;
    padding: 8px 12px;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 8px 12px;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 4px;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

.mt-3 {
    margin-top: 1rem;
}

.text-right {
    text-align: right;
}

/* 群数据展示样式 */
.tab-content {
    margin-top: 15px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

#add-group-btn {
    margin-top: 15px;
}

/* 编辑按钮通用样式 */
.edit-btn {
    margin-left: 10px;
    padding: 2px 8px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    display: inline-block;
    vertical-align: middle;
    opacity: 0;
    transition: opacity 0.3s ease, background-color 0.3s;
}

.edit-btn:hover {
    background-color: #0056b3;
}

/* 当单元格被悬停时显示编辑按钮 - 这仅适用于表格中的按钮 */
.search-results-table td:hover .edit-btn,
.search-results-table th:hover .edit-btn {
    opacity: 1;
}

/* 在模态框内的编辑按钮始终显示 */
#student-details-modal .edit-btn,
.student-details-modal .edit-btn,
.modal .name-cell .edit-btn,
.modal .birthday-cell .edit-btn,
.modal-content .edit-btn {
    opacity: 1 !important;
}

/* 页面加载指示器样式 */
.page-loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.3s ease;
}

.page-loading-indicator.fade-out {
    opacity: 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 16px;
    color: #333;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 网站备案号 Footer 样式 */
.site-footer {
    width: 100%;
    padding: 15px 0;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
    margin-top: 20px;
}

.footer-content {
    font-size: 14px;
    color: #6c757d;
}

.beian-link {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s ease;
}

.beian-link:hover {
    color: #007bff;
    text-decoration: underline;
}

/* 网站备案号样式 */
.site-footer {
    margin-top: 30px;
    padding: 10px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    width: 100%;
}

.footer-content {
    padding: 5px 0;
}

.beian-link {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

.beian-link:hover {
    color: var(--primary-color);
}