/* 顾问管理页面样式 */

/* 顾问卡片样式 */
.advisor-dashboard {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.advisor-card {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 8px;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.advisor-stats {
    display: flex;
    justify-content: space-evenly;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
}

/* 表格容器样式 */
.advisor-data-container {
    margin-top: 20px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

#search-advisor-btn {
    padding: 6px 12px;
    font-size: 13px;
}

.select-control {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-color);
    font-size: 13px;
    color: var(--text-color);
    flex: 1;
    max-width: 200px;
}

.table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    min-width: 1200px;
}

.table-container th,
.table-container td {
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-container 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);
}

.table-container tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

.no-data {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

/* 上传说明弹窗样式 */
.upload-instructions {
    font-size: 14px;
    line-height: 1.6;
}

.upload-instructions ul {
    margin: 15px 0;
    padding-left: 20px;
}

.template-img {
    max-width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin: 15px 0;
}

.button-group {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.secondary-btn {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.secondary-btn:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* 响应式调整 */
.card-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .card-container {
        flex-direction: row;
        gap: 1.5rem;
    }
    
    .advisor-card {
        width: 100%;
    }
}

@media (max-width: 767px) {
    .advisor-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .filter-controls {
        flex-direction: column;
    }
}

/* 提成规则样式 */
.commission-rules {
    background-color: #f8f9fa;
    border-left: 4px solid #67c23a;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.commission-rules h4 {
    margin: 0 0 8px 0;
    color: #303133;
    font-size: 16px;
}

.commission-rules ul {
    margin: 0;
    padding-left: 20px;
}

.commission-rules li {
    margin-bottom: 5px;
    color: #606266;
    font-size: 14px;
}

.commission-rules strong {
    color: #303133;
}

/* 历史提成查询样式 */
.history-commission-section {
    margin-top: 20px;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.month-selector {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background-color: var(--card-color);
    font-size: 13px;
    color: var(--text-color);
    min-width: 150px;
}

.search-btn, .export-btn {
    padding: 6px 12px;
    font-size: 13px;
}

.search-btn {
    background-color: var(--primary-color);
}

.export-btn {
    background-color: #34c759;
}

.export-btn:hover {
    background-color: #2da848;
}

.commission-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.commission-table th,
.commission-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.commission-table th {
    background-color: rgba(0, 122, 255, 0.08);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.commission-table tbody tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* 调整列对齐 */
.commission-table th:nth-child(1),
.commission-table td:nth-child(1),
.commission-table th:nth-child(2),
.commission-table td:nth-child(2) {
    text-align: left;
}

.commission-table th:nth-child(3),
.commission-table td:nth-child(3),
.commission-table th:nth-child(4),
.commission-table td:nth-child(4),
.commission-table th:nth-child(5),
.commission-table td:nth-child(5) {
    text-align: right;
}

.commission-table th:nth-child(6),
.commission-table td:nth-child(6) {
    text-align: center;
}

.sortable {
    cursor: pointer;
    position: relative;
}

.sort-icon {
    font-size: 12px;
    margin-left: 5px;
    position: relative;
    top: -1px;
}

.detail-btn {
    padding: 4px 10px;
    font-size: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.detail-btn:hover {
    background-color: #0062cc;
}

.no-data-message {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-style: italic;
    background-color: rgba(0,0,0,0.02);
    border-radius: 6px;
    margin-top: 15px;
    display: none;
}

.history-results {
    overflow-x: auto;
    max-height: 300px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.rule-item {
    margin-bottom: 20px;
}

.rule-item h4 {
    color: var(--primary-color);
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.rule-item ul {
    padding-left: 20px;
    margin-top: 5px;
}

.rule-item li {
    margin-bottom: 8px;
    line-height: 1.4;
    font-size: 14px;
}

.rule-item strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* 明细弹窗和加载弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active, .modal.show {
    display: flex !important;
    opacity: 1 !important;
}

.modal-content {
    background-color: var(--card-color);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 20px;
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    overflow: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.modal.active .modal-content, .modal.show .modal-content {
    transform: translateY(0);
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
}

.close:hover {
    color: var(--text-color);
}

.detail-content {
    width: 90%;
    max-width: 1200px;
}

.loading-content {
    width: 300px;
    text-align: center;
    padding: 30px;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 122, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s infinite linear;
    margin-bottom: 15px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-message {
    color: var(--text-color);
    font-size: 16px;
}

.detail-summary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    background-color: rgba(0, 122, 255, 0.05);
    border-radius: 6px;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.summary-label {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.summary-value {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-color);
}

.summary-value.highlight {
    color: var(--primary-color);
}

.detail-table-container {
    margin-top: 20px;
    overflow-x: auto;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.detail-table th,
.detail-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.detail-table th {
    background-color: rgba(0, 122, 255, 0.08);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.detail-table tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

.detail-table .right-align {
    text-align: right;
}

.detail-table .center-align {
    text-align: center;
}

.detail-table .highlight {
    color: var(--primary-color);
    font-weight: 600;
}

.detail-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
}

.detail-content h2 {
    margin-top: 0;
    color: var(--primary-color);
    font-size: 20px;
    padding-right: 30px;
}

.detail-content h3 {
    margin-top: 25px;
    font-size: 16px;
    color: var(--text-color);
}

/* 确保移动设备上的提成明细也能正常显示 */
@media (max-width: 767px) {
    .detail-content {
        width: 95%;
        padding: 15px;
    }
    
    .detail-summary {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detail-table th,
    .detail-table td {
        padding: 8px 5px;
        font-size: 12px;
    }
}

/* 提成明细表格样式 */
.commission-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.commission-detail-table th,
.commission-detail-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

.commission-detail-table th {
    background-color: #f5f7fa;
    color: #606266;
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.commission-detail-table td.amount,
.commission-detail-table th:nth-child(4),
.commission-detail-table th:nth-child(5),
.commission-detail-table th:nth-child(7),
.commission-detail-table th:nth-child(8) {
    text-align: right;
    white-space: nowrap;
}

.commission-detail-table tbody tr:hover {
    background-color: #f5f7fa;
}

.commission-detail-table tfoot {
    font-weight: bold;
    background-color: #eef1f6;
}

.commission-detail-table tfoot .total-label {
    text-align: right;
    font-weight: 600;
}

.commission-table-container {
    margin-top: 20px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

/* 提成明细弹窗摘要信息 */
.commission-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    background-color: #f5f7fa;
    padding: 15px;
    border-radius: 4px;
    border-left: 4px solid #409EFF;
}

.commission-summary .summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.commission-summary .label {
    font-size: 14px;
    color: #606266;
    margin-bottom: 5px;
}

.commission-summary .value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.commission-summary .value.highlight {
    color: #F56C6C;
}

/* 详情弹窗其他样式优化 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #303133;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #909399;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: #F56C6C;
}

/* 学员详细列表查询样式 */
.student-list-section {
    margin-top: 20px;
}

.student-list-container {
    overflow-x: auto;
    max-height: 500px;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.student-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.student-table th,
.student-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.student-table th {
    background-color: rgba(0, 122, 255, 0.08);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
}

.student-table tbody tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* 调整特定列的对齐方式 */
.student-table th:nth-child(4),
.student-table td:nth-child(4) {
    text-align: right; /* 缴费金额右对齐 */
}

.student-table th:nth-child(3),
.student-table td:nth-child(3) {
    text-align: center; /* 签单日期居中 */
}

/* 筛选控件间距和样式优化 */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.filter-controls .select-control {
    min-width: 150px;
    max-width: 200px;
}

/* 空数据状态显示 */
.loading-state {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
}

.loading-state .loading-spinner {
    margin-right: 10px;
    margin-bottom: 0;
}

/* 数据分页器样式 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 15px;
}

.pagination button {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    background-color: var(--card-color);
    border-radius: 4px;
    cursor: pointer;
}

.pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination button:hover:not(.active) {
    background-color: rgba(0, 122, 255, 0.1);
}

.form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    appearance: none;
}

.form-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col-md-4 {
    flex: 0 0 auto;
    width: 33.33333333%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-end {
    align-items: flex-end;
}

.btn-primary {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    cursor: pointer;
}

.btn-success {
    color: #fff;
    background-color: #198754;
    border-color: #198754;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    text-decoration: none;
    cursor: pointer;
}

.me-2 {
    margin-right: 0.5rem;
}

.btn:hover {
    opacity: 0.9;
}

.table-responsive {
    overflow-x: auto;
    margin-top: 10px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    vertical-align: top;
    border-color: #dee2e6;
}

.table > thead {
    vertical-align: bottom;
    background-color: #f8f9fa;
}

.table > tbody {
    vertical-align: inherit;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.05);
}

.table-hover > tbody > tr:hover {
    background-color: rgba(0, 0, 0, 0.075);
}

.text-center {
    text-align: center;
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: .75s linear infinite spinner-border;
}

@keyframes spinner-border {
    to { transform: rotate(360deg); }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 添加刷新按钮和数据刷新时间的样式 */
.refresh-data-container {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.refresh-btn, .add-student-btn {
    display: flex;
    align-items: center;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer !important;
    transition: background-color 0.2s ease;
    pointer-events: auto !important;
}

.refresh-btn {
    background-color: #007aff;
}

.refresh-btn svg, .add-student-btn svg {
    margin-right: 6px;
}

.refresh-btn:hover, .add-student-btn:hover {
    background-color: #0056b3;
}

.refresh-btn.loading {
    background-color: #6c757d;
    pointer-events: none;
}

.refresh-btn.loading svg {
    animation: spin 1s linear infinite;
}

.add-student-btn {
    background-color: #28a745;
    margin-left: 10px;
}

.add-student-btn:hover {
    background-color: #218838;
}

.last-update-time {
    margin-left: 12px;
    font-size: 12px;
    color: #6c757d;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error-state {
    color: #dc3545;
    font-weight: bold;
}

/* 新增学员模态框样式 */
.add-student-modal {
    width: 700px;
    max-width: 90%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.form-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 122, 255, 0.2);
}

.required {
    color: #dc3545;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #0056b3;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .add-student-modal {
        width: 95%;
    }
    
    .refresh-data-container {
        flex-wrap: wrap;
    }
    
    .last-update-time {
        margin-left: 0;
        margin-top: 10px;
        width: 100%;
        text-align: right;
    }
}

/* 顾问选择器样式 */
.advisor-selector-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.advisor-selector {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background-color: #f8f8f8;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    min-width: 120px;
}

.advisor-selector:hover {
    border-color: #007bff;
}

.advisor-selector:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

/* 学员列表查询区域样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.table > thead {
    vertical-align: bottom;
}

.table > thead > tr > th {
    padding: 12px 15px;
    text-align: left;
    background-color: rgba(0, 122, 255, 0.08);
    font-weight: 600;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

.table > tbody > tr > td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover > tbody > tr:hover {
    background-color: rgba(0, 122, 255, 0.05);
}

/* 学员列表查询区域的卡片标题样式 */
.card .card-header h5 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* 学员列表查询区域的按钮样式 */
#queryButton, #exportButton {
    padding: 6px 12px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#queryButton {
    background-color: var(--primary-color);
    color: white;
}

#queryButton:hover {
    background-color: #0062cc;
}

#exportButton {
    background-color: #34c759;
    color: white;
}

#exportButton:hover {
    background-color: #2da848;
}

/* 统计信息区域样式 */
#statisticsInfo {
    background-color: rgba(0, 122, 255, 0.05);
    border-radius: 6px;
    padding: 12px 15px;
    margin-top: 15px;
    border: 1px solid rgba(0, 122, 255, 0.1);
}

#statisticsInfo h5 {
    font-size: 14px;
    margin: 0;
    color: var(--text-color);
}

#totalStudents, #totalPayment {
    font-weight: 600;
}

/* 日期输入框样式 */
input[type="date"] {
    cursor: pointer;
    background-color: #fff;
    background-image: none;
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 10px;
}

input[type="date"]:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* 临时学员列表样式 */
.temp-students-container {
    margin-top: 20px;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.temp-students-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.temp-students-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.temp-students-actions {
    display: flex;
    gap: 10px;
}

.temp-students-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.temp-student-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.temp-student-item:last-child {
    border-bottom: none;
}

.temp-student-item:hover {
    background-color: #f0f0f0;
}

.student-info {
    flex: 1;
}

.student-info h5 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.student-info p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.student-actions {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete {
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-edit {
    background-color: #e7f3ff;
    color: #0d6efd;
}

.btn-edit:hover {
    background-color: #d0e7ff;
}

.btn-delete {
    background-color: #f8d7da;
    color: #dc3545;
}

.btn-delete:hover {
    background-color: #f5c2c7;
}

/* 确认对话框样式 */
.confirm-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.confirm-dialog.show {
    display: flex;
}

.confirm-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 450px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.confirm-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.confirm-message {
    margin-bottom: 20px;
    color: #555;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 提示消息样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background-color: #333;
    color: white;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.3s, transform 0.3s;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success {
    background-color: #28a745;
}

.toast.error {
    background-color: #dc3545;
}

.toast.warning {
    background-color: #ffc107;
    color: #333;
}

.toast.info {
    background-color: #17a2b8;
}

/* 加载中动画 */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 响应式调整 */
@media (max-width: 768px) {
    .temp-students-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .temp-students-actions {
        width: 100%;
    }
    
    .temp-student-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .student-actions {
        margin-top: 10px;
        width: 100%;
        justify-content: flex-end;
    }
    
    .confirm-content {
        width: 95%;
    }
}

/* 上传进度对话框 */
.progress-dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    justify-content: center;
    align-items: center;
}

.progress-dialog.show {
    display: flex;
}

.progress-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.progress-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.progress-message {
    margin-bottom: 25px;
    color: #555;
    line-height: 1.5;
}

.progress-bar-container {
    width: 100%;
    height: 12px;
    background-color: #f0f0f0;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    width: 0;
    background-color: #007bff;
    border-radius: 6px;
    transition: width 0.3s ease;
}

.progress-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.progress-actions button {
    min-width: 100px;
}

/* 成功图标动画 */
.success-icon {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #28a745;
    margin-bottom: 20px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s ease;
}

.success-icon.show {
    opacity: 1;
    transform: scale(1);
}

.success-icon:after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 28px;
    height: 14px;
    border-left: 4px solid white;
    border-bottom: 4px solid white;
    transform: translate(-50%, -60%) rotate(-45deg);
}

.loading-circle {
    display: inline-block;
    width: 60px;
    height: 60px;
    border: 4px solid rgba(0, 123, 255, 0.3);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* 进度对话框样式 */
#progress-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

#progress-dialog.show {
    opacity: 1;
    visibility: visible;
}

.progress-dialog-content {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#progress-dialog .progress-icon {
    margin-bottom: 15px;
    position: relative;
    width: 60px;
    height: 60px;
}

#loading-icon {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

#success-icon {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    display: none;
    opacity: 0;
    transition: opacity 0.5s;
}

#success-icon.show {
    opacity: 1;
}

#success-icon::before,
#success-icon::after {
    content: '';
    position: absolute;
    background-color: #28a745;
}

#success-icon::before {
    width: 8px;
    height: 30px;
    transform: rotate(45deg);
    left: 28px;
    top: 14px;
}

#success-icon::after {
    width: 38px;
    height: 8px;
    transform: rotate(135deg);
    left: 8px;
    top: 30px;
}

.progress-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.progress-message {
    color: #666;
    margin-bottom: 20px;
}

.progress-status {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 10px;
    width: 100%;
    text-align: left;
}

.progress-bar-container {
    width: 100%;
    height: 10px;
    background-color: #f3f3f3;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background-color: #007bff;
    width: 0%;
    transition: width 0.2s;
}

#progress-confirm {
    background-color: #007bff;
    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;
}

#progress-confirm:hover {
    background-color: #0069d9;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 媒体查询 - 移动端适配 */
@media screen and (max-width: 576px) {
    .progress-dialog-content {
        width: 95%;
        padding: 15px;
    }
    
    .progress-title {
        font-size: 1.3rem;
    }
}

/* 解决模态框标题重叠问题 */
#addStudentModal::before,
#addStudentModal > *::before {
    display: none !important;
    content: none !important;
}

#addStudentModal .modal-header {
    position: relative;
    z-index: 10;
    background-color: white;
    overflow: visible;
    padding-top: 15px;
    padding-bottom: 15px;
}

#addStudentModal .modal-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: white;
    z-index: -1;
}

#addStudentModal .modal-header h3 {
    position: relative;
    z-index: 10;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: var(--primary-color) !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#addStudentModal .modal-header h3::before {
    content: "新增学员信息" !important;
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: inherit;
    background-color: white;
    z-index: 1;
}

/* 防止学员信息搜索文本干扰 */
#addStudentModal *::before {
    content: normal !important;
}

body.modal-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    padding-right: 15px; /* 防止滚动条消失导致的页面抖动 */
}

/* 确保右上角关闭按钮位置正确 */
#addStudentModal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 24px;
    z-index: 20;
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 30px;
    height: 30px;
    text-align: center;
    line-height: 30px;
}

#addStudentModal .close:hover {
    color: var(--primary-color);
} 