/* ============================================
   戌博企业智能管理系统 - 统一样式表
   所有页面的样式从这里引用，保持风格统一
   配色：主色 #667eea → #764ba2，背景 #f5f7fa
   ============================================ */

/* ========== 全局重置 ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f5f7fa;
    min-height: 100vh;
}

/* ========== 顶部导航栏 ========== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header h1 { font-size: 20px; font-weight: 600; }
.header-actions { display: flex; gap: 10px; align-items: center; }

/* ========== 按钮样式 ========== */
.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}
.btn:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: rgba(255, 255, 255, 0.2); }
.btn-outline:hover { background: rgba(255, 255, 255, 0.3); }
.btn-primary { background: #667eea; }
.btn-primary:hover { background: #5568d3; }
.btn-success { background: #10b981; }
.btn-danger { background: #ef4444; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-secondary { background: #e5e7eb; color: #374151; }

/* ========== 内容区域 ========== */
.content { padding: 30px; max-width: 1200px; margin: 0 auto; }

/* ========== 消息提示 ========== */
.msg { padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; }
.msg-success { background: #d1fae5; color: #065f46; }
.msg-error { background: #fee2e2; color: #991b1b; }

/* ========== 返回链接 ========== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 20px;
}
.back-link:hover { text-decoration: underline; }

/* ========== 卡片样式 ========== */
.card { background: white; border-radius: 12px; border: 1px solid #e8ecf1; padding: 30px; }
.detail-card { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; margin-bottom: 20px; }
.detail-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.detail-header h3 { font-size: 16px; font-weight: 600; color: #374151; }
.detail-body { padding: 20px; }
.detail-row { display: flex; padding: 10px 0; border-bottom: 1px solid #f8f8f8; }
.detail-row:last-child { border-bottom: none; }
.detail-label { width: 100px; color: #6b7280; font-size: 13px; flex-shrink: 0; }
.detail-value { color: #374151; font-size: 13px; flex: 1; }

/* ========== 表单样式 ========== */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; color: #374151; font-size: 13px; font-weight: 500; }
.form-group label .required { color: #ef4444; margin-right: 3px; }
.form-control,
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}
.form-control:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
textarea.form-control,
.form-group textarea { resize: vertical; min-height: 80px; }
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 15px; }
.form-row .form-group { flex: 1; }
.form-footer { padding: 15px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 10px; }
.form-card { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.form-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.form-header h3 { font-size: 16px; font-weight: 600; color: #374151; display: flex; align-items: center; gap: 8px; }
.form-body { padding: 20px; }
.form-type-badge { font-size: 12px; padding: 4px 10px; border-radius: 4px; color: white; }
.form-footer { padding: 15px 20px; border-top: 1px solid #f0f0f0; display: flex; justify-content: flex-end; gap: 10px; }
.submit-btn { padding: 10px 30px; background: #667eea; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; }
.submit-btn:hover { opacity: 0.9; }
.cancel-btn { padding: 10px 20px; background: #f3f4f6; color: #6b7280; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; }

/* ========== 错误提示 ========== */
.error-message { background: #fee2e2; color: #991b1b; padding: 8px 12px; border-radius: 6px; font-size: 12px; margin-top: 4px; }
.error-msg { background: #fee; color: #c33; padding: 10px; border-radius: 8px; margin-bottom: 15px; font-size: 14px; }
.field-error { border-color: #ef4444 !important; }

/* ========== 状态标签 ========== */
.status-badge { font-size: 12px; padding: 4px 12px; border-radius: 4px; font-weight: 500; }
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-cancelled { background: #f3f4f6; color: #6b7280; }
.type-badge { font-size: 12px; padding: 4px 10px; border-radius: 4px; color: white; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; color: #9ca3af; }
.empty-state i { font-size: 48px; margin-bottom: 15px; display: block; }
.empty-state p { font-size: 14px; }

/* ========== 只读提示 ========== */
.readonly-tip { background: #fff3cd; color: #856404; padding: 12px 16px; border-radius: 8px; margin-bottom: 20px; font-size: 14px; text-align: center; }

/* ========== 备注提示 ========== */
.note { font-size: 12px; color: #9ca3af; margin-top: 4px; }

/* ========== 审批流程提示 ========== */
.approver-info { background: #f9fafb; border-radius: 8px; padding: 15px; margin-bottom: 18px; }
.approver-info h4 { font-size: 13px; color: #6b7280; margin-bottom: 10px; font-weight: 500; }
.approver-item { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 13px; color: #374151; }
.approver-item i { color: #667eea; }
.approver-order { font-size: 11px; color: #9ca3af; }

/* ========== 附件上传 ========== */
.upload-area { border: 2px dashed #e5e7eb; border-radius: 8px; padding: 20px; text-align: center; cursor: pointer; transition: border-color 0.2s; }
.upload-area:hover { border-color: #667eea; }
.upload-area i { font-size: 32px; color: #9ca3af; margin-bottom: 8px; display: block; }
.upload-area p { font-size: 13px; color: #9ca3af; }
.upload-preview { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.upload-preview img { width: 80px; height: 80px; object-fit: cover; border-radius: 6px; }

/* ========== 操作栏 ========== */
.action-bar { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.action-bar form { display: inline; }
.action-bar button { padding: 8px 20px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.action-bar .btn-approve { background: #10b981; color: white; }
.action-bar .btn-reject { background: #ef4444; color: white; }
.action-bar .btn-cancel { background: #f3f4f6; color: #6b7280; }
.action-buttons { display: flex; gap: 10px; justify-content: flex-end; }
.action-btn { padding: 10px 30px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 500; color: white; }
.action-btn.approve { background: #10b981; }
.action-btn.approve:hover { opacity: 0.9; }
.action-btn.reject { background: #ef4444; }
.action-btn.reject:hover { opacity: 0.9; }
.action-btn.cancel { padding: 10px 20px; background: #f3f4f6; color: #6b7280; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; }

/* ========== 审批意见 ========== */
.comment-area { margin-top: 15px; margin-bottom: 15px; }
.comment-area label { display: block; margin-bottom: 6px; color: #374151; font-size: 13px; font-weight: 500; }
.comment-area textarea { width: 100%; min-height: 80px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; resize: vertical; outline: none; font-family: inherit; }
.comment-area textarea:focus { border-color: #667eea; }

/* ========== 审批历史 ========== */
.history-item { padding: 15px 0; border-bottom: 1px solid #f8f8f8; }
.history-item:last-child { border-bottom: none; }
.history-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.history-approver { font-size: 14px; font-weight: 500; color: #374151; }
.history-order { font-size: 12px; color: #9ca3af; }
.history-comment { font-size: 13px; color: #6b7280; background: #f9fafb; padding: 10px; border-radius: 6px; margin-top: 5px; }
.history-time { font-size: 12px; color: #9ca3af; margin-top: 5px; }
.history-pending { text-align: center; padding: 20px; color: #9ca3af; font-size: 13px; }
.history-name { font-size: 13px; color: #374151; }
.history-status { font-size: 12px; padding: 3px 10px; border-radius: 4px; }
.history-done { background: #d1fae5; color: #065f46; }
.history-waiting { background: #fef3c7; color: #92400e; }

/* ========== 部门树 ========== */
.dept-tree { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.dept-item { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.dept-item:last-child { border-bottom: none; }
.dept-item:hover { background: #f9fafb; }
.dept-info { display: flex; align-items: center; gap: 10px; }
.dept-name { font-size: 14px; font-weight: 500; color: #374151; }
.dept-count { font-size: 12px; color: #9ca3af; }
.dept-actions { display: flex; gap: 8px; }
.dept-actions a, .dept-actions button { background: none; border: none; cursor: pointer; font-size: 13px; color: #6b7280; padding: 4px 8px; border-radius: 4px; }
.dept-actions a:hover, .dept-actions button:hover { color: #667eea; background: #f3f4f6; }
.dept-actions button:hover { color: #ef4444; }
.dept-children { margin-left: 30px; border-left: 2px solid #e5e7eb; }

/* ========== 员工表格 ========== */
.employee-table { width: 100%; background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.employee-table table { width: 100%; border-collapse: collapse; }
.employee-table th { background: #f9fafb; padding: 12px 16px; text-align: left; font-size: 13px; font-weight: 600; color: #6b7280; border-bottom: 2px solid #e5e7eb; }
.employee-table td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; font-size: 14px; color: #374151; }
.employee-table tr:last-child td { border-bottom: none; }
.employee-table tr:hover { background: #f9fafb; }
.dept-tag { background: #eef2ff; color: #667eea; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.admin-tag { background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 4px; font-size: 12px; }

/* ========== 工具栏 ========== */
.toolbar { display: flex; gap: 15px; margin-bottom: 20px; flex-wrap: wrap; }
.toolbar select, .toolbar input { padding: 8px 12px; border: 2px solid #e5e7eb; border-radius: 8px; font-size: 14px; outline: none; }
.toolbar select:focus, .toolbar input:focus { border-color: #667eea; }
.toolbar input { min-width: 250px; }

/* ========== OA 功能入口网格 ========== */
.oa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 20px; margin-bottom: 30px; }
.oa-item { background: white; border-radius: 12px; padding: 25px 15px; text-align: center; cursor: pointer; transition: all 0.3s; border: 1px solid #e8ecf1; text-decoration: none; color: inherit; display: block; }
.oa-item:hover { transform: translateY(-4px); box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.oa-item i { font-size: 36px; margin-bottom: 12px; display: block; }
.oa-item span { font-size: 14px; font-weight: 500; color: #374151; }

/* ========== 待审批角标 ========== */
.badge-wrapper { position: relative; display: inline-block; }
.badge-count { position: absolute; top: -8px; right: -8px; background: #ef4444; color: white; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px; line-height: 18px; border-radius: 9px; text-align: center; padding: 0 4px; }

/* ========== 快捷操作栏 ========== */
.quick-actions { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
.quick-btn { padding: 8px 16px; background: white; border: 1px solid #e8ecf1; border-radius: 6px; cursor: pointer; font-size: 13px; color: #374151; text-decoration: none; display: inline-flex; align-items: center; gap: 5px; transition: all 0.2s; }
.quick-btn:hover { border-color: #667eea; color: #667eea; }

/* ========== 最近申请列表 ========== */
.section-title { font-size: 16px; font-weight: 600; color: #374151; margin-bottom: 15px; display: flex; align-items: center; gap: 8px; }
.section-title i { color: #667eea; }
.recent-list { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.recent-item { padding: 14px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.2s; }
.recent-item:last-child { border-bottom: none; }
.recent-item:hover { background: #f9fafb; }
.recent-info { display: flex; align-items: center; gap: 12px; }
.recent-type { font-size: 12px; padding: 3px 8px; border-radius: 4px; color: white; }
.recent-title { font-size: 14px; color: #374151; }
.recent-time { font-size: 12px; color: #9ca3af; }
.recent-status { font-size: 12px; padding: 3px 10px; border-radius: 4px; }

/* ========== 审批列表 ========== */
.approval-list { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.approval-item { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.approval-item:last-child { border-bottom: none; }
.approval-item:hover { background: #f9fafb; }
.approval-left { display: flex; align-items: center; gap: 12px; flex: 1; }
.approval-type { font-size: 12px; padding: 3px 8px; border-radius: 4px; color: white; white-space: nowrap; }
.approval-title { font-size: 14px; color: #374151; font-weight: 500; }
.approval-applicant { font-size: 12px; color: #9ca3af; }
.approval-right { display: flex; align-items: center; gap: 12px; }
.approval-time { font-size: 12px; color: #9ca3af; white-space: nowrap; }
.approval-status { font-size: 12px; padding: 3px 10px; border-radius: 4px; white-space: nowrap; }
.approval-actions { display: flex; gap: 8px; }
.approval-actions a, .approval-actions button { background: none; border: none; cursor: pointer; font-size: 12px; color: #667eea; padding: 4px 8px; border-radius: 4px; text-decoration: none; }
.approval-actions a:hover, .approval-actions button:hover { background: #f3f4f6; }
.approval-actions button:hover { color: #ef4444; }

/* ========== 筛选栏 ========== */
.filter-bar { background: white; border-radius: 12px; border: 1px solid #e8ecf1; padding: 20px; margin-bottom: 20px; }
.filter-row { display: flex; gap: 15px; align-items: center; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 8px; }
.filter-group label { font-size: 13px; color: #6b7280; white-space: nowrap; }
.filter-select { padding: 7px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; outline: none; }
.filter-select:focus { border-color: #667eea; }
.filter-input { padding: 7px 12px; border: 1px solid #e5e7eb; border-radius: 6px; font-size: 13px; width: 200px; outline: none; }
.filter-input:focus { border-color: #667eea; }
.filter-btn { padding: 7px 16px; background: #667eea; color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; }
.reset-btn { padding: 7px 16px; background: #f3f4f6; color: #6b7280; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; text-decoration: none; }

/* ========== 审批信息卡片 ========== */
.approve-card { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; margin-bottom: 20px; }
.approve-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; display: flex; justify-content: space-between; align-items: center; }
.approve-header h3 { font-size: 16px; font-weight: 600; color: #374151; }
.approve-body { padding: 20px; }

/* ========== 审批操作区 ========== */
.approve-action { background: white; border-radius: 12px; border: 1px solid #e8ecf1; overflow: hidden; }
.approve-action-header { padding: 16px 20px; border-bottom: 1px solid #f0f0f0; }
.approve-action-header h3 { font-size: 16px; font-weight: 600; color: #374151; }
.approve-action-body { padding: 20px; }

/* ========== 认证页（登录 / 注册） ========== */
.auth-page {
    background:
        radial-gradient(1000px 620px at 10% 6%, rgba(255, 255, 255, 0.22), transparent 60%),
        radial-gradient(820px 540px at 90% 94%, rgba(255, 255, 255, 0.16), transparent 62%),
        linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
}
.auth-shell { width: 100%; display: flex; justify-content: center; }
.auth-card {
    background: rgba(255, 255, 255, 0.97);
    width: 100%;
    max-width: 420px;
    padding: 40px 38px 26px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 24px 60px rgba(31, 27, 72, 0.28), 0 2px 6px rgba(31, 27, 72, 0.12);
    animation: authRise 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.auth-card--wide { max-width: 540px; }
@keyframes authRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
}
.auth-brand {
    width: 56px; height: 56px; margin: 0 auto 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-size: 28px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 10px 22px rgba(102, 126, 234, 0.38);
}
.auth-title { text-align: center; font-size: 22px; font-weight: 600; color: #1f2937; letter-spacing: 0.5px; }
.auth-subtitle { text-align: center; font-size: 13px; color: #8b95a7; margin: 8px 0 26px; line-height: 1.6; }

/* 带图标的输入框：仅在认证页使用，避免影响其他页面的 .form-group */
.field { margin-bottom: 18px; }
.field > label { display: block; font-size: 13px; font-weight: 500; color: #4b5563; margin-bottom: 7px; }
.field-wrap { position: relative; }
.field-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 17px; color: #a5aecb; pointer-events: none;
    transition: color 0.2s;
}
.field-wrap:focus-within .field-icon { color: #667eea; }
.field-wrap input {
    width: 100%; height: 46px;
    padding: 0 14px 0 42px;
    border: 1px solid #e3e7f0; border-radius: 11px;
    font-size: 14px; color: #1f2937; background: #fbfcfe;
    outline: none; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field-wrap input::placeholder { color: #b6bdcc; }
.field-wrap input:focus {
    border-color: #667eea; background: #fff;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.14);
}
.field-row { display: flex; gap: 16px; }
.field-row .field { flex: 1; }
.field-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    padding: 6px 8px; font-size: 17px; color: #a5aecb; border-radius: 8px;
    transition: color 0.2s, background 0.2s;
}
.field-toggle:hover { color: #667eea; background: #f2f4fb; }
.field-wrap input.has-toggle { padding-right: 44px; }

.auth-alert {
    display: flex; align-items: flex-start; gap: 8px;
    background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
    font-size: 13px; line-height: 1.5;
    padding: 11px 14px; border-radius: 10px; margin-bottom: 18px;
}
.auth-alert i { font-size: 16px; margin-top: 1px; flex-shrink: 0; }
.auth-alert ul { margin: 0; padding-left: 18px; }
.auth-alert li { margin: 0; }
/* 无校验消息时 Tag Helper 会加此 class，避免渲染出空白红框 */
div.validation-summary-valid { display: none; }
.auth-tip {
    display: flex; gap: 8px;
    background: #f5f7ff; border: 1px solid #e5e9fb; border-radius: 10px;
    padding: 11px 13px; font-size: 12px; color: #6b7488; line-height: 1.6;
    margin-bottom: 20px;
}
.auth-tip i { color: #667eea; font-size: 15px; flex-shrink: 0; margin-top: 1px; }

.auth-btn {
    width: 100%; height: 48px; margin-top: 6px;
    border: none; border-radius: 11px; cursor: pointer;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff; font-size: 15px; font-weight: 600; letter-spacing: 1px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    box-shadow: 0 10px 24px rgba(102, 126, 234, 0.32);
    font-family: inherit;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
}
.auth-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px rgba(102, 126, 234, 0.4); filter: saturate(1.08); }
.auth-btn:active { transform: translateY(0); }
.auth-btn i { font-size: 17px; transition: transform 0.2s; }
.auth-btn:hover i { transform: translateX(3px); }

.auth-alt { text-align: center; font-size: 13px; color: #8b95a7; margin-top: 22px; }
.auth-alt a { color: #667eea; font-weight: 600; text-decoration: none; }
.auth-alt a:hover { text-decoration: underline; }
.auth-foot {
    text-align: center; font-size: 12px; color: #aab2c4;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid #f0f2f7;
}
@media (max-width: 520px) {
    .auth-card { padding: 30px 22px 22px; border-radius: 16px; }
    .auth-card--wide { padding: 30px 22px 22px; }
    .field-row { flex-direction: column; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-card { animation: none; }
    .auth-btn, .auth-btn:hover { transition: none; transform: none; }
}

/* ========== 注册链接（登录页右上角） ========== */
.register-link {
    position: fixed; top: 20px; right: 20px;
    padding: 10px 24px; background: rgba(255, 255, 255, 0.95);
    color: #667eea; font-size: 14px; font-weight: 600;
    text-decoration: none; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease; z-index: 100;
}
.register-link:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2); color: #764ba2; }

/* ========== 首页样式 ========== */
.main-content { padding: 30px; max-width: 1400px; margin: 0 auto; }
.welcome-section { text-align: center; margin-bottom: 30px; }
.welcome-section h2 { font-size: 28px; color: #333; margin-bottom: 10px; }
.welcome-section p { color: #666; font-size: 16px; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 25px; padding: 10px; }
.app-item {
    background: white; border: 1px solid #e8ecf1; border-radius: 12px;
    padding: 24px 12px; text-align: center; cursor: pointer;
    transition: all 0.25s ease; text-decoration: none; color: inherit;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.app-item:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); border-color: #667eea; }
.app-icon { width: 56px; height: 56px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: white; }
.app-item.dept .app-icon { background: #4a6cf7; }
.app-item.emp .app-icon { background: #6b7b8d; }
.app-item.company .app-icon { background: #3b82f6; }
.app-item.oa .app-icon { background: #10b981; }
.app-item.contract .app-icon { background: #f59e0b; }
.app-item.materials .app-icon { background: #8b5cf6; }
.app-item.data .app-icon { background: #06b6d4; }
.app-item.settings .app-icon { background: #64748b; }
.app-item.task .app-icon { background: #ec4899; }
.app-item.message .app-icon { background: #f97316; }
.app-name { font-size: 13px; color: #374151; font-weight: 500; letter-spacing: 0.3px; }
.user-info { display: flex; align-items: center; gap: 15px; }
.user-avatar { width: 40px; height: 40px; background: rgba(255, 255, 255, 0.3); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.logout-btn { padding: 8px 20px; background: rgba(255, 255, 255, 0.2); color: white; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; transition: all 0.3s ease; text-decoration: none; }
.logout-btn:hover { background: rgba(255, 255, 255, 0.3); }
.footer { text-align: center; padding: 20px; color: #999; font-size: 12px; }

/* ========== 按钮组 ========== */
.btn-group { display: flex; gap: 10px; margin-top: 25px; }

/* ========== 响应式适配（平板 ≤900px / 手机 ≤640px） ========== */
/* 表格需要横向滚动时，用 min-width 撑开，而不是把整页撑破 */
@media (max-width: 900px) {
    .header { padding: 12px 16px; }
    .header h1 { font-size: 18px; }
    .content, .main-content { padding: 20px 16px; }
    .card { padding: 20px; }
    .welcome-section h2 { font-size: 22px; }
    .welcome-section p { font-size: 14px; }
    .toolbar { gap: 10px; }
    .toolbar input { min-width: 0; flex: 1 1 200px; }
    .dept-children { margin-left: 14px; }
    .oa-grid { gap: 14px; }
    .app-grid { gap: 16px; padding: 0; }
}

@media (max-width: 640px) {
    /* 顶栏：标题与用户信息换行，不再左右挤压 */
    .header { flex-wrap: wrap; gap: 8px 12px; }
    .header h1 { font-size: 16px; flex: 1 1 auto; }
    .user-info { gap: 10px; font-size: 13px; }
    .user-avatar { width: 34px; height: 34px; font-size: 13px; }
    .logout-btn { padding: 6px 14px; font-size: 13px; }

    /* 宽表格：容器内横向滚动，页面本身不出现横向滚动条 */
    .employee-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .employee-table table { min-width: 720px; }
    .employee-table th, .employee-table td { white-space: nowrap; }

    /* 表单两列改单列 */
    .form-row { flex-direction: column; gap: 0; }

    /* 列表条目：右侧状态与操作换到下一行，标题允许折行 */
    .approval-item, .dept-item { align-items: flex-start; }
    .approval-left { min-width: 0; }
    .approval-right, .dept-item > div:last-child { width: 100%; justify-content: space-between; margin-top: 8px; }
    .approval-title, .dept-name { overflow-wrap: anywhere; }

    /* 详情：标签列收窄，长文本折行 */
    .detail-label { width: 82px; font-size: 12px; }
    .detail-value { overflow-wrap: anywhere; }
    .detail-header, .approve-header { flex-wrap: wrap; gap: 8px; }
    .detail-body, .approve-body, .approve-action-body, .card { padding: 16px; }

    /* 操作按钮：换行并左对齐，手机上不再挤成一排 */
    .action-bar, .action-buttons, .btn-group, .approval-actions { flex-wrap: wrap; justify-content: flex-start; }
    .action-btn { padding: 10px 18px; }

    /* 筛选栏：控件占满整行 */
    .filter-bar { padding: 14px; }
    .filter-group { flex: 1 1 100%; }
    .filter-input, .filter-select { width: 100%; flex: 1; }

    /* 快捷入口：等宽两列，图标尺寸收紧 */
    .quick-btn { flex: 1 1 calc(50% - 10px); justify-content: center; }
    .oa-item { padding: 18px 10px; }
    .oa-item i { font-size: 28px; }
    .app-item { padding: 18px 8px; }

    .empty-state { padding: 40px 16px; }
    .empty-state i { font-size: 40px; }
}
