/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    font-size: 1.8rem;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 0.9rem;
}

/* 容器布局 */
.container {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* 侧边栏样式 */
.sidebar {
    width: 250px;
    background: white;
    border-right: 1px solid #e9ecef;
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    text-decoration: none;
}

.nav-item:hover {
    background: #f8f9ff;
    color: #667eea;
}

.nav-item.active {
    background: #f8f9ff;
    color: #667eea;
    border-left-color: #667eea;
    font-weight: 600;
}

.nav-item i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* 主内容区样式 */
.main-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 i {
    color: #667eea;
}

/* 上传区域样式 */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    background: #f8f9ff;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.upload-area:hover {
    background: #eef1ff;
    border-color: #764ba2;
}

.upload-area i {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 10px;
}

.upload-area h4 {
    color: #333;
    margin-bottom: 5px;
}

.upload-area p {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

/* 文件输入样式 */
.file-input {
    display: none;
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
    margin-right: 10px;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
}

/* 文件列表样式 */
.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-icon {
    color: #667eea;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 0.8rem;
}

.file-actions {
    display: flex;
    gap: 8px;
}

.action-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
}

.action-btn.view {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.delete {
    background: #ffebee;
    color: #d32f2f;
}

/* 表格样式 */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.9rem;
}

.schedule-table th {
    background: #f8f9fa;
    color: #333;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #e9ecef;
}

.schedule-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
}

.schedule-table tr:hover {
    background: #f8f9ff;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

/* 消息提示样式 */
.message {
    padding: 12px;
    border-radius: 5px;
    margin-bottom: 15px;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
    display: block;
}

/* 加载动画样式 */
.loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading.active {
    display: block;
}

.spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #333;
    font-size: 1.1rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
}

.modal-body {
    padding: 15px;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.preview-table th,
.preview-table td {
    padding: 8px;
    border: 1px solid #e9ecef;
    text-align: left;
}

.preview-table th {
    background: #f8f9fa;
    font-weight: 600;
}

.modal-footer {
    padding: 15px;
    border-top: 1px solid #e9ecef;
    text-align: right;
}

/* 标签页内容样式 */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 状态徽章样式 */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-normal {
    background: #d4edda;
    color: #155724;
}

.status-late {
    background: #fff3cd;
    color: #856404;
}

.status-absent {
    background: #f8d7da;
    color: #721c24;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group select,
.form-group input[type="date"] {
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 5px;
    font-size: 0.9rem;
    width: 200px;
}

.date-range {
    display: flex;
    gap: 10px;
    align-items: center;
}

.date-range span {
    color: #666;
}

/* 绑定管理界面样式 */
.openid-cell {
    position: relative;
    cursor: help;
}

.openid-prefix {
    color: #333;
    font-family: monospace;
}

.openid-suffix {
    color: #666;
    font-family: monospace;
}

.openid-tooltip {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-family: monospace;
    white-space: nowrap;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.openid-cell:hover .openid-tooltip {
    display: block;
}

.name-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.text-muted {
    color: #999;
    font-style: italic;
}

.hint-text {
    font-size: 0.75rem;
    color: #ff9800;
    background: #fff3e0;
    padding: 2px 6px;
    border-radius: 3px;
    display: inline-block;
}

.time-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.time-diff {
    font-size: 0.75rem;
    color: #666;
}

.status-cell {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-badge.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.action-btn {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.action-btn.view {
    background: #e3f2fd;
    color: #1976d2;
}

.action-btn.view:hover {
    background: #bbdefb;
}

.action-btn.edit {
    background: #e8f5e9;
    color: #388e3c;
}

.action-btn.edit:hover {
    background: #c8e6c9;
}

.action-btn.delete {
    background: #ffebee;
    color: #d32f2f;
}

.action-btn.delete:hover {
    background: #ffcdd2;
}

.action-btn i {
    font-size: 0.9rem;
}

/* 推送信息样式 */
.push-info {
    margin: 15px 0;
    padding: 12px;
    background: #f0f9ff;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.push-info p {
    margin: 5px 0;
    color: #333;
    font-size: 0.9rem;
}

.push-info strong {
    color: #007bff;
}

/* 成功按钮样式 */
.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        padding: 10px 0;
    }
    
    .nav-item {
        padding: 10px 15px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .form-group select,
    .form-group input[type="date"] {
        width: 100%;
    }
    
    .date-range {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 3px;
    }
    
    .action-btn {
        width: 28px;
        height: 28px;
    }
}

/* 上传进度条样式 */
.upload-progress-container {
    margin-top: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.upload-progress {
    width: 100%;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 10px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
    animation: progress-pulse 2s ease-in-out infinite;
}

@keyframes progress-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}

.upload-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
    font-size: 0.8rem;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* 文件处理状态指示器 */
.file-processing {
    position: relative;
}

.file-processing::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: processing-pulse 1.5s ease-in-out infinite;
}

@keyframes processing-pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
}

/* 文件处理完成状态 */
.file-complete {
    border-left-color: #28a745;
}

.file-complete .file-icon {
    color: #28a745;
}

/* 文件处理失败状态 */
.file-error {
    border-left-color: #dc3545;
}

.file-error .file-icon {
    color: #dc3545;
}
