/* ===================== 基础 ===================== */
:root {
  --teal: #15a1b4;
  --teal-d: #0f899b;
  --teal-l: #e8f7f9;
  --teal-line: #bfe6ec;

  --side-1: #17383f;
  --side-2: #0f2a30;
  --side-active: #2a8f9c;

  --text: #33474d;
  --text-2: #6c7f85;
  --text-3: #9aa8ad;
  --line: #e3e9eb;
  --line-2: #eef2f3;
  --bg: #eff3f4;
  --card: #ffffff;

  --danger: #e2574c;
  --shadow: 0 1px 2px rgba(21, 55, 63, .06), 0 2px 10px rgba(21, 55, 63, .04);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
}

body {
  font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
button { font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
.hidden { display: none !important; }

/* ===================== 登录 ===================== */
.login-wrap {
  position: fixed; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background:
    radial-gradient(1100px 520px at 12% 8%, #e9f7f9 0%, rgba(233,247,249,0) 60%),
    radial-gradient(900px 480px at 88% 92%, #e6f2f6 0%, rgba(230,242,246,0) 62%),
    linear-gradient(160deg, #f7fbfc 0%, #eef4f6 45%, #e7eff2 100%);
}

.login-card {
  width: 396px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(19, 60, 70, .10);
  padding: 34px 38px 26px;
}

.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-logo {
  width: 42px; height: 42px; border-radius: 8px;
  background: linear-gradient(140deg, #17aec2, #0d8698);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(21, 161, 180, .28);
}
.login-logo svg { width: 23px; height: 23px; }
.login-title h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: 1px; color: #253a41; }
.login-title p { margin: 3px 0 0; font-size: 11px; color: var(--text-3); letter-spacing: .4px; }

.login-form { display: block; }
.field { display: block; margin-bottom: 16px; }
.field-label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 7px; }
.field-input {
  display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  border: 1px solid #dfe6e8; border-radius: 4px;
  background: #fbfcfc;
  transition: border-color .16s, box-shadow .16s, background .16s;
}
.field-input:focus-within {
  border-color: var(--teal); background: #fff;
  box-shadow: 0 0 0 3px rgba(21, 161, 180, .10);
}
.fi-icon { width: 16px; height: 16px; color: #a6b4b9; flex: none; }
.field-input input {
  flex: 1; border: 0; outline: none; background: transparent; height: 100%;
  font-size: 13.5px; color: var(--text); letter-spacing: .2px;
}
.field-input input::placeholder { color: #b6c2c6; }

.login-error {
  margin: -2px 0 14px;
  padding: 8px 11px;
  background: #fdf1f0;
  border: 1px solid #f6d6d3;
  border-left: 3px solid var(--danger);
  border-radius: 3px;
  color: #cf4a3f;
  font-size: 12px;
  line-height: 1.6;
  word-break: break-all;
}

.btn-login {
  width: 100%; height: 42px; border: 0; border-radius: 4px;
  background: linear-gradient(180deg, #18a9bd, #1095a8);
  color: #fff; font-size: 15px; letter-spacing: 4px; cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 149, 168, .24);
  transition: filter .16s, transform .06s;
}
.btn-login:hover { filter: brightness(1.06); }
.btn-login:active { transform: translateY(1px); }
.btn-login[disabled] { opacity: .68; cursor: default; filter: none; }

.login-foot { margin-top: 22px; font-size: 11.5px; color: #a9b6bb; letter-spacing: 1px; }

/* ===================== 主框架 ===================== */
.shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 52px; flex: none;
  background: linear-gradient(180deg, var(--side-1) 0%, var(--side-2) 100%);
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 12px;
}
.side-logo {
  width: 30px; height: 30px; border-radius: 6px;
  background: rgba(255, 255, 255, .10);
  display: flex; align-items: center; justify-content: center;
  color: #d8f0f3; margin-bottom: 14px;
}
.side-logo svg { width: 18px; height: 18px; }

.side-nav { display: flex; flex-direction: column; gap: 2px; align-items: center; width: 100%; margin-top: 4px; }
.side-item {
  width: 100%; height: 38px; display: flex; align-items: center; justify-content: center;
  color: #7f9aa2; position: relative; cursor: pointer; transition: color .15s, background .15s;
}
.side-item svg { width: 17px; height: 17px; }
.side-item:hover { color: #cfe9ee; background: rgba(255, 255, 255, .05); }
.side-item.active { color: #fff; background: rgba(255, 255, 255, .07); }
.side-item.active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 2px 2px 0; background: #37bfd0;
}
.side-bottom { margin-top: auto; }
.side-logout {
  width: 34px; height: 34px; border: 0; border-radius: 5px; cursor: pointer;
  background: transparent; color: #7f9aa2; display: flex; align-items: center; justify-content: center;
}
.side-logout svg { width: 16px; height: 16px; }
.side-logout:hover { color: #ffd4cf; background: rgba(255, 255, 255, .07); }

.main-col { flex: 1; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }

/* 顶栏 */
.topbar {
  height: 56px; flex: none;
  background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px 0 22px;
}
.topbar-title { margin: 0; font-size: 22px; font-weight: 700; letter-spacing: 1px; color: #26383e; }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.hello { font-size: 12.5px; color: var(--text-2); margin-right: 8px; }
.hello b { color: var(--text); font-weight: 600; }
.icon-btn {
  width: 28px; height: 28px; border: 0; background: transparent; border-radius: 4px;
  color: #9dadb2; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn:hover { color: var(--teal); background: var(--teal-l); }
.icon-btn.on { color: var(--teal); background: var(--teal-l); }
.icon-btn:disabled { cursor: default; }
.reload-btn.spinning svg { animation: spin .8s linear infinite; }

/* 右上角设置菜单 */
.menu-wrap { position: relative; }
.menu-panel {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  width: 254px; padding: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 8px 26px rgba(21, 55, 63, .14), 0 2px 6px rgba(21, 55, 63, .06);
  animation: menuIn .13s ease-out;
  overflow: hidden;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.menu-head { display: flex; align-items: center; gap: 10px; padding: 12px 13px; background: #f7fafb; border-bottom: 1px solid var(--line-2); }
.menu-avatar {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  background: linear-gradient(135deg, var(--teal), #37bccb); color: #fff;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
}
.menu-id { min-width: 0; }
.menu-name { font-size: 12.5px; font-weight: 600; color: #26383e; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.menu-body { padding: 8px 13px; border-bottom: 1px solid var(--line-2); }
.menu-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 11.5px; line-height: 1.9; }
.menu-row .mk { color: var(--text-3); flex: none; }
.menu-row .mv { color: var(--text-2); text-align: right; max-width: 168px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.menu-item {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 9px 13px; border: 0; background: #fff;
  font-size: 12.5px; color: var(--text); text-align: left; cursor: pointer;
  font-family: inherit;
}
.menu-item svg { width: 15px; height: 15px; flex: none; color: #93a6ac; }
.menu-item:hover { background: #f4f9fa; color: var(--teal); }
.menu-item:hover svg { color: var(--teal); }
.menu-item.danger { border-top: 1px solid var(--line-2); color: var(--danger); }
.menu-item.danger svg { color: var(--danger); }
.menu-item.danger:hover { background: #fdf3f2; color: #c8402f; }

/* 页签 */
.tabs {
  height: 36px; flex: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: stretch; padding-left: 14px; gap: 2px;
}
.tab {
  display: flex; align-items: center; gap: 6px;
  padding: 0 16px; font-size: 13px; color: var(--text-2);
  border-bottom: 2px solid transparent; cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tab:hover { color: var(--teal); }
.tab.active {
  color: var(--teal); font-weight: 600;
  border-bottom-color: var(--teal);
  background: linear-gradient(180deg, rgba(232,247,249,0) 40%, rgba(232,247,249,.65) 100%);
}
.tab-mark { font-size: 12px; color: #b9c6ca; }

.content { flex: 1; overflow: auto; padding: 14px 20px 24px; }
.page { max-width: 1400px; margin: 0 auto; }

/* ===================== 列表页 ===================== */
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; gap: 14px;
}
.lt-right { display: flex; align-items: center; gap: 10px; }
.select-wrap { position: relative; display: inline-flex; align-items: center; }
.select-wrap select {
  appearance: none; -webkit-appearance: none;
  height: 32px; padding: 0 28px 0 12px;
  border: 1px solid var(--line); border-radius: 3px; background: #fff;
  color: var(--text-2); cursor: pointer; outline: none;
}
.select-wrap select:hover { border-color: #cddadd; }
.select-wrap select:focus { border-color: var(--teal); }
.select-wrap::after {
  content: ""; position: absolute; right: 11px; top: 50%; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #9dadb2; transform: translateY(-30%); pointer-events: none;
}
.select-wrap.sm select { height: 28px; font-size: 12.5px; padding: 0 24px 0 10px; }
.list-count { font-size: 12px; color: var(--text-3); }

.search-wrap {
  display: flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; width: 250px;
  border: 1px solid var(--line); border-radius: 3px; background: #fff;
}
.search-wrap svg { width: 14px; height: 14px; color: #a9b7bc; flex: none; }
.search-wrap input { flex: 1; border: 0; outline: none; background: transparent; font-size: 12.5px; }
.search-wrap input::placeholder { color: #b6c2c6; }
.search-wrap:focus-within { border-color: var(--teal); }

.card-list { display: flex; flex-direction: column; gap: 12px; }

.bid-card {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow);
  padding: 14px 18px 0;
  transition: box-shadow .18s, border-color .18s;
}
.bid-card:hover { box-shadow: 0 4px 18px rgba(21, 55, 63, .09); border-color: #d5e2e5; }

.bc-head { display: flex; align-items: flex-start; gap: 10px; }
.bc-check { margin-top: 3px; }
.bc-title-wrap { flex: 1; min-width: 0; }
.bc-title {
  font-size: 14px; font-weight: 600; color: #2b3f45; line-height: 1.55;
  display: block; cursor: pointer;
}
.bc-title:hover { color: var(--teal); }
.bc-times { flex: none; display: flex; gap: 26px; text-align: right; }
.bc-time-item { min-width: 86px; }
.bc-time-item .lb { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 3px; }
.bc-time-item .vl { font-size: 13.5px; font-weight: 600; color: #2f8fa0; letter-spacing: .3px; }
.bc-time-item .vl.dim { color: var(--text-2); font-weight: 500; }

.bc-meta { display: flex; align-items: center; gap: 10px; margin-top: 7px; flex-wrap: wrap; }
.bc-no { font-size: 12px; color: var(--text-3); }
.bc-no b { color: var(--text-2); font-weight: 500; letter-spacing: .3px; }
.tag {
  display: inline-flex; align-items: center; height: 20px; padding: 0 8px;
  font-size: 11px; border-radius: 2px;
  color: var(--teal); background: var(--teal-l); border: 1px solid var(--teal-line);
}
.bc-sup { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 12px; color: var(--text-2); }
.bc-sup svg { width: 13px; height: 13px; color: #b3c1c5; }

.bc-fields {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 4px 20px;
  margin-top: 12px; padding-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.bc-fields .kv2 .lb { font-size: 11px; color: var(--text-3); margin-bottom: 3px; display: block; }
.bc-fields .kv2 .vl { font-size: 12.5px; color: var(--text); line-height: 1.5; word-break: break-all; }

.bc-foot { display: flex; align-items: center; justify-content: space-between; padding: 10px 0 12px; }
.bc-file { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.bc-file svg { width: 14px; height: 14px; color: #b3c1c5; }
.bc-actions { display: flex; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  height: 30px; padding: 0 16px; border-radius: 3px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; color: var(--text-2);
  font-size: 12.5px; transition: all .15s; white-space: nowrap;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn.sm { height: 28px; padding: 0 11px; font-size: 12px; }
.btn-primary {
  background: var(--teal); border-color: var(--teal); color: #fff;
}
.btn-primary:hover { background: var(--teal-d); border-color: var(--teal-d); color: #fff; }
.btn-outline { border-color: var(--teal); color: var(--teal); background: #fff; }
.btn-outline:hover { background: var(--teal-l); }
.btn-ghost { background: #fff; }
.btn-link { border: 0; background: transparent; color: var(--teal); padding: 0 4px; height: 26px; }
.btn-link:hover { text-decoration: underline; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

.state-box {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 46px 0; text-align: center; color: var(--text-3); font-size: 13px;
}
.spinner {
  display: inline-block; width: 13px; height: 13px; margin-right: 6px;
  border: 2px solid #cfe3e7; border-top-color: var(--teal); border-radius: 50%;
  vertical-align: -2px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===================== 明细页 ===================== */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span:last-child { color: var(--text-2); max-width: 780px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-head {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow); padding: 16px 20px 14px; margin-bottom: 12px;
}
.dh-grid { display: grid; grid-template-columns: 1.35fr 1.15fr .95fr; gap: 4px 26px; }
.dh-col { min-width: 0; }
.sup-line { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; }
.sup-line svg { width: 15px; height: 15px; color: #9fb2b8; }
.sup-name { font-size: 13px; color: var(--teal); font-weight: 600; }
.sup-no {
  font-size: 11px; color: var(--text-3);
  border-left: 1px solid var(--line); padding-left: 8px; margin-left: 2px;
}
.kv { display: flex; align-items: baseline; gap: 4px; font-size: 12.5px; line-height: 1.95; min-width: 0; }
.kv .k { color: var(--text-3); flex: none; }
.kv .v { color: var(--text); word-break: break-all; }
.kv .v.strong { color: #e2574c; font-weight: 600; font-size: 13px; }
.kv-right { justify-content: space-between; gap: 12px; }
.kv-right .k { color: var(--text-3); }
.kv-right .v.time { color: #2f8fa0; font-weight: 600; }
.dh-col-right { display: flex; flex-direction: column; }

.detail-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; margin-bottom: 10px; flex-wrap: wrap;
}
.dt-left, .dt-right { display: flex; align-items: center; gap: 8px; }
.batch-group {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 6px 10px;
}
.batch-label { font-size: 12px; color: var(--text-2); font-weight: 600; }
.ctl {
  height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 3px;
  outline: none; background: #fff; font-size: 12.5px;
}
.ctl:focus { border-color: var(--teal); }
.ctl.num { width: 108px; }
.ctl.date { width: 138px; }
.ctl.text { width: 180px; }
.batch-clear {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap;
}
.batch-clear input { margin: 0; cursor: pointer; }
.sel-tip { font-size: 12px; color: var(--text-3); }
.sel-tip b { color: var(--teal); }

.table-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  box-shadow: var(--shadow);
  overflow: auto; max-height: calc(100vh - 330px);
}
.dt-table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1180px; table-layout: fixed; }
.dt-table thead th {
  position: sticky; top: 0; z-index: 3;
  background: #f7fafb; border-bottom: 1px solid var(--line);
  color: var(--text-2); font-weight: 600; font-size: 12px;
  padding: 9px 7px; text-align: center; white-space: nowrap;
}
.dt-table thead th i { color: var(--danger); font-style: normal; }
.dt-table tbody td {
  border-bottom: 1px solid var(--line-2);
  padding: 7px; vertical-align: middle; text-align: center;
  font-size: 12.5px; color: var(--text);
}
.dt-table tbody tr:hover td { background: #fafcfd; }
.dt-table tbody tr.selected td { background: #f2fafb; }

.col-check { width: 32px; }
.col-mat { width: 178px; }
.col-info { width: 196px; }
.col-unit { width: 44px; }
.col-qty { width: 62px; }
.col-price { width: 80px; }
.col-rate { width: 62px; }
.col-date { width: 122px; }
.col-amount { width: 88px; }
.col-lead { width: 122px; }   /* 货期是日期控件，与失效日期同宽 */
.col-remark { width: 124px; }

/* 明细行统一居中：表头、文本、数字、输入框口径一致 */
.mat-cell { display: flex; gap: 8px; justify-content: center; align-items: center; }
.mat-img {
  width: 42px; height: 42px; flex: none; border-radius: 2px;
  background: #f4f7f8 center/cover no-repeat; border: 1px solid #eef2f3;
  display: flex; align-items: center; justify-content: center;
  color: #cfdbdf; font-size: 10px; overflow: hidden;
}
.mat-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-text { min-width: 0; text-align: left; }
.mat-name { font-size: 12px; color: #2b3f45; font-weight: 500; line-height: 1.5; word-break: break-all; }
.mat-code { font-size: 10.5px; color: #9fb0b5; margin-top: 2px; letter-spacing: .2px; word-break: break-all; }

.info-lines { display: inline-block; text-align: left; }
.info-line { display: flex; gap: 3px; line-height: 1.55; font-size: 11.5px; }
.info-empty { color: #b7c3c7; }
.info-line .ik { color: var(--text-3); flex: none; }
.info-line .iv { color: var(--text-2); word-break: break-all; }

.cell-num { text-align: center; font-variant-numeric: tabular-nums; }
.cell-amount { text-align: center; font-weight: 600; color: #2b4a52; font-variant-numeric: tabular-nums; }

/* 只读明细（非待应标）：单元格只有文本，隐藏一切录入控件与导入入口 */
#page-detail.readonly .batch-edit-only { display: none !important; }
.ro { display: inline-block; color: var(--text); font-variant-numeric: tabular-nums; }
.ro.dim { color: #b7c3c7; }
.ro-remark {
  display: inline-block; text-align: left; white-space: normal; word-break: break-word;
  line-height: 1.5; max-width: 200px;
}
.cell-strong { font-variant-numeric: tabular-nums; }

.inp {
  width: 100%; height: 26px; padding: 0 5px;
  border: 1px solid #dfe7e9; border-radius: 3px; background: #fff;
  outline: none; font-size: 12px; color: var(--text);
  transition: border-color .14s, box-shadow .14s, background .14s;
}
.inp:hover { border-color: #c9d8db; }
.inp:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(21,161,180,.10); background: #fff; }
.inp.num { text-align: center; font-variant-numeric: tabular-nums; }
/* 去掉数字框的上下箭头：占位会挤掉右侧数字，金额位数多时被裁成假值 */
.inp.num::-webkit-outer-spin-button,
.inp.num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.inp.num { -moz-appearance: textfield; appearance: textfield; }
/* 日期控件里右侧有日历图标占位，左侧补等量内距，文字才真正居中 */
.inp.date { font-size: 11.5px; padding: 0 3px 0 17px; text-align: center; }
.inp.date::-webkit-calendar-picker-indicator { opacity: .5; margin-left: 0; padding: 0; }
.inp.date:hover::-webkit-calendar-picker-indicator { opacity: .9; }
.inp.err { border-color: var(--danger); background: #fdf4f3; }
.inp.remark { padding: 0 7px; text-align: center; }
td.cell-edit { background: #fdfefe; }
td.cell-edit.changed { background: #fffdf2; }
td.cell-edit.changed .inp { border-color: #e8d79c; background: #fffdf5; }

.table-foot {
  padding: 9px 4px 0; font-size: 12px; color: var(--text-3);
  display: flex; justify-content: space-between;
}
.table-foot b { color: var(--text-2); }

/* ===================== toast ===================== */
.toast-box {
  position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
  z-index: 9999; display: flex; flex-direction: column; gap: 8px; align-items: center;
  pointer-events: none;
}
.toast {
  min-width: 180px; max-width: 520px;
  padding: 9px 16px; border-radius: 4px;
  background: rgba(31, 51, 57, .93); color: #fff;
  font-size: 12.5px; line-height: 1.6;
  box-shadow: 0 6px 22px rgba(16, 40, 46, .22);
  animation: toastIn .22s ease-out;
  word-break: break-all;
}
.toast.success { background: rgba(20, 140, 110, .95); }
.toast.error { background: rgba(198, 66, 56, .95); }
.toast.warn { background: rgba(190, 132, 30, .95); }
.toast.out { animation: toastOut .2s ease-in forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ===================== 滚动条 ===================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #d3dee1; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b9c9cd; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ===================== 图片大图预览 ===================== */
.mat-img.has-pic { cursor: zoom-in; }
.mat-img.has-pic:hover { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(21,161,180,.16); }

.lightbox {
  position: fixed; inset: 0; z-index: 9000;
  display: none; flex-direction: column;
  background: rgba(9, 20, 24, .88);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.lightbox.open { display: flex; animation: lbIn .16s ease-out; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }

.lb-stage {
  position: relative; flex: 1 1 auto; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 30px 78px 10px;
}
.lb-img {
  max-width: 100%; max-height: 100%;
  object-fit: contain; border-radius: 3px; background: #fff;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  user-select: none;
}
.lb-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 18px;
  padding: 12px 26px 18px; color: #e8f1f2;
}
.lb-info { min-width: 0; }
.lb-title { font-size: 13.5px; font-weight: 600; letter-spacing: .2px; }
.lb-sub { font-size: 11.5px; color: #9db4b9; margin-top: 4px; word-break: break-all; }
.lb-count { flex: none; font-size: 12px; color: #9db4b9; font-variant-numeric: tabular-nums; }

.lb-close {
  position: absolute; top: 16px; right: 20px; width: 34px; height: 34px; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: rgba(255, 255, 255, .12); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .14s;
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, .26); }
.lb-close svg, .lb-nav svg { width: 18px; height: 18px; }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }
.lightbox.single .lb-nav { display: none; }
body.lb-open { overflow: hidden; }

@media (max-width: 1100px) {
  .dh-grid { grid-template-columns: 1fr 1fr; }
  .bc-fields { grid-template-columns: 1fr 1fr; }
}
