/* ===== 梅睿贸易 OA 系统 — 全局统一样式 ===== */
/* 基于模板A · 经典商务风 */

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif; background: #f0f2f5; color: #2c3e50; }

/* 顶部导航 */
.topbar {
  height: 64px; min-height: 64px; background: #1e3a5f; color: #fff;
  display: flex; align-items: center; padding: 0 28px; gap: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12); z-index: 100;
}
.topbar .logo-icon { width: 34px; height: 34px; background: #4a7fc1; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; }
.topbar .company-info { display: flex; flex-direction: column; }
.topbar .company-name { font-size: 15px; font-weight: 600; line-height: 1.3; color: #fff; }
.topbar .company-en { font-size: 10px; color: rgba(255,255,255,0.5); letter-spacing: 2px; font-style: italic; font-weight: 300; }
.topbar .spacer { flex: 1; }
.topbar .time { font-size: 12px; color: rgba(255,255,255,0.65); }
.topbar .user-area { display: flex; align-items: center; gap: 12px; font-size: 12px; color: rgba(255,255,255,0.75); }
.topbar .user-name { cursor: pointer; transition: all 0.15s; }
.topbar .user-name:hover { text-decoration: underline; color: #fff; }
.topbar .avatar { width: 28px; height: 28px; background: #4a7fc1; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; }
.topbar .user-area a { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 11px; cursor: pointer; }
.topbar .user-area a:hover { color: #fff; }

/* 左侧导航 */
.sidebar {
  width: 200px; min-width: 200px; background: #2c3e50; color: rgba(255,255,255,0.7);
  display: flex; flex-direction: column; padding: 10px 0; overflow-y: auto;
}
.sidebar .nav-item {
  padding: 10px 18px; cursor: pointer; font-size: 12.5px; display: flex; align-items: center; gap: 10px;
  transition: all 0.12s; border-left: 3px solid transparent; text-decoration: none; color: rgba(255,255,255,0.7);
}
.sidebar .nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.sidebar .nav-item.active { background: rgba(74,127,193,0.15); color: #7aa5d9; border-left-color: #4a7fc1; font-weight: 500; }
.sidebar .nav-item .icon { width: 18px; text-align: center; font-size: 14px; }
.sidebar .nav-section-title { padding: 14px 18px 4px; font-size: 10px; text-transform: uppercase; color: rgba(255,255,255,0.25); letter-spacing: 1px; font-weight: 600; }

/* 面板 */
.panel { background: #fff; border-radius: 6px; overflow: visible; box-shadow: 0 1px 4px rgba(0,0,0,0.06); flex-shrink: 0; }
.panel-header {
  padding: 10px 18px; font-size: 13px; font-weight: 600; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  background: #4a7fc1;
}
.panel-header .badge { font-size: 10px; background: rgba(255,255,255,0.18); padding: 2px 8px; border-radius: 8px; font-weight: 400; }
.panel-body { padding: 16px 18px; }

/* Dashboard */
.dashboard-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.dash-card {
  background: #f5f6f8; border-radius: 6px; padding: 16px; text-align: center;
  border: 1px solid #e8eaed; cursor: pointer;
}
.dash-card:hover { background: #eef0f4; }
.dash-card .dash-icon { font-size: 22px; margin-bottom: 6px; }
.dash-card .dash-label { font-size: 11px; color: #8a9aa8; margin-bottom: 4px; }
.dash-card .dash-value { font-size: 20px; font-weight: 700; color: #2c3e50; }
.dash-card .dash-sub { font-size: 10px; color: #8a9aa8; margin-top: 2px; }
.dash-card .dash-change { font-size: 10px; margin-top: 2px; }
.dash-card .dash-change.up { color: #4a9f7a; }
.dash-card .dash-change.down { color: #b55a5a; }

/* 汇率 */
.rate-strip { display: flex; gap: 12px; margin-top: 12px; }
.rate-item { flex: 1; background: #f5f6f8; border-radius: 5px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; }
.rate-item .rate-pair { font-size: 12px; color: #4a5a6a; font-weight: 500; }
.rate-item .rate-val { font-size: 14px; font-weight: 700; color: #2c3e50; }
.rate-item .rate-change { font-size: 10px; }
.rate-item .rate-change.up { color: #4a9f7a; }
.rate-item .rate-change.down { color: #b55a5a; }

/* 工作台 */
.card-grid { display: flex; gap: 12px; }
.wg-card { flex: 1; background: #f5f6f8; border: 1px solid #e8eaed; border-radius: 6px; padding: 16px 8px; cursor: pointer; text-align: center; }
.wg-card:hover { background: #eef0f4; }
.wg-card .wg-icon { font-size: 22px; margin-bottom: 6px; }
.wg-card .wg-name { font-size: 12px; font-weight: 500; color: #2c3e50; }

/* 工作流 */
.flow-list { display: flex; flex-direction: column; gap: 10px; }
.flow-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 5px; background: #f5f6f8; cursor: pointer; }
.flow-item:hover { background: #eef0f4; }
.flow-item .fi-icon { width: 30px; height: 30px; border-radius: 5px; display: flex; align-items: center; justify-content: center; font-size: 13px; }
.flow-item .fi-icon.blue { background: #e2e9f3; color: #4a7fc1; }
.flow-item .fi-icon.green { background: #e2f0e8; color: #4a9f7a; }
.flow-item .fi-icon.orange { background: #f3ede2; color: #c1934a; }
.flow-item .fi-info { flex: 1; }
.flow-item .fi-name { font-size: 13px; font-weight: 500; color: #2c3e50; }
.flow-item .fi-desc { font-size: 11px; color: #8a9aa8; margin-top: 2px; }
.flow-item .fi-status { font-size: 10px; color: #4a7fc1; background: #e2e9f3; padding: 2px 8px; border-radius: 6px; }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th { background: #f5f6f8; padding: 10px 14px; text-align: left; font-weight: 600; color: #4a5a6a; border-bottom: 1px solid #e0e2e5; font-size: 11.5px; }
.data-table td { padding: 10px 14px; border-bottom: 1px solid #f0f1f3; color: #3a4a5a; }
.data-table tr:hover td { background: #f8f9fa; }
.data-table .tag { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 10px; font-weight: 500; }
.data-table .tag.red { background: #f4e2e2; color: #b55a5a; }
.data-table .tag.blue { background: #e2e9f3; color: #4a7fc1; }
.data-table .tag.green { background: #e2f0e8; color: #4a9f7a; }

/* 右侧栏 */
.rightbar { width: 380px; min-width: 380px; padding: 12px; overflow-y: auto; background: #f0f2f5; }
.rightbar .main-panel { background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); overflow: hidden; display: flex; flex-direction: column; height: 100%; }
.rightbar .main-panel .panel-header { padding: 10px 16px; font-size: 13px; font-weight: 600; color: #fff; display: flex; align-items: center; justify-content: space-between; background: #4a7fc1; flex-shrink: 0; }
.rightbar .main-panel .panel-body { padding: 0; flex: 1; overflow-y: auto; }
.rightbar .section { padding: 16px 16px; border-bottom: 2px solid #d0d6dc; }
.rightbar .section:last-child { border-bottom: none; }
.rightbar .section-title { font-size: 11.5px; font-weight: 600; color: #4a5a6a; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.rightbar .section-title::before { content: ''; display: inline-block; width: 3px; height: 14px; background: #4a7fc1; border-radius: 2px; }

/* 日历 */
.cal-header { display: flex; align-items: center; justify-content: space-between; font-size: 14px; font-weight: 600; color: #2c3e50; margin-bottom: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-grid .cal-weekday { padding: 5px 0; font-size: 11px; color: #8a9aa8; text-align: center; }
.cal-grid .cal-day-cell { text-align: center; padding: 6px 2px; border-radius: 4px; cursor: pointer; min-height: 44px; position: relative; }
.cal-grid .cal-day-cell .day-num { font-size: 15px; font-weight: 500; color: #2c3e50; display: block; margin-bottom: 2px; }
.cal-grid .cal-day-cell .day-sub { font-size: 10px; color: #aab5c0; line-height: 1.2; }
.cal-grid .cal-day-cell.weekend .day-num { color: #b55a5a; }
.cal-grid .cal-day-cell.holiday { background: #fce4e4; }
.cal-grid .cal-day-cell.holiday .day-num { color: #b55a5a; font-weight: 600; }
.cal-grid .cal-day-cell.holiday .day-sub { color: #b55a5a; }
.cal-grid .cal-day-cell.today { background: #4a7fc1; }
.cal-grid .cal-day-cell.today .day-num { color: #fff; font-weight: 600; }
.cal-grid .cal-day-cell.today .day-sub { color: rgba(255,255,255,0.7); }
.cal-grid .cal-day-cell.other-month .day-num { color: #d0d6dc; }
.cal-grid .cal-day-cell.other-month .day-sub { color: #e0e4e8; }
.cal-grid .cal-day-cell.selected { box-shadow: inset 0 0 0 2px #4a7fc1; }
.cal-grid .cal-day-cell.today.selected { box-shadow: inset 0 0 0 2px #fff; }
/* 右上角标记 — 用 ::after 伪元素 */
.cal-grid .cal-day-cell.has-corner-holiday::after {
  content: '休'; position: absolute; top: 1px; right: 1px;
  font-size: 7px; background: #b55a5a; color: #fff;
  padding: 0 2px; border-radius: 2px; font-weight: 700; line-height: 1.5;
}
.cal-grid .cal-day-cell.has-corner-today::after {
  content: '今'; position: absolute; top: 1px; right: 1px;
  font-size: 7px; background: #4a7fc1; color: #fff;
  padding: 0 2px; border-radius: 2px; font-weight: 700; line-height: 1.5;
}
.cal-grid .cal-day-cell.today.has-corner-today::after { background: #fff; color: #4a7fc1; }
/* 考勤异常红圈 */
.cal-grid .cal-day-cell.attn-abnormal::after { content: ''; position: absolute; top: 2px; left: 2px; width: 8px; height: 8px; background: #b55a5a; border-radius: 50%; }
.cal-grid .cal-day-cell:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.15); transform: translateY(-1px); }
.cal-nav { cursor: pointer; color: #4a7fc1; font-weight: 700; padding: 2px 6px; font-size: 16px; border-radius: 3px; transition: all 0.15s; display: inline-block; }
.cal-nav:hover { background: #e2e9f3; color: #1e3a5f; }
/* 日历下方信息栏 */
.cal-info { margin-top: 10px; font-size: 12px; color: #4a5a6a; line-height: 1.6; }
.cal-info .cal-info-line { padding: 2px 0; }
.cal-info .cal-yi { color: #4a9f7a; }
.cal-info .cal-ji { color: #b55a5a; }

/* 今日概况 */
.info-strip { display: flex; gap: 8px; }
.info-strip .info-item { flex: 1; background: #f5f6f8; border-radius: 5px; padding: 10px 8px; text-align: center; }
.info-strip .info-item .info-weather-icon { font-size: 18px; }
.info-strip .info-item .info-label { font-size: 9.5px; color: #8a9aa8; margin-top: 2px; }
.info-strip .info-item .info-val { font-size: 12px; font-weight: 600; color: #2c3e50; }
.info-strip .info-item.attn-warn { background: #fef5e6; border: 1px solid #f0d8a8; }
.info-strip .info-item.attn-warn .info-val { color: #c1934a; }
.info-strip .info-item.weather-main { cursor: pointer; transition: all 0.15s; }
.info-strip .info-item.weather-main:hover { background: #eef0f4; }
.weather-detail { background: #f8f9fa; border-radius: 4px; padding: 0 8px; margin-top: 4px; }

/* 列表 */
.list-items { display: flex; flex-direction: column; gap: 4px; }
.list-item { padding: 6px 0; border-bottom: 1px solid #f0f1f3; }
.list-item:last-child { border-bottom: none; }
.list-item .li-title { font-size: 12px; color: #2c3e50; line-height: 1.4; }
.list-item .li-meta { font-size: 10px; color: #8a9aa8; margin-top: 1px; }

/* 欢迎横幅 */
.hero-banner {
  background: linear-gradient(135deg, #1e3a5f 0%, #3a6a9f 100%); border-radius: 6px; padding: 22px 28px; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 8px rgba(30,58,95,0.2);
}
.hero-banner .hero-text h2 { font-size: 18px; font-weight: 600; }
.hero-banner .hero-text p { font-size: 13px; opacity: 0.7; margin-top: 4px; }
.hero-banner .hero-badge { background: rgba(255,255,255,0.1); padding: 5px 14px; border-radius: 16px; font-size: 11.5px; }

/* 表单 */
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: #4a5a6a; margin-bottom: 5px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #d0d6dc; border-radius: 4px; font-size: 13px; font-family: inherit;
  color: #2c3e50; background: #fff; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: #4a7fc1; box-shadow: 0 0 0 2px rgba(74,127,193,0.1); }
.form-group textarea { resize: vertical; min-height: 60px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: none; border-radius: 4px; font-size: 13px; font-weight: 500;
  cursor: pointer; transition: all 0.15s; font-family: inherit;
}
.btn-primary { background: #4a7fc1; color: #fff; }
.btn-primary:hover { background: #3a6a9f; }
.btn-danger { background: #b55a5a; color: #fff; }
.btn-danger:hover { background: #9a4a4a; }
.btn-outline { background: #fff; color: #4a7fc1; border: 1px solid #4a7fc1; }
.btn-outline:hover { background: #e2e9f3; }
.btn-sm { padding: 5px 12px; font-size: 11.5px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 消息提示 */
.toast { position: fixed; top: 20px; right: 20px; z-index: 9999; padding: 12px 20px; border-radius: 6px; font-size: 13px; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: toastIn 0.3s ease; }
.toast.success { background: #4a9f7a; }
.toast.error { background: #b55a5a; }
.toast.info { background: #4a7fc1; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }

/* 设置页/内容页通用 */
.content-page { flex: 1; padding: 18px; overflow-y: auto; }
.page-title { font-size: 16px; font-weight: 600; color: #1e3a5f; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.settings-section { background: #fff; border-radius: 6px; box-shadow: 0 1px 4px rgba(0,0,0,0.06); padding: 18px; margin-bottom: 16px; }
.settings-section h3 { font-size: 14px; font-weight: 600; color: #1e3a5f; margin-bottom: 14px; padding-bottom: 10px; border-bottom: 1px solid #e8eaed; display: flex; align-items: center; gap: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* 模块入口卡片 */
.module-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.module-card {
  background: #fff; border-radius: 6px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  cursor: pointer; text-align: center; transition: all 0.15s; border: 1px solid #e8eaed; text-decoration: none; color: inherit;
}
.module-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.1); transform: translateY(-2px); }
.module-card .mc-icon { font-size: 32px; margin-bottom: 10px; }
.module-card .mc-name { font-size: 14px; font-weight: 600; color: #2c3e50; }
.module-card .mc-desc { font-size: 11px; color: #8a9aa8; margin-top: 4px; }

/* 齿轮图标 */
.settings-gear {
  color: rgba(255,255,255,0.5); text-decoration: none; font-size: 16px; cursor: pointer;
  transition: all 0.2s; display: flex; align-items: center;
}
.settings-gear:hover { color: #fff; transform: rotate(30deg); }

/* 弹窗 */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.2); max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; }
.modal-header { padding: 14px 18px; background: #4a7fc1; color: #fff; font-size: 14px; font-weight: 600; border-radius: 8px 8px 0 0; display: flex; align-items: center; justify-content: space-between; }
.modal-header .close-btn { background: none; border: none; color: rgba(255,255,255,0.7); font-size: 18px; cursor: pointer; }
.modal-header .close-btn:hover { color: #fff; }
.modal-body { padding: 18px; }
.modal-footer { padding: 12px 18px; border-top: 1px solid #e8eaed; display: flex; justify-content: flex-end; gap: 8px; }

/* 滚动条 */
.content, .rightbar, .sidebar, .content-page { overflow-y: auto; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c0c8d0; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #a0a8b0; }