.record-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--forest2);
  font: 700 11px ui-monospace, SFMono-Regular, Menlo, monospace;
  text-decoration: underline;
  text-decoration-color: #b9c9c0;
  text-underline-offset: 4px;
}
.record-link:hover { color: #0b6b49; text-decoration-color: var(--forest2); }
.metric-link { width: 100%; color: inherit; text-align: left; cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.metric-link:hover { transform: translateY(-2px); border-color: #9cb4a7; box-shadow: 0 10px 28px rgba(18, 32, 27, .09); }
.pipeline-link { border: 0; background: transparent; padding: 0; cursor: pointer; color: inherit; }
.pipeline-link:hover .bar { filter: brightness(1.12); }
.dashboard-approval { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; cursor: pointer; }
.dashboard-approval:hover { color: var(--forest2); }
.payout-scroll { max-height: 430px; overflow: auto; }
.batch-contracts { display: grid; gap: 8px; max-height: 260px; overflow: auto; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f4; }
.batch-contracts > strong { font-size: 11px; }
.batch-contracts label { display: flex; grid-template-columns: none; align-items: center; gap: 9px; padding: 8px; border-radius: 7px; background: white; }
.detail-dialog {
  width: min(760px, 94vw);
  height: 100vh;
  max-height: 100vh;
  margin: 0 0 0 auto;
  border: 0;
  padding: 0;
  background: var(--white);
  box-shadow: -24px 0 70px rgba(18, 32, 27, .22);
}
.detail-dialog::backdrop { background: rgba(12, 27, 21, .35); backdrop-filter: blur(2px); }
.detail-card { min-height: 100%; padding: 30px 34px 50px; overflow: auto; }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.detail-head h3 { font: 500 29px Georgia, "Songti SC", serif; margin: 0; }
.detail-actions { display: flex; gap: 9px; flex-wrap: wrap; padding: 18px 0; }
.danger-button { border: 1px solid #e0b8b4; background: #fff8f6; color: var(--red); border-radius: 8px; padding: 10px 15px; font-weight: 800; font-size: 11px; }
.detail-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 4px 0 22px; }
.detail-facts > div { background: var(--white); padding: 14px; min-height: 72px; display: grid; align-content: center; gap: 5px; }
.detail-facts small, .related-list small { font-size: 9px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.detail-facts strong { font-size: 12px; overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid var(--line); padding: 22px 0; }
.related-list { display: grid; gap: 8px; }
.related-list article { border: 1px solid var(--line); border-radius: 10px; background: #faf9f4; padding: 13px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.related-list span { display: grid; gap: 4px; font-size: 11px; overflow-wrap: anywhere; }
.timeline { display: grid; gap: 0; }
.timeline > div { display: grid; grid-template-columns: 18px 1fr; gap: 8px; position: relative; padding-bottom: 16px; }
.timeline > div::before { content: ""; position: absolute; width: 1px; background: var(--line); left: 5px; top: 10px; bottom: -3px; }
.timeline > div:last-child::before { display: none; }
.timeline i { width: 11px; height: 11px; border: 3px solid #bdd061; border-radius: 50%; background: var(--forest); z-index: 1; margin-top: 3px; }
.timeline p { margin: 0; display: grid; gap: 3px; }
.timeline strong { font-size: 11px; }
.timeline span { font-size: 9px; color: var(--muted); }
.timeline em { font-size: 11px; font-style: normal; color: #526159; }
.finance-stack { display: grid; gap: 16px; margin-top: 16px; }
.pending-pool { margin-bottom: 16px; }
.quote-lines { border-top: 1px solid var(--line); padding-top: 16px; }
#quote-line-list { display: grid; gap: 12px; margin-top: 12px; }
.quote-line { display: grid; grid-template-columns: 1.2fr 1.8fr .7fr .8fr .8fr; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f4; }
.quote-line-head { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.quote-line-head strong { font-size: 11px; letter-spacing: .04em; }
.attachment-list { display: grid; gap: 8px; }
.attachment-list a { display: grid; grid-template-columns: 1fr auto; gap: 4px 18px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 9px; background: #faf9f4; color: var(--ink); text-decoration: none; }
.attachment-list a:hover { border-color: #91a89c; background: #f5f8f5; }
.attachment-list strong { font-size: 11px; overflow-wrap: anywhere; }
.attachment-list span { grid-column: 1; color: var(--muted); font-size: 9px; }
.attachment-list em { grid-column: 2; grid-row: 1 / 3; color: var(--forest2); font-size: 10px; font-style: normal; font-weight: 800; }
.list-controls { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; padding: 14px; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f4; }
.filter-fields, .view-tools { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.filter-fields label { display: grid; gap: 4px; color: var(--muted); font-size: 9px; font-weight: 800; }
.filter-fields input, .filter-fields select, .view-tools select { min-width: 112px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 7px; background: white; font-size: 10px; }
.list-summary { display: flex; justify-content: space-between; align-items: center; padding: 7px 4px 10px; color: var(--muted); font-size: 10px; }
.list-summary div { display: flex; gap: 12px; align-items: center; }
.list-summary button:disabled { opacity: .35; pointer-events: none; }
.batch-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; min-height: 42px; padding: 8px 12px; margin-bottom: 8px; border: 1px solid #d9e2dc; border-radius: 9px; background: #f4f8f5; font-size: 10px; }
.batch-bar span { margin-right: auto; color: var(--muted); }
.batch-bar select { height: 34px; border: 1px solid var(--line); border-radius: 7px; background: white; padding: 0 9px; font-size: 10px; }
.batch-bar button:disabled { opacity: .4; pointer-events: none; }
.notice-list { display: grid; gap: 10px; }
.notice { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border: 1px solid var(--line); border-left: 4px solid #99a79f; border-radius: 10px; background: var(--white); }
.notice.high { border-left-color: var(--amber); }
.notice.critical { border-left-color: var(--red); }
.notice.read { opacity: .58; }
.notice h3 { margin: 4px 0; font-size: 13px; }
.notice p { margin: 0 0 5px; color: #526159; font-size: 11px; }
.notice small, .notice span { color: var(--muted); font-size: 9px; letter-spacing: .06em; }
.fulfillment-entry { display: grid; grid-template-columns: auto minmax(180px, 1fr) 120px 120px; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #e5e9e6; }
.fulfillment-entry > span { display: grid; gap: 3px; }
.fulfillment-entry small { color: var(--muted); }
.fulfillment-entry input[type="checkbox"] { width: 18px; height: 18px; }
.expense-entry { grid-template-columns: minmax(150px, 1.5fr) minmax(110px, 1fr) 120px auto auto !important; margin-top: 8px; }
.expense-entry > span { color: var(--muted); font-size: 10px; }
.global-search-wrap { position: relative; }
.global-search-results { position: absolute; z-index: 80; top: calc(100% + 8px); right: 0; width: min(420px, 82vw); max-height: 430px; overflow: auto; padding: 7px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 18px 45px rgba(19, 45, 34, .18); }
.global-search-results > button { display: grid; width: 100%; gap: 3px; padding: 11px 12px; border: 0; border-bottom: 1px solid #edf0ee; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.global-search-results > button:hover { background: #f1f6f3; }
.global-search-results > button span { color: var(--muted); font-size: 10px; }
[hidden] { display: none !important; }
@media (max-width: 620px) {
  .detail-card { padding: 22px 18px 40px; }
  .detail-facts { grid-template-columns: 1fr 1fr; }
  .related-list article { grid-template-columns: 1fr 1fr; }
  .quote-line { grid-template-columns: 1fr 1fr; }
  .fulfillment-entry { grid-template-columns: auto 1fr; }
  .fulfillment-entry > input[type="number"] { grid-column: 2; }
  .expense-entry { grid-template-columns: 1fr !important; }
}
