:root {
  /* EVERPOWER 品牌色板（取自 logo：石墨黑 #393331 + 品牌绿 #7EBE45） */
  --primary-color: #393331;          /* 石墨黑：主按钮 / 强操作 */
  --primary-hover: #241f1d;
  --accent-color: #7ebe45;           /* 品牌绿：激活态 / 焦点 / 高亮 */
  --accent-text: #4f7f1e;            /* 绿色文字用深绿（白底可读） */
  --accent-soft: rgba(126, 190, 69, 0.14);
  --secondary-color: #f7f6f4;        /* 暖灰背景 */
  --hover-bg: #faf9f7;
  --text-color: #1c1917;
  --light-text: #78716c;
  --border-color: #e7e5e2;
  --success-color: #4f7f1e;
  --warning-color: #d97706;
  --danger-color: #dc2626;
  --ring: 0 0 0 3px rgba(126, 190, 69, 0.22);
  --card-shadow: 0 1px 2px rgba(28, 25, 23, 0.04), 0 1px 3px rgba(28, 25, 23, 0.05);
  --transition: all 0.16s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'SF Pro Icons', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color: var(--text-color);
  background-color: #fbfaf9;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.logo::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 3.5px;
  background: var(--accent-color);
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.08);
}

/* Navigation */
.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--text-color);
}

.nav-link.active {
  color: var(--accent-text);
  font-weight: 600;
}

/* Mobile Navigation */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-color);
}

/* Main Content */
.main-content {
  padding: 40px 0;
}

.page-title {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--text-color);
}

/* Card Styles */
.card {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  padding: 24px;
  margin-bottom: 24px;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* Form Styles */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  font-size: 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: var(--ring);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: #eceae6;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  margin-bottom: 24px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--light-text);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  background: var(--hover-bg);
}

.table tr:hover {
  background-color: var(--hover-bg);
}

/* Filter Styles */
.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.filter-item {
  flex: 1;
  min-width: 200px;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-left: 40px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(28, 25, 23, 0.18);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--light-text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-item {
    width: 100%;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

.w-full {
  width: 100%;
}

.text-danger {
  color: var(--danger-color);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background-color: rgba(126, 190, 69, 0.14);
  color: var(--success-color);
}

.badge-warning {
  background-color: rgba(217, 119, 6, 0.12);
  color: var(--warning-color);
}

.badge-danger {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

/* 可搜索的下拉菜单样式 */
.searchable-select-wrapper {
    position: relative;
    width: 100%;
}

.searchable-select-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
}

.searchable-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 200px;
    overflow-y: auto;
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--card-shadow);
    z-index: 1000;
    margin-top: 4px;
}

.searchable-select-dropdown.active {
    display: block;
}

.searchable-select-item {
    padding: 8px 12px;
    cursor: pointer;
    transition: var(--transition);
}

.searchable-select-item:hover {
    background-color: var(--secondary-color);
}

.searchable-select-item.selected {
    background-color: var(--primary-color);
    color: white;
}

.btn-secondary:hover {
  background-color: #eceae6;
}

.btn-danger {
  background-color: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

/* Table Styles */
.table-container {
  overflow-x: auto;
  margin-bottom: 24px;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th, .table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.table th {
  font-weight: 600;
  color: var(--light-text);
  font-size: 12.5px;
  letter-spacing: 0.02em;
  background: var(--hover-bg);
}

.table tr:hover {
  background-color: var(--hover-bg);
}

/* Filter Styles */
.filter-section {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  align-items: center;
}

.filter-item {
  flex: 1;
  min-width: 200px;
}

.search-box {
  position: relative;
}

.search-box input {
  padding-left: 40px;
}

.search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--light-text);
}

/* Modal Styles */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #fff;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 16px 40px -12px rgba(28, 25, 23, 0.18);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-backdrop.active .modal {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 18px;
  font-weight: 600;
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--light-text);
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Responsive Styles */
@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    background-color: #fff;
    flex-direction: column;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .filter-section {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-item {
    width: 100%;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

.d-flex {
  display: flex;
}

.justify-between {
  justify-content: space-between;
}

.align-center {
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.gap-4 {
  gap: 16px;
}

.w-full {
  width: 100%;
}

.text-danger {
  color: var(--danger-color);
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-success {
  background-color: rgba(126, 190, 69, 0.14);
  color: var(--success-color);
}

.badge-warning {
  background-color: rgba(217, 119, 6, 0.12);
  color: var(--warning-color);
}

.badge-danger {
  background-color: rgba(220, 38, 38, 0.1);
  color: var(--danger-color);
}

.export-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.export-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.export-buttons .fas {
    font-size: 14px;
}
/* ============================================================
   v2.1.1 表格宽度与操作按钮优化
   ============================================================ */
.table th,
.table td {
  vertical-align: middle;
}

/* 表格最小宽度：窗口不够宽时横向滚动，而不是把列挤变形 */
.table {
  min-width: 1000px;
}

/* 供应商列表例外：合并次要信息为副行后 6 列即可全宽展开，无需横向滚动 */
#suppliersTable {
  min-width: 0;
}

/* 操作列（各列表格最后一列）：按钮始终横排，不再被挤成竖排 */
.table td:last-child {
  white-space: nowrap;
}
.table td:last-child .d-flex,
.table td:last-child .btn-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
}
.table td:last-child .btn {
  flex: 0 0 auto;
  white-space: nowrap;
  padding: 5px 12px;
  font-size: 13px;
}

/* 操作列：不再做 position:sticky 的右侧固定。
   历史做法是「横向滚动时按钮始终可见」，但代价太大：
   - 手机上视口仅 390px、表格 1000px，固定列（244px）会**压住项目名称等前面的列**，
     用户看到的是"右边按钮被冻结、表格一片空白"；
   - 阴影 + 背景色还会盖出明显的断层感。
   现在统一改为普通列，跟随表格一起滚动（桌面端表格宽度本来就不溢出，无副作用）。
   如果以后想让操作列永远可见，请用"行内按钮"而不是 sticky。 */
.table thead th:last-child {
  background: var(--hover-bg);
}
.table tbody td:last-child {
  background: #fff;
}
.table tbody tr:hover td:last-child {
  background: var(--hover-bg);
}
/* 供应商列表：显式声明为普通列，防止历史缓存样式残留 */
#suppliersTable thead th:last-child,
#suppliersTable tbody td:last-child {
  position: static;
  box-shadow: none;
}

/* ============================================================
   v2.3.0 布局重设计：左侧石墨侧边栏 + 浅色内容区（现代工具风）
   ============================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ---- 侧边栏：石墨黑（取自 logo），绿为激活态 ---- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 236px;
  background: linear-gradient(180deg, #221e1c 0%, #1c1917 100%);
  color: #d6d3d1;
  display: flex;
  flex-direction: column;
  z-index: 200;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 20px 18px 18px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.brand-mark {
  width: 34px; height: 34px;
  border-radius: 9px;
  background: var(--accent-color);
  color: #1c1917;
  font-weight: 800;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.1);
  flex: 0 0 auto;
}

.brand-text {
  color: #fff;
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: 0.04em;
  line-height: 1.25;
}
.brand-text b { color: var(--accent-color); }
.brand-text small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: #a8a29e;
  letter-spacing: 0.02em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
}

.nav-section {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #78716c;
  padding: 14px 10px 6px;
  text-transform: uppercase;
}

.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 10px;
  margin-bottom: 2px;
  border-radius: 8px;
  color: #d6d3d1;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
  position: relative;
}

.side-link i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: #a8a29e;
  transition: var(--transition);
}

.side-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.side-link:hover i { color: #fff; }

.side-link.active {
  background: rgba(126, 190, 69, 0.14);
  color: #c8e6a0;
  font-weight: 600;
}
.side-link.active i { color: var(--accent-color); }
.side-link.active::before {
  content: '';
  position: absolute;
  left: -12px; top: 7px; bottom: 7px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--accent-color);
}

.sidebar-foot {
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.side-user {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.side-avatar {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(126, 190, 69, 0.2);
  color: var(--accent-color);
  font-weight: 700;
  font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}

.side-user-name {
  font-size: 13px;
  color: #e7e5e4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-logout {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #a8a29e;
  text-decoration: none;
  transition: var(--transition);
  flex: 0 0 auto;
}
.side-logout:hover {
  background: rgba(220, 38, 38, 0.18);
  color: #fca5a5;
}

.sidebar-backdrop {
  display: none;
}

/* ---- 主内容区 ---- */
.app-main {
  flex: 1;
  margin-left: 236px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: none;
  position: sticky;
  top: 0;
  z-index: 150;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 16px;
  background: rgba(251, 250, 249, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
}

.topbar-crumb {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-color);
}

.app-content {
  flex: 1;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 32px 36px 48px;
}

/* 页面标题工具化 */
.app-content .page-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 20px;
}

/* 响应式：<=1024px 侧边栏收进抽屉 */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.35);
  }
  body.sidebar-open .sidebar { transform: translateX(0); }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(28, 25, 23, 0.45);
    z-index: 190;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  body.sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }

  .app-main { margin-left: 0; }
  .topbar { display: flex; }
  .mobile-nav-toggle { display: block; }
  .app-content { padding: 20px 16px 40px; }
}

@media (min-width: 1025px) {
  .mobile-nav-toggle { display: none; }
}

/* ===== 来源上下文条（项目↔供应商来回切换） ===== */
.ctx-bar {
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}
.ctx-bar-inmodal {
    margin-bottom: 20px;
    background: var(--secondary-color);
    border-color: rgba(0, 0, 0, 0.05);
    border-left: 3px solid var(--primary-color);
}
.ctx-bar-line {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.ctx-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 10px 4px 8px;
    border-radius: 8px;
    background: rgba(126, 190, 69, 0.10);
    transition: var(--transition);
}
.ctx-back:hover {
    background: rgba(126, 190, 69, 0.35);
}

/* ===== 全局消息提示（右上角 toast，统一各页面观感） ===== */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    width: 380px;
    max-width: calc(100vw - 32px);
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.alert-container .alert {
    pointer-events: auto;
    position: relative;
    margin: 0;
    padding: 14px 44px 14px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14.5px;
    line-height: 1.5;
    font-weight: 500;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    word-break: break-word;
    animation: toastIn 0.28s cubic-bezier(0.21, 1.02, 0.73, 1);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.alert-container .alert-success {
    background: #2E7D32;
    color: #fff;
    border-left: 4px solid rgba(255, 255, 255, 0.55);
}
.alert-container .alert-error {
    background: #C62828;
    color: #fff;
    border-left: 4px solid rgba(255, 255, 255, 0.55);
}
.alert-container .alert-warning {
    background: #EF6C00;
    color: #fff;
    border-left: 4px solid rgba(255, 255, 255, 0.55);
}
.alert-container .alert-info,
.alert-container .alert-message {
    background: #37474F;
    color: #fff;
    border-left: 4px solid rgba(255, 255, 255, 0.55);
}
.alert-container .alert.is-hiding {
    opacity: 0;
    transform: translateX(16px);
}
.alert-container .alert-close {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    padding: 0;
    line-height: 1;
    font-size: 17px;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border: none;
    border-radius: 6px;
    cursor: pointer;
}
.alert-container .alert-close:hover {
    background: rgba(255, 255, 255, 0.34);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: translateX(0); }
}
@media (max-width: 480px) {
    .alert-container { width: auto; left: 16px; right: 16px; }
}

/* ==========================================================================
   自绘确认框（uiConfirm）：替代钉钉/企业微信/微信 WebView 会屏蔽的原生 confirm()
   ========================================================================== */
.ui-confirm-mask {
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 6000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: uiConfirmFade .12s ease-out;
  -webkit-tap-highlight-color: transparent;
}
.ui-confirm-box {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 50px -12px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 360px;
  padding: 22px 22px 16px;
  animation: uiConfirmUp .16s ease-out;
}
.ui-confirm-msg {
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 20px;
  word-break: break-word;
}
.ui-confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.ui-confirm-actions button {
  min-width: 88px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid var(--border-color, #dcdfe6);
  background: #fff;
  color: #333;
  -webkit-tap-highlight-color: transparent;
}
.ui-confirm-actions .ui-confirm-ok {
  background: #d93025;
  border-color: #d93025;
  color: #fff;
  font-weight: 500;
}
.ui-confirm-actions .ui-confirm-ok:active { background: #b7261c; }
.ui-confirm-actions .ui-confirm-cancel:active { background: #f2f2f2; }
@keyframes uiConfirmFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes uiConfirmUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   通用分页控件（templates/_pagination.html）
   供应商 / 项目 / 物料 / 外部人员列表共用：首页、上一页、页码输入、下一页、尾页
   ========================================================================== */
.local-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border-top: 1px solid var(--border-color);
}
.pagination-info {
  color: var(--light-text);
  font-size: 13px;
  white-space: nowrap;
}
.pagination-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.pg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: #fff;
  color: var(--text-color);
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.pg-btn:hover:not(:disabled) {
  border-color: var(--accent-color);
  color: var(--accent-text);
  background: var(--hover-bg);
}
.pg-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pg-arrow {
  font-size: 15px;
  line-height: 1;
}
.pg-jump {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--secondary-color);
  font-size: 13px;
  color: var(--light-text);
  white-space: nowrap;
}
.pg-jump-label {
  font-size: 13px;
  color: var(--light-text);
}
.pg-input {
  width: 54px;
  height: 26px;
  padding: 0 4px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: #fff;
  color: var(--text-color);
  font-size: 13px;
  font-family: inherit;
  text-align: center;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.pg-input::-webkit-outer-spin-button,
.pg-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.pg-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: var(--ring);
}
.pg-go {
  height: 26px;
  min-height: 26px;
  padding: 0 8px;
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
}
.pg-go:hover:not(:disabled) {
  background: rgba(126, 190, 69, 0.26);
  border-color: transparent;
  color: var(--accent-text);
}
@media (max-width: 768px) {
  .local-pagination {
    padding: 12px 10px;
    gap: 8px;
    justify-content: center;
  }
  .pagination-info {
    width: 100%;
    text-align: center;
    font-size: 12px;
  }
  .pagination-controls {
    gap: 4px;
    justify-content: center;
    width: 100%;
  }
  .pg-btn {
    min-height: 32px;
    padding: 0 8px;
    font-size: 12px;
  }
  .pg-word {
    display: none;         /* 手机端只留箭头，省宽度 */
  }
  .pg-jump {
    height: 32px;
    gap: 4px;
    padding: 0 3px 0 8px;
  }
  .pg-jump-label {
    font-size: 12px;
  }
  .pg-input {
    width: 46px;
    height: 24px;
  }
  .pg-go {
    height: 24px;
    min-height: 24px;
    padding: 0 6px;
  }
}
