/* ==========================================================================
   生态地图 · 视觉基础
   墨蓝 + 青碧主色 + 铜金点缀，与「借物台账」同一套设计语言
   ========================================================================== */

:root {
  --app-navy: #16233a;
  --app-navy-soft: #1e3350;
  --app-primary: #1f5e6e;
  --app-primary-dark: #174a57;
  --app-primary-soft: #eaf3f5;
  --app-accent: #b08d57;
  --app-bg: #f4f6f9;
  --app-surface: #ffffff;
  --app-surface-muted: #fafbfc;
  --app-border: #e6e9ef;
  --app-border-strong: #d6dbe3;
  --app-text: #1f2733;
  --app-muted: #6b7785;
  --app-radius: 10px;
  --app-radius-sm: 7px;
  --app-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 14px rgba(16, 24, 40, .05);
  --app-shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);
  --app-ease: .18s cubic-bezier(.4, 0, .2, 1);
}

html { scroll-padding-top: 76px; }  /* 锚点跳转避开悬浮导航栏 */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--app-bg);
  color: var(--app-text);
  font-size: .9rem;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 { letter-spacing: -.01em; }
h4 { font-size: 1.16rem; font-weight: 600; margin-bottom: 1rem; }
a { text-decoration: none; }
small, .small { font-size: .78rem; }
.text-muted { color: var(--app-muted) !important; }

* { scrollbar-width: thin; scrollbar-color: #c8cfd8 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c8cfd8; border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #a9b3bf; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------- 顶部导航 ---------------------------- */
.app-navbar {
  position: sticky;
  top: 0;
  z-index: 1035;
  background: linear-gradient(90deg, var(--app-navy) 0%, var(--app-navy-soft) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 4px 16px rgba(16, 24, 40, .22);
  min-height: 58px;
  padding: .35rem 0;
}
.app-navbar .container-fluid { padding-left: 1.25rem; padding-right: 1.25rem; }
.app-navbar .navbar-brand {
  display: flex; align-items: center; gap: .65rem;
  color: #fff; font-weight: 600; font-size: 1rem; letter-spacing: .01em;
  margin-right: 1.5rem; padding: .2rem 0;
}
.app-navbar .brand-mark {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(176, 141, 87, .18);
  border: 1px solid rgba(176, 141, 87, .45);
  color: #d8bd93; font-size: .95rem;
}
.app-navbar .brand-text { line-height: 1.1; }
.app-navbar .brand-text small {
  display: block; font-size: .58rem; font-weight: 500;
  letter-spacing: .16em; color: rgba(255, 255, 255, .45); margin-top: 2px;
}
.app-navbar .nav-link {
  color: rgba(255, 255, 255, .74);
  font-size: .845rem; padding: .45rem .72rem !important;
  border-radius: var(--app-radius-sm);
  position: relative; transition: color var(--app-ease), background var(--app-ease);
}
.app-navbar .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.app-navbar .nav-link.active { color: #fff; background: rgba(255, 255, 255, .1); }
.app-navbar .nav-link.active::after {
  content: ""; position: absolute; left: .72rem; right: .72rem; bottom: 1px;
  height: 2px; background: var(--app-accent); border-radius: 2px;
}

.app-user {
  display: flex; align-items: center; gap: .65rem;
  padding-left: 1rem; margin-left: .5rem;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.app-user .avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .12); color: #fff;
  font-size: .8rem; font-weight: 600;
}
.app-user .app-user-link {
  display: flex; align-items: center; gap: .65rem;
  color: inherit; text-decoration: none; border-radius: 8px;
  padding: .12rem .25rem; transition: background var(--app-ease);
}
.app-user .app-user-link:hover { background: rgba(255, 255, 255, .1); }
.app-user .app-user-link:focus-visible { outline: 2px solid rgba(255, 255, 255, .45); outline-offset: 2px; }
.app-user .u-name { color: #fff; font-size: .82rem; line-height: 1.2; }
.app-user .u-meta { color: rgba(255, 255, 255, .5); font-size: .68rem; line-height: 1.3; }
.profile-avatar {
  width: 52px; height: 52px; border-radius: 50%; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1c3352, #2f4f76); color: #fff;
  font-size: 1.15rem; font-weight: 600; letter-spacing: .02em;
}
.app-navbar .btn-logout {
  color: rgba(255, 255, 255, .8); border: 1px solid rgba(255, 255, 255, .22);
  background: transparent; font-size: .75rem; padding: .22rem .6rem;
  border-radius: 6px; transition: all var(--app-ease);
}
.app-navbar .btn-logout:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .38); }
.app-navbar .navbar-toggler {
  border: 1px solid rgba(255, 255, 255, .22); padding: .28rem .45rem; border-radius: 6px;
}
.app-navbar .navbar-toggler:focus { box-shadow: 0 0 0 .15rem rgba(255, 255, 255, .14); }
.app-navbar .navbar-toggler-icon {
  width: 1.15em; height: 1.15em;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255,255,255,0.78%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

/* 使用帮助 */
@media (max-width: 1399.98px) {
  .help-link-text { display: none; }
}
.help-download {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .85rem 1rem;
  background: #fff;
  border: 1px solid #e1e7f0;
  border-radius: .6rem;
  color: #1e2761;
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.help-download:hover { border-color: #c8a15a; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); color: #1e2761; }
.help-download-icon { font-size: 1.35rem; color: #b08d57; }
.help-download-text { line-height: 1.35; }

.help-doc { font-size: .92rem; line-height: 1.85; color: #333a45; }
.help-doc > h1:first-child { display: none; }
.help-doc h2 {
  font-size: 1.1rem; color: #1e2761; margin: 1.8rem 0 .75rem;
  padding-left: .6rem; border-left: 3px solid #b08d57;
}
.help-doc h2:first-child { margin-top: .4rem; }
.help-doc h3 { font-size: .98rem; color: #2f4f76; margin: 1.2rem 0 .5rem; }
.help-doc p { margin-bottom: .8rem; }
.help-doc ul, .help-doc ol { padding-left: 1.35rem; margin-bottom: .9rem; }
.help-doc li { margin-bottom: .3rem; }
.help-doc table { width: 100%; border-collapse: collapse; margin: .4rem 0 1.2rem; font-size: .86rem; }
.help-doc th { background: #1e2761; color: #fff; font-weight: 600; padding: .5rem .65rem; text-align: left; }
.help-doc td { border-bottom: 1px solid #e6ebf2; padding: .5rem .65rem; vertical-align: top; }
.help-doc tbody tr:nth-child(even) { background: #f7f8fa; }
.help-doc blockquote {
  background: #fbf6ec; border-left: 3px solid #c8a15a; padding: .7rem .95rem;
  margin: .8rem 0 1.2rem; color: #7a5c2e; border-radius: 0 .35rem .35rem 0;
}
.help-doc blockquote p { margin: 0; }
.help-doc code { background: #f1f4f9; color: #8a5a00; padding: .1rem .35rem; border-radius: 3px; font-size: .86em; }
.help-doc hr { border: 0; border-top: 1px solid #e6ebf2; margin: 1.5rem 0; }
.help-doc strong { color: #1e2761; }

/* 版本下拉 */
.app-version .nav-link { font-variant-numeric: tabular-nums; }
.app-version .nav-link .bi { font-size: .78rem; opacity: .85; }
.version-menu {
  min-width: 270px;
  max-width: min(360px, calc(100vw - 2rem));
  font-size: .82rem;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .2);
}
.version-menu .dropdown-item-text { white-space: normal; padding-top: .25rem; padding-bottom: .25rem; }
.version-menu .dropdown-header { font-size: .74rem; text-transform: none; letter-spacing: .02em; }

@media (max-width: 991.98px) {
  .app-version { margin: .3rem 0; }
  .app-version .nav-link { display: inline-block; }
}

/* ---------------------------- 卡片 / KPI ---------------------------- */
.card {
  --bs-card-border-color: var(--app-border);
  --bs-card-border-radius: var(--app-radius);
  border-radius: var(--app-radius);
  box-shadow: var(--app-shadow);
  background: var(--app-surface);
}
.card-header {
  background: var(--app-surface);
  border-bottom: 1px solid var(--app-border);
  font-weight: 600;
  font-size: .875rem;
  color: #2b3648;
  padding: .72rem 1rem;
  border-radius: var(--app-radius) var(--app-radius) 0 0 !important;
}
.card-body { padding: 1rem; }

.kpi-card { position: relative; overflow: hidden; transition: transform var(--app-ease), box-shadow var(--app-ease); }
.kpi-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--app-accent); opacity: .85;
}
.kpi-card.teal::before { background: var(--app-primary); }
.kpi-card.green::before { background: #2f6b52; }
.kpi-card.red::before { background: #9b3b4a; }
.kpi-card .card-body { padding: .95rem 1.1rem .95rem 1.25rem; }
.kpi-label {
  color: var(--app-muted); font-size: .74rem;
  letter-spacing: .04em; margin-bottom: .35rem;
}
.kpi-value {
  font-size: 1.85rem; font-weight: 650; line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--app-navy);
}
.kpi-value small { font-size: .72rem; font-weight: 500; color: var(--app-muted); margin-left: 2px; }
.kpi-sub { font-size: .72rem; color: var(--app-muted); margin-top: .28rem; }
.kpi-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(16, 24, 40, .09); }

/* ---------------------------- 按钮 / 表单 ---------------------------- */
.btn {
  --bs-btn-border-radius: var(--app-radius-sm);
  border-radius: var(--app-radius-sm);
  font-size: .845rem;
  font-weight: 500;
  padding: .42rem .9rem;
  transition: all var(--app-ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { font-size: .775rem; padding: .26rem .6rem; }
.btn-primary {
  --bs-btn-bg: var(--app-primary);
  --bs-btn-border-color: var(--app-primary);
  --bs-btn-hover-bg: var(--app-primary-dark);
  --bs-btn-hover-border-color: var(--app-primary-dark);
  --bs-btn-active-bg: #123f4a;
  --bs-btn-active-border-color: #123f4a;
  --bs-btn-disabled-bg: #8ba9b0;
  --bs-btn-disabled-border-color: #8ba9b0;
}
.btn-outline-primary {
  --bs-btn-color: var(--app-primary);
  --bs-btn-border-color: #bcd3d8;
  --bs-btn-hover-bg: var(--app-primary);
  --bs-btn-hover-border-color: var(--app-primary);
  --bs-btn-active-bg: var(--app-primary-dark);
}
.btn-outline-secondary { --bs-btn-border-color: var(--app-border-strong); --bs-btn-color: #55606e; }
.btn-outline-danger   { --bs-btn-border-color: #e6c4c9; }
.btn-outline-success  { --bs-btn-border-color: #bfd9cb; }
.btn-outline-warning  { --bs-btn-border-color: #e8d6b0; }
.btn-link { font-weight: 500; }

.form-control, .form-select {
  border-color: var(--app-border-strong);
  border-radius: var(--app-radius-sm);
  font-size: .86rem;
  padding: .45rem .7rem;
  transition: border-color var(--app-ease), box-shadow var(--app-ease);
}
.form-control:focus, .form-select:focus {
  border-color: #9dc0c8;
  box-shadow: 0 0 0 .18rem rgba(31, 94, 110, .12);
}
.form-label { font-size: .8rem; font-weight: 500; color: #3d4757; margin-bottom: .3rem; }
.form-label .req { color: #b03b4b; margin-left: 2px; }
.form-text { font-size: .72rem; color: var(--app-muted); }
.input-group-text { background: var(--app-surface-muted); border-color: var(--app-border-strong); font-size: .84rem; }

/* ---------------------------- 表格 ---------------------------- */
.table {
  --bs-table-border-color: var(--app-border);
  --bs-table-hover-bg: #f7f9fc;
  margin-bottom: 0;
  font-size: .845rem;
  color: var(--app-text);
}
.table > thead th {
  background: var(--app-surface-muted);
  color: #5b6675;
  font-size: .755rem;
  font-weight: 600;
  letter-spacing: .04em;
  border-bottom: 1px solid var(--app-border-strong);
  padding: .55rem .7rem;
  vertical-align: middle;
  white-space: nowrap;
}
.table > tbody > tr > td { padding: .52rem .7rem; vertical-align: middle; }
.table-sm > :not(caption) > * > * { padding: .38rem .55rem; }
.table-light, .table > tfoot > tr.table-light > td { background: var(--app-surface-muted) !important; }

/* ---------------------------- 徽章 / 提示 ---------------------------- */
.badge {
  font-weight: 500; font-size: .72rem;
  padding: .3em .55em; border-radius: 5px; letter-spacing: .01em;
}
/* 角色标识：三种角色用色相 / 明度 / 描边三重区分，避免视觉混淆 */
.badge-role {
  display: inline-flex; align-items: center; gap: .28rem;
  font-size: .75rem; font-weight: 600; letter-spacing: .02em;
  padding: .3em .62em; border-radius: 999px; border: 1px solid transparent;
  line-height: 1.35; white-space: nowrap;
}
.badge-role-super {
  color: #f6edff;
  background: linear-gradient(135deg, #3b2560 0%, #5d3f92 100%);
  border-color: #2c1a49;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}
.badge-role-admin {
  color: #eafcff;
  background: linear-gradient(135deg, #12525f 0%, #2a8194 100%);
  border-color: #0e3f49;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2);
}
.badge-role-user {
  color: #3c5768;
  background: #eef2f6;
  border-color: #c4d2dc;
  font-weight: 500;
}

.status-badge { display: inline-block; min-width: 58px; text-align: center; }
.status-pill {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .18rem .5rem; border-radius: 4px; font-size: .72rem; line-height: 1.5;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap;
}
.status-pill.empty { color: #9aa4b1; background: #f6f8fa; border-color: #e6eaef; }
.status-pill.cert { color: #1d4f7a; background: #e8f1f9; border-color: #c7dcee; }
.status-pill.done { color: #276046; background: #eaf5ef; border-color: #cbe3d6; }
.status-pill.doing { color: #7d5a1c; background: #fdf6e8; border-color: #eeddb8; }
.status-pill.todo { color: #8a2c39; background: #fdf1f3; border-color: #f0d4d8; }
.status-pill.delayed { color: #8a4b0f; background: #fff4e5; border-color: #f3d6ae; }
.status-pill.suspended { color: #5b6675; background: #eef1f4; border-color: #d8dee6; }
.status-pill.na { color: #6b7785; background: #f4f5f7; border-color: #e4e7eb; }

.alert { border-radius: var(--app-radius-sm); font-size: .855rem; border-width: 1px; padding: .65rem .9rem; }
.alert-info    { background: #f2f8f9; border-color: #d3e6e9; color: #21535d; }
.alert-danger  { background: #fdf3f4; border-color: #f0d4d8; color: #8a2c39; }
.alert-success { background: #f2f9f5; border-color: #d2e7db; color: #276046; }
.alert-warning { background: #fdf8ee; border-color: #ecdcbd; color: #7d5a1c; }

/* ---------------------------- 弹窗 ---------------------------- */
.modal-content { border: none; border-radius: 12px; box-shadow: var(--app-shadow-lg); }
.modal-header { border-bottom: 1px solid var(--app-border); padding: .85rem 1.1rem; }
.modal-title { font-size: .95rem; font-weight: 600; }
.modal-body { padding: 1.1rem; }
.modal-footer { border-top: 1px solid var(--app-border); padding: .7rem 1.1rem; }
.modal-backdrop.show { opacity: .42; }

.nav-tabs { border-bottom-color: var(--app-border); }
.nav-tabs .nav-link {
  border: none; color: var(--app-muted); font-size: .855rem;
  padding: .45rem .9rem; border-bottom: 2px solid transparent;
}
.nav-tabs .nav-link:hover { color: var(--app-primary); border-bottom-color: #d3e5e8; }
.nav-tabs .nav-link.active {
  color: var(--app-primary); background: transparent;
  border-bottom: 2px solid var(--app-primary); font-weight: 600;
}
.page-link { color: var(--app-primary); font-size: .82rem; border-color: var(--app-border); }
.page-item.active .page-link { background: var(--app-primary); border-color: var(--app-primary); }

/* ---------------------------- 仪表盘 ---------------------------- */
.rate-bar { height: 8px; background: #edf1f4; border-radius: 5px; overflow: hidden; min-width: 70px; }
.rate-bar > span { display: block; height: 100%; border-radius: 5px; background: var(--app-primary); }
.rate-bar.green > span { background: #2f6b52; }
.rate-bar.gold > span { background: var(--app-accent); }
.rate-text { font-variant-numeric: tabular-nums; font-weight: 600; }
.route-card {
  border: 1px solid var(--app-border); border-radius: var(--app-radius-sm);
  padding: .75rem .85rem; background: var(--app-surface-muted); height: 100%;
}
.route-card .rc-name { font-weight: 600; font-size: .85rem; display: flex; align-items: center; gap: .4rem; }
.route-card .rc-dot { width: 8px; height: 8px; border-radius: 50%; }
.route-card .rc-rate { font-size: 1.35rem; font-weight: 650; font-variant-numeric: tabular-nums; color: var(--app-navy); }
.route-card .rc-meta { font-size: .7rem; color: var(--app-muted); }

.timeline { position: relative; padding-left: 1rem; }
.timeline::before { content: ""; position: absolute; left: 3px; top: 6px; bottom: 6px; width: 1px; background: var(--app-border); }
.timeline-item { position: relative; padding: 0 0 .8rem .9rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -1rem; top: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--app-primary); border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--app-primary);
}
.timeline-item .ti-title { font-size: .82rem; font-weight: 500; }
.timeline-item .ti-meta { font-size: .7rem; color: var(--app-muted); }
.timeline-item .ti-body { font-size: .78rem; color: #4d5866; margin-top: 1px; }

.mini-stat { display: flex; gap: 1rem; flex-wrap: wrap; }
.mini-stat .ms-item { min-width: 74px; }
.mini-stat .ms-num { font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.mini-stat .ms-label { font-size: .68rem; color: var(--app-muted); }

/* ---------------------------- 适配矩阵 ---------------------------- */
.matrix-wrap { overflow: auto; max-height: 72vh; }
.matrix-table { min-width: 1120px; border-collapse: separate; border-spacing: 0; font-size: .8rem; }
.matrix-table th, .matrix-table td { border-bottom: 1px solid var(--app-border); padding: .45rem .5rem; vertical-align: middle; }
.matrix-table thead th {
  position: sticky; top: 0; z-index: 2; background: #f7f9fb;
  font-size: .74rem; color: #5b6675; font-weight: 600; white-space: nowrap;
}
.matrix-table tbody td { background: #fff; }
.matrix-table tbody tr:hover td { background: #f9fbfc; }
.matrix-table .col-software { position: sticky; left: 0; z-index: 1; background: #fff; min-width: 190px; }
.matrix-table thead .col-software { z-index: 3; background: #f7f9fb; }
.matrix-table .matrix-row-clickable { cursor: pointer; }
.matrix-table .route-cell { text-align: center; min-width: 92px; }
.matrix-table .route-cell .qty { font-size: .66rem; color: var(--app-muted); display: block; margin-top: 1px; }

/* ---------------------------- 操作日志 ---------------------------- */
.log-table th { font-size: .74rem; color: #5b6675; font-weight: 600; white-space: nowrap; }
.log-table td { font-size: .8rem; }
.log-progress-table th { font-size: .74rem; font-weight: 600; color: var(--app-muted); }
.log-progress-content { font-size: .8rem; white-space: pre-wrap; word-break: break-word; min-width: 200px; }
.log-table .log-detail {
  min-width: 220px; max-width: 560px; white-space: pre-wrap; word-break: break-word;
}

/* ---------------------------- 账号水印 ---------------------------- */
.account-watermark {
  position: fixed;
  inset: -30vh -30vw;
  z-index: 2000;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-content: space-around;
  justify-items: center;
  gap: 4.5rem 2rem;
  transform: rotate(-24deg);
  transform-origin: center;
  color: #0b1f33;
  opacity: .075;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.account-watermark span { padding: 0 .4rem; }

@media (max-width: 575px) {
  .account-watermark {
    grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
    gap: 3.8rem 1rem;
    font-size: .6rem;
    opacity: .08;
  }
}

@media print {
  .account-watermark { opacity: .09; }
}

/* ---------------------------- 填报表单 ---------------------------- */
.fill-shell { max-width: 760px; margin: 0 auto; }
.fill-step {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; font-weight: 600; color: var(--app-primary);
  margin: 1.1rem 0 .65rem;
}
.fill-step .num {
  width: 21px; height: 21px; border-radius: 50%; background: var(--app-primary-soft);
  color: var(--app-primary); display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem;
}
.route-row { display: flex; align-items: center; gap: .6rem; padding: .35rem 0; }
.route-row .route-name { width: 74px; font-size: .82rem; }
.route-row .form-control { max-width: 130px; }
.route-total { font-size: .78rem; color: var(--app-muted); }

.batch-list { max-height: 320px; overflow-y: auto; }
.batch-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .7rem 1rem; border-bottom: 1px solid var(--app-border);
}
.batch-item:last-child { border-bottom: 0; }
.batch-item.editing { background: var(--app-primary-soft); }
.batch-main { min-width: 0; flex-grow: 1; }
.batch-main .fw-semibold { font-size: .9rem; }
.batch-actions { white-space: nowrap; }
.batch-actions .btn-link { text-decoration: none; padding: .1rem .25rem; font-size: .78rem; }

.mobile-card .card-body { padding: 1.1rem; }
@media (max-width: 575px) {
  .mobile-card .card-body { padding: .9rem .85rem; }
  .fill-shell { padding-bottom: 2rem; }
  .route-row { gap: .4rem; }
  .route-row .route-name { width: 62px; font-size: .78rem; }
  .batch-item { flex-wrap: wrap; padding: .6rem .85rem; }
  .batch-actions { width: 100%; text-align: right; }
}

/* ---------------------------- 二维码 ---------------------------- */
.qr-card { text-align: center; }
.qr-box {
  display: inline-flex; padding: 14px; border: 1px solid var(--app-border);
  border-radius: 10px; background: #fff; box-shadow: var(--app-shadow);
}
.qr-box img { width: 220px; height: 220px; display: block; }
.qr-url {
  font-family: Consolas, Menlo, monospace; font-size: .78rem; color: #4d5866;
  background: var(--app-surface-muted); border: 1px dashed var(--app-border-strong);
  border-radius: 6px; padding: .5rem .7rem; word-break: break-all;
}

/* ---------------------------- 其他 ---------------------------- */
.empty-state { text-align: center; padding: 2.2rem 1rem; color: var(--app-muted); }
.empty-state i { font-size: 1.8rem; opacity: .28; display: block; margin-bottom: .5rem; }
.scope-chip {
  font-size: .7rem; background: var(--app-primary-soft); color: var(--app-primary);
  border: 1px solid #d3e5e8; padding: .12rem .5rem; border-radius: 20px;
}
.table-actions .btn { margin-right: 2px; }
.truncate-1 { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.truncate-2 {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 320px; line-height: 1.35;
}
.container-fluid.p-3 { padding: 1.25rem 1.4rem !important; }
hr { border-color: var(--app-border); opacity: 1; }

/* 登录页 */
body.login-page { background: #0e1726; margin: 0; }
.login-shell { display: grid; grid-template-columns: 1.06fr .94fr; min-height: 100vh; }
.login-brand {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 480px at 18% 12%, rgba(176, 141, 87, .16), transparent 62%),
    radial-gradient(700px 520px at 88% 92%, rgba(31, 94, 110, .42), transparent 60%),
    linear-gradient(150deg, #132034 0%, #16233a 42%, #1b3049 100%);
  color: #fff; padding: 4rem 4.2rem;
  display: flex; flex-direction: column; justify-content: center;
}
.login-brand::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom right, rgba(0, 0, 0, .9), transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom right, rgba(0, 0, 0, .9), transparent 78%);
}
.login-brand > * { position: relative; z-index: 1; }
.login-brand .lg-mark {
  width: 46px; height: 46px; border-radius: 11px; margin-bottom: 1.8rem;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(176, 141, 87, .16); border: 1px solid rgba(176, 141, 87, .5);
  color: #dcbf94; font-size: 1.25rem;
}
.login-brand h1 { font-size: 2rem; font-weight: 600; line-height: 1.25; margin-bottom: .9rem; }
.login-brand .lg-sub { color: rgba(255, 255, 255, .62); font-size: .9rem; line-height: 1.85; max-width: 36ch; }
.login-brand .lg-rule { width: 46px; height: 2px; background: var(--app-accent); margin: 1.9rem 0 1.5rem; }
.login-brand .lg-points { display: flex; flex-direction: column; gap: .6rem; }
.login-brand .lg-points span { color: rgba(255, 255, 255, .52); font-size: .8rem; letter-spacing: .02em; }
.login-brand .lg-points i { color: #c9a978; margin-right: .5rem; font-size: .72rem; }
.login-brand .lg-foot {
  position: absolute; left: 4.2rem; bottom: 2.2rem; z-index: 1;
  color: rgba(255, 255, 255, .28); font-size: .7rem; letter-spacing: .1em;
}
.login-form-side {
  background: var(--app-surface);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2.5rem 2rem;
}
.login-card { width: 100%; max-width: 368px; }
.login-card .lc-title { font-size: 1.32rem; font-weight: 600; color: var(--app-navy); margin-bottom: .3rem; }
.login-card .lc-sub { color: var(--app-muted); font-size: .82rem; margin-bottom: 1.9rem; }
.login-card .form-label { font-size: .78rem; color: #4a5566; }
.login-card .form-control { padding: .58rem .8rem; font-size: .88rem; }
.login-card .btn-login {
  width: 100%; padding: .62rem; font-size: .9rem; font-weight: 500; letter-spacing: .18em;
  background: var(--app-navy); border: 1px solid var(--app-navy); color: #fff;
  border-radius: var(--app-radius-sm); transition: all var(--app-ease);
}
.login-card .btn-login:hover { background: #1f3350; border-color: #1f3350; box-shadow: 0 6px 18px rgba(22, 35, 58, .22); }
.login-card .lc-tip { margin-top: 1.6rem; font-size: .7rem; color: #98a2b0; text-align: center; letter-spacing: .04em; }

@media (max-width: 991px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-brand { padding: 2.6rem 2rem; min-height: auto; }
  .login-brand h1 { font-size: 1.5rem; }
  .login-brand .lg-rule, .login-brand .lg-points, .login-brand .lg-foot { display: none; }
  .login-form-side { padding: 2.5rem 1.4rem 3.5rem; }
  .app-navbar .navbar-collapse { padding-top: .6rem; border-top: 1px solid rgba(255, 255, 255, .1); margin-top: .5rem; }
  .app-user { border-left: none; padding-left: 0; margin: .6rem 0 0; }
  .container-fluid.p-3 { padding: 1rem .9rem !important; }
}

/* ---------------------------- 客户搜索下拉 ---------------------------- */
.customer-picker .customer-options {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px);
  z-index: 1055; max-height: 280px; overflow-y: auto;
  background: #fff; border: 1px solid #d9e0e7; border-radius: 8px;
}
.customer-picker .customer-options .list-group-item {
  border-left: 0; border-right: 0; padding: .5rem .7rem;
}
.customer-picker .customer-options .list-group-item:first-child {
  border-top: 0; border-top-left-radius: 8px; border-top-right-radius: 8px;
}
.customer-picker .customer-options .list-group-item:last-child {
  border-bottom: 0; border-bottom-left-radius: 8px; border-bottom-right-radius: 8px;
}

/* 版本变更历史：锚点定位留出顶部导航高度 */
.card[id^="ver-"] { scroll-margin-top: 76px; }
.version-item .badge { font-weight: 500; }

/* ---------------------------- 页脚备案信息 ---------------------------- */
.app-footer {
  padding: .8rem 1rem 1.1rem;
  text-align: center;
  font-size: .78rem;
  color: #8a95a3;
}
.app-footer .app-footer-sep { margin: 0 .35rem; color: #c3ccd6; }
.app-footer a { color: #8a95a3; text-decoration: none; }
.app-footer a:hover { color: var(--app-primary); text-decoration: underline; }
.login-beian { margin-top: .9rem; text-align: center; font-size: .75rem; color: #8a95a3; }
.login-beian a { color: #8a95a3; text-decoration: none; }
.login-beian a:hover { color: var(--app-primary); text-decoration: underline; }
