/**
 * 样式文件
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 25%, #3b6cb0 50%, #4a90e2 75%, #5ba3f5 100%);
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(74, 144, 226, 0.2) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

body > * {
    position: relative;
    z-index: 1;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
}

/* 表单样式 */
.form-wrapper {
    background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(30, 60, 114, 0.3), 0 5px 15px rgba(74, 144, 226, 0.2);
    margin-top: 50px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.form-wrapper h1 {
    text-align: center;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
    text-shadow: none;
}

.leave-form .form-group {
    margin-bottom: 20px;
}

.leave-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.leave-form .required {
    color: #e74c3c;
}

.leave-form input[type="text"],
.leave-form input[type="date"],
.leave-form input[type="number"],
.leave-form input[type="tel"],
.leave-form select,
.leave-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.leave-form input:focus,
.leave-form select:focus,
.leave-form textarea:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15), 0 0 20px rgba(74, 144, 226, 0.1);
    background: #ffffff;
}

.leave-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* 预览页面样式 */
.preview-container {
    background: #ffffff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: none;
    max-width: 600px;
    margin: 0 auto;
}

.preview-icon {
    font-size: 28px;
    margin-right: 8px;
    vertical-align: middle;
}

.preview-content {
    margin: 30px 0;
}

.preview-item {
    display: flex;
    padding: 15px 15px 15px 5px;
    border-bottom: 1px solid #e8e8e8;
    align-items: flex-start;
}

.preview-item:last-child {
    border-bottom: none;
}

.preview-label {
    font-weight: 600;
    color: #2c3e50;
    min-width: 120px;
    flex-shrink: 0;
    font-size: 15px;
}

.preview-value {
    color: #555;
    flex: 1;
    line-height: 1.6;
    word-break: break-word;
}

.preview-actions {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.preview-actions .btn {
    min-width: 120px;
}


/* 按钮样式 */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 50%, #5ba3f5 100%);
    color: white;
    border: none;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4a90e2 0%, #5ba3f5 50%, #2a5298 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(42, 82, 152, 0.4), 0 0 20px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-block {
    width: 100%;
}

/* 消息提示 */
.message {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 16px;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* 登录页面 */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-box {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 50px rgba(30, 60, 114, 0.3), 0 5px 15px rgba(74, 144, 226, 0.2);
    width: 100%;
    max-width: 400px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 30px;
    font-weight: 700;
    text-shadow: none;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15), 0 0 20px rgba(74, 144, 226, 0.1);
    background: #ffffff;
}

.back-link,
.admin-link {
    text-align: center;
    margin-top: 20px;
}

.back-link a,
.admin-link a {
    color: #4a90e2;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-link a:hover,
.admin-link a:hover {
    color: #2a5298;
    text-shadow: 0 0 10px rgba(74, 144, 226, 0.3);
}

.back-link a:hover,
.admin-link a:hover {
    text-decoration: underline;
}

/* 管理后台样式 */
.admin-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.25), 0 5px 15px rgba(74, 144, 226, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.admin-header h1 {
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 24px;
    font-weight: 700;
    text-shadow: none;
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-info span {
    color: #666;
    font-size: 14px;
}

/* 统计卡片 */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.2), 0 5px 15px rgba(74, 144, 226, 0.15);
    border: 2px solid rgba(74, 144, 226, 0.3);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(30, 60, 114, 0.3), 0 0 30px rgba(74, 144, 226, 0.2);
    border-color: rgba(74, 144, 226, 0.5);
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 50%, #5ba3f5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* 组别区域 */
.group-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.2), 0 5px 15px rgba(74, 144, 226, 0.15);
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.group-title {
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(74, 144, 226, 0.3);
}

.record-count {
    color: #999;
    font-size: 16px;
    font-weight: normal;
}

/* 表格样式 */
.table-wrapper {
    overflow-x: auto;
    margin-top: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: auto;
}

/* 请假信息表格列宽设置 */
#tab-leave .data-table th:nth-child(1),
#tab-leave .data-table td:nth-child(1) {
    width: 60px;
    min-width: 60px;
}

#tab-leave .data-table th:nth-child(2),
#tab-leave .data-table td:nth-child(2) {
    width: 150px;
    min-width: 150px;
}

#tab-leave .data-table th:nth-child(3),
#tab-leave .data-table td:nth-child(3) {
    width: 120px;
    min-width: 120px;
}

#tab-leave .data-table th:nth-child(4),
#tab-leave .data-table td:nth-child(4) {
    width: 120px;
    min-width: 120px;
}

#tab-leave .data-table th:nth-child(5),
#tab-leave .data-table td:nth-child(5) {
    width: 400px;
    min-width: 300px;
    max-width: 500px;
}

#tab-leave .data-table th:nth-child(6),
#tab-leave .data-table td:nth-child(6) {
    width: 130px;
    min-width: 130px;
}

#tab-leave .data-table th:nth-child(7),
#tab-leave .data-table td:nth-child(7) {
    width: 160px;
    min-width: 160px;
}

#tab-leave .data-table th:nth-child(8),
#tab-leave .data-table td:nth-child(8) {
    width: 100px;
    min-width: 100px;
}

.data-table thead {
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 50%, #5ba3f5 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(30, 60, 114, 0.2);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(240, 247, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    transform: scale(1.01);
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(74, 144, 226, 0.15);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.reason-cell {
    max-width: 500px;
    min-width: 300px;
    word-wrap: break-word;
    word-break: break-word;
}

.text-center {
    text-align: center;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 30px 0;
}

.page-info {
    background: white;
    border-radius: 10px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.page-info p {
    margin: 0;
    color: #666;
}

/* 页脚 */
.admin-footer {
    background: white;
    border-radius: 10px;
    padding: 20px 30px;
    margin-top: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-wrapper,
    .login-box {
        padding: 20px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* 组别管理样式 */
.group-management-section {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.2), 0 5px 15px rgba(74, 144, 226, 0.15);
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.section-title {
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(74, 144, 226, 0.3);
}

.add-group-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.add-group-form h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

.inline-form {
    display: flex;
    gap: 10px;
}

.form-row {
    display: flex;
    gap: 10px;
    width: 100%;
}

.form-row input {
    flex: 1;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

.form-row input:focus {
    outline: none;
    border-color: #667eea;
}

/* 模态框样式 */
.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.5);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-content h3 {
    margin-bottom: 20px;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 20px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* 导航栏样式 */
.admin-navbar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    padding: 0;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.25), 0 5px 15px rgba(74, 144, 226, 0.15);
    overflow: hidden;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.nav-menu li {
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #666;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
    position: relative;
}

.nav-link:hover {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
    color: #2a5298;
    border-bottom-color: rgba(74, 144, 226, 0.5);
}

.nav-link.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2a5298 0%, #4a90e2 50%, #5ba3f5 100%);
    border-bottom-color: #4a90e2;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(42, 82, 152, 0.3);
}

.nav-icon {
    margin-right: 8px;
    font-size: 18px;
}

.tab-content {
    display: none;
    padding: 20px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 247, 255, 0.95) 100%);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(30, 60, 114, 0.2), 0 5px 15px rgba(74, 144, 226, 0.15);
    margin-bottom: 20px;
    border: 2px solid rgba(74, 144, 226, 0.3);
    backdrop-filter: blur(10px);
}

.tab-content.active {
    display: block !important;
}

#tab-group.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* 请假信息选项卡使用更宽的布局 */
#tab-leave {
    padding: 30px;
}

/* 管理员管理样式 */
.admin-management-section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.add-admin-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
}

/* 导出按钮样式 */
.export-section {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
}

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
}

.export-icon {
    font-size: 20px;
}

.add-admin-form h3 {
    margin-bottom: 15px;
    color: #555;
    font-size: 16px;
}

