:root {
  color: #202a31;
  background: #f4f6f5;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-synthesis: none;
  --sidebar-width: 224px;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; }
input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid #cdd5d3; border-radius: 7px;
  color: #1e2a28; background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 70px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { border-color: #1d765a; box-shadow: 0 0 0 3px rgba(29,118,90,.13); }
input[readonly] { color: #557066; background: #f2f5f3; }
label { position: relative; display: grid; gap: 7px; color: #34433e; font-size: 13px; font-weight: 700; }
label small { color: #2c8061; font-size: 11px; font-weight: 800; line-height: 1.25; }
label, .field-drop-group { min-width: 0; }
.visually-hidden-file {
  position: absolute;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.file-picker-row {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.file-picker-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 9px;
}
.checkbox-field input {
  width: auto;
  min-height: auto;
  padding: 0;
}
.checkbox-field span {
  color: #34433e;
  font-size: 13px;
}
.quick-suggestions {
  position: absolute; z-index: 80; top: calc(100% + 4px); left: 0; right: 0;
  display: grid; gap: 5px; max-height: 230px; overflow-y: auto;
  margin: 0; padding: 7px; border: 1px solid #d6e3dc; border-radius: 7px;
  background: #f7fbf8; box-shadow: 0 14px 34px rgba(23, 72, 49, .16);
}
.quick-suggestions[hidden] { display: none; }
.quick-suggestions button {
  width: 100%; min-height: 30px; padding: 6px 8px; border: 0; border-radius: 5px;
  color: #275844; background: #eef6f1; text-align: left; font-size: 12px; font-weight: 700;
}
.quick-suggestions button:hover { background: #dcefe2; }
.quick-suggestions button strong,
.quick-suggestions button small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-suggestions button small {
  margin-top: 2px;
  color: #6f8077;
  font-size: 11px;
  font-weight: 600;
}
.date-cn-preview { display: none; color: #587263; font-size: 12px; font-weight: 500; }
.date-picker-popover {
  position: absolute; z-index: 50; padding: 12px; border: 1px solid #c7d8cf; border-radius: 10px;
  background: #fff; box-shadow: 0 18px 45px rgba(21, 50, 37, .18); color: #243c31;
}
.date-picker-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.date-picker-head label { gap: 4px; color: #496257; font-size: 12px; }
.date-picker-head select { min-height: 34px; padding: 5px 8px; font-size: 13px; font-weight: 800; }
.date-picker-head strong { font-size: 15px; }
.date-picker-head button, .date-picker-actions button {
  width: auto; min-height: 30px; padding: 5px 9px; border: 1px solid #c9d9d1; border-radius: 6px;
  color: #1e6449; background: #f2f8f4; font-size: 12px; font-weight: 800;
}
.date-picker-weekdays, .date-picker-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.date-picker-weekdays span { padding: 4px 0; color: #6f8278; text-align: center; font-size: 12px; font-weight: 800; }
.date-picker-days button, .date-picker-empty {
  display: grid; place-items: center; min-width: 34px; min-height: 32px; border-radius: 7px; font-size: 13px;
}
.date-picker-days button { border: 0; color: #213c31; background: #f7faf8; }
.date-picker-days button:hover { color: #fff; background: #2d8061; }
.date-picker-days button.today { outline: 2px solid #b8d7c6; }
.date-picker-days button.selected { color: #fff; background: #176447; font-weight: 900; }
.date-picker-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
body.detail-panel-open .date-picker-popover { z-index: 180; }

.login-page { background: #e8edea; }
.auth-shell {
  display: grid; grid-template-columns: minmax(280px, .94fr) minmax(400px, 510px); gap: clamp(44px, 10vw, 160px);
  align-items: center; min-height: 100vh; padding: clamp(30px, 8vw, 110px); background:
  linear-gradient(115deg, rgba(31,101,75,.08), transparent 42%), #f4f6f4;
}
.auth-intro { max-width: 510px; }
.eyebrow, .form-kicker { margin: 0 0 12px; color: #287157; font-size: 11px; font-weight: 800; letter-spacing: .14em; }
.auth-intro h1 { margin: 0; color: #123f31; font-family: "STSong", "SimSun", serif; font-size: clamp(42px, 5.3vw, 70px); line-height: 1.13; letter-spacing: .035em; }
.auth-intro > p:last-child { margin: 22px 0 0; color: #60716b; font-size: 14px; }
.auth-card { padding: 42px; border: 1px solid #d7dedb; border-radius: 13px; background: #fff; box-shadow: 0 24px 65px rgba(29, 58, 46, .13); }
.auth-loading { color: #60716b; }
.auth-form { display: grid; gap: 16px; }
.auth-form[hidden] { display: none; }
.auth-form h2 { margin: -2px 0 2px; color: #162e25; font-size: 25px; }
.form-hint { margin: 0 0 7px; color: #708078; font-size: 13px; line-height: 1.65; }
.auth-form button, .save-bar button, .search-box button, .primary-button {
  min-height: 44px; padding: 10px 16px; border: 0; border-radius: 7px; color: #fff; background: #166447; font-weight: 800;
  box-shadow: 0 3px 0 #0b4d35; transition: background .15s, transform .15s, box-shadow .15s;
}
.auth-form button:hover, .save-bar button:hover, .search-box button:hover, .primary-button:hover { background: #105639; transform: translateY(-1px); box-shadow: 0 4px 0 #0b4d35; }
.auth-message { min-height: 20px; margin: 18px 0 0; color: #ae402f; font-size: 13px; }

.workspace-page { min-height: 100vh; padding-left: var(--sidebar-width); background: #f3f5f4; }
.workspace-header {
  position: fixed; inset: 0 auto 0 0; z-index: 10; display: flex; flex-direction: column; align-items: stretch;
  justify-content: flex-start; width: var(--sidebar-width); min-height: 100vh; padding: 24px 14px;
  border-right: 0; color: #dcebe3; background: #153d2f;
  box-shadow: 7px 0 24px rgba(20, 55, 42, .08); backdrop-filter: none;
}
.brand {
  display: grid; gap: 5px; margin-bottom: 16px; padding: 0 8px 18px; border-bottom: 1px solid rgba(255,255,255,.12);
  color: #fff; font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif; font-size: 19px; font-weight: 700; text-decoration: none; letter-spacing: .04em;
}
.brand span { color: #9fc0b0; font-family: "Microsoft YaHei UI", sans-serif; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.workspace-nav { display: grid; align-content: start; gap: 6px; visibility: hidden; }
.workspace-navigation-ready .workspace-nav { visibility: visible; }
.workspace-nav a, .nav-logout {
  display: flex; align-items: center; width: 100%; min-height: 40px; padding: 10px 12px; border: 0; border-radius: 7px;
  color: #c6d9cf; background: transparent; font-size: 14px; font-weight: 700; text-align: left; text-decoration: none;
}
.workspace-nav a.active { color: #163f30; background: #f3f8f5; }
a[href="/shipping-local/audit.html"],
a[href="/shipping-local/deleted.html"] { display: none; }
.admin-navigation-ready a[href="/shipping-local/audit.html"],
.admin-navigation-ready a[href="/shipping-local/deleted.html"] { display: block; }
.workspace-nav a:not(.active):hover, .nav-logout:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-logout { margin-top: 10px; }
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; margin-left: auto;
  padding: 0 6px; border-radius: 999px; color: #fff; background: #b63d2f; font-size: 11px; font-weight: 900;
}
.nav-badge[hidden] { display: none; }

.workspace { width: min(1320px, calc(100% - 40px)); margin: 0 auto; padding: 46px 0 80px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 28px; }
.page-title h1 { margin: 0; color: #1d3028; font-size: clamp(28px, 3vw, 39px); letter-spacing: -.04em; }
.page-title p:last-child { margin: 10px 0 0; color: #6b7c74; font-size: 14px; }
.record-meta { display: flex; gap: 25px; margin: 0; padding: 12px 16px; border-left: 3px solid #7eb493; background: #edf4ef; }
.record-meta div { min-width: 105px; }
.record-meta dt { color: #75877e; font-size: 11px; }
.record-meta dd { margin: 5px 0 0; color: #28523f; font-size: 13px; font-weight: 800; }

.order-form { display: grid; gap: 17px; }
.form-section { padding: 25px; border: 1px solid #dce3df; border-radius: 10px; background: #fff; box-shadow: 0 5px 20px rgba(34, 59, 48, .035); }
.section-heading { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 21px; }
.section-heading > span, .heading-index > span { display: grid; flex: 0 0 auto; place-items: center; width: 27px; height: 27px; border-radius: 50%; color: #fff; background: #2c8061; font-size: 11px; font-weight: 800; }
.section-heading h2 { margin: 1px 0 4px; color: #20342c; font-size: 17px; }
.section-heading p { margin: 0; color: #76867e; font-size: 12px; line-height: 1.6; }
.section-heading-row { align-items: center; justify-content: space-between; }
.heading-index { display: flex; align-items: flex-start; gap: 13px; }
.secondary-button { min-height: 36px; padding: 7px 12px; border: 1px solid #b7d0bf; border-radius: 6px; color: #1d6247; background: #edf6f0; font-size: 13px; font-weight: 800; }
.secondary-button:hover { background: #dcefe2; }
.ghost-button {
  min-height: 36px; padding: 7px 12px; border: 1px solid #d0d9d4; border-radius: 6px;
  color: #536b5e; background: #fff; font-size: 13px; font-weight: 800;
}
.ghost-button:hover { background: #f1f5f3; }
.field-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); align-items: start; gap: 16px 18px; }
.order-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.quote-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); }
.manual-material-grid {
  display: grid;
  grid-template-columns: minmax(300px, 2fr) minmax(170px, 1fr) minmax(90px, .45fr) minmax(100px, .55fr);
  align-items: start;
  gap: 12px;
}
.manual-material-list { display: grid; gap: 8px; }
.manual-material-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid #edf2ef;
  border-radius: 9px;
  background: #fbfdfb;
}
.manual-material-row-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border-radius: 999px;
  color: #1f694b;
  background: #e7f5ec;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}
.manual-material-remove {
  align-self: end;
  min-height: 34px;
  padding: 6px 10px;
  white-space: nowrap;
}
.manual-material-remove[hidden] { display: none; }
.span-2 { grid-column: span 2; }
.quote-calculation-panel {
  display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 12px; margin-top: 14px;
  padding: 14px; border: 1px solid #c8d8cf; border-radius: 10px; background: #f7fbf8;
}
.quote-calculation-panel div { display: grid; gap: 5px; padding: 10px 12px; border-radius: 8px; background: #ffffff; }
.quote-calculation-panel span { color: #64766c; font-size: 12px; font-weight: 700; }
.quote-calculation-panel strong { color: #1e5f46; font-size: 20px; }
.quote-calculation-panel p { grid-column: 1 / -1; margin: 0; color: #6c766f; font-size: 12px; }
.quote-fee-ready { color: #1d6b4c; font-weight: 800; }
.quote-fee-pending { color: #a15c08; font-weight: 800; }

.order-item-list { display: grid; gap: 13px; }
.supplier-group-card { display: grid; gap: 15px; padding: 17px; border: 1px solid #c9ddd1; border-radius: 10px; background: #f8fcf9; box-shadow: inset 3px 0 0 #2c8061; }
.supplier-group-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.supplier-group-head strong { color: #244437; font-size: 15px; }
.supplier-group-head strong span { color: #69907d; }
.supplier-group-head > div { display: flex; align-items: center; gap: 8px; }
.supplier-group-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.supplier-group-file-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.supplier-group-items { display: grid; gap: 11px; }
.item-card { padding: 17px; border: 1px solid #d8e2dc; border-radius: 8px; background: #fafcfb; }
.item-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.item-card-head strong { color: #2b463a; font-size: 14px; }
.item-card-head strong span { color: #69907d; }
.item-remove, .file-remove, .result-card button, .detail-heading button { border: 0; border-radius: 5px; color: #9a4034; background: #f9ece9; font-size: 12px; font-weight: 700; }
.item-remove { min-height: 30px; padding: 5px 9px; }
.item-grid { grid-template-columns: repeat(4, minmax(180px, 1fr)); }
.calculated { font-weight: 800; }

.requirement-import-panel {
  display: grid; gap: 11px; margin-bottom: 15px; padding: 13px; border: 1px solid #d8e5dc;
  border-radius: 9px; background: #fbfdfb;
}
.quick-import-section { border-color: #c7ddce; background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%); }
.quick-import-panel { display: grid; gap: 10px; margin-bottom: 13px; }
.file-import-panel { margin-bottom: 0; padding-top: 3px; }
.clipboard-import-label { display: grid; gap: 8px; color: #244437; font-size: 13px; font-weight: 800; }
.clipboard-import-label textarea {
  width: 100%; min-height: 128px; resize: vertical; padding: 11px 12px; border: 1px solid #cfded5; border-radius: 8px;
  color: #24372f; background: #fff; font: 13px/1.6 ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
}
.clipboard-import-label textarea:focus { outline: 2px solid rgba(44, 128, 97, .18); border-color: #5fa77e; }
.quick-import-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.requirement-preview { padding: 13px; border: 1px solid #dce6df; border-radius: 8px; background: #fff; }
.requirement-preview-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 11px;
}
.requirement-preview-head strong { color: #274a3b; font-size: 14px; }
.requirement-preview-head p { margin: 5px 0 0; color: #6d7e75; font-size: 12px; line-height: 1.5; }
.requirement-preview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.requirement-preview-actions button:disabled { cursor: not-allowed; }
.requirement-preview-table-wrap { max-height: 280px; overflow: auto; border: 1px solid #edf1ef; border-radius: 7px; }
.requirement-preview-table-wrap table { font-size: 12px; }
.requirement-preview-table-wrap th, .requirement-preview-table-wrap td { padding: 8px; }
.requirement-issues { display: grid; gap: 5px; margin: 10px 0 0; padding-left: 18px; color: #8a5c28; font-size: 12px; }
.requirement-status-ready { color: #1d6a49; font-weight: 800; }
.requirement-status-need_review { color: #9a453a; font-weight: 800; }

.attachment-drop-zone { display: grid; place-items: center; gap: 4px; min-height: 132px; border: 2px dashed #abc9b6; border-radius: 8px; color: #3b7357; background: #f5faf6; outline: none; transition: border-color .15s, background .15s; }
.attachment-drop-zone strong { font-size: 15px; }
.attachment-drop-zone span { color: #6f887a; font-size: 12px; }
.attachment-drop-zone:hover, .attachment-drop-zone:focus, .attachment-drop-zone.dragging { border-color: #238363; background: #eaf5ed; }
.compact-drop-zone { min-height: 86px; }
.field-drop-group { display: grid; align-content: start; gap: 8px; }
.item-receipt-drop-group { margin-top: 14px; }
.field-drop-group p { margin: 0; color: #244437; font-size: 13px; font-weight: 800; }
.attachment-list, .saved-attachments ul { display: grid; gap: 8px; margin: 13px 0 0; padding: 0; list-style: none; }
.attachment-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border-radius: 6px; color: #4d6558; background: #f0f4f1; font-size: 13px; }
.attachment-list li span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-remove { padding: 5px 7px; }
.saved-attachments { margin-top: 15px; padding: 13px; border-left: 3px solid #5fa77e; background: #edf7ef; color: #285b41; font-size: 13px; }
.saved-attachments a { color: #176447; font-weight: 700; }
.saved-attachments li { min-width: 0; }
.saved-attachments a,
.detail-attachments a,
.attachment-link-cell a,
.supplier-quote-card a {
  display: inline-block;
  max-width: min(100%, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: bottom;
}
.save-bar { position: sticky; bottom: 14px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 17px; border: 1px solid #cbd9d1; border-radius: 9px; background: rgba(255,255,255,.96); box-shadow: 0 12px 28px rgba(36, 64, 50, .13); }
.save-bar button { min-width: 160px; }
.save-bar button.secondary-button,
.save-bar button.secondary-button:hover {
  border: 1px solid #b7d0bf;
  color: #1d6247;
  background: #edf6f0;
  box-shadow: none;
  transform: none;
}
.save-bar button.is-incomplete,
.save-bar button.is-incomplete:hover {
  color: #6d7772;
  background: #d9dedb;
  box-shadow: 0 3px 0 #bcc5c0;
  transform: none;
}
.save-bar button.is-incomplete { cursor: pointer; }
.save-bar #save-order-button.project-mismatch-blocked,
.save-bar #save-order-button.project-mismatch-blocked:hover {
  color: #f5f7f6;
  background: #aeb8b3;
  box-shadow: 0 3px 0 #929d97;
  cursor: pointer;
  opacity: 1;
  transform: none;
}
.entry-required-missing { color: #9b4137; }
.entry-required-missing input,
.entry-required-missing select,
.entry-required-missing textarea {
  border-color: #c35b4e;
  background: #fffaf9;
  box-shadow: 0 0 0 3px rgba(195, 91, 78, .11);
}
.entry-required-missing .attachment-drop-zone {
  border-color: #c35b4e;
  background: #fffaf9;
  box-shadow: 0 0 0 3px rgba(195, 91, 78, .11);
}
.entry-required-target input,
.entry-required-target select,
.entry-required-target textarea { box-shadow: 0 0 0 4px rgba(195, 91, 78, .2); }
.order-message { min-height: 20px; margin: 0; color: #27674b; font-size: 13px; }
.order-message.is-validation-error { color: #b42318; font-weight: 900; }
.order-message.is-validation-error-flashing { animation: validation-error-flash .42s ease-in-out 3; }
@keyframes validation-error-flash {
  0%, 100% { opacity: 1; }
  50% { opacity: .12; }
}
.order-template-export-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid #b7d0bf;
  border-radius: 7px;
  color: #14583e;
  background: #edf6f0;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}
.order-template-export-link:hover { background: #dcefe2; }
.order-template-export-link[hidden] { display: none; }
.template-original-images-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #d5e4db;
  border-radius: 7px;
  color: #385a49;
  background: #f7fbf8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.template-original-images-option[hidden] { display: none; }
.template-original-images-option input { width: 15px; height: 15px; margin: 0; accent-color: #176447; }

.entry-workspace {
  width: min(1540px, calc(100% - 32px));
  padding-top: 26px;
}
.entry-workspace .page-title { align-items: center; margin-bottom: 12px; }
.entry-workspace .page-title h1 { font-size: clamp(25px, 2vw, 32px); }
.entry-workspace .page-title p { margin-top: 5px; }
.entry-workspace .record-meta { gap: 18px; padding: 9px 13px; }
.entry-workspace .order-form { gap: 12px; }
.entry-workspace .form-section {
  padding: 16px;
  border-radius: 9px;
  box-shadow: 0 3px 14px rgba(34, 59, 48, .025);
}
.entry-workspace .section-heading { margin-bottom: 13px; }
.entry-workspace .section-heading h2,
.entry-section-summary h2 { font-size: 16px; }
.entry-workspace .section-heading p,
.entry-section-summary p { font-size: 12px; line-height: 1.45; }
.entry-workspace label { gap: 5px; font-size: 12px; }
.entry-workspace input,
.entry-workspace select,
.entry-workspace textarea {
  min-height: 36px;
  padding: 7px 9px;
  font-size: 13px;
}
.entry-workspace textarea { min-height: 56px; }
.entry-workspace .field-grid { gap: 10px 12px; }
.entry-workspace .order-grid { grid-template-columns: minmax(150px, .8fr) minmax(260px, 1.65fr) minmax(160px, .85fr) minmax(170px, .9fr); }
.entry-workspace .order-notes-field { grid-column: 1 / span 2; width: min(100%, 620px); }
.entry-workspace .span-4 { grid-column: 1 / -1; }
.entry-workspace .quick-import-content {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr);
  gap: 10px 14px;
  padding: 14px 16px 16px;
}
.entry-workspace .quick-import-content .requirement-preview,
.entry-workspace .quick-import-content #pending-purchase-requirement-attachments {
  grid-column: 1 / -1;
}
.entry-workspace .quick-import-panel { margin-bottom: 0; }
.entry-workspace .clipboard-import-label textarea { min-height: 88px; }
.entry-workspace .quick-import-actions { gap: 7px; }
.entry-workspace .attachment-drop-zone {
  min-height: 108px;
  padding: 12px;
}
.entry-workspace .compact-drop-zone { min-height: 64px; }
.entry-workspace .attachment-drop-zone strong { font-size: 13px; }
.entry-workspace .attachment-drop-zone span { font-size: 11px; text-align: center; }
.entry-main-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 238px;
  gap: 12px;
  align-items: start;
}
.entry-main-content { display: grid; min-width: 0; gap: 12px; }
.entry-main-content > *,
.entry-workspace .items-section,
.entry-workspace .supplier-group-card { min-width: 0; }
.entry-order-summary {
  position: sticky;
  top: 18px;
  padding: 16px;
  border: 1px solid #dce3df;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(34, 59, 48, .045);
}
.entry-order-summary h2 { margin: 0 0 12px; color: #233a30; font-size: 17px; }
.entry-order-summary dl { margin: 0; }
.entry-order-summary dl div,
.entry-summary-status > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  border-bottom: 1px solid #edf1ef;
}
.entry-order-summary dt,
.entry-summary-status span { color: #738178; font-size: 12px; }
.entry-order-summary dd { margin: 0; color: #263c32; font-size: 13px; font-weight: 900; }
.entry-summary-status { margin-top: 12px; padding-top: 4px; border-top: 1px solid #dfe7e2; }
.entry-summary-status > div:last-child { border-bottom: 0; }
.entry-summary-status strong { font-size: 11px; }
.entry-summary-status .is-ready { color: #176447; }
.entry-summary-status .is-pending { color: #a06b14; }
.entry-collapsible-section {
  padding: 0 !important;
  overflow: hidden;
}
.entry-section-summary {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  color: #20342c;
  list-style: none;
  cursor: pointer;
}
.entry-section-summary::-webkit-details-marker,
.entry-inline-details summary::-webkit-details-marker,
.supplier-group-files-detail summary::-webkit-details-marker { display: none; }
.entry-section-summary::after {
  content: "展开";
  margin-left: auto;
  padding: 3px 9px;
  border-radius: 999px;
  color: #1d6247;
  background: #edf6f0;
  font-size: 12px;
  font-weight: 900;
}
.entry-collapsible-section[open] > .entry-section-summary { border-bottom: 1px solid #edf2ef; }
.entry-collapsible-section[open] > .entry-section-summary::after { content: "收起"; }
.entry-section-summary > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  color: #fff;
  background: #2c8061;
  font-size: 11px;
  font-weight: 800;
}
.entry-section-summary h2,
.entry-section-summary p { margin: 0; }
.entry-collapsible-section > .field-grid,
.entry-collapsible-section > .attachment-drop-zone,
.entry-collapsible-section > .attachment-list,
.entry-collapsible-section > .saved-attachments {
  margin: 14px 16px 16px;
}
.supplier-group-tabs {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  min-width: 0;
  margin: 0 0 12px;
  padding-bottom: 8px;
  overflow-x: auto;
  border-bottom: 1px solid #dfe8e3;
}
.supplier-group-tab {
  width: 100%;
  min-height: 34px;
  padding: 7px 32px 7px 12px;
  border: 1px solid #cfe0d6;
  border-radius: 7px;
  color: #35624d;
  background: #eef6f1;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.supplier-group-tab[aria-selected="true"] { color: #fff; border-color: #176447; background: #176447; }
.supplier-group-tab-shell {
  position: relative;
  flex: 0 0 auto;
}
.supplier-group-tab-remove {
  position: absolute;
  top: 3px;
  right: 3px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #9b453b;
  background: #f8e6e3;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.supplier-group-tab-remove:hover { color: #fff; background: #b24e43; }
.supplier-group-tab[aria-selected="true"] + .supplier-group-tab-remove {
  color: #fff;
  background: rgba(255, 255, 255, .2);
}
.supplier-group-tab[aria-selected="true"] + .supplier-group-tab-remove:hover { background: #b24e43; }
.supplier-group-delete-popover {
  position: fixed;
  z-index: 30;
  width: 276px;
  padding: 14px;
  border: 1px solid #e3d9d5;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(49, 44, 40, .18);
  animation: supplier-delete-pop-in .14s ease-out;
}
.supplier-group-delete-popover::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 18px;
  width: 11px;
  height: 11px;
  border-top: 1px solid #e3d9d5;
  border-left: 1px solid #e3d9d5;
  background: #fff;
  transform: rotate(45deg);
}
.supplier-group-delete-popover.is-above::before {
  top: auto;
  bottom: -6px;
  border: 0;
  border-right: 1px solid #e3d9d5;
  border-bottom: 1px solid #e3d9d5;
}
.supplier-group-delete-title { display: flex; align-items: center; gap: 8px; color: #51352f; }
.supplier-group-delete-title > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: #fff;
  background: #d78338;
  font-size: 12px;
  font-weight: 900;
}
.supplier-group-delete-title strong { font-size: 14px; }
.supplier-group-delete-popover p { margin: 8px 0 12px 28px; color: #756761; font-size: 12px; line-height: 1.55; }
.supplier-group-delete-actions { display: flex; justify-content: flex-end; gap: 7px; }
.supplier-group-delete-actions button { min-height: 31px; padding: 6px 11px; border-radius: 6px; font-size: 12px; font-weight: 900; }
.supplier-group-delete-cancel { border: 1px solid #cfd9d3; color: #52645a; background: #fff; }
.supplier-group-delete-confirm { border: 1px solid #ad4338; color: #fff; background: #ad4338; }
.supplier-group-delete-confirm:hover { background: #91372f; }
@keyframes supplier-delete-pop-in {
  from { opacity: 0; transform: translateY(-4px) scale(.97); }
}
.entry-workspace .supplier-group-card {
  gap: 11px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.entry-workspace .supplier-group-card[hidden] { display: none; }
.entry-workspace .supplier-group-grid {
  grid-template-columns: minmax(180px, 1.15fr) minmax(220px, 1.45fr) repeat(3, minmax(105px, .72fr));
}
.entry-workspace .supplier-group-head { min-height: 32px; padding: 0 0 7px; border-bottom: 1px dashed #dfe8e3; }
.entry-workspace .supplier-group-head > div { display: flex; align-items: baseline; gap: 10px; }
.entry-workspace .supplier-group-head strong { font-size: 13px; }
.entry-workspace .supplier-group-head small { color: #7c8c84; font-size: 11px; }
.entry-item-table-head,
.item-row-grid {
  display: grid;
  grid-template-columns: 32px minmax(100px, 1.35fr) minmax(80px, 1fr) minmax(45px, .48fr) minmax(55px, .55fr) minmax(68px, .68fr) minmax(74px, .72fr) minmax(62px, .6fr) minmax(68px, .68fr) minmax(76px, .75fr) 28px;
  gap: 6px;
  align-items: start;
}
.supplier-group-item-table { min-width: 0; overflow-x: auto; }
.entry-item-table-head { padding: 7px 9px; color: #738178; background: #f4f8f5; font-size: 10px; font-weight: 900; }
.entry-item-table-head span { min-width: 0; }
.supplier-group-files-detail,
.entry-inline-details {
  border: 1px solid #d9e7de;
  border-radius: 8px;
  background: #fbfdfb;
}
.supplier-group-files-detail summary,
.entry-inline-details summary {
  min-height: 34px;
  padding: 8px 11px;
  color: #24543e;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.supplier-group-files-detail summary::after,
.entry-inline-details summary::after {
  content: "展开";
  float: right;
  color: #6c8176;
  font-weight: 800;
}
.supplier-group-files-detail[open] summary,
.entry-inline-details[open] summary { border-bottom: 1px solid #e5eee8; }
.supplier-group-files-detail[open] summary::after,
.entry-inline-details[open] summary::after { content: "收起"; }
.entry-workspace .supplier-group-file-grid {
  gap: 10px;
  padding: 11px;
}
.entry-workspace .supplier-group-visible-section {
  overflow: hidden;
  border: 1px solid #d9e7de;
  border-radius: 8px;
  background: #fbfdfb;
}
.entry-workspace .supplier-group-visible-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 8px 11px;
  border-bottom: 1px solid #e5eee8;
  color: #24543e;
}
.entry-workspace .supplier-group-visible-head strong { font-size: 12px; }
.entry-workspace .supplier-group-visible-head span {
  padding: 2px 7px;
  border-radius: 999px;
  color: #9a473c;
  background: #fbefec;
  font-size: 10px;
  font-weight: 900;
}
.entry-workspace [hidden] { display: none !important; }
.entry-workspace .supplier-group-detail-grid,
.entry-workspace .supplier-group-optional-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 11px;
}
.entry-workspace .supplier-group-logistics-detail,
.entry-workspace .supplier-group-receipt-detail { background: #fcfefc; }
.supplier-group-folds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.supplier-group-folds details[open] { grid-column: 1 / -1; }
.supplier-group-folds details:not([open]) summary { white-space: nowrap; }
.entry-workspace .supplier-group-items {
  gap: 0;
  overflow: hidden;
  border: 1px solid #edf2ef;
  border-radius: 8px;
  background: #fff;
}
.entry-workspace .item-card {
  padding: 8px 9px;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.entry-workspace .item-card + .item-card {
  border-top: 1px solid #edf2ef;
}
.entry-workspace .item-card:nth-child(even) {
  background: #fbfdfb;
}
.entry-workspace .item-card.is-active { background: #f6fbf8; box-shadow: inset 3px 0 0 #2c8061; }
.item-row-grid label { gap: 2px; min-width: 0; }
.item-row-grid label > span { display: none; }
.item-row-grid input { width: 100%; min-width: 0; min-height: 34px; padding: 6px 7px; }
.item-row-grid small { overflow: hidden; color: #367055; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.item-card-head { display: grid; place-items: center; min-height: 34px; margin: 0; }
.item-card-head strong { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #2c6e53; background: #e6f1ea; font-size: 11px; }
.item-row-remove { align-self: start; width: 28px; min-height: 34px; padding: 0; font-size: 16px; }
.item-supplement { display: none; margin-top: 8px; padding: 9px 10px; border-top: 1px solid #dfe9e3; background: #fbfdfb; }
.item-card.is-active .item-supplement { display: block; }
.item-supplement-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 7px; }
.item-supplement-head strong { color: #365949; font-size: 11px; }
.item-supplement-head span { color: #839189; font-size: 10px; }
.item-other-fee-layout { display: grid; gap: 7px; }
.item-other-fee-main-grid { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(220px, 1.75fr) 88px; gap: 7px; align-items: end; }
.item-personal-payment-toggle { align-content: start; justify-items: start; }
.item-personal-payment-toggle small { color: #8a6740; font-size: 9px; font-weight: 700; line-height: 1; }
.item-personal-payment-toggle small[hidden] { display: none; }
.personal-payment-switch { position: relative; display: inline-flex; align-items: center; width: 46px; height: 30px; }
.personal-payment-switch input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.personal-payment-switch > span { position: relative; width: 44px; height: 26px; border-radius: 999px; background: #bdc9c2; box-shadow: inset 0 0 0 1px rgba(27,74,54,.08); cursor: pointer; transition: background .18s ease; }
.personal-payment-switch > span::after { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(23,55,42,.25); content: ""; transition: transform .18s ease; }
.personal-payment-switch input:checked + span { background: #176447; }
.personal-payment-switch input:checked + span::after { transform: translateX(18px); }
.item-personal-payment-toggle.is-locked .personal-payment-switch > span { cursor: not-allowed; box-shadow: inset 0 0 0 2px rgba(138,103,64,.24); }
.personal-payment-switch input:focus-visible + span { outline: 3px solid rgba(23,100,71,.18); outline-offset: 2px; }
.item-personal-payment-panel { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(320px, 1.6fr); gap: 7px; align-items: start; padding: 8px; border: 1px dashed #aac8b8; border-radius: 7px; background: #fff; }
.item-personal-payment-panel[hidden] { display: none !important; }
.item-personal-payment-panel > label,
.item-personal-payment-panel > .field-drop-group { align-content: start; }
.item-personal-payment-panel > .field-drop-group { gap: 5px; }
.item-personal-payment-panel > .field-drop-group > p { min-height: 15px; margin: 0; font-size: 12px; font-weight: 700; line-height: 15px; }
.item-supplement-notes-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.item-supplement-notes-grid textarea { min-height: 36px; resize: vertical; }
.entry-workspace .item-personal-payment-panel .item-other-fee-proof .compact-drop-zone { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 36px; height: 36px; padding: 5px 8px; }
.entry-workspace .item-personal-payment-panel .item-other-fee-proof .compact-drop-zone strong,
.entry-workspace .item-personal-payment-panel .item-other-fee-proof .compact-drop-zone span { line-height: 1; white-space: nowrap; }
.entry-workspace .item-personal-payment-panel .attachment-list:empty { display: none; margin: 0; }
.supplier-group-add-item { justify-self: start; }
.entry-workspace .save-bar {
  bottom: 10px;
  padding: 11px 13px;
}
.entry-draft-controls {
  position: relative;
  display: inline-flex;
  min-width: 220px;
  align-items: center;
  gap: 8px;
}
.entry-draft-status { color: #667a70; font-size: 12px; font-weight: 800; white-space: nowrap; }
.entry-draft-status.is-saving { color: #8a641d; }
.entry-draft-status.is-saved { color: #176447; }
.entry-draft-status.is-error { color: #b42318; }
.entry-draft-controls > button { min-height: 30px; padding: 5px 9px; font-size: 11px; }
.entry-draft-delete-popover { position: absolute; left: 0; right: auto; bottom: calc(100% + 9px); top: auto; }
.entry-draft-delete-popover .supplier-group-delete-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  gap: 7px;
}
.entry-draft-delete-popover .supplier-group-delete-actions button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 6px 10px;
}
.entry-draft-delete-popover::before {
  top: auto;
  right: auto;
  bottom: -6px;
  left: 36px;
  border: 0;
  border-right: 1px solid #e3d9d5;
  border-bottom: 1px solid #e3d9d5;
}
@media (max-width: 1260px) {
  .entry-main-layout { grid-template-columns: 1fr; }
  .entry-order-summary { position: static; }
  .entry-order-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
  .entry-summary-status { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
}
@media (max-width: 900px) {
  .entry-workspace .quick-import-content,
  .entry-workspace .order-grid,
  .entry-workspace .supplier-group-grid,
  .entry-workspace .supplier-group-detail-grid,
  .entry-workspace .supplier-group-optional-grid { grid-template-columns: 1fr; }
  .entry-workspace .quick-import-content .requirement-preview,
  .entry-workspace .quick-import-content #pending-purchase-requirement-attachments,
  .entry-workspace .span-2,
  .entry-workspace .span-4 { grid-column: auto; }
  .entry-item-table-head { display: none; }
  .item-row-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .item-row-grid label > span { display: block; color: #667b70; font-size: 10px; }
  .item-card-head { grid-column: 1 / -1; justify-items: start; }
  .item-row-remove { grid-column: 2; justify-self: end; }
  .item-other-fee-main-grid,
  .item-personal-payment-panel,
  .item-supplement-notes-grid { grid-template-columns: 1fr; }
  .supplier-group-folds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entry-order-summary dl,
  .entry-summary-status { grid-template-columns: 1fr; }
}

.search-title { align-items: flex-end; }
.search-user { margin: 0 !important; color: #547467 !important; font-size: 13px !important; font-weight: 700; }
.search-mode-shell {
  display: grid;
  gap: 0;
  margin-bottom: 12px;
  border: 1px solid #dce4df;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(34, 59, 48, .035);
  overflow: hidden;
}
.search-mode-tabs {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 6px 7px 0;
  border-bottom: 1px solid #e3ebe6;
  background: #f7faf8;
}
.search-mode-tabs button {
  min-height: 34px;
  padding: 7px 18px;
  border: 0;
  border-radius: 8px 8px 0 0;
  color: #63766d;
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.search-mode-tabs button.active {
  color: #14583e;
  background: #fff;
  box-shadow: inset 0 2px 0 #1d7754;
}
.search-mode-panel {
  display: grid;
  gap: 8px;
  padding: 10px 12px 12px;
}
.search-mode-panel[hidden] {
  display: none;
}
.search-mode-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
}
.search-mode-heading strong {
  color: #20382d;
  font-size: 13px;
  font-weight: 900;
}
.search-mode-heading span {
  color: #6f8077;
  font-size: 11.5px;
  line-height: 1.5;
}
.search-form-panel { display: grid; gap: 8px; }
.search-box { display: grid; grid-template-columns: 1fr 96px; gap: 8px; padding: 8px; border: 1px solid #dce4df; border-radius: 8px; background: #fbfdfb; }
.search-box input { min-height: 38px; border-color: transparent; background: #f3f6f4; }
.search-box button { min-height: 38px; padding: 7px 10px; box-shadow: none; }
.batch-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(2, minmax(145px, .75fr)) repeat(2, minmax(130px, .7fr)) 108px;
  gap: 8px;
  align-items: end;
}
.batch-search-form label {
  color: #20382d;
  font-size: 12px;
  font-weight: 800;
}
.batch-search-form input {
  min-height: 36px;
  padding: 6px 9px;
  font-size: 13px;
}
.batch-search-form button {
  min-height: 36px;
  padding: 7px 10px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #166447;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.batch-search-form button:hover { background: #105639; }
.search-filter-panel {
  padding: 9px 11px; border: 1px solid #dce4df; border-radius: 8px; background: #fff;
}
.search-filter-panel summary {
  cursor: pointer; color: #24543e; font-size: 12px; font-weight: 900;
}
.search-filter-grid {
  display: grid; grid-template-columns: repeat(3, minmax(180px, 1fr)); gap: 9px; margin-top: 10px;
}
.search-filter-grid label { font-size: 12px; }
.search-filter-grid input, .search-filter-grid select { min-height: 34px; padding: 6px 8px; font-size: 13px; }
.search-filter-panel .ghost-button { margin-top: 10px; }
.search-message { min-height: 20px; margin: 11px 0; color: #667a70; font-size: 13px; }
.search-results { display: grid; gap: 12px; }
.compact-search-panel {
  border: 1px solid #dce4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(34, 59, 48, .045);
  overflow: hidden;
}
.compact-search-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid #e6ede9;
  background: #fbfdfb;
}
.compact-search-heading h2 { margin: 0; color: #20382d; font-size: 16px; }
.compact-search-heading p { margin: 3px 0 0; color: #6f8077; font-size: 12px; }
.compact-search-heading > span {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: #1f6549;
  background: #e8f4ed;
  font-size: 12px;
  font-weight: 900;
}
.compact-search-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
.compact-search-table {
  width: 100%;
  min-width: 1200px;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 11.5px;
}
.compact-search-table th,
.compact-search-table td {
  height: 31px;
  padding: 5px 8px;
  border-bottom: 1px solid #edf2ef;
  color: #2f4439;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-search-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #44584d;
  background: #f6f8f7;
  font-size: 11.5px;
  font-weight: 900;
}
.compact-search-table tr:hover td { background: #f8fbf9; }
.compact-search-table th:nth-child(1), .compact-search-table td:nth-child(1) { width: 155px; }
.compact-search-table th:nth-child(2), .compact-search-table td:nth-child(2) { width: 145px; }
.compact-search-table th:nth-child(3), .compact-search-table td:nth-child(3) { width: 120px; }
.compact-search-table th:nth-child(4), .compact-search-table td:nth-child(4) { width: 195px; }
.compact-search-table th:nth-child(5), .compact-search-table td:nth-child(5) { width: 95px; }
.compact-search-table th:nth-child(6), .compact-search-table td:nth-child(6),
.compact-search-table th:nth-child(7), .compact-search-table td:nth-child(7) { width: 82px; }
.compact-search-table th:nth-child(8), .compact-search-table td:nth-child(8) { width: 130px; }
.compact-search-table th:nth-child(9), .compact-search-table td:nth-child(9) { width: 84px; }
.compact-search-table th:nth-child(10), .compact-search-table td:nth-child(10) { width: 62px; text-align: center; }
.batch-search-table th:nth-child(1), .batch-search-table td:nth-child(1) { width: 100px; }
.batch-search-table th:nth-child(2), .batch-search-table td:nth-child(2) { width: 240px; }
.batch-search-table th:nth-child(3), .batch-search-table td:nth-child(3) { width: 95px; }
.batch-search-table th:nth-child(4), .batch-search-table td:nth-child(4) { width: 105px; }
.batch-search-table th:nth-child(5), .batch-search-table td:nth-child(5) { width: 95px; }
.batch-search-table th:nth-child(6), .batch-search-table td:nth-child(6) { width: 70px; }
.batch-search-table th:nth-child(7), .batch-search-table td:nth-child(7),
.batch-search-table th:nth-child(8), .batch-search-table td:nth-child(8) { width: 95px; }
.batch-search-table th:nth-child(9), .batch-search-table td:nth-child(9) { width: 76px; text-align: center; }
.compact-project-name { color: #5a6e64 !important; font-weight: 800; }
.compact-material-name { color: #173f2e !important; font-weight: 900; }
.compact-price-strong { color: #14583e !important; font-weight: 900; }
.compact-source {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.45;
}
.compact-source-order { color: #165d42; background: #e7f4eb; }
.compact-source-quote { color: #1d5f78; background: #e7f3f6; }
.compact-source-supplier { color: #7a5214; background: #fff1cf; }
.compact-search-table button {
  min-height: 25px;
  padding: 3px 7px;
  border: 1px solid #bfd4c7;
  border-radius: 6px;
  color: #176447;
  background: #edf7f1;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.compact-search-table button:hover { background: #dff0e6; }
.result-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid #e6ede9;
  color: #667a70;
  background: #fbfdfb;
  font-size: 12px;
}
.result-pagination label,
.result-pagination > div {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.result-pagination select {
  min-height: 30px;
  padding: 4px 24px 4px 8px;
  border: 1px solid #cfdcd4;
  border-radius: 6px;
  color: #264739;
  background: #fff;
  font-size: 12px;
}
.result-pagination button {
  min-height: 30px;
  padding: 4px 10px;
  border: 1px solid #bfd4c7;
  border-radius: 6px;
  color: #176447;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.result-pagination button:hover:not(:disabled) { background: #eef7f1; }
.result-pagination button:disabled { cursor: not-allowed; opacity: .45; }
.copyable-detail-line dd {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.copyable-detail-value {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  max-height: 3.4em;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
}
.copyable-detail-line button {
  flex: 0 0 auto;
  min-height: 26px;
  padding: 3px 8px;
  border: 1px solid #bfd4c7;
  border-radius: 6px;
  color: #176447;
  background: #edf7f1;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.copyable-detail-line button:hover { background: #dff0e6; }
.result-card { padding: 18px; border: 1px solid #dce4df; border-radius: 8px; background: #fff; }
.compact-result-card { padding: 14px 15px; }
.result-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.result-card-head div { display: grid; gap: 5px; }
.result-card-head strong { color: #244538; font-size: 16px; }
.result-card-head span, .result-card p { color: #6c7e75; font-size: 13px; }
.result-card p { margin: 12px 0 7px; }
.result-card ul { display: grid; gap: 5px; margin: 0; padding-left: 18px; color: #3e574b; font-size: 13px; line-height: 1.55; }
.result-card button { min-height: 31px; padding: 6px 9px; color: #236247; background: #e8f3eb; }
.compact-summary-line {
  max-width: 100%;
  overflow: hidden;
  color: #566a60;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-result-detail {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: #42584c;
  font-size: 12px;
}
.compact-result-detail summary {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d3e1d8;
  border-radius: 999px;
  color: #176447;
  background: #f2f8f4;
  font-weight: 900;
  cursor: pointer;
}
.compact-result-detail[open] summary { margin-bottom: 8px; }
.compact-result-detail ul { margin-top: 5px; }
.compact-result-detail p { margin: 0; color: #63766d; line-height: 1.65; white-space: normal; }
.missing-field-chip {
  display: inline-flex; align-items: center; max-width: 100%; padding: 2px 7px; border: 1px solid #edc77a;
  border-radius: 999px; color: #9a5c08; background: #fff5d9; font-size: 12px; font-weight: 900; line-height: 1.45;
  vertical-align: baseline;
}
.result-card .missing-field-chip { margin: 0 2px; }
.history-results { margin-top: 25px; padding: 21px; border: 1px solid #c8d8cf; border-radius: 10px; background: #f8fbf9; }
.history-results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 14px; }
.history-results-heading h2 { margin: 0; color: #294336; font-size: 19px; }
.history-results-heading p:last-child { max-width: 420px; margin: 0; color: #6e8076; font-size: 12px; line-height: 1.6; }
.history-result-list { display: grid; gap: 9px; }
.history-result-card { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 9px 20px; padding: 14px 15px; border: 1px solid #dce5df; border-radius: 8px; background: #fff; }
.history-result-card > div:first-child { display: grid; gap: 5px; }
.history-result-card strong { color: #294a3c; font-size: 15px; }
.history-result-card span, .history-result-card p { color: #64776d; font-size: 12px; }
.history-result-card p { grid-column: 1 / -1; margin: 0; color: #8a5c28; }
.history-result-meta { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.history-open-button { min-height: 31px; padding: 7px 10px; border-radius: 6px; color: #176447; background: #e7f2ea; font-size: 12px; font-weight: 800; text-decoration: none; }
.history-open-button:hover { background: #dcefe2; }
.supplier-quote-results { margin-top: 25px; padding: 21px; border: 1px solid #c8d8cf; border-radius: 10px; background: #fbfaf3; }
.supplier-quote-group { display: grid; gap: 10px; padding: 14px; border: 1px solid #e2dcc5; border-radius: 10px; background: #fffdf8; }
.supplier-quote-group + .supplier-quote-group { margin-top: 12px; }
.supplier-quote-group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid #efe8d2; }
.supplier-quote-group-head strong { display: block; color: #253f33; font-size: 16px; }
.supplier-quote-group-head span { color: #69776f; font-size: 12px; font-weight: 800; }
.supplier-quote-list { display: grid; gap: 9px; }
.supplier-quote-card {
  position: relative; display: grid; grid-template-columns: 50px minmax(170px, 1.15fr) minmax(160px, 1fr) minmax(135px, .75fr) minmax(150px, .8fr) auto;
  gap: 10px 16px; padding: 15px; border: 1px solid #e3dcc4; border-radius: 8px; background: #fff;
}
.supplier-quote-card-ready { border-color: #b9d7c6; box-shadow: inset 3px 0 0 #267256; }
.supplier-quote-card-pending { border-color: #ead8b6; background: #fffdf7; box-shadow: inset 3px 0 0 #d5902f; }
.supplier-quote-card-best { border-color: #8fc3a7; background: #fafffb; }
.supplier-quote-card strong, .supplier-quote-card b { display: block; color: #314638; font-size: 14px; }
.supplier-quote-card span { color: #68776f; font-size: 12px; line-height: 1.55; }
.supplier-quote-card p { grid-column: 1 / -1; margin: 0; color: #6e6250; font-size: 12px; line-height: 1.65; }
.supplier-quote-card a, .attachment-link-cell a { color: #176447; font-weight: 800; text-decoration: none; }
.supplier-quote-card a:hover, .attachment-link-cell a:hover { text-decoration: underline; }
.quote-rank {
  display: grid; place-items: center; align-content: center; gap: 3px; min-height: 48px; border-radius: 8px; background: #eef6f1;
}
.quote-rank strong { color: #176447; font-size: 18px; line-height: 1; }
.quote-rank span { color: #5d7268; font-size: 11px; font-weight: 900; }
.quote-price-strong { color: #14583e !important; font-size: 16px !important; }
.quote-wide { grid-column: 2 / -1 !important; }
.quote-best-badge {
  position: absolute; top: -9px; right: 14px; padding: 3px 8px; border: 1px solid #94c6a8; border-radius: 999px;
  color: #126042; background: #e8f6ed; font-size: 11px; font-weight: 900; line-height: 1.4;
}
.supplier-library-results {
  margin-top: 25px;
  padding: 21px;
  border: 1px solid #c8d8cf;
  border-radius: 10px;
  background: #f7fbf8;
}
.supplier-library-candidate-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.supplier-library-candidate-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #d7e4dd;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 3px 0 0 #5a9c75;
}
.supplier-library-candidate-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.supplier-library-candidate-head strong {
  display: block;
  color: #203e31;
  font-size: 16px;
}
.supplier-library-candidate-head span {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 7px;
  border-radius: 999px;
  color: #22664a;
  background: #e6f3ea;
  font-size: 11px;
  font-weight: 900;
}
.supplier-library-candidate-head a {
  flex: 0 0 auto;
  color: #176447;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}
.supplier-library-candidate-head a:hover { text-decoration: underline; }
.supplier-library-candidate-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 0;
}
.supplier-library-candidate-card dt {
  color: #75877f;
  font-size: 11px;
  font-weight: 900;
}
.supplier-library-candidate-card dd {
  margin: 4px 0 0;
  color: #344c40;
  font-size: 13px;
  line-height: 1.45;
}
.supplier-library-candidate-card p {
  margin: 0;
  color: #6a7b72;
  font-size: 12px;
  line-height: 1.6;
}
.supplier-library-price-note {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  color: #8a5b16;
  background: #fff2d5;
  font-size: 11px;
  font-weight: 900;
}
.reminder-meta { gap: 15px; }
.reminder-list { display: grid; gap: 9px; }
.reminder-group {
  overflow: hidden;
  border: 1px solid #d8e3dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(34, 59, 48, .035);
}
.reminder-group-due { border-color: #e5b9af; }
.reminder-group-summary {
  display: grid;
  grid-template-columns: 116px minmax(210px, 1.35fr) minmax(180px, 1fr) minmax(190px, 1fr) 146px 68px;
  align-items: center;
  gap: 12px;
  min-height: 70px;
  padding: 10px 12px;
}
.reminder-group-due .reminder-group-summary { background: #fffafa; }
.reminder-group-state,
.reminder-group-subject,
.reminder-group-material,
.reminder-group-deadline { min-width: 0; }
.reminder-group-state { display: grid; gap: 3px; }
.reminder-group-state strong { color: #226345; font-size: 13px; }
.reminder-group-due .reminder-group-state strong { color: #b44235; }
.reminder-group-state span,
.reminder-group-subject span,
.reminder-group-material > span,
.reminder-group-deadline span { color: #78877f; font-size: 11px; line-height: 1.35; }
.reminder-group-subject,
.reminder-group-material,
.reminder-group-deadline { display: grid; gap: 4px; }
.reminder-group-subject strong,
.reminder-group-material strong,
.reminder-group-deadline strong {
  overflow: hidden;
  color: #263d32;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminder-group-material strong,
.reminder-group-deadline strong { font-size: 12px; font-weight: 800; }
.reminder-group-types { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; }
.reminder-group-types span {
  flex: 0 1 auto;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  color: #446455;
  background: #eef5f0;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminder-group-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #bfd2c6;
  border-radius: 7px;
  color: #1d6247;
  background: #f4f8f5;
  font-size: 12px;
  font-weight: 900;
}
.reminder-group-toggle:hover { background: #e7f2ea; }
.reminder-group-items { border-top: 1px solid #e3ebe6; background: #f7faf8; }
.reminder-group-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e4ebe7;
}
.reminder-group-item:last-child { border-bottom: 0; }
.reminder-group-item.reminder-due { box-shadow: inset 3px 0 #d96a5a; }
.reminder-group-item-body { min-width: 0; }
.reminder-item-heading { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reminder-item-heading strong { color: #263d32; font-size: 13px; white-space: nowrap; }
.reminder-item-heading > span:last-child {
  overflow: hidden;
  color: #708078;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.reminder-group-item p { margin: 7px 0 10px; color: #63746c; font-size: 12px; line-height: 1.55; }
.reminder-detail-grid-compact { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px 12px; }
.reminder-actions-inline {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  width: min(320px, 28vw);
}
.reminder-actions-inline button,
.reminder-actions-inline a { min-height: 31px; padding: 6px 9px; white-space: nowrap; }
.reminder-group-item .quote-link-review-panel { grid-column: 1 / -1; }
.reminder-card {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 16px; padding: 18px;
  border: 1px solid #dce4df; border-radius: 10px; background: #fff; box-shadow: 0 5px 18px rgba(34, 59, 48, .04);
}
.reminder-card.reminder-due { border-color: #e3b4aa; background: #fffafa; }
.reminder-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.reminder-type { color: #6b7d73; font-size: 12px; font-weight: 800; }
.reminder-card h2 { margin: 0; color: #263d32; font-size: 17px; }
.reminder-card p { margin: 8px 0 13px; color: #66776f; font-size: 13px; line-height: 1.65; }
.reminder-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.reminder-detail-grid dt { color: #7f8c86; font-size: 11px; }
.reminder-detail-grid dd { margin: 4px 0 0; color: #334a3f; font-size: 12px; line-height: 1.45; }
.reminder-actions { display: grid; align-content: start; gap: 8px; }
.reminder-actions button, .reminder-actions a {
  min-height: 34px; padding: 7px 10px; border: 1px solid #b7d0bf; border-radius: 6px;
  color: #1d6247; background: #edf6f0; font-size: 12px; font-weight: 800; text-align: center; text-decoration: none;
}
.reminder-actions button:hover, .reminder-actions a:hover { background: #dcefe2; }
.empty-state { margin: 0; padding: 40px 20px; border: 1px dashed #c4d2ca; border-radius: 8px; color: #78877f; text-align: center; }
.order-detail { margin-top: 28px; padding: 24px; border: 1px solid #cddbd2; border-radius: 10px; background: #fff; box-shadow: 0 12px 30px rgba(34, 59, 48, .08); }
.detail-panel-open { overflow: hidden; }
.detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(18, 32, 25, .32);
}
.search-workspace .order-detail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  width: min(1380px, calc(100vw - 28px));
  margin: 0;
  padding: 0;
  border-width: 0 0 0 1px;
  border-radius: 16px 0 0 16px;
  overflow: auto;
  box-shadow: -18px 0 55px rgba(23, 45, 34, .22);
}
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 19px; }
.detail-heading h2 { margin: 0; color: #213d31; font-size: 22px; }
.detail-heading button { min-height: 31px; padding: 6px 10px; color: #496a5b; background: #edf2ef; }
.search-workspace .detail-heading {
  position: sticky;
  top: 0;
  z-index: 12;
  align-items: center;
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid #e3ebe6;
  background: rgba(255, 255, 255, .97);
}
.search-workspace .detail-heading h2 { font-size: 18px; }
.search-workspace .detail-heading button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #c8d8cf;
  border-radius: 7px;
  color: #305245;
  background: #f5f8f6;
  cursor: pointer;
}
.detail-heading-actions { display: flex; align-items: center; gap: 8px; }
.danger-button, .detail-heading .danger-button {
  color: #8a2f25;
  border: 1px solid #e0b5ae;
  background: #fff0ee;
}
.danger-button:hover, .detail-heading .danger-button:hover { background: #ffe2dd; }
.detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 0 0 22px; }
.detail-grid div { padding-bottom: 7px; border-bottom: 1px solid #edf0ee; }
.detail-grid .detail-wide { grid-column: span 3; }
.detail-grid dt { color: #819087; font-size: 11px; }
.detail-grid dd { margin: 5px 0 0; color: #334a3f; font-size: 13px; line-height: 1.5; }
.detail-section {
  margin: 0;
  padding: 15px 18px;
  border-bottom: 1px solid #edf2ef;
}
.detail-section h3 {
  margin: 0 0 10px;
  color: #20382d;
  font-size: 14px;
}
.search-workspace .detail-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 12px;
  margin-bottom: 0;
}
.search-workspace .detail-grid div { min-width: 0; padding-bottom: 6px; }
.search-workspace .detail-grid dd {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.detail-grid div.needs-completion {
  padding: 8px 10px; border: 1px solid #efd39a; border-radius: 8px; background: #fffaf0;
}
.detail-table-wrap {
  position: relative;
  z-index: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-gutter: stable;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px; border-bottom: 1px solid #e6ece8; text-align: left; white-space: nowrap; }
th { color: #6a7d72; background: #f5f8f6; font-size: 12px; }
td { color: #3c5147; }
.search-workspace .detail-table-wrap table {
  min-width: 980px;
  font-size: 12px;
}
.search-workspace .followup-item-table table { min-width: 1980px; }
.search-workspace .followup-custom-choice {
  min-width: 190px;
  vertical-align: top;
}
.search-workspace .followup-custom-choice select,
.search-workspace .followup-custom-choice input:not([hidden]) {
  display: block;
  width: 100%;
}
.search-workspace .followup-custom-choice select + input:not([hidden]) {
  margin-top: 6px;
}
.search-workspace .detail-table-wrap th,
.search-workspace .detail-table-wrap td { padding: 7px 8px; }
.search-workspace .detail-table-wrap th:first-child,
.search-workspace .detail-table-wrap td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 150px;
  max-width: 220px;
  background: #fff;
  box-shadow: 8px 0 13px -12px rgba(24, 47, 35, .55);
  white-space: normal;
}
.search-workspace .detail-table-wrap th:first-child {
  z-index: 2;
  background: #eef6f1;
}
  .search-workspace .detail-table-wrap td:first-child {
    color: #203a2f;
    font-weight: 850;
  }
  .detail-effective-value { display: grid; gap: 2px; }
  .detail-effective-value small { color: #839088; font-size: 10px; font-weight: 600; white-space: nowrap; }
tr.needs-completion-row td { background: #fffdf4; }
tr.needs-completion-row td:first-child { background: #fffdf4; }
td.needs-completion { background: #fff7df !important; }
.detail-scope-note {
  margin: -2px 0 10px;
  padding: 8px 10px;
  border: 1px solid #d9e8de;
  border-radius: 8px;
  color: #305e49;
  background: #f3faf5;
  font-size: 12px;
  line-height: 1.55;
}
.detail-attachments { margin-top: 21px; padding-top: 16px; border-top: 1px solid #e4ebe6; color: #385b4b; font-size: 13px; }
.search-workspace .detail-attachments { margin-top: 0; padding-top: 15px; }
.detail-attachments ul { display: grid; gap: 7px; margin: 10px 0 0; padding-left: 0; list-style: none; }
.detail-attachments li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.detail-attachments .detail-attachment-category {
  display: inline-flex; flex: 0 0 auto; margin-left: 0; padding: 1px 6px; border-radius: 999px; color: #65776d; background: #edf3ef;
  font-size: 11px; font-weight: 800;
}
.detail-attachment-file {
  position: relative;
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  width: fit-content;
  max-width: calc(100% - 110px);
  min-width: 0;
  padding-right: 19px;
}
.detail-attachment-file > a { display: block; max-width: min(680px, 58vw); }
.detail-attachment-delete-toggle {
  position: absolute;
  top: -8px;
  right: 0;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #9b453b;
  background: #f8e6e3;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity .12s ease, color .12s ease, background .12s ease;
}
.detail-attachment-file:hover .detail-attachment-delete-toggle,
.detail-attachment-file:focus-within .detail-attachment-delete-toggle {
  opacity: 1;
  pointer-events: auto;
}
.detail-attachment-delete-toggle:hover,
.detail-attachment-delete-toggle[aria-expanded="true"] { color: #fff; background: #b24e43; }
.attachment-delete-popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 35;
  width: min(276px, calc(100vw - 36px));
}
.attachment-delete-popover::before { right: 5px; }
.attachment-delete-description {
  display: block;
  margin: 8px 0 12px 28px;
  color: #756761;
  font-size: 12px;
  line-height: 1.55;
}
.attachment-delete-message {
  display: block;
  margin-top: 8px;
  color: #a14137;
  font-size: 12px;
  line-height: 1.45;
}
.detail-attachments a {
  min-width: 0;
  overflow: hidden;
  color: #176447;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-attachment-upload {
  display: grid; grid-template-columns: minmax(150px, 190px) minmax(220px, 1fr) auto minmax(160px, .8fr);
  align-items: end; gap: 10px; margin-top: 14px; padding: 12px; border: 1px solid #d9e5de; border-radius: 8px; background: #fbfdfb;
}
.search-workspace .detail-attachment-upload {
  grid-template-columns: minmax(130px, 160px) minmax(220px, 1fr) auto;
}
.search-workspace .detail-attachment-upload [data-attachment-upload-message] { grid-column: 1 / -1; }
.detail-attachment-upload button {
  min-height: 42px; padding: 8px 13px; border: 0; border-radius: 7px; color: #fff; background: #166447; font-weight: 800;
}
.detail-attachment-upload .file-picker-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #b7d0bf;
  color: #1d6247;
  background: #edf6f0;
  box-shadow: none;
}
.detail-attachment-upload span { color: #557267; font-size: 12px; line-height: 1.5; }
.detail-followup-editor {
  margin-top: 0; padding: 14px; border: 1px solid #d8e5dc; border-radius: 9px; background: #fbfdfb;
}
.followup-highlight {
  position: relative;
  border-color: #e2a536 !important;
  background: #fff8dc !important;
  box-shadow: 0 0 0 2px rgba(226, 165, 54, .18);
}
label.followup-highlight {
  padding: 9px;
  border: 1px solid #e2a536;
  border-radius: 8px;
}
tr.followup-highlight td {
  background: #fff8dc;
}
.followup-item-table { margin-top: 15px; }
.followup-item-table input, .followup-item-table select { min-width: 150px; min-height: 36px; padding: 6px 8px; }
.detail-editor-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.detail-editor-actions span { color: #557267; font-size: 13px; }
.detail-editor-actions button {
  min-height: 38px; padding: 8px 13px; border: 0; border-radius: 6px; color: #fff; background: #166447; font-weight: 800;
}
.detail-editor-actions button:hover { background: #105639; }
.detail-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 15px 18px 18px;
  padding: 13px 14px;
  border: 1px solid #ead2cc;
  border-radius: 10px;
  background: #fff8f6;
}
.detail-danger-zone strong { display: block; color: #6f2b23; font-size: 13px; }
.detail-danger-zone span { display: block; margin-top: 3px; color: #8c6a64; font-size: 12px; }
.detail-danger-zone button { flex: 0 0 auto; min-height: 32px; padding: 6px 10px; border-radius: 7px; cursor: pointer; }

.deleted-list { display: grid; gap: 14px; }
.deleted-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  padding: 18px;
  border: 1px solid #ead6d1;
  border-radius: 10px;
  background: #fffafa;
  box-shadow: 0 10px 24px rgba(72, 44, 36, .06);
}
.deleted-card-head { display: grid; gap: 5px; margin-bottom: 8px; }
.deleted-card-head strong { color: #3d2e2a; font-size: 16px; }
.deleted-card-head span, .deleted-card p { color: #786760; font-size: 13px; line-height: 1.55; }
.deleted-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0 0; }
.deleted-meta dt { color: #927d75; font-size: 11px; }
.deleted-meta dd { margin: 4px 0 0; color: #4d3c37; font-size: 12px; }
.deleted-actions { display: grid; align-content: center; }
.deleted-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: #166447;
  font-weight: 800;
}
.deleted-actions button:hover { background: #105639; }

.stats-workspace { max-width: 1500px; }
.stats-filter {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 180px auto auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fff;
}
.stats-filter label {
  display: grid;
  gap: 6px;
  color: #5f7468;
  font-size: 12px;
  font-weight: 800;
}
.stats-filter input, .stats-filter select {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cfdcd4;
  border-radius: 7px;
  color: #264539;
  background: #fff;
}
.stats-filter button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  color: #fff;
  background: #166447;
  font-weight: 800;
}
.stats-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 11px;
  margin-bottom: 16px;
}
.stats-summary article {
  display: grid;
  gap: 8px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid #dce4df;
  border-radius: 9px;
  background: #fff;
}
.stats-summary span { color: #708177; font-size: 12px; }
.stats-summary strong { color: #1f5d45; font-size: 23px; letter-spacing: -.04em; }
.stats-summary .profit-negative strong { color: #9a453a; }
.stats-projects { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin-bottom: 16px; }
.project-stat-card {
  display: grid;
  gap: 13px;
  padding: 17px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(34, 59, 48, .05);
}
.project-stat-card strong { display: block; margin-bottom: 4px; color: #263d32; font-size: 16px; }
.project-stat-card span { color: #738278; font-size: 12px; }
.project-stat-card dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0; }
.project-stat-card dt { color: #819087; font-size: 11px; }
.project-stat-card dd { margin: 4px 0 0; color: #334a3f; font-size: 13px; font-weight: 800; }
.stats-detail-panel {
  padding: 20px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fff;
}

.stats-v2-workspace { max-width: 1500px; }
.stats-v2-title { margin-bottom: 20px; }
.stats-v2-filter {
  display: grid;
  grid-template-columns: minmax(260px, 1.5fr) 170px 170px auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dce5e0;
  border-radius: 10px;
  background: #fff;
}
.stats-v2-filter label { gap: 5px; color: #60746a; font-size: 11px; }
.stats-v2-filter input { min-height: 36px; padding: 7px 9px; }
.stats-v2-filter button { min-height: 36px; padding: 7px 12px; white-space: nowrap; }
.stats-v2-periods { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 14px; }
.stats-v2-periods button,
.stats-v2-customer-tabs button {
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid #d3dfd8;
  border-radius: 999px;
  color: #5b7066;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}
.stats-v2-periods button.active,
.stats-v2-customer-tabs button.active { color: #fff; border-color: #176447; background: #176447; }
.stats-v2-summary { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
#stats-detail-summary { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
#stats-detail-summary .stats-v2-metric { min-height: 88px; padding: 12px 10px; }
#stats-detail-summary .stats-v2-metric > strong { font-size: clamp(17px, 1.35vw, 21px); white-space: nowrap; }
.stats-v2-metric {
  min-height: 94px;
  padding: 14px;
  border: 1px solid #dce5e0;
  border-radius: 9px;
  background: #fff;
}
.stats-v2-metric > span { color: #718078; font-size: 11px; }
.stats-v2-metric > strong { display: block; margin-top: 9px; color: #1f5d45; font-size: 22px; letter-spacing: -.04em; }
.stats-v2-metric > small { display: block; margin-top: 5px; color: #8a9890; font-size: 10px; line-height: 1.4; }
.stats-v2-metric.negative > strong { color: #a6473b; }
.stats-v2-section-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 20px 0 10px; }
.stats-v2-section-head.compact { margin: 0 0 10px; }
.stats-v2-section-head h2 { margin: 0; color: #263c32; font-size: 17px; }
.stats-v2-section-head p { margin: 4px 0 0; color: #7a8981; font-size: 11px; }
.stats-v2-count,
.stats-v2-scope {
  padding: 6px 10px;
  border: 1px solid #d7e2dc;
  border-radius: 999px;
  color: #60776c;
  background: #fff;
  font-size: 11px;
  white-space: nowrap;
}
.stats-v2-projects { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; }
.stats-v2-project-card {
  min-width: 0;
  padding: 15px;
  border: 1px solid #dce5e0;
  border-radius: 9px;
  color: inherit;
  background: #fff;
  text-align: left;
  box-shadow: 0 7px 18px rgba(34,59,48,.035);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.stats-v2-project-card:hover { transform: translateY(-2px); border-color: #8eb7a2; box-shadow: 0 12px 25px rgba(34,59,48,.09); }
.stats-v2-project-card h3 { overflow: hidden; margin: 0; color: #263d32; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.stats-v2-project-card > p { margin: 5px 0 13px; color: #7c8b83; font-size: 11px; }
.stats-v2-project-card dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.stats-v2-project-card dt { color: #839089; font-size: 10px; }
.stats-v2-project-card dd { margin: 4px 0 0; color: #365247; font-size: 12px; font-weight: 800; }
.stats-v2-progress { height: 5px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #e4ebe7; }
.stats-v2-progress i { display: block; height: 100%; background: #176447; }
.stats-v2-project-footer { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: #718078; font-size: 10px; }
.stats-v2-project-footer strong { color: #176447; }
.stats-v2-detail-title { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.stats-v2-detail-title h1 { margin: 0; color: #1d3028; font-size: 27px; letter-spacing: -.035em; }
.stats-v2-detail-title p { margin: 5px 0 0; color: #6e8077; font-size: 12px; }
.stats-v2-scope { margin-left: auto; }
.stats-v2-back { width: 35px; height: 35px; border: 1px solid #cbd9d1; border-radius: 7px; color: #176447; background: #fff; font-size: 18px; }
.stats-v2-detail-layout { display: grid; grid-template-columns: minmax(330px, .78fr) minmax(0, 1.8fr); gap: 12px; margin-bottom: 12px; }
.stats-v2-panel { padding: 17px; border: 1px solid #dce5e0; border-radius: 10px; background: #fff; }
.stats-v2-payment-panel { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 18px; align-items: center; }
.stats-v2-donut { position: relative; width: 130px; height: 130px; }
.stats-v2-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.stats-v2-donut circle {
  fill: none;
  stroke-width: 13;
  cursor: pointer;
  transition: stroke-dasharray .28s ease, opacity .2s ease;
}
.stats-v2-donut-unpaid { stroke: #e5a447; }
.stats-v2-donut-paid { stroke: #27805d; stroke-dasharray: 0 100; }
.stats-v2-donut-center {
  position: absolute;
  inset: 28px;
  display: grid;
  place-content: center;
  border-radius: 50%;
  text-align: center;
  background: #fff;
  pointer-events: none;
}
.stats-v2-donut-center strong { color: #21543f; font-size: 20px; letter-spacing: -.04em; }
.stats-v2-donut-center span { margin-top: 3px; color: #7b8a82; font-size: 9px; }
.stats-v2-payment-filters { display: grid; gap: 6px; }
.stats-v2-payment-filters button {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #586a61;
  background: #f7f9f8;
  text-align: left;
  font-size: 10px;
}
.stats-v2-payment-filters button:hover,
.stats-v2-payment-filters button.active { border-color: #b9d4c6; background: #eef6f1; }
.stats-v2-payment-filters button i { width: 7px; height: 7px; border-radius: 50%; background: #99a69f; }
.stats-v2-payment-filters button[data-payment-status="paid"] i { background: #27805d; }
.stats-v2-payment-filters button[data-payment-status="unpaid"] i { background: #e5a447; }
.stats-v2-payment-filters button[data-payment-status="unstarted"] i { background: #9aa5a0; }
.stats-v2-payment-filters button[data-payment-status="processing"] i { background: #4d86bf; }
.stats-v2-payment-filters button[data-payment-status="partial"] i { background: #d98932; }
.stats-v2-order-number strong,
.stats-v2-order-number small,
.stats-v2-settlement-cell small { display: block; white-space: nowrap; }
.stats-v2-order-number small,
.stats-v2-settlement-cell small { margin-top: 3px; color: #78877f; font-size: 10px; }
.stats-v2-unallocated {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  color: #8b6425;
  background: #fff4df;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.stats-v2-payment-filters button strong { color: #294b3d; font-size: 11px; font-variant-numeric: tabular-nums; }
.stats-v2-customer-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.stats-v2-table-tools { display: flex; align-items: flex-end; justify-content: space-between; gap: 15px; margin-bottom: 9px; }
.stats-v2-table-tools h2 { margin: 0; color: #263c32; font-size: 16px; }
.stats-v2-table-tools p { margin: 5px 0 0; color: #7e8d85; font-size: 10px; }
.stats-v2-table-tools input { width: 280px; min-height: 34px; }
.stats-v2-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.stats-v2-table th { padding: 8px 9px; border-bottom: 1px solid #dfe7e2; color: #687a71; background: #f6f8f7; text-align: left; white-space: nowrap; }
.stats-v2-table td { padding: 9px; border-bottom: 1px solid #edf1ef; color: #344a40; vertical-align: middle; }
.stats-v2-table tbody tr:last-child td { border-bottom: 0; }
.stats-v2-table .money { font-variant-numeric: tabular-nums; font-weight: 800; white-space: nowrap; }
.stats-v2-table .negative-money { color: #a6473b; }
.stats-v2-table .received-money { color: #237554; }
.stats-v2-table .outstanding-money { color: #a56b20; }
.stats-v2-table a { color: #176447; font-weight: 800; text-decoration: none; white-space: nowrap; }
.stats-payment-account-panel { margin-bottom: 14px; }
.stats-payment-account-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.stats-payment-account-summary article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px;
  border-radius: 7px;
  background: #f3f7f4;
}
.stats-payment-account-summary span { color: #718078; font-size: 10px; }
.stats-payment-account-summary strong { color: #24513e; font-size: 13px; white-space: nowrap; }
.stats-payment-account-summary article.warning { background: #fff6e6; }
.stats-payment-account-summary article.warning strong { color: #a06a20; }
.stats-payment-account-list { display: grid; gap: 7px; }
.stats-payment-account-row {
  overflow: hidden;
  border: 1px solid #dbe5df;
  border-radius: 8px;
  background: #fff;
}
.stats-payment-account-row > summary {
  position: relative;
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(130px, .65fr) minmax(90px, .42fr) minmax(190px, .8fr);
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 9px 36px 9px 13px;
  cursor: pointer;
  list-style: none;
  background: #fbfcfb;
}
.stats-payment-account-row > summary::-webkit-details-marker { display: none; }
.stats-payment-account-row > summary::after {
  position: absolute;
  right: 14px;
  content: "⌄";
  color: #47705e;
  font-size: 17px;
  transition: transform .18s ease;
}
.stats-payment-account-row[open] > summary { border-bottom: 1px solid #e2e9e5; background: #f2f7f4; }
.stats-payment-account-row[open] > summary::after { transform: rotate(180deg); }
.stats-payment-account-row > summary > span { min-width: 0; }
.stats-payment-account-row > summary small { display: block; color: #7b8a82; font-size: 9px; }
.stats-payment-account-row > summary strong { display: block; margin-top: 3px; overflow: hidden; color: #284a3b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stats-payment-account-name > strong { margin-top: 0 !important; color: #176447 !important; font-size: 13px !important; }
.stats-payment-account-body { padding: 7px 12px 11px; }
.stats-payment-account-project + .stats-payment-account-project { margin-top: 10px; }
.stats-payment-account-project > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 3px; }
.stats-payment-account-project > header strong { color: #294c3c; font-size: 11px; }
.stats-payment-account-project > header span { color: #6f8178; font-size: 9px; }
.stats-payment-account-table { min-width: 850px; }
.stats-payment-account-table td { padding-top: 7px; padding-bottom: 7px; }
.stats-payment-materials { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stats-payment-account-empty { margin: 0; }
.stats-export-actions { display: flex; align-items: center; gap: 7px; }
.stats-export-actions[hidden] { display: none; }
.stats-export-actions button { min-height: 34px; white-space: nowrap; }
.stats-selection-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #a9cbb9;
  border-radius: 8px;
  background: #eef6f1;
}
.stats-selection-toolbar[hidden] { display: none; }
.stats-selection-toolbar > div:first-child { min-width: 0; }
.stats-selection-toolbar span { color: #244b3b; font-size: 12px; }
.stats-selection-toolbar span strong { color: #176447; font-size: 16px; }
.stats-selection-toolbar small { display: block; margin-top: 3px; overflow: hidden; color: #72827a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.stats-selection-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.stats-selection-actions button {
  min-height: 31px;
  padding: 5px 9px;
  border: 1px solid #bed2c7;
  border-radius: 6px;
  color: #315b48;
  background: #fff;
  font-size: 10px;
  font-weight: 800;
}
.stats-selection-actions button.primary-button { color: #fff; border-color: #176447; background: #176447; }
.stats-selection-actions button:disabled { cursor: not-allowed; opacity: .45; }
.stats-v2-item-table tr.stats-item-selected td { background: #edf6f1; }
.stats-item-selection-head { min-width: 74px; }
.stats-item-selection-cell { white-space: nowrap; }
.stats-item-selection-cell label { display: inline-grid; margin-right: 5px; vertical-align: middle; }
.stats-item-selection-cell input { width: 15px; height: 15px; margin: 0; accent-color: #176447; }
.stats-item-selection-cell button {
  min-height: 23px;
  padding: 2px 6px;
  border: 1px solid #bfd3c8;
  border-radius: 5px;
  color: #35604d;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
}
.stats-export-open { overflow: hidden; }
.stats-export-backdrop {
  position: fixed;
  z-index: 145;
  inset: 0 0 0 var(--sidebar-width);
  display: flex;
  justify-content: flex-end;
  background: rgba(17, 39, 30, .38);
  backdrop-filter: blur(2px);
}
.stats-export-backdrop[hidden] { display: none; }
.stats-export-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(590px, 100%);
  height: 100%;
  border-left: 1px solid #bdcec4;
  background: #f7faf8;
  box-shadow: -20px 0 55px rgba(21, 51, 37, .2);
  animation: stats-export-slide-in .18s ease-out;
}
@keyframes stats-export-slide-in { from { transform: translateX(22px); opacity: .7; } to { transform: translateX(0); opacity: 1; } }
.stats-export-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid #d9e3dd;
  background: #fff;
}
.stats-export-head span { color: #2a7657; font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.stats-export-head h2 { margin: 5px 0 0; color: #183e2e; font-size: 22px; letter-spacing: -.035em; }
.stats-export-head > button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d0ddd6;
  border-radius: 50%;
  color: #587066;
  background: #f2f6f3;
  font-size: 20px;
}
.stats-export-body { overflow: auto; padding: 16px 20px 22px; }
.stats-export-context { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; overflow: hidden; border: 1px solid #d8e3dc; border-radius: 9px; background: #d8e3dc; }
.stats-export-context > div { min-width: 0; padding: 10px 12px; background: #fff; }
.stats-export-context > div.wide { grid-column: 1 / -1; }
.stats-export-context span { display: block; color: #7a8a82; font-size: 9px; }
.stats-export-context strong { display: block; margin-top: 4px; overflow: hidden; color: #29493b; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stats-export-section { margin-top: 14px; padding: 14px; border: 1px solid #dbe5df; border-radius: 9px; background: #fff; }
.stats-export-section[hidden] { display: none; }
.stats-export-section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.stats-export-section-title h3 { margin: 0; color: #244735; font-size: 14px; }
.stats-export-section-title small { color: #7b8b83; font-size: 9px; text-align: right; }
.stats-export-scopes { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stats-export-scopes label,
.stats-export-purpose label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 9px;
  border: 1px solid #dce5e0;
  border-radius: 7px;
  cursor: pointer;
  background: #fbfcfb;
}
.stats-export-scopes label:has(input:checked),
.stats-export-purpose label:has(input:checked) { border-color: #70a68b; background: #edf6f1; box-shadow: inset 3px 0 #176447; }
.stats-export-scopes input,
.stats-export-purpose input {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 2px 0 0;
  padding: 0;
  accent-color: #176447;
}
.stats-export-scopes span,
.stats-export-purpose span { flex: 1 1 auto; min-width: 0; }
.stats-export-scopes strong,
.stats-export-purpose strong { display: block; color: #2c4d3e; font-size: 11px; }
.stats-export-scopes small,
.stats-export-purpose small { display: block; margin-top: 3px; color: #7d8b84; font-size: 9px; line-height: 1.45; }
.stats-export-purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.stats-export-preview { min-height: 94px; }
.stats-export-preview.is-empty { display: grid; place-items: center; border: 1px dashed #cad9d1; border-radius: 7px; color: #88958e; background: #f8faf9; }
.stats-export-preview.is-empty p { margin: 0; font-size: 11px; }
.stats-export-preview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.stats-export-preview-grid article { min-width: 0; padding: 9px; border-radius: 7px; background: #f1f6f3; }
.stats-export-preview-grid span { display: block; color: #78877f; font-size: 9px; }
.stats-export-preview-grid strong { display: block; margin-top: 5px; overflow: hidden; color: #22533f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.stats-export-batch-note { margin: 8px 0 0; padding: 8px 9px; border-radius: 6px; color: #895f22; background: #fff4df; font-size: 9px; line-height: 1.5; }
.stats-export-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 20px; border-top: 1px solid #d7e2dc; background: #fff; }
.stats-export-footer > p { min-width: 0; margin: 0; color: #5f7469; font-size: 10px; line-height: 1.45; }
.stats-export-footer > div { display: flex; flex: 0 0 auto; gap: 7px; }
.stats-export-footer button { min-height: 34px; padding: 6px 11px; border: 1px solid #c6d6cd; border-radius: 6px; color: #385b4b; background: #fff; font-size: 11px; font-weight: 800; }
.stats-export-footer button.primary-button { color: #fff; border-color: #176447; background: #176447; }
.stats-export-footer button:disabled { cursor: wait; opacity: .55; }
.stats-order-view-button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #bcd3c7;
  border-radius: 5px;
  color: #176447;
  background: #f1f7f3;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.stats-order-view-button:hover { border-color: #76a68f; background: #e5f1e9; }
.stats-order-detail-open { overflow: hidden; }
.stats-order-detail-backdrop {
  position: fixed;
  z-index: 120;
  inset: 0 0 0 var(--sidebar-width);
  display: flex;
  justify-content: flex-end;
  padding: 18px;
  background: rgba(17, 39, 30, .34);
  backdrop-filter: blur(2px);
}
.stats-order-detail-backdrop[hidden] { display: none; }
.stats-order-detail-panel {
  width: min(1180px, 94%);
  height: 100%;
  overflow: auto;
  padding: 18px;
  border: 1px solid #cad8d0;
  border-radius: 12px;
  background: #f7faf8;
  box-shadow: 0 24px 70px rgba(18, 49, 35, .25);
}
.stats-order-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 12px; }
.stats-order-detail-head span { color: #297052; font-size: 11px; font-weight: 900; }
.stats-order-detail-head h2 { margin: 4px 0; color: #173d2d; font-size: 22px; }
.stats-order-detail-head p { margin: 0; color: #76867e; font-size: 11px; }
.stats-order-detail-head > button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #52675c;
  background: #e5ece8;
  font-size: 21px;
}
.stats-order-detail-content { display: grid; gap: 11px; }
.stats-order-detail-meta,
.stats-order-supplier-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.stats-order-detail-meta > div,
.stats-order-supplier-meta > div { min-width: 0; padding: 8px 10px; border-radius: 6px; background: #edf3ef; }
.stats-order-detail-meta span,
.stats-order-supplier-meta span { display: block; color: #798981; font-size: 9px; }
.stats-order-detail-meta strong,
.stats-order-supplier-meta strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #29483a; font-size: 11px; }
.stats-order-detail-section { padding: 13px; border: 1px solid #d9e3dd; border-radius: 9px; background: #fff; }
.stats-order-detail-section > h3 { margin: 0 0 9px; color: #214735; font-size: 14px; }
.stats-order-detail-section > p { margin: 0; color: #566a60; font-size: 11px; line-height: 1.7; white-space: pre-wrap; }
.stats-order-supplier-list { display: grid; gap: 9px; }
.stats-order-supplier-card { padding: 11px; border: 1px solid #dce5e0; border-radius: 8px; background: #fafcfb; }
.stats-order-supplier-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.stats-order-supplier-card > header span { color: #7b8982; font-size: 9px; font-weight: 800; }
.stats-order-supplier-card > header h4 { margin: 2px 0 0; color: #1e4c38; font-size: 13px; }
.stats-order-supplier-card > header b { padding: 4px 7px; border-radius: 999px; color: #2a674d; background: #e5f1e9; font-size: 9px; }
.stats-order-supplier-meta { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 8px; }
.stats-order-items-table { min-width: 980px; }
.stats-order-supplier-note { margin: 8px 0 0; color: #61746a; font-size: 10px; line-height: 1.6; }
.stats-order-detail-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 11px; }
.stats-order-attachment-list { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.stats-order-attachment-list li { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 6px; background: #f2f6f3; font-size: 10px; }
.stats-order-attachment-list li span { color: #6f8178; }
.stats-order-attachment-list li strong { overflow: hidden; color: #304d3f; text-overflow: ellipsis; white-space: nowrap; }
.stats-order-attachment-list li a { color: #176447; font-weight: 800; text-decoration: none; }
.stats-v2-settlement-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #5f7068; background: #edf1ef; font-size: 9px; font-weight: 800; white-space: nowrap; }
.stats-v2-settlement-status.status-settled { color: #176447; background: #e3f2e8; }
.stats-v2-settlement-status.status-amount_mismatch { color: #9c4337; background: #fce9e6; }
.stats-v2-settlement-status.status-unstarted { color: #7c6540; background: #fff3d9; }
.stats-v2-item-table th:nth-child(3),
.stats-v2-item-table td:nth-child(3) { position: sticky; left: 0; z-index: 1; background: #fff; }
.stats-v2-item-table thead th:nth-child(3) { z-index: 2; background: #f6f8f7; }
.stats-v2-item-table.is-selecting th:nth-child(3),
.stats-v2-item-table.is-selecting td:nth-child(3) { position: static; }
.stats-v2-item-table.is-selecting th:nth-child(4),
.stats-v2-item-table.is-selecting td:nth-child(4) { position: sticky; left: 0; z-index: 1; background: #fff; }
.stats-v2-item-table.is-selecting thead th:nth-child(4) { z-index: 2; background: #f6f8f7; }
.stats-v2-item-table.is-selecting tr.stats-item-selected td:nth-child(4) { background: #edf6f1; }

.dashboard-workspace { max-width: 1500px; }
.dashboard-summary {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.dashboard-summary article {
  display: grid;
  gap: 8px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid #dce4df;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(34, 59, 48, .04);
}
.dashboard-summary span { color: #71827a; font-size: 12px; }
.dashboard-summary strong { color: #1f5d45; font-size: 25px; letter-spacing: -.05em; }
.dashboard-summary .profit-negative strong { color: #9a453a; }
.dashboard-panel {
  padding: 20px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fff;
}
.dashboard-panel-head { align-items: center; }
.dashboard-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.dashboard-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #d2ded7;
  border-radius: 999px;
  color: #526a5e;
  background: #f6f8f7;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-tabs button.active {
  color: #fff;
  border-color: #166447;
  background: #166447;
}
.dashboard-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 21px;
  height: 21px;
  padding: 0 6px;
  border-radius: 999px;
  color: #1f5d45;
  background: #e3efe8;
  font-size: 11px;
}
.dashboard-tabs button.active span {
  color: #166447;
  background: #fff;
}
.dashboard-list { display: grid; gap: 13px; }
.dashboard-order-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #dce6df;
  border-radius: 10px;
  background: #fbfdfb;
  box-shadow: inset 3px 0 0 #5fa77e;
}
.dashboard-order-card.dashboard-order-due {
  border-color: #e8c3b9;
  background: #fffafa;
  box-shadow: inset 3px 0 0 #b84e3e;
}
.dashboard-order-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.dashboard-order-head strong { display: block; color: #253f33; font-size: 17px; }
.dashboard-order-head span { color: #6e7f76; font-size: 12px; line-height: 1.6; }
.dashboard-order-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.dashboard-order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: #66786e;
  font-size: 12px;
}
.dashboard-order-meta span {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eef4f0;
}
.dashboard-issue-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.dashboard-issue-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  color: #6b5a24;
  background: #fff4d7;
  font-size: 12px;
  font-weight: 800;
}
.dashboard-issue-missing_specification,
.dashboard-issue-missing_unit,
.dashboard-issue-missing_quantity { color: #8a493e; background: #fbeae7; }
.dashboard-issue-missing_cost,
.dashboard-issue-missing_quote { color: #7a5214; background: #fff1cf; }
.dashboard-issue-receipt_document,
.dashboard-issue-logistics { color: #245d7a; background: #e7f3f6; }
.dashboard-issue-supplier_invoice,
.dashboard-issue-our_invoice,
.dashboard-issue-customer_invoice,
.dashboard-issue-missing_invoice_type { color: #1d6a49; background: #e8f5ed; }
.dashboard-item-table table { font-size: 12px; }
.dashboard-item-table th,
.dashboard-item-table td { white-space: normal; vertical-align: top; }

.import-title { align-items: flex-end; }
.import-actions { display: grid; justify-items: end; gap: 10px; }
.import-actions button { min-height: 41px; padding: 9px 14px; border: 0; border-radius: 7px; color: #fff; background: #166447; font-weight: 800; box-shadow: 0 3px 0 #0b4d35; }
.import-actions button:hover { background: #105639; }
.import-message { min-height: 21px; margin: 0 0 16px; color: #4c7461; font-size: 13px; }
.batch-banner { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr) minmax(120px, .65fr); gap: 1px; margin-bottom: 16px; overflow: hidden; border: 1px solid #d9e2dd; border-radius: 9px; background: #d9e2dd; }
.batch-banner > div { display: grid; gap: 5px; padding: 14px 16px; background: #fff; }
.batch-banner span { color: #75877d; font-size: 11px; }
.batch-banner strong { color: #294a3c; font-size: 13px; overflow-wrap: anywhere; }
.metric-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 16px; }
.metric-grid article { display: grid; gap: 8px; min-height: 100px; padding: 16px; border: 1px solid #dce4df; border-radius: 8px; background: #fff; }
.metric-grid span { color: #708177; font-size: 12px; }
.metric-grid strong { color: #1f5d45; font-size: 27px; letter-spacing: -.05em; }
.preview-panel { margin-top: 16px; padding: 21px; border: 1px solid #dce4df; border-radius: 9px; background: #fff; }
.history-workbench { border-color: #bcd5c6; background: #fbfdfb; }
.history-source { margin: -3px 0 17px; padding: 10px 12px; border-left: 3px solid #4f9a70; color: #426a55; background: #eff7f1; font-size: 13px; line-height: 1.55; }
.history-order-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; padding: 17px; border: 1px solid #d8e5dc; border-radius: 8px; background: #fff; }
.history-save { display: flex; grid-column: span 4; align-items: center; justify-content: space-between; gap: 14px; padding-top: 3px; }
.history-save > span { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #6c7e74; font-size: 12px; }
.history-save button { min-height: 38px; padding: 8px 12px; border: 0; border-radius: 6px; color: #fff; background: #166447; font-size: 13px; font-weight: 800; }
.history-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.history-save button.primary-danger { background: #9f442d; }
.history-save button.primary-danger:hover { background: #873720; }
.history-save button:disabled { cursor: not-allowed; opacity: .55; }
.history-item-list { display: grid; gap: 12px; margin-top: 18px; }
.history-item-card { padding: 16px; border: 1px solid #dce6df; border-radius: 8px; background: #fff; }
.history-item-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.history-item-head strong { color: #335344; font-size: 14px; }
.history-item-card > p { margin: 7px 0 13px; color: #798980; font-size: 12px; }
.history-item-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.history-item-fields small { color: #829087; font-size: 11px; font-weight: 400; }
.history-item-save { display: flex; justify-content: flex-end; margin-top: 13px; }
.history-sources { margin-top: 18px; color: #557267; font-size: 13px; }
.history-sources summary { cursor: pointer; font-weight: 800; }
.history-sources > div { margin-top: 11px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 15px; }
.panel-heading h2 { margin: 0 0 4px; color: #294336; font-size: 17px; }
.panel-heading p { margin: 0; color: #76867e; font-size: 12px; }
.issue-heading { align-items: end; }
.issue-filter { width: min(240px, 100%); font-size: 12px; }
.issue-filter select { min-height: 36px; padding: 6px 9px; }
.issue-type-summary { display: flex; flex-wrap: wrap; gap: 7px; margin: -3px 0 14px; }
.issue-type-summary span { padding: 5px 8px; border-radius: 99px; color: #596f63; background: #f0f4f1; font-size: 12px; }
.issue-type-summary strong { color: #8a493e; }
.status-pill { display: inline-flex; align-items: center; width: fit-content; min-height: 24px; padding: 3px 7px; border-radius: 99px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.status-preview { color: #315e87; background: #e9f1f8; }
.status-ready { color: #1d6a49; background: #e8f5ed; }
.status-pending { color: #936217; background: #fff4dc; }
.status-need_review { color: #9a453a; background: #fbeae7; }
.status-ignored { color: #65716b; background: #edf0ee; }
.status-imported { color: #215f7d; background: #e5f2f8; }
.status-quote { color: #1d5f78; background: #e7f3f6; }
.attachment-link-cell { line-height: 1.7; white-space: normal; min-width: 140px; }
.quote-upload-button { min-height: 28px; margin-top: 5px; padding: 5px 8px; font-size: 12px; }
.muted-cell { color: #7c8b83; text-align: center; }
.quote-requirement-panel { margin: 18px 0 22px; }
.quote-workspace,
.quote-workspace .form-section,
.quote-workspace .preview-panel,
.quote-workspace .requirement-card,
.quote-workspace .requirement-card-body,
.quote-workspace .inline-supplier-drafts,
.quote-workspace .inline-quote-form,
.quote-workspace .inline-quote-grid,
.quote-workspace .manual-supplier-drafts {
  min-width: 0;
  max-width: 100%;
}
.quote-workspace { overflow-x: hidden; }
.requirement-fill-button { min-height: 31px; padding: 6px 9px; font-size: 12px; }
.requirement-card-list { display: grid; gap: 12px; }
.requirement-empty {
  padding: 18px; border: 1px dashed #cbd9d1; border-radius: 10px; color: #718178; background: #fbfdfb; text-align: center;
}
.requirement-card {
  overflow: hidden; border: 1px solid #d8e6dd; border-radius: 12px; background: #ffffff;
  box-shadow: 0 8px 22px rgba(36, 72, 52, .06);
}
.requirement-card.is-open { border-color: #94c5aa; box-shadow: 0 12px 28px rgba(31, 101, 71, .11); }
.requirement-card-head {
  width: 100%; display: grid; grid-template-columns: 36px minmax(220px, 1.4fr) minmax(180px, 1fr) 90px 150px 72px 72px;
  gap: 12px; align-items: center; padding: 14px 16px; border: 0; background: #fbfdfb; color: #2b4638;
  text-align: left;
}
.requirement-card-head:hover { background: #f1f8f3; }
.requirement-card-head span { min-width: 0; color: #52665b; font-size: 13px; line-height: 1.45; }
.requirement-card-head strong { display: block; color: #1f4d38; font-size: 16px; }
.requirement-card-head small { display: block; margin-top: 3px; color: #819087; font-size: 12px; font-weight: 600; }
.requirement-toggle {
  display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid #b8d8c5; border-radius: 999px;
  color: #217250 !important; background: #eef8f2; font-size: 18px !important; font-weight: 900; cursor: pointer;
}
.requirement-toggle:hover { background: #dff1e6; }
.requirement-material { display: grid; gap: 2px; }
.delete-requirement-button {
  min-height: 32px; padding: 6px 10px; border: 1px solid #d7c8b8; border-radius: 999px;
  color: #7b5a35; background: #fffaf2; font-size: 12px; font-weight: 900; cursor: pointer;
}
.delete-requirement-button:hover { background: #fff2dc; }
.delete-requirement-button:disabled { cursor: not-allowed; opacity: .65; }
.edit-requirement-button {
  min-height: 32px; padding: 6px 10px; border: 1px solid #bdd3c8; border-radius: 999px;
  color: #246247; background: #f4fbf6; font-size: 12px; font-weight: 900; cursor: pointer;
}
.edit-requirement-button:hover { background: #e7f5ec; }
.requirement-edit-form {
  display: grid; grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 1fr) 100px minmax(180px, auto);
  gap: 10px; align-items: end; padding: 12px 16px; border-top: 1px solid #e1ece5; background: #fbfdfb;
}
.requirement-edit-form label { display: grid; gap: 5px; color: #40584b; font-size: 12px; font-weight: 900; }
.requirement-edit-form input {
  min-height: 34px; padding: 7px 9px; border: 1px solid #bdcec5; border-radius: 8px; background: #fff;
}
.requirement-edit-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.requirement-edit-actions span { color: #7a6d54; font-size: 12px; font-weight: 800; }
.requirement-edit-actions button {
  min-height: 34px; padding: 7px 12px; border: 0; border-radius: 8px; color: #fff; background: #226f51; font-weight: 900; cursor: pointer;
}
.requirement-edit-actions button:disabled { cursor: not-allowed; opacity: .65; }
.requirement-card-body { display: grid; gap: 14px; padding: 14px 16px 16px; border-top: 1px solid #e3eee7; background: #fff; }
.requirement-quote-table-wrap { width: 100%; max-width: 100%; min-width: 0; overflow-x: auto; border: 1px solid #edf2ef; border-radius: 10px; }
.requirement-quote-table { min-width: 1080px; font-size: 12px; }
.requirement-quote-table th, .requirement-quote-table td { padding: 9px 10px; vertical-align: top; }
.supplier-index-pill {
  display: inline-grid; place-items: center; min-width: 70px; padding: 5px 8px; border-radius: 999px;
  color: #1b694b; background: #e7f5ec; font-size: 12px; font-weight: 900;
}
.inline-supplier-drafts { display: grid; gap: 12px; }
.inline-quote-form { display: grid; gap: 10px; padding: 13px; border: 1px solid #d9e7de; border-radius: 10px; background: #f8fbf8; }
.inline-quote-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #24543e; font-weight: 900; font-size: 14px; }
.inline-quote-title strong { color: #1e6045; font-size: 15px; }
.inline-quote-card-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px;
}
.compact-action-button {
  min-height: 28px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 900;
}
.inline-quote-remove {
  min-height: 28px; padding: 5px 10px; border: 1px solid #e4c5bd; border-radius: 999px;
  color: #9a3d2d; background: #fff8f6; font-size: 12px; font-weight: 900; cursor: pointer;
}
.inline-quote-grid { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); gap: 9px; align-items: end; }
.inline-quote-grid label { display: grid; gap: 5px; color: #42584c; font-size: 12px; font-weight: 800; }
.inline-quote-grid input, .inline-quote-grid select {
  width: 100%; min-height: 34px; padding: 7px 8px; border: 1px solid #bdcec5; border-radius: 7px; background: #fff;
}
.inline-quote-wide { grid-column: span 3; }
.inline-file-field { display: grid; gap: 6px; align-content: start; }
.inline-file-label { color: #42584c; font-size: 12px; font-weight: 800; }
.quote-file-drop-zone {
  display: grid; gap: 3px; min-height: 58px; padding: 9px 10px; border: 1px dashed #9fcdb4; border-radius: 9px;
  color: #2e6b50; background: #f4fbf6; text-align: left; cursor: pointer;
}
.quote-file-drop-zone:hover, .quote-file-drop-zone:focus, .quote-file-drop-zone.dragging {
  border-color: #238363; background: #eaf5ed; outline: none;
}
.quote-file-drop-zone strong { font-size: 12px; line-height: 1.35; }
.quote-file-drop-zone .file-picker-name {
  display: block; max-width: 100%; overflow: hidden; color: #7a8b82; font-size: 11px; font-weight: 600;
  text-overflow: ellipsis; white-space: nowrap;
}
.inline-file-help { color: #7a8b82; font-size: 11px; font-weight: 600; }

.field-action-link {
  display: inline-block;
  width: fit-content;
  margin-top: 5px;
  color: #176447;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.field-action-link:hover { text-decoration: underline; }
.inline-quote-actions { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.inline-quote-message { margin-right: auto; color: #336148; font-size: 12px; font-weight: 800; }
.inline-quote-actions button { min-height: 36px; padding: 8px 14px; border: 0; border-radius: 8px; color: #fff; background: #226f51; font-weight: 900; cursor: pointer; }
.inline-quote-actions button:disabled { cursor: not-allowed; opacity: .65; }
.manual-quote-panel { margin: 12px 0 24px; }
.manual-material-form { display: grid; gap: 12px; }
.material-library-hint {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; border: 1px solid #e5d1a8; border-radius: 9px;
  color: #7b5b21; background: #fff8e8; font-size: 12px; font-weight: 800;
}
.material-library-hint[hidden] { display: none; }
.material-library-hint button { min-height: 30px; padding: 5px 10px; white-space: nowrap; }
.manual-supplier-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px;
  padding-top: 13px; border-top: 1px solid #e3eee7;
}
.manual-supplier-toolbar .order-message { margin: 0; }
.add-inline-supplier-button {
  justify-self: start; min-height: 38px; padding: 9px 14px; border: 1px solid #9fcdb4; border-radius: 10px;
  color: #176447; background: #edf8f1; font-weight: 900; cursor: pointer;
}
.add-inline-supplier-button:hover { background: #e2f3e8; }
.quote-workspace {
  width: min(1540px, calc(100% - 32px));
  padding-top: 34px;
}
.quote-workspace .page-title { margin-bottom: 18px; }
.quote-workspace .page-title h1 { font-size: clamp(26px, 2.3vw, 34px); }
.quote-workspace .form-section,
.quote-workspace .preview-panel {
  padding: 16px;
  border-radius: 9px;
  box-shadow: 0 3px 14px rgba(34, 59, 48, .025);
}
.quote-workspace .section-heading { margin-bottom: 12px; }
.quote-workspace .section-heading h2,
.quote-workspace .panel-heading h2 { font-size: 16px; }
.quote-workspace .section-heading p,
.quote-workspace .panel-heading p { font-size: 12px; line-height: 1.45; }
.quote-workspace label { gap: 5px; font-size: 12px; }
.quote-workspace input,
.quote-workspace select,
.quote-workspace textarea {
  min-height: 34px;
  padding: 6px 8px;
  font-size: 13px;
}
.quote-workspace .quote-import-section {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr);
  gap: 10px 14px;
}
.quote-workspace .quote-import-section .section-heading,
.quote-workspace .quote-import-section .requirement-preview {
  grid-column: 1 / -1;
}
.quote-workspace .quick-import-panel { margin-bottom: 0; }
.quote-workspace .clipboard-import-label textarea { min-height: 86px; }
.quote-workspace .quick-import-actions { gap: 7px; }
.quote-workspace .compact-drop-zone {
  min-height: 64px;
  padding: 12px;
}
.quote-workspace .attachment-drop-zone strong { font-size: 13px; }
.quote-workspace .attachment-drop-zone span { font-size: 11px; text-align: center; }
.quote-requirement-panel { margin: 12px 0 16px; }
.quote-workspace .requirement-card-list { gap: 8px; }
.quote-workspace .requirement-card {
  border-radius: 9px;
  box-shadow: none;
}
.quote-workspace .requirement-card.is-open {
  border-color: #9ecdb2;
  box-shadow: 0 8px 18px rgba(31, 101, 71, .07);
}
.quote-workspace .requirement-card-head {
  grid-template-columns: 32px minmax(220px, 1.5fr) minmax(160px, 1fr) 76px 126px 60px 60px;
  gap: 8px;
  padding: 9px 11px;
}
.quote-workspace .requirement-toggle {
  width: 26px;
  height: 26px;
  font-size: 15px !important;
}
.quote-workspace .requirement-card-head span { font-size: 12px; line-height: 1.35; }
.quote-workspace .requirement-card-head strong { font-size: 14px; }
.quote-workspace .requirement-card-head small { margin-top: 1px; font-size: 11px; }
.quote-workspace .edit-requirement-button,
.quote-workspace .delete-requirement-button {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 11px;
}
.quote-workspace .requirement-card-body {
  gap: 10px;
  padding: 11px;
}
.quote-workspace .requirement-quote-table th,
.quote-workspace .requirement-quote-table td {
  padding: 7px 8px;
}
.quote-workspace .manual-quote-panel {
  gap: 12px;
  margin: 12px 0 24px;
}
.quote-workspace .quote-manual-combined-section .section-heading-row {
  align-items: center;
}
.quote-workspace .quote-add-material-button {
  flex: 0 0 auto;
  margin-left: auto;
}
.quote-workspace .quote-supplier-subsection {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #dbe8e1;
}
.quote-workspace .quote-supplier-subsection h2 {
  margin: 0;
  color: #1f4d38;
  font-size: 15px;
}
.quote-workspace .quote-supplier-subsection p {
  margin: 4px 0 0;
  color: #6c7d73;
  font-size: 12px;
  line-height: 1.45;
}
.quote-workspace .manual-material-list { gap: 8px; }
.quote-workspace .manual-material-row {
  grid-template-columns: 62px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 8px 9px;
  border-radius: 8px;
  background: #fff;
}
.quote-workspace .manual-material-row-index {
  min-height: 32px;
  font-size: 11px;
}
.quote-workspace .manual-material-grid {
  grid-template-columns: minmax(300px, 2fr) minmax(170px, 1fr) minmax(90px, .48fr) minmax(105px, .55fr);
  gap: 8px;
}
.quote-workspace .manual-material-remove {
  min-height: 32px;
  padding: 5px 9px;
  font-size: 12px;
}
.quote-workspace .material-library-hint {
  padding: 8px 10px;
  border-radius: 8px;
}
.quote-workspace .inline-supplier-drafts {
  gap: 0;
  overflow: hidden;
  border: 1px solid #edf2ef;
  border-radius: 8px;
  background: #fff;
}
.quote-workspace .inline-supplier-drafts:empty { display: none; }
.quote-workspace .inline-quote-form {
  gap: 8px;
  padding: 10px 11px;
  border: 0;
  border-radius: 0;
  background: #fff;
}
.quote-workspace .inline-quote-form + .inline-quote-form { border-top: 1px solid #edf2ef; }
.quote-workspace .inline-quote-title {
  padding-bottom: 6px;
  border-bottom: 1px dashed #e4ece7;
  font-size: 13px;
}
.quote-workspace .inline-quote-title strong { font-size: 14px; }
.quote-workspace .inline-quote-card-actions { gap: 6px; }
.quote-workspace .compact-action-button,
.quote-workspace .inline-quote-remove {
  min-height: 26px;
  padding: 4px 9px;
  font-size: 11px;
}
.quote-workspace .inline-quote-grid {
  grid-template-columns: minmax(170px, 1.45fr) minmax(150px, 1.2fr) repeat(4, minmax(105px, .8fr));
  gap: 8px;
}
.quote-workspace .inline-quote-grid label { font-size: 12px; }
.quote-workspace .inline-quote-wide { grid-column: span 3; }
.inline-file-detail {
  border: 1px solid #d9e7de;
  border-radius: 8px;
  background: #fbfdfb;
}
.inline-file-detail summary {
  min-height: 32px;
  padding: 8px 10px;
  color: #24543e;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.inline-file-detail summary::-webkit-details-marker { display: none; }
.inline-file-detail summary::after {
  content: "展开";
  float: right;
  color: #6c8176;
  font-weight: 800;
}
.inline-file-detail[open] summary {
  border-bottom: 1px solid #e5eee8;
}
.inline-file-detail[open] summary::after { content: "收起"; }
.inline-file-detail .inline-file-field {
  padding: 10px;
}
.quote-workspace .quote-file-drop-zone {
  min-height: 48px;
  padding: 8px 10px;
}
.quote-workspace .inline-quote-actions {
  gap: 10px;
}
.quote-workspace .inline-quote-actions button {
  min-height: 32px;
  padding: 7px 12px;
}
.quote-workspace .manual-supplier-toolbar {
  margin-top: 10px;
  padding-top: 10px;
}
.quote-workspace .manual-supplier-toolbar .primary-button {
  min-height: 36px;
  padding: 8px 14px;
}
.quote-workspace .add-inline-supplier-button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
}

/* 未成交询价录入：物料导航 + 当前物料供应商比价工作台 */
.quote-page-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
  padding: 9px 12px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  background: #fff;
}
.quote-page-command-bar p,
.quote-page-command-bar div { display: flex; align-items: center; gap: 10px; margin: 0; }
.quote-page-command-bar strong { color: #176447; font-size: 13px; }
.quote-page-command-bar span { color: #718078; font-size: 12px; }
.quote-workspace .quote-import-section[hidden] { display: none; }
.quote-context-grid {
  display: grid;
  grid-template-columns: minmax(160px, .7fr) minmax(260px, 1.4fr) minmax(240px, 1.2fr);
  gap: 10px;
  margin-bottom: 18px;
}
.quote-context-grid > label { position: relative; display: grid; align-content: start; min-width: 0; }
.quote-workbench-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid #e2ebe5;
}
.quote-entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 14px;
  align-items: start;
  margin-top: 12px;
}
.quote-entry-layout > *,
.quote-entry-workbench > *,
.manual-material-editor-panel { min-width: 0; }
.quote-entry-workbench {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  gap: 14px;
}
.manual-material-navigation-panel {
  padding-right: 14px;
  border-right: 1px solid #dfe9e3;
}
.manual-material-navigation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 9px;
  color: #64786d;
  font-size: 12px;
}
.manual-material-navigation-head strong { color: #274d3a; font-size: 13px; }
.manual-material-navigation { display: grid; gap: 5px; }
.manual-material-navigation-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #566b60;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.manual-material-navigation-item:hover { background: #f2f7f4; }
.manual-material-navigation-item.is-active {
  border-color: #cce0d4;
  color: #1e4f37;
  background: #edf6f0;
}
.manual-material-navigation-item strong {
  min-width: 0;
  overflow: hidden;
  color: inherit;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-material-navigation-item span,
.manual-material-navigation-item small { color: #718078; font-size: 11px; line-height: 1.45; }
.manual-material-navigation-item small { color: #1f7552; }
.quote-workspace .manual-material-list { display: block; }
.quote-workspace .manual-material-row[hidden] { display: none; }
.quote-workspace .manual-material-row {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 0 12px;
  border: 0;
  border-bottom: 1px solid #e7eee9;
  border-radius: 0;
}
.quote-workspace .manual-material-row-index { display: none; }
.quote-workspace .manual-material-grid {
  grid-template-columns: minmax(220px, 1.6fr) minmax(150px, 1fr) minmax(80px, .5fr) minmax(90px, .55fr);
}
.manual-supplier-mode-hint {
  margin: 10px 0 0;
  padding: 8px 10px;
  border-left: 3px solid #27805c;
  color: #60736a;
  background: #f0f6f2;
  font-size: 12px;
  line-height: 1.5;
}
.quote-workspace .quote-supplier-subsection {
  align-items: center;
  margin-top: 11px;
  padding-top: 11px;
  border-top-style: solid;
}
.quote-workspace .quote-supplier-subsection h2 { font-size: 14px; }
.quote-workspace .inline-supplier-drafts {
  overflow: visible;
  border: 0;
  border-radius: 0;
}
.manual-supplier-comparison {
  width: 100%;
  overflow-x: auto;
  border-top: 1px solid #dfe8e2;
  border-bottom: 1px solid #dfe8e2;
}
.manual-supplier-comparison-head,
.manual-supplier-comparison-row {
  display: grid;
  grid-template-columns: minmax(175px, 1.5fr) minmax(80px, .65fr) minmax(82px, .68fr) minmax(82px, .68fr) minmax(88px, .72fr) minmax(86px, .7fr);
  gap: 8px;
  align-items: center;
  min-width: 660px;
}
.manual-supplier-comparison-head {
  padding: 7px 8px;
  color: #708078;
  font-size: 11px;
}
.manual-supplier-comparison-row {
  width: 100%;
  padding: 9px 8px;
  border: 0;
  border-top: 1px solid #edf2ef;
  color: #3e5147;
  background: #fff;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.manual-supplier-comparison-row:hover,
.manual-supplier-comparison-row.is-active { background: #edf6f0; }
.manual-supplier-name {
  overflow: hidden;
  color: #294b3a;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.manual-supplier-composite-price { color: #176447; font-weight: 900; }
.manual-supplier-detail-form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e0e9e3;
}
.manual-supplier-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.manual-supplier-detail-head p { display: flex; align-items: center; gap: 8px; margin: 0; }
.manual-supplier-detail-head strong { color: #254c39; font-size: 13px; }
.manual-supplier-detail-head span { color: #77867e; font-size: 11px; }
.quote-workspace .manual-supplier-primary-grid {
  grid-template-columns: minmax(190px, 1.35fr) minmax(160px, 1.05fr) minmax(105px, .65fr) minmax(115px, .75fr);
}
.manual-supplier-more-detail {
  border-top: 1px dashed #dbe6df;
  border-bottom: 1px dashed #dbe6df;
}
.manual-supplier-more-detail > summary {
  padding: 8px 0;
  color: #315f48;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.manual-supplier-extra-grid { padding: 4px 0 11px; }
.manual-supplier-notes-files {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(210px, .8fr);
  gap: 10px;
  align-items: stretch;
}
.manual-supplier-notes-files > label { display: grid; align-content: start; }
.manual-supplier-notes-files textarea { min-height: 62px; }
.manual-supplier-notes-files .inline-file-field { min-width: 0; align-content: start; gap: 5px; }
.manual-supplier-notes-files .inline-file-field::before {
  visibility: hidden;
  content: "附件";
  color: #34433e;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
}
.manual-supplier-notes-files .quote-file-drop-zone { min-height: 62px; }
.quote-entry-summary {
  position: sticky;
  top: 12px;
  padding: 14px;
  border: 1px solid #dce7e0;
  border-radius: 8px;
  background: #fbfdfb;
}
.quote-entry-summary h2 { margin: 0 0 11px; color: #294b3a; font-size: 15px; }
.quote-entry-summary dl { display: grid; gap: 8px; margin: 0; }
.quote-entry-summary dl div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #e3ebe6;
}
.quote-entry-summary dt { color: #718078; font-size: 12px; }
.quote-entry-summary dd { margin: 0; color: #294b3a; font-size: 12px; font-weight: 900; text-align: right; }
#quote-summary-best-price { color: #176447; }
.quote-summary-checklist {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e3ebe6;
}
.quote-summary-checklist span { display: flex; justify-content: space-between; gap: 8px; color: #718078; font-size: 12px; }
.quote-summary-checklist b { color: #41564b; }

@media (max-width: 1450px) {
  .quote-entry-layout { grid-template-columns: minmax(0, 1fr); }
  .quote-entry-summary { position: static; }
  .quote-entry-summary dl { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .quote-entry-summary dl div { display: grid; }
  .quote-summary-checklist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 首页工作台第二版：管理员公司概览、个人待办与紧凑业务入口。 */
.dashboard-v2-workspace { width: min(1580px, calc(100% - 34px)); max-width: none; padding-top: 28px; }
.dashboard-v2-page-head,
.dashboard-v2-section-head,
.dashboard-v2-task-head,
.dashboard-v2-quick-panel > header,
.dashboard-v2-recent-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.dashboard-v2-page-head { align-items: flex-end; margin-bottom: 14px; }
.dashboard-v2-page-head p { margin: 0 0 5px; color: #176447; font-size: 11px; font-weight: 900; letter-spacing: .05em; }
.dashboard-v2-page-head h1 { margin: 0; color: #193b2e; font-size: 29px; line-height: 1.15; }
.dashboard-v2-head-actions { display: flex; align-items: center; gap: 9px; color: #65776e; font-size: 12px; font-weight: 700; }
.dashboard-v2-button { width: auto; min-height: 34px; padding: 6px 12px; border: 1px solid #c8d8d0; border-radius: 6px; color: #315c48; background: #f5f9f6; font-size: 12px; font-weight: 900; }
.dashboard-v2-button.quiet { color: #53675d; border-color: #d2ddd7; background: #fff; }
.dashboard-v2-button:hover { filter: brightness(.975); }

.dashboard-v2-company,
.dashboard-v2-personal,
.dashboard-v2-task-panel,
.dashboard-v2-quick-panel,
.dashboard-v2-recent-panel { border: 1px solid #dbe4df; border-radius: 10px; background: #fff; box-shadow: 0 8px 22px rgba(38,65,52,.035); }
.dashboard-v2-company[hidden],
.dashboard-v2-scope-switch[hidden] { display: none !important; }
.dashboard-v2-company,
.dashboard-v2-personal { padding: 12px; }
.dashboard-v2-personal { margin-top: 9px; }
.dashboard-v2-section-head { margin-bottom: 9px; }
.dashboard-v2-section-head > div,
.dashboard-v2-task-head > div,
.dashboard-v2-recent-panel > header > div { display: flex; align-items: baseline; gap: 8px; }
.dashboard-v2-section-head h2,
.dashboard-v2-task-head h2,
.dashboard-v2-quick-panel h2,
.dashboard-v2-recent-panel h2 { margin: 0; color: #244737; font-size: 15px; }
.dashboard-v2-section-head span,
.dashboard-v2-section-head small,
.dashboard-v2-task-head span,
.dashboard-v2-recent-panel header span { color: #7a8981; font-size: 11px; }
.dashboard-v2-section-head small { padding: 3px 7px; border-radius: 999px; color: #2f684e; background: #e9f3ed; font-weight: 800; }

.dashboard-v2-company-metrics { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 7px; }
.dashboard-v2-metric { position: relative; width: auto; min-width: 0; padding: 10px 11px; overflow: hidden; border: 1px solid #dce7e1; border-radius: 8px; color: inherit; background: linear-gradient(145deg,#fff 0%,#f6faf7 100%); text-align: left; }
.dashboard-v2-metric::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #73a18a; content: ""; }
.dashboard-v2-metric:hover,
.dashboard-v2-metric.active { border-color: #7ca991; background: #f0f7f3; }
.dashboard-v2-metric.urgent::before { background: #bd5b4d; }
.dashboard-v2-metric.urgent strong { color: #9a4338; }
.dashboard-v2-metric.business { cursor: default; }
.dashboard-v2-metric.business:hover { border-color: #dce7e1; background: linear-gradient(145deg,#fff 0%,#f6faf7 100%); }
.dashboard-v2-metric span,
.dashboard-v2-metric small,
.dashboard-v2-personal-metrics span,
.dashboard-v2-personal-metrics small { display: block; overflow: hidden; color: #75847c; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v2-metric strong { display: block; margin: 3px 0 2px; color: #174431; font-size: 23px; line-height: 1; font-variant-numeric: tabular-nums; }
.dashboard-v2-personal-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.dashboard-v2-personal-metrics article { min-width: 0; padding: 9px 11px; border: 1px solid #e1e9e4; border-radius: 7px; background: #fbfcfb; }
.dashboard-v2-personal-metrics strong { display: inline-block; margin: 3px 8px 0 0; color: #1f5b44; font-size: 21px; font-variant-numeric: tabular-nums; }
.dashboard-v2-personal-metrics small { display: inline; }
.material-return-note { display: block; margin-top: 2px; color: #a04a3e; font-size: 11px; font-weight: 700; white-space: nowrap; }

.dashboard-v2-grid { display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 10px; align-items: start; margin-top: 10px; }
.dashboard-v2-task-panel { min-width: 0; overflow: hidden; }
.dashboard-v2-task-head { min-height: 48px; padding: 9px 11px; border-bottom: 1px solid #e3eae6; }
.dashboard-v2-scope-switch { display: flex; padding: 3px; border: 1px solid #d5dfda; border-radius: 6px; background: #f5f8f6; }
.dashboard-v2-scope-switch button { width: auto; min-height: 26px; padding: 4px 10px; border: 0; border-radius: 4px; color: #61736a; background: transparent; font-size: 11px; font-weight: 900; }
.dashboard-v2-scope-switch button.active { color: #fff; background: #176447; }
.dashboard-v2-tabs { display: flex; gap: 4px; padding: 8px 10px; overflow-x: auto; border-bottom: 1px solid #e4ebe7; background: #fafcfb; }
.dashboard-v2-tabs button { width: auto; min-height: 29px; padding: 4px 9px; border: 1px solid #d8e1dc; border-radius: 5px; color: #5f7168; background: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; }
.dashboard-v2-tabs button span { margin-left: 4px; color: #829087; }
.dashboard-v2-tabs button.active { color: #fff; border-color: #286f50; background: #286f50; }
.dashboard-v2-tabs button.active span { color: #dcebe3; }
.dashboard-v2-message { min-height: 0; margin: 0; padding: 0 11px; color: #7a8981; font-size: 11px; }
.dashboard-v2-message:not(:empty) { padding-top: 9px; }
.dashboard-v2-table-wrap { min-height: 315px; overflow: auto; }
.dashboard-v2-table { width: 100%; min-width: 940px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.dashboard-v2-table th,
.dashboard-v2-table td { padding: 8px; overflow: hidden; border-bottom: 1px solid #e8edea; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v2-table th { color: #68786f; background: #f4f7f5; font-size: 11px; font-weight: 900; }
.dashboard-v2-table tbody tr { cursor: pointer; }
.dashboard-v2-table tbody tr:hover { background: #f7faf8; }
.dashboard-v2-table th:nth-child(1) { width: 72px; }
.dashboard-v2-table th:nth-child(2) { width: 210px; }
.dashboard-v2-table th:nth-child(3) { width: 82px; }
.dashboard-v2-table th:nth-child(4) { width: 155px; }
.dashboard-v2-table th:nth-child(5) { width: 145px; }
.dashboard-v2-table th:nth-child(6) { width: 120px; }
.dashboard-v2-table th:nth-child(7) { width: 90px; }
.dashboard-v2-status { display: inline-flex; min-height: 21px; align-items: center; padding: 3px 7px; border-radius: 999px; color: #65756d; background: #edf1ef; font-size: 10px; font-weight: 900; }
.dashboard-v2-status.due { color: #9a4338; background: #fbe7e4; }
.dashboard-v2-status.soon { color: #92651f; background: #fff0d8; }
.dashboard-v2-status.normal { color: #28684d; background: #e8f3ec; }
.dashboard-v2-project { color: #234b39; font-weight: 800; }
.dashboard-v2-actions { display: inline-flex; gap: 8px; }
.dashboard-v2-actions button,
.dashboard-v2-actions a { width: auto; padding: 2px 0; border: 0; color: #176447; background: transparent; font-size: 11px; font-weight: 900; text-decoration: none; }
.dashboard-v2-task-footer { display: flex; align-items: center; justify-content: space-between; padding: 8px 11px; color: #7a8981; background: #fafcfb; font-size: 11px; }
.dashboard-v2-task-footer a { color: #176447; font-weight: 900; text-decoration: none; }
.dashboard-v2-empty,
.dashboard-v2-empty-row { color: #829087; text-align: center; }
.dashboard-v2-empty { margin: 8px 0; font-size: 11px; }
.dashboard-v2-empty-row { height: 160px; }

.dashboard-v2-side { display: grid; gap: 10px; }
.dashboard-v2-quick-panel,
.dashboard-v2-recent-panel { padding: 11px; }
.dashboard-v2-quick-panel > header,
.dashboard-v2-recent-panel > header { margin-bottom: 8px; }
.dashboard-v2-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dashboard-v2-quick-grid a { min-width: 0; padding: 10px; border: 1px solid #dfe8e3; border-radius: 7px; color: inherit; background: #f8fbf9; text-decoration: none; }
.dashboard-v2-quick-grid a:hover { border-color: #8cb49f; background: #eef6f1; }
.dashboard-v2-quick-grid b { display: block; overflow: hidden; color: #24503c; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v2-quick-grid span { display: block; margin-top: 4px; color: #7a8981; font-size: 10px; }
.dashboard-v2-recent-panel > header a { color: #176447; font-size: 11px; font-weight: 900; text-decoration: none; }
.dashboard-v2-recent-list { display: grid; gap: 4px; }
.dashboard-v2-recent-item { display: grid; grid-template-columns: 41px minmax(0,1fr); gap: 7px; align-items: center; padding: 7px; border-radius: 5px; color: inherit; background: #f4f7f5; font-size: 11px; text-decoration: none; }
.dashboard-v2-recent-item:hover { background: #eaf2ed; }
.dashboard-v2-recent-item time { color: #7b8982; font-variant-numeric: tabular-nums; }
.dashboard-v2-recent-item div { min-width: 0; }
.dashboard-v2-recent-item b,
.dashboard-v2-recent-item span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-v2-recent-item b { color: #2c513f; }
.dashboard-v2-recent-item span { margin-top: 2px; color: #738078; }

.dashboard-v2-drawer-backdrop { position: fixed; z-index: 50; inset: 0 0 0 var(--sidebar-width); background: rgba(17,39,30,.32); backdrop-filter: blur(1px); }
.dashboard-v2-drawer { position: fixed; z-index: 51; inset: 12px 12px 12px auto; width: min(610px, calc(100% - var(--sidebar-width) - 34px)); overflow: auto; border: 1px solid #ccd9d2; border-radius: 10px; background: #f8faf9; box-shadow: -18px 0 55px rgba(25,52,39,.18); animation: dashboard-v2-drawer-in .18s ease-out; }
.dashboard-v2-drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 16px; border-bottom: 1px solid #dce5e0; background: rgba(255,255,255,.97); }
.dashboard-v2-drawer-head p { margin: 0 0 4px; color: #2b7553; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.dashboard-v2-drawer-head h2 { margin: 0; color: #1c4432; font-size: 19px; }
.dashboard-v2-drawer-head span { display: block; margin-top: 4px; color: #79867f; font-size: 11px; }
.dashboard-v2-drawer-close { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: #52665b; background: #e8eeea; font-size: 19px; }
.dashboard-v2-drawer-body { display: grid; gap: 9px; padding: 12px; }
.dashboard-v2-drawer-body > section { padding: 11px; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; }
.dashboard-v2-drawer-body h3 { margin: 0 0 8px; color: #294c3c; font-size: 13px; }
.dashboard-v2-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.dashboard-v2-detail-grid > div { min-width: 0; padding: 8px; border-radius: 6px; background: #f2f6f3; }
.dashboard-v2-detail-grid span { display: block; color: #7a8880; font-size: 10px; }
.dashboard-v2-detail-grid strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #30473c; font-size: 12px; }
.dashboard-v2-detail-grid .wide { grid-column: 1 / -1; }
.dashboard-v2-drawer-items { display: grid; gap: 5px; }
.dashboard-v2-drawer-item { display: grid; grid-template-columns: minmax(0,1fr) 180px; gap: 8px; padding: 7px 8px; border-radius: 6px; background: #f3f7f4; font-size: 11px; }
.dashboard-v2-drawer-item b { color: #2e6048; }
.dashboard-v2-drawer-item span { color: #8f5622; text-align: right; }
.dashboard-v2-drawer-actions { display: flex; justify-content: flex-end; gap: 7px; }
.dashboard-v2-drawer-actions button,
.dashboard-v2-drawer-actions a { width: auto; min-height: 34px; padding: 6px 12px; border: 1px solid #ccd9d2; border-radius: 6px; color: #52665b; background: #fff; font-size: 12px; font-weight: 900; text-decoration: none; }
.dashboard-v2-drawer-actions .primary { color: #fff; border-color: #176447; background: #176447; }
.dashboard-v2-toast { position: fixed; z-index: 80; right: 26px; bottom: 25px; padding: 8px 12px; border-radius: 6px; color: #fff; background: #1e503a; box-shadow: 0 10px 30px rgba(20,52,38,.18); font-size: 12px; font-weight: 800; }
@keyframes dashboard-v2-drawer-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1380px) {
  .dashboard-v2-company-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .dashboard-v2-grid { grid-template-columns: 1fr; }
  .dashboard-v2-side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 980px) {
  .dashboard-v2-drawer-backdrop { inset: 0; }
  .dashboard-v2-drawer { width: calc(100% - 24px); }
}
@media (max-width: 920px) {
  .quote-context-grid { grid-template-columns: 1fr 1fr; }
  .quote-entry-workbench { grid-template-columns: 1fr; }
  .manual-material-navigation-panel { padding: 0 0 12px; border-right: 0; border-bottom: 1px solid #dfe9e3; }
  .manual-material-navigation { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-workspace .manual-material-grid,
  .quote-workspace .manual-supplier-primary-grid { grid-template-columns: 1fr 1fr; }
  .quote-entry-summary dl,
  .quote-summary-checklist { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .quote-page-command-bar,
  .quote-workbench-heading,
  .manual-supplier-detail-head,
  .quote-workspace .manual-supplier-toolbar { align-items: stretch; flex-direction: column; }
  .quote-page-command-bar p,
  .quote-page-command-bar div { flex-wrap: wrap; }
  .quote-context-grid,
  .manual-material-navigation,
  .quote-workspace .manual-material-grid,
  .quote-workspace .manual-supplier-primary-grid,
  .manual-supplier-notes-files,
  .quote-entry-summary dl,
  .quote-summary-checklist { grid-template-columns: 1fr; }
  .manual-material-remove { justify-self: end; }
  .manual-supplier-notes-files .inline-file-field::before { display: none; }
}
.legacy-quote-details { margin: 12px 0 24px; }
.legacy-quote-details > summary {
  cursor: pointer; padding: 12px 14px; border: 1px solid #d8e5dc; border-radius: 10px; color: #365947; background: #f7fbf8;
  font-weight: 900;
}
.legacy-quote-details[open] > summary { margin-bottom: 12px; }
.export-flow-workspace { max-width: 1560px; }
.export-title {
  border-bottom: 1px solid #dfe9e3;
  padding-bottom: 14px;
}
.export-flow-panel {
  padding: 0;
  overflow: hidden;
  border-color: #d8e6dd;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
}
.export-step-heading,
.export-step-divider {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.export-step-heading {
  padding: 18px 20px 10px;
}
.export-step-divider {
  padding-top: 18px;
  border-top: 1px solid #e3ece6;
}
.export-step-heading h2,
.export-step-divider h2 {
  margin: 0;
  color: #20382d;
  font-size: 16px;
}
.export-step-heading p,
.export-step-divider p {
  margin: 4px 0 0;
  color: #647b70;
  font-size: 12px;
  line-height: 1.55;
}
.export-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 34px;
  height: 28px;
  border-radius: 999px;
  color: #fff;
  background: #176447;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}
.export-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 0 20px 20px;
}
.export-type-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.export-type-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 88px;
  padding: 14px;
  border: 1px solid #d6e3db;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.export-type-card:hover {
  border-color: #95bfa8;
  background: #f9fcfa;
}
.export-type-card:has(input:checked) {
  border-color: #176447;
  background: #f3fbf6;
  box-shadow: 0 0 0 3px rgba(23, 100, 71, .09);
}
.export-type-card input {
  width: auto;
  min-height: auto;
  margin-top: 3px;
  accent-color: #176447;
}
.export-type-card strong {
  display: block;
  color: #20382d;
  font-size: 15px;
}
.export-type-card small {
  display: block;
  margin-top: 6px;
  color: #63786f;
  font-size: 12px;
  line-height: 1.55;
}
.export-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}
.export-material-filter {
  grid-column: span 3;
}
.export-form textarea {
  width: 100%;
  resize: vertical;
  min-height: 74px;
  padding: 10px 11px;
  border: 1px solid #cfded5;
  border-radius: 8px;
  color: #24372f;
  background: #fff;
  font: 13px/1.6 "Microsoft YaHei UI", "PingFang SC", sans-serif;
}
.export-missing-date-toggle {
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px dashed #d3e2d9;
  border-radius: 9px;
  background: #fbfdfb;
}
.export-missing-date-toggle.is-disabled {
  opacity: .48;
}
.export-actions {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid #dbe8e0;
  border-radius: 12px;
  background: #fff;
}
.export-actions .order-message {
  margin: 0;
}
.export-selection-status {
  margin: 6px 0 0;
  color: #61786d;
  font-size: 12px;
}
.export-selection-status strong {
  color: #176447;
  font-size: 15px;
}
.export-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
}
.export-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: #166447;
  font-size: 13px;
  font-weight: 900;
}
.export-actions button.secondary-button {
  border: 1px solid #bfd4c8;
  color: #24563f;
  background: #f5faf7;
}
.export-actions button:disabled {
  cursor: not-allowed;
  opacity: .58;
}
.export-preview-panel {
  border-color: #d9e7df;
}
.export-preview-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.export-preview-actions button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #c8d8cf;
  border-radius: 8px;
  color: #285a44;
  background: #f7fbf8;
  font-size: 12px;
  font-weight: 900;
}
.export-preview-table-wrap {
  max-width: 100%;
  max-height: calc(100vh - 360px);
  overflow: auto;
  border: 1px solid #e3ece6;
  border-radius: 10px;
}
#export-preview-table {
  min-width: 1040px;
  table-layout: fixed;
  font-size: 12px;
}
#export-preview-table th,
#export-preview-table td {
  padding: 8px 9px;
}
#export-preview-table th:first-child,
#export-preview-table td:first-child {
  width: 48px;
  text-align: center;
}
#export-preview-table th:nth-child(2),
#export-preview-table td:nth-child(2) { width: 92px; }
#export-preview-table th:nth-child(3),
#export-preview-table td:nth-child(3) { width: 150px; }
#export-preview-table th:nth-child(4),
#export-preview-table td:nth-child(4) { width: 150px; }
#export-preview-table th:nth-child(5),
#export-preview-table td:nth-child(5) { width: 150px; }
#export-preview-table th:nth-child(6),
#export-preview-table td:nth-child(6) { width: 170px; }
#export-preview-table th:nth-child(7),
#export-preview-table td:nth-child(7) { width: 118px; }
#export-preview-table th:nth-child(8),
#export-preview-table td:nth-child(8) { width: 86px; }
#export-preview-table th:last-child,
#export-preview-table td:last-child { width: 160px; }
#export-preview-table input[type="checkbox"] {
  width: auto;
  min-height: auto;
  accent-color: #176447;
}
#export-preview-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}
#export-preview-table td strong {
  color: #20382d;
}
#export-preview-table code {
  color: #587164;
  font-size: 11px;
  background: transparent;
}
.export-money-line,
.export-muted-line {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.export-money-line {
  color: #204936;
  font-weight: 900;
}
.export-muted-line {
  margin-top: 2px;
  color: #71877c;
  font-size: 11px;
}
.export-help-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  background: transparent;
  border: 0;
  padding: 0;
}
.export-help-cards article {
  padding: 14px;
  border: 1px solid #dfe9e3;
  border-radius: 12px;
  background: #fff;
}
.export-help-cards strong {
  display: block;
  color: #244b3a;
  font-size: 13px;
}
.export-help-cards p {
  margin: 7px 0 0;
  color: #61786d;
  font-size: 12px;
  line-height: 1.65;
}

.supplier-library-workspace { max-width: 1540px; }
.material-workspace { max-width: 1500px; }
.material-action-bar {
  display: flex; align-items: center; gap: 10px; margin: -4px 0 16px;
}
.material-action-bar button {
  min-width: 112px;
}
.material-panel {
  margin-bottom: 16px;
}
.material-search-form {
  display: grid;
  grid-template-columns:
    minmax(260px, 1.45fr)
    minmax(220px, 1.15fr)
    minmax(160px, .75fr)
    minmax(76px, .34fr)
    minmax(92px, .36fr)
    92px;
  align-items: end;
  gap: 10px 12px;
}
.material-search-form label {
  min-width: 0;
}
.material-search-form button {
  min-height: 42px;
  padding-inline: 14px;
  box-shadow: none;
}
.material-list-section {
  padding-top: 18px;
}
.material-table-scroll {
  max-height: calc(100vh - 300px);
  overflow: auto;
}
.material-table {
  min-width: 980px;
  font-size: 12px;
}
.material-table th,
.material-table td {
  padding: 8px 10px;
  vertical-align: middle;
  white-space: nowrap;
}
.material-table td:nth-child(1),
.material-table td:nth-child(2),
.material-table td:nth-child(4) {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.supplier-profile-preview-panel {
  margin-bottom: 18px;
}
.supplier-profile-drop-zone {
  min-height: 96px;
}
.supplier-profile-preview {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d7e4dd;
  border-radius: 10px;
  background: #f8fcf9;
}
.supplier-profile-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.supplier-profile-preview-head strong {
  display: block;
  color: #203e31;
  font-size: 15px;
}
.supplier-profile-preview-head span {
  display: block;
  margin-top: 4px;
  color: #71847b;
  font-size: 12px;
}
.supplier-profile-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}
.supplier-profile-fields div {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e0ebe5;
  border-radius: 8px;
  background: #fff;
}
.supplier-profile-fields dt {
  color: #6d8177;
  font-size: 11px;
  font-weight: 900;
}
.supplier-profile-fields dd {
  overflow: hidden;
  margin: 5px 0 0;
  color: #2f4d3c;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
  text-overflow: ellipsis;
}
.supplier-profile-preview details {
  color: #4f675b;
  font-size: 12px;
}
.supplier-profile-preview pre {
  max-height: 220px;
  overflow: auto;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 8px;
  background: #eef5f1;
  color: #2f4a3d;
  white-space: pre-wrap;
}
.supplier-library-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  align-items: start;
}
.supplier-list-panel {
  order: 2;
  min-width: 0;
}
.supplier-editor-panel {
  order: 1;
  min-width: 0;
}
.supplier-search-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 110px;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.supplier-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e3ebe6;
  border-radius: 10px;
}
#supplier-table {
  min-width: 1080px;
  table-layout: fixed;
}
#supplier-table th:nth-child(1), #supplier-table td:nth-child(1) { width: 190px; }
#supplier-table th:nth-child(2), #supplier-table td:nth-child(2) { width: 240px; }
#supplier-table th:nth-child(3), #supplier-table td:nth-child(3) { width: 240px; }
#supplier-table th:nth-child(4), #supplier-table td:nth-child(4) { width: 210px; }
#supplier-table th:nth-child(5), #supplier-table td:nth-child(5) { width: 110px; }
#supplier-table th:nth-child(6), #supplier-table td:nth-child(6) { width: 90px; }
#supplier-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  vertical-align: top;
  line-height: 1.55;
}
#supplier-table td strong,
#supplier-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#supplier-table td small { margin-top: 4px; color: #7b8c84; }
.supplier-empty { text-align: center; color: #74857d; }
.supplier-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.supplier-status-good { color: #176348; background: #e4f3e9; }
.supplier-status-normal { color: #225e80; background: #e6f1f8; }
.supplier-status-muted { color: #64766c; background: #edf1ef; }
.supplier-status-bad { color: #9f3d32; background: #fae9e6; }
.customer-workspace .filter-form {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, .9fr) minmax(160px, .55fr) 96px;
  gap: 12px;
  align-items: end;
}
.customer-workspace .table-scroll {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e3ebe6;
  border-radius: 10px;
}
#customer-table {
  min-width: 980px;
  table-layout: fixed;
}
#customer-table th:nth-child(1), #customer-table td:nth-child(1) { width: 260px; }
#customer-table th:nth-child(2), #customer-table td:nth-child(2) { width: 140px; }
#customer-table th:nth-child(3), #customer-table td:nth-child(3) { width: 160px; }
#customer-table th:nth-child(4), #customer-table td:nth-child(4) { width: 360px; }
#customer-table th:nth-child(5), #customer-table td:nth-child(5) { width: 80px; }
#customer-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  line-height: 1.55;
}
#customer-table td strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-address-cell {
  white-space: nowrap;
}
.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.supplier-editor-panel { position: static; }
.supplier-save-bar {
  position: static;
  margin-top: 18px;
}
.supplier-attachment-panel {
  order: 1;
  min-width: 0;
}
.supplier-attachment-form {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: end;
}
.supplier-attachment-list {
  margin-top: 12px;
}
.supplier-attachment-list li a {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  color: #176447;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.supplier-attachment-list li a:hover { text-decoration: underline; }

/* 供应商库新版：搜索优先、右侧详情抽屉、内容宽度型表单 */
.supplier-page-theme .workspace-header {
  border-right: 0;
  color: #dcebe3;
  background: #153d2f;
  box-shadow: 7px 0 24px rgba(20, 55, 42, .08);
  backdrop-filter: none;
}
.supplier-page-theme .brand {
  color: #fff;
  border-bottom-color: rgba(255,255,255,.12);
  font-family: "Microsoft YaHei UI", "PingFang SC", sans-serif;
  font-size: 19px;
}
.supplier-page-theme .brand span { color: #9fc0b0; }
.supplier-page-theme .workspace-nav a,
.supplier-page-theme .nav-logout { color: #c6d9cf; }
.supplier-page-theme .workspace-nav a.active { color: #163f30; background: #f3f8f5; }
.supplier-page-theme .workspace-nav a:not(.active):hover,
.supplier-page-theme .nav-logout:hover { color: #fff; background: rgba(255,255,255,.08); }

.supplier-directory-workspace { width: min(1540px, calc(100% - 40px)); }
.supplier-directory-title { margin-bottom: 17px; }
.supplier-command-panel,
.supplier-result-panel {
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(38,65,52,.035);
}
.supplier-command-panel {
  display: grid;
  grid-template-columns: minmax(380px, 1fr) auto auto;
  gap: 9px;
  align-items: end;
  padding: 13px;
}
.supplier-command-panel label { gap: 5px; font-size: 12px; }
.supplier-command-panel input { min-height: 38px; padding-block: 7px; }
.supplier-command-actions { display: flex; align-items: center; gap: 7px; }
.supplier-command-actions button { min-height: 38px; box-shadow: none; }
.supplier-command-primary { color: #fff; border-color: #176447; background: #176447; }
.supplier-command-create { justify-content: flex-end; }

.supplier-result-panel { margin-top: 12px; overflow: hidden; }
.supplier-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  border-bottom: 1px solid #e2e9e5;
}
.supplier-result-head strong { color: #234737; font-size: 14px; }
.supplier-result-head span { margin-left: 8px; color: #74827b; font-size: 11px; }
.supplier-result-head small { color: #88948e; font-size: 10px; }
.supplier-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  max-height: calc(100vh - 245px);
  overflow: auto;
  padding: 12px;
  background: #f6f9f7;
}
.supplier-directory-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  min-height: 178px;
  padding: 14px;
  border: 1px solid #dce6e0;
  border-radius: 10px;
  color: #2f493d;
  background: #fff;
  box-shadow: 0 3px 10px rgba(35,70,53,.035);
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.supplier-directory-card:hover,
.supplier-directory-card:focus-visible {
  border-color: #8fbaa5;
  box-shadow: 0 8px 20px rgba(31,92,65,.09);
  transform: translateY(-1px);
  outline: none;
}
.supplier-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; min-width: 0; }
.supplier-card-title { min-width: 0; }
.supplier-card-title strong,
.supplier-card-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-card-title strong { color: #183f2f; font-size: 15px; font-weight: 900; }
.supplier-card-title small { margin-top: 4px; color: #76867d; font-size: 10px; }
.supplier-card-arrow { flex: 0 0 auto; color: #4f816a; font-size: 24px; line-height: 18px; }
.supplier-card-keywords { display: flex; min-height: 26px; flex-wrap: wrap; align-content: flex-start; gap: 5px; }
.supplier-card-keywords em {
  max-width: 150px;
  overflow: hidden;
  padding: 3px 7px;
  border-radius: 999px;
  color: #35604d;
  background: #edf5f0;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.supplier-card-keywords em.empty { color: #86938d; background: #f3f5f4; }
.supplier-card-keywords em.more { color: #176447; background: #dfeee6; }
.supplier-card-meta { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; color: #718179; font-size: 10px; }
.supplier-card-meta i { flex: 0 0 auto; font-style: normal; }
.supplier-card-kpis { display: grid; grid-template-columns: .8fr 1.2fr; gap: 8px; margin-top: auto; padding-top: 10px; border-top: 1px solid #e6ece8; }
.supplier-card-kpis > span { min-width: 0; }
.supplier-card-kpis small,
.supplier-card-kpis strong { display: block; }
.supplier-card-kpis small { color: #7d8b84; font-size: 10px; }
.supplier-card-kpis strong { overflow: hidden; margin-top: 3px; color: #1e563e; font-size: 16px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.supplier-card-empty { grid-column: 1 / -1; padding: 70px 20px !important; color: #7f8d86; text-align: center !important; }
.supplier-directory-table-wrap { max-height: calc(100vh - 292px); overflow: auto; border: 0; border-radius: 0; }
.supplier-directory-table-wrap #supplier-table { width: 100%; min-width: 1240px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.supplier-directory-table-wrap #supplier-table th,
.supplier-directory-table-wrap #supplier-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #e7ece9;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.supplier-directory-table-wrap #supplier-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #5c6d64;
  background: #f3f7f4;
  font-size: 11px;
  font-weight: 900;
}
.supplier-directory-table-wrap #supplier-table tbody tr { cursor: pointer; transition: background .14s ease, box-shadow .14s ease; }
.supplier-directory-table-wrap #supplier-table tbody tr:hover { background: #f8fbf9; box-shadow: inset 3px 0 #176447; }
.supplier-directory-table-wrap #supplier-table tbody tr.is-selected { background: #eaf5ee; box-shadow: inset 3px 0 #176447; }
.supplier-directory-table-wrap #supplier-table th:nth-child(1),
.supplier-directory-table-wrap #supplier-table td:nth-child(1) { width: 270px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(2),
.supplier-directory-table-wrap #supplier-table td:nth-child(2) { width: 330px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(3),
.supplier-directory-table-wrap #supplier-table td:nth-child(3) { width: 92px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(4),
.supplier-directory-table-wrap #supplier-table td:nth-child(4) { width: 145px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(5),
.supplier-directory-table-wrap #supplier-table td:nth-child(5) { width: 130px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(6),
.supplier-directory-table-wrap #supplier-table td:nth-child(6) { width: 112px; }
.supplier-directory-table-wrap #supplier-table th:nth-child(7),
.supplier-directory-table-wrap #supplier-table td:nth-child(7) { width: 72px; }
.supplier-directory-table-wrap #supplier-table td strong,
.supplier-directory-table-wrap #supplier-table td small,
.supplier-table-main { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-directory-table-wrap #supplier-table td strong { color: #1f4b37; font-weight: 900; }
.supplier-directory-table-wrap #supplier-table td small { margin-top: 2px; color: #819087; font-size: 10px; }
.supplier-directory-table-wrap #supplier-table th:first-child,
.supplier-directory-table-wrap #supplier-table td:first-child { position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 #e3eae6; }
.supplier-directory-table-wrap #supplier-table th:first-child { z-index: 3; background: #f3f7f4; }
.supplier-directory-table-wrap #supplier-table tbody tr:hover td:first-child { background: #f8fbf9; }
.supplier-directory-table-wrap #supplier-table tbody tr.is-selected td:first-child { background: #eaf5ee; }
.supplier-table-keywords { display: flex; gap: 5px; overflow: hidden; }
.supplier-table-keywords em { flex: 0 0 auto; max-width: 98px; overflow: hidden; padding: 3px 7px; border: 1px solid #d2e1d8; border-radius: 999px; color: #356049; background: #edf6f0; font-size: 10px; font-style: normal; font-weight: 800; text-overflow: ellipsis; }
.supplier-table-keywords em.empty,
.supplier-table-keywords em.more { color: #6c7b73; border-color: #e0e6e2; background: #f5f7f6; }
.supplier-number-column,
.supplier-money-column { text-align: right !important; }
.supplier-money-column > strong { color: #176447 !important; font-size: 13px; }
.supplier-action-column { text-align: center !important; }
.supplier-sort-button { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; padding: 0; border: 0; color: inherit; background: transparent; font-size: inherit; font-weight: inherit; white-space: nowrap; }
th:not(.supplier-number-column):not(.supplier-money-column) > .supplier-sort-button { justify-content: flex-start; }
.supplier-sort-button span { color: #9aa69f; font-size: 10px; }
.supplier-sort-button.active,
.supplier-sort-button.active span { color: #176447; }
.supplier-row-view { padding: 4px 8px; border: 0; color: #176447; background: transparent; font-size: 11px; font-weight: 900; }
.supplier-directory-pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 47px; padding: 8px 13px; border-top: 1px solid #e7ece9; color: #728179; font-size: 11px; }
.supplier-directory-pagination label { display: flex; align-items: center; gap: 5px; }
.supplier-directory-pagination select,
.supplier-directory-pagination button { min-height: 30px; padding: 4px 8px; border: 1px solid #d0dcd5; border-radius: 6px; color: #466054; background: #fff; box-shadow: none; }
.supplier-directory-pagination button:disabled { color: #aab3ae; background: #f3f5f4; cursor: default; }

body.supplier-drawer-open { overflow: hidden; }
.supplier-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(21,43,33,.28); backdrop-filter: blur(2px); }
.supplier-drawer-backdrop[hidden],
.supplier-directory-drawer[hidden],
.supplier-directory-toast[hidden] { display: none !important; }
.supplier-directory-drawer {
  position: fixed;
  inset: 12px 12px 12px max(calc(var(--sidebar-width) + 64px), 240px);
  z-index: 41;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #d4dfd9;
  border-radius: 12px;
  background: #f5f8f6;
  box-shadow: -20px 0 55px rgba(28,52,41,.22);
  animation: supplier-drawer-in .18s ease-out;
}
.supplier-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 17px;
  border-bottom: 1px solid #dce5e0;
  background: rgba(255,255,255,.98);
}
.supplier-drawer-head > div:first-child { min-width: 0; }
.supplier-drawer-head h2 { overflow: hidden; margin: 0; color: #1b3e30; font-size: 21px; text-overflow: ellipsis; white-space: nowrap; }
.supplier-drawer-head p { margin: 4px 0 0; color: #7c8a83; font-size: 11px; }
.supplier-drawer-actions { display: flex; flex: 0 0 auto; gap: 7px; }
.supplier-drawer-actions button { min-height: 36px; padding: 7px 12px; box-shadow: none; }
.supplier-drawer-body { overflow: auto; padding: 13px; }
.supplier-cooperation-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.supplier-cooperation-overview > div { min-width: 0; padding: 13px 14px; border: 1px solid #d8e4dd; border-radius: 9px; background: #fff; }
.supplier-cooperation-overview span,
.supplier-cooperation-overview strong { display: block; }
.supplier-cooperation-overview span { color: #75857d; font-size: 10px; font-weight: 800; }
.supplier-cooperation-overview strong { overflow: hidden; margin-top: 6px; color: #1f553e; font-size: 18px; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; }
.supplier-detail-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.supplier-cooperation-overview + .supplier-detail-grid { margin-top: 8px; }
.supplier-detail-card { min-width: 0; padding: 12px; border: 1px solid #dce6e0; border-radius: 8px; background: #fff; }
.supplier-detail-card.supplier-detail-wide { grid-column: span 2; }
.supplier-detail-card > span { color: #75857d; font-size: 10px; font-weight: 800; }
.supplier-detail-card > strong { display: block; overflow: hidden; margin-top: 5px; color: #29483a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.supplier-drawer-section { margin-top: 10px; padding: 13px; border: 1px solid #dce6e0; border-radius: 9px; background: #fff; }
.supplier-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.supplier-section-head h3 { margin: 0; color: #234737; font-size: 14px; }
.supplier-section-head span { color: #819087; font-size: 10px; }
.supplier-keyword-list { display: flex; flex-wrap: wrap; gap: 6px; }
.supplier-keyword-list span { padding: 4px 8px; border: 1px solid #cfe0d6; border-radius: 999px; color: #315e49; background: #eef6f1; font-size: 11px; font-weight: 800; }
.supplier-keyword-list em { color: #819087; font-size: 12px; font-style: normal; }
.supplier-notes { margin: 10px 0 0; color: #53675d; font-size: 12px; line-height: 1.7; white-space: pre-wrap; }
.supplier-cooperation-table-wrap { overflow: auto; border: 1px solid #e0e8e3; border-radius: 7px; }
.supplier-cooperation-table { width: 100%; min-width: 1180px; border-collapse: collapse; font-size: 11px; }
.supplier-cooperation-table th,
.supplier-cooperation-table td { max-width: 190px; overflow: hidden; padding: 8px 9px; border-bottom: 1px solid #e7ede9; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.supplier-cooperation-table th { position: sticky; top: 0; z-index: 1; color: #5b6f65; background: #f1f6f3; font-size: 10px; font-weight: 900; }
.supplier-cooperation-table tbody tr:last-child td { border-bottom: 0; }
.supplier-cooperation-table td strong { color: #214c39; }
.supplier-return-status { display: inline-flex; padding: 2px 6px; border-radius: 999px; color: #4f6b5d; background: #eef4f0; font-size: 10px; font-weight: 800; }
.supplier-return-status.partial,
.supplier-return-status.full { color: #a44235; background: #fff0ed; }
.supplier-return-status.processing { color: #9a6a1c; background: #fff6df; }
.supplier-cooperation-empty { padding: 32px 16px; color: #819087; text-align: center; }
.supplier-cooperation-empty.error { color: #b8473a; }
.supplier-directory-attachment-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.supplier-directory-attachment-list li { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 10px; align-items: center; min-height: 37px; padding: 7px 9px; border-radius: 6px; background: #f4f8f5; font-size: 11px; }
.supplier-directory-attachment-list a { overflow: hidden; color: #176447; font-weight: 900; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.supplier-directory-attachment-list a:hover { text-decoration: underline; }
.supplier-directory-attachment-list span { color: #819087; }
.supplier-attachment-empty { color: #819087; font-size: 12px; }

.supplier-directory-form label { gap: 5px; font-size: 11px; }
.supplier-directory-form input,
.supplier-directory-form select,
.supplier-directory-form textarea { min-height: 36px; padding: 7px 9px; border-radius: 6px; }
.supplier-directory-form textarea { min-height: 72px; }
.supplier-editor-section:first-of-type { margin-top: 0; }
.supplier-directory-form .supplier-core-row,
.supplier-directory-form .supplier-contact-row,
.supplier-directory-form .supplier-location-row {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 9px;
}
.supplier-directory-form .supplier-core-row > label:nth-child(1) { flex: 0 0 300px; }
.supplier-directory-form .supplier-core-row > label:nth-child(2) { flex: 0 0 360px; }
.supplier-directory-form .supplier-core-row > label:nth-child(3) { flex: 0 0 160px; }
.supplier-directory-form .supplier-contact-row { margin-top: 9px; }
.supplier-directory-form .supplier-contact-row > label:nth-child(1) { flex: 0 0 130px; }
.supplier-directory-form .supplier-contact-row > label:nth-child(2) { flex: 0 0 130px; }
.supplier-directory-form .supplier-contact-row > label:nth-child(3) { flex: 0 0 170px; }
.supplier-directory-form .supplier-contact-row > label:nth-child(4) { flex: 0 0 170px; }
.supplier-directory-form .supplier-contact-row > label:nth-child(5) { flex: 0 0 280px; }
.supplier-directory-form .supplier-location-row { margin-top: 9px; }
.supplier-directory-form .supplier-location-row > label:nth-child(1) { flex: 0 0 220px; }
.supplier-directory-form .supplier-location-row > label:nth-child(2) { flex: 0 0 320px; }
.supplier-directory-form .supplier-full-row { display: grid; width: min(700px, 100%); gap: 9px; margin-top: 9px; }
.supplier-profile-details { margin-bottom: 10px; border: 1px solid #d8e4dd; border-radius: 8px; background: #fff; }
.supplier-profile-details > summary { padding: 12px; color: #27533f; font-size: 12px; font-weight: 900; cursor: pointer; }
.supplier-profile-details > .supplier-profile-drop-zone { min-height: 86px; margin: 0 12px 12px; }
.supplier-profile-details > .order-message,
.supplier-profile-details > .supplier-profile-preview { margin-inline: 12px; }
.supplier-profile-details > .supplier-profile-preview { margin-bottom: 12px; }
.supplier-attachment-upload-row { display: grid; grid-template-columns: 190px minmax(260px, 1fr) auto; gap: 8px; align-items: end; }
.supplier-attachment-upload-row .attachment-drop-zone { min-height: 38px; padding: 7px 10px; }
.supplier-attachment-upload-row button { min-height: 38px; }
.supplier-drawer-save {
  position: sticky;
  bottom: -13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px -13px -13px;
  padding: 11px 14px;
  border-top: 1px solid #dce5e0;
  background: rgba(255,255,255,.97);
}
.supplier-drawer-save > div { display: flex; gap: 7px; }
.supplier-drawer-save button { min-height: 36px; padding: 7px 12px; box-shadow: none; }
.supplier-directory-toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translateX(-50%); padding: 9px 14px; border-radius: 7px; color: #fff; background: #214c39; box-shadow: 0 8px 28px rgba(22,50,37,.2); font-size: 12px; font-weight: 800; }
@keyframes supplier-drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1180px) {
  .supplier-command-panel { grid-template-columns: minmax(300px, 1fr) auto; }
  .supplier-command-create { grid-column: 1 / -1; }
  .supplier-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .supplier-directory-drawer { inset: 8px; }
  .supplier-command-panel { grid-template-columns: 1fr; }
  .supplier-command-create { grid-column: auto; justify-content: flex-start; }
  .supplier-card-grid { grid-template-columns: 1fr; }
  .supplier-cooperation-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .supplier-directory-form .supplier-core-row > label,
  .supplier-directory-form .supplier-contact-row > label,
  .supplier-directory-form .supplier-location-row > label { flex: 1 1 220px; }
  .supplier-attachment-upload-row { grid-template-columns: 1fr; }
}

/* 客户库新版：搜索优先、单行列表、右侧详情抽屉 */
.customer-directory-workspace { width: min(1500px, calc(100% - 40px)); }
.customer-directory-title { margin-bottom: 18px; }
.customer-command-panel {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(38,65,52,.035);
}
.customer-command-panel > label { display: grid; gap: 6px; min-width: 0; color: #4f6359; font-size: 11px; font-weight: 800; }
.customer-command-panel input {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd8d1;
  border-radius: 6px;
  color: #2e4338;
  background: #fff;
}
.customer-command-actions { display: flex; gap: 7px; }
.customer-command-actions button, .customer-command-create { min-height: 38px; padding: 8px 13px; box-shadow: none; }
.customer-command-primary { color: #fff; border-color: #176447; background: #176447; }
.customer-command-create { justify-self: end; }
.customer-result-panel {
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(38,65,52,.035);
}
.customer-result-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-bottom: 1px solid #e2e9e5; }
.customer-result-head strong { color: #234737; font-size: 14px; }
.customer-result-head span { margin-left: 8px; color: #718078; font-size: 11px; }
.customer-result-head small { color: #88948e; font-size: 10px; }
.customer-hierarchy-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 43px;
  padding: 9px 14px;
  border-bottom: 1px solid #e6ece8;
  color: #91a098;
  background: #fbfcfb;
  font-size: 11px;
}
.customer-hierarchy-breadcrumb button {
  padding: 4px 7px;
  border: 0;
  border-radius: 5px;
  color: #2a674c;
  background: transparent;
  font-size: 11px;
  font-weight: 850;
  box-shadow: none;
}
.customer-hierarchy-breadcrumb button:hover { background: #eaf3ee; }
.customer-hierarchy-breadcrumb strong { color: #435c50; font-size: 11px; }
.customer-hierarchy-view { min-height: 260px; max-height: calc(100vh - 288px); overflow: auto; padding: 14px; }
.customer-organization-tree { display: grid; gap: 8px; }
.customer-tree-node { min-width: 0; }
.customer-group-node {
  overflow: hidden;
  border: 1px solid #dce7e1;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(36,67,52,.035);
}
.customer-group-node.is-expanded { border-color: #b8d2c4; box-shadow: 0 7px 18px rgba(36,67,52,.07); }
.customer-tree-row {
  display: grid;
  grid-template-columns: 24px 46px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 50px;
  gap: 9px;
  padding: 8px 13px;
  border: 0;
  border-radius: 0;
  color: #314b3e;
  background: transparent;
  text-align: left;
  box-shadow: none;
}
.customer-tree-row:hover { background: #f5f9f7; }
.customer-group-row { min-height: 58px; padding-inline: 15px; }
.customer-group-node.is-expanded > .customer-group-row { background: #edf5f1; }
.customer-tree-toggle {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid #c4d8cd;
  border-radius: 5px;
  color: #256548;
  background: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.customer-tree-level {
  color: #7a8c82;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
}
.customer-tree-copy { display: grid; min-width: 0; gap: 2px; }
.customer-tree-copy strong {
  overflow: hidden;
  color: #214c39;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-group-row .customer-tree-copy strong { font-size: 15px; }
.customer-tree-copy small {
  overflow: hidden;
  color: #84928b;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-tree-count { color: #687b70; font-size: 10px; font-weight: 750; white-space: nowrap; }
.customer-tree-branch { position: relative; display: grid; }
.customer-company-branch { padding: 5px 8px 8px 35px; border-top: 1px solid #e1eae5; background: #fbfdfc; }
.customer-company-branch::before,
.customer-project-branch::before {
  position: absolute;
  inset: 0 auto 7px 20px;
  width: 1px;
  content: "";
  background: #d6e4dc;
}
.customer-company-node + .customer-company-node { border-top: 1px solid #edf2ef; }
.customer-company-row { min-height: 48px; }
.customer-company-node.is-expanded > .customer-company-row { background: #f0f6f3; }
.customer-project-branch { margin-left: 25px; padding: 4px 0 7px 18px; }
.customer-project-branch::before { left: 7px; }
.customer-project-node + .customer-project-node { border-top: 1px solid #edf2ef; }
.customer-project-row { min-height: 44px; grid-template-columns: 24px 46px minmax(0, 1fr) auto; }
.customer-project-node.is-expanded > .customer-project-row { background: #f6faf8; }
.customer-tree-people { display: grid; gap: 6px; padding: 5px 10px 10px 79px; background: #f6faf8; }
.customer-tree-people .customer-person-card { min-height: 62px; box-shadow: none; }
.customer-hierarchy-grid { display: grid; gap: 10px; }
.customer-group-grid { grid-template-columns: repeat(2, minmax(320px, 1fr)); }
.customer-company-grid, .customer-project-grid { grid-template-columns: repeat(3, minmax(240px, 1fr)); }
.customer-hierarchy-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 86px;
  padding: 13px 14px;
  overflow: hidden;
  border: 1px solid #d9e4de;
  border-radius: 9px;
  color: #314b3e;
  background: #fff;
  text-align: left;
  box-shadow: 0 5px 16px rgba(36,67,52,.035);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.customer-hierarchy-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: #2b7353;
}
.customer-hierarchy-card:hover {
  border-color: #aac9b9;
  box-shadow: 0 9px 24px rgba(32,71,52,.09);
  transform: translateY(-1px);
}
.customer-group-card { grid-template-columns: minmax(0, 1fr) auto; min-height: 108px; padding: 15px 16px; }
.customer-hierarchy-index {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  color: #28664b;
  background: #eef5f1;
  font-size: 11px;
  font-weight: 900;
}
.customer-hierarchy-card-copy { display: grid; min-width: 0; gap: 4px; font-style: normal; }
.customer-hierarchy-card-copy > small { overflow: hidden; color: #84928b; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-hierarchy-card-copy > strong { overflow: hidden; color: #1e4936; font-size: 14px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.customer-group-card .customer-hierarchy-card-copy > strong { font-size: 16px; }
.customer-hierarchy-card-copy > em { color: #6e7f76; font-size: 11px; font-style: normal; }
.customer-hierarchy-arrow { color: #7ea18f; font-size: 25px; font-weight: 400; line-height: 1; }
.customer-card-list { display: grid; gap: 7px; }
.customer-person-card {
  display: grid;
  grid-template-columns: minmax(230px, 1.2fr) minmax(320px, 1.6fr) 150px 62px;
  align-items: center;
  gap: 14px;
  min-height: 70px;
  padding: 10px 12px;
  border: 1px solid #e0e8e3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}
.customer-person-card:hover { border-color: #b8d1c4; background: #fbfdfc; }
.customer-person-main, .customer-person-meta, .customer-person-updated { min-width: 0; }
.customer-person-main { display: grid; gap: 2px; }
.customer-person-main small { overflow: hidden; color: #87958e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.customer-person-main strong { color: #214c39; font-size: 14px; }
.customer-person-main > span { overflow: hidden; color: #687970; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-person-meta { display: grid; grid-template-columns: minmax(120px, .7fr) minmax(180px, 1.3fr); gap: 12px; }
.customer-person-meta > span { display: grid; min-width: 0; gap: 3px; color: #89958f; font-size: 9px; }
.customer-person-meta b { overflow: hidden; color: #41594d; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-person-updated { display: grid; gap: 3px; color: #64766c; font-size: 10px; }
.customer-person-updated small { color: #89958f; font-size: 9px; }
.customer-hierarchy-empty { display: grid; place-items: center; min-height: 230px; color: #798981; font-size: 12px; text-align: center; }
.customer-directory-table-wrap { max-height: calc(100vh - 245px); overflow: auto; }
.customer-directory-workspace #customer-table { width: 100%; min-width: 1080px; table-layout: fixed; border-collapse: collapse; font-size: 12px; }
.customer-directory-workspace #customer-table th,
.customer-directory-workspace #customer-table td { padding: 10px 11px; border-bottom: 1px solid #e7ece9; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.customer-directory-workspace #customer-table th { position: sticky; top: 0; z-index: 1; color: #5c6d64; background: #f3f7f4; font-size: 11px; font-weight: 900; }
.customer-directory-workspace #customer-table tbody tr { cursor: pointer; }
.customer-directory-workspace #customer-table tbody tr:hover { background: #f8fbf9; }
.customer-directory-workspace #customer-table th:nth-child(1),
.customer-directory-workspace #customer-table td:nth-child(1) { width: 300px; }
.customer-directory-workspace #customer-table th:nth-child(2),
.customer-directory-workspace #customer-table td:nth-child(2) { width: 125px; }
.customer-directory-workspace #customer-table th:nth-child(3),
.customer-directory-workspace #customer-table td:nth-child(3) { width: 160px; }
.customer-directory-workspace #customer-table th:nth-child(4),
.customer-directory-workspace #customer-table td:nth-child(4) { width: 335px; }
.customer-directory-workspace #customer-table th:nth-child(5),
.customer-directory-workspace #customer-table td:nth-child(5) { width: 135px; }
.customer-directory-workspace #customer-table th:nth-child(6),
.customer-directory-workspace #customer-table td:nth-child(6) { width: 72px; }
.customer-directory-workspace #customer-table td strong { color: #1f4b37; font-weight: 900; }
.customer-directory-address { white-space: nowrap; }
.customer-phone-copy { padding: 2px 0; border: 0; color: #276c4e; background: transparent; font-size: 12px; font-weight: 800; }
.customer-phone-copy:hover { text-decoration: underline; }
.customer-row-view { padding: 4px 8px; border: 0; color: #176447; background: transparent; font-size: 11px; font-weight: 900; }
.customer-directory-empty { padding: 48px 16px !important; color: #7c8b83; text-align: center !important; }
body.customer-drawer-open { overflow: hidden; }
.customer-drawer-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(21,43,33,.28); backdrop-filter: blur(2px); }
.customer-drawer-backdrop[hidden],
.customer-directory-drawer[hidden],
.customer-directory-toast[hidden] { display: none !important; }
.customer-directory-drawer {
  position: fixed;
  inset: 12px 12px 12px max(calc(var(--sidebar-width) + 64px), 270px);
  z-index: 41;
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid #d4dfd9;
  border-radius: 12px;
  background: #f5f8f6;
  box-shadow: -20px 0 55px rgba(28,52,41,.22);
  animation: customer-directory-drawer-in .18s ease-out;
}
.customer-drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 17px; border-bottom: 1px solid #dce5e0; background: rgba(255,255,255,.98); }
.customer-drawer-head h2 { margin: 0; color: #1b3e30; font-size: 21px; }
.customer-drawer-head p { margin: 4px 0 0; color: #7c8a83; font-size: 10px; }
.customer-drawer-actions { display: flex; gap: 7px; }
.customer-drawer-actions button { min-height: 36px; padding: 7px 12px; box-shadow: none; }
.customer-drawer-body { overflow: auto; padding: 14px; }
.customer-detail-grid { display: grid; grid-template-columns: minmax(320px, 1fr) 180px 220px; gap: 9px; }
.customer-detail-card { min-width: 0; padding: 13px; border: 1px solid #dce6e0; border-radius: 8px; background: #fff; }
.customer-detail-card > span { color: #75857d; font-size: 10px; font-weight: 800; }
.customer-detail-card > strong { display: block; overflow: hidden; margin-top: 6px; color: #29483a; font-size: 13px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.customer-detail-notes { grid-column: 1 / span 2; }
.customer-detail-address { grid-column: 3; }
.customer-detail-notes > strong, .customer-detail-address > strong { white-space: normal; }
.customer-inline-copy { margin-left: 8px; padding: 2px 6px; border: 0; border-radius: 4px; color: #176447; background: #e8f3ec; font-size: 10px; font-weight: 900; }
.customer-directory-form { display: grid; gap: 10px; }
.customer-editor-section { padding: 15px; border: 1px solid #dce6e0; border-radius: 9px; background: #fff; }
.customer-editor-section h3 { margin: 0 0 12px; color: #234737; font-size: 14px; }
.customer-editor-grid { display: grid; grid-template-columns: minmax(320px, 360px) 180px 200px; gap: 11px; align-items: start; }
.customer-editor-grid > * { min-width: 0; }
.customer-directory-form label { display: grid; gap: 6px; color: #4f6359; font-size: 11px; font-weight: 800; }
.customer-directory-form input, .customer-directory-form textarea {
  width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cbd8d1; border-radius: 6px; color: #2e4338; background: #fff; outline: none;
}
.customer-directory-form input:focus, .customer-directory-form textarea:focus { border-color: #579276; box-shadow: 0 0 0 3px rgba(46,121,86,.09); }
.customer-directory-form textarea { height: 84px; min-height: 84px; resize: vertical; }
.customer-project-input-wrap { position: relative; display: block; }
.customer-project-suggestions {
  position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; right: 0; display: grid; max-height: 250px; overflow: auto;
  padding: 5px; border: 1px solid #cfdcd5; border-radius: 7px; background: #fff; box-shadow: 0 12px 30px rgba(30,60,46,.14);
}
.customer-project-suggestions[hidden] { display: none !important; }
.customer-project-suggestions button { display: grid; gap: 2px; width: 100%; padding: 8px 9px; border: 0; border-radius: 5px; color: #28513f; background: transparent; text-align: left; }
.customer-project-suggestions button:hover { background: #eef5f1; }
.customer-project-suggestions small { color: #829087; font-size: 10px; }
.customer-project-existing-row { grid-column: 1 / -1; }
.customer-project-existing-row:empty { display: none; }
.customer-project-hierarchy { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; padding: 11px; border: 1px solid #dce6e0; border-radius: 8px; background: #f8faf9; }
.customer-project-hierarchy > label { min-width: 0; }
.customer-existing-project, .customer-new-project-hint, .customer-similar-project-warning { width: min(762px, 100%); padding: 11px 12px; border: 1px solid #cfe0d7; border-radius: 7px; color: #395d4c; background: #eff6f2; }
.customer-existing-project strong { display: block; margin-bottom: 7px; font-size: 11px; }
.customer-existing-project > div { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-existing-project span { padding: 4px 8px; border-radius: 999px; color: #285b43; background: #fff; font-size: 11px; font-weight: 800; }
.customer-new-project-hint { color: #6e7c74; border-color: #dde5e0; background: #f6f8f7; font-size: 11px; }
.customer-similar-project-warning { color: #754c19; border-color: #e3c58f; background: #fff8e9; }
.customer-similar-project-warning > strong { display: block; margin-bottom: 7px; font-size: 11px; }
.customer-similar-project-warning > div { display: flex; flex-wrap: wrap; gap: 6px; }
.customer-similar-project-warning button { padding: 5px 8px; border: 1px solid #d8b874; border-radius: 6px; color: #704812; background: #fff; font-size: 11px; font-weight: 800; text-align: left; }
.customer-similar-project-warning button:hover { border-color: #bd944a; background: #fff4d7; }
.customer-similar-project-warning small { display: block; margin-top: 7px; color: #92713f; font-size: 10px; }
.customer-notes-field { grid-column: 1 / span 2; }
.customer-address-field { grid-column: 3; }
.customer-drawer-save { position: sticky; bottom: -14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px -14px -14px; padding: 11px 14px; border-top: 1px solid #dce5e0; background: rgba(255,255,255,.97); }
.customer-drawer-save > span { color: #a13f34; font-size: 11px; }
.customer-drawer-save > div { display: flex; gap: 7px; }
.customer-drawer-save button { min-height: 36px; padding: 7px 12px; box-shadow: none; }
.customer-directory-toast { position: fixed; left: 50%; bottom: 28px; z-index: 80; transform: translateX(-50%); padding: 9px 14px; border-radius: 7px; color: #fff; background: #214c39; box-shadow: 0 8px 28px rgba(22,50,37,.2); font-size: 12px; font-weight: 800; }
@keyframes customer-directory-drawer-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: translateX(0); } }
@media (max-width: 1180px) {
  .customer-command-panel { grid-template-columns: minmax(300px, 1fr) auto auto; }
  .customer-company-grid, .customer-project-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .customer-person-card { grid-template-columns: minmax(220px, 1.1fr) minmax(300px, 1.4fr) 62px; }
  .customer-person-updated { display: none; }
  .customer-detail-grid { grid-template-columns: minmax(280px, 1fr) 180px; }
  .customer-detail-address { grid-column: 2; }
  .customer-editor-grid { grid-template-columns: minmax(300px, 1fr) 180px; }
  .customer-project-hierarchy { grid-template-columns: 1fr; }
  .customer-editor-grid > label:nth-child(3) { grid-column: 1; }
  .customer-notes-field { grid-column: 1; }
  .customer-address-field { grid-column: 2; }
  #stats-detail-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .supplier-library-layout { grid-template-columns: 1fr; }
  .supplier-editor-panel { position: static; }
}

@media (max-width: 900px) {
  .workspace-page { padding-left: 0; }
  .workspace-header {
    position: sticky; top: 0; inset: auto; flex-direction: row; align-items: center; justify-content: space-between;
    width: auto; min-height: 64px; padding: 0 18px; border-right: 0; border-bottom: 1px solid #dbe1de;
  }
  .brand { display: block; margin: 0; padding: 0; border-bottom: 0; }
  .brand span { margin-left: 8px; }
  .workspace-nav { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 5px; }
  .workspace-nav a, .nav-logout { width: auto; min-height: 34px; padding: 8px 10px; }
  .nav-badge { margin-left: 6px; }
  .nav-logout { margin-top: 0; }
}

@media (max-width: 1020px) {
  .field-grid, .order-grid, .item-grid, .quote-grid, .supplier-group-grid, .supplier-group-file-grid, .search-filter-grid, .supplier-search-form, .supplier-attachment-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-type-grid,
  .export-filter-grid,
  .export-help-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .export-material-filter { grid-column: span 2; }
  .export-actions { grid-template-columns: 1fr; }
  .export-action-buttons { justify-content: flex-start; }
  .entry-workspace .order-grid,
  .entry-workspace .supplier-group-grid,
  .entry-workspace .item-grid,
  .entry-workspace .quick-import-section { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-workspace .quote-import-section,
  .quote-workspace .manual-material-grid,
  .quote-workspace .inline-quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-workspace .manual-material-row { grid-template-columns: 62px minmax(0, 1fr); }
  .quote-workspace .manual-material-remove { grid-column: 2; justify-self: start; }
  .manual-material-grid { grid-template-columns: minmax(240px, 1.5fr) minmax(160px, 1fr) minmax(90px, .55fr) minmax(100px, .65fr); }
  .span-2 { grid-column: span 2; }
  .dashboard-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-order-form, .history-item-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-save { grid-column: span 2; }
  .requirement-card-head { grid-template-columns: 32px minmax(180px, 1fr) minmax(120px, .8fr) 72px 72px; }
  .requirement-card-head span:nth-child(5) { grid-column: 2 / 4; }
  .requirement-edit-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .requirement-edit-actions { justify-content: flex-start; }
  .inline-quote-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .quote-workspace .inline-quote-wide { grid-column: span 2; }
  .material-search-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-search-form button { justify-self: start; min-width: 92px; }
  .stats-v2-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-v2-project-field { grid-column: span 2; }
  .stats-v2-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #stats-detail-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats-v2-projects { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-v2-detail-layout { grid-template-columns: 1fr; }
  .stats-payment-account-row > summary { grid-template-columns: minmax(180px, 1.2fr) minmax(120px, .7fr) minmax(80px, .4fr) minmax(150px, .8fr); }
}
@media (max-width: 720px) {
  .customer-tree-row { grid-template-columns: 24px 40px minmax(0, 1fr); }
  .customer-tree-count { grid-column: 3; }
  .customer-company-branch { padding-left: 20px; }
  .customer-project-branch { margin-left: 10px; padding-left: 12px; }
  .customer-tree-people { padding-left: 12px; }
  .customer-group-grid,
  .customer-company-grid,
  .customer-project-grid { grid-template-columns: 1fr; }
  .customer-person-card { grid-template-columns: 1fr auto; }
  .customer-person-meta { grid-column: 1 / -1; }
  .auth-shell { grid-template-columns: 1fr; gap: 35px; padding: 48px 23px; }
  .auth-card { padding: 28px 22px; }
  .auth-intro h1 { font-size: 44px; }
  .brand span { display: none; }
  .workspace { width: min(100% - 28px, 1320px); padding-top: 29px; }
  .page-title { display: grid; gap: 16px; }
  .record-meta { width: 100%; }
  .form-section { padding: 19px 15px; }
  .field-grid, .order-grid, .item-grid, .quote-grid, .supplier-group-grid, .supplier-group-file-grid, .search-filter-grid, .supplier-search-form, .supplier-attachment-form { grid-template-columns: 1fr; }
  .export-form,
  .export-type-grid,
  .export-filter-grid,
  .export-help-cards { grid-template-columns: 1fr; }
  .export-material-filter { grid-column: auto; }
  .export-step-heading,
  .export-step-divider { align-items: flex-start; }
  .export-action-buttons { flex-direction: column; }
  .export-action-buttons button { width: 100%; }
  .entry-workspace .order-grid,
  .entry-workspace .supplier-group-grid,
  .entry-workspace .item-grid,
  .entry-workspace .quick-import-section { grid-template-columns: 1fr; }
  .quote-workspace .quote-import-section,
  .quote-workspace .manual-material-grid,
  .quote-workspace .inline-quote-grid { grid-template-columns: 1fr; }
  .quote-workspace .quote-manual-combined-section .section-heading-row { align-items: flex-start; flex-direction: column; }
  .quote-workspace .quote-add-material-button { margin-left: 40px; }
  .quote-workspace .quote-supplier-subsection { flex-direction: column; }
  .quote-workspace .manual-material-row { grid-template-columns: 1fr; }
  .quote-workspace .manual-material-remove { grid-column: auto; }
  .manual-material-grid { grid-template-columns: 1fr; }
  .stats-v2-filter,
  .stats-v2-summary,
  .stats-v2-projects { grid-template-columns: 1fr; }
  #stats-detail-summary { grid-template-columns: 1fr; }
  .stats-v2-project-field { grid-column: auto; }
  .stats-v2-detail-title { align-items: flex-start; flex-wrap: wrap; }
  .stats-v2-scope { margin-left: 0; }
  .stats-v2-payment-panel { grid-template-columns: 1fr; justify-items: center; }
  .stats-v2-payment-filters { width: 100%; }
  .stats-payment-account-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-payment-account-row > summary { grid-template-columns: 1fr 1fr; }
  .stats-v2-table-tools { align-items: stretch; flex-direction: column; }
  .stats-v2-table-tools input { width: 100%; }
  .stats-export-actions { width: 100%; margin-left: 47px; }
  .stats-selection-toolbar { align-items: stretch; flex-direction: column; }
  .stats-selection-toolbar small { white-space: normal; }
  .stats-selection-actions { flex-wrap: wrap; }
  .stats-export-backdrop { inset: 0; }
  .stats-export-panel { width: 100%; }
  .stats-export-scopes,
  .stats-export-purpose { grid-template-columns: 1fr; }
  .stats-export-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats-export-footer { align-items: stretch; flex-direction: column; }
  .stats-export-footer > div { justify-content: flex-end; }
  .span-2 { grid-column: auto; }
  .entry-workspace .order-notes-field { grid-column: auto; width: 100%; }
  .requirement-card-head { grid-template-columns: 32px 1fr; }
  .requirement-card-head span:nth-child(n+3) { grid-column: 2 / -1; }
  .edit-requirement-button { grid-column: 2 / -1; justify-self: start; }
  .delete-requirement-button { grid-column: 2 / -1; justify-self: start; }
  .requirement-edit-form { grid-template-columns: 1fr; }
  .requirement-edit-actions { align-items: stretch; flex-direction: column; }
  .requirement-edit-actions button { width: 100%; }
  .inline-quote-grid { grid-template-columns: 1fr; }
  .inline-quote-wide { grid-column: auto; }
  .quote-workspace .inline-quote-wide { grid-column: auto; }
  .section-heading-row { align-items: flex-start; }
  .supplier-group-head { align-items: flex-start; flex-direction: column; }
  .secondary-button { white-space: nowrap; }
  .save-bar { align-items: stretch; flex-direction: column; bottom: 7px; }
  .save-bar button { width: 100%; }
  .search-box { grid-template-columns: 1fr; }
  .batch-search-form { grid-template-columns: 1fr; }
  .batch-search-form button { width: 100%; }
  .result-pagination { justify-content: flex-start; flex-wrap: wrap; }
  .material-search-form { grid-template-columns: 1fr; }
  .material-search-form button { width: 100%; }
  .history-results-heading, .history-result-card { align-items: flex-start; grid-template-columns: 1fr; }
  .supplier-quote-group-head { align-items: flex-start; flex-direction: column; }
  .supplier-quote-card { grid-template-columns: 1fr; }
  .supplier-library-candidate-list { grid-template-columns: 1fr; }
  .supplier-library-candidate-card dl { grid-template-columns: 1fr; }
  .supplier-profile-preview-head { align-items: flex-start; flex-direction: column; }
  .supplier-profile-fields { grid-template-columns: 1fr; }
  .quote-wide { grid-column: auto !important; }
  .quote-rank { place-items: start; padding: 8px 10px; }
  .dashboard-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-order-head { align-items: stretch; flex-direction: column; }
  .dashboard-order-actions { justify-content: space-between; white-space: normal; }
  .reminder-group-summary { grid-template-columns: 105px minmax(180px, 1fr) minmax(150px, 1fr) 62px; }
  .reminder-group-types, .reminder-group-deadline { display: none; }
  .reminder-group-item { grid-template-columns: 1fr; }
  .reminder-actions-inline { justify-content: flex-start; width: auto; }
  .reminder-detail-grid-compact { grid-template-columns: 1fr 1fr; }
  .reminder-card { grid-template-columns: 1fr; }
  .reminder-detail-grid { grid-template-columns: 1fr 1fr; }
  .history-result-meta { justify-content: flex-start; }
  .import-title { align-items: flex-start; }
  .import-actions { justify-items: start; }
  .batch-banner { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .issue-heading { align-items: flex-start; flex-direction: column; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .detail-grid .detail-wide { grid-column: span 2; }
  .history-order-form, .history-item-fields { grid-template-columns: 1fr; }
  .history-save { grid-column: auto; align-items: stretch; flex-direction: column; }
  .history-save button { width: 100%; }
}
@media (max-width: 450px) {
  .workspace-nav a, .nav-logout { padding: 8px 8px; font-size: 13px; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-grid .detail-wide { grid-column: auto; }
  .record-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .reminder-detail-grid { grid-template-columns: 1fr; }
  .reminder-group-summary { grid-template-columns: 88px minmax(0, 1fr) 58px; gap: 8px; }
  .reminder-group-material { display: none; }
  .reminder-group-item { padding: 12px; }
  .reminder-item-heading { align-items: flex-start; flex-wrap: wrap; }
  .reminder-item-heading > span:last-child { width: 100%; }
  .reminder-actions-inline button, .reminder-actions-inline a { flex: 1 1 120px; }
}
.quote-candidate-box {
  margin-top: 10px;
}

.quote-candidate-hint,
.quote-candidate-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cde7d8;
  border-radius: 10px;
  background: #f2fbf5;
  color: #14532d;
  font-size: 13px;
}

.quote-candidate-panel {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.quote-candidate-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.quote-candidate-table {
  display: grid;
  gap: 0;
}

.quote-candidate-row {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr 90px 1.3fr 76px;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f7;
  font-size: 12px;
}

.quote-candidate-row:last-child {
  border-bottom: 0;
}

.quote-candidate-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-link-review-panel {
  margin-top: 12px;
}

.audit-workspace { max-width: 1540px; }
.audit-filter-panel { margin-bottom: 16px; }
.audit-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr)) minmax(220px, 1.4fr) auto auto;
  gap: 10px;
  align-items: end;
}
.audit-filter-grid label {
  display: grid;
  gap: 5px;
  color: #53665c;
  font-size: 12px;
  font-weight: 800;
}
.audit-filter-grid input,
.audit-filter-grid select {
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid #cbd7d0;
  border-radius: 8px;
  background: #fff;
}
.audit-summary {
  display: grid;
  grid-template-columns: 140px 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.audit-summary article {
  padding: 14px 16px;
  border: 1px solid #d7e4dc;
  border-radius: 12px;
  background: #fbfdfa;
}
.audit-summary strong {
  display: block;
  color: #173f2e;
  font-size: 18px;
  line-height: 1.35;
}
.audit-summary span {
  display: block;
  margin-top: 4px;
  color: #708176;
  font-size: 12px;
  font-weight: 800;
}
.boss-board {
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid #d7e4dc;
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdfa 0%, #f5faf7 100%);
}
.boss-board .panel-heading {
  margin-bottom: 12px;
}
.boss-board .panel-heading h2 {
  margin: 0;
  color: #173f2e;
  font-size: 18px;
}
.boss-board .panel-heading p {
  margin: 4px 0 0;
  color: #6e8076;
  font-size: 12px;
}
.boss-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.boss-metric-grid article {
  padding: 12px;
  border: 1px solid #dce8e0;
  border-radius: 12px;
  background: #fff;
}
.boss-metric-grid strong {
  display: block;
  color: #0f3d2b;
  font-size: 20px;
  line-height: 1.25;
}
.boss-metric-grid span {
  display: block;
  margin-top: 4px;
  color: #708176;
  font-size: 12px;
  font-weight: 800;
}
.boss-board-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 12px;
}
.boss-board-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dce8e0;
  border-radius: 12px;
  background: #fff;
}
.boss-board-card h3 {
  margin: 0 0 10px;
  color: #173f2e;
  font-size: 14px;
}
.boss-rank-list,
.boss-recent-list {
  display: grid;
  gap: 7px;
}
.boss-rank-row {
  display: grid;
  grid-template-columns: minmax(100px, 1.2fr) repeat(4, minmax(64px, .65fr)) minmax(84px, .8fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6faf7;
  color: #2f4439;
  font-size: 12px;
}
.boss-rank-row strong {
  color: #163d2d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boss-rank-row span,
.boss-rank-row small {
  color: #5d7066;
  white-space: nowrap;
}
.boss-recent-row {
  display: grid;
  grid-template-columns: 58px 72px 110px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6faf7;
  font-size: 12px;
}
.boss-recent-row span {
  color: #6d7d74;
}
.boss-recent-row strong {
  color: #173f2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boss-recent-row em {
  color: #2c6b4b;
  font-style: normal;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boss-recent-row p {
  margin: 0;
  color: #34473d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.boss-empty {
  margin: 0;
  color: #7a8a80;
  font-size: 12px;
}
.audit-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #e1e9e4;
  border-radius: 10px;
}
.audit-table {
  min-width: 1080px;
  table-layout: fixed;
  font-size: 12px;
}
.audit-table th,
.audit-table td {
  padding: 9px 10px;
  vertical-align: top;
}
.audit-table th:nth-child(1), .audit-table td:nth-child(1) { width: 110px; }
.audit-table th:nth-child(2), .audit-table td:nth-child(2) { width: 110px; }
.audit-table th:nth-child(3), .audit-table td:nth-child(3) { width: 150px; }
.audit-table th:nth-child(5), .audit-table td:nth-child(5) { width: 100px; }
.audit-table th:nth-child(6), .audit-table td:nth-child(6) { width: 70px; }
.audit-time-cell { color: #526258; white-space: nowrap; }
.audit-detail summary {
  cursor: pointer;
  color: #1f4e3a;
  font-weight: 800;
  line-height: 1.5;
}
.audit-detail summary > span {
  display: inline-block;
  max-width: calc(100% - 22px);
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}
.audit-detail dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 0 0;
  padding: 9px;
  border-radius: 8px;
  background: #f4f8f5;
}
.audit-detail dt {
  color: #7a877f;
  font-size: 11px;
  font-weight: 800;
}
.audit-detail dd {
  margin: 2px 0 0;
  color: #2b3c33;
  word-break: break-all;
}

/* 员工操作记录第二版：紧凑看板、单行日志与只读详情抽屉。 */
.audit-v2-workspace {
  width: min(1580px, calc(100% - 34px));
  max-width: none;
  padding-top: 28px;
}
.audit-v2-page-head,
.audit-v2-section-head,
.audit-v2-records-head,
.audit-v2-overview-card > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.audit-v2-page-head { align-items: flex-end; margin-bottom: 14px; }
.audit-v2-page-head h1 { margin: 0; color: #193b2e; font-size: 29px; line-height: 1.15; }
.audit-v2-head-actions { display: flex; align-items: center; gap: 9px; color: #65776e; font-size: 12px; font-weight: 700; }
.audit-v2-button {
  width: auto;
  min-height: 34px;
  padding: 6px 12px;
  border: 1px solid #c8d8d0;
  border-radius: 6px;
  color: #315c48;
  background: #f5f9f6;
  font-size: 12px;
  font-weight: 900;
}
.audit-v2-button.primary { color: #fff; border-color: #176447; background: #176447; }
.audit-v2-button.secondary,
.audit-v2-button.quiet { color: #53675d; border-color: #d2ddd7; background: #fff; }
.audit-v2-button:hover { filter: brightness(.975); }

.audit-v2-boss,
.audit-v2-records {
  border: 1px solid #dbe4df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(38,65,52,.035);
}
.audit-v2-boss { padding: 13px; }
.audit-v2-section-head { margin-bottom: 10px; }
.audit-v2-section-head > div { display: flex; align-items: baseline; gap: 9px; }
.audit-v2-section-head h2,
.audit-v2-records-head h2 { margin: 0; color: #244737; font-size: 15px; }
.audit-v2-section-head span,
.audit-v2-section-head small,
.audit-v2-overview-card header span,
.audit-v2-records-head span { color: #7a8981; font-size: 11px; }

.audit-v2-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.audit-v2-metrics article {
  position: relative;
  min-width: 0;
  padding: 11px 12px;
  overflow: hidden;
  border: 1px solid #dce7e1;
  border-radius: 8px;
  background: linear-gradient(145deg,#fff 0%,#f6faf7 100%);
}
.audit-v2-metrics article::before { position: absolute; inset: 0 auto 0 0; width: 3px; background: #73a18a; content: ""; }
.audit-v2-metrics span,
.audit-v2-metrics small { display: block; color: #75847c; font-size: 11px; font-weight: 700; }
.audit-v2-metrics strong { display: block; margin: 4px 0 2px; color: #174431; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.audit-v2-overview-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(420px, .84fr); gap: 9px; margin-top: 9px; }
.audit-v2-overview-card { min-width: 0; padding: 10px 11px; border: 1px solid #e0e8e3; border-radius: 8px; background: #fbfcfb; }
.audit-v2-overview-card > header { margin-bottom: 7px; }
.audit-v2-overview-card h3 { margin: 0; color: #2c4c3d; font-size: 13px; }
.audit-v2-mini-wrap { overflow: hidden; border: 1px solid #e3e9e5; border-radius: 6px; }
.audit-v2-mini-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.audit-v2-mini-table th,
.audit-v2-mini-table td { padding: 6px 7px; border-bottom: 1px solid #e9eeeb; text-align: left; white-space: nowrap; }
.audit-v2-mini-table th { color: #738179; background: #f2f6f3; font-weight: 800; }
.audit-v2-mini-table td { color: #41554b; font-variant-numeric: tabular-nums; }
.audit-v2-mini-table tr:last-child td { border-bottom: 0; }
.audit-v2-mini-table b { color: #1f4a37; }
.audit-v2-recent-list { display: grid; gap: 4px; }
.audit-v2-recent-item {
  display: grid;
  grid-template-columns: 40px 62px 100px minmax(0,1fr);
  gap: 7px;
  align-items: center;
  width: 100%;
  min-height: 29px;
  padding: 6px 7px;
  border: 0;
  border-radius: 5px;
  color: #40544a;
  background: #f3f7f4;
  text-align: left;
  font-size: 11px;
}
.audit-v2-recent-item:hover { background: #eaf2ed; }
.audit-v2-recent-item time { color: #78867f; font-variant-numeric: tabular-nums; }
.audit-v2-recent-item b,
.audit-v2-recent-item em,
.audit-v2-recent-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-v2-recent-item b { color: #214936; }
.audit-v2-recent-item em { color: #2f7152; font-style: normal; font-weight: 800; }

.audit-v2-records { margin-top: 11px; overflow: hidden; }
.audit-v2-filter-bar {
  display: grid;
  grid-template-columns: auto 124px 124px 132px 148px minmax(210px,1fr) auto;
  gap: 8px;
  align-items: end;
  padding: 11px 12px;
  border-bottom: 1px solid #e2e9e5;
  background: #fafcfb;
}
.audit-v2-filter-bar label { display: grid; gap: 4px; min-width: 0; color: #5b6e64; font-size: 10px; font-weight: 800; }
.audit-v2-filter-bar input,
.audit-v2-filter-bar select { width: 100%; min-height: 33px; padding: 6px 8px; border: 1px solid #cdd9d2; border-radius: 5px; color: #34493e; background: #fff; font-size: 12px; }
.audit-v2-quick-range { display: flex; align-items: center; min-height: 33px; padding: 3px; border: 1px solid #d5dfda; border-radius: 6px; background: #fff; }
.audit-v2-quick-range button { min-height: 25px; padding: 4px 8px; border: 0; border-radius: 4px; color: #66776f; background: transparent; font-size: 11px; font-weight: 800; white-space: nowrap; }
.audit-v2-quick-range button.active { color: #fff; background: #286f50; }
.audit-v2-filter-actions { display: flex; gap: 6px; }
.audit-v2-records-head { padding: 10px 12px; border-bottom: 1px solid #e5ebe7; }
.audit-v2-records-head > div:first-child { display: flex; align-items: baseline; gap: 8px; }
.audit-v2-records-head > label { display: flex; grid-template-columns: none; align-items: center; gap: 5px; color: #75847c; font-size: 11px; }
.audit-v2-records-head select { width: 68px; min-height: 28px; padding: 3px 22px 3px 6px; border: 1px solid #d3ddd7; border-radius: 5px; color: #496056; background: #fff; font-size: 11px; }
.audit-v2-table-wrap { min-height: 308px; overflow: auto; }
.audit-v2-table { width: 100%; min-width: 1080px; border-collapse: collapse; table-layout: fixed; font-size: 12px; }
.audit-v2-table th,
.audit-v2-table td { padding: 8px 9px; overflow: hidden; border-bottom: 1px solid #e8edea; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.audit-v2-table th { color: #66776e; background: #f4f7f5; font-size: 11px; font-weight: 900; }
.audit-v2-table tbody tr { cursor: pointer; }
.audit-v2-table tbody tr:hover { background: #f7faf8; }
.audit-v2-table th:nth-child(1) { width: 148px; }
.audit-v2-table th:nth-child(2) { width: 90px; }
.audit-v2-table th:nth-child(3) { width: 116px; }
.audit-v2-table th:nth-child(4) { width: 138px; }
.audit-v2-table th:nth-child(6) { width: 74px; }
.audit-v2-table th:nth-child(7) { width: 64px; }
.audit-v2-table td time { color: #64756c; font-variant-numeric: tabular-nums; }
.audit-v2-table td b { color: #234b39; }
.audit-v2-module,
.audit-v2-result { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 7px; border-radius: 999px; font-size: 10px; font-weight: 900; }
.audit-v2-module { color: #2e654b; background: #e8f2ec; }
.audit-v2-module.quote { color: #765b29; background: #f8f0dd; }
.audit-v2-module.settlement { color: #425d82; background: #e9eef6; }
.audit-v2-module.auth { color: #6b506e; background: #f1eaf2; }
.audit-v2-result { color: #267050; background: #e5f3ea; }
.audit-v2-result.warning { color: #9a5c1e; background: #fff0d8; }
.audit-v2-result.failed { color: #a3473d; background: #fbe8e5; }
.audit-v2-summary { color: #394f44; }
.audit-v2-view { padding: 3px 0; border: 0; color: #176447; background: transparent; font-size: 11px; font-weight: 900; }
.audit-v2-empty,
.audit-v2-empty-row { color: #839088; text-align: center; }
.audit-v2-empty-row { height: 170px; }
.audit-v2-footer { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; color: #75847c; background: #fafcfb; font-size: 11px; }
.audit-v2-footer > div { display: flex; gap: 4px; }
.audit-v2-footer button { min-width: 30px; min-height: 28px; padding: 3px 7px; border: 1px solid #d3ddd7; border-radius: 5px; color: #596d62; background: #fff; font-size: 11px; }
.audit-v2-footer button.current { color: #fff; border-color: #176447; background: #176447; }
.audit-v2-footer button:disabled:not(.current) { opacity: .45; cursor: default; }

.audit-v2-drawer-backdrop { position: fixed; z-index: 50; inset: 0 0 0 var(--sidebar-width); background: rgba(17,39,30,.32); backdrop-filter: blur(1px); }
.audit-v2-drawer {
  position: fixed;
  z-index: 51;
  inset: 12px 12px 12px auto;
  width: min(650px, calc(100% - var(--sidebar-width) - 34px));
  overflow: auto;
  border: 1px solid #ccd9d2;
  border-radius: 10px;
  background: #f8faf9;
  box-shadow: -18px 0 55px rgba(25,52,39,.18);
  animation: audit-v2-drawer-in .18s ease-out;
}
.audit-v2-drawer-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 15px 16px; border-bottom: 1px solid #dce5e0; background: rgba(255,255,255,.97); }
.audit-v2-drawer-head p { margin: 0 0 4px; color: #2b7553; font-size: 10px; font-weight: 900; letter-spacing: .12em; }
.audit-v2-drawer-head h2 { margin: 0; color: #1c4432; font-size: 19px; }
.audit-v2-drawer-head span { display: block; margin-top: 4px; color: #79867f; font-size: 11px; }
.audit-v2-drawer-close { width: 31px; height: 31px; padding: 0; border: 0; border-radius: 50%; color: #52665b; background: #e8eeea; font-size: 19px; }
.audit-v2-drawer-body { display: grid; gap: 9px; padding: 12px; }
.audit-v2-drawer-body > section { padding: 11px; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; }
.audit-v2-drawer-body h3 { margin: 0 0 8px; color: #294c3c; font-size: 13px; }
.audit-v2-detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; }
.audit-v2-detail-grid > div { min-width: 0; padding: 8px; border-radius: 6px; background: #f2f6f3; }
.audit-v2-detail-grid span { display: block; color: #7a8880; font-size: 10px; }
.audit-v2-detail-grid strong { display: block; margin-top: 3px; overflow-wrap: anywhere; color: #30473c; font-size: 12px; }
.audit-v2-detail-grid .wide { grid-column: 1 / -1; }
.audit-v2-merged-list { display: grid; gap: 5px; }
.audit-v2-merged-list > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 8px; padding: 7px 8px; border-radius: 6px; background: #f3f7f4; font-size: 11px; }
.audit-v2-merged-list b { color: #2e6048; }
.audit-v2-merged-list span { color: #53675d; line-height: 1.55; }
.audit-v2-meta { color: #6f7d75; font-size: 11px; line-height: 1.8; overflow-wrap: anywhere; }
.audit-v2-meta code { padding: 2px 5px; border-radius: 4px; color: #465b50; background: #edf2ef; font-family: Consolas, monospace; }
.audit-v2-toast { position: fixed; z-index: 80; right: 26px; bottom: 25px; padding: 8px 12px; border-radius: 6px; color: #fff; background: #1e503a; box-shadow: 0 10px 30px rgba(20,52,38,.18); font-size: 12px; font-weight: 800; }
@keyframes audit-v2-drawer-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

@media (max-width: 1450px) {
  .audit-v2-filter-bar { grid-template-columns: auto 120px 120px 126px 142px minmax(180px,1fr); }
  .audit-v2-filter-actions { grid-column: 6; justify-self: end; }
  .audit-v2-overview-grid { grid-template-columns: 1fr; }
}
.audit-detail .audit-business-content {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.audit-merged-events {
  grid-column: 1 / -1;
}
.audit-merged-events p {
  margin: 0 0 4px;
}
.audit-merged-events p:last-child {
  margin-bottom: 0;
}
.audit-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #27563f;
  background: #e8f3ec;
  font-weight: 900;
  white-space: nowrap;
}

/* 结算跟进：以来源可核对、批次可扫描为核心的紧凑工作台 */
.settlement-workspace { width: min(1580px, calc(100% - 32px)); }
.settlement-title { margin-bottom: 18px; }
.settlement-filter-panel,
.settlement-history-panel {
  padding: 16px;
  border: 1px solid #d9e2dd;
  border-radius: 11px;
  background: #fff;
}
.settlement-section-heading,
.settlement-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.settlement-section-heading { margin-bottom: 13px; }
.settlement-section-heading > div { display: flex; align-items: center; gap: 9px; }
.settlement-section-heading > div > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 24px;
  border-radius: 5px;
  color: #fff;
  background: #176447;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .06em;
}
.settlement-section-heading strong { color: #1e3c30; font-size: 15px; }
.settlement-section-heading small { color: #74837b; font-size: 12px; }
.settlement-filter-grid {
  display: grid;
  grid-template-columns: minmax(230px, 1.3fr) repeat(6, minmax(130px, .75fr)) auto;
  gap: 9px;
  align-items: end;
}
.settlement-filter-grid label { gap: 5px; font-size: 12px; }
.settlement-filter-grid input,
.settlement-filter-grid select { min-height: 36px; padding: 7px 9px; font-size: 12px; }
.settlement-filter-actions { display: flex; gap: 7px; white-space: nowrap; }
.settlement-filter-actions button { min-height: 36px; padding: 7px 11px; }
.settlement-filter-panel .search-message { min-height: 17px; margin: 10px 0 0; }

.settlement-builder {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(390px, .75fr);
  gap: 12px;
  margin: 12px 0;
  align-items: start;
}
.settlement-candidate-panel,
.settlement-selection-panel {
  min-width: 0;
  padding: 13px;
  border: 1px solid #d9e2dd;
  border-radius: 11px;
  background: #fff;
}
.settlement-selection-panel { position: sticky; top: 18px; }
.settlement-panel-head { margin-bottom: 10px; }
.settlement-panel-head > div { display: flex; align-items: baseline; gap: 8px; }
.settlement-panel-head strong { color: #193b2e; font-size: 14px; }
.settlement-panel-head span { color: #78877f; font-size: 11px; }
.settlement-panel-head button { min-height: 31px; padding: 5px 8px; font-size: 11px; }
.settlement-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
  border: 1px solid #e2e9e5;
  border-radius: 8px;
}
.settlement-candidate-table,
.settlement-detail-table {
  width: 100%;
  min-width: 1160px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 11px;
}
.settlement-candidate-table { min-width: 960px; }
.settlement-candidate-panel .settlement-candidate-table { font-size: 13px; }
.settlement-candidate-panel .settlement-candidate-table th { font-size: 12px; }
.settlement-candidate-panel .settlement-candidate-table code { font-size: 12px; }
.settlement-candidate-panel .settlement-empty-cell { font-size: 13px; }
.settlement-candidate-table th,
.settlement-candidate-table td,
.settlement-detail-table th,
.settlement-detail-table td {
  padding: 8px 7px;
  border-bottom: 1px solid #e7ece9;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.settlement-candidate-table th,
.settlement-detail-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  color: #53655c;
  background: #f3f7f4;
  font-size: 10px;
  font-weight: 900;
}
.settlement-candidate-table th:nth-child(1) { width: 38px; }
.settlement-candidate-table th:nth-child(2) { width: 205px; }
.settlement-candidate-table th:nth-child(3) { width: 86px; }
.settlement-candidate-table th:nth-child(4) { width: 150px; }
.settlement-candidate-table th:nth-child(5) { width: 220px; }
.settlement-candidate-table th:nth-child(6) { width: 72px; }
.settlement-candidate-table th:nth-child(7) { width: 72px; }
.settlement-candidate-table th:nth-child(8) { width: 90px; }
.settlement-candidate-table tbody tr:hover { background: #f8fbf9; }
.settlement-candidate-table tbody tr.selected { background: #eaf5ee; }
.settlement-candidate-table input { width: 15px; min-height: 15px; }
.settlement-candidate-table code,
.settlement-detail-table code { color: #2d6650; font-family: Consolas, monospace; font-size: 10px; }
.settlement-empty-cell { padding: 28px !important; color: #7a8981; text-align: center !important; }
.settlement-platform-chip {
  display: inline-flex;
  max-width: 100%;
  padding: 3px 6px;
  border-radius: 999px;
  color: #245d46;
  background: #e8f3ec;
  overflow: hidden;
  text-overflow: ellipsis;
}
.settlement-money { color: #194c37; font-weight: 900; }

.settlement-selected-list { display: grid; gap: 5px; max-height: 280px; overflow: auto; }
.settlement-selected-row {
  display: grid;
  grid-template-columns: minmax(125px, 1.3fr) minmax(125px, 1fr) 52px 76px 24px;
  gap: 7px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 6px;
  background: #f5f8f6;
  font-size: 10px;
}
.settlement-selected-row > div,
.settlement-selected-row > span { min-width: 0; }
.settlement-selected-row strong,
.settlement-selected-row span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-selected-row div span { margin-top: 2px; color: #78877f; font-size: 9px; }
.settlement-selected-row b { color: #286249; }
.settlement-selected-row em { color: #174a36; font-style: normal; font-weight: 900; text-align: right; }
.settlement-selected-row button {
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #9e4438;
  background: #f8e9e6;
  font-weight: 900;
}
.settlement-empty-note { margin: 10px 0; color: #7a8981; font-size: 12px; }
.settlement-warning {
  margin-bottom: 8px;
  padding: 8px 9px;
  border-left: 3px solid #d59828;
  border-radius: 5px;
  color: #79581f;
  background: #fff7e8;
  font-size: 11px;
  line-height: 1.5;
}
.settlement-platform-rates { display: grid; gap: 6px; margin: 10px 0; }
.settlement-rate-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  border: 1px solid #dbe7df;
  border-radius: 7px;
  background: #fbfdfb;
}
.settlement-rate-row > span:first-child { display: grid; gap: 2px; }
.settlement-rate-row strong { color: #1e4d39; font-size: 12px; }
.settlement-rate-row small { color: #78867f; font-size: 10px; }
.settlement-rate-input { position: relative; display: block; }
.settlement-rate-input input { min-height: 32px; padding: 5px 25px 5px 7px; font-size: 12px; }
.settlement-rate-input i { position: absolute; right: 9px; top: 8px; color: #607269; font-size: 11px; font-style: normal; }
.settlement-create-form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settlement-create-form label { gap: 4px; font-size: 11px; }
.settlement-create-form input,
.settlement-create-form textarea { min-height: 34px; padding: 7px 8px; font-size: 11px; }
.settlement-create-form textarea { min-height: 52px; }
.settlement-note-field,
.settlement-create-form button { grid-column: 1 / -1; }
.settlement-create-form button { min-height: 39px; }

.settlement-selection-panel .settlement-panel-head strong { font-size: 15px; }
.settlement-selection-panel .settlement-step-number,
.settlement-selection-panel #selected-count { font-size: 12px; }
.settlement-selection-panel .settlement-panel-head button { font-size: 12px; }
.settlement-selection-panel .settlement-selected-row { font-size: 12px; }
.settlement-selection-panel .settlement-selected-row div span { font-size: 11px; }
.settlement-selection-panel .settlement-empty-note { font-size: 13px; }
.settlement-selection-panel .settlement-warning { font-size: 12px; }
.settlement-selection-panel .settlement-rate-row strong { font-size: 13px; }
.settlement-selection-panel .settlement-rate-row small { font-size: 12px; }
.settlement-selection-panel .settlement-rate-input input { font-size: 13px; }
.settlement-selection-panel .settlement-create-form label { font-size: 13px; }
.settlement-selection-panel .settlement-create-form input,
.settlement-selection-panel .settlement-create-form textarea { font-size: 13px; }

.settlement-history-heading { margin-bottom: 9px; }
.settlement-status-tabs { display: flex; gap: 5px; margin-bottom: 9px; overflow-x: auto; }
.settlement-status-tabs button {
  min-height: 31px;
  padding: 5px 11px;
  border: 1px solid #d6dfda;
  border-radius: 6px;
  color: #5c6e65;
  background: #fff;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.settlement-status-tabs button.active { color: #fff; border-color: #176447; background: #176447; }
.settlement-batch-list { display: grid; gap: 5px; }
.settlement-batch-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.25fr) minmax(120px, .75fr) 105px 125px 76px 82px;
  gap: 10px;
  align-items: center;
  min-width: 860px;
  padding: 8px 10px;
  border: 1px solid #e2e9e5;
  border-radius: 7px;
  background: #fbfcfb;
  font-size: 11px;
}
.settlement-batch-row > div { display: grid; gap: 2px; min-width: 0; }
.settlement-batch-row strong,
.settlement-batch-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-batch-row strong { color: #1a4b37; }
.settlement-batch-row small { color: #819087; font-size: 9px; }
.settlement-batch-row button { min-height: 30px; padding: 5px 8px; font-size: 10px; }
.settlement-status {
  display: inline-flex;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  color: #4e665a;
  background: #edf2ef;
  font-size: 10px;
  font-weight: 900;
}
.settlement-status-settled { color: #176447; background: #e3f3e9; }
.settlement-status-partially_received { color: #85621f; background: #fff3d9; }
.settlement-status-processing { color: #225d88; background: #e8f2f8; }
.settlement-status-cancelled { color: #7c8580; background: #ecefed; }
.settlement-status-amount_mismatch { color: #9a3b2f; background: #ffe7e2; }

.settlement-detail {
  position: fixed;
  z-index: 101;
  inset: 20px 20px 20px max(calc(var(--sidebar-width) + 20px), 20px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 18px;
  border: 1px solid #cfdad4;
  border-radius: 12px;
  background: #f8faf9;
  box-shadow: 0 24px 70px rgba(19, 51, 37, .24);
}
.settlement-detail-head { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 11px; }
.settlement-detail-head span { color: #2d6c50; font-size: 11px; font-weight: 900; }
.settlement-detail-head h2 { margin: 3px 0; color: #173c2d; font-size: 23px; }
.settlement-detail-head p { margin: 0; color: #738279; font-size: 11px; }
.settlement-detail-head > button {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  color: #52665b;
  background: #e6ece8;
  font-size: 21px;
}
.settlement-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.settlement-detail-meta span { padding: 8px 10px; border-radius: 6px; color: #718078; background: #eef3f0; font-size: 10px; }
.settlement-detail-meta strong { color: #28483a; }
.settlement-detail-platforms { display: grid; min-width: 0; gap: 10px; }
.settlement-platform-section { min-width: 0; padding: 12px; border: 1px solid #d9e2dd; border-radius: 9px; background: #fff; }
.settlement-platform-section > header { display: grid; grid-template-columns: 1fr; gap: 8px; margin-bottom: 9px; }
.settlement-platform-section > header,
.settlement-platform-section > header > div,
.settlement-platform-section dl { min-width: 0; }
.settlement-platform-section > header > div { display: grid; gap: 3px; }
.settlement-platform-section > header strong { color: #174732; font-size: 16px; }
.settlement-platform-section > header code { color: #728279; font-size: 10px; }
.settlement-platform-section dl { display: grid; grid-template-columns: repeat(6, minmax(70px, 1fr)); gap: 8px; margin: 0; }
.settlement-platform-section dl div { min-width: 0; }
.settlement-platform-section dt { color: #819087; font-size: 9px; }
.settlement-platform-section dd { margin: 2px 0 0; color: #29483a; font-size: 11px; font-weight: 900; }
.settlement-detail-table th:nth-child(1) { width: 38px; }
.settlement-detail-table th:nth-child(2) { width: 210px; }
.settlement-detail-table th:nth-child(3) { width: 88px; }
.settlement-detail-table th:nth-child(4) { width: 140px; }
.settlement-detail-table th:nth-child(5) { width: 220px; }
.settlement-detail-table th:nth-child(6) { width: 80px; }
.settlement-detail-table th:nth-child(7) { width: 90px; }
.settlement-detail-table th:nth-child(8) { width: 160px; }
.settlement-detail-table th:nth-child(9) { width: 70px; }
.settlement-detail-table th:nth-child(10) { width: 130px; }
.settlement-detail-table tr.withdrawn { color: #8c9891; background: #f7f7f7; text-decoration: line-through; }
.settlement-order-item-checkbox,
[data-order-number-select-all] { width: 15px; min-height: 15px; }
.settlement-order-number-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #d7e4dd;
  border-radius: 8px;
  background: #f4f8f5;
}
.settlement-order-number-panel.has-pending { border-color: #ead5a3; background: #fff9eb; }
.settlement-order-number-panel > div { display: grid; gap: 2px; }
.settlement-order-number-panel strong { color: #244c3a; font-size: 12px; }
.settlement-order-number-panel span { color: #718078; font-size: 10px; }
.settlement-order-number-panel form { display: flex; gap: 7px; align-items: center; }
.settlement-order-number-panel input { width: 230px; min-height: 32px; }
.settlement-platform-order-number { color: #245b46 !important; font-weight: 800; }
.settlement-order-number-pending { display: inline-flex; padding: 3px 6px; border-radius: 999px; color: #966913; background: #fff1c9; font-size: 9px; font-weight: 800; }
.settlement-platform-focus { outline: 3px solid rgba(33, 129, 92, .2); box-shadow: 0 8px 24px rgba(24, 78, 55, .12); }
.settlement-timeline-panel { margin-top: 10px; padding: 11px 12px; border: 1px solid #dce6e0; border-radius: 8px; background: #f9fbfa; }
.settlement-timeline-panel > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.settlement-timeline-panel > header strong { color: #214a38; font-size: 12px; }
.settlement-timeline-panel > header span { color: #7c8a83; font-size: 10px; }
.settlement-timeline-panel ol { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.settlement-timeline-panel li { display: grid; grid-template-columns: 9px 1fr; gap: 8px; align-items: start; }
.settlement-timeline-panel li i { width: 7px; height: 7px; margin-top: 4px; border-radius: 50%; background: #2c805d; }
.settlement-timeline-panel li div { display: grid; gap: 2px; min-width: 0; }
.settlement-timeline-panel li strong { color: #2b4b3d; font-size: 11px; }
.settlement-timeline-panel li span,
.settlement-timeline-panel li small { color: #78867f; font-size: 10px; }
.order-settlement-summary { display: grid; grid-template-columns: repeat(4, minmax(90px, 1fr)) auto; gap: 8px; align-items: stretch; margin: 0 0 10px; }
.order-settlement-summary > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 7px; background: #eef5f1; }
.order-settlement-summary span { color: #718078; font-size: 10px; }
.order-settlement-summary strong { color: #1f5b43; font-size: 14px; }
.order-settlement-summary > a { display: inline-flex; align-items: center; justify-content: center; padding: 7px 10px; border-radius: 7px; color: #fff; background: #176447; font-size: 11px; font-weight: 800; }
.legacy-settlement-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; color: #6d6250; background: #fff7e7; font-size: 10px; }
.settlement-item-state { display: inline-flex; padding: 2px 6px; border-radius: 999px; white-space: nowrap; }
.settlement-item-state-settled { color: #176447; background: #e4f3e9; }
.settlement-item-state-processing { color: #225d88; background: #e7f1f8; }
.settlement-item-state-unsettled { color: #6f7c75; background: #edf0ee; }
.settlement-item-link { margin-left: 5px; color: #176447; font-size: 9px; font-weight: 800; }
.dashboard-settlement-card { border-left: 4px solid #2c805d; }
.dashboard-settlement-detail { margin: 8px 0 0; color: #687970; font-size: 12px; }
.settlement-withdraw-button {
  min-height: 27px;
  padding: 4px 7px;
  border: 1px solid #e1b7b1;
  border-radius: 5px;
  color: #974238;
  background: #fff4f2;
  font-size: 10px;
  font-weight: 800;
}
.settlement-platform-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}
.settlement-platform-progress li {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid #e2e8e4;
  border-radius: 6px;
  color: #87938c;
  background: #f7f9f8;
  font-size: 10px;
  font-weight: 800;
}
.settlement-platform-progress i {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: #e4e9e6;
  font-size: 9px;
  font-style: normal;
}
.settlement-platform-progress li.done { color: #176447; border-color: #bcd8ca; background: #edf7f1; }
.settlement-platform-progress li.done i { color: #fff; background: #21815c; }
.settlement-platform-progress li.active { color: #174f38; border-color: #78af96; background: #e6f3eb; }
.settlement-platform-progress li.active i { color: #fff; background: #176447; }
.settlement-platform-progress li.alert { color: #9a3b2f; border-color: #e6aaa1; background: #fff0ed; }
.settlement-platform-progress li.alert i { color: #fff; background: #b64b3d; }
.settlement-followup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(310px, .6fr);
  gap: 9px;
  margin-bottom: 10px;
}
.settlement-followup-actions,
.settlement-attachment-panel {
  min-width: 0;
  padding: 10px;
  border: 1px solid #dfe7e2;
  border-radius: 7px;
  background: #f8faf9;
}
.settlement-inline-form,
.settlement-stage-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 7px;
  margin-bottom: 8px;
}
.settlement-inline-form { grid-template-columns: minmax(180px, 280px) auto; justify-content: start; }
.settlement-inline-form label,
.settlement-stage-form label { display: grid; gap: 4px; color: #52685d; font-size: 10px; font-weight: 800; }
.settlement-inline-form input,
.settlement-stage-form input,
.settlement-attachment-panel select {
  min-height: 33px;
  padding: 6px 8px;
  border: 1px solid #ccd8d1;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
}
.settlement-inline-form button,
.settlement-stage-form button { min-height: 33px; padding: 6px 10px; white-space: nowrap; }
.settlement-suffix-input { position: relative; display: block; }
.settlement-suffix-input input { width: 100%; padding-right: 25px; }
.settlement-suffix-input i { position: absolute; right: 9px; top: 9px; color: #718078; font-style: normal; }
.settlement-action-callout,
.settlement-settled-banner,
.settlement-mismatch-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 9px 11px;
  border-radius: 6px;
  background: #eef4f0;
}
.settlement-action-callout > div,
.settlement-settled-banner,
.settlement-mismatch-banner { min-width: 0; }
.settlement-action-callout strong,
.settlement-action-callout span,
.settlement-settled-banner strong,
.settlement-settled-banner span,
.settlement-mismatch-banner strong,
.settlement-mismatch-banner span { display: block; }
.settlement-action-callout strong,
.settlement-settled-banner strong,
.settlement-mismatch-banner strong { color: #214b39; font-size: 12px; }
.settlement-action-callout span,
.settlement-settled-banner span,
.settlement-mismatch-banner span { margin-top: 3px; color: #718078; font-size: 10px; }
.settlement-settled-banner { color: #176447; background: #e6f5ec; }
.settlement-mismatch-banner { margin-bottom: 8px; border: 1px solid #e6aaa1; background: #fff0ed; }
.settlement-mismatch-banner strong,
.settlement-mismatch-banner span { color: #923d32; }
.settlement-authoritative-amount { display: grid; align-content: center; min-width: 150px; }
.settlement-authoritative-amount span,
.settlement-authoritative-amount small { color: #718078; font-size: 9px; }
.settlement-authoritative-amount strong { margin: 2px 0; color: #174c36; font-size: 16px; }
.settlement-wide-field { grid-column: span 2; }
.settlement-admin-note { margin: 8px 0 0; color: #8f5148; font-size: 10px; }
.settlement-cancel-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.settlement-cancel-row button { padding: 3px 0; border: 0; color: #a14b40; background: transparent; font-size: 10px; text-decoration: underline; }
.settlement-cancel-row span { color: #8c9891; font-size: 9px; }
.settlement-attachment-panel > header { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.settlement-attachment-panel > header strong { color: #244c3b; font-size: 12px; }
.settlement-attachment-panel > header span { color: #819087; font-size: 9px; }
.settlement-attachment-panel ul { display: grid; gap: 4px; max-height: 116px; margin: 8px 0; padding: 0; overflow: auto; list-style: none; }
.settlement-attachment-panel li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 5px 6px; border-radius: 5px; background: #fff; font-size: 9px; }
.settlement-attachment-panel li > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-attachment-panel li b { margin-right: 6px; color: #2c6850; }
.settlement-attachment-panel li a { margin-left: 7px; color: #176447; font-weight: 800; text-decoration: none; }
.settlement-attachment-panel .settlement-no-attachment { display: block; color: #86928b; text-align: center; }
.settlement-attachment-panel form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.settlement-attachment-panel form button { min-height: 33px; padding: 6px 9px; white-space: nowrap; }
.settlement-attachment-panel form button { grid-column: 1 / -1; }
.settlement-attachment-drop {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 33px;
  padding: 6px 8px;
  border: 1px dashed #9eb8aa;
  border-radius: 5px;
  color: #60756a;
  background: #f4f9f6;
  cursor: pointer;
  font-size: 9px;
}
.settlement-attachment-drop.dragging { border-color: #176447; background: #e5f3eb; }
.settlement-attachment-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* 订单附件补录工作台 */
.detail-attachment-workbench-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid #cfe0d5;
  border-radius: 9px;
  background: #f6faf7;
}
.detail-attachment-workbench-entry > div { display: grid; gap: 3px; min-width: 0; }
.detail-attachment-workbench-entry > div > strong { color: #244c3b; font-size: 13px; }
.detail-attachment-workbench-entry > div > span { color: #74847c; font-size: 11px; line-height: 1.5; }
.detail-attachment-workbench-entry > button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 8px 13px;
  border: 1px solid #176447;
  border-radius: 7px;
  color: #fff;
  background: #176447;
  font-weight: 900;
}
.detail-attachment-workbench-entry > button:hover { background: #0f553b; }

.attachment-workbench-open { overflow: hidden; }
.attachment-workbench-shell {
  position: fixed;
  inset: 0;
  z-index: 70;
}
.attachment-workbench-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13, 29, 21, .46);
  backdrop-filter: blur(1px);
}
.attachment-workbench {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
  width: min(1040px, calc(100vw - 36px));
  border-left: 1px solid #c5d6cc;
  border-radius: 15px 0 0 15px;
  overflow: hidden;
  color: #294438;
  background: #eef3f0;
  box-shadow: -22px 0 60px rgba(17, 38, 27, .26);
}
.attachment-workbench-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
  border-bottom: 1px solid #d8e3dc;
  background: #fff;
}
.attachment-workbench-heading p {
  margin: 0 0 3px;
  color: #238363;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .12em;
}
.attachment-workbench-heading h2 { margin: 0; color: #1b392d; font-size: 21px; }
.attachment-workbench-heading > button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #d4dfd8;
  border-radius: 50%;
  color: #547064;
  background: #f2f6f3;
  font-size: 21px;
  line-height: 1;
}
.attachment-workbench-heading > button:hover { color: #8b382f; background: #fbecea; }
.attachment-workbench-summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  border-bottom: 1px solid #d8e3dc;
  background: #d8e3dc;
}
.attachment-workbench-summary > div { display: grid; gap: 3px; min-width: 0; padding: 10px 14px; background: #f9fbfa; }
.attachment-workbench-summary span { color: #7c8b83; font-size: 12px; }
.attachment-workbench-summary strong {
  overflow: hidden;
  color: #2a493b;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.attachment-workbench-summary strong.is-warning { color: #a35528; }
.attachment-workbench-message {
  min-height: 0;
  padding: 0 20px;
  color: #5d7468;
  background: #fff;
  font-size: 14px;
  line-height: 0;
  transition: padding .15s ease, line-height .15s ease;
}
.attachment-workbench-message:not(:empty) { padding-top: 9px; padding-bottom: 9px; line-height: 1.5; }
.attachment-workbench-message[data-type="success"] { color: #176447; background: #eff8f2; }
.attachment-workbench-message[data-type="warning"] { color: #8d4b25; background: #fff7e9; }
.attachment-workbench-body { min-height: 0; padding: 14px 16px 18px; overflow: auto; scrollbar-gutter: stable; }
.attachment-workbench-supplier {
  margin-bottom: 11px;
  border: 1px solid #d4e0d8;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 5px 16px rgba(31, 59, 45, .04);
}
.attachment-workbench-supplier > summary {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 9px 13px;
  cursor: pointer;
  list-style: none;
}
.attachment-workbench-supplier > summary::-webkit-details-marker { display: none; }
.attachment-workbench-supplier[open] > summary { border-bottom: 1px solid #e0e8e3; background: #f4f8f5; }
.attachment-workbench-supplier-index {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: #fff;
  background: #238363;
  font-size: 13px;
  font-weight: 900;
}
.attachment-workbench-supplier-name { display: grid; gap: 3px; min-width: 0; }
.attachment-workbench-supplier-name strong { overflow: hidden; color: #243f33; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-workbench-supplier-name small { overflow: hidden; color: #77867e; font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.attachment-workbench-supplier-stats { color: #75857c; font-size: 13px; font-style: normal; white-space: nowrap; }
.attachment-workbench-supplier-stats b { color: #176447; }
.attachment-workbench-supplier-stats em { color: #b1572d; font-style: normal; font-weight: 900; }
.attachment-workbench-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
}
.attachment-workbench-slot {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
  padding: 11px;
  border: 1px solid #dce6e0;
  border-radius: 8px;
  background: #fbfdfc;
}
.attachment-workbench-slot.is-focus {
  border-color: #dc9a35;
  background: #fffaf0;
  box-shadow: 0 0 0 2px rgba(220, 154, 53, .14);
}
.attachment-workbench-slot > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.attachment-workbench-slot > header > div { display: grid; gap: 2px; min-width: 0; }
.attachment-workbench-slot > header strong { color: #29473a; font-size: 14px; }
.attachment-workbench-slot > header span { color: #849087; font-size: 11px; line-height: 1.45; }
.attachment-workbench-slot > header b { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; font-size: 11px; }
.attachment-workbench-slot > header b.is-missing { color: #a64835; background: #fbe9e5; }
.attachment-workbench-slot > header b.is-complete { color: #176447; background: #e8f4eb; }
.attachment-workbench-receipt-target { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; align-items: center; color: #60756a; font-size: 12px; }
.attachment-workbench-receipt-target select { min-width: 0; min-height: 30px; padding: 5px 8px; font-size: 12px; }
.attachment-workbench-existing { display: grid; gap: 4px; min-height: 27px; margin: 0; padding: 0; list-style: none; }
.attachment-workbench-existing li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px; align-items: center; min-width: 0; padding: 4px 6px; border-radius: 5px; background: #f1f6f3; font-size: 12px; }
.attachment-workbench-existing li.is-empty { display: block; color: #8b9690; text-align: center; }
.attachment-workbench-existing a { min-width: 0; overflow: hidden; color: #176447; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.attachment-workbench-file-type { padding: 1px 5px; border-radius: 999px; color: #567065; background: #e1ebe5; font-size: 10px; font-weight: 900; }
.attachment-workbench-drop {
  position: relative;
  display: grid;
  place-items: center;
  gap: 2px;
  min-height: 54px;
  padding: 7px 10px;
  border: 1px dashed #9fc6ae;
  border-radius: 7px;
  color: #317052;
  background: #f1f9f4;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s ease, background .15s ease;
}
.attachment-workbench-drop:hover,
.attachment-workbench-drop:focus,
.attachment-workbench-drop.is-dragging { border-color: #238363; background: #e7f4eb; outline: none; }
.attachment-workbench-drop.is-disabled { color: #7f8b85; background: #f3f5f4; cursor: default; }
.attachment-workbench-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.attachment-workbench-drop strong { font-size: 12px; }
.attachment-workbench-drop span { color: #829087; font-size: 10px; }
.attachment-workbench-empty { display: grid; gap: 7px; place-items: center; min-height: 190px; border: 1px dashed #bdcec4; border-radius: 10px; color: #74857c; background: #fff; }
.attachment-workbench-queue {
  max-height: 220px;
  padding: 11px 16px;
  border-top: 1px solid #d8e3dc;
  overflow: auto;
  background: #fff;
}
.attachment-workbench-queue > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.attachment-workbench-queue > header > div { display: flex; align-items: baseline; gap: 9px; }
.attachment-workbench-queue > header strong { color: #274638; font-size: 14px; }
.attachment-workbench-queue > header span { color: #7c8b83; font-size: 12px; }
.attachment-workbench-queue > header button { min-height: 32px; padding: 6px 11px; color: #fff; background: #176447; font-size: 13px; font-weight: 900; }
.attachment-workbench-queue > header button:disabled { color: #819088; background: #d9e1dc; }
.attachment-workbench-queue ul { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.attachment-workbench-queue li {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(120px, .8fr) minmax(135px, .9fr) 54px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 37px;
  padding: 6px 8px;
  border-radius: 6px;
  color: #536b60;
  background: #f5f8f6;
  font-size: 11px;
}
.attachment-workbench-queue li.status-failed { background: #fff0ed; }
.attachment-workbench-queue li.status-success { background: #edf7ef; }
.attachment-workbench-queue-name { display: grid; gap: 1px; min-width: 0; }
.attachment-workbench-queue-name strong { overflow: hidden; color: #304c3f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-workbench-queue-name small { color: #87928c; font-size: 10px; }
.attachment-workbench-queue li > b { color: #2d7052; white-space: nowrap; }
.attachment-workbench-queue li > em { overflow: hidden; color: #a24438; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.attachment-workbench-queue li > button { min-height: 27px; padding: 4px 8px; color: #8e4036; background: #fcebe8; font-size: 11px; }
.attachment-workbench-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 58px; padding: 10px 16px; border-top: 1px solid #d8e3dc; background: #fff; }
.attachment-workbench-footer span { color: #708078; font-size: 12px; }
.attachment-workbench-footer button { min-height: 35px; padding: 7px 13px; color: #fff; background: #176447; font-weight: 900; }
.attachment-workbench-close-confirm {
  position: absolute;
  right: 18px;
  bottom: 64px;
  z-index: 3;
  display: grid;
  gap: 7px;
  width: min(380px, calc(100% - 36px));
  padding: 14px;
  border: 1px solid #e4b8ae;
  border-radius: 9px;
  background: #fff9f7;
  box-shadow: 0 12px 32px rgba(64, 34, 28, .18);
}
.attachment-workbench-close-confirm[hidden] { display: none; }
.attachment-workbench-close-confirm strong { color: #7d3028; font-size: 15px; }
.attachment-workbench-close-confirm span { color: #786d67; font-size: 13px; line-height: 1.5; }
.attachment-workbench-close-confirm > div { display: flex; justify-content: flex-end; gap: 7px; }
.attachment-workbench-close-confirm button { min-height: 31px; padding: 6px 9px; font-size: 12px; }

@media (max-width: 820px) {
  .attachment-workbench { width: 100vw; border-radius: 0; }
  .attachment-workbench-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attachment-workbench-slot-grid { grid-template-columns: 1fr; }
  .attachment-workbench-queue li { grid-template-columns: minmax(0, 1fr) auto auto; }
  .attachment-workbench-queue li > span:nth-child(2),
  .attachment-workbench-queue li > span:nth-child(3),
  .attachment-workbench-queue li > em { grid-column: 1 / -1; }
}
.settlement-attachment-drop span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1500px) {
  .settlement-filter-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}

@media (max-width: 1220px) {
  .settlement-builder { grid-template-columns: 1fr; }
  .settlement-selection-panel { position: static; }
  .settlement-followup-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .settlement-filter-grid { grid-template-columns: 1fr 1fr; }
  .settlement-project-field,
  .settlement-filter-actions { grid-column: 1 / -1; }
  .settlement-detail { inset: 8px; }
  .settlement-detail-meta { grid-template-columns: 1fr 1fr; }
  .settlement-platform-section > header { display: grid; }
  .settlement-platform-section dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-platform-progress { grid-template-columns: 1fr; }
  .settlement-stage-form,
  .settlement-inline-form,
  .settlement-attachment-panel form { grid-template-columns: 1fr; }
  .settlement-wide-field { grid-column: auto; }
}

/* 结算跟进第二版：待办优先、平台分栏、商品先于操作。 */
.settlement-v2-workspace { padding-top: 28px; }
.settlement-v2-title { align-items: center; margin-bottom: 12px; }
.settlement-v2-title h1 { margin-bottom: 4px; font-size: clamp(27px, 2.4vw, 35px); }
.settlement-v2-title > div > p:last-child { margin: 0; color: #728178; font-size: 12px; }
.settlement-v2-kicker {
  margin: 0 0 5px !important;
  color: #277054 !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .15em;
}
.settlement-global-message { min-height: 19px; margin: 4px 0 8px; }
.settlement-mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7e1db;
  border-radius: 9px;
  background: #fff;
}
.settlement-mode-tabs button {
  min-width: 150px;
  min-height: 35px;
  padding: 7px 14px;
  border: 0;
  border-radius: 6px;
  color: #62736a;
  background: transparent;
  font-size: 12px;
  font-weight: 900;
}
.settlement-mode-tabs button.active {
  color: #fff;
  background: #176447;
  box-shadow: 0 4px 12px rgba(23, 100, 71, .16);
}
.settlement-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 11px;
}
.settlement-summary-card {
  min-height: 78px;
  padding: 11px 12px;
  border: 1px solid #d9e2dd;
  border-radius: 8px;
  background: #fff;
  text-align: left;
}
.settlement-summary-card > span { color: #74837b; font-size: 13px; }
.settlement-summary-card > strong { display: block; margin-top: 5px; color: #244b39; font-size: 21px; line-height: 1; }
.settlement-summary-card > small { display: block; margin-top: 6px; overflow: hidden; color: #8a9790; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.settlement-summary-card.active { border-color: #6fa58b; box-shadow: 0 0 0 2px rgba(23, 100, 71, .08); }
.settlement-summary-card.warning strong { color: #a76d16; }
.settlement-summary-card.danger strong { color: #a64236; }
.settlement-v2-history { padding: 0; overflow: hidden; }
.settlement-v2-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.settlement-v2-panel-head h2 { margin: 0; color: #1c3f31; font-size: 15px; }
.settlement-v2-panel-head h2 > span,
.settlement-step-number { color: #277054; font-size: 10px; letter-spacing: .08em; }
.settlement-v2-panel-head p { margin: 3px 0 0; color: #7b8982; font-size: 10px; }
.settlement-v2-toolbar { display: flex; align-items: end; gap: 7px; }
.settlement-batch-search { display: grid; gap: 3px; color: #687970; font-size: 9px; font-weight: 800; }
.settlement-batch-search input { width: 230px; min-height: 32px; padding: 6px 8px; font-size: 11px; }
.settlement-v2-toolbar button { min-height: 32px; padding: 6px 10px; }
.settlement-advanced-filter { margin: 0 14px 10px; border: 0; background: transparent; }
.settlement-advanced-filter > summary { padding: 4px 0; color: #577067; font-size: 10px; }
.settlement-advanced-filter > .settlement-status-tabs { padding: 7px 0 0; }
.settlement-batch-advanced-form {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr)) auto;
  gap: 7px;
  align-items: end;
}
.settlement-batch-advanced-form label { display: grid; gap: 3px; color: #687970; font-size: 9px; font-weight: 800; }
.settlement-batch-advanced-form input,
.settlement-batch-advanced-form select { min-height: 32px; padding: 6px 8px; font-size: 11px; }
.settlement-batch-advanced-form button { min-height: 32px; padding: 6px 10px; white-space: nowrap; }
.settlement-batch-filter-message { min-height: 16px; margin: 5px 0 0; color: #a64236; font-size: 10px; }
.settlement-batch-table-wrap { width: 100%; overflow: auto; border-top: 1px solid #e3eae6; }
.settlement-batch-table { width: 100%; min-width: 1280px; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.settlement-batch-table th,
.settlement-batch-table td { min-height: 38px; padding: 10px 7px; border-bottom: 1px solid #e8edea; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.settlement-batch-table th { color: #56675e; background: #f4f7f5; font-size: 12px; font-weight: 900; }
.settlement-batch-table tbody tr:hover { background: #f8fbf9; }
.settlement-batch-table th:nth-child(1) { width: 150px; }
.settlement-batch-table th:nth-child(2) { width: 210px; }
.settlement-batch-table th:nth-child(3) { width: 175px; }
.settlement-batch-table th:nth-child(4) { width: 55px; }
.settlement-batch-table th:nth-child(5),
.settlement-batch-table th:nth-child(6),
.settlement-batch-table th:nth-child(7) { width: 82px; }
.settlement-batch-table th:nth-child(8) { width: 145px; }
.settlement-batch-table th:nth-child(9) { width: 70px; }
.settlement-batch-table th:nth-child(10) { width: 115px; }
.settlement-batch-table th:nth-child(11) { width: 60px; }
.settlement-batch-table td:last-child button { min-height: 30px; padding: 5px 9px; font-size: 12px; }
.settlement-batch-link { max-width: 100%; padding: 0; border: 0; color: #176447; background: transparent; font: inherit; font-weight: 900; }
.settlement-batch-project { overflow: hidden; color: #2c493c; font-weight: 800; text-overflow: ellipsis; }
.settlement-platform-stack { display: grid; gap: 2px; min-width: 0; }
.settlement-platform-stack span { overflow: hidden; color: #66776e; font-size: 12px; text-overflow: ellipsis; }
.settlement-platform-stack b { color: #285e47; }
.settlement-batch-table .settlement-status { font-size: 12px; }
.settlement-status-waiting_our_invoice,
.settlement-status-waiting_platform_invoice,
.settlement-status-waiting_customer_payment { color: #235e88; background: #e8f2f8; }
.settlement-status-waiting_platform_payment { color: #86611c; background: #fff3d8; }
.settlement-status-draft { color: #5e6f67; background: #edf1ef; }

.settlement-v2-step { margin-bottom: 10px; padding: 0 14px 13px; }
.settlement-v2-step .settlement-v2-panel-head { padding-right: 0; padding-left: 0; }
.settlement-v2-step .settlement-filter-grid { grid-template-columns: minmax(220px, 1.3fr) repeat(6, minmax(120px, .7fr)) auto; }
.settlement-selection-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-bottom: 8px; }
.settlement-selection-summary > div { padding: 8px; border-radius: 6px; background: #edf4f0; }
.settlement-selection-summary span { color: #74837b; font-size: 9px; }
.settlement-selection-summary strong { display: block; margin-top: 3px; color: #20523d; font-size: 12px; }

.settlement-detail {
  inset: 14px 14px 14px max(calc(var(--sidebar-width) + 14px), 14px);
  padding: 0;
  background: #f6f9f7;
}
.settlement-detail-head {
  position: sticky;
  top: 0;
  z-index: 7;
  align-items: center;
  margin: 0;
  padding: 14px 16px;
  border-bottom: 1px solid #dce5e0;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(8px);
}
.settlement-detail-head h2 { font-size: 21px; }
.settlement-detail-meta { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px; }
.settlement-detail-meta span { display: grid; gap: 3px; min-width: 0; }
.settlement-detail-meta strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-platform-tabs { display: flex; gap: 5px; margin: 0 12px 8px; overflow-x: auto; }
.settlement-platform-tabs button {
  display: grid;
  gap: 2px;
  min-width: 135px;
  padding: 7px 10px;
  border: 1px solid #d7e1dc;
  border-radius: 7px;
  color: #5f7068;
  background: #fff;
  text-align: left;
}
.settlement-platform-tabs button strong { font-size: 11px; }
.settlement-platform-tabs button span { font-size: 9px; }
.settlement-platform-tabs button.active { color: #fff; border-color: #176447; background: #176447; }
.settlement-detail .settlement-platform-section { margin: 0 12px 12px; padding: 12px; }
.settlement-platform-section > header.settlement-platform-overview { grid-template-columns: minmax(150px, .45fr) minmax(0, 1.55fr); align-items: center; }
.settlement-platform-overview dl { grid-template-columns: repeat(6, minmax(70px, 1fr)); }
.settlement-content-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 11px 0 7px; }
.settlement-content-heading strong { color: #214a38; font-size: 12px; }
.settlement-content-heading span { color: #7a8981; font-size: 9px; }
.settlement-action-heading { margin-top: 12px; padding-top: 10px; border-top: 1px solid #e4eae7; }
.settlement-detail .settlement-followup-actions { padding: 10px; }
.settlement-detail-disclosure { margin: 8px 0 0; border: 1px solid #dfe7e2; border-radius: 7px; background: #f9fbfa; }
.settlement-detail-disclosure > summary { display: flex; justify-content: space-between; padding: 9px 11px; color: #315044; font-size: 10px; font-weight: 900; }
.settlement-detail-disclosure > summary span { color: #7c8a83; font-weight: 700; }
.settlement-detail-disclosure > div { padding: 0 9px 9px; }
.settlement-detail-disclosure .settlement-attachment-panel,
.settlement-detail-disclosure .settlement-timeline-panel { margin: 0; padding: 9px; border: 0; background: #fff; }
.settlement-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding: 9px 11px;
  border: 1px solid #efd4cf;
  border-radius: 7px;
  background: #fff7f5;
}
.settlement-danger-zone span { color: #8f6b64; font-size: 9px; }
.settlement-danger-zone button { padding: 4px 0; border: 0; color: #a04438; background: transparent; font-size: 10px; font-weight: 900; text-decoration: underline; }

@media (max-width: 1500px) {
  .settlement-summary-grid { grid-template-columns: repeat(3, 1fr); }
  .settlement-v2-step .settlement-filter-grid { grid-template-columns: repeat(4, minmax(150px, 1fr)); }
}
@media (max-width: 900px) {
  .settlement-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .settlement-v2-panel-head { align-items: stretch; flex-direction: column; }
  .settlement-v2-toolbar { justify-content: space-between; }
  .settlement-batch-search { flex: 1; }
  .settlement-batch-search input { width: 100%; }
  .settlement-batch-advanced-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .settlement-platform-section > header.settlement-platform-overview { grid-template-columns: 1fr; }
  .settlement-platform-overview dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .settlement-mode-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .settlement-mode-tabs button { min-width: 0; }
  .settlement-summary-grid { grid-template-columns: 1fr 1fr; }
  .settlement-detail-meta { grid-template-columns: 1fr 1fr; }
  .settlement-platform-overview dl { grid-template-columns: 1fr 1fr; }
  .settlement-danger-zone { align-items: flex-start; flex-direction: column; }
}

/* 结算跟进：多笔平台回款流水台账。 */
.settlement-receipt-workbench { display: grid; gap: 10px; min-width: 0; }
.settlement-receipt-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}
.settlement-receipt-metrics > div {
  padding: 10px 12px;
  border: 1px solid #dce7e1;
  border-radius: 7px;
  background: #fff;
}
.settlement-receipt-metrics span { display: block; color: #73857b; font-size: 11px; }
.settlement-receipt-metrics strong { display: block; margin-top: 4px; color: #174b35; font-size: 17px; }
.settlement-receipt-metrics .remaining { border-color: #e7d6b7; background: #fffaf1; }
.settlement-receipt-metrics .remaining strong { color: #9a6618; }
.settlement-receipt-progress { height: 6px; overflow: hidden; border-radius: 999px; background: #e3ebe7; }
.settlement-receipt-progress i { display: block; height: 100%; border-radius: inherit; background: #23815d; transition: width .2s ease; }
.settlement-receipt-progress-label { display: flex; justify-content: space-between; gap: 12px; margin-top: -4px; }
.settlement-receipt-progress-label strong { color: #265842; font-size: 12px; }
.settlement-receipt-progress-label span { color: #7c8c83; font-size: 11px; }
.settlement-receipt-entry {
  display: grid;
  gap: 9px;
  padding: 11px;
  border: 1px solid #cfe0d7;
  border-radius: 8px;
  background: #f4f9f6;
}
.settlement-receipt-entry > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.settlement-receipt-entry > header strong { color: #204e3a; font-size: 13px; }
.settlement-receipt-entry-grid { display: grid; grid-template-columns: repeat(4, minmax(130px, 1fr)); gap: 8px; }
.settlement-receipt-entry-grid label,
.settlement-receipt-admin label { display: grid; gap: 4px; color: #52685d; font-size: 11px; font-weight: 800; }
.settlement-receipt-entry-grid input,
.settlement-receipt-admin input {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid #cbd8d1;
  border-radius: 5px;
  background: #fff;
  color: #253b31;
  font-size: 12px;
}
.settlement-receipt-entry-grid .settlement-receipt-note { grid-column: span 2; }
.settlement-receipt-entry-grid .settlement-receipt-proof { min-height: 34px; font-size: 11px; }
.settlement-receipt-entry > .primary-button { justify-self: end; min-height: 35px; }
.settlement-receipt-history { min-width: 0; border-top: 1px solid #dfe7e2; padding-top: 9px; }
.settlement-receipt-history > header { display: flex; justify-content: space-between; margin-bottom: 7px; }
.settlement-receipt-history > header strong { color: #214b39; font-size: 13px; }
.settlement-receipt-history > header span { color: #839087; font-size: 10px; }
.settlement-receipt-ledger-scroll { max-width: 100%; overflow-x: auto; border: 1px solid #dfe7e2; border-radius: 7px; background: #fff; }
.settlement-receipt-ledger { width: 100%; min-width: 980px; border-collapse: collapse; font-size: 11px; }
.settlement-receipt-ledger th,
.settlement-receipt-ledger td { padding: 8px 9px; border-bottom: 1px solid #edf1ef; text-align: left; vertical-align: top; }
.settlement-receipt-ledger th { color: #5e7267; background: #f4f7f5; font-weight: 900; white-space: nowrap; }
.settlement-receipt-ledger td { color: #344c40; }
.settlement-receipt-ledger td:nth-child(7) { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.settlement-receipt-ledger td small,
.settlement-receipt-ledger td span { display: block; margin-top: 2px; color: #829087; font-size: 9px; }
.settlement-receipt-ledger td a { color: #176447; font-weight: 900; text-decoration: none; }
.settlement-receipt-ledger tr.receipt-voided,
.settlement-receipt-ledger tr.receipt-corrected { background: #fafafa; opacity: .72; }
.settlement-receipt-status { display: inline-flex !important; margin: 0 !important; padding: 2px 6px; border-radius: 999px; color: #176447 !important; background: #e7f3ec; font-weight: 900; white-space: nowrap; }
.settlement-receipt-status.voided,
.settlement-receipt-status.corrected { color: #7c706d !important; background: #efedec; }
.settlement-receipt-empty { margin: 0; padding: 15px; color: #7e8c84; border: 1px dashed #ccd9d2; border-radius: 7px; background: #fff; text-align: center; font-size: 11px; }
.settlement-receipt-no-proof { margin: 0 !important; font-size: 10px !important; }
.settlement-receipt-admin { position: relative; }
.settlement-receipt-admin > summary { color: #2b6650; cursor: pointer; font-weight: 900; white-space: nowrap; }
.settlement-receipt-admin > div {
  position: absolute;
  z-index: 8;
  right: 0;
  width: min(420px, 75vw);
  padding: 10px;
  border: 1px solid #cbd9d1;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(24, 64, 46, .18);
}
.settlement-receipt-admin form { display: grid; grid-template-columns: repeat(3, 1fr) auto; align-items: end; gap: 7px; }
.settlement-receipt-admin form + form { grid-template-columns: 1fr auto; margin-top: 9px; padding-top: 9px; border-top: 1px solid #eceeed; }
.settlement-receipt-admin form strong { grid-column: 1 / -1; color: #35594a; }
.settlement-receipt-void-button { min-height: 34px; padding: 6px 10px; border: 1px solid #e3b5ad; border-radius: 5px; color: #9b3e33; background: #fff4f2; font-weight: 900; }

@media (max-width: 1050px) {
  .settlement-receipt-entry-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}
@media (max-width: 650px) {
  .settlement-receipt-metrics { grid-template-columns: 1fr 1fr; }
  .settlement-receipt-entry-grid { grid-template-columns: 1fr; }
  .settlement-receipt-entry-grid .settlement-receipt-note { grid-column: auto; }
  .settlement-receipt-admin form,
  .settlement-receipt-admin form + form { grid-template-columns: 1fr; }
}

/* 管理员账号管理：紧凑、低干扰的内部管理台。 */
.user-admin-workspace { width: min(1440px, calc(100% - 34px)); padding-top: 34px; }
.user-admin-title { align-items: center; margin-bottom: 18px; }
.user-admin-title h1 { font-size: clamp(27px, 2.5vw, 35px); }
.user-admin-kicker {
  margin: 0 0 6px !important;
  color: #277054 !important;
  font-size: 10px !important;
  font-weight: 900;
  letter-spacing: .16em;
}
.user-admin-title-actions { display: flex; align-items: center; gap: 13px; }
.user-admin-title-actions .page-user { margin: 0; white-space: nowrap; }
.user-admin-title-actions .primary-button { min-height: 38px; padding: 8px 14px; }

.user-admin-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 1px;
  margin-bottom: 10px;
  overflow: hidden;
  border: 1px solid #dbe4df;
  border-radius: 9px;
  background: #dbe4df;
}
.user-admin-overview > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  padding: 10px 16px;
  background: #fff;
}
.user-admin-overview span { color: #75857d; font-size: 11px; font-weight: 700; }
.user-admin-overview strong { color: #1a553e; font-size: 24px; line-height: 1; }

.user-admin-panel {
  overflow: hidden;
  border: 1px solid #dce4e0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(24, 54, 40, .045);
}
.user-admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px 12px;
  border-bottom: 1px solid #edf1ef;
}
.user-admin-panel-head h2 { margin: 0 0 3px; color: #20382e; font-size: 16px; }
.user-admin-panel-head p { margin: 0; color: #7b8982; font-size: 10px; }
.user-admin-panel-head .order-message { color: #537064; font-size: 11px; }

.user-filter-form {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) 160px 160px 78px 70px;
  align-items: end;
  gap: 8px;
  padding: 12px 17px;
  background: #f8faf9;
}
.user-filter-form label { gap: 4px; color: #60736a; font-size: 10px; }
.user-filter-form input,
.user-filter-form select { min-height: 34px; padding: 6px 9px; border-radius: 6px; font-size: 11px; }
.user-filter-form button { min-height: 34px; padding: 6px 10px; font-size: 11px; box-shadow: none; }

.user-table-wrap { width: 100%; overflow-x: auto; }
.user-admin-table { width: 100%; min-width: 1000px; border-collapse: collapse; table-layout: fixed; }
.user-admin-table th,
.user-admin-table td {
  padding: 9px 11px;
  border-bottom: 1px solid #edf1ef;
  color: #40524a;
  text-align: left;
  font-size: 11px;
  vertical-align: middle;
}
.user-admin-table th {
  color: #687970;
  background: #fbfcfb;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}
.user-admin-table th:nth-child(1) { width: 18%; }
.user-admin-table th:nth-child(2) { width: 13%; }
.user-admin-table th:nth-child(3) { width: 9%; }
.user-admin-table th:nth-child(4) { width: 8%; }
.user-admin-table th:nth-child(5),
.user-admin-table th:nth-child(6) { width: 15%; }
.user-admin-table th:nth-child(7) { width: 22%; }
.user-admin-table tbody tr:hover { background: #f8fbf9; }
.user-admin-table tbody tr:last-child td { border-bottom: 0; }
.user-admin-table td:not(:last-child) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row-inactive { opacity: .67; }
.user-account-cell strong { color: #204f3b; font-size: 11px; }
.user-current-chip,
.user-role-chip,
.user-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}
.user-current-chip { margin-left: 6px; color: #256249; background: #e5f2e9; }
.user-role-admin { color: #75551f; background: #fff1ce; }
.user-role-employee { color: #3f6354; background: #eaf1ed; }
.user-status-active { color: #176447; background: #e2f3e8; }
.user-status-inactive { color: #7a807d; background: #ecefed; }
.user-row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.user-row-actions button {
  min-height: 27px;
  padding: 4px 7px;
  border: 1px solid #d6e0da;
  border-radius: 5px;
  color: #37604d;
  background: #fff;
  font-size: 9px;
  font-weight: 800;
}
.user-row-actions button:hover { border-color: #aacbbb; background: #edf6f0; }
.user-row-actions .user-action-danger { color: #9a463a; border-color: #ebc6c0; background: #fff6f4; }
.user-row-actions .user-action-enable { color: #176447; border-color: #b9d8c6; background: #eef8f2; }
.user-admin-empty { padding: 30px !important; color: #829088 !important; text-align: center !important; }

.user-admin-dialog {
  width: min(660px, calc(100vw - 28px));
  max-height: calc(100vh - 34px);
  padding: 0;
  overflow: auto;
  border: 1px solid #cad8d0;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 28px 90px rgba(16, 45, 32, .28);
}
.user-admin-dialog::backdrop { background: rgba(19, 40, 31, .42); backdrop-filter: blur(2px); }
.user-admin-form { padding: 18px; }
.user-admin-form > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.user-admin-form > header span { color: #2a7558; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.user-admin-form > header h2 { margin: 4px 0 0; color: #1e3c2f; font-size: 20px; }
.user-dialog-close {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  border: 0;
  border-radius: 50%;
  color: #63736b;
  background: #edf1ef;
  font-size: 20px;
  line-height: 1;
}
.user-admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.user-admin-form label { gap: 5px; font-size: 11px; }
.user-admin-form input,
.user-admin-form select { min-height: 38px; padding: 7px 9px; font-size: 12px; }
.user-admin-form label small { color: #73867c; font-size: 9px; }
.user-password-fields { display: grid; grid-template-columns: 1fr 1fr; grid-column: 1 / -1; gap: 12px; }
.user-password-fields[hidden] { display: none; }
.user-admin-form-note,
.user-password-warning {
  margin: 13px 0 0;
  padding: 8px 10px;
  border-radius: 6px;
  color: #665c48;
  background: #fff8e9;
  font-size: 10px;
  line-height: 1.55;
}
.user-password-warning { color: #315846; background: #edf6f0; }
.user-admin-form .order-message { min-height: 18px; margin: 9px 0 0; color: #a2483b; font-size: 10px; }
.user-admin-form > footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 13px; padding-top: 13px; border-top: 1px solid #edf1ef; }
.user-admin-form > footer button { min-height: 35px; padding: 7px 12px; font-size: 11px; }
.user-access-denied {
  display: grid;
  min-height: 55vh;
  place-content: center;
  padding: 30px;
  text-align: center;
}
.user-access-denied span { color: #a04b3d; font-size: 10px; font-weight: 900; letter-spacing: .15em; }
.user-access-denied h1 { margin: 8px 0; color: #273b32; }
.user-access-denied p { margin: 0; color: #75837c; font-size: 12px; }

@media (max-width: 980px) {
  .user-admin-title { align-items: flex-start; }
  .user-admin-title-actions { display: grid; justify-items: end; }
  .user-filter-form { grid-template-columns: minmax(220px, 1fr) 140px 140px; }
  .user-filter-form button { width: auto; }
}

@media (max-width: 680px) {
  .user-admin-workspace { width: min(100% - 20px, 1440px); padding-top: 22px; }
  .user-admin-title { display: grid; gap: 13px; }
  .user-admin-title-actions { display: flex; justify-content: space-between; width: 100%; }
  .user-admin-overview { grid-template-columns: 1fr 1fr; }
  .user-admin-overview > div { min-height: 52px; padding: 8px 11px; }
  .user-admin-overview strong { font-size: 20px; }
  .user-admin-panel-head { display: grid; }
  .user-filter-form { grid-template-columns: 1fr 1fr; }
  .user-filter-keyword { grid-column: 1 / -1; }
  .user-admin-form-grid,
  .user-password-fields { grid-template-columns: 1fr; }
}

/* 订单详情：退货处理工作台与退货历史。 */
.order-return-item-state {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #6e7a74;
  background: #edf1ef;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.order-return-item-state.is-partial { color: #875f20; background: #fff2d5; }
.order-return-item-state.is-full { color: #98483d; background: #fbe7e3; }
.order-return-item-state.is-processing { color: #805816; background: #fff0cf; }
.detail-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.25;
  font-weight: 800;
  white-space: nowrap;
}
.receipt-item-state.is-signed { color: #176447; background: #e4f3e9; }
.receipt-item-state.is-partial { color: #875f20; background: #fff2d5; }
.receipt-item-state.is-unsigned { color: #8b5f16; background: #fff0cf; }
.return-workbench {
  border-color: #c6dccf;
  background: linear-gradient(180deg, #f8fcf9 0%, #fff 100%);
  box-shadow: 0 10px 30px rgba(25, 73, 51, .06);
}
.return-workbench[hidden] { display: none; }
.return-workbench .panel-heading,
.return-history-section > .panel-heading,
.return-preview-panel .panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.return-workbench .panel-heading h2,
.return-history-section .panel-heading h2,
.return-preview-panel .panel-heading h3 { margin: 0; color: #234838; font-size: 15px; }
.return-workbench .panel-heading > button { min-height: 30px; padding: 5px 10px; }
.return-basic-grid {
  display: grid;
  grid-template-columns: 150px minmax(240px, 1.4fr) repeat(3, minmax(130px, .7fr));
  gap: 9px;
  margin: 12px 0;
}
.return-basic-grid label,
.return-inline-form label,
.return-preview-suppliers label { display: grid; gap: 4px; color: #52685d; font-size: 10px; font-weight: 800; }
.return-basic-grid input,
.return-inline-form input,
.return-inline-form select,
.return-preview-suppliers input,
.return-preview-suppliers select,
.return-select-table input[name="returnQuantityText"],
.return-attachment-upload select,
.return-card-actions input {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #ccd9d2;
  border-radius: 6px;
  color: #263e33;
  background: #fff;
  font: inherit;
  font-size: 11px;
  outline: none;
}
.return-select-table input[type="checkbox"] { accent-color: #176447; }
.return-basic-grid input:focus,
.return-inline-form input:focus,
.return-inline-form select:focus,
.return-preview-suppliers input:focus,
.return-preview-suppliers select:focus,
.return-select-table input[name="returnQuantityText"]:focus {
  border-color: #2e7759;
  box-shadow: 0 0 0 2px rgba(46, 119, 89, .12);
}
.return-workbench button,
.order-return-card button {
  border: 1px solid #c8d8d0;
  border-radius: 6px;
  color: #315b48;
  background: #f3f8f5;
  font-family: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: none;
}
.return-workbench button:hover,
.order-return-card button:hover { border-color: #8fb6a3; background: #e9f3ed; }
.return-workbench button:disabled,
.order-return-card button:disabled { cursor: not-allowed; opacity: .55; }
.return-workbench [data-preview-return],
.return-workbench [data-create-return],
.return-inline-form button[type="submit"],
.return-attachment-upload button[type="submit"],
.return-card-actions [data-complete-return] {
  border-color: #176447;
  color: #fff;
  background: #176447;
}
.return-workbench [data-preview-return]:hover,
.return-workbench [data-create-return]:hover,
.return-inline-form button[type="submit"]:hover,
.return-attachment-upload button[type="submit"]:hover,
.return-card-actions [data-complete-return]:hover { border-color: #0f5138; background: #0f5138; }
.return-card-actions .danger-button { border-color: #ebc5be; color: #9a4034; background: #fff3f1; }
.return-basic-wide { grid-column: span 2; }
.return-select-table td:nth-child(1) { width: 42px; text-align: center; }
.return-select-table td:nth-child(2) { min-width: 200px; }
.return-select-table td:nth-child(2) strong,
.return-select-table td:nth-child(2) span { display: block; }
.return-select-table td:nth-child(2) span { margin-top: 2px; color: #77857e; font-size: 10px; }
.return-select-table input[type="checkbox"] { width: 16px; height: 16px; }
.return-select-table input[name="returnQuantityText"] { width: 110px; min-height: 30px; padding: 4px 7px; }
.return-blocked-note { color: #9b4d3f; font-size: 10px; font-weight: 800; }
.return-workbench-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 11px; }
.return-workbench-actions > span { margin-right: auto; color: #8b593e; font-size: 10px; }
.return-workbench-actions button { min-height: 34px; padding: 7px 12px; }
.return-preview-panel { margin-top: 11px; padding: 12px; border: 1px solid #d9e4de; border-radius: 8px; background: #fff; }
.return-preview-panel .panel-heading > span,
.return-history-section > .panel-heading > span { color: #718078; font-size: 10px; }
.return-preview-metrics { display: grid; grid-template-columns: repeat(2, minmax(140px, 220px)); gap: 8px; margin: 10px 0; }
.return-preview-metrics > div { display: grid; gap: 2px; padding: 8px 10px; border-radius: 6px; background: #eef5f1; }
.return-preview-metrics span { color: #6c7d74; font-size: 10px; }
.return-preview-metrics strong { color: #1f5b43; font-size: 14px; }
.return-preview-suppliers { display: grid; gap: 7px; }
.return-preview-suppliers > div {
  display: grid;
  grid-template-columns: minmax(190px, 1.1fr) 180px 140px minmax(190px, 1fr);
  align-items: end;
  gap: 8px;
  padding: 9px;
  border: 1px solid #e2e9e5;
  border-radius: 7px;
}
.return-preview-suppliers > div > div { display: grid; gap: 3px; align-self: center; }
.return-preview-suppliers > div > div span { color: #718078; font-size: 10px; }
.return-history-list { display: grid; gap: 10px; margin-top: 10px; }
.return-empty-state { margin: 0; padding: 18px; color: #7b8982; text-align: center; background: #f7f9f8; border-radius: 7px; }
.order-return-card { padding: 12px; border: 1px solid #d8e3dd; border-left: 3px solid #2d7a5a; border-radius: 8px; background: #fff; }
.order-return-card.is-cancelled { opacity: .68; border-left-color: #9aa39f; }
.order-return-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.order-return-card > header > div { display: grid; gap: 2px; }
.order-return-card > header strong { color: #204c38; font-size: 13px; }
.order-return-card > header span { color: #738179; font-size: 10px; }
.return-status { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; white-space: nowrap; }
.return-status-processing, .return-status-pending, .return-status-partial { color: #825d22 !important; background: #fff1d4; }
.return-status-completed, .return-status-refunded { color: #176447 !important; background: #e4f2e9; }
.return-status-cancelled, .return-status-no_refund { color: #68736e !important; background: #edf0ee; }
.return-metrics { display: grid; grid-template-columns: repeat(4, minmax(120px, 1fr)); gap: 1px; margin: 10px 0; overflow: hidden; border: 1px solid #e1e8e4; border-radius: 7px; background: #e1e8e4; }
.return-metrics > div { display: grid; gap: 2px; padding: 8px 10px; background: #f8faf9; }
.return-metrics span { color: #718078; font-size: 9px; }
.return-metrics strong { color: #2b5140; font-size: 13px; }
.return-reason { margin: 8px 0; color: #53645b; font-size: 10px; line-height: 1.7; }
.return-item-list { display: flex; flex-wrap: wrap; gap: 5px; }
.return-item-list span { padding: 4px 7px; border-radius: 5px; color: #435b50; background: #f0f5f2; font-size: 10px; }
.return-supplier-list { display: grid; gap: 7px; margin-top: 9px; }
.return-supplier-card { padding: 10px; border: 1px solid #e0e7e3; border-radius: 7px; background: #fbfcfb; }
.return-supplier-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.return-supplier-summary > div { display: flex; align-items: center; gap: 7px; }
.return-supplier-summary strong { color: #2d4d3e; font-size: 11px; }
.return-supplier-summary dl { display: flex; gap: 16px; margin: 0; }
.return-supplier-summary dl > div { display: grid; gap: 1px; }
.return-supplier-summary dt { color: #7a8780; font-size: 9px; }
.return-supplier-summary dd { margin: 0; color: #2b5140; font-size: 11px; font-weight: 800; }
.return-inline-form { display: grid; grid-template-columns: 150px 120px minmax(200px, 1fr) auto auto; align-items: end; gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #dce5e0; }
.return-refund-form { grid-template-columns: 140px 140px 150px 160px minmax(180px, 1fr) auto auto; }
.return-inline-form button { min-height: 34px; padding: 6px 10px; font-size: 10px; }
.return-inline-form [data-return-form-message] { align-self: center; color: #925343; font-size: 9px; }
.return-receipt-list { margin: 8px 0 0; padding: 0; list-style: none; }
.return-receipt-list li { padding: 5px 7px; border-radius: 4px; color: #496055; background: #edf5f0; font-size: 9px; }
.return-receipt-list li.is-voided { text-decoration: line-through; opacity: .6; }
.return-attachment-block { margin-top: 9px; padding-top: 8px; border-top: 1px solid #e6ece9; }
.return-attachment-block > strong { color: #43594f; font-size: 10px; }
.return-attachment-block ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; padding: 0; list-style: none; }
.return-attachment-block li { display: flex; max-width: 320px; gap: 5px; font-size: 9px; }
.return-attachment-block li a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.return-attachment-block li span { color: #718078; white-space: nowrap; }
.return-attachment-upload { display: flex; align-items: center; gap: 6px; }
.return-attachment-upload select { width: 130px; min-height: 30px; padding: 4px 6px; font-size: 9px; }
.return-attachment-upload button { min-height: 30px; padding: 5px 8px; font-size: 9px; }
.return-attachment-upload .file-picker-name { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 9px; }
.return-card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 10px; padding-top: 9px; border-top: 1px solid #e6ece9; }
.return-card-actions input { width: min(260px, 32vw); min-height: 31px; padding: 5px 8px; font-size: 10px; }
.return-card-actions button { min-height: 31px; padding: 5px 9px; font-size: 10px; }
.return-card-actions [data-return-action-message] { margin-right: auto; color: #98503f; font-size: 9px; }
.stats-return-badge,
.stats-return-quantity {
  display: block;
  margin-top: 3px;
  color: #9a4d3f;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}
.stats-return-quantity { color: #7d6a42; font-weight: 700; }

/* 业务列表中的退货标识：用低饱和底色、左侧状态线和文字徽标共同表达。 */
.business-return-row > td { background: #fff8f7 !important; }
.business-return-row > td:first-child { box-shadow: inset 4px 0 0 #c95345; }
.business-return-row.status-full > td { background: #f8f3f2 !important; color: #6f625f; }
.business-return-row.status-full > td:first-child { box-shadow: inset 4px 0 0 #9f3f34; }
.business-return-row.status-processing > td { background: #fffaf0 !important; }
.business-return-row.status-processing > td:first-child { box-shadow: inset 4px 0 0 #c98a2e; }
.business-special-row > td { color: #6f2e28; background: #fff2f0 !important; }
.business-special-row > td:first-child { box-shadow: inset 4px 0 0 #b64035; }
.business-special-row.status-resolved > td { color: #665754; background: #fffaf9 !important; }
.business-special-row.status-resolved > td:first-child { box-shadow: inset 3px 0 0 #bb817a; }
.business-special-badge {
  display: inline-flex; align-items: center; width: auto; min-height: 22px; margin: 4px 0 0 6px; padding: 2px 7px;
  border: 1px solid #d48178; border-radius: 999px; color: #9b352c; background: #fff; text-decoration: none;
  font-size: 10px; font-weight: 900; white-space: nowrap;
}
.business-special-badge.status-processing { color: #fff; border-color: #b64035; background: #b64035; }
.business-special-badge.status-resolved { color: #8a4e48; border-color: #ca8b84; background: #fff; }
.business-return-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  min-height: 22px;
  margin-top: 4px;
  padding: 3px 8px;
  border: 1px solid #efc4bd;
  border-radius: 999px;
  color: #9c3f34;
  background: #fde9e6;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
}
.business-return-badge:hover { border-color: #cf7469; background: #f9d8d3; }
.business-return-badge.status-full { color: #842f28; background: #f3deda; }
.business-return-badge.status-processing { border-color: #e8ca91; color: #805816; background: #fff0cf; }
.compact-material-name > span { display: block; overflow: hidden; text-overflow: ellipsis; }
.stats-profit-return-note { display: block; margin-top: 3px; color: #a1483d; font-size: 9px; font-weight: 800; white-space: nowrap; }
#settlement-candidate-body .business-return-badge { cursor: default; pointer-events: none; }
.settlement-return-source { display: block; margin-top: 3px; color: #9a675f; font-size: 10px; font-weight: 700; white-space: nowrap; }

/* 结算跟进：正式同页工作台。 */
.settlement-unified-detail { inset: 8px 8px 8px max(calc(var(--sidebar-width) + 8px), 8px); background: #eef3f0; }
.settlement-unified-detail .settlement-detail-head { z-index: 12; }
.settlement-unified-detail .settlement-detail-meta { padding: 10px 12px; border: 1px solid #dce5e0; border-radius: 8px; background: #fff; }
.settlement-unified-detail .settlement-unified-platform-section { margin: 0 12px 18px; padding: 0; border: 0; background: transparent; box-shadow: none; }
.settlement-unified-detail .settlement-platform-overview { margin-bottom: 10px; padding: 12px; border: 1px solid #d9e4de; border-radius: 9px; background: #fff; }
.settlement-unified-detail .unified-stage-list { gap: 11px; }
.settlement-unified-detail .unified-stage-card { scroll-margin-top: 146px; }
.settlement-unified-detail .settlement-receipt-workbench { padding: 0; border: 0; background: transparent; }
.settlement-unified-detail .settlement-timeline-panel { margin: 12px 0 0; padding: 13px; border: 1px solid #d9e4de; border-radius: 10px; background: #fff; }
.settlement-unified-detail .settlement-timeline-panel > header { display: flex; align-items: center; justify-content: space-between; }
.settlement-unified-detail .settlement-timeline-panel ol { max-height: none; }
.settlement-unified-stage-attachment { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(360px, 1.3fr); align-items: center; gap: 10px; padding: 10px; border: 1px solid #dbe6e0; border-radius: 8px; background: #f7faf8; }
.settlement-unified-stage-attachment > div { display: grid; gap: 4px; min-width: 0; }
.settlement-unified-stage-attachment > div strong { color: #244d3b; font-size: 12px; }
.settlement-unified-stage-attachment > div span { color: #829087; font-size: 10px; }
.settlement-unified-stage-attachment > div a { overflow: hidden; color: #176447; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.settlement-unified-stage-attachment form { display: grid; grid-template-columns: minmax(220px, 1fr) auto; align-items: center; gap: 8px; }
.settlement-unified-stage-attachment .settlement-attachment-drop { min-height: 36px; }
.settlement-unified-detail [hidden] { display: none !important; }
.unified-split-body > .settlement-unified-stage-attachment { min-width: 0; grid-template-columns: 1fr; align-content: center; }
.unified-split-body > .settlement-unified-stage-attachment form { min-width: 0; grid-template-columns: minmax(0, 1fr) auto; }
.unified-source-table-wrap [data-normal-order-column] { min-width: 148px; }
.unified-source-table-wrap [data-normal-platform-order-number] { width: 100%; min-width: 132px; min-height: 34px; padding: 6px 8px; border: 1px solid #cbd9d2; border-radius: 6px; color: #233a2f; background: #fff; font-size: 11px; outline: none; }
.unified-source-table-wrap [data-normal-platform-order-number]:focus { border-color: #5f9c7f; box-shadow: 0 0 0 3px rgba(54, 133, 94, .1); }
.settlement-unified-completion { display: grid; grid-template-columns: minmax(240px, 1fr) auto; align-items: end; gap: 12px; }
.settlement-unified-completion > div { display: grid; gap: 4px; }
.settlement-unified-completion > div strong { color: #204f3a; font-size: 14px; }
.settlement-unified-completion > div span { color: #71847a; font-size: 10px; }
.settlement-batch-decision-note { margin: 0; padding: 10px 12px; border-left: 3px solid #438868; border-radius: 6px; color: #49685a; background: #f1f8f4; font-size: 11px; line-height: 1.6; }
.settlement-batch-decision { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid #cbded4; border-radius: 10px; background: #f4faf7; }
.settlement-batch-decision > div { display: grid; gap: 4px; }
.settlement-batch-decision span { color: #71847a; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.settlement-batch-decision h3 { margin: 0; color: #204f3a; font-size: 18px; }
.settlement-batch-decision p { margin: 0; color: #62776c; font-size: 10px; line-height: 1.6; }
.settlement-batch-decision.is-complete { border-color: #b9d7c7; background: #edf8f2; }
.settlement-batch-decision.is-cancelled { border-color: #dbdfdd; background: #f4f5f4; }
.settlement-batch-permission-note { color: #8c651f; font-size: 11px; }
.settlement-reopen-button { min-height: 36px; padding: 8px 12px; border: 1px solid #c46b5f; border-radius: 6px; color: #a64236; background: #fff8f6; font-weight: 900; cursor: pointer; }
.settlement-batch-admin-panel { margin-top: 12px; overflow: hidden; border: 1px solid #d5e0da; border-radius: 9px; background: #fff; }
.settlement-batch-admin-panel > summary { padding: 11px 13px; color: #49675a; background: #f5f8f6; font-size: 11px; font-weight: 900; cursor: pointer; }
.settlement-batch-admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 12px; border-top: 1px solid #e2e9e5; }
.settlement-batch-admin-grid form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; border: 1px solid #e0e8e4; border-radius: 8px; background: #fbfcfb; }
.settlement-batch-admin-grid h3 { grid-column: 1 / -1; margin: 0 0 2px; color: #284f3d; font-size: 13px; }
.settlement-batch-admin-grid label { display: grid; gap: 4px; color: #5e7368; font-size: 10px; font-weight: 800; }
.settlement-batch-admin-grid input,
.settlement-batch-admin-grid select,
.settlement-batch-admin-grid textarea { width: 100%; min-height: 34px; padding: 6px 8px; border: 1px solid #cbd9d2; border-radius: 6px; background: #fff; font: inherit; }
.settlement-batch-admin-grid textarea { resize: vertical; }
.settlement-batch-admin-grid button { align-self: end; }
.settlement-action-dialog { width: min(620px, calc(100% - 28px)); max-height: calc(100vh - 40px); padding: 0; overflow: auto; border: 1px solid #c9d8d1; border-radius: 12px; color: #263d32; background: #fff; box-shadow: 0 24px 70px rgba(8, 35, 24, .28); }
.settlement-action-dialog::backdrop { background: rgba(13, 35, 26, .52); backdrop-filter: blur(2px); }
.settlement-action-dialog form { display: grid; }
.settlement-action-dialog header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border-bottom: 1px solid #dfe8e3; background: #f7faf8; }
.settlement-action-dialog header span { color: #71847a; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.settlement-action-dialog h2 { margin: 3px 0 0; font-size: 18px; }
.settlement-action-dialog header button { width: 30px; height: 30px; border: 0; border-radius: 6px; color: #566b60; background: #e8efeb; font-size: 19px; cursor: pointer; }
.settlement-action-dialog-body { display: grid; gap: 10px; padding: 14px 16px 8px; }
.settlement-action-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.settlement-action-summary > div { display: grid; gap: 3px; padding: 10px 11px; border: 1px solid #dce7e1; border-radius: 7px; background: #f8faf9; }
.settlement-action-summary span,
.settlement-action-origin span { color: #71847a; font-size: 9px; }
.settlement-action-summary strong { color: #204f3a; font-size: 14px; font-variant-numeric: tabular-nums; }
.settlement-action-origin { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; padding: 10px 11px; border-left: 3px solid #c16a5f; border-radius: 6px; background: #fff7f5; }
.settlement-action-origin strong { font-size: 11px; }
.settlement-action-dialog-reason { display: grid; gap: 5px; margin: 8px 16px 0; color: #5d7166; font-size: 10px; font-weight: 900; }
.settlement-action-dialog-reason textarea { width: 100%; padding: 8px 9px; border: 1px solid #cbd9d2; border-radius: 6px; resize: vertical; font: inherit; }
.settlement-action-dialog-message { min-height: 16px; margin: 7px 16px 0; color: #a64236; font-size: 10px; }
.settlement-action-dialog footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 14px; }
.settlement-unified-sticky-actions { position: sticky; z-index: 8; bottom: 0; display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 12px; padding: 10px 12px; border: 1px solid #cadbd2; border-radius: 9px; background: rgba(255, 255, 255, .96); box-shadow: 0 -8px 22px rgba(23, 67, 49, .08); backdrop-filter: blur(8px); }
.settlement-unified-sticky-actions span { margin-right: auto; color: #6d8176; font-size: 11px; font-weight: 800; }
@media (max-width: 1100px) {
  .settlement-unified-stage-attachment,
  .settlement-unified-completion,
  .settlement-batch-admin-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .settlement-batch-decision { align-items: stretch; flex-direction: column; }
  .settlement-batch-admin-grid form,
  .settlement-action-summary { grid-template-columns: 1fr; }
}
.stats-order-return-history { scroll-margin-top: 18px; }
.stats-order-return-history > article { margin-top: 9px; padding: 11px; border: 1px solid #ead8d4; border-left: 3px solid #bd4d40; border-radius: 7px; background: #fff9f8; }
.stats-order-return-history > article > header { display: flex; justify-content: space-between; gap: 12px; }
.stats-order-return-history > article > header span { color: #7f6b66; font-size: 10px; }
.stats-order-return-history > article > p { margin: 7px 0; color: #5f514d; }
.stats-order-return-history > article > div { display: flex; flex-wrap: wrap; gap: 5px; }
.stats-order-return-history > article > div span { padding: 4px 7px; border-radius: 5px; background: #f6e9e6; font-size: 10px; }
.stats-order-return-history dl { display: flex; gap: 18px; margin: 9px 0 0; }
.stats-order-return-history dl div { display: grid; gap: 2px; }
.stats-order-return-history dt { color: #7d6b66; font-size: 9px; }
.stats-order-return-history dd { margin: 0; color: #6f332d; font-weight: 900; }

@media (max-width: 1200px) {
  .return-basic-grid { grid-template-columns: repeat(3, minmax(130px, 1fr)); }
  .return-preview-suppliers > div { grid-template-columns: 1fr 1fr; }
  .return-inline-form,
  .return-refund-form { grid-template-columns: repeat(2, minmax(150px, 1fr)); }
}
@media (max-width: 760px) {
  .return-basic-grid,
  .return-preview-suppliers > div,
  .return-inline-form,
  .return-refund-form { grid-template-columns: 1fr; }
  .return-basic-wide { grid-column: auto; }
  .return-metrics { grid-template-columns: 1fr 1fr; }
  .return-supplier-summary { align-items: flex-start; flex-direction: column; }
  .return-supplier-summary dl { width: 100%; justify-content: space-between; }
  .return-card-actions { flex-wrap: wrap; }
  .return-card-actions input { width: 100%; }
}
