/* ==========================================================================
   永和兴达 · 轻量化 AI 报销工作台
   视觉系统 v2.0 —— 绿色环保 / 氢能应用 / 减少碳排放
   品牌资产与色彩令牌见 .workbuddy/brand-spec.md
   ========================================================================== */

:root {
  /* ---------- 品牌色（采样自官方 logo，非臆造） ---------- */
  --brand-green:        #0B5A2E;   /* 品牌墨绿：主色 / 标题 / 顶栏 */
  --brand-green-deep:   #07401F;   /* 深压色：hover / 页脚 */
  --brand-green-mid:    #147A42;   /* 中绿：渐变过渡 */
  --brand-green-bright: #7CC142;   /* 亮绿：笔触高光 / 强调线 */

  /* ---------- 徽章青绿（辅助色系） ---------- */
  --teal-600: #00A89F;             /* 徽章主青绿 */
  --teal-500: #12B5A8;
  --teal-400: #2FB8A8;
  --teal-100: #DFF5F1;
  --teal-050: #EEF9F7;

  /* ---------- 金属金（点缀，克用） ---------- */
  --gold:     #C8A040;
  --gold-300: #E4CE8E;

  /* ---------- 中性色：薄荷白冷调 ---------- */
  --bg:        #F4F8F5;
  --bg-deep:   #EBF3ED;
  --card:      #FFFFFF;
  --border:    #DCE8DF;
  --border-soft:#EAF2EC;
  --text:      #17251C;
  --text-2:    #3C5245;
  --muted:     #6E8578;
  --faint:     #9BB0A2;

  /* ---------- 语义色 ---------- */
  --danger:  #D93A32;   --danger-bg:  #FDECEA;  --danger-bd:  #F5C4BF;
  --success: #1E9E5A;   --success-bg: #E6F6EC;  --success-bd: #B4E2C7;
  --warn:    #C97A10;   --warn-bg:    #FDF4E3;  --warn-bd:    #F0D9A8;

  /* ---------- 圆角 ---------- */
  --r-xs: 4px;  --r-sm: 6px;  --r-md: 10px;  --r-lg: 14px;  --r-xl: 20px;

  /* ---------- 阴影层级 ---------- */
  --sh-1: 0 1px 2px rgba(11, 90, 46, .05);
  --sh-2: 0 2px 8px rgba(11, 90, 46, .06);
  --sh-3: 0 6px 18px rgba(11, 90, 46, .08);
  --sh-4: 0 14px 38px rgba(11, 90, 46, .12);
  --sh-brand: 0 6px 18px rgba(11, 90, 46, .22);

  /* ---------- 运动 ---------- */
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur: .22s;

  /* ---------- 兼容 v1.0.x 旧变量名（避免历史样式失联） ---------- */
  --primary: var(--brand-green);
  --primary-dark: var(--brand-green-deep);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "HarmonyOS Sans SC", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

a { color: var(--brand-green); text-decoration: none; }
button { font-family: inherit; }

/* 数字/单号等宽 */
.mono, table.tbl td:first-child {
  font-family: "DIN Alternate", "Bahnschrift", "Segoe UI", Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

/* 氢能意象：分子晶格氛围层（可复用的装饰底纹） */
.h2-lattice {
  background-image:
    radial-gradient(circle at 22% 28%, rgba(124, 193, 66, .16) 0, transparent 32%),
    radial-gradient(circle at 78% 72%, rgba(0, 168, 159, .13) 0, transparent 30%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%230B5A2E' stroke-opacity='.055' stroke-width='1'%3E%3Cpath d='M0 28h56M28 0v56M8 8l40 40M48 8L8 48'/%3E%3Ccircle cx='28' cy='28' r='2.4' fill='%2300A89F' fill-opacity='.07' stroke='none'/%3E%3Ccircle cx='0' cy='0' r='1.6' fill='%230B5A2E' fill-opacity='.06' stroke='none'/%3E%3Ccircle cx='56' cy='56' r='1.6' fill='%230B5A2E' fill-opacity='.06' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}

/* ==========================================================================
   登录页
   ========================================================================== */
.login-wrap {
  min-height: 100vh;
  display: flex;
  background: var(--card);
}

/* ---------- 左：品牌主视觉 ---------- */
.login-left {
  flex: 1.32;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 70% at 18% 12%, rgba(18, 181, 168, .34) 0%, transparent 58%),
    radial-gradient(ellipse 80% 60% at 88% 88%, rgba(124, 193, 66, .22) 0%, transparent 55%),
    linear-gradient(158deg, #0A5230 0%, #07401F 52%, #05301A 100%);
  color: #fff;
}

/* 晶格层 */
.login-pattern {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 78% 68% at 42% 45%, #000 20%, transparent 76%);
  -webkit-mask-image: radial-gradient(ellipse 78% 68% at 42% 45%, #000 20%, transparent 76%);
  opacity: .85;
  pointer-events: none;
}

/* 光晕呼吸（缓，尊重 reduced-motion） */
.login-left::after {
  content: "";
  position: absolute;
  width: 620px; height: 620px;
  right: -190px; bottom: -230px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124,193,66,.20) 0%, transparent 66%);
  animation: breathe 9s var(--ease) infinite;
  pointer-events: none;
}
@keyframes breathe {
  0%, 100% { transform: scale(1);    opacity: .85; }
  50%      { transform: scale(1.09); opacity: 1; }
}

.login-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 48px 40px;
  max-width: 560px;
}

/* 徽章：金环 + 微浮 */
.login-hero-badge {
  width: 132px; height: 132px;
  display: block;
  margin: 0 auto 26px;
  border-radius: 50%;
  background: #fff;
  padding: 5px;
  box-shadow:
    0 0 0 1px rgba(200, 160, 64, .85),
    0 0 0 7px rgba(255, 255, 255, .10),
    0 18px 44px rgba(0, 0, 0, .32);
  animation: badgeFloat 6s var(--ease) infinite;
}
@keyframes badgeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}

/* 文字标（反白） */
.login-hero-wordmark {
  width: 300px;
  max-width: 78%;
  display: block;
  margin: 0 auto 22px;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, .30));
}

.login-hero h1 {
  margin: 0 0 10px;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: .6px;
  line-height: 1.4;
  color: #fff;
}

.login-hero p {
  margin: 0 0 26px;
  font-size: 17px;
  font-weight: 400;
  color: rgba(255, 255, 255, .90);
  letter-spacing: .5px;
}

/* 品牌理念分隔：中轴亮绿短线 + 菱形点 */
.login-hero-line {
  position: relative;
  width: 64px; height: 2px;
  margin: 0 auto 18px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--brand-green-bright), transparent);
}
.login-hero-line::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 7px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--brand-green-bright);
  box-shadow: 0 0 10px rgba(124, 193, 66, .9);
}

.login-hero-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, .72);
  letter-spacing: 2px;
}

/* 品牌理念徽标组 */
.login-hero-badges {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.login-hero-badges span {
  font-size: 11px;
  letter-spacing: 1px;
  padding: 5px 13px;
  border-radius: 999px;
  color: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .26);
  background: rgba(255, 255, 255, .08);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ---------- 右：登录卡片 ---------- */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 28px;
  background:
    radial-gradient(ellipse 100% 60% at 100% 0%, #EAF7F2 0%, transparent 62%),
    var(--card);
}

.login-card {
  width: 396px;
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-xl);
  padding: 38px 34px 32px;
  box-shadow: var(--sh-4);
  position: relative;
  animation: cardIn .5s var(--ease-out) both;
}
/* 顶部品牌渐变细线 */
.login-card::before {
  content: "";
  position: absolute;
  top: 0; left: 34px; right: 34px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--brand-green), var(--teal-500) 55%, var(--brand-green-bright));
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 卡片内迷你文字标 */
.login-card-brand {
  display: block;
  width: 178px;
  margin: 0 auto 18px;
}

.login-card h2 {
  margin: 0 0 6px;
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  color: var(--brand-green);
  letter-spacing: .5px;
}
.login-card .sub {
  text-align: center;
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 6px;
}
.login-card .ver {
  text-align: center;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 1.4px;
  margin-bottom: 26px;
  font-family: "DIN Alternate", "Bahnschrift", Consolas, monospace;
}

.login-card label.fl { color: var(--text-2); margin-bottom: 7px; font-weight: 500; }

.login-card input[type=text],
.login-card input[type=password] {
  height: 43px;
  padding: 0 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13.5px;
  background: #FBFDFB;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
}
.login-card input[type=text]:hover,
.login-card input[type=password]:hover { border-color: #C2D6C8; }

.login-card input[type=text]:focus,
.login-card input[type=password]:focus,
.login-card input#lgCap:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-green-mid);
  box-shadow: 0 0 0 3.5px rgba(20, 122, 66, .13);
}

/* 验证码行 */
.cap-row { display: flex; align-items: center; gap: 10px; }
.cap-row input { width: 132px; text-transform: uppercase; letter-spacing: 3px; font-weight: 600; }
#lgCapImg {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 122px; height: 43px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--teal-050);
  overflow: hidden;
  transition: border-color var(--dur), box-shadow var(--dur);
  flex: none;
}
#lgCapImg:hover {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(0, 168, 159, .12);
}
#lgCapImg svg { display: block; }

.login-card .btn {
  width: 100%;
  height: 45px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--r-sm);
  letter-spacing: 3px;
  box-shadow: var(--sh-brand);
}

.login-card .alert { margin-bottom: 16px; text-align: left; }

/* 底部支持信息 */
.login-foot {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  line-height: 1.9;
}
.login-foot .dot {
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--brand-green-bright);
  margin-right: 6px;
  vertical-align: middle;
}

@media (max-width: 900px) {
  .login-wrap { flex-direction: column; }
  .login-left { flex: none; min-height: 300px; padding: 32px 20px; }
  .login-hero { padding: 0; }
  .login-hero-badge { width: 84px; height: 84px; margin-bottom: 18px; padding: 4px; }
  .login-hero-wordmark { width: 210px; margin-bottom: 14px; }
  .login-hero h1 { font-size: 19px; }
  .login-hero p { font-size: 13.5px; margin-bottom: 16px; }
  .login-hero-line { margin-bottom: 13px; }
  .login-hero-sub { font-size: 10.5px; letter-spacing: 1.2px; }
  .login-hero-badges { margin-top: 18px; gap: 6px; }
  .login-hero-badges span { font-size: 10px; padding: 4px 10px; }
  .login-right { flex: none; padding: 26px 18px 36px; }
  .login-card { width: 100%; max-width: 420px; padding: 30px 24px 26px; }
  .login-card::before { left: 24px; right: 24px; }
}

/* ==========================================================================
   应用骨架：顶栏 / 侧栏 / 主区
   ========================================================================== */
.topbar {
  height: 60px;
  background:
    linear-gradient(96deg, #0A5230 0%, #0B5A2E 46%, #0D6B38 100%);
  display: flex;
  align-items: center;
  padding: 0 22px;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 12px rgba(11, 90, 46, .22);
}
/* 顶栏底部亮绿进度饰线（品牌笔触转译） */
.topbar::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.5px;
  background: linear-gradient(90deg, var(--brand-green-bright) 0%, var(--teal-500) 42%, transparent 88%);
  opacity: .9;
}

.topbar .logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.topbar-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  padding: 1.5px;
  box-shadow: 0 0 0 1px rgba(200, 160, 64, .7), 0 2px 8px rgba(0, 0, 0, .22);
}
.logo-text { line-height: 1.15; letter-spacing: .4px; }
.logo-sub {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.6px;
  color: rgba(255, 255, 255, .62);
  text-transform: uppercase;
}
.topbar .ver-inline {
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .9);
  background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2);
  padding: 2px 8px;
  border-radius: 999px;
  font-family: "DIN Alternate", "Bahnschrift", Consolas, monospace;
}
.topbar .company {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .68);
  margin-left: 14px;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .2);
}
.topbar .spacer { flex: 1; }
.topbar .user {
  font-size: 12.5px;
  color: rgba(255, 255, 255, .95);
  margin-right: 14px;
}

/* 顶栏内按钮改白色系 */
.topbar .btn.ghost,
.topbar .btn.gray {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.topbar .btn.ghost:hover,
.topbar .btn.gray:hover {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(255, 255, 255, .45);
}

.badge {
  display: inline-block;
  padding: 1.5px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .28);
  margin-left: 7px;
  font-weight: 500;
}

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: calc(100vh - 60px); }

.sidebar {
  width: 214px;
  flex: none;
  background: var(--card);
  border-right: 1px solid var(--border-soft);
  padding: 12px 0 24px;
}
.sidebar .nav-section {
  padding: 18px 22px 7px;
  font-size: 10.5px;
  color: var(--faint);
  letter-spacing: 1.6px;
  font-weight: 600;
}
.sidebar .nav-item {
  position: relative;
  padding: 11px 22px 11px 24px;
  cursor: pointer;
  font-size: 13.5px;
  color: var(--text-2);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-right: 12px;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.sidebar .nav-item:hover { background: var(--bg-deep); color: var(--brand-green); }
.sidebar .nav-item.active {
  background: linear-gradient(90deg, rgba(11, 90, 46, .10), rgba(0, 168, 159, .06));
  color: var(--brand-green);
  font-weight: 600;
}
/* 活动态左侧品牌条 */
.sidebar .nav-item.active::before {
  content: "";
  position: absolute;
  left: 0; top: 7px; bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--brand-green-bright), var(--brand-green));
}

.main {
  flex: 1;
  padding: 22px 26px 40px;
  overflow-x: hidden;
  min-width: 0;
  background:
    radial-gradient(ellipse 62% 42% at 100% 0%, rgba(0, 168, 159, .05) 0%, transparent 62%),
    radial-gradient(ellipse 50% 38% at 0% 100%, rgba(124, 193, 66, .05) 0%, transparent 60%),
    var(--bg);
}

/* ==========================================================================
   通用组件
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-md);
  padding: 20px 22px;
  margin-bottom: 16px;
  box-shadow: var(--sh-1);
  transition: box-shadow var(--dur) var(--ease);
}
.card:hover { box-shadow: var(--sh-2); }

.card h3 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--brand-green);
  padding-left: 11px;
  border-left: 3px solid var(--brand-green);
  line-height: 1.4;
  letter-spacing: .3px;
}

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 20px; }
.grid .span-3 { grid-column: span 3; }

label.fl {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 6px;
  font-weight: 500;
}
label.fl .req { color: var(--danger); margin-left: 3px; }

input[type=text], input[type=number], input[type=date], input[type=password], select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #FBFDFB;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
}
input[type=text]:hover, input[type=number]:hover, input[type=date]:hover,
input[type=password]:hover, select:hover, textarea:hover { border-color: #C2D6C8; }

input:focus, select:focus, textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--brand-green-mid);
  box-shadow: 0 0 0 3px rgba(20, 122, 66, .12);
}
input[readonly] { background: var(--bg-deep) !important; color: var(--text-2); cursor: not-allowed; }
textarea { resize: vertical; min-height: 60px; }

select {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%236E8578' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

/* ==========================================================================
   供应商自绘下拉（v1.0.10）
   原生 <select> 弹层在部分环境下无法滚动，供应商多于 7 家时第 8 项起选不到；
   改为自绘面板：内部 scroll + 搜索 + 键盘，彻底不受原生弹层限制。
   ========================================================================== */
.selbox { position: relative; }

.selbox-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  background: #FBFDFB;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur);
}
.selbox-trigger:hover { border-color: #C2D6C8; }
.selbox.open .selbox-trigger,
.selbox:focus-visible .selbox-trigger {
  outline: none;
  background: #fff;
  border-color: var(--brand-green-mid);
  box-shadow: 0 0 0 3px rgba(20, 122, 66, .12);
}
.selbox-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selbox-text.ph { color: var(--faint); }
.selbox-arrow {
  flex: 0 0 auto;
  width: 11px;
  height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7'%3E%3Cpath d='M1 1l4.5 4.5L10 1' fill='none' stroke='%236E8578' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center;
  transition: transform .18s var(--ease);
}
.selbox.open .selbox-arrow { transform: rotate(180deg); }

.selbox-panel {
  position: absolute;
  z-index: 60;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  display: none;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  box-shadow: var(--sh-3);
}
.selbox.open .selbox-panel { display: block; }
.selbox.up .selbox-panel { top: auto; bottom: calc(100% + 4px); }

.selbox-search {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: 12.5px;
  font-family: inherit;
  color: var(--text);
  background: #FBFDFB;
}
.selbox-search:focus { outline: none; background: #fff; border-color: var(--brand-green-mid); }

.selbox-list { max-height: 268px; overflow-y: auto; overscroll-behavior: contain; }
.selbox-opt {
  padding: 7px 9px;
  border-radius: var(--r-xs);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.selbox-opt:hover, .selbox-opt.active { background: var(--teal-050); color: var(--brand-green); }
.selbox-opt.on { font-weight: 600; color: var(--brand-green); }
.selbox-opt.on::after { content: "✓"; float: right; margin-left: 8px; color: var(--teal-600); }
.selbox-empty { padding: 8px; font-size: 12px; color: var(--muted); text-align: center; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 18px;
  border-radius: var(--r-sm);
  border: 1px solid var(--brand-green);
  background: linear-gradient(180deg, #0E6A36, var(--brand-green));
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: transform .12s var(--ease), box-shadow var(--dur), background var(--dur);
  box-shadow: 0 1px 2px rgba(11, 90, 46, .18);
}
.btn:hover {
  background: linear-gradient(180deg, #0B5A2E, var(--brand-green-deep));
  box-shadow: var(--sh-brand);
}
.btn:active { transform: translateY(1px); box-shadow: 0 1px 2px rgba(11, 90, 46, .2); }

.btn.ghost { background: #fff; color: var(--brand-green); border-color: #B8D4C1; box-shadow: none; }
.btn.ghost:hover { background: var(--teal-050); border-color: var(--brand-green-mid); box-shadow: var(--sh-1); }

.btn.gray { background: #fff; color: var(--text-2); border-color: var(--border); box-shadow: none; }
.btn.gray:hover { background: var(--bg-deep); border-color: #C2D6C8; }

.btn.danger { background: #fff; color: var(--danger); border-color: var(--danger-bd); box-shadow: none; }
.btn.danger:hover { background: var(--danger-bg); border-color: #E9A9A4; }

.btn.sm { padding: 5px 12px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.row-actions { display: flex; gap: 10px; margin-top: 16px; align-items: center; flex-wrap: wrap; }

/* ---------- 表格 ---------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  background: linear-gradient(180deg, #F3F9F5, #EAF4EE);
  border: 1px solid var(--border);
  padding: 9px 10px;
  text-align: left;
  font-weight: 600;
  color: var(--brand-green);
  white-space: nowrap;
  font-size: 12.5px;
}
table.tbl td {
  border: 1px solid var(--border-soft);
  padding: 7px 10px;
  vertical-align: middle;
}
table.tbl tbody tr:nth-child(even) { background: #F9FCFA; }
table.tbl tbody tr { transition: background var(--dur); }
table.tbl tbody tr:hover { background: var(--teal-050); }
table.tbl td.num, table.tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
/* 明细表金额/税率列：表头与单元格统一左对齐（v1.0.3 需求1） */
table.tbl td.num-l, table.tbl th.num-l { text-align: left; font-variant-numeric: tabular-nums; }
table.tbl td.num-l input, table.tbl td.num-l select { text-align: left !important; }
table.tbl input, table.tbl select { padding: 5px 7px; font-size: 12.5px; background: #fff; }
.tbl-wrap { overflow-x: auto; border-radius: var(--r-sm); }

/* ---------- 报销类型选择卡 ---------- */
.type-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.type-card {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 16px 16px 18px;
  cursor: pointer;
  background: #fff;
  transition: .18s var(--ease);
  overflow: hidden;
}
/* 左侧渐变条 */
.type-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--brand-green-bright), var(--teal-500));
  opacity: 0;
  transition: opacity var(--dur);
}
.type-card:hover { border-color: #B8D4C1; box-shadow: var(--sh-2); transform: translateY(-1px); }
.type-card:hover::before { opacity: .6; }
.type-card.active {
  border-color: var(--brand-green);
  background: linear-gradient(150deg, rgba(11,90,46,.055), rgba(0,168,159,.04));
  box-shadow: 0 0 0 3px rgba(11, 90, 46, .09), var(--sh-2);
}
.type-card.active::before { opacity: 1; }
.type-card .t { font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--brand-green); }
.type-card .d { font-size: 12px; color: var(--muted); line-height: 1.65; }

/* ---------- 合计栏 ---------- */
.total-bar {
  display: flex;
  align-items: center;
  gap: 22px;
  background: linear-gradient(100deg, var(--teal-050), #F2FAF4);
  border: 1px dashed #A5CDB4;
  border-radius: var(--r-md);
  padding: 14px 18px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.total-bar .amt {
  font-size: 25px;
  font-weight: 700;
  color: var(--brand-green);
  font-variant-numeric: tabular-nums;
  font-family: "DIN Alternate", "Bahnschrift", Consolas, monospace;
}
.total-bar .cn { font-size: 12px; color: var(--muted); }
.total-bar .field { display: flex; align-items: center; gap: 9px; }
.total-bar input { width: 145px; }

/* ---------- 上传区 ---------- */
.dropzone {
  border: 2px dashed #B6D2C0;
  border-radius: var(--r-md);
  padding: 26px 22px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  background: linear-gradient(180deg, #FBFEFC, #F5FBF7);
  transition: .18s var(--ease);
  font-size: 13px;
}
.dropzone:hover, .dropzone.over {
  border-color: var(--teal-500);
  background: linear-gradient(180deg, var(--teal-050), #EAF8F4);
  color: var(--brand-green);
  box-shadow: 0 0 0 4px rgba(0, 168, 159, .08);
}

.att-list { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.att-item {
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 7px;
  width: 124px;
  text-align: center;
  background: #fff;
  position: relative;
  transition: .16s var(--ease);
}
.att-item:hover { border-color: #B8D4C1; box-shadow: var(--sh-2); }
.att-item img {
  width: 100%; height: 76px;
  object-fit: cover;
  border-radius: var(--r-xs);
  display: block;
  background: var(--bg-deep);
}
.att-item .pdf-ico {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, var(--danger-bg), #FBD9D5);
  color: var(--danger);
  font-weight: 700;
  border-radius: var(--r-xs);
  letter-spacing: 1px;
  font-size: 12px;
}
.att-item .nm { font-size: 11px; margin-top: 6px; word-break: break-all; color: var(--text-2); line-height: 1.35; }
.att-item .del {
  position: absolute;
  top: -8px; right: -8px;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: var(--danger);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(217, 58, 50, .35);
  transition: transform .14s var(--ease);
}
.att-item .del:hover { transform: scale(1.12); }

/* ---------- 销售费用发票明细栏（v1.0.2） ---------- */
.inv-meta {
  display: grid;
  grid-template-columns: 70px 130px 70px 1fr 80px 1fr;
  gap: 5px 9px;
  align-items: center;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px dashed var(--border);
  font-size: 12px;
  text-align: left;
}
.inv-tag { color: var(--muted); font-size: 11px; }
.inv-inp {
  padding: 4px 7px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  font-size: 12px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  background: #fff;
}
.inv-inp:disabled { background: var(--bg-deep); color: var(--faint); }
.att-item .nm { width: 100%; }

/* ---------- v1.0.12 发票解析自动复核 ---------- */
/* 三类报销单均显示补录栏，附件卡片由窄缩略图改为「缩略图 + 右侧信息」横向布局 */
.att-item.with-meta {
  width: 100%;
  max-width: 100%;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 10px 12px;
}
.att-item.with-meta > img { width: 92px; height: 76px; flex: 0 0 92px; object-fit: cover; }
.att-item.with-meta > .pdf-ico { width: 92px; flex: 0 0 92px; }
.att-item.with-meta .nm { flex: 1 1 auto; min-width: 0; margin-top: 0; text-align: left; }
.att-item.with-meta .del { top: 8px; right: 8px; }

.rv-slot { margin-top: 7px; }
.rv-badge {
  font-size: 11.5px;
  line-height: 1.45;
  padding: 5px 9px;
  border: 1px solid;
  border-radius: var(--r-xs);
}
.rv-badge.ok { background: #F1FAF4; border-color: #CDE8D6; color: #17663A; }
.rv-badge.bad { background: #FFF6EC; border-color: #F0C27B; color: #8A4B00; }
.rv-badge.pending { background: #F3F7FA; border-color: #CFDDE6; color: #4A6577; }
.rv-badge ul { margin: 3px 0 0; padding-left: 16px; }
.rv-badge li { margin: 1px 0; }
.inv-inp.bad-field {
  border-color: #E39A3A;
  background: #FFF9F0;
  box-shadow: 0 0 0 2px rgba(227, 154, 58, .12);
}
.rv-sum-warn { background: #FFF6EC; border-color: #F0C27B; color: #8A4B00; }

/* ---------- 发票信息汇总（v1.0.3 需求2，位于表体下方） ---------- */
.inv-sum {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.inv-sum-empty {
  font-size: 12px;
  color: var(--muted);
  background: var(--teal-050);
  border: 1px dashed var(--border);
  border-radius: var(--r-sm);
  padding: 10px 12px;
}
.inv-sum-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 9px;
}
.inv-sum-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-green);
  position: relative;
  padding-left: 9px;
}
.inv-sum-title::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand-green-bright), var(--teal-500));
}
.inv-sum-meta { font-size: 11.5px; color: var(--muted); }
table.inv-sum-tbl thead th {
  background: linear-gradient(180deg, #F2FAF5, #E7F5EC);
  color: var(--brand-green);
  font-size: 12px;
}
table.inv-sum-tbl td { font-size: 12.5px; }
.inv-no-cell { font-family: ui-monospace, Consolas, monospace; letter-spacing: .2px; }
.inv-file-cell { font-size: 11.5px; color: var(--text-2); word-break: break-all; }
.inv-sum-total {
  margin-top: 10px;
  padding: 9px 12px;
  background: linear-gradient(96deg, #F2FAF5, #EAF8F4);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 12.5px;
}
.inv-sum-total .amt { color: var(--brand-green); font-weight: 700; font-size: 15px; }
/* v1.0.7：发票合计与明细合计不一致时的警示标记（阻止提交） */
.inv-sum-warn {
  margin-left: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #FFF4E5;
  border: 1px solid #F0C27B;
  color: #A35B00;
  font-size: 11.5px;
  font-weight: 600;
}

/* ---------- 筛选区 ---------- */
.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.filters .f { display: flex; flex-direction: column; gap: 5px; }
.filters .f label { font-size: 12px; color: var(--muted); font-weight: 500; }
.filters input, .filters select { width: 152px; padding: 7px 9px; }

/* ---------- 状态标签 ---------- */
.tag {
  display: inline-block;
  padding: 2.5px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  border: 1px solid transparent;
}
.tag.draft     { background: #EEF2EF; color: #64766B; border-color: #DFE7E2; }
.tag.submitted { background: var(--success-bg); color: var(--success); border-color: var(--success-bd); }
.tag.sent      { background: var(--success-bg); color: var(--success); border-color: var(--success-bd); }
.tag.pending   { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.tag.failed    { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-bd); }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(12, 34, 21, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: maskIn .18s var(--ease);
}
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: #fff;
  border-radius: var(--r-lg);
  width: 880px;
  max-width: 94vw;
  max-height: 88vh;
  overflow: auto;
  padding: 24px 26px 26px;
  box-shadow: 0 24px 64px rgba(7, 64, 31, .28);
  animation: modalIn .26s var(--ease-out);
  position: relative;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to   { opacity: 1; transform: none; }
}
.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 26px; right: 26px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--brand-green), var(--teal-500), var(--brand-green-bright));
}
.modal h3 {
  margin: 0 0 18px;
  font-size: 16px;
  color: var(--brand-green);
  padding-right: 30px;
  border: none;
  font-weight: 700;
}
.modal .close {
  position: absolute;
  top: 16px; right: 18px;
  cursor: pointer;
  color: var(--faint);
  font-size: 22px;
  line-height: 1;
  width: 28px; height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  transition: .16s var(--ease);
}
.modal .close:hover { background: var(--bg-deep); color: var(--danger); }

/* ---------- 提示条 ---------- */
.alert {
  padding: 11px 15px;
  border-radius: var(--r-sm);
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
  border-left: 3px solid;
}
.alert.err { background: var(--danger-bg); color: #8F2A24; border-color: var(--danger); border-left-width: 3px; }
.alert.ok  { background: var(--success-bg); color: #14663A; border-color: var(--success); border-left-width: 3px; }
.alert ul { margin: 7px 0 0 18px; padding: 0; }
.alert li { margin-bottom: 2px; }

.empty { text-align: center; color: var(--faint); padding: 36px 0; font-size: 13px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.ml8 { margin-left: 8px; }
.mt12 { margin-top: 12px; }

.link-btn {
  color: var(--brand-green);
  cursor: pointer;
  margin-right: 11px;
  font-size: 12px;
  font-weight: 500;
  transition: color var(--dur);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  vertical-align: middle;
}
.link-btn:hover { color: var(--teal-600); text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.link-btn.danger:hover { color: #A82A24; }
/* v1.0.3 需求5：已发送不可重发的锁定态 */
.link-btn.locked {
  color: var(--faint);
  cursor: not-allowed;
  pointer-events: auto;
}
.link-btn.locked:hover { color: var(--faint); text-decoration: none; }
/* v1.0.3 需求6：核销状态下拉 */
.sel-verify {
  padding: 4px 7px;
  font-size: 12px;
  border-radius: var(--r-xs);
  border: 1px solid var(--border);
  background: #fff;
  min-width: 92px;
  cursor: pointer;
}
.sel-verify.is-pending { border-color: #E8C77E; background: #FFFBEF; color: #8A6414; }
.sel-verify.is-verified { border-color: #9CD0B0; background: #F1FAF4; color: var(--brand-green); }
.verify-tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  white-space: nowrap;
}
.verify-tag.pending { background: #FFF6E0; color: #8A6414; border: 1px solid #EFD69B; }
.verify-tag.verified { background: #EAF8F0; color: var(--brand-green); border: 1px solid #A9D8BC; }

/* 内联图标：与文字同色、基线对齐 */
.ico {
  display: inline-flex;
  align-items: center;
  vertical-align: -2px;
}
.ico svg { display: block; }
.btn .ico { margin-right: 5px; vertical-align: -1.5px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(96deg, #0A5230, var(--brand-green));
  color: #fff;
  padding: 11px 24px;
  border-radius: 999px;
  z-index: 200;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(11, 90, 46, .32);
  border: 1px solid rgba(255, 255, 255, .18);
  animation: toastIn .3s var(--ease-out);
}
@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -12px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

.hide { display: none !important; }

/* ---------- 供应商信息面板 ---------- */
.supplier-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px 26px;
  margin-top: 12px;
  padding: 13px 16px;
  background: linear-gradient(120deg, var(--teal-050), #F6FBF8);
  border: 1px solid #CEE7DC;
  border-left: 3px solid var(--teal-500);
  border-radius: var(--r-sm);
}
.supplier-info .si { display: flex; gap: 11px; font-size: 12px; line-height: 1.75; min-width: 0; }
.supplier-info .si-k { color: var(--muted); flex: 0 0 100px; white-space: nowrap; }
.supplier-info .si-v { color: var(--text); word-break: break-all; font-weight: 500; }

/* ==========================================================================
   自适应
   ========================================================================== */
@media (max-width: 1180px) {
  .type-cards { grid-template-columns: repeat(2, 1fr); }
  .inv-meta { grid-template-columns: 58px 1fr 58px 1fr 64px 1fr; }
}
@media (max-width: 900px) {
  .sidebar { width: 66px; }
  .sidebar .nav-section { padding: 14px 0 6px; text-align: center; font-size: 0; }
  .sidebar .nav-item { padding: 12px 6px; font-size: 0; text-align: center; margin-right: 6px; }
  .sidebar .nav-item::after {
    content: attr(data-short);
    font-size: 13px;
    font-weight: 600;
  }
  .grid { grid-template-columns: 1fr 1fr; }
  .grid .span-3 { grid-column: span 2; }
  .main { padding: 16px 14px 32px; }
}
@media (max-width: 700px) {
  .topbar { height: auto; min-height: 56px; padding: 8px 14px; flex-wrap: wrap; gap: 6px; }
  .topbar .company { display: none; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%;
    display: flex;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-soft);
    padding: 6px;
    gap: 4px;
  }
  .sidebar .nav-section { display: none; }
  .sidebar .nav-item {
    white-space: nowrap;
    margin-right: 0;
    border-radius: var(--r-sm);
    font-size: 12.5px;
  }
  .sidebar .nav-item::after { content: none; }
  .sidebar .nav-item.active::before { display: none; }
  .sidebar .nav-item.active { box-shadow: inset 0 -2.5px 0 var(--brand-green); }
  .grid, .type-cards { grid-template-columns: 1fr; }
  .grid .span-3 { grid-column: span 1; }
  .filters .f, .filters input, .filters select { width: 100%; }
  .card { padding: 16px; }
  .inv-meta { grid-template-columns: 62px 1fr; }
  .att-item.with-meta > img, .att-item.with-meta > .pdf-ico { width: 72px; flex: 0 0 72px; height: 64px; }
}

/* ==========================================================================
   无障碍：尊重系统减弱动效
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .login-left::after, .login-hero-badge { animation: none; }
}
