/* =========================================================
   福安康 · 进销存台账系统 —— 精致亮色设计系统 v2
   阳光海岸意象 · 大字号高对比（50岁用户） · 精细阴影层次
   ========================================================= */
:root {
  /* 品牌色：海青 → 深青绿（呼应登录页海景） */
  --primary: #0d9488;
  --primary-deep: #0f766e;
  --primary-soft: #e9f7f4;
  --primary-ring: rgba(13, 148, 136, .16);
  --accent: #0ea5e9;
  --grad: linear-gradient(135deg, #0ea5e9 0%, #0d9488 100%);
  --grad-soft: linear-gradient(135deg, #eef7fe 0%, #e9faf6 100%);

  --bg: #f5f7f9;
  --card: #ffffff;
  --border: #eaeef2;
  --border-strong: #d8dee6;
  --text: #101828;
  --text-sub: #475467;
  --text-faint: #667085;

  --danger: #d92d20;
  --danger-soft: #fef3f2;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --warn: #b54708;
  --warn-soft: #fffaeb;

  --sidebar-bg: #ffffff;
  --sidebar-text: #475467;
  --sidebar-active: #e9f7f4;
  --sidebar-hover: #f2f5f8;
  --sidebar-border: #eaeef2;

  --red: #d92d20;
  --green: #067647;

  /* 精细分层阴影 */
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
  --shadow-md: 0 2px 4px rgba(16, 24, 40, .04), 0 6px 16px rgba(16, 24, 40, .07);
  --shadow-lg: 0 4px 8px rgba(16, 24, 40, .05), 0 18px 44px rgba(16, 24, 40, .1);
  --shadow-primary: 0 2px 6px rgba(13, 148, 136, .22), 0 8px 22px rgba(13, 148, 136, .22);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 18px;
  --r-xl: 24px;

  --ease: cubic-bezier(.22, 1, .36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.hidden { display: none !important; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 0 18px; min-height: 42px; border-radius: var(--r-sm); border: 1px solid var(--border-strong);
  background: #fff; color: var(--text); cursor: pointer; font-size: 14.5px; font-weight: 500;
  transition: all .18s var(--ease); white-space: nowrap; box-shadow: var(--shadow-xs);
}
.btn:hover { border-color: var(--primary); color: var(--primary-deep); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: var(--shadow-xs); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-primary {
  background: var(--grad); border-color: transparent; color: #fff; box-shadow: var(--shadow-primary);
  font-weight: 600; letter-spacing: 2px;
}
.btn-primary:hover { color: #fff; filter: brightness(1.06); box-shadow: 0 4px 10px rgba(13, 148, 136, .28), 0 12px 28px rgba(13, 148, 136, .26); }
.btn-danger { background: var(--danger); border-color: transparent; color: #fff; box-shadow: 0 2px 6px rgba(217, 45, 32, .22), 0 8px 20px rgba(217, 45, 32, .2); }
.btn-danger:hover { color: #fff; background: #b42318; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--text-sub); }
.btn-ghost:hover { background: #eef1f5; color: var(--text); box-shadow: none; transform: none; }
.btn-sm { padding: 0 13px; min-height: 34px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- 输入 ---------- */
input, select, textarea {
  width: 100%; padding: 0 14px; min-height: 42px; border: 1px solid var(--border-strong);
  border-radius: var(--r-sm); font-size: 15px; color: var(--text); background: #fff;
  outline: none; transition: border .18s, box-shadow .18s, background .18s; font-family: inherit;
}
textarea { padding: 11px 14px; min-height: 76px; line-height: 1.6; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #bcc5d0; }
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring);
}
input:disabled, select:disabled, textarea:disabled { background: #f5f7fa; color: var(--text-sub); cursor: not-allowed; }
input::placeholder, textarea::placeholder { color: #98a2b3; }
label { display: block; font-size: 14px; color: var(--text-sub); margin-bottom: 16px; }
label > span { display: block; margin-bottom: 7px; color: var(--text); font-weight: 600; }

/* =========================================================
   登录页 —— 自绘日出 · 阳光照射（纯 CSS，无图片）
   ========================================================= */
.login-wrap {
  position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center;
  overflow: hidden; padding: 24px;
  /* 日出天空：晨蓝 → 暖橙 */
  background: linear-gradient(180deg, #bfe0f2 0%, #dcedef 26%, #f7ead0 50%, #ffd9a6 68%, #ffc791 82%, #ffb97e 100%);
}
.login-scene { position: absolute; inset: 0; overflow: hidden; }

/* 太阳光晕（大范围暖光） */
.sun-halo {
  position: absolute; left: 24%; top: 67%; width: 74vmax; height: 74vmax;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle,
    rgba(255, 226, 150, .58) 0%, rgba(255, 218, 130, .30) 26%,
    rgba(255, 214, 128, .12) 44%, rgba(255, 214, 128, 0) 64%);
}
/* 发散光芒（低透明度放射线，缓慢旋转） */
.rays {
  position: absolute; left: 24%; top: 67%; width: 150vmax; height: 150vmax;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 8deg,
    rgba(255, 226, 150, .16) 0deg 5deg, rgba(255, 226, 150, 0) 5deg 20deg);
  -webkit-mask-image: radial-gradient(circle, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 34%, transparent 58%);
  mask-image: radial-gradient(circle, rgba(0,0,0,.85) 0%, rgba(0,0,0,.35) 34%, transparent 58%);
  filter: blur(2px);
  animation: rays-spin 150s linear infinite;
}
@keyframes rays-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

/* 太阳本体 */
.sun {
  position: absolute; left: 24%; top: 67%; width: 168px; height: 168px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: radial-gradient(circle at 42% 36%, #fffef6 0%, #fff3c2 48%, #ffdd85 100%);
  box-shadow: 0 0 44px 18px rgba(255, 240, 190, .65), 0 0 110px 44px rgba(255, 214, 120, .38);
}
/* 洒向画面的斜射光束（日出后晨光斜照） */
.beam {
  position: absolute; left: 24%; top: 67%; width: 22vmax; height: 120vmax;
  transform-origin: 50% 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 235, 175, .30) 0%, rgba(255, 235, 175, 0) 72%);
  filter: blur(24px);
}
.beam-a { transform: translate(-50%, 0) rotate(148deg); }
.beam-b { transform: translate(-50%, 0) rotate(212deg); width: 13vmax; opacity: .75; }
/* 光束缓慢呼吸 */
.beam-a { animation: beam-sway 14s ease-in-out infinite alternate; }
.beam-b { animation: beam-sway 18s ease-in-out infinite alternate-reverse; }
@keyframes beam-sway { from { filter: blur(24px) opacity(1); } to { filter: blur(30px) opacity(.72); } }

/* 淡淡的霞光云带（缓慢飘移） */
.cloud { position: absolute; border-radius: 999px; filter: blur(12px); background: rgba(255, 255, 255, .82); }
.cloud-a { width: 36vmax; height: 30px; left: 9%; top: 21%; opacity: .48; animation: cloud-drift 46s ease-in-out infinite alternate; }
.cloud-b { width: 22vmax; height: 22px; left: 63%; top: 37%; opacity: .38; animation: cloud-drift 58s ease-in-out infinite alternate-reverse; }
@keyframes cloud-drift { from { transform: translateX(-2.4%); } to { transform: translateX(2.4%); } }

/* 地平线海面：暖橙 + 太阳倒影光路 */
.sea {
  position: absolute; left: 0; right: 0; bottom: 0; height: 33%;
  background: linear-gradient(180deg, #ffb87e 0%, #ffc78f 22%, #ffd8a8 52%, #ffe6c6 100%);
}
.sea::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, transparent 4%, rgba(255, 246, 214, .9) 38%, rgba(255, 252, 236, .95) 50%, rgba(255, 246, 214, .9) 62%, transparent 96%);
  filter: blur(1px);
}
.sea .glint {
  position: absolute; left: 50%; top: 0; width: 200px; height: 100%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 248, 220, .85) 0%, rgba(255, 246, 210, .38) 42%, rgba(255, 246, 210, 0) 88%);
  filter: blur(7px);
}

.login-card {
  position: relative; z-index: 2; width: 430px; max-width: 100%;
  background: rgba(255, 255, 255, .8);
  backdrop-filter: blur(26px) saturate(1.5); -webkit-backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid rgba(255, 255, 255, .85);
  border-radius: var(--r-xl); padding: 44px 40px 30px;
  box-shadow: 0 8px 24px rgba(120, 72, 20, .10), 0 32px 80px rgba(150, 90, 30, .18);
  animation: login-in .7s var(--ease);
}
@keyframes login-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
.login-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 32px; }
.login-brand h1 { font-size: 28px; letter-spacing: 2px; }
.login-brand p { color: var(--text-sub); font-size: 13.5px; margin-top: 3px; letter-spacing: .5px; }
/* Logo：透明底图形，去掉矩形阴影框（避免"边框四角留白"感） */
.logo {
  width: 58px; height: 58px; display: block; flex-shrink: 0;
  filter: drop-shadow(0 4px 10px rgba(90, 158, 63, .28));
}
.login-card input {
  background: rgba(255, 255, 255, .88);
  border-color: rgba(16, 24, 40, .12);
}
.login-card input:hover { border-color: rgba(13, 148, 136, .45); }
.login-error { color: var(--danger); font-size: 14px; min-height: 22px; margin: 2px 0 10px; }
.login-card .btn-block { margin-top: 8px; height: 50px; font-size: 16.5px; border-radius: 12px; letter-spacing: 8px; text-indent: 8px; }
.login-foot {
  margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(16, 24, 40, .07);
  text-align: center; color: var(--text-faint); font-size: 12.5px; letter-spacing: 3px;
}

/* 移动端：卡片近乎全屏，海面收窄、太阳下移露出 */
@media (max-width: 640px) {
  .sea { height: 17%; }
  .sun-halo, .rays, .sun, .beam { top: 77%; }
}

/* ---------- 布局 ---------- */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  width: 242px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; flex-shrink: 0;
  border-right: 1px solid var(--sidebar-border);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px; padding: 24px 20px 20px;
  background: linear-gradient(180deg, #f7fdfb 0%, rgba(255,255,255,0) 100%);
}
.sidebar-brand .logo { width: 42px; height: 42px; font-size: 21px; }
.brand-name { color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: 1px; }
.brand-sub { font-size: 11.5px; color: var(--text-faint); margin-top: 1px; letter-spacing: 1px; }
.nav { flex: 1; overflow-y: auto; padding: 6px 14px 20px; }
.nav-section {
  padding: 18px 12px 8px; font-size: 12px; color: var(--text-faint); letter-spacing: 2px;
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin: 3px 0;
  color: var(--sidebar-text); cursor: pointer; font-size: 15px; font-weight: 500;
  border-radius: 10px; transition: all .16s var(--ease); position: relative;
}
.nav-item:hover { background: var(--sidebar-hover); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, #e9f7f4 0%, #e8f4fb 100%);
  color: var(--primary-deep); font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(13, 148, 136, .14);
}
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3.5px;
  border-radius: 4px; background: var(--grad);
}
.nav-item .ico { width: 21px; height: 21px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-item .ico svg { width: 21px; height: 21px; }
.nav-item.active .ico { color: var(--primary); }

.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  height: 66px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex; align-items: center; justify-content: space-between; padding: 0 30px; flex-shrink: 0;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.topbar-title { font-size: 20px; font-weight: 700; letter-spacing: .5px; }
.view-badge {
  display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px;
  background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 600;
  border: 1px solid rgba(217, 45, 32, .25);
}
.topbar-right { display: flex; align-items: center; gap: 10px; }
.user-name { color: var(--text-sub); font-size: 14px; }
.content { flex: 1; overflow-y: auto; padding: 30px; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 26px; margin-bottom: 20px; box-shadow: var(--shadow-sm);
}
.card-title { font-size: 16.5px; font-weight: 700; margin-bottom: 20px; letter-spacing: .3px; display: flex; align-items: center; gap: 10px; }
.card-title::before {
  content: ''; width: 4px; height: 17px; border-radius: 3px; background: var(--grad); flex-shrink: 0;
}
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--r);
  padding: 22px 24px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--grad); opacity: .85;
}
.stat-card::after {
  content: ''; position: absolute; right: -28px; top: -28px; width: 88px; height: 88px;
  border-radius: 50%; background: var(--grad-soft); opacity: .9;
}
.stat-card .num { position: relative; z-index: 1; font-size: 29px; font-weight: 700; color: var(--text); letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat-card .lbl { position: relative; z-index: 1; color: var(--text-sub); font-size: 13.5px; margin-top: 5px; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--r-sm); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid #f0f3f6; white-space: nowrap; }
th {
  background: #f6f8fa; color: #344054; font-weight: 600; font-size: 13.5px;
  position: sticky; top: 0; z-index: 1; letter-spacing: .4px;
  border-bottom: 1px solid var(--border-strong);
}
/* 斑马纹：行间细微色差，多行扫视不易串行 */
tbody tr:nth-child(even) { background-color: #f8fafc; }
tbody tr { transition: background-color .13s ease; }
tbody tr:hover { background-color: var(--primary-soft); }
tbody td:first-child { font-weight: 600; color: #1f2937; }
tr:last-child td { border-bottom: none; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td a.doc-link { color: var(--primary); text-decoration: none; font-weight: 600; }
td a.doc-link:hover { text-decoration: underline; }
.empty { text-align: center; color: var(--text-faint); padding: 52px 20px; font-size: 14px; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; padding: 3.5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.5; }
.tag-blue { background: #eff6ff; color: #175cd3; }
.tag-red { background: var(--danger-soft); color: var(--danger); }
.tag-green { background: var(--ok-soft); color: var(--ok); }
.tag-gray { background: #f2f4f7; color: var(--text-sub); }
.tag-orange { background: var(--warn-soft); color: var(--warn); }

/* 表头小字（如「仅老板可见」） */
.cost-hint { font-size: 11px; color: var(--text-sub); font-weight: 400; margin-left: 4px; }
/* 审核明细行的商品名固定宽度，价格/数量输入对齐 */
.rv-name { min-width: 160px; font-size: 13px; }
.rv-qty, .rv-price { width: 110px; }

/* ---------- 工具栏 ---------- */
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.toolbar input, .toolbar select { width: auto; }

/* ---------- 分页 ---------- */
.pager { display: flex; align-items: center; gap: 12px; justify-content: flex-end; margin-top: 16px; font-size: 14px; color: var(--text-sub); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(9, 30, 40, .48); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100; animation: fadein .18s ease;
}
.modal {
  background: #fff; border-radius: var(--r-lg); width: 640px; max-width: 92vw; max-height: 88vh;
  overflow-y: auto; padding: 30px; box-shadow: var(--shadow-lg);
  animation: modal-in .26s var(--ease);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.modal h3 { font-size: 19px; font-weight: 700; margin-bottom: 20px; }
.modal .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ---------- 明细编辑行 ---------- */
.line-edit { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 44px; gap: 8px; margin-bottom: 8px; align-items: center; }
.line-edit .rm { color: var(--danger); cursor: pointer; text-align: center; font-size: 22px; line-height: 1; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; transition: background .15s; }
.line-edit .rm:hover { background: var(--danger-soft); }

/* ---------- 双账本对比高亮 ---------- */
tbody tr.audit-row:nth-child(n) { background-color: #fff8f6; }
tbody tr.audit-row:hover { background-color: #fff2ed; }
.amount-real { color: var(--primary); font-weight: 600; }
.amount-audit { color: var(--red); font-weight: 600; }

/* ---------- toast ---------- */
.toast {
  position: fixed; top: 26px; left: 50%; transform: translateX(-50%);
  background: #101828; color: #fff; padding: 13px 26px; border-radius: 12px;
  font-size: 14px; z-index: 200; box-shadow: var(--shadow-lg);
  animation: toast-in .28s var(--ease);
}
.toast.err { background: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -12px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #cdd4dc; border-radius: 7px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b0b9c4; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* =========================================================
   自定义控件（去系统原生外观）
   select 下拉 / 月份选择器 / 开关 / 数字步进去除
   策略：原生控件保留为值真源（.ui-native 隐藏），叠加自定义视觉层
   ========================================================= */
.ui-native {
  position: absolute !important; opacity: 0 !important; pointer-events: none !important;
  width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; clip: rect(0 0 0 0); clip-path: inset(50%);
}

/* 数字输入去除系统上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

/* ---------- 自定义下拉 ---------- */
.ui-select, .ui-month { position: relative; display: inline-block; min-width: 150px; vertical-align: middle; }
label .ui-select, .form-row .ui-select, .form-row .ui-month,
.line-edit .ui-select { display: block; width: 100%; min-width: 0; }

.ui-select-trigger, .ui-month-trigger {
  display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 0 14px;
  background: #fff; border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  cursor: pointer; font-size: 15px; color: var(--text); user-select: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.ui-select-trigger:hover, .ui-month-trigger:hover { border-color: #bcc5d0; }
.ui-select.open .ui-select-trigger, .ui-month.open .ui-month-trigger {
  border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-ring);
}
.ui-select-value { flex: 1; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ui-select-caret { width: 18px; height: 18px; color: var(--text-faint); display: inline-flex; flex-shrink: 0; transition: transform .18s var(--ease); }
.ui-select.open .ui-select-caret { transform: rotate(180deg); }
.ui-select-caret svg { width: 18px; height: 18px; }

.ui-select-panel {
  position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r-sm); box-shadow: var(--shadow-lg); padding: 6px; min-width: 150px;
  max-height: 320px; overflow-y: auto; transform-origin: top left;
  opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.ui-select.open .ui-select-panel { opacity: 1; transform: none; pointer-events: auto; }
.ui-select-option {
  padding: 10px 14px; border-radius: 8px; cursor: pointer; font-size: 14.5px; color: var(--text);
  white-space: nowrap; transition: background .12s, color .12s;
}
.ui-select-option:hover { background: var(--primary-soft); color: var(--primary-deep); }
.ui-select-option.selected { background: var(--primary-soft); color: var(--primary-deep); font-weight: 600; }

/* ---------- 自定义月份选择器 ---------- */
.ui-month-cal { width: 18px; height: 18px; color: var(--text-faint); display: inline-flex; flex-shrink: 0; }
.ui-month-cal svg { width: 18px; height: 18px; }
.ui-month-value { flex: 1; text-align: left; white-space: nowrap; }
.ui-month-panel {
  position: fixed; z-index: 300; background: #fff; border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 16px; width: 272px;
  transform-origin: top left; opacity: 0; transform: translateY(-6px) scale(.98); pointer-events: none;
  transition: opacity .15s var(--ease), transform .15s var(--ease);
}
.ui-month.open .ui-month-panel { opacity: 1; transform: none; pointer-events: auto; }
.ui-month-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ui-month-year { font-size: 15.5px; font-weight: 700; color: var(--text); }
.ui-month-nav {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text-sub); cursor: pointer; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.ui-month-nav:hover { background: var(--primary-soft); color: var(--primary-deep); border-color: var(--primary); }
.ui-month-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ui-month-cell {
  padding: 10px 0; text-align: center; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--text);
  transition: background .12s, color .12s;
}
.ui-month-cell:hover { background: var(--primary-soft); }
.ui-month-cell.selected { background: var(--grad); color: #fff; font-weight: 600; box-shadow: var(--shadow-primary); }
.ui-month-clear {
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  text-align: center; font-size: 13.5px; color: var(--text-faint); cursor: pointer; transition: color .15s;
}
.ui-month-clear:hover { color: var(--danger); }

/* ---------- 自定义开关（替换 checkbox）---------- */
.ui-switch { display: inline-flex; cursor: pointer; vertical-align: middle; }
.ui-switch-track {
  position: relative; display: inline-block; width: 46px; height: 26px; border-radius: 999px;
  background: #d0d5dd; transition: background .18s var(--ease);
}
.ui-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .25); transition: transform .18s var(--ease);
}
.ui-switch.on .ui-switch-track { background: var(--primary); }
.ui-switch.on .ui-switch-knob { transform: translateX(20px); }
.ui-switch.disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 760px) {
  .sidebar { width: 74px; }
  .sidebar-brand { justify-content: center; padding: 18px 0; }
  .sidebar-brand div:last-child, .nav-item span:not(.ico), .nav-section { display: none; }
  .nav-item { justify-content: center; padding: 13px; }
  .nav-item.active::before { left: -14px; }
  .modal .form-row { grid-template-columns: 1fr; }
  .content { padding: 18px; }
  .login-card { padding: 34px 26px 24px; }
}
