/* ===== 号卡代理结算系统 · 全局样式（参考蜜蜂记账：琥珀主色 + 圆角卡片 + Material 图标） ===== */
:root {
  --primary: #F59E0B;
  --primary-dark: #D97706;
  --primary-light: #FEF3C7;
  --bg: #F9FAFB;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --text: #111827;
  --text-2: #6B7280;
  --text-3: #9CA3AF;
  --green: #10B981;
  --green-light: #D1FAE5;
  --red: #EF4444;
  --red-light: #FEE2E2;
  --blue: #3B82F6;
  --blue-light: #DBEAFE;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --sidebar-w: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }

/* Material Symbols 图标基础 */
[v-cloak] { display: none !important; }

.ms { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal;
  line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block;
  white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; user-select: none; }

/* ===== 布局 ===== */
.layout { display: flex; min-height: 100vh; }

/* ===== 侧边栏（分组标题小字 + 菜单项大字带图标缩进，层次区分明显） ===== */
.sidebar { width: var(--sidebar-w); background: var(--card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 30; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px;
  border-bottom: 1px solid var(--border); }
.sidebar-brand .logo { width: 34px; height: 34px; border-radius: 9px; background: var(--primary);
  display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; }
.sidebar-brand .name { font-size: 15px; font-weight: 700; }
.sidebar-brand .sub { font-size: 11px; color: var(--text-3); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 0 20px; }
/* 分组标题：更小字号、灰色、大写间距、无图标 */
.nav-group-title { font-size: 11px; font-weight: 600; color: var(--text-3);
  letter-spacing: .08em; padding: 16px 20px 6px; }
/* 菜单项：更大字号(14px)、图标 20px、左缩进 12px */
.nav-item { display: flex; align-items: center; gap: 10px; margin: 2px 12px;
  padding: 9px 12px; border-radius: 8px; font-size: 14px; color: var(--text-2);
  cursor: pointer; transition: background .15s, color .15s; }
.nav-item .ms { font-size: 20px; color: var(--text-3); transition: color .15s; }
.nav-item:hover { background: #F3F4F6; color: var(--text); }
.nav-item.active { background: var(--primary-light); color: var(--primary-dark); font-weight: 600; }
.nav-item.active .ms { color: var(--primary); }
.nav-item .badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px;
  border-radius: 999px; padding: 1px 7px; }
.sidebar-user { border-top: 1px solid var(--border); padding: 12px 16px;
  display: flex; align-items: center; gap: 10px; }
.sidebar-user .avatar { width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary-dark); display: flex;
  align-items: center; justify-content: center; font-weight: 700; }
.sidebar-user .uname { font-size: 13px; font-weight: 600; }
.sidebar-user .urole { font-size: 11px; color: var(--text-3); }
.sidebar-user .logout { margin-left: auto; color: var(--text-3); cursor: pointer; }
.sidebar-user .logout:hover { color: var(--red); }

/* ===== 主区域 ===== */
.main { flex: 1; margin-left: var(--sidebar-w); padding: 24px 28px; min-width: 0; }
.page-title { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.page-desc { font-size: 13px; color: var(--text-2); margin-bottom: 20px; }

/* ===== 卡片 ===== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; display: flex;
  align-items: center; gap: 8px; }
.card-title .ms { font-size: 20px; color: var(--primary); }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 16px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px 18px; display: flex; align-items: center; gap: 14px; }
.stat-card .icon { width: 42px; height: 42px; border-radius: 10px; display: flex;
  align-items: center; justify-content: center; font-size: 22px; }
.stat-card .icon.amber { background: var(--primary-light); color: var(--primary-dark); }
.stat-card .icon.green { background: var(--green-light); color: var(--green); }
.stat-card .icon.blue { background: var(--blue-light); color: var(--blue); }
.stat-card .icon.red { background: var(--red-light); color: var(--red); }
.stat-card .num { font-size: 22px; font-weight: 700; }
.stat-card .lbl { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; padding: 10px 12px; color: var(--text-2); font-weight: 600;
  font-size: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid #F3F4F6; vertical-align: middle; }
.tbl tr:hover td { background: #FAFAFA; }
.tbl .empty { text-align: center; color: var(--text-3); padding: 32px 0; }

/* ===== 标签 ===== */
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  padding: 2px 9px; border-radius: 999px; font-weight: 500; }
.tag.green { background: var(--green-light); color: #047857; }
.tag.amber { background: var(--primary-light); color: var(--primary-dark); }
.tag.red { background: var(--red-light); color: #B91C1C; }
.tag.gray { background: #F3F4F6; color: var(--text-2); }
.tag.blue { background: var(--blue-light); color: #1D4ED8; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 13px; padding: 8px 14px;
  border-radius: 8px; cursor: pointer; transition: all .15s; font-family: var(--font); }
.btn .ms { font-size: 17px; }
.btn:hover { background: #F3F4F6; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-light); }
.btn.sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }

/* ===== 表单 ===== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px;
  color: var(--text); }
.form-row label .req { color: var(--red); }
.input, select.input { width: 100%; border: 1px solid var(--border); border-radius: 8px;
  padding: 9px 12px; font-size: 14px; font-family: var(--font); background: #fff;
  transition: border .15s, box-shadow .15s; }
.input:focus { outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(17,24,39,.45); z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 14px; width: 460px; max-width: 100%;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 50px rgba(0,0,0,.2); }
.modal-head { display: flex; align-items: center; padding: 16px 20px;
  border-bottom: 1px solid var(--border); }
.modal-head .t { font-size: 15px; font-weight: 700; }
.modal-head .x { margin-left: auto; cursor: pointer; color: var(--text-3); }
.modal-head .x:hover { color: var(--text); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px;
  border-top: 1px solid var(--border); }

/* ===== 收款码缩略图 ===== */
.qr-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); cursor: pointer; }
.qr-preview { max-width: 100%; border-radius: 10px; border: 1px solid var(--border); }

/* ===== Toast ===== */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: #111827; color: #fff; padding: 10px 18px; border-radius: 9px;
  font-size: 13px; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex;
  align-items: center; gap: 8px; animation: toastIn .25s ease; }
.toast.ok { background: #065F46; }
.toast.err { background: #991B1B; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; } }

/* ===== 登录页 ===== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 45%, #FDE68A 100%); padding: 20px; }
.login-card { background: #fff; width: 380px; max-width: 100%; border-radius: 18px;
  box-shadow: 0 20px 60px rgba(217,119,6,.18); padding: 32px 30px; }
.login-card .logo { width: 52px; height: 52px; border-radius: 14px; background: var(--primary);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px; }
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-card .sub { text-align: center; color: var(--text-2); font-size: 13px; margin-bottom: 24px; }
.login-tabs { display: flex; background: #F3F4F6; border-radius: 9px; padding: 3px;
  margin-bottom: 20px; }
.login-tabs div { flex: 1; text-align: center; padding: 7px 0; border-radius: 7px;
  font-size: 13px; cursor: pointer; color: var(--text-2); }
.login-tabs div.active { background: #fff; color: var(--text); font-weight: 600;
  box-shadow: var(--shadow); }

/* 空状态 */
.empty-state { text-align: center; padding: 40px 0; color: var(--text-3); }
.empty-state .ms { font-size: 44px; display: block; margin-bottom: 8px; }

/* 提示条 */
.banner { border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
  display: flex; gap: 10px; align-items: flex-start; }
.banner .ms { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.banner.amber { background: var(--primary-light); color: #92400E; }
.banner.green { background: var(--green-light); color: #065F46; }

/* ===== 响应式 ===== */
.menu-fab { display: none; }
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.2); }
  .main { margin-left: 0; padding: 16px; }
  .menu-fab { display: flex; position: fixed; left: 14px; bottom: 14px; z-index: 40;
    width: 46px; height: 46px; border-radius: 50%; background: var(--primary); color: #fff;
    align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(245,158,11,.4);
    border: none; cursor: pointer; font-size: 22px; }
  .form-2col { grid-template-columns: 1fr; }
}
