/* 全局样式 */
body {
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

.container-fluid {
    padding: 20px;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* 主布局容器 - 使用Flexbox确保三列并排 */
.main-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 15px;
    width: 100%;
    min-height: calc(100vh - 40px);
}

/* 左侧面板 */
.left-panel {
    flex: 0 0 25%;
    min-width: 280px;
    max-width: 320px;
    padding-right: 10px;
    flex-shrink: 0;
}

/* 中间面板 */
.middle-panel {
    flex: 1;
    min-width: 400px;
    padding: 0 10px;
    flex-shrink: 1;
}

/* 右侧面板 */
.right-panel {
    flex: 0 0 25%;
    min-width: 280px;
    max-width: 320px;
    padding-left: 10px;
    flex-shrink: 0;
}

/* 卡片样式 */
.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    height: fit-content;
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 15px 20px;
    border: none;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
}

.card-body {
    padding: 20px;
}

/* 左侧面板 */
.left-panel {
    padding-right: 10px;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.search-box input {
    flex: 1;
}

.teacher-list {
    max-height: 400px;
    overflow-y: auto;
}

.teacher-item {
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.teacher-item:hover {
    background-color: #e3f2fd;
    border-color: #2196f3;
    transform: translateX(5px);
}

.teacher-item.active {
    background-color: #2196f3;
    color: white;
    border-color: #1976d2;
}

.teacher-name {
    font-weight: 500;
    font-size: 16px;
}

.course-count {
    background-color: #ff6b6b;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

/* 中间面板 */
.middle-panel {
    padding: 0 10px;
}

.date-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.schedule-info {
    margin-bottom: 15px;
}

.schedule-table {
    max-height: 200px;
    overflow-y: auto;
}

.schedule-item {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.schedule-item:hover {
    background-color: #fff3e0;
    border-color: #ff9800;
}

.schedule-item.selected {
    background-color: #ff9800;
    color: white;
    border-color: #f57c00;
}
/* 代课清单高度 */
.queue-list {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    padding: 10px;
}

.queue-item {
    padding: 8px 12px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 5px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.queue-item:hover {
    background-color: #ffeaa7;
    border-color: #fdcb6e;
}

.queue-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.queue-actions .btn {
    flex: 1;
    max-width: 100px;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
}

/* 右侧面板 */
.right-panel {
    padding-left: 10px;
}

.filter-options {
    margin-top: 10px;
}

.filter-radios {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: space-between;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 60px;
    justify-content: center;
}

.radio-label:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label span {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

.radio-label input[type="radio"]:checked + span {
    color: #007bff;
    font-weight: 600;
}

.radio-label input[type="radio"]:checked ~ span {
    color: #007bff;
    font-weight: 600;
}

.radio-label input[type="radio"]:checked {
    background-color: #007bff;
}

.radio-label:has(input[type="radio"]:checked) {
    background: #007bff;
    border-color: #007bff;
    color: white;
}

.radio-label:has(input[type="radio"]:checked) span {
    color: white;
}

.free-teachers-list {
    max-height: 380px;
    overflow-y: auto;
}

.free-teacher-item {
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    margin-bottom: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.free-teacher-item:hover {
    background-color: #e8f5e8;
    border-color: #4caf50;
    transform: translateX(-5px);
}

.free-teacher-item.selected {
    background-color: #4caf50;
    color: white;
    border-color: #388e3c;
}

/* 专代教师特殊样式 */
.free-teacher-item.special-teacher {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-color: #ffc107;
    border-width: 2px;
}

.free-teacher-item.special-teacher:hover {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-color: #e67e22;
}

.free-teacher-item.special-teacher.selected {
    background: linear-gradient(135deg, #ffc107 0%, #fdcb6e 100%);
    color: #333;
    border-color: #e67e22;
}

/* 模态框样式 */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px 10px 0 0;
}

/* 气泡提示 */
.tooltip {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-width: 350px;
    font-size: 12px;
    line-height: 1.4;
    display: none;
}

.tooltip::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 20px;
    border-width: 0 10px 10px 10px;
    border-style: solid;
    border-color: transparent transparent #2196f3 transparent;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: -7px;
    left: 21px;
    border-width: 0 9px 9px 9px;
    border-style: solid;
    border-color: transparent transparent white transparent;
}

.tooltip-header {
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 8px;
}

.tooltip-header strong {
    font-size: 14px;
    color: #333;
}

.tooltip-header small {
    color: #666;
    font-size: 11px;
}

.tooltip-section {
    margin-bottom: 10px;
}

.tooltip-section:last-child {
    margin-bottom: 0;
}

.tooltip-section strong {
    color: #495057;
    font-size: 12px;
    display: block;
    margin-bottom: 5px;
}

/* 自定义提示层样式 */
.custom-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    max-width: none;
    width: auto;
    min-width: 300px;
    text-align: center;
    left: 0;
    top: 0;
}

.custom-tooltip.show {
    opacity: 1;
}

/* 选中教师课务信息面板样式 */
.teacher-info-panel {
    max-height: 300px;
    overflow-y: auto;
    width: 300px;
    margin: 0 auto;
}

.teacher-info-panel .card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.teacher-info-panel .card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.teacher-info-panel .card-body {
    padding: 12px;
    font-size: 13px;
    line-height: 1.5;
}

.teacher-info-section {
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

.teacher-info-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.teacher-info-section h6 {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 6px;
}

.teacher-info-section ul {
    margin: 0;
    padding-left: 16px;
}

.teacher-info-section li {
    margin-bottom: 4px;
    font-size: 12px;
}

.teacher-info-section .scheduled {
    text-decoration: line-through;
    color: #999;
}

.teacher-info-section .substitute {
    color: #dc3545;
    font-weight: 500;
}

/* 消息图层样式 */
.message-layer {
    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: 9999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.message-content {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 300px;
    max-width: 600px;
    animation: messageSlideIn 0.3s ease;
}

@keyframes messageSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-text {
    font-size: 16px;
    font-weight: 500;
    color: #333;
    flex: 1;
}

.message-success {
    border-left: 4px solid #28a745;
}

.message-success .message-icon {
    background-color: #d4edda;
    color: #28a745;
}

.message-error {
    border-left: 4px solid #dc3545;
}

.message-error .message-icon {
    background-color: #f8d7da;
    color: #dc3545;
}

.message-warning {
    border-left: 4px solid #ffc107;
}

.message-warning .message-icon {
    background-color: #fff3cd;
    color: #856404;
}

.message-info {
    border-left: 4px solid #17a2b8;
}

.message-info .message-icon {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* 按钮样式 */
.btn {
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    border: none;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ffa8a8 100%);
    border: none;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #ffa726 0%, #ffd54f 100%);
    border: none;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 167, 38, 0.4);
}

.btn-info {
    background: linear-gradient(135deg, #26c6da 0%, #80deea 100%);
    border: none;
}

.btn-info:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(38, 198, 218, 0.4);
}

/* btn-secondary 悬停效果 */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #adb5bd 100%);
    border: none;
}

.btn-secondary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container-fluid {
        padding: 10px;
    }
    
    .col-md-3, .col-md-6 {
        padding: 5px;
    }
    
    .filter-options {
        flex-direction: column;
    }
    
    .queue-actions {
        flex-direction: column;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

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

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

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

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* 消息提示 */
.alert-message {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1050;
    min-width: 300px;
    max-width: 800px;
    text-align: center;
    animation: slideDown 0.5s ease;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    border-radius: 12px;
    padding: 20px;
    font-size: 16px;
    font-weight: 500;
}

@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* 代课统计信息样式 */
.queue-stats {
    font-size: 14px;
    color: #495057;
    background-color: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.stats-label {
    font-weight: 600;
    color: #495057;
    margin-right: 8px;
}

.stats-content {
    color: #dc3545;
    font-weight: 500;
}

.total-lessons {
    color: #28a745;
    font-weight: 600;
    margin-left: 8px;
    background-color: #d4edda;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #c3e6cb;
}

/* 筛选按钮样式 */
.filter-buttons {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.btn-filter {
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-ban-kong {
    background-color: #4caf50;
    color: white;
}

.btn-ban-kong:hover,
.btn-ban-kong.active {
    background-color: #388e3c;
    border-color: #2e7d32;
}

.btn-xiao-kong {
    background-color: #2196f3;
    color: white;
}

.btn-xiao-kong:hover,
.btn-xiao-kong.active {
    background-color: #1976d2;
    border-color: #1565c0;
}

.btn-nian-kong {
    background-color: #ff9800;
    color: white;
}

.btn-nian-kong:hover,
.btn-nian-kong.active {
    background-color: #f57c00;
    border-color: #ef6c00;
}

.btn-ke-kong {
    background-color: #9c27b0;
    color: white;
}

.btn-ke-kong:hover,
.btn-ke-kong.active {
    background-color: #7b1fa2;
    border-color: #6a1b9a;
}

/* 日期选择器样式调整 */
.flatpickr-calendar {
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.flatpickr-day.selected {
    background: #667eea;
    border-color: #667eea;
}