/* 全局样式 */
:root {
    --primary: #1a5276;
    --primary-light: #2980b9;
    --secondary: #e74c3c;
    --success: #27ae60;
    --warning: #f39c12;
    --info: #2980b9;
    --light-bg: #f4f6f9;
    --card-shadow: 0 2px 10px rgba(0,0,0,0.08);
    --border-color: #e0e6ed;
}

body { background: var(--light-bg); font-family: 'Microsoft YaHei', '微软雅黑', sans-serif; font-size: 14px; color: #333;}

/* 导航栏 */
.bg-primary-custom { background: linear-gradient(135deg, #1a5276 0%, #154360 100%) !important; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.navbar-brand { font-size: 1.1rem; font-weight: bold; letter-spacing: 1px; }
.brand-text { font-size: 1rem; }
.navbar .nav-link { padding: 0.5rem 0.8rem; transition: color 0.2s; }
.navbar .nav-link:hover { color: #fff !important; }

/* 用户头像 */
.user-avatar-small {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #2980b9, #27ae60);
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-size: 13px; font-weight: bold;
}
.user-avatar {
    width: 60px; height: 60px; border-radius: 50%;
    background: linear-gradient(135deg, #2980b9, #27ae60);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 24px; font-weight: bold;
}
.user-avatar-lg {
    width: 80px; height: 80px; border-radius: 50%;
    background: linear-gradient(135deg, #2980b9, #27ae60);
    display: flex; align-items: center; justify-content: center;
    color: white; font-size: 32px; font-weight: bold;
}

/* 通知徽章 */
.notification-badge { position: absolute; top: 2px; right: 0; font-size: 9px; padding: 2px 4px; }

/* 滚动通知栏 */
.scroll-notice-bar {
    background: linear-gradient(90deg, #1a5276, #2980b9);
    color: white; padding: 6px 0; display: flex; align-items: center;
    overflow: hidden;
}
.scroll-notice-label {
    background: #e74c3c; padding: 4px 12px; white-space: nowrap;
    font-size: 12px; font-weight: bold; flex-shrink: 0; margin-left: 12px;
    border-radius: 3px;
}
.scroll-notice-content { flex: 1; overflow: hidden; margin-left: 12px; }
.scroll-notice-inner { display: flex; animation: scrollLeft 40s linear infinite; white-space: nowrap; }
.scroll-notice-inner:hover { animation-play-state: paused; }
.scroll-item { margin-right: 60px; font-size: 13px; }

@keyframes scrollLeft {
    0% { transform: translateX(100vw); }
    100% { transform: translateX(-100%); }
}

/* 主内容区域 */
.main-container { min-height: calc(100vh - 130px); padding: 20px 15px;width:1500px;}

/* 卡片样式 */
.card { border: none; border-radius: 8px; box-shadow: var(--card-shadow); margin-bottom: 20px; }
.card-header { background: white; border-bottom: 2px solid var(--border-color); font-weight: bold; padding: 12px 18px; border-radius: 8px 8px 0 0 !important; }
.card-title { color: var(--primary); margin: 0; font-size: 15px; }

/* 首页统计卡片 */
.stat-card { border-radius: 10px; color: white; padding: 20px; position: relative; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
.stat-card .stat-icon { position: absolute; right: 15px; top: 15px; font-size: 40px; opacity: 0.3; }
.stat-card .stat-number { font-size: 36px; font-weight: bold; line-height: 1; }
.stat-card .stat-label { font-size: 13px; opacity: 0.9; margin-top: 5px; }
.stat-card .stat-diff { font-size: 12px; margin-top: 8px; }
.stat-card-blue { background: linear-gradient(135deg, #2980b9, #1a5276); }
.stat-card-green { background: linear-gradient(135deg, #27ae60, #1e8449); }
.stat-card-orange { background: linear-gradient(135deg, #e67e22, #ca6f1e); }
.stat-card-red { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.stat-card-purple { background: linear-gradient(135deg, #8e44ad, #6c3483); }
.stat-card-teal { background: linear-gradient(135deg, #16a085, #0e6655); }

/* 值班卡片 */
.duty-card { background: white; border-radius: 10px; padding: 18px; box-shadow: var(--card-shadow); border-left: 4px solid var(--primary); }
.duty-item { display: flex; align-items: center; padding: 8px 0; border-bottom: 1px dashed #eee; }
.duty-item:last-child { border-bottom: none; }
.duty-badge { background: var(--primary); color: white; padding: 3px 8px; border-radius: 4px; font-size: 12px; min-width: 70px; text-align: center; margin-right: 12px; }
.duty-name { font-weight: 500; font-size: 15px; }

/* 内容列表 */
.post-item { background: white; border-radius: 8px; padding: 16px; margin-bottom: 10px; box-shadow: var(--card-shadow); transition: transform 0.2s, box-shadow 0.2s; border-left: 3px solid transparent; }
.post-item:hover { transform: translateY(-2px); box-shadow: 0 4px 15px rgba(0,0,0,0.12); border-left-color: var(--primary); }
.post-item.top { border-left-color: var(--secondary); }
.post-item .post-title { font-size: 15px; font-weight: 500; color: #333; text-decoration: none; }
.post-item .post-title:hover { color: var(--primary); }
.post-item .post-meta { color: #999; font-size: 12px; margin-top: 6px; }
.post-item .post-type-badge { padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: bold; }

/* 徽章颜色 */
.badge-danger { background: #e74c3c; color: white; }
.badge-info { background: #3498db; color: white; }
.badge-success { background: #27ae60; color: white; }
.badge-warning { background: #f39c12; color: white; }
.badge-primary { background: #2980b9; color: white; }
.badge-secondary { background: #7f8c8d; color: white; }

/* 文章详情页 */
.post-content { line-height: 1.8; font-size: 15px; }
.post-content h1, .post-content h2, .post-content h3 { color: var(--primary); margin-top: 20px; }
.post-content p { margin-bottom: 15px; }
.post-content img { max-width: 100%; border-radius: 5px; }

/* 评论区 */
.comment-item { background: #f8f9fa; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.comment-item.reply { margin-left: 40px; background: #eef1f5; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, #3498db, #8e44ad); display: flex; align-items: center; justify-content: center; color: white; font-size: 14px; font-weight: bold; flex-shrink: 0; }
.comment-meta { font-size: 12px; color: #999; }

/* 登录页 */
.login-page { min-height: 100vh; background: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #1abc9c 100%); display: flex; align-items: center; justify-content: center; }
.login-card { background: white; border-radius: 15px; padding: 40px; max-width: 400px; width: 90%; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-logo { text-align: center; margin-bottom: 25px; }
.login-logo i { font-size: 50px; color: var(--primary); }
.login-title { font-size: 22px; font-weight: bold; color: var(--primary); text-align: center; margin-bottom: 5px; }
.login-subtitle { text-align: center; color: #999; font-size: 13px; margin-bottom: 25px; }

/* 值班表 */
.duty-table th { background: var(--primary); color: white; text-align: center; font-size: 13px; }
.duty-today { background: #fff3cd !important; font-weight: bold; }
.duty-table td { text-align: center; vertical-align: middle; padding: 8px; }

/* 病房统计 */
.ward-trend { width: 100%; height: 280px; }

/* 后台管理 */
.admin-sidebar { background: #2c3e50; min-height: 100vh; padding: 0; }
.admin-sidebar .nav-link { color: #bdc3c7; padding: 10px 20px; border-radius: 0; transition: all 0.2s; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { background: #1a252f; color: white; border-left: 3px solid #3498db; }
.admin-sidebar .nav-header { color: #7f8c8d; font-size: 11px; text-transform: uppercase; padding: 15px 20px 5px; font-weight: bold; letter-spacing: 1px; }

/* 通知中心 */
.notification-item { padding: 14px; border-bottom: 1px solid #f0f0f0; transition: background 0.2s; }
.notification-item:hover { background: #f8f9fa; }
.notification-item.unread { background: #ebf3fd; border-left: 3px solid #3498db; }
.notification-dot { width: 8px; height: 8px; border-radius: 50%; background: #3498db; flex-shrink: 0; }

/* 分页 */
.pagination .page-link { color: var(--primary); border-color: var(--border-color); }
.pagination .page-item.active .page-link { background: var(--primary); border-color: var(--primary); }

/* 表单 */
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 0.2rem rgba(26,82,118,0.25); }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #154360; border-color: #154360; }

/* 文件下载项 */
.file-item { display: flex; align-items: center; padding: 12px; background: white; border-radius: 8px; margin-bottom: 8px; box-shadow: var(--card-shadow); }
.file-item .file-icon { font-size: 28px; width: 40px; text-align: center; margin-right: 12px; }
.file-item .file-info { flex: 1; }
.file-item .file-name { font-weight: 500; color: #333; }
.file-item .file-meta { font-size: 12px; color: #999; }

/* 响应式 */
@media (max-width: 768px) {
    .stat-card .stat-number { font-size: 28px; }
    .main-container { padding: 12px 8px; }
    .brand-text { display: none; }
    .admin-sidebar { min-height: auto; }
}

/* 外链样式 */
.external-link-badge { background: #f39c12; color: white; font-size: 10px; padding: 1px 5px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.external-link-btn { background: linear-gradient(135deg, #f39c12, #e67e22); border: none; color: white; }

/* 置顶标识 */
.top-icon { color: #e74c3c; margin-right: 4px; }
.important-icon { color: #f39c12; margin-right: 4px; }

/* 动画 */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in-up { animation: fadeInUp 0.4s ease; }

/* 页脚 */
.site-footer { background: #2c3e50; color: #bdc3c7; padding: 12px 20px; margin-top: 20px; }

/* 上传区域 */
.upload-area { border: 2px dashed #bbb; border-radius: 8px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.2s; }
.upload-area:hover, .upload-area.dragover { border-color: var(--primary); background: #ebf3fd; }
.upload-area i { font-size: 40px; color: #bbb; margin-bottom: 10px; display: block; }

/* 快捷操作 */
.quick-action-btn { display: flex; flex-direction: column; align-items: center; padding: 15px 10px; background: white; border-radius: 10px; text-decoration: none; color: #333; box-shadow: var(--card-shadow); transition: all 0.2s; border: none; width: 100%; }
.quick-action-btn:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.15); text-decoration: none; color: var(--primary); }
.quick-action-btn i { font-size: 24px; margin-bottom: 8px; }

/* 搜索框 */
.search-input { border-radius: 20px; padding-left: 35px; border: 1px solid #ddd; }
.search-wrapper { position: relative; }
.search-wrapper .fa-search { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: #999; }
