/* 会易通后台管理系统 - Vue 3.0 主题风格 */
/* Vue 品牌色：主绿 #42b883 / 深绿 #369870 / 深灰蓝 #35495e */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #42b883; --primary-light: #4fc19a; --primary-dark: #369870; --primary-bg: #f0fbf6;
  --secondary: #35495e; --secondary-light: #4a6075;
  --success: #42b883; --warning: #ff9e2c; --danger: #f04e4e; --info: #3eaf7c;
  --text: #2c3e50; --text2: #6b7280; --text3: #909399;
  --border: #e6e6e6; --border-light: #f0f0f0; --bg: #f5f7f5;
  --radius: 6px; --radius-sm: 4px; --radius-lg: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --shadow-hover: 0 4px 12px rgba(0,0,0,.08), 0 8px 24px rgba(0,0,0,.06);
  --transition: .25s cubic-bezier(.4,0,.2,1);
}
body { font-family: "Source Sans Pro","PingFang SC","Microsoft YaHei","Helvetica Neue",Arial,system-ui,sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ---------- 登录页 ---------- */
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #35495e 0%, #2c3e50 50%, #1f2d3a 100%);
  position: relative; overflow: hidden; }
.login-wrap::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 20% 30%, rgba(66,184,131,.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(66,184,131,.1), transparent 50%); }
.login-box { width: 400px; background: #fff; border-radius: var(--radius-lg); padding: 44px 38px;
  box-shadow: 0 8px 32px rgba(0,0,0,.16), 0 2px 8px rgba(0,0,0,.08);
  position: relative; z-index: 2; border-top: 4px solid var(--primary); }
.login-logo { text-align: center; margin-bottom: 30px; }
.login-logo .logo-ic { width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg,#42b883,#35495e);
  color: #fff; font-size: 26px; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 14px;
  box-shadow: 0 4px 12px rgba(66,184,131,.3); }
.login-logo h1 { font-size: 20px; color: var(--text); font-weight: 600; }
.login-logo p { color: var(--text2); margin-top: 6px; font-size: 12px; letter-spacing: 1px; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 220px; background: #35495e; color: #b9c2cd; flex-shrink: 0; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: var(--transition);
  box-shadow: 2px 0 8px rgba(0,0,0,.05); }
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }
.side-logo { height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 20px; color: #fff;
  font-weight: 600; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,.06); }
.side-logo .logo-ic { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg,#42b883,#3eaf7c);
  display: flex; align-items: center; justify-content: center; font-size: 16px; color: #fff;
  box-shadow: 0 2px 6px rgba(66,184,131,.4); }
.side-menu { flex: 1; padding: 10px 0 20px; }
.menu-group-wrap { margin-bottom: 2px; }
.menu-group { padding: 10px 20px; font-size: 14px; color: #cbd5e1; font-weight: 600; cursor: pointer;
  user-select: none; display: flex; align-items: center; gap: 8px; transition: var(--transition); }
.menu-group:hover { color: #fff; background: rgba(255,255,255,.04); }
.menu-group .arrow { display: inline-block; font-size: 12px; transition: transform .25s cubic-bezier(.4,0,.2,1);
  width: 12px; line-height: 1; text-align: center; }
.menu-group-wrap.collapsed .menu-group .arrow { transform: rotate(-90deg); }
.menu-sub { overflow: hidden; }
.menu-group-wrap.collapsed .menu-sub { display: none; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 10px 20px 10px 40px; cursor: pointer; color: #b9c2cd;
  border-left: 3px solid transparent; transition: var(--transition); font-size: 14px; position: relative; }
.menu-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.menu-item.active { background: rgba(66,184,131,.15); color: #fff; border-left-color: var(--primary); }
.menu-item.active::after { content: ""; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: 60px; background: #fff; border-bottom: 1px solid var(--border-light); display: flex; align-items: center;
  padding: 0 24px; gap: 14px; position: sticky; top: 0; z-index: 20; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.topbar h2 { font-size: 16px; font-weight: 600; color: var(--text); flex: 1; }
.topbar .user-box { display: flex; align-items: center; gap: 10px; color: var(--text2); font-size: 13px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,#42b883,#35495e);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; overflow: hidden;
  font-weight: 600; box-shadow: 0 2px 6px rgba(66,184,131,.3); }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.page { padding: 22px 24px; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px;
  border: 1px solid var(--border-light); transition: var(--transition); }
.card:hover { box-shadow: var(--shadow-hover); }
.card h3 { font-size: 15px; font-weight: 600; color: var(--text); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(210px,1fr)); gap: 16px; margin-bottom: 18px; }
.stat-card { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow);
  display: flex; gap: 14px; align-items: center; border: 1px solid var(--border-light);
  transition: var(--transition); border-left: 3px solid var(--primary); }
.stat-card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { border-color: var(--primary); }
.stat-card .ic { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0; }
.stat-card .num { font-size: 24px; font-weight: 700; color: var(--text); }
.stat-card .lbl { color: var(--text2); font-size: 13px; margin-top: 2px; }
.ic-blue { background: #e8f4fd; color: #4a9eff; } .ic-green { background: #e8f8ef; color: #42b883; }
.ic-orange { background: #fdf3e0; color: #ff9e2c; } .ic-red { background: #fde8e8; color: #f04e4e; }
.ic-cyan { background: #e0f5f5; color: #3aa7a7; } .ic-purple { background: #efe3fd; color: #7e57c2; }

/* ---------- 表格 ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar h3 { font-size: 15px; font-weight: 600; color: var(--text); margin-right: 4px; }
.table-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto;
  border: 1px solid var(--border-light); }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th, .tbl td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.tbl th { background: #f8faf8; color: #4a6075; font-weight: 600; position: sticky; top: 0;
  text-transform: uppercase; font-size: 12px; letter-spacing: .5px; }
.tbl tbody tr { transition: var(--transition); }
.tbl tbody tr:hover { background: var(--primary-bg); }
.tbl td.actions { white-space: nowrap; }
.tbl td.actions button { margin-right: 6px; }
.tbl td.actions button:last-child { margin-right: 0; }
.tbl .txt-ellip { max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
.cover-img { width: 64px; height: 40px; border-radius: var(--radius-sm); object-fit: cover; background: var(--border-light); }
.page-ft { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 4px; }
.empty { text-align: center; color: var(--text2); padding: 40px 0; }

/* ---------- 按钮/输入 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--border); background: #fff; color: var(--text);
  padding: 8px 16px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; transition: var(--transition);
  white-space: nowrap; font-weight: 500; outline: none; line-height: 1.4; }
.btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-bg); }
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; box-shadow: 0 2px 8px rgba(66,184,131,.35); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 2px 8px rgba(66,184,131,.35); }
.btn-warning { background: var(--warning); border-color: var(--warning); color: #fff; }
.btn-warning:hover { background: #e88e1f; color: #fff; box-shadow: 0 2px 8px rgba(255,158,44,.35); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #e04444; color: #fff; box-shadow: 0 2px 8px rgba(240,78,78,.35); }
.btn-sm { padding: 5px 12px; font-size: 12px; }
.btn-ghost { border: none; background: transparent; color: var(--text2); }
.btn-ghost:hover { color: var(--primary); background: var(--primary-bg); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.input, .select, .textarea { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; font-size: 13.5px;
  background: #fff; color: var(--text); outline: none; transition: var(--transition); }
.input:hover, .select:hover, .textarea:hover { border-color: #c0c4cc; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(66,184,131,.15); }
.textarea { width: 100%; resize: vertical; min-height: 80px; font-family: inherit; }
input[type=date].input, input[type=datetime-local].input, input[type=time].input { font-family: inherit; }
.form-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: center; margin-bottom: 14px; }
.form-row > label { color: var(--text2); text-align: right; font-size: 13px; }
.form-row .tip { font-size: 12px; color: var(--text3); grid-column: 2; margin-top: -6px; }

/* ---------- 标签 / 弹窗 ---------- */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; line-height: 18px; font-weight: 500; }
.tag-gray { background: #f4f4f5; color: #6b7785; } .tag-blue { background: #e8f4fd; color: #4a9eff; }
.tag-green { background: #e8f8ef; color: #3eaf7c; } .tag-orange { background: #fdf3e0; color: #d8851a; }
.tag-red { background: #fde8e8; color: #d84a4a; } .tag-cyan { background: #e0f5f5; color: #3aa7a7; }
.tag-purple { background: #efe3fd; color: #7e57c2; }
.mask { position: fixed; inset: 0; background: rgba(44,62,80,.5); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 99; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.dialog { background: #fff; border-radius: var(--radius-lg); width: 640px; max-width: 94vw; max-height: 90vh; overflow: auto;
  box-shadow: 0 16px 48px rgba(0,0,0,.16), 0 4px 16px rgba(0,0,0,.08); animation: slideDown .25s cubic-bezier(.4,0,.2,1);
  border-top: 3px solid var(--primary); }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.dialog.sm { width: 420px; } .dialog.lg { width: 860px; }
.dlg-head { padding: 16px 22px; border-bottom: 1px solid var(--border-light); display: flex; align-items: center;
  font-size: 16px; font-weight: 600; color: var(--text); }
.dlg-head .x { margin-left: auto; cursor: pointer; color: var(--text3); font-size: 20px; transition: var(--transition);
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.dlg-head .x:hover { background: var(--border-light); color: var(--text); }
.dlg-body { padding: 20px 22px; }
.dlg-foot { padding: 14px 22px; border-top: 1px solid var(--border-light); display: flex; justify-content: center; gap: 12px; background: #fafafa; }
.dlg-foot .btn { min-width: 100px; }

/* ---------- Box 提示（仿 Vue3 Message Box） ---------- */
.toast-container { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast-box { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 480px; padding: 12px 20px;
  border-radius: var(--radius); box-shadow: 0 6px 24px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
  font-size: 13.5px; font-weight: 500; background: #fff; border: 1px solid var(--border-light);
  opacity: 0; transform: translateY(-12px); transition: all .3s cubic-bezier(.4,0,.2,1); pointer-events: auto; }
.toast-box.show { opacity: 1; transform: translateY(0); }
.toast-box .ic { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.toast-box.ok { border-left: 4px solid var(--success); }
.toast-box.ok .ic { background: var(--success); }
.toast-box.err { border-left: 4px solid var(--danger); }
.toast-box.err .ic { background: var(--danger); }
.toast-box.info { border-left: 4px solid var(--secondary); }
.toast-box.info .ic { background: var(--secondary); }
.toast-box .msg { flex: 1; color: var(--text); }
.toast-box .close { cursor: pointer; color: var(--text3); font-size: 16px; line-height: 1; padding: 0 0 0 8px;
  opacity: .5; transition: var(--transition); }
.toast-box .close:hover { opacity: 1; color: var(--text); }

.muted { color: var(--text2); } .fs12 { font-size: 12px; } .mb16 { margin-bottom: 16px; } .mt8 { margin-top: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.flex { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; }
.pointer { cursor: pointer; } .right { text-align: right; }
/* 详情描述 */
.desc-view { line-height: 1.8; white-space: pre-wrap; color: #3a4a5c; }
.badge-dot { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
/* loading 占位 */
.loading-box { text-align: center; padding: 60px 0; color: var(--text2); }
.loading-box .spin { display: inline-block; width: 28px; height: 28px; border: 3px solid var(--border-light);
  border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; margin-bottom: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
