:root {
  --font-sans: "Pretendard Variable", Pretendard, "Noto Sans KR", "Malgun Gothic", -apple-system, BlinkMacSystemFont, system-ui, "Segoe UI", sans-serif;
  --ink: #191917;
  --charcoal: var(--ink);
  --muted: #696860;
  --paper: #f2f0e9;
  --ivory: var(--paper);
  --surface: #fbfaf6;
  --surface-2: #e5e2d8;
  --forest: #191917;
  --forest-2: #30302c;
  --sage: #e2dfd5;
  --orange: #9a5f3e;
  --orange-pale: #eee2d8;
  --blue: #50504a;
  --red: #a84842;
  --line: #d5d1c6;
  --line-strong: var(--line);
  --line-soft: var(--line);
  --orange-dark: var(--orange);
  --danger: var(--red);
  --shadow: 0 18px 45px rgba(25, 25, 23, 0.08);
  --radius: 18px;
  --radius-lg: var(--radius);
}

/* Completed-project ratings share the project surface, including half-star input. */
.project-title-line { display:flex; align-items:center; flex-wrap:wrap; gap:10px 14px; min-width:0; }
.project-title-line h2 { min-width:0; overflow-wrap:anywhere; }
.project-rating-badge { display:inline-flex; align-items:center; flex-wrap:wrap; gap:5px; padding:6px 10px; border:1px solid var(--line); border-radius:9px; background:var(--surface); color:var(--ink); font-size:15px; font-weight:750; line-height:1.4; }
.project-rating-badge > span { color:#a16318; }
.project-rating-badge small { color:var(--muted); font-size:13px; font-weight:500; }
.project-hub-head .project-rating-badge { color:var(--ink); }
.project-hub-head .project-rating-badge > span { color:#a16318; }
.project-rating-panel { margin:18px 0 24px; padding:22px; background:var(--surface); border:1px solid var(--line); border-top:3px solid var(--orange); border-radius:14px; }
.rating-panel-head,.rating-total,.rating-actions { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.rating-panel-head { justify-content:space-between; gap:16px; }
.rating-panel-head .eyebrow { margin:0 0 10px; font-size:14px; }
.rating-total > strong { color:var(--ink); font-size:28px; line-height:1.3; }
.rating-total > strong small { color:var(--muted); font-size:16px; font-weight:500; }
.rating-total > span:last-child { color:var(--muted); font-size:14px; }
.rating-stars { --rating-star-size:26px; display:inline-block; position:relative; font-family:Arial,sans-serif; font-size:23px; line-height:1.2; letter-spacing:0; white-space:nowrap; color:#d0cec5; vertical-align:middle; width:calc(var(--rating-star-size) * 5); }
.rating-stars > span:first-child { display:flex; }
.rating-stars-fill { position:absolute; inset:0 auto 0 0; overflow:hidden; color:#a16318; }
.rating-notice,.rating-alert { padding:12px 14px; border-radius:9px; font-size:14px; line-height:1.65; margin:16px 0 12px; background:var(--orange-pale); color:var(--ink); }
.rating-alert { color:var(--red); border:1px solid var(--red); background:var(--surface); font-weight:650; }
.rating-method { color:var(--muted); font-size:14px; line-height:1.7; margin:12px 0 0; }
.rating-roster { display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; }
.rating-roster > span { font-size:13px; padding:6px 10px; border-radius:7px; background:var(--surface-2); color:var(--muted); }
.rating-roster > .submitted { color:var(--ink); border:1px solid var(--line); background:var(--surface); }
.rating-detail { border-top:1px solid var(--line); margin-top:16px; padding-top:4px; }
.rating-detail > summary,.rating-review > summary { cursor:pointer; font-size:14px; padding:12px 0; min-height:44px; }
.rating-criteria-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.rating-criteria-summary > div { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:10px 0; border-bottom:1px solid var(--line); font-size:14px; }
.rating-criteria-summary b { white-space:nowrap; }
.rating-review { padding:10px 0; border-bottom:1px solid var(--line); }
.rating-review-title { display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:14px; }
.rating-review-title > span { display:flex; align-items:center; gap:10px; }
.rating-review-title .rating-stars { font-size:18px; }
.rating-comment { font-size:15px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.rating-review > small { display:block; margin-top:12px; color:var(--muted); font-size:13px; }
.rating-candidates { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.rating-candidates > label { display:flex; align-items:center; gap:12px; border:1px solid var(--line); padding:12px; min-height:56px; border-radius:9px; cursor:pointer; }
.rating-candidates small { display:block; margin-top:3px; color:var(--muted); font-size:13px; }
.rating-candidates input,.rating-na input,.rating-flags input { width:20px; height:20px; accent-color:var(--orange); flex:none; }
.rating-form-intro p { margin:0 0 12px; font-size:15px; line-height:1.7; }
.rating-fields { display:grid; gap:18px; margin:20px 0; }
.rating-field { min-width:0; margin:0; padding:16px; border:1px solid var(--line); border-radius:10px; }
.rating-field legend,.rating-flags legend { padding:0 6px; font-size:16px; font-weight:700; }
.rating-field > p { font-size:14px; line-height:1.65; color:var(--muted); margin:2px 0 14px; }
.rating-star-picker { width:250px; max-width:100%; height:50px; position:relative; margin:4px 0 10px; }
.rating-star-picker .rating-stars { --rating-star-size:50px; position:absolute; inset:0; width:100%; font-size:43px; line-height:50px; letter-spacing:0; }
.rating-star-picker .rating-stars > span { letter-spacing:0; width:100%; }
.rating-stars .rating-star-glyphs,.rating-star-picker .rating-stars > .rating-star-glyphs { display:flex; width:calc(var(--rating-star-size) * 5); }
.rating-star-glyphs > i { display:block; font-style:normal; width:var(--rating-star-size); flex:none; text-align:center; }
.rating-star-picker .rating-stars-fill { width:0; white-space:nowrap; }
.rating-star-options { display:grid; grid-template-columns:repeat(10,1fr); position:absolute; inset:0; }
.rating-star-options label { cursor:pointer; display:block; height:50px; min-width:0; border-radius:4px; }
.rating-star-options label:focus-within { outline:2px solid var(--ink); outline-offset:2px; }
.rating-star-options input,.rating-star-options .sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.rating-score-controls { display:flex; align-items:center; flex-wrap:wrap; gap:12px; font-size:14px; }
.rating-select-label { display:flex; align-items:center; gap:8px; white-space:nowrap; flex:none; }
.rating-select-label select { width:auto; min-height:44px; padding:6px 10px; border:1px solid var(--line); border-radius:7px; background:var(--surface); color:var(--ink); font-size:16px; }
.rating-na { display:flex; align-items:center; gap:8px; min-height:44px; cursor:pointer; }
.rating-score-controls output { min-width:60px; color:var(--orange); font-size:15px; font-weight:700; }
.rating-flags { padding:12px; border:1px solid var(--line); border-radius:9px; margin:20px 0; }
.rating-flags label { display:flex; align-items:center; gap:10px; min-height:44px; font-size:15px; }
.rating-only-head > div { max-width:100% !important; }
@media (max-width:640px) {
  .project-rating-panel { padding:16px; margin:14px 0 18px; }
  .rating-panel-head { align-items:flex-start; }
  .rating-actions { width:100%; }
  .rating-actions .btn { flex:1; min-height:44px; }
  .rating-criteria-summary,.rating-candidates { grid-template-columns:minmax(0,1fr); }
  .rating-field { padding:12px; }
  .rating-star-picker { width:240px; }
  .rating-star-picker .rating-stars { --rating-star-size:48px; font-size:41px; }
  .project-title-line { gap:8px; }
  .project-rating-badge { font-size:14px; }
}

/* 견적서 6단계 자동 분류 · 폐기 승인 흐름 */
.quote-stage-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 18px 0;
}
.quote-stage-tabs button {
  min-width: 0;
  position: relative;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.quote-stage-tabs button em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 22px;
  margin-top: 7px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(19, 21, 19, .08);
  color: inherit;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.quote-stage-tabs button[aria-selected="true"] em { background: rgba(255,255,255,.17); }
.sales-quote-state { flex-wrap: wrap; gap: 7px; }
.quote-revision-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e8edf3;
  color: #32485c;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.quote-workflow-reason,
.quote-pending-request,
.quote-discard-reason {
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  background: #f1efe8;
  color: #55564f;
  font-size: 12px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  word-break: keep-all;
}
.quote-pending-request { background: #fff3dc; color: #745523; }
.quote-discard-block { margin-top: 12px; padding: 11px 12px; border: 1px solid #dec6bf; border-radius: 12px; color: #75453e; background: #f8ece8; font-size: 12px; line-height: 1.55; }
.quote-discard-block b,
.quote-discard-block span { display: block; }
.quote-pending-request b,
.quote-pending-request span,
.quote-discard-reason b,
.quote-discard-reason span { display: block; }
.sales-quote-card.discarded { border-color: #cdb2ab; background: #fbf7f5; }
.sales-quote-card.discarded .sales-quote-state { background: #76554d; color: #fff; }
.quote-discard-record dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 0;
}
.quote-discard-record dl > div {
  min-width: 0;
  padding: 12px;
  border-radius: 12px;
  background: #f3f1eb;
}
.quote-discard-record dl > div.full { grid-column: 1 / -1; }
.quote-discard-record dt { color: #77776f; font-size: 11px; font-weight: 800; }
.quote-discard-record dd { margin: 5px 0 0; color: #191b19; font-weight: 800; overflow-wrap: anywhere; word-break: keep-all; }
.quote-pending-review-queue { display: grid; grid-template-columns: minmax(220px, .42fr) minmax(0, 1fr); gap: 16px; margin: 18px 0; padding: 20px; border: 1px solid #d6b47a; border-radius: 18px; background: #fff7e8; }
.quote-pending-review-queue h2 { margin: 5px 0 7px; font-size: 19px; }
.quote-pending-review-queue > div:first-child > span { color: #6f624d; font-size: 12px; line-height: 1.55; }
.quote-pending-review-queue > div:last-child { display: grid; gap: 9px; }
.quote-pending-review-queue article { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 12px 13px; border: 1px solid #e1d2b6; border-radius: 13px; background: #fffdf8; }
.quote-pending-review-queue article > div { display: grid; gap: 3px; min-width: 0; }
.quote-pending-review-queue article small,
.quote-pending-review-queue article span { color: #6f6a5f; font-size: 11px; overflow-wrap: anywhere; }
.quote-pending-review-queue article p { margin: 2px 0 0; font-size: 12px; overflow-wrap: anywhere; word-break: keep-all; }
.quote-action-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; margin-bottom: 16px; }
.quote-action-summary > div { min-width: 0; padding: 12px 13px; border: 1px solid var(--line); border-radius: 12px; background: #f4f2ec; }
.quote-action-summary > div.full { grid-column: 1 / -1; background: #fff3dc; border-color: #dfc18b; }
.quote-action-summary span,
.quote-action-summary strong,
.quote-action-summary small { display: block; overflow-wrap: anywhere; word-break: keep-all; }
.quote-action-summary span { color: #727169; font-size: 10px; font-weight: 800; }
.quote-action-summary strong { margin-top: 5px; font-size: 14px; }
.quote-action-summary small { margin-top: 4px; color: #66655f; font-size: 11px; line-height: 1.45; }
.quote-discard-detail { margin-top: 18px; }
.quote-discard-detail h3 { margin: 16px 0 8px; font-size: 14px; }
.quote-discard-table-wrap { max-height: min(42vh, 420px); overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.quote-discard-table-wrap table { width: 100%; border-collapse: collapse; font-size: 11px; }
.quote-discard-table-wrap th,
.quote-discard-table-wrap td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.quote-discard-table-wrap th { position: sticky; top: 0; z-index: 1; color: #fff; background: var(--ink); }
.quote-discard-table-wrap td:last-child,
.quote-discard-table-wrap th:last-child { text-align: right; white-space: nowrap; }
.quote-discard-table-wrap td small { display: block; margin-top: 3px; color: #74736b; }
.quote-discard-detail ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.quote-discard-detail li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #f3f1eb; font-size: 11px; }
.quote-discard-detail > p { margin: 12px 0 0; color: #68675f; font-size: 11px; line-height: 1.55; }

@media (max-width: 1100px) {
  .quote-stage-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .quote-stage-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-discard-record dl { grid-template-columns: 1fr; }
  .quote-discard-record dl > div.full { grid-column: auto; }
  .quote-pending-review-queue { grid-template-columns: 1fr; padding: 15px; }
  .quote-pending-review-queue article { align-items: stretch; flex-direction: column; }
  .quote-pending-review-queue article .btn { width: 100%; }
  .quote-action-summary { grid-template-columns: 1fr; }
  .quote-action-summary > div.full { grid-column: auto; }
  .quote-discard-detail li { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 360px) {
  .quote-stage-tabs { grid-template-columns: 1fr; }
}

/* Payment request control */
.payment-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 22px;
}
.payment-hero h2 { margin: 6px 0 10px; max-width: 760px; font-size: clamp(25px, 3vw, 40px); line-height: 1.12; }
.payment-hero span { color: rgba(242, 240, 233, .68); }
.payment-link-mark { display: grid; justify-items: end; gap: 7px; white-space: nowrap; }
.payment-link-mark b { display: grid; place-items: center; width: 58px; height: 58px; color: var(--ink); background: var(--paper); border-radius: 50%; font-size: 13px; }
.payment-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.payment-summary article { display: grid; gap: 7px; padding: 20px 22px; background: #fffdf8; border: 1px solid var(--line); border-radius: 16px; }
.payment-summary span { color: var(--muted); font-size: 12px; }
.payment-summary strong { font-size: 24px; }
.payment-flow { display: flex; align-items: center; gap: 10px; padding: 15px 18px; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 14px; overflow-x: auto; }
.payment-flow span { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; font-weight: 750; }
.payment-flow span b { display: grid; place-items: center; width: 23px; height: 23px; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 10px; }
.payment-flow i { flex: 1 0 24px; height: 1px; background: var(--line); }
.payment-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.payment-card { display: grid; gap: 11px; min-height: 230px; padding: 22px; text-align: left; background: #fffdf8; border: 1px solid var(--line); border-left: 4px solid #8c8b84; border-radius: 16px; transition: transform .16s ease, border-color .16s ease; }
.payment-card:hover { transform: translateY(-2px); border-color: var(--ink); }
.payment-card.status-approved { border-left-color: #b76f34; }
.payment-card.status-paid { border-left-color: #2c6b50; }
.payment-card.status-needs_review, .payment-card.status-rejected, .payment-card.status-cancelled { border-left-color: #a14437; }
.payment-card-head, .payment-card-foot, .payment-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.payment-card-head > span, .payment-card > small { color: var(--muted); font-size: 11px; }
.payment-card h2 { margin: 3px 0 0; font-size: 20px; }
.payment-card p { min-height: 38px; margin: 0; color: #55534d; font-size: 13px; line-height: 1.45; overflow: hidden; }
.payment-card-meta { justify-content: flex-start; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.payment-card-meta span + span::before { content: "·"; margin-right: 8px; }
.payment-card-foot strong { font-size: 20px; }
.payment-tax { padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.payment-tax.confirmed { color: #205d45; background: #e3f0e8; }
.payment-tax.pending { color: #8a3c2f; background: #f5e2dd; }
.payment-tax.optional { color: #66635c; background: #eceae3; }
.payment-scope-note { display: grid; grid-column: 1 / -1; gap: 5px; padding: 14px 16px; background: #eeeae0; border-left: 3px solid var(--ink); }
.payment-scope-note span { color: var(--muted); font-size: 12px; line-height: 1.5; }
.payment-amount { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 18px 20px; margin-top: 18px; color: var(--paper); background: var(--ink); border-radius: 14px; }
.payment-amount span { color: rgba(242, 240, 233, .65); font-size: 12px; }
.payment-amount strong { font-size: 28px; }
.payment-amount small { flex-basis: 100%; color: #f2b25f; font-size: 11px; text-align: right; }
.payment-amount.corrected { flex-wrap: wrap; box-shadow: inset 4px 0 0 #f28a2e; }
.payment-correction-notice, .quote-link-permission { display: grid; gap: 5px; padding: 14px 16px; margin-bottom: 14px; background: #fff5e7; border: 1px solid #efcda2; border-radius: 12px; }
.payment-correction-notice span, .quote-link-permission span { color: #4f453a; font-size: 12px; line-height: 1.55; }
.quote-link-permission small { color: var(--muted); font-size: 11px; }
.payment-correction-history { display: grid; gap: 9px; }
.payment-correction-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 14px; background: #fffdf8; border: 1px solid var(--line); border-radius: 11px; }
.payment-correction-row > div { display: grid; gap: 4px; min-width: 0; }
.payment-correction-row span, .payment-correction-row small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.payment-correction-row.approved { border-left: 4px solid #2f7657; }
.payment-correction-row.rejected { opacity: .72; border-left: 4px solid #8a3e36; }
.payment-correction-row.submitted { border-left: 4px solid #d77d24; }
.payment-correction-review { display: grid; grid-template-columns: 1fr auto auto 1fr; gap: 8px 12px; align-items: end; padding: 18px; margin-bottom: 16px; background: var(--ink); color: var(--paper); border-radius: 12px; }
.payment-correction-review span { color: rgba(242, 240, 233, .65); font-size: 10px; }
.payment-correction-review b, .payment-correction-review strong { font-size: 20px; }
.payment-correction-review i { grid-row: 1 / span 2; align-self: center; font-style: normal; color: #f2b25f; }
.payment-correction-review small, .payment-correction-review p { grid-column: 1 / -1; margin: 0; }
.payment-correction-review p { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.14); line-height: 1.55; }
.payment-description { padding: 16px; margin: 0; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; line-height: 1.65; }
.payment-attachments { display: grid; gap: 8px; }
.payment-attachment { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px; color: inherit; background: #fffdf8; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; }
.payment-attachment b { display: grid; place-items: center; width: 36px; height: 36px; color: var(--paper); background: var(--ink); border-radius: 8px; font-size: 10px; }
.payment-attachment small { color: var(--muted); }
.payment-review-note, .payment-paid-stamp { display: grid; gap: 5px; padding: 15px 17px; margin-top: 14px; border-radius: 12px; }
.payment-review-note { background: #f2e9df; }
.payment-paid-stamp { color: #dcece3; background: #214c3b; }
.payment-review-note p, .payment-paid-stamp span, .payment-paid-stamp p { margin: 0; font-size: 12px; line-height: 1.5; }
.payment-pay-confirm { display: grid; grid-template-columns: 1fr auto; gap: 5px 14px; padding: 16px; margin-bottom: 16px; color: var(--paper); background: var(--ink); border-radius: 12px; }
.payment-pay-confirm span { grid-column: 1 / -1; color: rgba(242, 240, 233, .6); font-size: 10px; }
.payment-pay-confirm b { font-size: 20px; }
.payment-project-row { width: 100%; text-align: left; }
.calendar-event.payment { color: #542f17; background: #efd5bf; border-left-color: #b96d38; }
.calendar-event.payment.paid { color: #184934; background: #dcebe2; border-left-color: #2f7555; }
.calendar-legend i.payment { background: #b96d38; }
.work-payment-event { display: grid; gap: 2px; width: 100%; padding: 7px 8px; text-align: left; color: #61351a; background: #efd5bf; border: 0; border-left: 3px solid #b96d38; border-radius: 7px; }
.work-payment-event.paid { color: #174934; background: #dcebe2; border-left-color: #2f7555; }
.work-payment-event span { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.work-payment-event b { overflow: hidden; font-size: 9px; font-weight: 600; opacity: .7; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 980px) {
  .payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .payment-hero { align-items: flex-start; padding: 24px 20px; }
  .payment-link-mark { display: none; }
  .payment-summary { grid-template-columns: 1fr; }
  .payment-summary article { grid-template-columns: 1fr auto; align-items: center; }
  .payment-summary article strong { grid-row: 1 / 3; grid-column: 2; }
  .payment-grid { grid-template-columns: 1fr; }
  .payment-flow { margin-inline: -2px; }
  .payment-card { min-height: 0; }
  .payment-amount { align-items: flex-start; flex-direction: column; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(440px, 0.92fr);
  background: var(--paper);
}

.login-story {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 54px clamp(48px, 6vw, 96px) 44px;
  background: var(--ink);
  color: var(--paper);
}

.login-story::before {
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image: linear-gradient(rgba(242, 240, 233, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(242, 240, 233, 0.055) 1px, transparent 1px);
  background-size: 72px 72px;
  content: "";
  mask-image: linear-gradient(135deg, transparent 5%, #000 48%, transparent 92%);
}

.login-story::after {
  position: absolute;
  z-index: -1;
  width: min(62vw, 760px);
  aspect-ratio: 1;
  right: -35%;
  top: 10%;
  border: 1px solid rgba(242, 240, 233, 0.14);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(242, 240, 233, 0.026), 0 0 0 140px rgba(242, 240, 233, 0.018), 0 0 0 210px rgba(242, 240, 233, 0.012);
  content: "";
}

.bespace-symbol {
  width: 31px;
  height: 32px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  flex: 0 0 auto;
  gap: 3px;
  color: var(--ink);
  line-height: 0;
}

.bespace-symbol > i {
  display: block;
  background: currentColor;
}

.bespace-symbol > i:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
}

.bespace-symbol > i:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.bespace-symbol > i:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
}

.login-brand,
.login-mobile-brand {
  display: flex;
  align-items: center;
}

.login-symbol {
  width: 38px;
  height: 40px;
  gap: 4px;
  color: var(--paper);
}

.login-story-copy {
  max-width: 720px;
  padding: 72px 0;
}

.login-story-copy p {
  margin: 0 0 24px;
  color: rgba(242, 240, 233, 0.56);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.28em;
}

.login-story-copy h1 {
  margin: 0;
  font-size: clamp(42px, 4.2vw, 68px);
  font-weight: 450;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

.login-story-copy h1 em {
  position: relative;
  color: var(--paper);
  font-style: normal;
  font-weight: 820;
}

.login-story-copy h1 em::after {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: rgba(242, 240, 233, 0.72);
  content: "";
}

.login-story-copy > span {
  display: block;
  margin-top: 36px;
  color: rgba(242, 240, 233, 0.62);
  font-size: 15px;
  line-height: 1.8;
}

.login-principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(242, 240, 233, 0.2);
  border-bottom: 1px solid rgba(242, 240, 233, 0.2);
}

.login-principles article {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 20px 16px;
  border-right: 1px solid rgba(242, 240, 233, 0.2);
}

.login-principles article:last-child {
  border-right: 0;
}

.login-principles b {
  position: absolute;
  top: 18px;
  right: 14px;
  color: rgba(242, 240, 233, 0.28);
  font-size: 10px;
}

.login-principles span {
  color: rgba(242, 240, 233, 0.42);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.login-principles strong {
  font-size: 12px;
  font-weight: 620;
}

.login-story > small {
  margin-top: 28px;
  color: rgba(242, 240, 233, 0.34);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px clamp(34px, 6vw, 92px);
  background: var(--paper);
}

.login-card {
  width: min(100%, 430px);
}

.login-card .eyebrow {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.login-card h2 {
  margin: 0;
  font-size: clamp(30px, 3vw, 42px);
  font-weight: 780;
  letter-spacing: -0.055em;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.login-description {
  max-width: 390px;
  margin: 16px 0 38px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 20px;
}

.login-field {
  display: grid;
  gap: 9px;
}

.login-field > span {
  font-size: 10px;
  font-weight: 750;
}

.login-field input {
  height: 54px;
  padding: 0 2px;
  border: 0;
  border-bottom: 1px solid #aaa79e;
  border-radius: 0;
  background: transparent;
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-field input:focus {
  border-color: var(--ink);
  box-shadow: inset 0 -1px 0 var(--ink);
}

.login-field input[readonly] {
  color: var(--muted);
}

.login-submit {
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
  transition: transform 0.18s ease, background 0.18s ease;
}

.login-submit:hover {
  transform: translateY(-2px);
  background: #30302d;
}

.login-submit:disabled {
  cursor: wait;
  opacity: 0.64;
  transform: none;
}

.login-submit b {
  font-size: 20px;
  font-weight: 400;
}

.login-error {
  padding: 12px 14px;
  border-left: 3px solid var(--red);
  background: rgba(168, 72, 66, 0.08);
  color: #813b36;
  font-size: 11px;
  line-height: 1.5;
}

.passkey-login {
  display: grid;
  justify-items: stretch;
  gap: 9px;
  margin-top: 18px;
  text-align: center;
}

.passkey-login > span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 9px;
}

.passkey-login > span::before,
.passkey-login > span::after {
  height: 1px;
  flex: 1;
  background: var(--line);
  content: "";
}

.passkey-login > button {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  padding: 0 18px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: transparent;
  cursor: pointer;
}

.passkey-login > button:hover { background: rgba(25, 25, 23, 0.055); }
.passkey-login > button:disabled { cursor: wait; opacity: 0.58; }
.passkey-login > button i,
.passkey-device > i {
  width: 20px;
  height: 24px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50% 50% 45% 45%;
  transform: rotate(12deg);
}

.passkey-login > button b { font-size: 11px; }
.passkey-login > small { color: var(--muted); font-size: 9px; }

.login-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  color: var(--muted);
  font-size: 10px;
}

.login-help a {
  color: var(--ink);
  text-underline-offset: 4px;
}

.login-password-rule {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.login-security {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #858279;
  font-size: 9px;
}

.login-security i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px rgba(25, 25, 23, 0.08);
}

.login-mobile-brand {
  display: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

@media screen {
  .content > section:not(:first-child),
  .content > article:not(:first-child),
  .project-estimate-panel,
  .project-construction-panel,
  .project-finance-panel,
  .work-team-board,
  .work-focus-panel,
  .goals-grid,
  .work-calendar-details {
    content-visibility: auto;
    contain-intrinsic-size: auto 520px;
  }

  .calendar-day,
  .work-event,
  .work-focus-item,
  .site-attendance-card,
  .directory-card {
    contain: layout style;
  }
}

button {
  color: inherit;
}

.boot {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  color: var(--forest);
}

.boot {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #262c31;
}

.boot-video {
  position: absolute;
  z-index: -1;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.boot.video-ready .boot-video { opacity: 1; }

.boot-fallback {
  display: grid;
  justify-items: center;
  gap: 16px;
  color: var(--paper);
  transition: opacity 0.25s ease;
}

.boot.video-ready .boot-fallback { opacity: 0; }
.boot-fallback > span:last-child { font-size: 10px; letter-spacing: 0.08em; }
.boot-fallback .boot-symbol { color: var(--paper); }

.boot-skip {
  position: absolute;
  right: max(22px, env(safe-area-inset-right));
  bottom: max(22px, env(safe-area-inset-bottom));
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid rgba(242, 240, 233, 0.28);
  border-radius: 999px;
  background: rgba(25, 25, 23, 0.48);
  color: var(--paper);
  cursor: pointer;
  font-size: 10px;
  backdrop-filter: blur(10px);
}

.boot-mark,
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px 14px 14px 4px;
  background: var(--orange);
  color: white;
  font-family: var(--font-sans);
  font-size: 25px;
  font-weight: 700;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 20px;
  background: var(--forest);
  color: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 28px;
}

.brand-home {
  display: inline-grid;
  place-items: center;
  width: fit-content;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.brand-home:hover { opacity: 0.78; }
.brand-home:focus-visible { outline: 2px solid var(--paper); outline-offset: 5px; }

.brand-copy strong {
  display: block;
  font-family: var(--font-sans);
  font-size: 21px;
  letter-spacing: 0.06em;
}

.brand-copy span {
  color: #c9c6bc;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.nav-label {
  margin: 8px 10px;
  color: #9f9c93;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.attendance-quick {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 13px 12px;
  margin: 0 0 14px;
  border: 1px solid rgba(242, 240, 233, 0.42);
  border-radius: 14px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.attendance-quick:hover,
.attendance-quick.active {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.22);
}

.attendance-quick-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--ink);
}

.attendance-quick-mark::before,
.attendance-quick-mark::after {
  position: absolute;
  background: var(--paper);
  content: "";
}

.attendance-quick-mark::before {
  width: 2px;
  height: 9px;
  top: 7px;
  left: 15px;
  transform-origin: bottom;
  transform: rotate(-18deg);
}

.attendance-quick-mark::after {
  width: 7px;
  height: 2px;
  top: 15px;
  left: 15px;
  transform-origin: left;
  transform: rotate(28deg);
}

.attendance-quick-mark i {
  width: 20px;
  height: 20px;
  border: 1px solid rgba(242, 240, 233, 0.7);
  border-radius: 50%;
}

.attendance-quick-copy strong,
.attendance-quick-copy small {
  display: block;
}

.attendance-quick-copy strong {
  font-size: 13px;
  font-weight: 850;
}

.attendance-quick-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}

.attendance-quick > b {
  padding: 4px 6px;
  border-radius: 999px;
  background: rgba(25, 25, 23, 0.08);
  font-size: 8px;
}

.attendance-quick.active > b {
  background: var(--ink);
  color: var(--paper);
}

.nav {
  display: grid;
  gap: 7px;
  flex: 1 1 auto;
  min-height: 0;
  align-content: start;
  padding-right: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(242, 240, 233, 0.26) transparent;
  scrollbar-width: thin;
}

.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-track { background: transparent; }
.nav::-webkit-scrollbar-thumb { background: rgba(242, 240, 233, 0.26); border-radius: 999px; }

.nav button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 14px;
  background: transparent;
  color: #d7d3c9;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
}

.nav button:hover,
.nav button.active {
  background: rgba(255, 255, 255, 0.1);
  color: white;
}

.nav-token {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  color: #f2f0e9;
  font-size: 11px;
  font-weight: 800;
}

.sidebar-foot {
  flex: 0 0 auto;
  margin-top: 14px;
  padding: 16px 12px 2px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--forest);
}

.sidebar-account-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.sidebar-account-actions button,
.sidebar-account-actions a {
  flex: 1;
  border: 1px solid rgba(242, 240, 233, 0.22);
  border-radius: 9px;
  padding: 7px 8px;
  background: transparent;
  color: #f2f0e9;
  text-align: center;
  text-decoration: none;
  font-size: 9px;
  cursor: pointer;
}

.user-mini {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(242, 240, 233, 0.22);
  border-radius: 11px;
  background: rgba(242, 240, 233, 0.04);
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--orange);
  color: white;
  font-weight: 800;
}

.user-mini strong,
.user-mini span {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-mini strong {
  font-size: 13px;
}

.user-mini span {
  margin-top: 2px;
  color: #aaa79e;
  font-size: 11px;
}

.main {
  min-width: 0;
  padding: 24px clamp(18px, 3vw, 42px) 48px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 60px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-sans);
  font-size: clamp(27px, 3vw, 38px);
  letter-spacing: -0.03em;
}

h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

h3 {
  font-size: 15px;
}

.top-actions,
.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 15px;
  background: var(--forest);
  color: white;
  cursor: pointer;
  font-weight: 750;
  text-decoration: none;
  box-shadow: 0 6px 15px rgba(25, 25, 23, 0.12);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.secondary,
.btn.ghost {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 6px 15px rgba(25, 25, 23, 0.12);
}

.btn.ghost { padding: 7px 10px; }

.btn:focus-visible {
  outline: 3px solid rgba(25, 25, 23, 0.24);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn.orange {
  background: var(--orange);
}

.btn.danger {
  border-color: var(--red);
  background: var(--red);
  color: white;
  box-shadow: 0 6px 15px rgba(168, 72, 66, 0.2);
}

.danger-note {
  grid-column: 1 / -1;
  padding: 15px 16px;
  border: 1px solid rgba(168, 72, 66, 0.35);
  border-radius: 12px;
  background: #f6deda;
  color: #6f2925;
}

.danger-note strong {
  display: block;
  margin-bottom: 5px;
}

.danger-note p {
  margin: 0;
  font-size: 12px;
  line-height: 1.65;
}

.hero-strip {
  position: relative;
  overflow: hidden;
  min-height: 150px;
  padding: 28px 32px;
  border-radius: 24px;
  background: var(--forest);
  color: white;
  box-shadow: var(--shadow);
}

.hero-strip::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -110px;
  width: 280px;
  height: 280px;
  border: 54px solid rgba(255, 255, 255, 0.055);
  border-radius: 50%;
}

.hero-strip p {
  max-width: 630px;
  margin: 10px 0 0;
  color: #d4d1c8;
  line-height: 1.65;
}

.hero-strip .today {
  color: #f2f0e9;
  font-size: 12px;
  font-weight: 800;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
  margin: 16px 0 26px;
}

.metric {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  font: inherit;
}

.metric-link { cursor: pointer; transition: transform 150ms ease, border-color 150ms ease, box-shadow 150ms ease; }
.metric-link:hover { transform: translateY(-2px); border-color: #aaa69b; box-shadow: 0 12px 28px rgba(25, 25, 23, 0.08); }
.metric-link:focus-visible { outline: 3px solid rgba(25, 25, 23, 0.2); outline-offset: 2px; }
.metric-link-arrow { position: absolute; right: 18px; bottom: 17px; color: var(--muted); font-size: 10px; }

.metric span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.metric strong {
  display: block;
  max-width: 100%;
  margin-top: 9px;
  font-family: var(--font-sans);
  font-size: 30px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric i {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--forest-2);
}

.metric.attention i {
  background: var(--orange);
}

.metric.danger { border-color: rgba(177, 60, 47, 0.48); background: #fff7f5; }
.metric.danger > span, .metric.danger .metric-link-arrow { color: #8f2f25; }
.metric.danger i { background: #c23c2e; box-shadow: 0 0 0 6px rgba(194, 60, 46, 0.13); }

.dashboard-primary-metrics { margin-bottom: 14px; }
.dashboard-finance-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0;
}
.dashboard-finance-metrics .metric {
  min-width: 0;
  overflow: hidden;
  padding: 22px 24px;
}
.dashboard-finance-metrics .metric strong {
  max-width: 100%;
  font-size: clamp(24px, 2.5vw, 38px);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
  overflow-wrap: normal;
  white-space: nowrap;
}

.quick-filter { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding: 12px 15px; border: 1px solid #cec9bd; border-radius: 12px; background: #ebe8df; }
.quick-filter strong { font-size: 12px; }
.quick-filter button { border: 0; padding: 6px 10px; border-radius: 999px; background: var(--ink); color: var(--paper); font-weight: 700; cursor: pointer; }
.quick-filter.danger { border-color: rgba(177, 60, 47, 0.42); background: #fae8e4; color: #812c23; }
.project-card.risk { border-color: rgba(177, 60, 47, 0.5); }
.project-risk-badge { display: flex; align-items: center; gap: 7px; width: fit-content; margin-top: 12px; padding: 6px 9px; border-radius: 999px; background: #fae8e4; color: #8f2f25; font-size: 10px; font-weight: 800; }
.project-risk-badge i { width: 8px; height: 8px; border-radius: 50%; background: #c23c2e; box-shadow: 0 0 0 4px rgba(194, 60, 46, 0.12); }

.grid-two {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 0.75fr);
  gap: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 25px rgba(43, 54, 51, 0.035);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 14px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.panel-body {
  padding: 0 22px 22px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.pipe-col {
  min-height: 280px;
  padding: 12px;
  border-radius: 14px;
  background: #f1efe9;
}

.pipe-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lead-card {
  width: 100%;
  margin-bottom: 9px;
  padding: 13px;
  border: 1px solid #e2ded4;
  border-radius: 12px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
}

.lead-card:hover {
  border-color: #b9c9c4;
  box-shadow: 0 6px 16px rgba(35, 53, 49, 0.07);
}

.lead-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
}

.lead-card span,
.lead-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.lead-card small {
  margin-top: 8px;
  color: var(--orange);
  font-weight: 700;
}

.attention-list {
  display: grid;
  gap: 10px;
}

.attention-item {
  padding: 14px;
  border-radius: 12px;
  background: var(--orange-pale);
}

.attention-item strong {
  display: block;
  font-size: 13px;
}

.attention-item span {
  display: block;
  margin-top: 4px;
  color: #4b4a45;
  font-size: 11px;
  line-height: 1.5;
}

.toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.lead-toolbar { align-items: center; justify-content: flex-start; }
.lead-toolbar .searchbox { flex: 1 1 320px; }
.lead-sort-control { display: flex; align-items: center; gap: 8px; min-height: 42px; padding: 5px 6px 5px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 800; white-space: nowrap; }
.lead-sort-control select { min-width: 126px; padding: 7px 30px 7px 9px; border: 0; border-radius: 8px; background: #f1efe9; color: var(--ink); font: inherit; cursor: pointer; }
.lead-toolbar .result-count { margin-left: auto; }
.lead-inquiry-date { display: block; white-space: nowrap; }
.lead-assignment-state { display: inline-flex; align-items: center; max-width: 190px; padding: 5px 8px; border-radius: 999px; font-size: 10px; font-weight: 800; line-height: 1.25; }
.lead-assignment-state.open { color: #2d5f48; background: #e0eee6; }
.lead-assignment-state.assigned { color: #334e68; background: #e3edf6; }
.lead-visibility-note { display: grid; gap: 5px; padding: 14px 16px; border: 1px solid #bfd7ca; border-radius: 13px; background: #edf6f1; }
.lead-visibility-note strong { color: #2d5f48; font-size: 12px; }
.lead-visibility-note span { color: #53665c; font-size: 11px; line-height: 1.55; }
.lead-visibility-note.assigned { border-color: #bed0e1; background: #edf3f8; }
.lead-visibility-note.assigned strong { color: #334e68; }
.lead-visibility-note.assigned span { color: #536575; }

.searchbox {
  min-width: min(100%, 320px);
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
}

.filter.active {
  border-color: var(--forest);
  background: var(--forest);
  color: white;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  padding: 14px 12px;
  border-bottom: 1px solid #e6e2d8;
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

th {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover {
  background: #f6f3ec;
}

.status,
.role-chip,
.source-chip {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.status.new,
.status.consulting {
  background: var(--orange-pale);
  color: #4b4a45;
}

.status.consulted,
.status.awaiting_assignment {
  background: #e4e1d7;
  color: #4b4a45;
}

.status.assigned,
.status.proposal_preparing {
  background: var(--sage);
  color: var(--ink);
}

.status.lost,
.status.hold {
  background: #eee9e6;
  color: #756c68;
}

.source-chip {
  background: #f1efe8;
  color: #55544e;
}

.role-chip {
  background: var(--sage);
  color: var(--forest-2);
}

.empty {
  padding: 42px 20px;
  text-align: center;
  color: var(--muted);
}

.empty strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  background: rgba(18, 31, 29, 0.38);
  display: flex;
  justify-content: flex-end;
}

.drawer-backdrop[hidden] {
  display: none;
}

.drawer {
  width: min(620px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  overflow-y: auto;
  padding: max(26px, env(safe-area-inset-top)) max(26px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(26px, env(safe-area-inset-left));
  background: var(--surface);
  box-shadow: -20px 0 55px rgba(20, 35, 32, 0.2);
}

.drawer[aria-modal="true"][tabindex="-1"]:focus {
  outline: none;
}

.drawer[aria-modal="true"][tabindex="-1"]:focus-visible {
  box-shadow: -20px 0 55px rgba(20, 35, 32, 0.2), inset 0 0 0 3px rgba(154, 95, 62, 0.55);
}

[data-drawer-inerted="true"] {
  pointer-events: none;
  user-select: none;
}

.drawer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.detail-box {
  padding: 13px;
  border-radius: 12px;
  background: #f3f1eb;
}

.detail-box span,
.field-note {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.detail-box strong {
  display: block;
  margin-top: 5px;
  font-size: 13px;
}

.section-rule {
  margin: 22px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  position: relative;
  padding-left: 20px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.timeline-item strong {
  font-size: 12px;
}

.timeline-item p {
  margin: 5px 0 3px;
  color: #455254;
  font-size: 12px;
  line-height: 1.6;
}

.timeline-item small {
  color: var(--muted);
  font-size: 10px;
}

dialog {
  width: min(640px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  box-shadow: 0 25px 80px rgba(18, 33, 30, 0.28);
}

dialog::backdrop {
  background: rgba(18, 31, 29, 0.5);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 26px 18px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  padding: 22px 26px 26px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* Every direct composite marked full must span both form columns. */
.form-grid > .full {
  grid-column: 1 / -1;
  min-width: 0;
}

.payment-plan-builder {
  grid-column: 1 / -1;
  display: grid;
  min-width: 0;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f6ef;
}

.payment-plan-head,
.payment-plan-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.payment-plan-head > div:first-child,
.payment-plan-summary {
  min-width: 0;
}

.payment-plan-head strong,
.payment-plan-head span { display: block; }
.payment-plan-head span { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.payment-plan-head > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.payment-installment-list { display: grid; gap: 8px; }

.payment-installment {
  display: grid;
  grid-template-columns: 104px minmax(145px, .8fr) minmax(160px, 1fr) auto;
  align-items: end;
  gap: 10px;
  padding: 12px;
  border: 1px solid #dedacf;
  border-radius: 11px;
  background: white;
}

.payment-installment-label { align-self: center; }
.payment-installment-label b,
.payment-installment-label small { display: block; }
.payment-installment-label small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.payment-installment label { display: grid; min-width: 0; gap: 5px; }
.payment-installment label span { color: var(--muted); font-size: 9px; }
.payment-installment input { min-width: 0; padding: 9px 10px; }
.payment-installment-remove { min-height: 38px; padding: 0 10px; border: 1px solid #dfc5c1; border-radius: 9px; background: #f8eae7; color: #8d3934; font-size: 10px; font-weight: 800; cursor: pointer; }
.payment-installment-remove[hidden] { display: none; }
.payment-plan-summary { padding-top: 10px; border-top: 1px solid var(--line); }
.payment-plan-summary span { color: var(--muted); font-size: 10px; }
.payment-plan-summary strong { margin-left: auto; font-size: 16px; }
.payment-plan-summary small { color: #376650; font-size: 10px; font-weight: 750; }
.payment-plan-summary small.mismatch { color: #a84842; }
.payment-plan-locked {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid #cfcbc0;
  border-radius: 999px;
  background: white;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}
.payment-installment-received { margin-top: 5px !important; color: #2f7058 !important; font-weight: 800; }
.contract-payment-plan-notice { margin-top: 0; }
.contract-payment-plan-notice.bad { border-left: 3px solid #a84842; background: #fff0ed; color: #8d3934; }

.contract-amount-panel {
  padding: 16px;
  border: 1px solid #b8c8d4;
  border-radius: 14px;
  background: #f2f7fa;
}
.contract-amount-impact,
.project-change-request-intro,
.project-change-review-summary {
  padding: 15px 16px;
  border: 1px solid #c9d4da;
  border-radius: 12px;
  background: white;
}
.contract-amount-impact strong,
.contract-amount-impact span,
.project-change-request-intro span,
.project-change-request-intro strong,
.project-change-review-summary span,
.project-change-review-summary strong { display: block; }
.contract-amount-impact span { margin-top: 6px; color: #315b6c; font-size: 11px; font-weight: 800; }
.contract-amount-impact p,
.project-change-request-intro p,
.project-change-review-summary p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.project-change-request-intro { border-left: 4px solid #416d80; }
.project-change-request-intro > span,
.project-change-review-summary > span { margin-bottom: 7px; color: #416d80; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.project-change-live-route,
.project-change-role-route { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.project-change-live-route { margin-top: 9px; }
.project-change-live-route b { padding: 6px 9px; border-radius: 999px; background: #edf4f7; color: #315b6c; font-size: 10px; }
.project-change-live-route i { color: var(--muted); font-size: 9px; font-style: normal; font-weight: 800; }
.project-change-single-role { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 4px 10px; padding: 12px 14px; border: 1px solid #c9d4da; border-radius: 11px; background: #f2f7fa; }
.project-change-single-role span { color: var(--muted); font-size: 9px; font-weight: 800; }
.project-change-single-role strong { color: #315b6c; font-size: 12px; }
.project-change-single-role small { grid-column: 1 / -1; color: var(--muted); font-size: 9px; }
.project-change-review-summary.reject { border-color: #d9aaa5; background: #fff4f2; }
.project-change-review-summary.reject > span { color: #a84842; }
.project-change-plan-review { overflow: hidden; border: 1px solid #c9d4da; border-radius: 12px; background: white; }
.project-change-plan-review > header { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #f2f7fa; }
.project-change-plan-review > header strong { font-size: 12px; }
.project-change-plan-review > header span { color: var(--muted); font-size: 10px; }
.project-change-plan-review > div { display: grid; grid-template-columns: 78px minmax(0, 1fr) 18px minmax(0, 1fr); align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 10px; }
.project-change-plan-review > div:last-child { border-bottom: 0; }
.project-change-plan-review > div b { color: #315b6c; }
.project-change-plan-review > div span { color: var(--muted); }
.project-change-plan-review > div i { color: #858b84; font-style: normal; text-align: center; }
.project-change-plan-review > div strong { color: var(--ink); text-align: right; }

.project-site-team-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.project-site-team-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f8f6ef;
}
.project-site-team-option > label:first-child { display: flex; align-items: center; gap: 9px; flex: 1 1 auto; min-width: 0; cursor: pointer; }
.project-site-team-option input[type="checkbox"],
.project-primary-manager input[type="radio"] { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; padding: 0; }
.project-site-team-option > label:first-child span,
.project-site-team-option > label:first-child strong,
.project-site-team-option > label:first-child small { display: block; min-width: 0; }
.project-site-team-option > label:first-child span { flex: 1 1 auto; }
.project-site-team-option > label:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-site-team-option > label:first-child small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.project-primary-manager { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto; padding: 5px 7px; border-radius: 999px; background: white; color: #315b6c; font-size: 9px; font-weight: 850; cursor: pointer; }
.project-primary-manager span { white-space: nowrap; }
.project-member-only { flex: 0 0 auto; color: var(--muted); font-size: 9px; }
.project-external-members { grid-column: 1 / -1; display: grid; gap: 4px; margin-top: 9px; padding: 11px 12px; border: 1px dashed #c7c2b6; border-radius: 10px; color: var(--muted); }
.project-external-members strong { color: var(--ink); font-size: 10px; }
.project-external-members span { font-size: 11px; font-weight: 750; }
.project-external-members small { font-size: 9px; }

.project-change-request-panel { margin-top: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.project-change-request-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.project-change-request-panel h2 { margin: 4px 0; font-size: 18px; }
.project-change-request-panel header span { color: var(--muted); font-size: 11px; }
.project-change-request-list { display: grid; gap: 8px; margin-top: 14px; }
.project-change-request { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 14px; border: 1px solid var(--line); border-left: 4px solid #858b84; border-radius: 11px; background: #faf9f5; }
.project-change-request.pending { border-left-color: #9b762d; background: #fffaf0; }
.project-change-request.approved { border-left-color: #3c7b5f; }
.project-change-request.rejected { border-left-color: #a84842; }
.project-change-request > div:first-child { display: grid; gap: 4px; min-width: 0; }
.project-change-request > div:first-child > span { color: #75581f; font-size: 9px; font-weight: 900; }
.project-change-role-route { margin-bottom: 2px; }
.project-change-role-route span,
.project-change-role-route b { padding: 4px 7px; border-radius: 999px; font-size: 9px; font-weight: 850; }
.project-change-role-route span { background: #e8f0f4; color: #315b6c; }
.project-change-role-route b { background: #eeeae1; color: #5c5548; }
.project-change-role-route i { color: #858b84; font-size: 9px; font-style: normal; }
.project-change-request strong { font-size: 12px; }
.project-change-request p { margin: 0; color: var(--muted); font-size: 10px; }
.project-change-request small { color: var(--muted); font-size: 9px; }
.project-change-request em { color: #315b6c; font-size: 9px; font-style: normal; font-weight: 750; }
.project-change-request .project-change-waiting-role,
.project-change-request .project-change-final-reviewer { color: #315b6c; font-size: 9px; font-weight: 800; }
.project-change-request .project-change-final-reviewer { color: #2f7058; }
.project-change-request-actions { display: flex; gap: 6px; flex: 0 0 auto; }
.project-change-pending-chip { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; background: #f5e8c6; color: #75581f !important; font-weight: 850; }

.field {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.field.full {
  grid-column: 1 / -1;
}

.field[hidden] {
  display: none !important;
}

label {
  font-size: 11px;
  font-weight: 800;
}

input:where(:not([type="checkbox"]):not([type="radio"])),
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  outline: none;
}

/* Selection controls must never inherit a full-width text field. Keep component
   sizes and visually hidden custom controls free to override these defaults. */
input:where([type="checkbox"], [type="radio"]) {
  width: 18px;
  height: 18px;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--forest-2);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--forest-2);
  box-shadow: 0 0 0 3px rgba(39, 85, 74, 0.1);
}

.cost-code-combobox {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 4px;
}

.cost-code-combobox.open {
  z-index: 80;
}

.cost-code-combobox-control {
  position: relative;
  min-width: 0;
}

.cost-code-combobox-control [data-cost-code-query] {
  min-height: 44px;
  padding-right: 44px;
  font: inherit;
}

.cost-code-combobox-control > button {
  position: absolute;
  inset: 3px 3px 3px auto;
  display: grid;
  place-items: center;
  width: 38px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.cost-code-combobox.open .cost-code-combobox-control > button {
  color: var(--ink);
  background: #efede6;
  transform: rotate(180deg);
}

.cost-code-combobox-list {
  position: absolute;
  z-index: 90;
  top: calc(100% - 1px);
  right: auto;
  left: 0;
  width: 100%;
  min-width: min(360px, calc(100vw - 40px));
  max-height: min(320px, 42vh);
  padding: 5px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #bbb7aa;
  border-radius: 12px;
  background: #fffefb;
  box-shadow: 0 18px 44px rgba(18, 31, 29, .2);
}

.cost-code-combobox-list[hidden] {
  display: none;
}

.cost-code-combobox-list [data-cost-code-option] {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cost-code-combobox-list [data-cost-code-option] + [data-cost-code-option] {
  border-top: 1px solid #efede6;
}

.cost-code-combobox-list [data-cost-code-option]:hover,
.cost-code-combobox-list [data-cost-code-option][aria-selected="true"] {
  background: #e9f1ec;
}

.cost-code-result-code {
  min-width: 44px;
  color: #174a70;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.cost-code-combobox-list [data-cost-code-option] > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.cost-code-combobox-list strong {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.cost-code-combobox-list small {
  color: var(--muted);
  font-size: 9px;
}

.cost-code-combobox-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

.cost-code-combobox-list mark {
  padding: 0 1px;
  color: #123f30;
  background: #f5d66b;
}

.cost-code-combobox-empty {
  display: grid;
  gap: 4px;
  padding: 18px 14px;
  color: var(--muted);
  text-align: center;
}

.cost-code-combobox-empty strong {
  color: var(--ink);
}

.cost-code-combobox-status:empty {
  display: none;
}

.payee-combobox {
  position: relative;
  min-width: 0;
}

.payee-combobox.open { z-index: 95; }
.payee-combobox-control { position: relative; min-width: 0; }
.payee-combobox-control [data-payee-query] { width: 100%; min-height: 48px; padding-right: 48px; font: inherit; }
.payee-combobox-control > button {
  position: absolute;
  inset: 3px 3px 3px auto;
  display: grid;
  place-items: center;
  width: 42px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  font-size: 19px;
  font-weight: 900;
  cursor: pointer;
}
.payee-combobox.open .payee-combobox-control > button { color: var(--ink); background: #efede6; transform: rotate(180deg); }
.payee-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
}
.payee-combobox-list {
  position: fixed;
  z-index: 1200;
  box-sizing: border-box;
  padding: 6px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #b8b4a7;
  border-radius: 14px;
  background: #fffefb;
  box-shadow: 0 22px 56px rgba(18, 31, 29, .24);
}
.payee-combobox-list[hidden] { display: none; }
.payee-combobox-list [data-payee-option] {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 9px 11px;
  border: 0;
  border-radius: 9px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.payee-combobox-list [data-payee-option] + [data-payee-option] { border-top: 1px solid #efede6; }
.payee-combobox-list [data-payee-option]:hover,
.payee-combobox-list [data-payee-option][aria-selected="true"] { background: #e9f1ec; }
.payee-result-type { display: inline-flex; justify-content: center; padding: 5px 6px; border-radius: 999px; color: #6e4e09; background: #fff0bd; font-size: 9px; font-weight: 900; }
.payee-result-type.daily_worker { color: #1f5782; background: #e4f2ff; }
.payee-result-type.action { color: #4b4b45; background: #eeece4; }
.payee-result-copy { display: grid; min-width: 0; gap: 3px; }
.payee-result-copy strong { overflow-wrap: anywhere; font-size: 12px; }
.payee-result-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.payee-result-copy mark { padding: 0 1px; color: #123f30; background: #f5d66b; }
.payee-combobox-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}
.payee-combobox-empty { display: grid; gap: 4px; padding: 20px 14px; color: var(--muted); text-align: center; }
.payee-combobox-empty strong { color: var(--ink); }

.access-policy-note {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(47, 115, 168, 0.22);
  border-left: 4px solid #2f73a8;
  border-radius: 10px;
  background: #edf5fb;
  color: var(--ink);
  line-height: 1.55;
}

.access-policy-note strong { font-size: 13px; }
.access-policy-note span { font-size: 12px; color: var(--muted); }
.access-policy-note b { color: var(--ink); }

.cost-code-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

@media (max-width: 760px) {
  .cost-code-combobox-control [data-cost-code-query] {
    min-height: 48px;
    font-size: 16px;
  }

  .cost-code-combobox-control > button {
    width: 42px;
  }

  .cost-code-combobox-list {
    position: fixed;
    z-index: 300;
    top: auto;
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
    min-width: 0;
    max-height: min(52dvh, 430px);
    border-radius: 16px;
    box-shadow: 0 24px 70px rgba(18, 31, 29, .32);
  }

  .cost-code-combobox-list [data-cost-code-option] {
    min-height: 52px;
    padding: 10px 12px;
  }

  .cost-code-combobox-list strong {
    font-size: 14px;
  }

  .cost-code-result-code {
    min-width: 54px;
    font-size: 12px;
  }
}

.field input[data-money],
.payment-installment input[data-money] {
  text-align: right;
  font-variant-numeric: tabular-nums;
  letter-spacing: .01em;
}

.vat-calculation-note {
  grid-column: 1 / -1;
  margin-top: -4px;
  padding: 10px 12px;
  border: 1px solid #d8d3c7;
  border-radius: 10px;
  background: #f2f0e9;
  color: #5c5a54;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.55;
}

textarea {
  min-height: 90px;
  resize: vertical;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 22px;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.access-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 15px 17px;
  border: 1px solid #cbded7;
  border-radius: 14px;
  background: var(--sage);
}

.access-guide strong {
  font-size: 12px;
}

.access-guide span {
  color: var(--forest-2);
  font-size: 10px;
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 26px;
  border-radius: 18px;
  background: var(--ink);
  color: var(--paper);
}

.profile-avatar {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border: 1px solid rgba(242, 240, 233, 0.38);
  border-radius: 18px;
  background: rgba(242, 240, 233, 0.12);
  font-size: 24px;
  font-weight: 800;
}

.profile-hero h2,
.profile-hero p {
  margin: 0;
}

.profile-hero h2 {
  margin: 4px 0;
  font-size: 24px;
}

.profile-hero span {
  color: #c9c6bc;
  font-size: 11px;
}

.profile-hero .btn {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.profile-panel {
  padding: 20px;
}

.profile-list {
  display: grid;
  gap: 0;
}

.profile-list > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.profile-list span,
.profile-note span {
  color: var(--muted);
  font-size: 10px;
}

.profile-list strong {
  text-align: right;
  font-size: 11px;
}

.profile-note {
  margin-top: 14px;
  padding: 13px;
  border-radius: 11px;
  background: var(--paper);
}

.profile-note p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.55;
}

.profile-duties {
  margin-top: 8px;
}

.profile-help,
.security-panel > p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.security-panel {
  grid-column: 1 / -1;
}

.passkey-section {
  display: grid;
  gap: 14px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.passkey-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.passkey-section-head > div { display: grid; gap: 5px; }
.passkey-section-head strong { font-size: 13px; }
.passkey-section-head span { max-width: 680px; color: var(--muted); font-size: 10px; line-height: 1.55; }
.passkey-devices { display: grid; gap: 8px; }

.passkey-device {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--paper);
}

.passkey-device > i { width: 17px; height: 20px; color: var(--ink); }
.passkey-device > div { display: grid; gap: 3px; min-width: 0; }
.passkey-device strong { font-size: 11px; }
.passkey-device span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.passkey-empty {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px dashed var(--line-strong);
  border-radius: 13px;
}

.passkey-empty strong { font-size: 11px; }
.passkey-empty span,
.passkey-domain-note,
.passkey-unsupported { color: var(--muted); font-size: 9px; line-height: 1.5; }

.integration-token-panel { display: grid; gap: 14px; }
.pat-devices { margin-top: 2px; }
.pat-device.inactive { opacity: .58; }
.pat-device > i {
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--paper);
  background: currentColor;
}
.pat-secret {
  display: grid;
  gap: 9px;
  padding: 15px;
  border: 1px solid var(--ink);
  border-radius: 13px;
  background: var(--paper);
}
.pat-secret > strong { font-size: 12px; }
.pat-secret > span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.pat-secret textarea {
  box-sizing: border-box;
  width: 100%;
  min-height: 68px;
  padding: 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--ink);
  font: 10px/1.5 ui-monospace, SFMono-Regular, Consolas, monospace;
  overflow-wrap: anywhere;
  resize: none;
}

.team-permissions { margin: 12px 0; padding: 12px; border: 1px solid #c6dcd4; border-radius: 12px; background: #f1f7f4; min-width: 0; }
.team-permissions .duty-chips { margin: 10px 0; }
.team-permissions summary { cursor: pointer; font-weight: 700; padding: 8px 0; }
.team-permissions p, .team-permissions li, .team-permissions strong, .team-permissions small { overflow-wrap: anywhere; word-break: keep-all; }
.team-permissions .team-permission-scope { color: #264c43; }
.team-permission-menu { border-top: 1px solid #c6dcd4; padding-top: 12px; margin-top: 12px; }
.team-permission-menu ul { padding-left: 18px; margin: 8px 0; }
.team-permission-menu li { margin-bottom: 10px; }
.team-permission-menu small { display: block; margin-top: 4px; line-height: 1.55; }
.team-permission-list { max-height: 360px; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; }
.team-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.team-card.inactive {
  opacity: 0.58;
}

.login-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 14px;
  padding: 6px 8px;
  border-radius: 999px;
  background: #ebe7dc;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.login-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #aaa69c;
}

.login-state.ready {
  background: var(--ink);
  color: var(--paper);
}

.login-state.ready i {
  background: #cddfc0;
}

.team-account-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.invite-password-note {
  padding: 12px 14px;
  border-left: 3px solid var(--ink);
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.team-card-head,
.team-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.team-card .avatar {
  margin-bottom: 13px;
}

.team-card-head .avatar {
  margin-bottom: 13px;
}

.team-card p {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 11px;
}

.team-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.account-chip,
.duty-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 800;
}

.account-chip {
  padding: 5px 9px;
  background: #edf1ef;
  color: var(--forest-2);
}

.account-chip.external {
  background: var(--orange-pale);
  color: #4b4a45;
}

.duty-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  min-height: 26px;
}

.duty-chip {
  padding: 5px 8px;
  background: #f0eee8;
  color: #566260;
}

.duty-chip.muted {
  color: var(--muted);
}

.duty-field {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fbfaf7;
}

.duty-field legend {
  padding: 0 6px;
  font-size: 11px;
  font-weight: 800;
}

.duty-field > p {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 10px;
}

.duty-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.duty-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e4e0d6;
  border-radius: 10px;
  background: white;
  cursor: pointer;
}

.duty-option:has(input:checked) {
  border-color: var(--forest-2);
  background: var(--sage);
}

.duty-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.duty-option span,
.duty-option small {
  display: block;
}

.duty-option strong {
  display: block;
  font-size: 10px;
}

.duty-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 500;
  line-height: 1.45;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 180;
  max-width: 340px;
  padding: 13px 17px;
  border-radius: 12px;
  background: var(--forest);
  color: white;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s ease;
  box-shadow: var(--shadow);
  font-size: 12px;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.dialog-inline-alert {
  margin: 0 0 14px;
  padding: 11px 13px;
  border: 1px solid #d89187;
  border-radius: 10px;
  color: #7b241d;
  background: #fff0ed;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

button[data-action-pending="true"] {
  cursor: wait !important;
  opacity: .72;
  pointer-events: none;
}

.error-card {
  max-width: 560px;
  margin: 12vh auto;
  padding: 30px;
  border-radius: 20px;
  background: white;
  box-shadow: var(--shadow);
}

@media (max-width: 1080px) {
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-two {
    grid-template-columns: 1fr;
  }

  .team-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px 14px 10px;
  }

  .brand {
    padding-bottom: 12px;
  }

  .attendance-quick {
    max-width: 360px;
    margin-bottom: 10px;
  }

  .brand-copy span,
  .nav-label,
  .sidebar-foot {
    display: none;
  }

  .nav {
    display: flex;
    overflow-x: auto;
  }

  .nav button {
    width: auto;
    flex: 0 0 auto;
  }

  .main {
    padding: 18px 14px 36px;
  }

  .topbar {
    align-items: flex-end;
  }

  .hero-strip {
    padding: 24px;
  }

  .metrics,
  .team-grid,
  .profile-grid,
  .form-grid,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .profile-hero .btn {
    grid-column: 1 / -1;
  }

  .security-panel {
    grid-column: auto;
  }

  .access-guide {
    align-items: flex-start;
    flex-direction: column;
  }

  .duty-options {
    grid-template-columns: 1fr;
  }

  .field.full {
    grid-column: auto;
  }
}

/* PWA install and assigned-work notifications */
.push-prompt[hidden],
.task-alert[hidden] { display: none !important; }

.push-prompt {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  width: min(560px, calc(100vw - 44px));
  padding: 20px 22px;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid rgba(242, 240, 233, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(25, 25, 23, 0.3);
}
.push-prompt > div:first-child { display: grid; gap: 4px; }
.push-prompt span { color: rgba(242, 240, 233, 0.55); font-size: 8px; font-weight: 800; letter-spacing: 0.14em; }
.push-prompt strong { font-size: 15px; }
.push-prompt p { margin: 0; color: rgba(242, 240, 233, 0.68); font-size: 10px; line-height: 1.5; }
.push-prompt > div:last-child { display: flex; align-items: center; gap: 7px; }
.push-prompt button {
  padding: 9px 11px;
  color: var(--paper);
  background: transparent;
  border: 1px solid rgba(242, 240, 233, 0.25);
  border-radius: 9px;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  cursor: pointer;
}
.push-prompt button.primary { color: var(--ink); background: var(--paper); border-color: var(--paper); }

.task-alert {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 100;
  display: grid;
  gap: 14px;
  width: min(420px, calc(100vw - 44px));
  padding: 20px;
  color: var(--ink);
  background: #fffdf8;
  border: 2px solid var(--ink);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(25, 25, 23, 0.26);
  animation: task-alert-in 0.22s ease-out;
}
.task-alert > div:first-child { display: grid; gap: 5px; }
.task-alert span { color: var(--muted); font-size: 8px; font-weight: 850; letter-spacing: 0.14em; }
.task-alert strong { font-size: 16px; }
.task-alert p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.task-alert-actions { display: flex; justify-content: flex-end; gap: 8px; }
.task-alert-actions button { padding: 9px 12px; background: transparent; border: 1px solid var(--line); border-radius: 9px; font: inherit; font-size: 9px; font-weight: 800; cursor: pointer; }
.task-alert-actions button:last-child { color: var(--paper); background: var(--ink); border-color: var(--ink); }
@keyframes task-alert-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }

.push-settings-panel { align-content: start; }
.push-settings-panel > p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.push-settings-panel > small { color: var(--muted); font-size: 9px; }
.push-state { padding: 6px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 8px; font-weight: 800; white-space: nowrap; }
.push-state.on { color: #245b43; background: #e2eee7; border-color: #b9d3c4; }
.push-state.off { color: var(--muted); background: var(--surface-2); }

@media (max-width: 680px) {
  .push-prompt { right: 12px; bottom: 12px; grid-template-columns: 1fr; width: calc(100vw - 24px); padding: 18px; }
  .push-prompt > div:last-child { justify-content: flex-end; flex-wrap: wrap; }
  .task-alert { top: auto; right: 12px; bottom: 12px; width: calc(100vw - 24px); }
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-story {
    display: none;
  }

  .login-panel {
    position: relative;
    min-height: 100svh;
    align-content: center;
    padding: 92px 24px 48px;
  }

  .login-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 7px;
    background: var(--ink);
    content: "";
  }

  .login-mobile-brand {
    position: absolute;
    top: 34px;
    left: 24px;
    display: flex;
  }

  .login-mobile-symbol {
    width: 31px;
    height: 32px;
  }
}

@media (max-width: 520px) {
  .login-card h2 {
    font-size: 31px;
  }

  .login-description {
    margin-bottom: 28px;
  }

  .login-help {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-card-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-account-buttons {
    justify-content: flex-start;
  }
}

/* GPS attendance */
.attendance-consent,
.attendance-punch,
.office-location-card,
.site-attendance-card,
.attendance-privacy-note {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.attendance-consent {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  margin-bottom: 14px;
  background: #fffaf0;
  border-color: rgba(222, 113, 58, 0.28);
}

.attendance-consent h2,
.attendance-consent p {
  margin: 0;
}

.attendance-consent h2 {
  margin: 4px 0 7px;
  font-size: 20px;
}

.attendance-consent p:last-child {
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.attendance-consent-ok {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 11px;
}

.attendance-consent-ok::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3e7b62;
  content: "";
}

.attendance-consent-ok button,
.site-attendance-foot button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.site-attendance-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px;
}

.site-attendance-foot button.history-protected {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
  text-decoration: none;
}

.site-attendance-foot button.danger {
  color: #a43d35;
  font-weight: 800;
}

.attendance-policy.danger {
  border: 1px solid rgba(164, 61, 53, 0.28);
  background: #fff2ef;
}

.attendance-delete-warning {
  display: block;
  margin-bottom: 7px;
  color: #a43d35;
}

.attendance-punch {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(440px, 1.2fr);
  overflow: hidden;
  margin-bottom: 28px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 18px 50px rgba(25, 25, 23, 0.15);
}

.punch-date {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px;
}

.punch-date span,
.punch-date small {
  color: rgba(242, 240, 233, 0.62);
  font-size: 11px;
}

.punch-date strong {
  margin: 9px 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.punch-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: rgba(242, 240, 233, 0.16);
}

.punch-actions.single {
  grid-template-columns: 1fr;
}

.punch-button {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
  padding: 28px;
  border: 0;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.punch-button:hover:not(:disabled) {
  background: #fff;
  transform: translateY(-2px);
}

.punch-button.check-out {
  background: #d9d6cd;
}

.punch-button.transfer {
  background: #f0c4a8;
}

.attendance-late-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  padding: 22px 24px;
  border: 2px solid #a43d35;
  border-radius: var(--radius);
  background: #fff0ed;
  color: #7f2721;
  box-shadow: 0 12px 34px rgba(164, 61, 53, 0.14);
}

.attendance-late-alert.submitted {
  border-color: #b86d2c;
  background: #fff7e8;
  color: #744215;
}

.attendance-late-alert div {
  display: grid;
  gap: 4px;
}

.attendance-late-alert span {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.attendance-late-alert strong {
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1.05;
}

.attendance-late-alert p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.55;
}

.attendance-late-alert button {
  min-width: 130px;
  padding: 13px 17px;
  border: 0;
  border-radius: 10px;
  background: #a43d35;
  color: #fff;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.attendance-late-alert.submitted button { background: #8a501d; }

.attendance-route-correction-request {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 15px 20px;
  border: 0;
  background: #fff8e6;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.attendance-route-correction-request span {
  color: var(--muted);
  font-size: 10px;
}

.attendance-route-correction-request strong {
  font-size: 13px;
}

.attendance-route-guide {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin: -12px 0 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.attendance-route-guide article {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 15px 16px;
  background: rgba(255, 255, 255, 0.64);
}

.attendance-route-guide b {
  grid-row: 1 / 3;
  color: var(--orange);
  font-size: 10px;
}

.attendance-route-guide strong {
  font-size: 12px;
}

.attendance-route-guide span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.punch-button span {
  color: var(--muted);
  font-size: 11px;
}

.punch-button strong {
  font-size: 24px;
}

.punch-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.attendance-ended-actions {
  display: grid;
  width: 100%;
  padding: 14px;
  background: var(--paper);
}

.attendance-ended-actions .punch-button {
  min-height: 126px;
}

.attendance-correction-request {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #a43d35;
  border-radius: 10px;
  background: #fff;
  color: #a43d35;
  font-weight: 850;
  cursor: pointer;
}

.attendance-correction-request.pending {
  border-color: var(--line);
  color: var(--muted);
  cursor: default;
}

.attendance-ended-actions > small {
  margin-top: 8px;
  color: #a43d35;
  line-height: 1.45;
}

.expected-section,
.attendance-admin {
  margin: 30px 0;
}

.section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}

.section-title h2,
.section-title p {
  margin: 0;
}

.section-title > span {
  max-width: 540px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
  text-align: right;
}

.expected-grid,
.site-attendance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.expected-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.56);
}

.expected-location span,
.expected-location p,
.expected-location > strong {
  color: var(--muted);
  font-size: 10px;
}

.expected-location h2,
.expected-location p {
  margin: 4px 0 0;
}

.expected-location h2 {
  font-size: 17px;
}

.expected-location.missing {
  grid-column: 1 / -1;
  border-style: dashed;
}

.expected-location.temporary {
  border-color: rgba(49, 90, 115, 0.3);
  box-shadow: inset 4px 0 0 #607b8a;
}

.expected-location.temporary span {
  color: #315a73;
  font-weight: 850;
}

.attendance-history {
  margin: 28px 0;
}

.attendance-company-report {
  margin: 28px 0;
  overflow: hidden;
}

.attendance-company-report > .panel-head {
  align-items: flex-start;
}

.attendance-company-head-actions,
.attendance-company-month-actions,
.attendance-company-export-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.attendance-company-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.attendance-company-head-actions .btn {
  white-space: nowrap;
}

.attendance-company-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
  padding: 0 22px 18px;
}

.attendance-company-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.attendance-company-filters label,
.attendance-company-filters label > span {
  display: grid;
}

.attendance-company-filters label > span {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.attendance-company-filters select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 34px 0 12px;
}

.attendance-company-counts {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 460px;
}

.attendance-company-counts span {
  padding: 8px 10px;
  border-radius: 999px;
  background: #ebe8df;
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.attendance-company-counts span strong {
  color: var(--ink);
}

.attendance-company-counts span.late,
.attendance-company-counts span.late-missing {
  background: #f6dcd8;
  color: #923b33;
}

.attendance-company-counts small {
  width: 100%;
  color: var(--muted);
  font-size: 8px;
  text-align: right;
}

.attendance-company-table {
  min-width: 1020px;
}

.attendance-company-table tbody tr {
  cursor: default;
}

.attendance-company-time {
  display: inline-block;
  margin-left: 8px;
  white-space: nowrap;
}

.attendance-company-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #ebe8df;
  color: #555247;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.attendance-company-status.pending { background: #fff1c9; color: #805d00; }
.attendance-company-status.approved { background: #dfe9e2; color: #315e4a; }
.attendance-company-status.late { background: #ffe6c6; color: #79420d; }
.attendance-company-status.late_missing_reason { background: #f6dcd8; color: #923b33; }
.attendance-company-status.rejected,
.attendance-company-status.invalid { background: #f6dcd8; color: #923b33; }

.attendance-company-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 22px 20px;
  border-top: 1px solid var(--line);
}

.attendance-company-pagination > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.attendance-company-pagination > div {
  display: flex;
  gap: 8px;
}

.attendance-correction-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #fff1c9;
  color: #805d00;
  font-size: 8px;
  font-weight: 850;
  white-space: nowrap;
}

.attendance-correction-badge.approved {
  background: #dfe9e2;
  color: #315e4a;
}

.attendance-correction-badge.rejected {
  background: #f6dcd8;
  color: #923b33;
}

.attendance-record-invalid {
  opacity: 0.55;
  text-decoration: line-through;
}

.attendance-late-badge {
  display: inline-flex;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #f6dcd8;
  color: #923b33;
  font-size: 8px;
  font-weight: 900;
  white-space: nowrap;
}

.attendance-late-badge.submitted {
  background: #ffe6c6;
  color: #79420d;
}

.attendance-record-late { background: #fff7f4; }

.attendance-late-reason-cell {
  max-width: 260px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.attendance-record-corrected {
  background: #f2f7f4;
}

.attendance-correction-panel {
  margin: 14px 0;
  padding: 18px;
  border: 1px solid rgba(164, 61, 53, 0.22);
  border-radius: var(--radius);
  background: #fff8f5;
}

.attendance-correction-panel > .panel-head > b {
  color: #a43d35;
}

.attendance-correction-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.attendance-correction-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.attendance-correction-card span,
.attendance-correction-card strong,
.attendance-correction-card p {
  display: block;
}

.attendance-correction-card span {
  color: #a43d35;
  font-size: 8px;
  font-weight: 850;
}

.attendance-correction-card strong {
  margin-top: 4px;
}

.attendance-correction-card p,
.attendance-correction-card blockquote {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.attendance-correction-card .attendance-correction-route {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 8px;
  color: var(--ink);
}

.attendance-correction-route b,
.attendance-correction-route i {
  display: inline;
  font-size: 10px;
  font-style: normal;
}

.attendance-correction-card > div > small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.attendance-correction-card blockquote {
  padding-left: 8px;
  border-left: 2px solid #a43d35;
  color: var(--ink);
}

.attendance-correction-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.attendance-correction-empty {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.attendance-event {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #dfe9e2;
  color: #315e4a;
  font-size: 9px;
  font-weight: 800;
}

.attendance-event.check_out {
  background: #e8e4da;
  color: #5d584e;
}

.attendance-event.transfer_departure {
  background: #f5d9c8;
  color: #8a3f19;
}

.attendance-event.resume_after_transfer {
  background: #dbe8f0;
  color: #315a73;
}

.office-location-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 28px;
  margin-bottom: 14px;
  background: var(--ink);
  color: var(--paper);
}

.office-location-card.missing {
  background: #e7e3d8;
  color: var(--ink);
}

.office-location-card h2,
.office-location-card p {
  margin: 4px 0;
}

.office-location-card span,
.office-location-card small,
.office-location-card p {
  color: rgba(242, 240, 233, 0.62);
  font-size: 10px;
}

.office-location-card.missing span,
.office-location-card.missing p {
  color: var(--muted);
}

.site-attendance-grid {
  margin: 14px 0 24px;
}

.attendance-assignment-board {
  margin: 14px 0 24px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.42);
}

.attendance-assignment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.attendance-assignment-head strong,
.attendance-assignment-head span {
  display: block;
}

.attendance-assignment-head strong {
  font-size: 14px;
}

.attendance-assignment-head span {
  max-width: 650px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.6;
}

.attendance-assignment-head > b {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 8px;
}

.employee-workplace-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.employee-workplace-card {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.employee-workplace-card > div:first-child,
.employee-workplace-card > div:first-child strong,
.employee-workplace-card > div:first-child small {
  display: block;
}

.employee-workplace-card > div:first-child small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.employee-workplace-card > b {
  display: block;
  margin: 9px 0 7px;
  font-size: 9px;
}

.employee-workplace-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.employee-workplace-list span {
  max-width: 100%;
  overflow: hidden;
  padding: 4px 7px;
  border-radius: 999px;
  background: #e0ebe4;
  color: #315e4a;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employee-workplace-list span.empty {
  background: #ebe7dd;
  color: var(--muted);
}

.site-attendance-card {
  padding: 22px;
  background: rgba(255, 255, 255, 0.6);
}

.site-attendance-card.temporary {
  border-color: rgba(49, 90, 115, 0.32);
  box-shadow: inset 0 4px 0 #607b8a;
}

.site-attendance-card.inactive {
  opacity: 0.56;
}

.site-attendance-card.temporary.inactive {
  opacity: 1;
  background: rgba(239, 241, 239, 0.74);
}

.site-attendance-card.temporary.inactive > h3,
.site-attendance-card.temporary.inactive > p,
.site-attendance-card.temporary.inactive > small,
.site-attendance-card.temporary.inactive .site-attendance-foot {
  color: var(--muted);
}

.site-attendance-card h3,
.site-attendance-card p {
  margin: 7px 0;
}

.site-attendance-card > small {
  color: var(--muted);
  font-size: 10px;
}

.site-attendance-top,
.site-attendance-foot,
.assigned-people {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.site-attendance-top span,
.site-attendance-top b,
.site-attendance-foot,
.assigned-people {
  font-size: 10px;
}

.site-attendance-top b {
  padding: 4px 7px;
  border-radius: 999px;
  background: #dfe9e2;
  color: #315e4a;
}

.site-attendance-card.temporary .site-attendance-top b {
  background: #dfe9ee;
  color: #315a73;
}

.site-attendance-top span i {
  display: inline-flex;
  margin-right: 6px;
  padding: 4px 7px;
  border-radius: 999px;
  background: #315a73;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  letter-spacing: 0.02em;
}

.assigned-people {
  align-items: flex-start;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.assigned-people span {
  max-width: 70%;
  color: var(--muted);
  line-height: 1.5;
  text-align: right;
}

.temporary-site-reasons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.temporary-site-reasons article {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: rgba(223, 233, 238, 0.58);
}

.temporary-site-reasons strong,
.temporary-site-reasons p {
  display: block;
  margin: 0;
}

.temporary-site-reasons strong {
  color: #315a73;
  font-size: 8px;
}

.temporary-site-reasons p {
  margin-top: 5px;
  color: var(--ink);
  font-size: 9px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.temporary-site-policy {
  border-left: 4px solid #607b8a;
}

.attendance-privacy-note {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 20px 24px;
  background: rgba(25, 25, 23, 0.04);
}

.attendance-privacy-note p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.attendance-policy {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(242, 240, 233, 0.72);
}

.attendance-policy dl {
  margin: 14px 0;
}

.attendance-policy dl > div {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.attendance-policy dt {
  font-weight: 800;
}

.attendance-policy dd {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.attendance-policy.compact {
  padding: 12px;
}

.policy-agree {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border-radius: 10px;
  background: #fff;
  font-weight: 750;
  line-height: 1.5;
  cursor: pointer;
}

.policy-agree input,
.attendance-employee-option input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--ink);
}

.gps-location-capture {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px dashed rgba(25, 25, 23, 0.28);
  border-radius: var(--radius);
}

.workplace-address-field {
  grid-column: 1 / -1;
}

.workplace-address-field > label,
.workplace-address-field > small {
  display: block;
}

.workplace-address-field > label {
  margin-bottom: 7px;
  font-size: 11px;
  font-weight: 800;
}

.workplace-address-field > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 9px;
}

.workplace-address-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.workplace-address-search input {
  width: 100%;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.address-search-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 7px;
}

.address-search-tools button {
  padding: 0;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--forest-2);
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  cursor: pointer;
}

.address-search-results[hidden] {
  display: none;
}

.address-search-results {
  margin-top: 9px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.address-search-list {
  display: grid;
  max-height: 280px;
  overflow-y: auto;
}

.address-search-list button {
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.address-search-list button:hover {
  background: var(--paper);
}

.address-search-list strong,
.address-search-list span {
  display: block;
}

.address-search-list strong {
  margin-bottom: 3px;
  font-size: 11px;
}

.address-search-list span,
.address-provider-credit,
.address-search-loading,
.address-search-empty {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.address-provider-credit,
.address-search-loading,
.address-search-empty {
  display: block;
  padding: 10px 14px;
}

.address-search-empty strong,
.address-search-empty span {
  display: block;
}

.address-search-empty strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 10px;
}

.address-selected-result {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
}

.address-selected-result strong {
  font-size: 11px;
}

.address-selected-result span,
.address-selected-result small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.postcode-layer {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(25, 25, 23, 0.62);
}

.postcode-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(560px, 100%);
  height: min(720px, calc(100dvh - 40px));
  overflow: hidden;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(25, 25, 23, 0.3);
}

.postcode-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.postcode-head div,
.postcode-head strong,
.postcode-head span {
  display: block;
}

.postcode-head strong {
  font-size: 13px;
}

.postcode-head span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.postcode-frame {
  min-height: 420px;
}

.workplace-coordinate-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #eee9de;
  color: var(--muted);
  font-size: 9px;
}

.workplace-coordinate-status i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #9b9588;
}

.workplace-coordinate-status.ready {
  background: #e0ebe4;
  color: #315e4a;
}

.workplace-coordinate-status.ready i {
  background: #3e7b62;
}

.gps-location-capture strong,
.gps-location-capture span {
  display: block;
}

.gps-location-capture span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.attendance-employee-field {
  grid-column: 1 / -1;
  padding: 0;
  border: 0;
}

.attendance-employee-field legend {
  font-weight: 800;
}

.attendance-employee-field > p {
  margin: 4px 0 10px;
  color: var(--muted);
  font-size: 9px;
}

.attendance-employee-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.attendance-employee-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
}

.attendance-employee-option strong,
.attendance-employee-option small,
.attendance-employee-option em {
  display: block;
}

.attendance-employee-option small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.attendance-employee-option em {
  margin-top: 6px;
  color: #315e4a;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}

@media (max-width: 900px) {
  .attendance-punch {
    grid-template-columns: 1fr;
  }

  .punch-button {
    min-height: 140px;
  }

  .expected-grid,
  .site-attendance-grid,
  .employee-workplace-grid,
  .attendance-correction-grid {
    grid-template-columns: 1fr;
  }

  .attendance-route-guide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .attendance-late-alert {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
  }

  .attendance-late-alert button { width: 100%; }

  .attendance-consent,
  .section-title,
  .office-location-card,
  .gps-location-capture,
  .attendance-assignment-head,
  .site-attendance-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-attendance-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .temporary-site-reasons {
    grid-template-columns: 1fr;
  }

  .punch-actions,
  .attendance-employee-options,
  .attendance-privacy-note {
    grid-template-columns: 1fr;
  }

  .attendance-correction-card {
    flex-direction: column;
  }

  .attendance-route-correction-request {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .attendance-route-guide,
  .workplace-address-search {
    grid-template-columns: 1fr;
  }

  .section-title > span,
  .assigned-people span {
    max-width: none;
    text-align: left;
  }

  .attendance-policy dl > div {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}

/* Preliminary estimate engine */
.preliminary-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  align-items: end;
  gap: 34px;
  padding: 32px 34px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 22px;
}
.preliminary-intro h2 { margin: 6px 0 10px; max-width: 780px; font-size: clamp(27px, 3.2vw, 43px); line-height: 1.1; letter-spacing: -.035em; }
.preliminary-intro h2 span { display: inline-block; white-space: nowrap; }
.preliminary-intro p:not(.eyebrow) { max-width: 690px; margin: 0; color: rgba(242, 240, 233, .66); font-size: 12px; line-height: 1.65; }
.preliminary-intro ol { display: flex; align-items: center; gap: 8px; padding: 0; margin: 0; list-style: none; }
.preliminary-intro li { display: grid; justify-items: center; gap: 7px; min-width: 86px; }
.preliminary-intro li + li::before { position: absolute; width: 18px; height: 1px; margin: 18px 0 0 -102px; background: rgba(242, 240, 233, .28); content: ""; }
.preliminary-intro li b { display: grid; place-items: center; width: 36px; height: 36px; color: var(--ink); background: #f1c75b; border-radius: 50%; font-size: 11px; }
.preliminary-intro li span { color: rgba(242, 240, 233, .75); font-size: 9px; font-weight: 800; white-space: nowrap; }
.preliminary-calibration { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; margin: 14px 0; border: 1px solid #ddb76a; border-left: 6px solid #d18b28; border-radius: 14px; background: #fff7df; }
.preliminary-calibration.approved { border-color: #9fc9b2; border-left-color: #2b7652; background: #eef8f2; }
.preliminary-calibration > div { display: grid; gap: 4px; }
.preliminary-calibration > div > span { color: #9a5c14; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.preliminary-calibration.approved > div > span { color: #226245; }
.preliminary-calibration strong { font-size: 14px; }
.preliminary-calibration p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.preliminary-calibration dl { display: grid; grid-template-columns: repeat(3, auto); gap: 8px; margin: 0; }
.preliminary-calibration dl > div { display: grid; gap: 3px; min-width: 90px; padding: 9px 11px; border-left: 1px solid rgba(25, 25, 23, .14); }
.preliminary-calibration dt { color: var(--muted); font-size: 8px; }
.preliminary-calibration dd { margin: 0; font-size: 10px; font-weight: 900; }
.preliminary-criteria { display: grid; grid-template-columns: minmax(210px, .72fr) minmax(0, 1.28fr); gap: 22px; padding: 20px 22px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.preliminary-criteria > div:first-child h2 { margin: 4px 0 6px; font-size: 17px; }
.preliminary-criteria > div:first-child > span { color: var(--muted); font-size: 9px; line-height: 1.5; }
.preliminary-criteria-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preliminary-criteria-grid article { padding: 12px; border-left: 3px solid #8e8a80; background: #f0ede5; }
.preliminary-criteria-grid article:nth-child(2) { border-left-color: #ff5935; }
.preliminary-criteria-grid article:nth-child(3) { border-left-color: #345e81; }
.preliminary-criteria-grid article > span { font-size: 9px; font-weight: 950; }
.preliminary-criteria-grid ul { display: grid; gap: 5px; padding-left: 15px; margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.45; }
.preliminary-workspace { display: grid; grid-template-columns: minmax(520px, 1.05fr) minmax(480px, .95fr); align-items: start; gap: 14px; }
.preliminary-workspace > div,
.preliminary-workspace > aside { min-width: 0; }
.preliminary-workspace > aside { position: sticky; top: 18px; }
.preliminary-form { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: var(--line); }
.preliminary-form-section { padding: 22px; background: var(--surface); }
.preliminary-form-section > header { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.preliminary-form-section > header > span { display: grid; place-items: center; width: 34px; height: 34px; color: var(--paper); background: var(--ink); border-radius: 10px; font-size: 9px; font-weight: 950; }
.preliminary-form-section > header h3 { margin: 0; font-size: 15px; }
.preliminary-form-section > header p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.preliminary-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.preliminary-fields > label,
.preliminary-delivery-fields > label,
.preliminary-notes { display: grid; gap: 6px; min-width: 0; }
.preliminary-fields > label.wide { grid-column: 1 / -1; }
.preliminary-fields label > span,
.preliminary-delivery-fields label > span,
.preliminary-notes > span,
.preliminary-scope legend { color: #514f49; font-size: 9px; font-weight: 850; }
.preliminary-fields input,
.preliminary-fields select,
.preliminary-delivery-fields input,
.preliminary-notes textarea { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; background: #fffdf8; color: var(--ink); font: inherit; font-size: 11px; }
.preliminary-fields input,
.preliminary-fields select,
.preliminary-delivery-fields input { height: 43px; padding: 0 11px; }
.preliminary-notes textarea { padding: 12px; line-height: 1.55; resize: vertical; }
.preliminary-scope { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 0 0 14px; border: 0; }
.preliminary-scope legend { width: 100%; margin-bottom: 2px; }
.preliminary-scope label { position: relative; cursor: pointer; }
.preliminary-scope input { position: absolute; opacity: 0; pointer-events: none; }
.preliminary-scope span { display: block; padding: 9px 11px; border: 1px solid var(--line); border-radius: 999px; background: #fffdf8; font-size: 9px; font-weight: 800; }
.preliminary-scope input:checked + span { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.preliminary-scope input:focus-visible + span { outline: 3px solid rgba(25, 25, 23, .2); outline-offset: 2px; }
.preliminary-upload { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 9px; }
.preliminary-upload input { min-width: 0; padding: 10px; border: 1px dashed #aaa69b; border-radius: 10px; background: #fffdf8; font-size: 9px; }
.preliminary-upload small { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.preliminary-publish { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 18px; padding: 20px 22px; background: #e9e5da; }
.preliminary-publish > div:first-child > label,
.preliminary-delivery-fields .consent { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 850; }
.preliminary-publish p { margin: 7px 0 0 24px; color: var(--muted); font-size: 8px; line-height: 1.45; }
.preliminary-delivery-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; }
.preliminary-delivery-fields .consent { display: flex; }
.preliminary-form-actions { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(140px, .72fr); gap: 8px; padding: 16px 22px; background: var(--surface); }
.preliminary-result-empty { display: grid; align-content: center; min-height: 390px; padding: 34px; border: 1px dashed #aaa69b; border-radius: 18px; background: rgba(251, 250, 246, .54); }
.preliminary-result-empty span { color: #ff5935; font-size: 9px; font-weight: 950; letter-spacing: .14em; }
.preliminary-result-empty h2 { max-width: 430px; margin: 8px 0 10px; font-size: clamp(23px, 2.6vw, 34px); line-height: 1.15; }
.preliminary-result-empty p { max-width: 430px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.preliminary-result { display: grid; gap: 12px; padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.preliminary-result-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding: 3px 3px 8px; }
.preliminary-result-head h2 { margin: 4px 0; font-size: 22px; }
.preliminary-result-head > div:first-child > span { color: var(--muted); font-size: 8px; }
.preliminary-score { display: grid; grid-template-columns: auto auto auto; align-items: end; justify-content: end; text-align: right; }
.preliminary-score > span { grid-column: 1 / -1; color: var(--muted); font-size: 8px; }
.preliminary-score > strong { font-size: 31px; line-height: 1; }
.preliminary-score > i { margin-bottom: 3px; font-size: 10px; font-style: normal; }
.preliminary-score > small { grid-column: 1 / -1; margin-top: 4px; color: var(--muted); font-size: 8px; }
.preliminary-publishable,
.preliminary-suppressed { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; padding: 11px 13px; border-left: 4px solid #2b7652; border-radius: 5px 10px 10px 5px; background: #e6f3eb; }
.preliminary-suppressed { border-left-color: #c17b22; background: #fff4d8; }
.preliminary-publishable b,
.preliminary-suppressed b { font-size: 10px; }
.preliminary-publishable > span,
.preliminary-suppressed > span { color: var(--muted); font-size: 8px; }
.preliminary-suppressed > span:not(:first-of-type) { padding: 3px 5px; color: #7a4e16; background: #f5dfaa; border-radius: 999px; }
.preliminary-missing { display: grid; gap: 8px; padding: 12px; border: 1px solid #e5c18d; border-radius: 11px; background: #fffaf0; }
.preliminary-missing strong { font-size: 9px; }
.preliminary-missing > div { display: flex; flex-wrap: wrap; gap: 5px; }
.preliminary-missing span { padding: 5px 7px; border: 1px solid #ead5b4; border-radius: 999px; color: #7d5421; font-size: 8px; font-weight: 800; }
.preliminary-package-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.preliminary-package { display: grid; align-content: start; gap: 11px; min-width: 0; padding: 14px 12px; border: 1px solid var(--line); border-top: 5px solid #8f8d86; border-radius: 7px 7px 13px 13px; background: #fffdf8; }
.preliminary-package.premium { border-top-color: #345e81; }
.preliminary-package.signature { border-top-color: #8b5f2d; }
.preliminary-package.recommended { box-shadow: 0 0 0 2px #f1c75b, 0 12px 30px rgba(25, 25, 23, .08); }
.preliminary-package header { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.preliminary-package header span { color: #ff5935; font-size: 7px; font-weight: 950; letter-spacing: .1em; }
.preliminary-package header h3 { margin: 3px 0 0; font-size: 13px; word-break: keep-all; }
.preliminary-package header > b { padding: 4px 6px; color: #604615; background: #f1c75b; border-radius: 999px; font-size: 7px; white-space: nowrap; }
.preliminary-package-amount { display: grid; gap: 3px; min-height: 48px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.preliminary-package-amount > strong { display: grid; gap: 2px; font-size: 13px; line-height: 1.28; }
.preliminary-package-amount > strong i { color: var(--muted); font-size: 9px; font-style: normal; }
.preliminary-package-amount > small { color: var(--muted); font-size: 7px; }
.preliminary-package-amount .preliminary-calibrating { color: #8a5e21; font-size: 11px; }
.preliminary-package ul { display: grid; gap: 6px; padding: 0; margin: 0; list-style: none; }
.preliminary-package li { display: grid; gap: 3px; min-width: 0; }
.preliminary-package li > span { display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preliminary-package li > span b { color: var(--muted); font-size: 7px; }
.preliminary-package li > strong { color: #55534d; font-size: 7px; }
.preliminary-package li.empty-breakdown { color: var(--muted); font-size: 8px; line-height: 1.45; }
.preliminary-package .btn { align-self: end; width: 100%; padding-inline: 7px; font-size: 8px; white-space: normal; }
.preliminary-reasons { border: 1px solid var(--line); border-radius: 11px; background: #f7f5ef; }
.preliminary-reasons summary { padding: 11px 13px; cursor: pointer; font-size: 9px; font-weight: 850; }
.preliminary-reasons ul,
.preliminary-disclaimers ul { display: grid; gap: 5px; padding: 0 20px 12px 29px; margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.preliminary-disclaimers { padding: 12px; color: #e8e4db; background: var(--ink); border-radius: 11px; }
.preliminary-disclaimers > strong { font-size: 9px; }
.preliminary-disclaimers ul { padding-bottom: 0; color: rgba(242, 240, 233, .67); }
.preliminary-public-link { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid #a8c5b3; border-radius: 11px; background: #f1f8f4; }
.preliminary-public-link > div { display: grid; gap: 4px; min-width: 0; }
.preliminary-public-link span { color: #2b684a; font-size: 8px; font-weight: 900; }
.preliminary-public-link a { overflow: hidden; color: var(--ink); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preliminary-link-once, .preliminary-evidence, .preliminary-delivery-state { display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #f7f5ef; }
.preliminary-link-once b, .preliminary-evidence b, .preliminary-delivery-state b { font-size: 9px; }
.preliminary-link-once span, .preliminary-evidence span, .preliminary-delivery-state span { color: var(--muted); font-size: 8px; line-height: 1.55; overflow-wrap: anywhere; }
.preliminary-history { margin-top: 16px; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.preliminary-history > div:last-child { display: grid; gap: 7px; margin-top: 13px; }
.preliminary-history-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 12px 13px; text-align: left; color: inherit; border: 1px solid var(--line); border-radius: 11px; background: #fffdf8; cursor: pointer; }
.preliminary-history-row:hover { border-color: #8f8c84; }
.preliminary-history-row > div { display: grid; gap: 3px; min-width: 0; }
.preliminary-history-row > div strong { font-size: 11px; }
.preliminary-history-row > div small { overflow: hidden; color: var(--muted); font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.preliminary-history-row > b { font-size: 12px; }
.preliminary-history-row > i { color: var(--muted); font-size: 8px; font-style: normal; }
.preliminary-history-status { padding: 5px 7px; color: #7b5520; background: #fff0c8; border-radius: 999px; font-size: 7px; font-weight: 900; white-space: nowrap; }
.preliminary-history-status.published { color: #245f45; background: #e4f1e9; }

@media (max-width: 1260px) {
  .preliminary-workspace { grid-template-columns: 1fr; }
  .preliminary-workspace > aside { position: static; }
  .preliminary-package-amount > strong { display: block; }
  .preliminary-package-amount > strong i { margin: 0 3px; }
}

@media (max-width: 820px) {
  .preliminary-intro { grid-template-columns: 1fr; align-items: start; padding: 26px 22px; }
  .preliminary-intro ol { width: 100%; justify-content: space-between; }
  .preliminary-calibration { align-items: stretch; flex-direction: column; }
  .preliminary-calibration dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .preliminary-calibration dl > div { min-width: 0; }
  .preliminary-criteria { grid-template-columns: 1fr; }
  .preliminary-form-actions { grid-template-columns: 1fr 1fr; }
  .preliminary-form-actions .btn:first-child { grid-column: 1 / -1; grid-row: 2; }
  .preliminary-package-grid { grid-template-columns: 1fr; }
  .preliminary-package { padding: 16px; }
}

@media (max-width: 560px) {
  .preliminary-intro { gap: 24px; padding: 22px 18px; border-radius: 17px; }
  .preliminary-intro h2 { font-size: clamp(24px, 8.2vw, 31px); }
  .preliminary-intro li { min-width: 0; }
  .preliminary-intro li + li::before { display: none; }
  .preliminary-intro li span { font-size: 8px; }
  .preliminary-calibration { padding: 16px; }
  .preliminary-calibration dl { gap: 4px; }
  .preliminary-calibration dl > div { padding: 8px; }
  .preliminary-criteria { padding: 17px 15px; }
  .preliminary-criteria-grid { grid-template-columns: 1fr; }
  .preliminary-form-section { padding: 18px 15px; }
  .preliminary-fields,
  .preliminary-fields.quantity,
  .preliminary-publish,
  .preliminary-delivery-fields,
  .preliminary-form-actions,
  .preliminary-upload { grid-template-columns: 1fr; }
  .preliminary-fields > label.wide { grid-column: auto; }
  .preliminary-publish p { margin-left: 0; }
  .preliminary-upload small { grid-column: auto; }
  .preliminary-result { padding: 14px; }
  .preliminary-result-head { align-items: flex-start; flex-direction: column; }
  .preliminary-score { justify-content: start; text-align: left; }
  .preliminary-history { padding: 15px; }
  .preliminary-history-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .preliminary-history-row > b { display: none; }
  .preliminary-history-row > i { grid-column: 3; grid-row: 1; }
  .preliminary-public-link { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }

  .boot-video,
  .boot-skip { display: none; }
}

/* 뒤쪽 공통 탭 규칙보다 견적 단계 열 수를 우선합니다. */
.record-stage-tabs.quote-stage-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .record-stage-tabs.quote-stage-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .record-stage-tabs.quote-stage-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 360px) { .record-stage-tabs.quote-stage-tabs { grid-template-columns: 1fr; } }

/* Sales lifecycle and project operating-stage clarity */
.record-stage-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #e9e6dd;
}
.record-stage-tabs.staff { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.record-stage-tabs.project-stage-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.record-stage-tabs button {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.record-stage-tabs button:hover { color: var(--ink); background: rgba(255,255,255,.45); }
.record-stage-tabs button[aria-selected="true"] { border-color: var(--ink); color: var(--paper); background: var(--ink); box-shadow: 0 5px 14px rgba(25,25,23,.12); }
.record-stage-tabs b { font-size: 12px; }
.record-stage-tabs span { overflow: hidden; font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; opacity: .72; }
.lead-closure-badge,
.lead-closure-action-state,
.project-stage-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}
td .lead-closure-badge { margin: 5px 0 0 7px; vertical-align: top; }
.lead-closure-badge.pending,
.lead-closure-action-state { color: #755314; background: #f2e6bd; }
.lead-closure-action-state.protected { color: #6b3c36; background: #efe2df; }
.lead-closure-badge.archived { color: #5d5a53; background: #dfddd6; }
.btn.closure { border-color: #735c24; color: #fff; background: #735c24; }
.btn.closure:hover { background: #5d491b; }
.closure-note,
.lead-lifecycle-note,
.pre-contract-project-intro {
  display: grid;
  gap: 6px;
  padding: 15px 17px;
  border: 1px solid #d6c58f;
  border-radius: 12px;
  color: #4f421e;
  background: #f6efda;
}
.closure-note strong,
.lead-lifecycle-note strong,
.pre-contract-project-intro strong { font-size: 12px; }
.closure-note p,
.lead-lifecycle-note span,
.pre-contract-project-intro p { margin: 0; font-size: 10px; line-height: 1.6; }
.lead-lifecycle-note { margin: 0 22px 16px; }
.lead-lifecycle-note.archived { border-color: #ccc9c0; color: #55524c; background: #eeece6; }
.pre-contract-project-intro { margin-bottom: 15px; border-color: #aebfc8; color: #274c5e; background: #e9f0f3; }
.pre-contract-project-intro > span { font-size: 8px; font-weight: 900; letter-spacing: .14em; }

.project-stage-guide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #eeece5;
}
.project-stage-guide article { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 11px 13px; border-radius: 11px; background: var(--surface); }
.project-stage-guide article i { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border-radius: 50%; color: #fff; background: #607c89; font-size: 9px; font-style: normal; font-weight: 900; }
.project-stage-guide article:nth-of-type(2) i { background: #344b3d; }
.project-stage-guide article:nth-of-type(3) i { background: #77756e; }
.project-stage-guide article div { display: grid; gap: 3px; min-width: 0; }
.project-stage-guide strong { font-size: 11px; }
.project-stage-guide span { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.project-stage-guide > b { color: var(--muted); font-size: 10px; white-space: nowrap; }
.project-stage-list { display: grid; gap: 24px; }
.project-stage-section { display: grid; gap: 11px; }
.project-stage-section > header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 0 3px 10px; border-bottom: 2px solid #607c89; }
.project-stage-section.confirmed > header { border-color: #344b3d; }
.project-stage-section.warranty-as > header { border-color: #8b6428; }
.project-stage-section.archived > header { border-color: #8b887f; }
.project-stage-section > header div { display: grid; gap: 3px; }
.project-stage-section > header span { color: #607c89; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.project-stage-section.confirmed > header span { color: #344b3d; }
.project-stage-section.warranty-as > header span { color: #76501b; }
.project-stage-section.archived > header span { color: #6c6961; }
.project-stage-section > header h2 { margin: 0; font-size: 17px; }
.project-stage-section > header p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.5; }
.project-stage-section > header > b { flex: 0 0 auto; font-size: 10px; }
.project-stage-badge.pre-contract { color: #31586a; background: #e3edf1; }
.project-stage-badge.confirmed { color: #2f513c; background: #e2ece5; }
.project-stage-badge.warranty-as { color: #6f4915; background: #f4e4bf; }
.project-stage-badge.archived { color: #5d5a53; background: #e5e2da; }
.project-card.stage-pre-contract { border-top: 4px solid #607c89; }
.project-card.stage-confirmed { border-top: 4px solid #344b3d; }
.project-card.stage-warranty-as { border-top: 4px solid #9a6b24; background: #fffdf7; }
.project-card .money-strip.warranty-as-cost { border-color: #dfc387; color: #65430f; background: #fbf0d6; }
.project-card .money-strip.warranty-as-cost em { color: #79571f; }
.project-card.stage-archived { border-top: 4px solid #8b887f; opacity: .9; }
.project-card .project-stage-badge { margin: 11px 0 1px; }
.project-hub-head .project-stage-badge { margin: 8px 0 5px; }
.project-precontract-banner { display: flex; align-items: center; gap: 14px; margin: -3px 0 14px; padding: 12px 16px; border: 1px solid #aebfc8; border-radius: 12px; color: #274c5e; background: #e9f0f3; }
.project-precontract-banner strong { flex: 0 0 auto; font-size: 10px; }
.project-precontract-banner span { font-size: 9px; line-height: 1.5; }
.project-precontract-banner.warranty-as { border-color: #ddc17d; color: #65430f; background: #fbf0d6; }
.attendance-policy.warranty-as,
.danger-note.warranty-as { border-color: #ddc17d; color: #65430f; background: #fbf0d6; }
.project-estimate-panel.warranty-as { border-color: #ddc17d; }
.quote-empty-strip.warranty-as { border-color: #ddc17d; color: #65430f; background: #fff8e8; }
.project-profit-strip.warranty-as { border-color: #ddc17d; background: #fbf0d6; }
.warranty-as-finance { margin-top: 18px; border-color: #ddc17d; }
.finance-integrity-warning { display: grid; gap: 5px; margin-bottom: 14px; padding: 13px 16px; border: 1px solid #b87836; border-radius: 12px; color: #6b411c; background: #fff7e9; }
.finance-integrity-warning strong { font-size: 11px; }
.finance-integrity-warning span { font-size: 9px; line-height: 1.55; }

@media (max-width: 760px) {
  .record-stage-tabs { grid-template-columns: 1fr; gap: 5px; padding: 5px; }
  .record-stage-tabs.staff { grid-template-columns: 1fr; }
  .record-stage-tabs.project-stage-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-stage-tabs button { grid-template-columns: minmax(0, 1fr) auto; align-items: center; padding: 11px 12px; }
  .record-stage-tabs span { text-align: right; }
  .record-stage-tabs.project-stage-tabs button { grid-template-columns: 1fr; align-content: center; min-height: 68px; }
  .record-stage-tabs.project-stage-tabs span { overflow: visible; text-align: left; text-overflow: clip; white-space: normal; }
  .lead-mobile-card > .lead-closure-badge { margin-top: -2px; }
  .lead-mobile-card.closure-pending { border-left: 4px solid #b58b31; }
  .lead-mobile-card.closure-archived { border-left: 4px solid #8b887f; }
  .lead-lifecycle-note { margin: 0 15px 14px; }
  .lead-closure-action-state { width: 100%; justify-content: center; min-height: 40px; }
  .project-stage-guide { grid-template-columns: 1fr; gap: 7px; }
  .project-stage-guide > b { transform: rotate(90deg); justify-self: center; font-size: 0; }
  .project-stage-guide > b::after { content: "→"; font-size: 12px; }
  .project-stage-section > header { align-items: flex-start; }
  .project-stage-section > header h2 { font-size: 15px; }
  .project-stage-section > header p { max-width: 255px; }
  .project-stage-section .project-grid { grid-template-columns: 1fr; }
  .pre-contract-project-intro { margin-bottom: 11px; padding: 13px; }
  .project-precontract-banner { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* BESPACE OS v1 product surfaces */
.boot {
  text-align: center;
}

.boot-symbol {
  width: 38px;
  height: 40px;
  gap: 4px;
  color: var(--ink);
}

.sidebar-symbol {
  width: 34px;
  height: 35px;
  color: var(--paper);
}

.content {
  display: grid;
  gap: 18px;
}

.demo-chip,
.count-chip,
.result-count {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.count-chip,
.result-count {
  background: var(--sage);
  color: var(--forest);
  letter-spacing: 0;
  font-size: 10px;
}

.metric small {
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid {
  grid-template-columns: minmax(320px, 0.85fr) minmax(420px, 1.15fr);
}

.dashboard-work-panel {
  display: grid;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 16px 38px rgba(25, 25, 23, 0.04);
}

.dashboard-work-head,
.dashboard-work-section-head,
.dashboard-work-title-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-work-head h2 {
  margin: 3px 0 4px;
  font-size: clamp(21px, 2vw, 28px);
}

.dashboard-work-head > div > span,
.dashboard-work-section-head p {
  color: var(--muted);
  font-size: 11px;
}

.dashboard-people {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 1px 6px;
  scrollbar-width: thin;
}

.dashboard-person-chip {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  min-width: 112px;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 36px 10px 12px;
  background: var(--paper);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.dashboard-person-chip:hover,
.dashboard-person-chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.dashboard-person-chip strong { font-size: 12px; white-space: nowrap; }
.dashboard-person-chip small { color: var(--muted); font-size: 9px; white-space: nowrap; }
.dashboard-person-chip.active small { color: rgba(242, 240, 233, 0.66); }
.dashboard-person-chip > span {
  position: absolute;
  top: 50%;
  right: 10px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: var(--forest);
  font-size: 9px;
  font-weight: 900;
  transform: translateY(-50%);
}

.dashboard-work-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.dashboard-work-columns > article {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
}

.dashboard-work-section-head {
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}

.dashboard-work-section-head h3 { margin: 0 0 3px; font-size: 15px; }
.dashboard-work-section-head > span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  font-weight: 900;
}

.dashboard-work-list { display: grid; }
.dashboard-work-list > .empty-state { margin: 12px; }
.dashboard-work-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
  transition: opacity 0.16s ease, background 0.16s ease;
}
.dashboard-work-row:last-child { border-bottom: 0; }
.dashboard-work-row:hover { background: rgba(25, 25, 23, 0.025); }
.dashboard-work-row.overdue { background: #fff7f5; }
.dashboard-work-row.done { opacity: 0.55; }
.dashboard-work-row.done .dashboard-work-title-line > button { text-decoration: line-through; }
.dashboard-work-row.is-saving { opacity: 0.65; }

.dashboard-work-check,
.dashboard-work-progress {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #aaa79e;
  border-radius: 9px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}
button.dashboard-work-check { cursor: pointer; }
button.dashboard-work-check:hover { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.dashboard-work-check.view-only { opacity: 0.45; }
.dashboard-work-progress { grid-template-columns: auto auto; align-content: center; gap: 1px; border-radius: 50%; }
.dashboard-work-progress strong { font-size: 10px; }
.dashboard-work-progress span { font-size: 7px; }
.dashboard-work-copy { min-width: 0; }
.dashboard-work-title-line > button {
  min-width: 0;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.dashboard-work-title-line > em {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 6px;
  background: #ebe9e2;
  color: #68655e;
  font-size: 8px;
  font-style: normal;
  font-weight: 800;
}
.dashboard-work-title-line > em.priority-high { background: #f7dfdb; color: #9c2b2b; }
.dashboard-work-copy > small,
.dashboard-work-due { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.dashboard-work-due.overdue { color: #ae3c33; font-weight: 800; }
.dashboard-work-due.today { color: var(--forest); font-weight: 800; }
.dashboard-work-subtasks { display: grid; gap: 5px; margin-top: 9px; }
.dashboard-work-subtask {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 5px 7px;
  background: #eeece5;
  color: var(--ink);
  text-align: left;
}
button.dashboard-work-subtask { cursor: pointer; }
button.dashboard-work-subtask:hover { background: #e3e0d6; }
.dashboard-work-subtask i { display: grid; width: 16px; height: 16px; place-items: center; border: 1px solid #aaa79e; border-radius: 5px; background: white; font-size: 9px; font-style: normal; }
.dashboard-work-subtask span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-work-subtask.done span { color: var(--muted); text-decoration: line-through; }
.dashboard-work-subtask.is-saving { opacity: 0.55; }
.dashboard-work-more {
  justify-self: center;
  border: 0;
  padding: 2px 8px;
  background: none;
  color: var(--ink);
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
}

.project-list,
.work-list,
.finance-list {
  display: grid;
  gap: 9px;
}

.project-row,
.work-item,
.finance-item {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(90px, 0.7fr) 50px auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px;
  background: white;
  text-align: left;
}

button.project-row,
button.project-card {
  cursor: pointer;
}

.project-row:hover,
.project-card:hover {
  border-color: var(--forest-2);
  box-shadow: 0 8px 22px rgba(24, 53, 47, 0.08);
}

.project-row div:first-child,
.work-item div:first-child,
.finance-item div:first-child {
  display: grid;
  gap: 4px;
}

.project-row strong,
.work-item strong,
.finance-item strong {
  font-size: 12px;
}

.project-row span,
.work-item span,
.finance-item span {
  color: var(--muted);
  font-size: 10px;
}

.project-row em {
  color: var(--forest);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.progress {
  position: relative;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e4e7e2;
}

.progress i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ink), #5a5953);
}

.progress.large {
  height: 9px;
}

.progress.cell {
  min-width: 80px;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.project-empty-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  gap: 4px;
  padding-bottom: 24px;
}

.project-empty-state .empty {
  padding-bottom: 16px;
}

.project-card {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  text-align: left;
  transition: 0.18s ease;
}

.project-card h2,
.project-card p {
  margin: 0;
}

.project-card h2 {
  font-size: 17px;
  letter-spacing: -0.04em;
}

.project-card p {
  color: var(--muted);
  font-size: 10px;
}

.project-card-top,
.project-card-foot,
.money-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-card-top > span:first-child {
  color: var(--forest-2);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.project-card-foot strong,
.project-card-foot span,
.money-strip span,
.money-strip em {
  font-size: 10px;
}

.project-card-foot span,
.money-strip span {
  color: var(--muted);
}

.money-strip {
  margin: 2px -20px -20px;
  padding: 12px 20px;
  border-radius: 0 0 16px 16px;
  background: var(--sage);
}

.money-strip strong {
  margin-left: auto;
  font-size: 13px;
}

.money-strip em {
  color: var(--forest-2);
  font-style: normal;
  font-weight: 900;
}

td strong + small,
td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

tr[data-action] {
  cursor: pointer;
}

tr[data-action]:hover td {
  background: #ece9e1;
}

.status.proposal_submitted,
.status.proposal_passed,
.status.estimate_preparing,
.status.estimate_submitted,
.status.negotiating,
.status.contract_expected,
.status.customer_review,
.status.submitted,
.status.needs_review,
.status.partial {
  background: #e7e4da;
  color: #4b4a45;
}

.status.contracted,
.status.active,
.status.completed,
.status.approved,
.status.paid,
.status.closed {
  background: #dcd9cf;
  color: var(--ink);
}

.status.rejected,
.status.cancelled,
.status.overdue {
  background: #f6deda;
  color: var(--red);
}

.btn.primary {
  background: var(--forest);
  color: white;
}

.btn.small {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 9px;
}

.drawer-actions {
  position: sticky;
  top: -1px;
  z-index: 2;
  margin: 0 -26px;
  padding: 12px 26px;
  border-block: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.96);
  backdrop-filter: blur(8px);
}

.project-drawer {
  width: min(880px, calc(100vw - 30px));
}

.drawer-section {
  margin-top: 24px;
}

.finance-item {
  grid-template-columns: minmax(180px, 1fr) auto auto auto;
}

.finance-grid {
  grid-template-columns: minmax(620px, 1.4fr) minmax(280px, 0.6fr);
}

.panel.wide {
  min-width: 0;
}

.positive {
  color: var(--ink);
  font-weight: 800;
}

.negative {
  color: var(--red);
  font-weight: 800;
}

.code {
  color: var(--forest-2);
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.team-card small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
  font-size: 9px;
}

.field.checkbox {
  align-content: center;
  min-height: 44px;
}

.field.checkbox label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.field.checkbox input {
  width: 16px;
  height: 16px;
}

.toast.bad {
  background: var(--red);
}

.error-symbol {
  width: 38px;
  height: 40px;
  gap: 4px;
  margin-bottom: 12px;
}

body.drawer-open {
  overflow: hidden;
}

@media (max-width: 1180px) {
  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-grid,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .boot {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .sidebar-symbol {
    width: 31px;
    height: 32px;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-row,
  .work-item,
  .finance-item {
    grid-template-columns: 1fr;
  }

  .project-row .progress,
  .work-item .progress {
    width: 100%;
  }

  .drawer-actions {
    position: static;
    margin-inline: -18px;
    padding-inline: 18px;
  }

  .top-actions .role-chip {
    display: none;
  }
}

/* Calendar workspaces */
.site-calendar-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, 0.38fr);
  gap: 16px;
  margin-bottom: 16px;
}

.site-picker,
.site-progress {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.site-picker {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 14px;
}

.site-picker label,
.site-progress span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.site-picker select {
  min-width: 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  padding: 7px 26px 7px 2px;
  background: transparent;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.site-picker > span {
  color: var(--muted);
  font-size: 11px;
}

.site-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 16px;
}

.site-progress strong {
  font-size: 24px;
}

.site-progress .progress {
  grid-column: 1 / -1;
}

.calendar-panel,
.expanded-week,
.goal-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 25px rgba(25, 25, 23, 0.035);
}

.calendar-panel,
.expanded-week {
  padding: 20px;
  overflow-x: auto;
}

.calendar-toolbar,
.goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.calendar-toolbar {
  margin-bottom: 18px;
}

.calendar-toolbar h2,
.goal-head h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.03em;
}

.calendar-toolbar > div > span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.calendar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.calendar-weekdays,
.calendar-grid {
  min-width: 840px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 13px 13px 0 0;
  background: var(--ink);
  color: var(--paper);
}

.calendar-weekdays span {
  padding: 9px;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
}

.calendar-day {
  min-width: 0;
  min-height: 128px;
  padding: 9px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #fbfaf6;
}

.calendar-day:nth-child(7n + 1) {
  border-left: 1px solid var(--line);
}

.calendar-day.outside {
  background: #e9e6dd;
  color: #929087;
}

.calendar-day.today {
  box-shadow: inset 0 0 0 2px var(--ink);
}

.calendar-day-head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.calendar-day-head time {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.calendar-day.today .calendar-day-head time {
  background: var(--ink);
  color: var(--paper);
}

.calendar-add,
.week-day-card header button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-weight: 800;
}

.calendar-events {
  display: grid;
  gap: 4px;
  margin-top: 5px;
}

.calendar-event,
.work-event {
  width: 100%;
  min-width: 0;
  border: 0;
  border-radius: 7px;
  text-align: left;
  cursor: pointer;
}

.calendar-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  padding: 6px 7px;
  background: var(--surface-2);
  color: var(--ink);
  font-size: 9px;
}

.calendar-event span,
.work-event span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event b {
  flex: 0 0 auto;
  font-size: 8px;
}

.calendar-event.in_progress {
  background: var(--ink);
  color: var(--paper);
}

.calendar-event.completed {
  opacity: 0.58;
  text-decoration: line-through;
}

.calendar-more {
  padding: 2px 5px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.calendar-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 10px;
}

.calendar-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.calendar-legend i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--surface-2);
}

.calendar-legend i.in-progress {
  background: var(--ink);
}

.calendar-legend i.completed {
  border: 1px solid var(--ink);
  background: transparent;
}

.calendar-legend small {
  margin-left: auto;
}

.work-calendar-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.work-calendar-summary article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.work-calendar-summary article.focus {
  background: var(--ink);
  color: var(--paper);
}

.work-calendar-summary span,
.work-calendar-summary small,
.week-empty {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.work-calendar-summary .focus span,
.work-calendar-summary .focus small {
  color: #c8c5bb;
}

.work-calendar-summary strong {
  display: block;
  margin: 5px 0 3px;
  font-size: 26px;
}

.work-scope-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid var(--ink);
  border-radius: 15px;
  background: var(--surface);
}

.work-scope-bar strong,
.work-scope-bar > div > span {
  display: block;
}

.work-scope-bar strong {
  margin: 4px 0;
  font-size: 15px;
}

.work-scope-bar > div > span,
.work-scope-bar label > span {
  color: var(--muted);
  font-size: 10px;
}

.work-scope-bar label {
  min-width: 260px;
}

.work-scope-bar label > span {
  display: block;
  margin-bottom: 5px;
  font-weight: 700;
}

.work-scope-bar select {
  width: 100%;
  min-height: 42px;
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.work-team-board,
.work-focus-panel,
.work-selection-empty,
.work-calendar-details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.work-team-board,
.work-focus-panel {
  margin-bottom: 16px;
  padding: 20px;
}

.work-team-head,
.work-focus-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.work-team-head h2,
.work-focus-head h2 {
  margin: 2px 0 6px;
  font-size: 22px;
  letter-spacing: -0.035em;
}

.work-team-head > div > span,
.work-focus-head > div > span {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.work-employee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 17px;
}

.work-employee-card {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f5ee;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.work-employee-card:hover,
.work-employee-card:focus-visible {
  border-color: var(--ink);
  transform: translateY(-1px);
}

.work-employee-card.selected {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.work-employee-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: #dedbd1;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.work-employee-copy,
.work-employee-copy strong,
.work-employee-copy small {
  min-width: 0;
  display: block;
}

.work-employee-copy strong,
.work-employee-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-employee-copy strong {
  font-size: 12px;
}

.work-employee-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.work-employee-card.selected .work-employee-copy small {
  color: rgba(242, 240, 233, 0.62);
}

.work-employee-card > em {
  padding: 3px 5px;
  border-radius: 5px;
  background: #f1d9d4;
  color: #8e3731;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
}

.work-employee-counts {
  display: flex;
  align-items: center;
  gap: 4px;
}

.work-employee-counts b {
  min-width: 40px;
  padding: 6px 7px;
  border-radius: 8px;
  background: #e8e5db;
  color: var(--ink);
  text-align: center;
  font-size: 11px;
}

.work-employee-counts b.important {
  background: #d7d4ca;
}

.work-employee-counts small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.work-calendar-summary.compact {
  margin-top: 0;
}

.work-selection-empty {
  min-height: 170px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
}

.work-selection-empty > i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.work-selection-empty strong,
.work-selection-empty span,
.work-focus-empty strong,
.work-focus-empty span {
  display: block;
}

.work-selection-empty strong,
.work-focus-empty strong {
  font-size: 13px;
}

.work-selection-empty span,
.work-focus-empty span {
  max-width: 580px;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.read-only-chip {
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.work-focus-list {
  display: grid;
  gap: 8px;
  margin-top: 17px;
}

.work-focus-item {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-left: 4px solid #77756e;
  border-radius: 11px;
  background: #f8f6f0;
  color: var(--ink);
  text-align: left;
}

button.work-focus-item {
  cursor: pointer;
}

button.work-focus-item:hover,
button.work-focus-item:focus-visible {
  border-color: var(--ink);
}

.work-focus-item.priority-high {
  border-left-color: var(--ink);
  background: #e8e5db;
}

.work-focus-item.priority-low {
  border-left-color: #bbb8ae;
}

.work-focus-item.sales-inquiry {
  border-color: #d98958;
  border-left-color: #c85f2c;
  background: #f6e1d3;
}

.work-focus-item.sales-inquiry.priority-high {
  border-left-color: #9f3f18;
  background: #f2d1bd;
}

.work-focus-item.done {
  opacity: 0.62;
}

.work-focus-item.is-saving,
.work-event.is-saving,
.goal-item.is-saving,
.work-checklist-item.is-saving {
  opacity: 0.78;
}

.work-focus-item,
.work-event,
.goal-item,
.work-checklist-item {
  transition: opacity 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.work-focus-check {
  width: 24px;
  height: 24px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--surface);
}

button.work-focus-item:hover .work-focus-check::after {
  content: "✓";
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 10px;
}

button.work-focus-check {
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.work-focus-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.work-focus-copy,
.work-focus-copy strong,
.work-focus-copy small {
  min-width: 0;
  display: block;
}

.work-focus-copy strong {
  margin: 5px 0 4px;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-focus-copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-focus-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.work-focus-badges b,
.work-focus-badges em {
  padding: 2px 5px;
  border-radius: 4px;
  background: #d9d6cc;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.work-focus-badges em {
  background: var(--ink);
  color: var(--paper);
}

.work-focus-badges em.pending {
  background: #f1d9d4;
  color: #8e3731;
}

.work-focus-due {
  min-width: 120px;
  text-align: right;
}

.work-focus-due strong,
.work-focus-due span {
  display: block;
}

.work-focus-due strong {
  font-size: 10px;
}

.work-focus-due.overdue strong {
  color: #8e3731;
}

.work-focus-due span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 8px;
}

.work-focus-empty {
  padding: 24px 4px;
}

.work-calendar-details {
  margin-top: 16px;
  overflow: hidden;
}

.work-calendar-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  cursor: pointer;
  list-style: none;
}

.work-calendar-details > summary::-webkit-details-marker {
  display: none;
}

.work-calendar-details > summary strong,
.work-calendar-details > summary span {
  display: block;
}

.work-calendar-details > summary strong {
  font-size: 12px;
}

.work-calendar-details > summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.work-calendar-details > summary b {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
}

.work-calendar-details[open] > summary {
  border-bottom: 1px solid var(--line);
}

.work-calendar-detail-body {
  padding: 16px;
  background: #ece9e1;
}

.goals-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.goal-panel {
  padding: 20px;
}

.goal-panel.weekly {
  border-color: var(--ink);
}

.goal-list {
  display: grid;
  gap: 7px;
  margin-top: 15px;
}

.goal-item {
  width: 100%;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f7f5ee;
  text-align: left;
  cursor: pointer;
}

.goal-item i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 1px solid var(--ink);
  border-radius: 7px;
  font-style: normal;
  font-size: 11px;
}

.goal-item.done {
  opacity: 0.58;
}

.goal-item.done span {
  text-decoration: line-through;
}

.goal-item:not(button) {
  cursor: default;
}

.goal-item span small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 8px;
  text-decoration: none;
}

.goal-empty {
  padding: 18px 3px;
  color: var(--muted);
  font-size: 11px;
}

.work-month-panel {
  margin-bottom: 16px;
}

.primary-work-calendar {
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(25, 25, 23, 0.06);
}

.work-day {
  min-height: 108px;
  cursor: pointer;
}

.work-day.selected-week {
  background: #dedbd1;
}

.work-day.outside.selected-week {
  background: #d7d4ca;
}

.work-day .calendar-day-head > span {
  color: var(--muted);
  font-size: 9px;
}

.work-owner-groups {
  display: grid;
  gap: 5px;
}

.work-owner-group {
  min-width: 0;
}

.work-owner-group > summary {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid #c9c6bc;
  border-radius: 8px;
  background: #f7f5ee;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  font-size: 9px;
  font-weight: 850;
}

.work-owner-group > summary::-webkit-details-marker {
  display: none;
}

.work-owner-group > summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-owner-group > summary .work-owner-summary-copy {
  display: flex;
  align-items: center;
  gap: 5px;
}

.work-owner-group > summary .work-owner-name {
  flex: 0 1 auto;
  font-weight: 950;
}

.work-owner-review-counts {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  overflow: visible !important;
}

.work-owner-review-count {
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 1px 4px;
  border-radius: 999px;
  font-size: 6px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: -.01em;
  line-height: 1;
}

.work-owner-review-count.update { color: #175fa3; background: #dceeff; }
.work-owner-review-count.delete { color: #a9322c; background: #ffe3df; }
.work-owner-review-count.conflict { color: #6940a5; background: #eadfff; }

.work-owner-group.review-update > summary {
  border-color: #7eafd7;
  background: #eef7ff;
  box-shadow: inset 3px 0 #287dc4;
}

.work-owner-group.review-update > summary .work-owner-name { color: #175fa3; }

.work-owner-group.review-delete > summary {
  border-color: #dda09a;
  background: #fff1ef;
  box-shadow: inset 3px 0 #c34b43;
}

.work-owner-group.review-delete > summary .work-owner-name { color: #a9322c; }

.work-owner-group.review-conflict > summary {
  border-color: #b7a0d8;
  background: #f6f0ff;
  box-shadow: inset 3px 0 #7851ae;
}

.work-owner-group.review-conflict > summary .work-owner-name { color: #6940a5; }

.work-owner-group > summary b {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  min-width: 23px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 8px;
}

.work-owner-group > summary:hover,
.work-owner-group > summary:focus-visible,
.work-owner-group[open] > summary {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
  outline: 0;
}

.work-owner-group[open] > summary b {
  background: var(--paper);
  color: var(--ink);
}

.work-owner-group[open] > summary .work-owner-name { color: var(--paper); }

.work-owner-group.all-done > summary {
  opacity: 0.58;
}

.work-owner-group.has-notion-review.all-done > summary {
  opacity: 1;
}

.work-owner-tasks {
  display: grid;
  gap: 4px;
  padding: 5px 0 2px 5px;
  transform-origin: top;
}

.work-owner-group[open] .work-owner-tasks {
  animation: work-owner-reveal 0.18s ease-out;
}

.work-owner-group .owner-badge {
  display: none;
}

@keyframes work-owner-reveal {
  from { opacity: 0; transform: translateY(-4px) scaleY(0.97); }
  to { opacity: 1; transform: translateY(0) scaleY(1); }
}

.work-event {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 7px 8px;
  border-left: 3px solid #77756e;
  background: #e6e3d9;
  color: var(--ink);
  font-size: 9px;
}

.work-event-open {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  cursor: pointer;
}

.work-event-open:hover {
  background: rgba(25, 25, 23, 0.035);
}

.work-event-open:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.work-event-top {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 5px;
}

.work-event-check {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 5px;
  background: #fffdf8;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
}

.work-event-check:hover,
.work-event-check:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}

.work-event-check.view-only {
  opacity: 0.45;
  cursor: default;
}

.work-event-check:disabled,
.work-focus-check:disabled,
.goal-item:disabled,
.work-checklist-item:disabled {
  cursor: wait;
}

.work-event:not(button) {
  cursor: default;
}

.work-event-badges {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.work-event .work-event-badges {
  overflow: visible;
  white-space: normal;
}

.owner-badge {
  width: fit-content;
  padding: 2px 4px;
  border: 1px solid #aaa79e;
  border-radius: 3px;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  font-weight: 800;
  text-decoration: none;
}

.work-event.priority-high {
  border-left-color: var(--ink);
  background: #d7d4ca;
  font-weight: 800;
}

.work-event.priority-low {
  border-left-color: #aaa79e;
  color: var(--muted);
}

.work-event.sales-inquiry,
.work-event.sales-inquiry.priority-high,
.work-event.sales-inquiry.priority-low {
  border-left-color: #c85f2c;
  background: #f2d1bd;
  color: #5c2b16;
}

.work-event.sales-inquiry.priority-high {
  border-left-color: #9f3f18;
  background: #ecc3aa;
}

.sales-inquiry-badge,
.inquiry-channel-badge,
.work-category-badge {
  width: fit-content;
  padding: 2px 5px;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.25;
  text-decoration: none;
}

.sales-inquiry-badge {
  background: #191917;
  color: #f2f0e9;
}

.inquiry-channel-badge {
  border: 1px solid #c85f2c;
  background: #fff8f3;
  color: #7c3518;
}

.work-category-badge {
  border: 1px solid #aaa79e;
  background: #f7f5ee;
  color: #4f4e49;
}

.work-category-badge.category-internal {
  border-color: #191917;
  background: #191917;
  color: #f2f0e9;
}

.work-category-badge.category-design { border-style: dashed; }
.work-category-badge.category-construction { border-width: 2px; }
.work-category-badge.category-finance { background: #dedbd1; }

.work-focus-badges .sales-inquiry-badge {
  border-radius: 999px;
  background: #191917;
  color: #f2f0e9;
  letter-spacing: 0;
}

.work-focus-badges .inquiry-channel-badge {
  border: 1px solid #c85f2c;
  border-radius: 999px;
  background: #fff8f3;
  color: #7c3518;
  letter-spacing: 0;
}

.inquiry-status-view,
.inquiry-status-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: #6a3a25;
  font-size: 8px;
  font-weight: 850;
  text-decoration: none;
}

.inquiry-status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border: 2px solid #8b877e;
  border-radius: 50%;
  background: transparent;
}

.inquiry-status-dot.status-contacted { border-color: #48765a; background: #5b916d; }
.inquiry-status-dot.status-kakao_consulting { border-color: #8c741f; background: #f4d64b; }
.inquiry-status-dot.status-phone_consulting { border-color: #4d6e84; background: #6d96ad; }
.inquiry-status-dot.status-meeting_scheduled { border-color: #a84e24; background: #df7948; }
.inquiry-status-dot.status-closed { border-color: #191917; background: #191917; }

.inquiry-status-control {
  padding: 5px 7px;
  border: 1px solid #d8a586;
  border-radius: 8px;
  background: #fff8f3;
}

.inquiry-status-control select {
  max-width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #5c2b16;
  font: inherit;
  font-size: 9px;
  font-weight: 850;
  cursor: pointer;
}

.work-event small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8px;
}

.notion-badge {
  width: fit-content;
  padding: 2px 4px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--paper);
  font-size: 6px;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.pending-member-badge {
  width: fit-content;
  padding: 2px 4px;
  border-radius: 3px;
  background: #f1d9d4;
  color: #8e3731;
  font-size: 6px;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.work-event.done {
  opacity: 0.5;
  text-decoration: none;
}

.work-event.done .work-event-title {
  text-decoration: line-through;
}

.work-event-progress {
  position: relative;
  z-index: 2;
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(25, 25, 23, 0.1);
  font-size: 7px;
  font-weight: 900;
}

.work-focus-progress {
  border-color: #b7b2a6 !important;
  background: #ece9e0 !important;
  color: #34332f !important;
}

.work-detail-modal .modal-head h2 {
  margin: 10px 0 0;
  font-size: 23px;
  line-height: 1.35;
}

.work-detail-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

.work-detail-type,
.work-detail-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 900;
}

.work-detail-type {
  border: 1px solid var(--line);
  background: #e7e4da;
}

.work-detail-type.sales {
  border-color: #c85f2c;
  background: #f2d1bd;
  color: #6b2e15;
}

.work-detail-type.category-sales_inquiry {
  border-color: #c85f2c;
  background: #f2d1bd;
  color: #6b2e15;
}

.work-detail-type.category-internal {
  border-color: #191917;
  background: #191917;
  color: #f2f0e9;
}

.work-detail-status.planned {
  background: var(--ink);
  color: var(--paper);
}

.work-detail-status.completed {
  background: #d7e4d9;
  color: #315b3e;
}

.work-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.work-detail-inquiry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #d8a586;
  border-radius: 13px;
  background: #fff3eb;
}

.work-detail-inquiry span,
.work-detail-inquiry strong {
  display: block;
}

.work-detail-inquiry span {
  color: #76513f;
  font-size: 8px;
  font-weight: 800;
}

.work-detail-inquiry strong {
  margin-top: 5px;
  font-size: 11px;
}

.work-detail-inquiry strong .inquiry-status-dot {
  display: inline-block;
  margin-right: 6px;
  vertical-align: -1px;
}

.work-detail-copy {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f5ee;
}

.work-detail-copy > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.work-detail-copy h3,
.work-detail-copy p {
  margin: 0;
}

.work-detail-copy p {
  color: #3f3e39;
  font-size: 12px;
  line-height: 1.75;
  white-space: pre-wrap;
}

.work-detail-copy p.empty-copy {
  color: var(--muted);
}

.work-detail-source {
  color: var(--ink);
  font-size: 9px;
  font-weight: 850;
  text-underline-offset: 3px;
}

.work-detail-checklist {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.work-checklist-head,
.work-checklist-head > div {
  display: flex;
  align-items: center;
}

.work-checklist-head {
  justify-content: space-between;
  gap: 12px;
}

.work-checklist-head > div {
  gap: 8px;
}

.work-checklist-head h3,
.work-checklist-head span,
.work-checklist-head strong {
  margin: 0;
}

.work-checklist-head h3 {
  font-size: 13px;
}

.work-checklist-head span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.work-checklist-head strong {
  font-size: 22px;
}

.work-checklist-progress {
  height: 7px;
  margin: 12px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7e4da;
}

.work-checklist-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 180ms ease;
}

.work-checklist-items {
  display: grid;
  gap: 7px;
}

.work-checklist-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  border: 1px solid #d8d4c8;
  border-radius: 10px;
  background: #f7f5ee;
  color: var(--ink);
  font: inherit;
  text-align: left;
}

button.work-checklist-item {
  cursor: pointer;
}

button.work-checklist-item:hover,
button.work-checklist-item:focus-visible {
  border-color: var(--ink);
  background: #efede5;
  outline: none;
}

.work-checklist-item > i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #aaa69a;
  border-radius: 7px;
  background: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 950;
}

.work-checklist-item > span {
  min-width: 0;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.45;
}

.work-checklist-item > em {
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
}

.work-checklist-item.done {
  border-color: #c3d5c6;
  background: #edf4ee;
}

.work-checklist-item.done > i {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.work-checklist-item.done > span {
  color: #66635c;
  text-decoration: line-through;
}

.work-checklist-item.is-saving > em {
  color: var(--ink);
}

.work-checklist-note {
  align-self: center;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

@media (max-width: 540px) {
  .work-detail-grid,
  .work-detail-inquiry {
    grid-template-columns: 1fr;
  }

  .work-detail-checklist {
    padding: 13px;
  }

  .work-checklist-head > div {
    display: grid;
    gap: 2px;
  }
}

.expanded-week {
  border: 2px solid var(--ink);
  background: #e7e4da;
}

.expanded-week-grid {
  min-width: 940px;
  display: grid;
  grid-template-columns: repeat(7, minmax(125px, 1fr));
  gap: 8px;
}

.week-day-card {
  min-height: 230px;
  padding: 11px;
  border: 1px solid #c8c4b9;
  border-radius: 13px;
  background: var(--surface);
}

.week-day-card.today {
  border: 2px solid var(--ink);
}

.week-day-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.week-day-card header div {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.week-day-card header span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.week-day-card header strong {
  font-size: 20px;
}

.week-tasks {
  display: grid;
  gap: 7px;
}

.week-empty {
  padding: 12px 2px;
}

@media (max-width: 960px) {
  .site-calendar-head,
  .work-calendar-summary,
  .goals-grid {
    grid-template-columns: 1fr;
  }

  .work-employee-grid {
    grid-template-columns: 1fr;
  }

  .site-picker {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .work-scope-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .work-team-head,
  .work-focus-head,
  .work-calendar-details > summary {
    align-items: stretch;
    flex-direction: column;
  }

  .work-employee-card {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .work-employee-card > em {
    grid-column: 3;
    grid-row: 1;
  }

  .work-employee-counts {
    grid-column: 1 / -1;
  }

  .work-employee-counts b {
    flex: 1;
  }

  .work-focus-item {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .work-focus-due {
    min-width: 0;
    text-align: left;
  }

  .work-focus-side {
    grid-column: 2;
    justify-items: start;
  }

  .work-scope-bar label {
    min-width: 0;
  }

  .calendar-toolbar,
  .goal-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-panel,
  .expanded-week {
    padding: 15px;
  }

  .calendar-legend {
    min-width: 620px;
  }
}

/* Performance reviews */
.status.draft {
  background: #e8e5db;
  color: var(--muted);
}

.status.self_submitted {
  background: #dcd9cf;
  color: var(--ink);
}

.status.reviewer_completed {
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.status.finalized {
  background: var(--ink);
  color: var(--paper);
}

.evaluation-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.evaluation-summary article {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.evaluation-summary article.attention {
  border-color: var(--ink);
}

.evaluation-summary span,
.evaluation-summary small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.evaluation-summary strong {
  display: block;
  margin: 4px 0;
  font-size: 27px;
}

.evaluation-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  padding: 16px 19px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--paper);
}

.evaluation-flow > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.evaluation-flow b {
  width: 28px;
  height: 28px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(242, 240, 233, 0.45);
  border-radius: 50%;
  font-size: 10px;
}

.evaluation-flow span,
.evaluation-flow small {
  display: block;
  white-space: nowrap;
}

.evaluation-flow span {
  font-size: 11px;
  font-weight: 800;
}

.evaluation-flow small {
  margin-top: 2px;
  color: #aaa79e;
  font-size: 8px;
  font-weight: 500;
}

.evaluation-flow > i {
  height: 1px;
  background: rgba(242, 240, 233, 0.22);
}

.evaluation-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.evaluation-section-head h2 {
  margin-bottom: 4px;
  font-size: 22px;
}

.evaluation-section-head > div > span {
  color: var(--muted);
  font-size: 11px;
}

.evaluation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.evaluation-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: 0.18s ease;
}

.evaluation-card:hover {
  border-color: var(--ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.evaluation-card-head,
.evaluation-period {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.evaluation-card-head em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

.evaluation-person {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 17px 0;
}

.evaluation-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 800;
}

.evaluation-person h2,
.evaluation-person p {
  margin: 0;
}

.evaluation-person h2 {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-person p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.evaluation-score {
  text-align: right;
}

.evaluation-score strong,
.evaluation-score small {
  display: block;
}

.evaluation-score strong {
  font-size: 24px;
}

.evaluation-score .score-pending {
  color: var(--muted);
}

.evaluation-score small {
  color: var(--muted);
  font-size: 8px;
}

.evaluation-period {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 8px;
}

.evaluation-next {
  margin: 12px -18px -18px;
  padding: 10px 18px;
  border-radius: 0 0 15px 15px;
  background: #e8e5db;
  color: var(--ink);
  font-size: 9px;
  font-weight: 800;
}

.evaluation-drawer {
  width: min(940px, calc(100vw - 30px));
}

.review-total {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 24px;
  padding: 20px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--paper);
}

.review-total > div:first-child {
  display: grid;
  align-content: center;
  justify-items: center;
  border-right: 1px solid rgba(242, 240, 233, 0.2);
}

.review-total > div:first-child span,
.review-total > div:first-child b {
  color: #c8c5bb;
  font-size: 10px;
}

.review-total > div:first-child strong {
  margin: 3px 0;
  font-size: 46px;
}

.score-bars {
  display: grid;
  gap: 9px;
}

.score-bar {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 40px;
  align-items: center;
  gap: 8px;
  font-size: 9px;
}

.score-bar > div {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(242, 240, 233, 0.18);
}

.score-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--paper);
}

.score-bar b {
  text-align: right;
  font-size: 9px;
}

.automatic-score-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px minmax(0, 1fr) 24px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  padding: 16px;
  border-radius: 15px;
  background: var(--ink);
  color: var(--paper);
}

.automatic-score-hero > div {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 5px 9px;
}

.automatic-score-hero > i {
  display: grid;
  place-items: center;
  color: #aaa79e;
  font-size: 16px;
  font-style: normal;
  font-weight: 800;
}

.automatic-score-hero span,
.automatic-score-hero p {
  display: block;
  margin: 0;
  color: #c8c5bb;
  font-size: 8px;
}

.automatic-score-hero strong {
  overflow: hidden;
  font-size: 29px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.automatic-score-hero strong small {
  margin-left: 3px;
  color: #aaa79e;
  font-size: 9px;
}

.automatic-score-hero .final {
  border-radius: 10px;
  background: var(--paper);
  color: var(--ink);
}

.automatic-score-hero .final span,
.automatic-score-hero .final p {
  color: var(--muted);
}

.automatic-metric-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.automatic-metric {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f5ee;
}

.automatic-metric > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.automatic-metric span,
.automatic-metric strong,
.automatic-metric small {
  font-size: 8px;
}

.automatic-metric span,
.automatic-metric small,
.automatic-metric p {
  color: var(--muted);
}

.automatic-metric p {
  min-height: 24px;
  margin: 5px 0;
  line-height: 1.45;
  font-size: 8px;
}

.automatic-meter {
  height: 5px;
  overflow: hidden;
  margin-bottom: 5px;
  border-radius: 999px;
  background: #d7d4ca;
}

.automatic-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.automatic-metric.unavailable {
  opacity: 0.55;
}

.automatic-metric.no-data {
  border-style: dashed;
}

.automatic-score-note {
  margin: 8px 2px 0;
  color: var(--muted);
  font-size: 8px;
}

.evidence-link-list {
  display: grid;
  gap: 7px;
}

.evidence-link-list a {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 2px 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  text-decoration: none;
}

.evidence-link-list a:hover {
  border-color: var(--ink);
}

.evidence-link-list b {
  grid-row: 1 / 3;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 8px;
}

.evidence-link-list span {
  font-size: 10px;
  font-weight: 800;
}

.evidence-link-list small {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.self-auto-preview,
.review-auto-panel {
  margin-bottom: 14px;
}

.self-auto-preview .automatic-metric-list,
.review-auto-panel .automatic-metric-list {
  max-height: 220px;
  overflow-y: auto;
}

.expense-duplicate-warning {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  background: #e8e5db;
}

.expense-duplicate-warning strong {
  font-size: 10px;
}

.expense-duplicate-warning span {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.5;
}

.duplicate-chip,
.cost-issue-chip {
  display: inline-block;
  margin-left: 5px;
  padding: 2px 5px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 7px;
  font-style: normal;
  vertical-align: middle;
}

.cost-issue-chip {
  background: #9c3b24;
}

.evaluation-score-empty,
.review-self-copy,
.acknowledgment {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f7f5ee;
}

.evaluation-score-empty,
.review-self-copy span {
  color: var(--muted);
  font-size: 10px;
}

.review-self-copy p,
.review-copy p,
.acknowledgment p {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.65;
  font-size: 11px;
}

.evidence-list {
  display: grid;
  gap: 7px;
}

.evidence-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.evidence-row i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: var(--ink);
  color: var(--paper);
  font-size: 9px;
  font-style: normal;
}

.evidence-row strong,
.evidence-row span {
  display: block;
}

.evidence-row strong {
  font-size: 11px;
}

.evidence-row span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
}

.review-copy {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.review-copy article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #f7f5ee;
}

.review-copy article > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.acknowledgment {
  display: grid;
  gap: 4px;
}

.acknowledgment strong {
  font-size: 11px;
}

.acknowledgment span {
  color: var(--muted);
  font-size: 9px;
}

.acknowledgment.pending {
  border-style: dashed;
}

.evaluation-form-note,
.reviewer-evidence-summary {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 11px;
  background: #e8e5db;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.evidence-field {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.evidence-field legend {
  padding: 0 5px;
  font-size: 10px;
  font-weight: 800;
}

.evidence-field > p {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 9px;
}

.evidence-options {
  max-height: 240px;
  display: grid;
  gap: 7px;
  overflow-y: auto;
}

.evidence-option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  cursor: pointer;
}

.evidence-option input {
  width: 16px;
  height: 16px;
}

.evidence-option strong,
.evidence-option small {
  display: block;
}

.evidence-option strong {
  font-size: 10px;
}

.evidence-option small,
.evidence-option-empty {
  color: var(--muted);
  font-size: 8px;
}

.score-form-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0;
}

.reviewer-evidence-summary {
  margin-top: 0;
}

.reviewer-evidence-summary strong,
.reviewer-evidence-summary p,
.reviewer-evidence-summary small {
  display: block;
  white-space: pre-wrap;
}

.reviewer-evidence-summary p {
  margin: 6px 0;
}

.review-copy-fields {
  margin-top: 8px;
}

.view-loading {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 320px;
  gap: 9px;
  color: var(--muted);
  text-align: center;
}

.view-loading i,
.notion-sync-progress.active > i {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(25, 25, 23, 0.16);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: bespace-spin 0.8s linear infinite;
}

.view-loading strong,
.view-loading span {
  display: block;
}

.view-loading strong {
  color: var(--ink);
  font-size: 13px;
}

.view-loading span {
  max-width: 360px;
  font-size: 10px;
  line-height: 1.55;
}

.notion-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 26px 28px;
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
}

.notion-hero h2 {
  margin: 5px 0 8px;
  font-size: clamp(20px, 2.4vw, 31px);
}

.notion-hero > div > span,
.notion-connection span {
  color: rgba(242, 240, 233, 0.68);
  font-size: 11px;
}

.notion-connection {
  min-width: 190px;
  padding: 15px 17px;
  border: 1px solid rgba(242, 240, 233, 0.22);
  border-radius: 13px;
  background: rgba(242, 240, 233, 0.07);
}

.notion-connection i {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 7px;
  border-radius: 50%;
  background: #b9b6ac;
}

.notion-connection.connected i {
  background: #a9d2a4;
  box-shadow: 0 0 0 4px rgba(169, 210, 164, 0.12);
}

.notion-connection strong,
.notion-connection span {
  display: block;
}

.notion-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 16px;
  margin: 16px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.notion-sync-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.notion-estimate-schema {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border: 1px solid #d9c687;
  border-left: 5px solid #d2a82c;
  border-radius: 15px;
  background: #fff8df;
}

.notion-estimate-schema > div { display: grid; gap: 5px; }
.notion-estimate-schema span { color: #8b6512; font-size: 8px; font-weight: 950; letter-spacing: .14em; }
.notion-estimate-schema strong { font-size: 15px; }
.notion-estimate-schema p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.notion-estimate-schema .btn { flex: 0 0 auto; }

.notion-sync-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  min-height: 170px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.notion-sync-card.running {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(211, 103, 55, 0.1);
}

.notion-sync-card small,
.notion-sync-card span,
.notion-sync-card p {
  display: block;
}

.notion-sync-card > div > small {
  color: var(--orange);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.notion-sync-card h3 {
  margin: 8px 0 7px;
  font-size: 18px;
}

.notion-sync-card p,
.notion-sync-card span {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.notion-sync-card .notion-running-note {
  margin-top: 10px;
  color: var(--orange-dark);
  font-weight: 800;
}

.notion-summary span,
.notion-summary small,
.notion-last span,
.notion-last small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.notion-summary strong,
.notion-last strong {
  display: block;
  margin: 4px 0;
  font-size: 13px;
}

.notion-source-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.notion-source {
  min-height: 105px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.notion-source.schedule {
  background: #e5e2d8;
}

.notion-source span,
.notion-source strong,
.notion-source small {
  display: block;
}

.notion-source span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.notion-source strong {
  margin: 8px 0;
  font-size: 13px;
}

.notion-source small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.notion-grid {
  align-items: start;
}

.notion-issues {
  display: grid;
  gap: 8px;
}

.notion-issue {
  display: grid;
  grid-template-columns: 25px 1fr;
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
  background: #ece9e1;
}

.notion-issue > i {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: 10px;
  font-style: normal;
}

.notion-issue strong,
.notion-issue span,
.notion-issue small {
  display: block;
}

.notion-issue strong {
  font-size: 10px;
}

.notion-issue span,
.notion-issue small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.notion-confirm {
  padding: 16px 18px;
  border-radius: 12px;
  background: #e8e5db;
}

.notion-confirm ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.notion-full-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
}

.notion-full-option input {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--orange);
}

.notion-full-option strong,
.notion-full-option small {
  display: block;
}

.notion-full-option strong { font-size: 11px; }
.notion-full-option small { margin-top: 4px; color: var(--muted); font-size: 9px; line-height: 1.45; }

.notion-sync-progress {
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.notion-sync-progress > i {
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: #b9b6ac;
}

.notion-sync-progress strong,
.notion-sync-progress span {
  display: block;
}

.notion-sync-progress strong {
  font-size: 11px;
}

.notion-sync-progress span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.notion-sync-meter {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e1ded5;
}

.notion-sync-meter b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--orange);
  transition: width 0.22s ease;
}

@keyframes bespace-spin {
  to { transform: rotate(360deg); }
}

.incentive-month-control {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}

.incentive-month-control strong {
  min-width: 110px;
  text-align: center;
  font-size: 16px;
}

.incentive-privacy {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.incentive-privacy i {
  padding: 7px 10px;
  border-radius: 999px;
  color: var(--ivory);
  background: var(--charcoal);
  font-size: 9px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.14em;
}

.incentive-privacy div { display: grid; gap: 4px; }
.incentive-privacy strong { font-size: 13px; }
.incentive-privacy span { color: var(--muted); font-size: 11px; line-height: 1.55; }

.incentive-total {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 20px;
  margin-bottom: 12px;
  padding: 24px 26px;
  border-radius: 18px;
  color: var(--ivory);
  background: var(--charcoal);
}

.incentive-total div { display: grid; gap: 5px; }
.incentive-total p { margin: 0; font-size: 9px; font-weight: 900; letter-spacing: 0.18em; }
.incentive-total span { color: rgba(242, 240, 233, 0.65); font-size: 11px; }
.incentive-total > strong { font-size: clamp(25px, 4vw, 42px); letter-spacing: -0.05em; }

.incentive-status {
  padding: 7px 10px;
  border: 1px solid rgba(242, 240, 233, 0.24);
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.incentive-status.paid { color: var(--charcoal); background: var(--ivory); }
.incentive-status.finalized { color: #ffd6bd; border-color: rgba(230, 111, 63, 0.55); }

.incentive-metrics,
.incentive-admin-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.incentive-metrics article,
.incentive-admin-summary article {
  display: grid;
  gap: 6px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.incentive-metrics span,
.incentive-admin-summary span { color: var(--muted); font-size: 10px; font-weight: 700; }
.incentive-metrics strong,
.incentive-admin-summary strong { font-size: 19px; letter-spacing: -0.04em; }
.incentive-metrics small,
.incentive-admin-summary small { color: var(--muted); font-size: 9px; }

.incentive-section {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.incentive-section .section-rule { margin-bottom: 12px; }
.incentive-section .section-rule span { color: var(--muted); font-size: 10px; }
.incentive-table { min-width: 650px; }
.incentive-table td strong { display: block; font-size: 11px; }
.incentive-table td small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; }
.incentive-table td b { font-size: 12px; }

.incentive-blocker {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(230, 111, 63, 0.35);
  border-radius: 13px;
  background: rgba(230, 111, 63, 0.08);
}

.incentive-blocker strong { color: var(--orange); font-size: 11px; }
.incentive-blocker span { font-size: 10px; line-height: 1.55; }

.incentive-blocker-list { display: grid; gap: 8px; margin-top: 6px; }
.incentive-blocker-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid rgba(154, 107, 45, .24);
  border-radius: 10px;
  background: rgba(255, 255, 255, .7);
}
.incentive-blocker-list article > div { display: grid; min-width: 0; gap: 2px; }
.incentive-blocker-list article span { color: #7b5427; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.incentive-blocker-list article b { font-size: 11px; }
.incentive-blocker-list article small { color: var(--muted); font-size: 9px; line-height: 1.45; }

.incentive-payout-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
  margin: 12px 0;
}
.incentive-payout-breakdown article { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 13px 14px; border: 1px solid var(--line); border-radius: 13px; background: var(--paper); }
.incentive-payout-breakdown article.final { border-color: #658678; color: #fff; background: #3f6658; }
.incentive-payout-breakdown span { color: var(--muted); font-size: 9px; font-weight: 800; }
.incentive-payout-breakdown article.final span { color: rgba(255, 255, 255, .75); }
.incentive-payout-breakdown strong { font-size: 17px; }
.incentive-payout-breakdown small { overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.incentive-payout-breakdown > i { align-self: center; color: var(--muted); font-size: 15px; font-style: normal; font-weight: 900; }

.incentive-person-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.incentive-person-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  min-width: 0;
  padding: 17px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  cursor: pointer;
}

.incentive-person-card:hover { transform: translateY(-1px); border-color: var(--charcoal); }
.incentive-person-card > div:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.incentive-person-card strong { font-size: 12px; }
.incentive-person-card span,
.incentive-person-card small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.incentive-person-card > b { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line); font-size: 21px; letter-spacing: -0.04em; }

.incentive-confirmation,
.incentive-final-preview {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 14px;
  color: var(--ivory);
  background: var(--charcoal);
}

.incentive-confirmation strong,
.incentive-final-preview span { font-size: 10px; }
.incentive-confirmation span,
.incentive-confirmation p,
.incentive-final-preview small { margin: 0; color: rgba(242, 240, 233, 0.67); font-size: 9px; }
.incentive-confirmation.cancelled { border: 1px solid #c9b499; color: #4f4136; background: #eee5d9; }
.incentive-confirmation.cancelled span,
.incentive-confirmation.cancelled p { color: #76685d; }
.incentive-final-preview strong { font-size: 27px; letter-spacing: -0.04em; }
.incentive-drawer { width: min(920px, calc(100vw - 24px)); }

.incentive-project-board {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #f2efe7;
}
.incentive-project-board .section-rule { align-items: flex-end; margin: 0; }
.incentive-project-board .section-rule > div { display: grid; gap: 4px; }
.incentive-project-board .section-rule span { color: var(--muted); font-size: 10px; line-height: 1.5; }
.incentive-project-board .section-rule > b { font-size: 11px; }
.incentive-project-grid { display: grid; gap: 12px; }
.incentive-project-card {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #d8d2c5;
  border-left: 4px solid #9c968b;
  border-radius: 15px;
  background: var(--paper);
}
.incentive-project-card.status-finalized { border-left-color: #4f7666; }
.incentive-project-card.status-paid { border-left-color: #161815; }
.incentive-project-card.status-partial { border-left-color: #8c7756; }
.incentive-project-card.status-blocked { border-left-color: #b25348; }
.incentive-project-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.incentive-project-card-head > div { display: grid; min-width: 0; gap: 3px; }
.incentive-project-card-head span { color: #7b6c57; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.incentive-project-card-head h4 { overflow-wrap: anywhere; margin: 0; font-size: 13px; }
.incentive-project-status { flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; color: #fff; background: #494740; font-size: 8px; font-style: normal; font-weight: 900; }
.status-blocked .incentive-project-status { background: #9c4d46; }
.status-finalized .incentive-project-status { background: #426554; }
.status-paid .incentive-project-status { background: #161815; }
.incentive-project-components { display: flex; flex-wrap: wrap; gap: 6px; }
.incentive-project-components span { padding: 5px 8px; border-radius: 999px; color: #565047; background: #e9e5dc; font-size: 8px; font-weight: 800; }
.incentive-project-money,
.incentive-project-final-confirm { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); gap: 8px; }
.incentive-project-money > article,
.incentive-project-final-confirm > div { display: grid; align-content: center; gap: 4px; min-width: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #f8f6f0; }
.incentive-project-money > i,
.incentive-project-final-confirm > i { align-self: center; color: var(--muted); font-size: 13px; font-style: normal; font-weight: 900; }
.incentive-project-money span,
.incentive-project-final-confirm span { color: var(--muted); font-size: 8px; font-weight: 800; }
.incentive-project-money strong,
.incentive-project-final-confirm strong { overflow-wrap: anywhere; font-size: 14px; }
.incentive-project-money small,
.incentive-project-final-confirm small { overflow-wrap: anywhere; color: var(--muted); font-size: 8px; }
.incentive-project-money .final,
.incentive-project-final-confirm .final { color: #fff; border-color: #476c5b; background: #426554; }
.incentive-project-money .final span,
.incentive-project-final-confirm .final span { color: rgba(255, 255, 255, .72); }
.incentive-project-blocker { margin: 0; padding: 9px 11px; border-radius: 9px; color: #8b3933; background: #f7e6e2; font-size: 9px; font-weight: 750; line-height: 1.5; }
.incentive-project-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.incentive-project-actions .btn[disabled] { cursor: not-allowed; opacity: .48; }

@media (max-width: 1080px) {
  .incentive-person-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notion-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evaluation-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .automatic-metric-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evaluation-flow {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .evaluation-flow > i {
    display: none;
  }

  .evaluation-flow > div {
    align-items: flex-start;
  }
}

@media (max-width: 760px) {
  .incentive-month-control { flex-wrap: wrap; justify-content: flex-start; }
  .incentive-month-control strong { order: -1; width: 100%; text-align: left; }
  .incentive-privacy { align-items: flex-start; }
  .incentive-total { grid-template-columns: 1fr; gap: 12px; }
  .incentive-metrics,
  .incentive-admin-summary,
  .incentive-person-grid { grid-template-columns: 1fr; }
  .incentive-project-board { margin-inline: 0; padding: 12px; }
  .incentive-project-board .section-rule {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }
  .incentive-project-card { padding: 12px; }
  .incentive-project-money,
  .incentive-project-final-confirm { grid-template-columns: 1fr; }
  .incentive-project-money > i,
  .incentive-project-final-confirm > i { display: none; }
  .incentive-project-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .incentive-project-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  .notion-hero,
  .notion-summary,
  .notion-sync-actions {
    grid-template-columns: 1fr;
  }

  .notion-estimate-schema { align-items: stretch; flex-direction: column; }
  .notion-estimate-schema .btn { width: 100%; }

  .notion-sync-card {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
  }

  .notion-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .notion-source-grid {
    grid-template-columns: 1fr;
  }

  .evaluation-summary,
  .evaluation-grid,
  .review-copy,
  .review-total,
  .score-form-grid,
  .automatic-metric-list {
    grid-template-columns: 1fr;
  }

  .automatic-score-hero {
    grid-template-columns: 1fr;
  }

  .automatic-score-hero > i {
    height: 12px;
  }

  .evaluation-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .evaluation-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .review-total > div:first-child {
    padding-bottom: 15px;
    border-right: 0;
    border-bottom: 1px solid rgba(242, 240, 233, 0.2);
  }
}

/* Mobile-first operating shell */
html {
  -webkit-text-size-adjust: 100%;
}

body {
  overflow-x: hidden;
}

button,
a,
input,
select,
textarea,
summary {
  touch-action: manipulation;
}

.mobile-appbar,
.mobile-nav-backdrop,
.mobile-menu-close {
  display: none;
}

@media (max-width: 760px) {
  body.mobile-nav-open {
    overflow: hidden;
  }

  .shell {
    min-height: 100svh;
    padding-top: calc(64px + env(safe-area-inset-top));
  }

  .mobile-appbar {
    position: fixed;
    z-index: 100;
    inset: 0 0 auto;
    height: calc(64px + env(safe-area-inset-top));
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: calc(10px + env(safe-area-inset-top)) 14px 10px;
    border-bottom: 1px solid var(--line);
    background: rgba(242, 240, 233, 0.96);
    box-shadow: 0 8px 24px rgba(25, 25, 23, 0.08);
    backdrop-filter: blur(16px);
  }

  .mobile-brand-home {
    justify-self: start;
  }

  .mobile-brand-home .mobile-app-symbol {
    width: 28px;
    height: 29px;
  }

  .mobile-menu-toggle,
  .mobile-menu-close {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    cursor: pointer;
  }

  .mobile-menu-toggle {
    display: grid;
    place-content: center;
    gap: 4px;
  }

  .mobile-menu-toggle i {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--ink);
  }

  .mobile-attendance-button {
    min-height: 42px;
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 12px;
    border: 0;
    border-radius: 12px;
    background: var(--ink);
    color: var(--paper);
    cursor: pointer;
  }

  .mobile-appbar-spacer {
    width: 78px;
    height: 42px;
  }

  .mobile-attendance-button span {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid rgba(242, 240, 233, 0.5);
    border-radius: 50%;
    font-size: 7px;
    font-weight: 900;
  }

  .mobile-attendance-button b {
    font-size: 10px;
  }

  .mobile-nav-backdrop {
    position: fixed;
    z-index: 110;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(25, 25, 23, 0.56);
    backdrop-filter: blur(3px);
  }

  .mobile-nav-backdrop:not([hidden]) {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 120;
    inset: 0 auto 0 0;
    width: min(86vw, 340px);
    height: auto;
    min-height: 0;
    max-height: none;
    padding: calc(14px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    background: var(--forest);
    background-clip: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-104%);
    transition: transform 0.24s ease;
    box-shadow: 22px 0 55px rgba(0, 0, 0, 0.28);
  }

  body.mobile-nav-open .sidebar {
    transform: translateX(0);
  }

  .brand {
    position: sticky;
    z-index: 2;
    top: calc(-14px - env(safe-area-inset-top));
    min-height: 70px;
    padding: 12px 4px 14px;
    background: var(--forest);
  }

  .sidebar-symbol {
    width: 34px;
    height: 35px;
  }

  .brand-copy {
    display: none;
  }

  .mobile-menu-close {
    display: block;
    margin-left: auto;
    border-color: rgba(242, 240, 233, 0.24);
    background: rgba(242, 240, 233, 0.08);
    color: var(--paper);
    font-size: 25px;
    line-height: 1;
  }

  .attendance-quick {
    max-width: none;
    min-height: 58px;
    margin: 0 0 14px;
  }

  .nav-label {
    display: block;
    margin: 10px 8px;
  }

  .nav {
    display: grid;
    gap: 5px;
    flex: none;
    min-height: auto;
    padding-right: 0;
    overflow: visible;
  }

  .nav button {
    width: 100%;
    min-height: 48px;
    flex: none;
    padding: 11px 12px;
    font-size: 13px;
  }

  .nav-token {
    width: 28px;
    height: 28px;
  }

  .sidebar-foot {
    display: block;
    width: 100%;
    padding: 18px 8px 4px;
    flex: 0 0 auto;
    background: var(--forest);
  }

  .sidebar-account-actions button,
  .sidebar-account-actions a {
    min-height: 42px;
    padding: 10px 8px;
    font-size: 11px;
  }

  .main {
    width: 100%;
    padding: 18px 14px calc(42px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 0;
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
  }

  .topbar .eyebrow {
    font-size: 9px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .top-actions {
    width: 100%;
    display: flex;
    gap: 8px;
  }

  .top-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .content {
    gap: 14px;
  }

  .btn {
    min-height: 44px;
    padding: 10px 13px;
  }

  .btn.small {
    min-height: 40px;
    padding: 8px 10px;
    font-size: 10px;
  }

  .icon-btn {
    min-width: 44px;
    min-height: 44px;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  .hero-strip,
  .panel,
  .goal-panel,
  .work-team-board,
  .work-focus-panel,
  .work-scope-bar,
  .profile-hero,
  .notion-hero {
    padding: 18px;
    border-radius: 16px;
  }

  .hero-strip {
    min-height: 132px;
  }

  .hero-strip h2 {
    max-width: calc(100% - 20px);
    font-size: 23px;
  }

  .metrics,
  .team-grid,
  .project-grid,
  .grid-two,
  .dashboard-grid,
  .finance-grid,
  .profile-grid,
  .site-attendance-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .section-title,
  .toolbar,
  .attendance-consent,
  .attendance-punch {
    align-items: stretch;
    flex-direction: column;
  }

  .toolbar .searchbox {
    width: 100%;
  }

  .row-actions {
    width: 100%;
    gap: 8px;
  }

  .row-actions .btn {
    flex: 1 1 calc(50% - 4px);
  }

  .table-wrap {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 16px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 680px;
  }

  th,
  td {
    padding: 12px 10px;
  }

  .calendar-panel,
  .expanded-week {
    margin-inline: -14px;
    padding: 16px 12px;
    border-inline: 0;
    border-radius: 0;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-toolbar,
  .goal-head {
    gap: 12px;
  }

  .calendar-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-actions .btn {
    width: 100%;
  }

  .calendar-weekdays,
  .calendar-grid {
    min-width: 700px;
  }

  .calendar-weekdays span {
    padding: 8px 4px;
  }

  .calendar-day {
    min-height: 104px;
    scroll-snap-align: start;
  }

  .work-day {
    min-height: 96px;
  }

  .calendar-legend {
    min-width: 0;
    flex-wrap: wrap;
    gap: 9px 12px;
  }

  .calendar-legend small {
    width: 100%;
    margin-left: 0;
  }

  .expanded-week-grid {
    min-width: 700px;
    grid-template-columns: repeat(7, minmax(92px, 1fr));
  }

  .week-day-card {
    min-height: 190px;
  }

  .work-calendar-summary article,
  .evaluation-summary article,
  .incentive-metrics article {
    padding: 15px 16px;
  }

  .drawer-backdrop {
    align-items: flex-end;
  }

  .drawer,
  .project-drawer,
  .evaluation-drawer,
  .incentive-drawer {
    width: 100%;
    height: min(94dvh, calc(100dvh - env(safe-area-inset-top)));
    padding: 20px max(16px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    border-radius: 20px 20px 0 0;
  }

  .drawer-actions {
    position: sticky;
    top: -20px;
    margin-inline: -16px;
    padding: 10px 16px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .drawer-actions .btn {
    flex: 0 0 auto;
  }

  dialog {
    width: 100%;
    max-width: none;
    max-height: min(94dvh, calc(100dvh - env(safe-area-inset-top)));
    margin: auto 0 0;
    border-radius: 20px 20px 0 0;
  }

  dialog[open] {
    position: fixed;
    inset: auto 0 0;
  }

  .modal-head {
    position: sticky;
    z-index: 2;
    top: 0;
    padding: 18px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left));
    background: var(--surface);
  }

  .modal-body {
    padding: 16px max(16px, env(safe-area-inset-right)) 16px max(16px, env(safe-area-inset-left));
  }

  .modal-actions {
    position: sticky;
    z-index: 2;
    bottom: 0;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
    background: var(--surface);
  }

  .modal-actions .btn {
    flex: 1;
  }

  .postcode-layer {
    padding: 0;
  }

  .postcode-panel {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
  }

  .toast {
    right: 12px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px;
    max-width: none;
    text-align: center;
  }

  .login-panel {
    padding: calc(94px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));
  }

  .login-mobile-brand {
    top: calc(28px + env(safe-area-inset-top));
    left: 20px;
  }

  .login-mobile-symbol {
    width: 31px;
    height: 32px;
  }

  .login-card {
    width: 100%;
  }

  .login-card h2 {
    font-size: clamp(28px, 9vw, 34px);
  }

  .login-description {
    margin: 14px 0 25px;
  }

  .login-field input {
    height: 58px;
  }

  .login-submit {
    height: 58px;
  }

  .passkey-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .passkey-section-head .btn { width: 100%; }

  .passkey-device {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .passkey-device .btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

@media (max-width: 390px) {
  .mobile-appbar {
    gap: 8px;
    padding-inline: 10px;
  }

  .mobile-brand-home .mobile-app-symbol {
    width: 27px;
    height: 28px;
  }

  .mobile-attendance-button {
    padding-inline: 9px;
  }

  .mobile-attendance-button b {
    font-size: 9px;
  }

  .main {
    padding-inline: 12px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .calendar-panel,
  .expanded-week {
    margin-inline: -12px;
  }
}

/* Fast interaction feedback */
[data-action] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(25, 25, 23, 0.08);
}

button[data-action]:active,
tr[data-action]:active,
.project-card:active,
.attention-item:active {
  filter: brightness(0.96);
}

.drawer-loading .view-loading {
  min-height: 320px;
  border: 0;
  background: transparent;
}

/* Project hub */
.project-access-line,
.project-hub-head,
.project-member-strip,
.project-hub-actions,
.project-profit-strip,
.hub-schedule-row,
.project-document-row,
.hub-money-row {
  display: flex;
  align-items: center;
}

.project-access-line {
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 12px;
}

.project-access-line b { color: var(--ink); }

.project-stage-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.project-read-only-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 8px;
  border: 1px solid #9fb9ad;
  border-radius: 999px;
  color: #274f40;
  background: #e8f1ed;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .02em;
}

.project-card.finance-read-only {
  border-color: #a8bdb4;
  background: linear-gradient(180deg, #fff 0%, #f8fbf9 100%);
}

.project-finance-read-only {
  display: grid;
  gap: 5px;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid #a8c0b5;
  border-radius: 14px;
  color: #254b3c;
  background: #eaf3ef;
}

.project-finance-read-only strong { font-size: 13px; }
.project-finance-read-only span { color: #526c61; font-size: 11px; line-height: 1.55; }
.project-finance-read-only.compact { margin: 0 20px 14px; }

.project-hub-head {
  position: relative;
  justify-content: space-between;
  gap: 22px;
  padding: 30px;
  border-radius: 22px;
  color: var(--ivory, #f2f0e9);
  background: #191917;
}

.project-hub-head h2 {
  margin: 4px 0 7px;
  font-size: clamp(27px, 4vw, 42px);
  letter-spacing: -.04em;
}

.project-hub-head .eyebrow,
.project-hub-head span { color: rgba(242, 240, 233, .7); }

.hub-back {
  position: absolute;
  top: 14px;
  left: 18px;
  border: 0;
  color: rgba(242, 240, 233, .75);
  background: transparent;
  cursor: pointer;
}

.project-hub-head > div:first-of-type { padding-top: 22px; }

.project-hub-progress {
  flex: 0 0 auto;
  display: grid;
  width: 122px;
  height: 122px;
  place-content: center;
  text-align: center;
  border: 1px solid rgba(242, 240, 233, .25);
  border-radius: 50%;
}

.project-hub-progress b { font-size: 30px; }
.project-hub-progress span { font-size: 11px; }

.project-completion-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: 18px 20px;
  border: 1px solid #c9c2ae;
  border-left: 4px solid #8f7545;
  border-radius: 15px;
  background: #fff8e8;
}

.project-completion-panel.ready { border-color: #9ab4a2; border-left-color: #2f6b4f; background: #edf5ef; }
.project-completion-panel.blocked { border-color: #d6c09b; border-left-color: #9a6b2d; background: #fff8e8; }
.project-completion-panel.waiting { border-color: #d6c09b; border-left-color: #9a6b2d; background: #fff8e8; }
.project-completion-panel.completed { border-color: #98ada0; border-left-color: #255f43; background: #e8f1eb; }
.project-completion-panel.warranty-as { border-color: #ddc17d; border-left-color: #9a6b24; background: #fbf0d6; }
.project-completion-panel.warranty-as .project-completion-copy p { color: #76501b; }
.project-completion-panel.warranty-as .project-completion-state { color: #65430f; background: #f1dcae; }
.project-completion-panel.compact { margin: 16px 0 4px; padding: 15px 16px; }

.project-completion-copy { display: grid; gap: 5px; min-width: 0; }
.project-completion-copy p { margin: 0; color: #725625; font-size: 9px; font-weight: 900; letter-spacing: .13em; }
.project-completion-panel.ready .project-completion-copy p,
.project-completion-panel.completed .project-completion-copy p { color: #2c684c; }
.project-completion-copy > strong { font-size: 16px; }
.project-completion-copy > span { color: #5f5a4f; font-size: 11px; line-height: 1.55; }

.project-completion-checks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; }
.project-completion-checks span,
.project-completion-state { display: inline-flex; align-items: center; width: max-content; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 850; white-space: nowrap; }
.project-completion-checks .ready { color: #245c43; background: #d9ebdf; }
.project-completion-checks .blocked { color: #7c521e; background: #f3e3c8; }
.project-completion-checks .warning { color: #66512f; background: #eee3cf; }
.project-completion-state { flex: 0 0 auto; color: #6d4c1d; background: #f3e3c8; }
.project-completion-panel.completed .project-completion-state { color: #245c43; background: #d5e7db; }
.project-completion-panel > .btn { flex: 0 0 auto; }
.project-completion-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.project-completion-issues { display: grid; gap: 4px; margin: 4px 0 0; padding: 0; list-style: none; }
.project-completion-issues li { padding: 6px 8px; border-radius: 8px; font-size: 9px; line-height: 1.45; }
.project-completion-issues li.blocked { color: #733f32; background: #f3ddd7; }
.project-completion-issues li.warning { color: #6c522b; background: #f0e5cf; }
.project-completion-report-note { color: #5f5a4f; font-size: 9px; line-height: 1.5; }

.completion-readiness { display: grid; gap: 9px; margin-bottom: 14px; padding: 13px 14px; border: 1px solid #b9c9bf; border-radius: 12px; background: #edf3ef; }
.completion-readiness.blocked { border-color: #d5bca4; background: #f7eee5; }
.completion-readiness > strong { font-size: 12px; }
.completion-readiness ul { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.completion-readiness li { display: flex; align-items: flex-start; gap: 7px; font-size: 10px; line-height: 1.5; }
.completion-readiness li > strong { flex: 0 0 auto; padding: 2px 5px; border-radius: 999px; color: #fff; background: #7c554f; font-size: 8px; }
.completion-readiness li.warning > strong { background: #88704d; }
.completion-readiness li.ready { color: #335c4d; }

.completion-attestations { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.completion-attestations legend { padding: 0 5px; font-size: 11px; font-weight: 850; }
.completion-attestations > p { margin: 0 0 2px; color: var(--muted); font-size: 9px; }
.completion-attestations > label { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: flex-start; gap: 9px; padding: 9px 10px; border-radius: 9px; background: var(--paper); cursor: pointer; }
.completion-attestations input { margin-top: 3px; }
.completion-attestations label span { display: grid; min-width: 0; gap: 2px; }
.completion-attestations label strong { font-size: 10px; }
.completion-attestations label small { color: var(--muted); font-size: 9px; line-height: 1.45; }

.dashboard-completion-panel { margin-bottom: 18px; padding: 18px; border: 1px solid #b9c9bf; border-radius: 17px; background: #edf3ef; }
.dashboard-completion-list { display: grid; gap: 8px; margin-top: 13px; }
.dashboard-completion-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 13px; border: 1px solid rgba(69, 94, 83, .2); border-left: 4px solid #526f65; border-radius: 11px; background: var(--surface); }
.dashboard-completion-row.requested,
.dashboard-completion-row.on_hold { border-color: rgba(138, 118, 81, .25); border-left-color: #8a7651; background: #f5efe2; }
.dashboard-completion-row.submitted { border-left-color: #9a7256; }
.dashboard-completion-row.rejected { border-left-color: #7c554f; }
.dashboard-completion-row > div { display: grid; min-width: 0; gap: 2px; }
.dashboard-completion-row span { color: #526f65; font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.dashboard-completion-row strong { font-size: 12px; }
.dashboard-completion-row small { color: var(--muted); font-size: 9px; }
.dashboard-completion-row p { margin: 3px 0 0; color: #5f5a4f; font-size: 9px; line-height: 1.45; }

.project-sales-stage {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 14px 0;
  padding: 16px 18px;
  border: 1px solid #b9cfe0;
  border-left: 5px solid #2e719d;
  border-radius: 14px;
  background: #eef6fb;
}

.project-sales-stage > div { display: grid; gap: 4px; min-width: 0; }
.project-sales-stage > div > span { color: #2e719d; font-size: 8px; font-weight: 950; letter-spacing: .14em; }
.project-sales-stage > div > strong { font-size: 15px; }
.project-sales-stage p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }
.project-sales-stage em { flex: 0 0 auto; color: var(--muted); font-size: 9px; font-style: normal; font-weight: 850; }
.project-sales-stage.compact { margin: 14px 0 4px; padding: 14px 15px; }

.project-member-strip {
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--surface);
}

.project-member-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border-radius: 999px;
  background: #f2f0e9;
}

.project-member-chip small { color: var(--muted); }

.project-hub-actions {
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.project-estimate-panel { margin: 0 0 18px; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: var(--surface); }
.estimate-panel-head, .estimate-panel-head > div, .estimate-trade, .estimate-row-actions, .estimate-change-log > div:first-child, .estimate-change-row, .payment-card-budget { display: flex; align-items: center; }
.estimate-panel-head { justify-content: space-between; gap: 20px; padding: 22px; border-bottom: 1px solid var(--line); }
.estimate-panel-head > div:first-child { display: block; }
.estimate-panel-head h2 { margin: 4px 0 5px; font-size: 25px; }
.estimate-panel-head span { color: var(--muted); font-size: 12px; }
.estimate-panel-head > div:last-child { gap: 8px; }
.estimate-state { padding: 7px 10px; border-radius: 999px; font-weight: 800; }
.estimate-state.draft { color: #7e5b1c; background: #fff0cf; }
.estimate-state.confirmed { color: #1d6044; background: #dff2e9; }
.estimate-summary { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--line); border-bottom: 1px solid var(--line); }
.estimate-summary > div { display: grid; gap: 5px; padding: 15px 18px; background: #f8f6f0; }
.estimate-summary span, .estimate-metric span { color: var(--muted); font-size: 10px; }
.estimate-summary strong { font-size: 15px; }
.estimate-summary .danger strong { color: #a72d2d; }
.estimate-summary .safe strong { color: #287354; }
.estimate-list { display: grid; gap: 8px; padding: 16px; }
.estimate-row { display: grid; grid-template-columns: minmax(180px, 1.35fr) repeat(6, minmax(90px, .7fr)) auto; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.estimate-row.warning { border-color: #e8c87a; background: #fffaf0; }
.estimate-row.danger { border-color: #e3a6a1; background: #fff5f4; }
.estimate-trade { min-width: 0; gap: 7px; flex-wrap: wrap; }
.estimate-trade > i { width: 9px; height: 9px; border-radius: 50%; background: #2d8a63; }
.estimate-row.warning .estimate-trade > i { background: #d69a24; }
.estimate-row.danger .estimate-trade > i { background: #cf493f; box-shadow: 0 0 0 5px rgba(207, 73, 63, .12); }
.estimate-trade > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.estimate-trade > strong { min-width: 90px; }
.estimate-trade > em { padding: 4px 6px; border-radius: 999px; color: #287354; background: #e2f2eb; font-size: 9px; font-style: normal; font-weight: 800; }
.estimate-row.warning .estimate-trade > em { color: #815a12; background: #fff0cf; }
.estimate-row.danger .estimate-trade > em { color: #992f29; background: #f9deda; }
.estimate-metric { display: grid; gap: 4px; min-width: 0; }
.estimate-metric b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.estimate-row-actions { gap: 5px; }
.estimate-inline-alert { display: inline-block; margin-left: 7px; padding: 3px 6px; border-radius: 999px; font-size: 8px; font-style: normal; font-weight: 900; vertical-align: middle; }
.estimate-inline-alert.warning { color: #815a12; background: #fff0cf; }
.estimate-inline-alert.danger { color: #992f29; background: #f9deda; }
.estimate-change-log { padding: 0 16px 16px; }
.estimate-change-log > div:first-child { justify-content: space-between; gap: 12px; margin-bottom: 9px; padding-top: 14px; border-top: 1px solid var(--line); }
.estimate-change-log > div:first-child span { color: var(--muted); font-size: 10px; }
.estimate-change-row { gap: 10px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; }
.estimate-change-row + .estimate-change-row { margin-top: 7px; }
.estimate-change-row > i { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #8d8b84; }
.estimate-change-row.open > i { background: #cf493f; box-shadow: 0 0 0 4px rgba(207,73,63,.12); }
.estimate-change-row > div { flex: 1; min-width: 0; }
.estimate-change-row span { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.estimate-change-row > em { color: var(--muted); font-size: 10px; font-style: normal; }
.estimate-change-fields { padding: 15px; border: 1px solid #e4c97f; border-radius: 13px; background: #fffaf0; }
.estimate-change-fields > span { display: block; margin: 4px 0 12px; color: var(--muted); font-size: 11px; }
.estimate-review-summary { margin-bottom: 14px; padding: 15px; border-radius: 13px; color: #f2f0e9; background: #191917; }
.estimate-review-summary p { margin: 7px 0; }
.estimate-review-summary span { color: #c7c4ba; font-size: 11px; }
.payment-card-budget { justify-content: space-between; gap: 8px; margin-top: 10px; }
.payment-card-budget > small { margin: 0; }
.payment-budget-chip { padding: 5px 7px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.payment-budget-chip.safe { color: #276f52; background: #dff2e9; }
.payment-budget-chip.warning { color: #815a12; background: #fff0cf; }
.payment-budget-chip.danger { color: #992f29; background: #f9deda; }
.payment-budget-check { margin: 14px 0; padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: #f8f6f0; }
.payment-budget-check.warning, .payment-review-budget.warning { border-color: #e8c87a; background: #fffaf0; }
.payment-budget-check.danger, .payment-review-budget.danger { border-color: #e3a6a1; background: #fff5f4; }
.payment-budget-check > div { display: flex; justify-content: space-between; gap: 12px; }
.payment-budget-check > div span, .payment-budget-check small, .payment-review-budget span, .payment-review-budget small { color: var(--muted); font-size: 10px; }
.payment-budget-check dl { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.payment-budget-check dl div { display: grid; gap: 4px; }
.payment-budget-check dt { color: var(--muted); font-size: 9px; }
.payment-budget-check dd { margin: 0; font-size: 12px; font-weight: 800; }
.payment-review-budget { display: grid; gap: 4px; margin-bottom: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }

.project-calendar { margin-top: 0; }
.project-hub-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 18px; margin-top: 18px; }
.project-hub-grid .panel { min-width: 0; }
.hub-schedule-list, .project-document-list, .hub-money-list { display: grid; gap: 8px; }
.project-outflow-panel > .panel-body { display: grid; gap: 12px; }
.outflow-summary-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.outflow-summary-tab {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
  min-height: 78px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  text-align: left;
  color: var(--ink);
  background: #f7f5ef;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.outflow-summary-tab:hover { transform: translateY(-1px); border-color: #aaa69d; }
.outflow-summary-tab:focus-visible { outline: 3px solid rgba(25, 25, 23, .22); outline-offset: 2px; }
.outflow-summary-tab span { overflow: hidden; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; word-break: keep-all; }
.outflow-summary-tab strong { overflow: hidden; font-size: clamp(14px, 1.25vw, 19px); letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.outflow-summary-tab small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.outflow-summary-tab.selected { border-color: #191917; box-shadow: 0 8px 20px rgba(25, 25, 23, .12); }
.outflow-summary-tab.total.selected { color: #f4f1e9; background: #191917; }
.outflow-summary-tab.total.selected small { color: #c9c6bd; }
.outflow-summary-tab.paid.selected { border-color: #7d9c8d; background: #e6efe9; }
.outflow-summary-tab.pending.selected { border-color: #b99b53; background: #f6edd6; }
.outflow-summary-tab.rejected.selected { border-color: #bd817b; background: #f5e5e3; }
.outflow-summary-guide { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 10px; color: var(--muted); background: #efede6; font-size: 9px; line-height: 1.5; }
.outflow-summary-guide strong { color: #8d3934; }
.project-outflow-batch-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border: 1px solid #d8d3c7; border-radius: 12px; background: #f3f1ea; transition: border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.project-outflow-batch-toolbar.has-selection { border-color: #9c8752; background: #f8f0dc; box-shadow: 0 8px 20px rgba(91, 72, 28, .08); }
.project-outflow-batch-toolbar > div { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; }
.project-outflow-batch-toolbar > div:first-child strong { font-size: 12px; }
.project-outflow-batch-toolbar > div:first-child span { font-size: 14px; font-weight: 900; }
.project-outflow-batch-toolbar > div:first-child small { width: 100%; color: var(--muted); font-size: 9px; }
.project-outflow-batch-toolbar .btn:disabled { opacity: .45; cursor: not-allowed; }
.project-outflow-list { min-height: 72px; }
.project-outflow-empty[hidden], .hub-money-row[hidden], .project-outflow-selectable[hidden] { display: none; }
.project-outflow-selectable { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: stretch; gap: 7px; }
.project-outflow-check { display: grid; place-items: center; gap: 3px; min-height: 66px; padding: 7px 4px; border: 1px solid #d9c38d; border-radius: 12px; color: #755b20; background: #fff8e8; cursor: pointer; }
.project-outflow-check:hover { border-color: #a8893f; }
.project-outflow-check:has(input:checked) { border-color: #191917; color: #f4f1e9; background: #191917; }
.project-outflow-check input { width: 19px; height: 19px; margin: 0; accent-color: #191917; }
.project-outflow-check span { font-size: 8px; font-weight: 800; }
.project-outflow-selectable > .hub-money-row { height: 100%; }
.outflow-row-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.outflow-row-title strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.outflow-source { flex: 0 0 auto; padding: 4px 6px; border-radius: 6px; font-size: 8px; font-weight: 800; line-height: 1; }
.outflow-source.payment { color: #6f302d; background: #f1dedb; }
.outflow-source.direct { color: #66521e; background: #eee5cb; }

.hub-schedule-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(90px, .45fr) 46px auto;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.schedule-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.schedule-entry-builder,
.schedule-entry-list {
  display: grid;
  gap: 12px;
}

.schedule-entry-guide {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border-radius: 12px;
  color: #f2f0e9;
  background: #191917;
}

.schedule-entry-guide strong { font-size: 12px; }
.schedule-entry-guide span,
.schedule-entry-builder > small { color: var(--muted); font-size: 10px; line-height: 1.5; }
.schedule-entry-guide span { color: #cbc8bf; }

.schedule-entry {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8f6f0;
}

.schedule-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.schedule-entry-head strong { font-size: 12px; }
.schedule-entry-remove { padding: 5px 8px; border: 1px solid #dfc5c1; border-radius: 8px; color: #8d3934; background: #f8eae7; font-size: 10px; font-weight: 800; cursor: pointer; }
.schedule-entry-remove[hidden] { display: none; }
.schedule-entry-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.schedule-entry-fields label { display: grid; gap: 6px; }
.schedule-entry-fields .schedule-entry-title { grid-column: 1 / -1; }
.schedule-entry-add { justify-self: start; }

.hub-schedule-row > div:first-child,
.project-document-row > div,
.hub-money-row > div { min-width: 0; }

.hub-schedule-row span,
.project-document-row small,
.hub-money-row span { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }

.project-document-row {
  width: 100%;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  cursor: pointer;
}

.project-document-row > div { flex: 1; }
.project-document-row > b { font-size: 11px; }
.document-type { flex: 0 0 auto; padding: 5px 7px; border-radius: 7px; color: #f2f0e9; background: #191917; font-size: 10px; }
.importance { padding: 5px 7px; border-radius: 999px; font-size: 10px; font-style: normal; }
.importance.low { background: #eceae3; }
.importance.normal { color: #254b76; background: #dfeafb; }
.importance.high { color: #825412; background: #fff0cf; }
.importance.urgent { color: #8c1f1f; background: #ffe0e0; }

.calendar-event.project-money { align-items: flex-start; flex-direction: column; gap: 2px; border-left-width: 4px; }
.calendar-event.project-money b { max-width: 100%; overflow: hidden; font-size: 9px; text-overflow: ellipsis; }
.calendar-event.money-out { border-color: #bd3b3b; color: #8c1f1f; background: #fff1f1; }
.calendar-event.money-out.pending { border-color: #9b762d; color: #75581f; background: #fff8e8; }
.calendar-event.money-out.paid { background: #f5dddd; }
.calendar-event.money-in { border-color: #377ab6; color: #215a8b; background: #ecf5ff; }
.calendar-event.money-in.received { color: #fff; background: #377ab6; }
.project-legend i { border-radius: 3px; }
.construction-key { background: #191917; }
.money-out-key { background: #bd3b3b; }
.money-in-planned-key { border: 2px solid #377ab6; background: #ecf5ff; }
.money-in-key { background: #377ab6; }

.hub-money-row {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto auto auto;
  width: 100%;
  gap: 11px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
}

button.hub-money-row { cursor: pointer; }
.hub-money-row > i { width: 7px; height: 42px; border-radius: 999px; background: #bd3b3b; }
.hub-money-row.direct-expense.pending { border-color: #d9c38d; background: #fff8e8; }
.hub-money-row.direct-expense.pending > i { background: #9b762d; }
.hub-money-row.out.paid > i { background: #9f4741; }
.hub-money-row.out.pending { border-color: #d9c38d; background: #fff8e8; }
.hub-money-row.out.pending > i { background: #9b762d; }
.hub-money-row.out.rejected { border-color: #dfbbb7; background: #fbefed; }
.hub-money-row.out.rejected > i { background: #a85750; }
.hub-money-row.out.draft { border-style: dashed; background: #f3f1eb; }
.hub-money-row.out.draft > i { background: #8a8881; }
.hub-money-row.out.integrity-warning { border-color: #b96f63; box-shadow: inset 0 0 0 1px rgba(185, 111, 99, .18); }
.hub-money-row.out.integrity { background: #f8ece9; }
.hub-money-row.in > i { background: #377ab6; }
.hub-money-row > em { color: var(--muted); font-size: 11px; font-style: normal; }
.hub-money-row > .outflow-status { padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.hub-money-row > .outflow-status.paid { color: #35634f; background: #dfece4; }
.hub-money-row > .outflow-status.pending { color: #755b20; background: #f2e5bd; }
.hub-money-row > .outflow-status.rejected { color: #883c37; background: #f0d8d5; }
.hub-money-row > .outflow-status.draft { color: #65635e; background: #e5e2da; }
.hub-money-row > .outflow-status.integrity { color: #883c37; background: #efd7d2; }
.hub-money-row.out > b, .money-out-text { color: #a72d2d; }
.hub-money-row.in > b, .money-in-text { color: #286da8; }
.payment-batch-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.payment-batch-summary > div { display: grid; gap: 4px; padding: 12px; border-radius: 11px; background: #efede6; }
.payment-batch-summary span, .payment-batch-summary small { color: var(--muted); font-size: 9px; }
.payment-batch-summary strong { font-size: 18px; }
.payment-batch-summary > small { grid-column: 1 / -1; padding: 0 3px; }
.payment-batch-list { display: grid; gap: 6px; max-height: 34vh; margin: 0 0 14px; padding: 0; overflow: auto; list-style: none; overscroll-behavior: contain; }
.payment-batch-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #faf9f5; }
.payment-batch-list li div { display: grid; gap: 3px; min-width: 0; }
.payment-batch-list li strong, .payment-batch-list li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.payment-batch-list li span { color: var(--muted); font-size: 9px; }
.payment-batch-list li b { color: #a72d2d; font-size: 12px; }

.receivable-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.receivable-actions em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.receivable-panel-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.receivable-panel-tools .money-in-text { line-height: 1; }
.receivable-plan-pending-chip,
.receivable-action-lock,
.receivable-paid-label,
.receivable-zero-label {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.25;
}

.receivable-plan-pending-chip,
.receivable-action-lock { color: #704d0f; background: #fff0c8; }
.receivable-paid-label { color: #276348; background: #e2f1e9; }
.receivable-zero-label { color: #66645e; background: #efede7; }

.receivable-plan-workflow {
  display: grid;
  gap: 7px;
  padding: 12px 13px;
  border: 1px solid #a9bfd5;
  border-radius: 11px;
  color: #234e74;
  background: #edf5fc;
}

.receivable-plan-workflow strong { font-size: 12px; }
.receivable-plan-workflow > span { margin: 0; overflow: visible; color: inherit; font-size: 10px; line-height: 1.55; text-overflow: clip; white-space: normal; }
.receivable-plan-workflow ol { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; counter-reset: receivable-step; }
.receivable-plan-workflow li { display: inline-flex; align-items: center; gap: 5px; color: #315f88; font-size: 10px; font-weight: 750; }
.receivable-plan-workflow li::before { counter-increment: receivable-step; content: counter(receivable-step); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; background: #377ab6; font-size: 9px; }
.receivable-plan-workflow li:not(:last-child)::after { content: "→"; margin-left: 2px; opacity: .55; }
.receivable-plan-workflow.locked { border-color: #d7a94a; color: #704d0f; background: #fff3d4; }
.receivable-plan-workflow.waiting { border-color: #c9c5b8; color: #5f5b52; background: #f2f0e9; }

.receivable-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; min-width: 0; }
.receipt-detail-link { appearance: none; border: 0; background: transparent; padding: 5px 0; color: #215a8b; font: inherit; font-weight: 800; text-align: left; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.receipt-detail-link:hover { color: #173f63; }
.receivable-row-title .receipt-detail-link > span { display: inline; }
.receipt-detail-link:focus-visible { outline: 2px solid #215a8b; outline-offset: 3px; border-radius: 3px; }
.customer-receipt-row .receipt-amount-link { display: block; min-height: 32px; font-size: 14px; }
.customer-receipt-row .receipt-amount-link > span { display: inline; font-size: 10px; }
.receipt-read-modal { max-width: 760px; }
.receipt-read-modal .modal-body { min-width: 0; }
.receipt-read-record { padding: 16px 0; border-bottom: 1px solid var(--line, #d8e3ec); }
.receipt-read-record h3 { margin: 8px 0 14px; overflow-wrap: anywhere; }
.receipt-read-record .detail-grid, .receipt-read-record .receipt-variance { margin: 12px 0; }
.receipt-read-invoice { margin-top: 20px; }
.receipt-read-modal .receipt-read-text { font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; text-overflow: clip; overflow: visible; }
.receipt-read-modal .detail-box strong { overflow-wrap: anywhere; white-space: pre-wrap; }
.receivable-row-title > em { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #286da8; background: #e4f0fb; font-size: 9px; font-style: normal; font-weight: 800; }
.receivable-partial .receivable-row-title > em,
.receivable-finance-item.partial .receivable-row-title > em { color: #80540c; background: #fff0c8; }
.receivable-paid .receivable-row-title > em,
.receivable-finance-item.paid .receivable-row-title > em { color: #276348; background: #e2f1e9; }
.receivable-zero .receivable-row-title > em,
.receivable-finance-item.zero .receivable-row-title > em { color: #66645e; background: #efede7; }
.hub-money-row.in.receivable-paid { border-color: #bfd8ca; background: #f6fbf8; }
.hub-money-row.in.receivable-paid > i { background: #4c9672; }
.hub-money-row.in.receivable-partial > i { background: #c99132; }
.hub-money-row.in.receivable-zero { border-color: #d8d4cb; background: #faf9f6; }
.hub-money-row.in.receivable-zero > i { background: #8c8981; }
.receivable-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }

.payment-installment.protected { border-color: #d5d0c4; background: #f4f2ec; }
.payment-installment.protected input[readonly] { color: #69665f; background: #e9e6de; cursor: not-allowed; }
.payment-installment-received { color: #276348 !important; font-weight: 800; }
.payment-plan-head button:disabled { opacity: .42; cursor: not-allowed; }
.project-change-plan-review > div.added { background: #eef7f1; }
.project-change-plan-review > div.deleted { background: #fff1ef; }
.project-change-plan-review > div.deleted strong { color: #a84842; }

.receivable-plan-warning {
  display: grid;
  gap: 4px;
  padding: 11px 12px;
  border: 1px solid #d7a94a;
  border-radius: 11px;
  color: #704d0f;
  background: #fff3d4;
}

.receivable-plan-warning strong { font-size: 12px; }
.receivable-plan-warning span { margin: 0; color: #704d0f; font-weight: 800; }
.receivable-plan-warning small { color: #856a36; font-size: 10px; line-height: 1.5; }

.project-profit-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 18px;
  color: #f2f0e9;
  background: #3b3b37;
}

.project-profit-strip > div { padding: 20px; background: #191917; }
.project-profit-strip span { display: block; margin-bottom: 7px; color: rgba(242,240,233,.65); font-size: 11px; }
.project-profit-strip strong { font-size: 20px; }
.project-profit-strip > small { grid-column: 1 / -1; padding: 10px 18px; color: rgba(242,240,233,.7); }

.automation-blueprint {
  margin-top: 18px;
  padding: 24px;
  border: 1px solid #d7d2c5;
  border-radius: 18px;
  background: linear-gradient(135deg, #f2f0e9, #fbfaf7);
}

.automation-blueprint h2 { margin: 4px 0 16px; }
.automation-blueprint > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.automation-blueprint article { padding: 14px; border-radius: 12px; background: rgba(255,255,255,.72); }
.automation-blueprint article b, .automation-blueprint article span { display: block; }
.automation-blueprint article b { margin-bottom: 7px; }
.automation-blueprint article span, .automation-blueprint > small { color: var(--muted); line-height: 1.55; }
.automation-blueprint > small { display: block; margin-top: 12px; }

.people-field { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; }
.people-field legend { padding: 0 6px; font-weight: 700; }
.people-field > p { margin: 0 0 10px; color: var(--muted); font-size: 11px; }
.people-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.people-option { display: grid; grid-template-columns: 18px minmax(0, 1fr); align-items: center; gap: 9px; min-width: 0; padding: 9px; border-radius: 9px; background: #f2f0e9; cursor: pointer; }
.people-option.role-overlap-disabled { opacity: .58; cursor: not-allowed; }
.people-option input { width: 16px; height: 16px; margin: 0; padding: 0; }
.people-option span, .people-option strong, .people-option small { display: block; min-width: 0; }
.people-option strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; word-break: keep-all; }
.people-option small { overflow: hidden; color: var(--muted); font-size: 10px; white-space: nowrap; text-overflow: ellipsis; }

@media (max-width: 980px) {
  .project-hub-grid, .automation-blueprint > div { grid-template-columns: 1fr; }
  .outflow-summary-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-profit-strip { grid-template-columns: repeat(2, 1fr); }
  .estimate-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .estimate-trade, .estimate-row-actions { grid-column: 1 / -1; }
  .estimate-row-actions { justify-content: flex-end; }
}

@media (max-width: 640px) {
  .estimate-panel-head { align-items: flex-start; flex-direction: column; }
  .estimate-panel-head > div:last-child { width: 100%; justify-content: space-between; }
  .estimate-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-summary > div:last-child { grid-column: 1 / -1; }
  .estimate-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .estimate-trade, .estimate-row-actions { grid-column: 1 / -1; }
  .estimate-row-actions { justify-content: flex-end; }
  .estimate-change-log > div:first-child, .estimate-change-row { align-items: flex-start; flex-direction: column; }
  .payment-budget-check dl { grid-template-columns: repeat(2, 1fr); }
  .project-hub-head { align-items: flex-start; flex-direction: column; padding: 48px 20px 20px; }
  .project-hub-progress { position: absolute; top: 52px; right: 18px; width: 86px; height: 86px; }
  .project-hub-progress b { font-size: 22px; }
  .project-hub-head > div:first-of-type { max-width: calc(100% - 94px); padding-top: 0; }
  .project-completion-panel { align-items: stretch; flex-direction: column; gap: 12px; padding: 16px; }
  .project-completion-panel > .btn { width: 100%; }
  .project-completion-actions { width: 100%; justify-content: stretch; }
  .project-completion-actions .btn { flex: 1 1 180px; }
  .project-completion-state { align-self: flex-start; }
  .project-sales-stage { align-items: stretch; flex-direction: column; }
  .project-sales-stage .btn { width: 100%; }
  .project-hub-actions { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .project-hub-actions .btn { flex: 0 0 auto; }
  .hub-schedule-row { grid-template-columns: minmax(0, 1fr) 42px auto; }
  .hub-schedule-row .progress { display: none; }
  .hub-schedule-row .schedule-row-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .schedule-row-actions { flex-wrap: wrap; }
  .schedule-entry-fields { grid-template-columns: 1fr; }
  .schedule-entry-fields .schedule-entry-title { grid-column: auto; }
  .project-profit-strip { grid-template-columns: 1fr 1fr; }
  .project-profit-strip strong { font-size: 15px; }
  .people-options { grid-template-columns: 1fr; }
  .payment-plan-head { align-items: flex-start; flex-direction: column; }
  .payment-plan-head > div:last-child { width: 100%; justify-content: flex-start; }
  .payment-installment { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-installment-label { grid-column: 1 / -1; display: flex; align-items: baseline; justify-content: space-between; }
  .payment-installment-remove { grid-column: 1 / -1; }
  .payment-plan-summary { align-items: flex-start; flex-wrap: wrap; }
  .payment-plan-summary strong { margin-left: 0; }
  .payment-plan-summary small { width: 100%; }
  .project-site-team-options { grid-template-columns: 1fr; }
  .project-site-team-option { align-items: flex-start; }
  .project-change-request-panel { padding: 15px; }
  .project-change-request-panel > header,
  .project-change-request { align-items: stretch; flex-direction: column; }
  .project-change-request-panel > header > .btn,
  .project-change-request-actions,
  .project-change-request-actions .btn { width: 100%; }
  .project-change-request-actions .btn { flex: 1; }
  .project-change-live-route { align-items: flex-start; flex-direction: column; }
  .project-change-live-route i { padding-left: 8px; }
  .project-change-single-role { grid-template-columns: 1fr; }
  .project-change-single-role small { grid-column: auto; }
  .receivable-panel > .panel-head { align-items: flex-start; flex-direction: column; }
  .receivable-panel-tools { justify-items: stretch; width: 100%; }
  .receivable-panel-tools .money-in-text { text-align: right; }
  .receivable-panel-tools .btn { width: 100%; }
  .outflow-summary-tab { min-height: 72px; padding: 10px; }
  .outflow-summary-tab strong { font-size: clamp(13px, 4vw, 18px); }
  .outflow-summary-guide { align-items: flex-start; flex-direction: column; }
  .project-outflow-batch-toolbar { align-items: stretch; flex-direction: column; }
  .project-outflow-batch-toolbar > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .project-outflow-batch-toolbar > div:last-child .btn:last-child { grid-column: 1 / -1; width: 100%; }
  .project-outflow-selectable { grid-template-columns: 44px minmax(0, 1fr); }
  .project-outflow-check { min-height: 70px; }
  .hub-money-row.out { grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; }
  .hub-money-row.out > em,
  .hub-money-row.out > .btn,
  .hub-money-row.out > .status { grid-column: 2 / -1; justify-self: start; }
  .hub-money-row.out > div > span { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; }
  .hub-money-row.in { grid-template-columns: 7px minmax(0, 1fr) auto; align-items: start; }
  .hub-money-row.in > .receivable-actions { grid-column: 2 / -1; justify-content: flex-start; }
  .hub-money-row.in > div > span { overflow: visible; line-height: 1.45; text-overflow: clip; white-space: normal; }
  .payment-batch-list { max-height: 30vh; }
  .payment-batch-list li { grid-template-columns: 1fr; gap: 5px; }
  .payment-batch-list li b { justify-self: start; }
  .receivable-plan-workflow ol { align-items: stretch; flex-direction: column; }
  .receivable-plan-workflow li { width: 100%; }
  .receivable-plan-workflow li:not(:last-child)::after { content: "↓"; margin-left: auto; }
  .receivable-section-head .btn,
  .receivable-section-head .receivable-plan-pending-chip { width: 100%; justify-content: center; }
  .receivable-finance-item { grid-template-columns: minmax(0, 1fr) auto; }
  .receivable-finance-item > .receivable-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* Representative dashboard drill-downs and private finance calendar */
.dashboard-drill-modal { min-width: min(760px, 84vw); }
.dashboard-drill-list { display: grid; gap: 9px; max-height: min(62vh, 660px); overflow-y: auto; }
.dashboard-drill-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  color: var(--ink);
  text-align: left;
  background: #fbfaf6;
}
.dashboard-drill-row > div > span,
.dashboard-drill-row > div > strong,
.dashboard-drill-row > div > small,
.dashboard-drill-row > div > em { display: block; }
.dashboard-drill-row > div > span { margin-bottom: 4px; color: var(--muted); font-size: 10px; font-weight: 800; }
.dashboard-drill-row > div > strong { font-size: 14px; }
.dashboard-drill-row ul { margin: 8px 0 0; padding-left: 18px; color: #8c1f1f; font-size: 11px; line-height: 1.55; }
.dashboard-drill-row.risk { border-color: #e9aaa3; background: #fff5f3; }
button.dashboard-drill-row { width: 100%; grid-template-columns: 28px minmax(0, 1fr) auto; cursor: pointer; }
.dashboard-drill-row.payment > i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: var(--paper); background: var(--ink); font-size: 10px; font-style: normal; font-weight: 800; }
.dashboard-drill-row.payment small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.dashboard-drill-row.payment em { margin-top: 4px; color: #4b4943; font-size: 10px; font-style: normal; }
.dashboard-drill-row.payment > b { color: #9c2b2b; white-space: nowrap; }
.dashboard-drill-row.deletion { grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; }
.dashboard-drill-row.deletion > i { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; color: #8c1f1f; background: #f8e3df; font-size: 10px; font-style: normal; font-weight: 800; }
.dashboard-drill-row.deletion p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.55; }

.finance-private-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  color: var(--paper);
  background: var(--ink);
}
.finance-private-banner > i { padding: 7px 9px; border: 1px solid rgba(242,240,233,.35); border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 900; letter-spacing: .08em; }
.finance-private-banner strong,
.finance-private-banner span { display: block; }
.finance-private-banner span { margin-top: 4px; color: rgba(242,240,233,.7); font-size: 11px; }
.finance-calendar-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.finance-calendar-summary article { padding: 15px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.finance-calendar-summary span,
.finance-calendar-summary strong { display: block; }
.finance-calendar-summary span { color: var(--muted); font-size: 10px; }
.finance-calendar-summary strong { margin-top: 7px; font-size: 17px; }
.finance-calendar { margin-bottom: 18px; }
.finance-day { min-height: 150px; }
.finance-calendar-event {
  display: grid;
  width: 100%;
  min-width: 0;
  gap: 2px;
  padding: 6px 7px;
  border: 0;
  border-left: 4px solid;
  border-radius: 7px;
  font: inherit;
  text-align: left;
  cursor: default;
}
.finance-calendar-event:is(button) { cursor: pointer; }
.finance-calendar-event:is(button):hover { filter: brightness(.97); }
.finance-calendar-event:is(button):focus-visible,
.finance-calendar-more:focus-visible { outline: 3px solid #191917; outline-offset: 2px; }
.finance-calendar-event span,
.finance-calendar-event b,
.finance-calendar-event small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finance-calendar-event span { font-size: 10px; font-weight: 800; }
.finance-calendar-event b { font-size: 10px; }
.finance-calendar-event small { font-size: 9px; opacity: 1; }
.finance-calendar-event.request,
.finance-calendar-event.expense-pending { border-color: #9a7256; color: #5f4634; background: #efe4d7; }
.finance-calendar-event.project-out { border-color: #62413d; color: #fff; background: #7c554f; }
.finance-calendar-event.income-planned { border-color: #68768a; color: #3f4c5e; background: #e7ebf0; }
.finance-calendar-event.income-paid { border-color: #4b6276; color: #fff; background: #62788b; }
.finance-calendar-event.operating { border-color: #887e91; color: #51495a; background: #ece8ee; }
.finance-calendar-event.operating.paid { border-color: #504958; color: #fff; background: #675f70; }
.finance-calendar-more {
  width: 100%;
  min-height: 27px;
  padding: 5px 7px;
  border: 1px dashed #8f8a7d;
  border-radius: 7px;
  color: #4f4d47;
  text-align: left;
  background: #f5f3ed;
  cursor: pointer;
}
.finance-calendar-more:hover { color: #191917; border-color: #191917; background: #ebe8df; }
.finance-legend i { border-radius: 3px; }
.income-paid-key { background: #62788b !important; }
.income-planned-key { border: 2px solid #68768a; background: #e7ebf0 !important; }
.payment-request-key { background: #9a7256 !important; }
.expense-pending-key { background: #9a7256 !important; }
.project-out-key { background: #7c554f !important; }
.operating-key,
.operating-paid-key { background: #675f70 !important; }
.operating-planned-key { border: 2px solid #887e91; background: #ece8ee !important; }
.actual-receipt-key { background: #3f6658 !important; }
.planned-receipt-key { border: 2px solid #68768a; background: #e7ebf0 !important; }
.completed-project-expense-key { background: #7c554f !important; }
.pending-project-expense-key { background: #9a7256 !important; }
.operating-expense-panel { margin-bottom: 18px; }
.operating-expense-list { display: grid; gap: 8px; }
.operating-expense-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-align: left; background: var(--surface); cursor: pointer; }
.operating-category { padding: 6px 8px; border-radius: 8px; color: #4c3978; background: #f1ecfb; font-size: 9px; font-weight: 800; }
.operating-expense-row strong,
.operating-expense-row small { display: block; }
.operating-expense-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.operating-expense-row > b { white-space: nowrap; }
.operating-expense-row > em { padding: 5px 7px; border-radius: 999px; color: #6d54a4; background: #f1ecfb; font-size: 9px; font-style: normal; }
.operating-expense-row > em.paid { color: #215a8b; background: #e5f1fb; }

.receivable-with-receipts { display: grid; gap: 7px; min-width: 0; }
.customer-receipt-list { display: grid; gap: 7px; margin: -1px 0 7px 20px; padding: 10px; border: 1px solid #cfdce7; border-radius: 0 0 12px 12px; background: #f7fbfe; }
.customer-receipt-list > p { margin: 0 0 2px; color: #52728d; font-size: 9px; font-weight: 850; letter-spacing: .04em; }
.customer-receipt-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 10px; border: 1px solid #d8e3ec; border-radius: 10px; background: var(--surface); }
.customer-receipt-row > div:first-child { min-width: 0; }
.customer-receipt-row span,
.customer-receipt-row strong,
.customer-receipt-row small { display: block; }
.customer-receipt-row span { color: var(--muted); font-size: 9px; }
.customer-receipt-row strong { margin-top: 3px; color: #215a8b; font-size: 13px; }
.customer-receipt-row small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.customer-tax-invoice-status { display: inline-flex; align-items: center; min-height: 27px; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 850; white-space: nowrap; }
.customer-tax-invoice-status.unrequested,
.customer-tax-invoice-status.cancelled { color: #705513; background: #fff2cf; }
.customer-tax-invoice-status.requested { color: #214f82; background: #e5f0fc; }
.customer-tax-invoice-status.completed { color: #1f634f; background: #e1f3eb; }
.customer-tax-invoice-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.customer-tax-invoice-dialog-note { display: grid; gap: 4px; margin-bottom: 14px; padding: 13px; border: 1px solid #a9bfd5; border-radius: 11px; color: #234e74; background: #edf5fc; }
.customer-tax-invoice-dialog-note strong { font-size: 14px; }
.customer-tax-invoice-dialog-note span { font-size: 10px; }

.customer-tax-invoice-panel { margin-bottom: 16px; border-color: #a8cfc2; }
.customer-tax-invoice-panel > .panel-head { background: #f0f8f5; }
.customer-tax-invoice-request-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.customer-tax-invoice-request-row + .customer-tax-invoice-request-row { margin-top: 8px; }
.customer-tax-invoice-request-row span,
.customer-tax-invoice-request-row strong,
.customer-tax-invoice-request-row small { display: block; }
.customer-tax-invoice-request-row span { color: #34705d; font-size: 9px; font-weight: 850; }
.customer-tax-invoice-request-row strong { margin-top: 4px; font-size: 13px; }
.customer-tax-invoice-request-row small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.customer-tax-invoice-request-row p { margin: 7px 0 0; color: #5b625e; font-size: 10px; }
.customer-tax-invoice-request-row > div:last-child { display: flex; gap: 6px; }
.customer-tax-invoice-request-summary { min-width: 0; }
.customer-tax-invoice-request-summary dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 10px 0 0; }
.customer-tax-invoice-request-summary dl > div { min-width: 0; padding: 7px 8px; border-radius: 8px; background: #f3f6f4; }
.customer-tax-invoice-request-summary dt { color: var(--muted); font-size: 8px; font-weight: 800; }
.customer-tax-invoice-request-summary dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 750; }
.customer-tax-invoice-request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.customer-tax-invoice-request-form .field.full { grid-column: 1 / -1; }
.customer-tax-invoice-detail-modal,
.finance-record-detail-modal,
.finance-day-detail-modal { width: min(760px, calc(100vw - 32px)); }
.customer-tax-invoice-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.customer-tax-invoice-detail-grid .detail-box.full { grid-column: 1 / -1; }
.customer-tax-invoice-detail-grid .detail-box strong { overflow-wrap: anywhere; }
.customer-tax-invoice-completion-recipient { display: grid; gap: 10px; margin-bottom: 14px; padding: 13px; border: 1px solid #a8cfc2; border-radius: 12px; background: #f0f8f5; }
.customer-tax-invoice-completion-recipient > strong { color: #1f634f; font-size: 12px; }
.finance-day-detail-list { display: grid; gap: 8px; max-height: min(62vh, 620px); overflow-y: auto; padding: 2px; }
.finance-day-detail-row .finance-calendar-event { min-height: 58px; padding: 9px 11px; }
.finance-day-detail-row .finance-calendar-event span,
.finance-day-detail-row .finance-calendar-event b { font-size: 11px; }
.finance-day-detail-row .finance-calendar-event small { font-size: 10px; white-space: normal; }
.finance-record-amount { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 4px 14px; margin-bottom: 14px; padding: 15px; border-left: 5px solid; border-radius: 8px 13px 13px 8px; }
.finance-record-amount span { font-size: 10px; font-weight: 850; }
.finance-record-amount strong { grid-row: 1 / 3; grid-column: 2; font-size: 24px; white-space: nowrap; }
.finance-record-amount small { font-size: 9px; }
.finance-record-amount.project-out { border-color: #7c554f; color: #62413d; background: #f1e6e3; }
.finance-record-amount.actual-receipt { border-color: #3f6658; color: #294c41; background: #e4ebe7; }
.finance-record-note { margin-top: 12px; padding: 12px 13px; border: 1px solid var(--line); border-radius: 11px; background: #f7f5ef; }
.finance-record-note strong { font-size: 11px; }
.finance-record-note p { margin: 6px 0 0; color: #4e514d; font-size: 10px; line-height: 1.55; overflow-wrap: anywhere; }
.finance-record-note small { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.finance-basis-note { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; padding: 13px 15px; border: 1px solid #c9c5b8; border-radius: 13px; background: #f6f4ee; }
.finance-basis-note strong { flex: 0 0 auto; font-size: 12px; }
.finance-basis-note span { color: var(--muted); font-size: 10px; line-height: 1.55; }
.monthly-project-kind { display: inline-flex; margin-left: 6px; padding: 3px 5px; border-radius: 999px; font-size: 8px; font-style: normal; }
.monthly-project-kind.warranty { color: #744d10; background: #fff0c8; }
.finance-calendar-summary { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.finance-calendar-event.income-confirmed { border-color: #294c41; color: #fff; background: #3f6658; }
.finance-calendar-event.income-requested { border-color: #3d574f; color: #fff; background: #526f65; }
.finance-calendar-event.income-unrequested { border-color: #71827b; border-left-style: dashed; color: #31463f; background: #e4ebe7; }
.income-confirmed-key { background: #3f6658 !important; }
.income-requested-key { background: #526f65 !important; }
.income-unrequested-key { border: 2px dashed #71827b; background: #e4ebe7 !important; }

@media (max-width: 980px) {
  .finance-calendar-summary { grid-template-columns: 1fr 1fr; }
  .customer-receipt-row { grid-template-columns: minmax(0, 1fr) auto; }
  .customer-tax-invoice-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 640px) {
  .dashboard-drill-modal { min-width: 0; }
  .dashboard-drill-row { align-items: flex-start; grid-template-columns: minmax(0, 1fr); }
  button.dashboard-drill-row { grid-template-columns: 24px minmax(0, 1fr); }
  .dashboard-drill-row.payment > b { grid-column: 2; }
  .dashboard-drill-row.deletion { grid-template-columns: 24px minmax(0, 1fr); }
  .dashboard-drill-row.deletion > button { grid-column: 2; justify-self: start; }
  .finance-private-banner { align-items: flex-start; }
  .finance-calendar-summary { grid-template-columns: 1fr 1fr; }
  .finance-calendar-summary strong { font-size: 14px; }
  .operating-expense-row { grid-template-columns: auto minmax(0, 1fr); }
  .operating-expense-row > b,
  .operating-expense-row > em { grid-column: 2; }
  .customer-receipt-list { margin-left: 0; }
  .customer-receipt-row,
  .customer-tax-invoice-request-row { grid-template-columns: 1fr; }
  .customer-tax-invoice-status { justify-self: start; }
  .customer-tax-invoice-request-row > div:last-child { flex-wrap: wrap; }
  .customer-tax-invoice-request-summary dl,
  .customer-tax-invoice-detail-grid { grid-template-columns: 1fr; }
  .customer-tax-invoice-detail-grid .detail-box { grid-column: 1 !important; }
  .customer-tax-invoice-request-actions { justify-content: flex-start; }
  .finance-record-amount { grid-template-columns: 1fr; }
  .finance-record-amount strong { grid-row: auto; grid-column: 1; font-size: 21px; }
  .finance-basis-note { align-items: flex-start; flex-direction: column; gap: 5px; }
}

/* Regional partner and daily-workforce directory */
.directory-hero { display: flex; justify-content: space-between; gap: 24px; padding: 28px; margin-bottom: 18px; border-radius: 22px; color: var(--paper); background: var(--ink); }
.directory-hero h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.05em; }
.directory-hero span { color: rgba(242, 240, 233, .7); font-size: 12px; }
.directory-security { align-self: center; width: min(330px, 40%); padding: 16px; border: 1px solid rgba(242, 240, 233, .18); border-radius: 14px; }
.directory-security b,
.directory-security span { display: block; }
.directory-security b { margin-bottom: 5px; font-size: 11px; }
.directory-toolbar { display: grid; grid-template-columns: auto minmax(220px, 1fr) auto; align-items: center; gap: 12px; margin-bottom: 20px; }
.directory-filters,
.directory-create-buttons { display: flex; gap: 7px; }
.directory-filter { padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); background: var(--surface); font-weight: 800; cursor: pointer; }
.directory-filter.active { color: var(--paper); border-color: var(--ink); background: var(--ink); }
.directory-group { margin-bottom: 24px; }
.directory-group-head { display: flex; justify-content: space-between; align-items: flex-end; padding: 0 3px 10px; border-bottom: 1px solid var(--line); }
.directory-group-head p { margin: 0 0 3px; color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.directory-group-head h2 { margin: 0; font-size: 20px; }
.directory-group-head > span { color: var(--muted); font-size: 10px; }
.directory-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding-top: 12px; }
.directory-card { display: flex; flex-direction: column; min-height: 190px; padding: 17px; border: 1px solid var(--line); border-radius: 16px; color: var(--ink); text-align: left; background: var(--surface); cursor: pointer; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.directory-card:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 10px 24px rgba(25, 25, 23, .08); }
.directory-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.directory-card-head small { color: var(--muted); font-size: 9px; }
.directory-type { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; color: #6e4e09; background: #fff0bd; font-size: 9px; font-weight: 900; }
.directory-type.daily_worker { color: #1f5782; background: #e4f2ff; }
.directory-card > strong { font-size: 17px; }
.directory-card > p { margin: 5px 0 10px; color: var(--muted); font-size: 11px; }
.directory-note { display: -webkit-box; overflow: hidden; min-height: 34px; color: #474740; font-size: 11px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.directory-card-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); }
.directory-card-foot b,
.directory-card-foot small { font-size: 9px; }
.directory-card-foot small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.directory-usage-list { display: grid; gap: 8px; }
.directory-usage-list > span { display: flex; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); }
.directory-usage-list b,
.directory-usage-list small { font-size: 10px; }
.directory-usage-list small { color: var(--muted); text-align: right; }
.directory-sensitive { display: grid; gap: 8px; padding: 14px; border: 1px solid #d4cdae; border-radius: 13px; background: #fbf8ec; }
.directory-sensitive > div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.directory-sensitive span { color: var(--muted); font-size: 10px; }
.directory-sensitive strong { overflow-wrap: anywhere; font-size: 11px; }
.directory-sensitive.locked { color: var(--muted); border-style: dashed; background: var(--paper); }
.directory-sensitive.locked b,
.directory-sensitive.locked span { display: block; }
.directory-sensitive.locked b { margin-bottom: 5px; color: var(--ink); }
.directory-form-divider { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 15px; padding: 12px; border-radius: 11px; background: #eeece4; }
.directory-form-divider strong,
.directory-form-divider span { font-size: 10px; }
.directory-form-divider span { color: var(--muted); }
.directory-form-divider.locked { border: 1px dashed var(--line); background: transparent; }
.directory-type-fields { display: contents; }
.directory-type-fields[hidden] { display: none; }
.payment-directory-note { padding: 11px 13px; border: 1px dashed var(--line); border-radius: 11px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.payment-linked-profile { display: grid; gap: 12px; padding: 14px; border: 1px solid #b9cec4; border-left: 4px solid var(--forest-2); border-radius: 13px; background: #f3f8f5; }
.payment-linked-profile[hidden] { display: none; }
.payment-linked-profile-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.payment-linked-profile-head > div { display: grid; gap: 2px; min-width: 0; }
.payment-linked-profile-head strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.payment-linked-profile-head small { color: var(--muted); font-size: 9px; }
.payment-linked-profile-head > b { color: var(--forest-2); font-size: 9px; }
.payment-linked-profile dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 0; }
.payment-linked-profile dl > div { min-width: 0; padding: 10px; border-radius: 9px; background: rgba(255, 255, 255, .78); }
.payment-linked-profile dt { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 850; }
.payment-linked-profile dd { margin: 0; overflow-wrap: anywhere; font-size: 10px; font-weight: 800; }
.payment-linked-profile-note { color: var(--muted); font-size: 9px; line-height: 1.5; }
.payment-linked-profile-loading { display: flex; align-items: center; gap: 9px; min-height: 32px; color: var(--muted); font-size: 10px; }
.payment-linked-profile-loading i { width: 17px; height: 17px; border: 2px solid #c7d4ce; border-top-color: var(--forest-2); border-radius: 50%; animation: spin .8s linear infinite; }
.payment-linked-profile-error { padding: 8px; color: var(--danger); font-size: 10px; font-weight: 800; }
.payment-new-directory { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 13px; background: #f5f3ed; }
.payment-new-directory[hidden] { display: none; }
.daily-worker-guide { display: grid; gap: 4px; margin-bottom: 14px; padding: 13px; border-radius: 12px; background: var(--ink); color: var(--paper); }
.daily-worker-guide strong { font-size: 11px; }
.daily-worker-guide span { color: rgba(242, 240, 233, .72); font-size: 10px; }
.hub-schedule-main { min-width: 0; }
.schedule-workers { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.schedule-worker-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 7px; border-radius: 9px; color: #215a8b; background: #e8f3fc; font-size: 9px; }
.schedule-worker-chip b,
.schedule-worker-chip small { font-size: 9px; }
.schedule-worker-chip button { display: grid; place-items: center; width: 17px; height: 17px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #377ab6; cursor: pointer; }
.schedule-worker-empty { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.schedule-action-workers { margin-top: 16px; padding: 13px; border: 1px solid var(--line); border-radius: 12px; }
.schedule-action-workers > strong { font-size: 10px; }

@media (max-width: 980px) {
  .directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .directory-toolbar { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .directory-hero { display: grid; padding: 20px; }
  .directory-security { width: auto; }
  .directory-grid { grid-template-columns: 1fr; }
  .directory-create-buttons .btn { flex: 1; }
  .payment-new-directory { grid-template-columns: 1fr; }
  .payee-combobox-control [data-payee-query] { min-height: 50px; font-size: 16px; }
  .payee-combobox-control > button { width: 44px; }
  .payee-combobox-list [data-payee-option] { min-height: 58px; }
  .payment-linked-profile-head { grid-template-columns: auto minmax(0, 1fr); }
  .payment-linked-profile-head > b { grid-column: 2; }
  .payment-linked-profile dl { grid-template-columns: 1fr; }
  .directory-usage-list > span { display: grid; }
  .directory-usage-list small { text-align: left; }
  .directory-sensitive > div { grid-template-columns: 1fr; gap: 3px; }
}

/* A4 construction calendar export */
.schedule-export-presets {
  display: grid;
  grid-template-columns: minmax(230px, .7fr) 1fr;
  align-items: end;
  gap: 14px;
  padding: 18px;
  margin-bottom: 14px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 14px;
}
.schedule-export-presets label { display: grid; gap: 7px; }
.schedule-export-presets label > span { color: rgba(242, 240, 233, .68); font-size: 11px; font-weight: 750; }
.schedule-export-presets select { width: 100%; min-height: 42px; padding: 0 12px; color: var(--ink); background: var(--paper); border: 0; border-radius: 9px; font: inherit; font-weight: 750; }
.schedule-export-presets p { margin: 0; color: rgba(242, 240, 233, .7); font-size: 12px; line-height: 1.55; }
.schedule-export-group { display: grid; grid-template-columns: 170px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--line); }
.schedule-export-group > div:first-child { display: grid; align-content: start; gap: 5px; }
.schedule-export-group > div:first-child strong { font-size: 14px; }
.schedule-export-group > div:first-child small { color: var(--muted); line-height: 1.45; }
.schedule-export-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.schedule-export-option { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 10px; min-width: 0; padding: 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.schedule-export-option:has(input:checked) { background: #e5e2d8; border-color: var(--ink); }
.schedule-export-option.locked { cursor: default; }
.schedule-export-option input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--ink); }
.schedule-export-option span { display: grid; gap: 3px; min-width: 0; }
.schedule-export-option strong { font-size: 12px; }
.schedule-export-option small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.schedule-export-permission { display: grid; gap: 4px; padding: 16px; color: var(--muted); background: #efede6; border-radius: 12px; }
.schedule-export-permission strong { color: var(--ink); font-size: 12px; }
.schedule-export-permission span { font-size: 11px; }

@media (max-width: 680px) {
  .schedule-export-presets, .schedule-export-group { grid-template-columns: 1fr; }
  .schedule-export-options { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .dashboard-work-panel { gap: 13px; padding: 16px; border-radius: 17px; }
  .dashboard-work-head { align-items: stretch; flex-direction: column; }
  .dashboard-work-head > button { width: 100%; }
  .dashboard-work-columns { grid-template-columns: 1fr; }
  .dashboard-person-chip { min-width: 104px; }
  .dashboard-work-row { padding: 12px; }
  .dashboard-work-title-line > button { white-space: normal; }
}

/* Internal document center */
.company-document-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 30px;
  margin-bottom: 16px;
  color: var(--paper);
  background: var(--ink);
  border-radius: 22px;
}
.company-document-hero h2 { margin: 6px 0 8px; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.05em; }
.company-document-hero > div > span { color: rgba(242, 240, 233, .7); font-size: 12px; }
.company-document-lock { display: grid; grid-template-columns: 36px 1fr; align-items: center; gap: 2px 12px; min-width: 230px; padding: 15px; border: 1px solid rgba(242, 240, 233, .18); border-radius: 14px; }
.company-document-lock i { grid-row: 1 / 3; width: 30px; height: 35px; border: 2px solid var(--paper); border-radius: 7px; }
.company-document-lock i::before { content: ""; display: block; width: 15px; height: 12px; margin: -10px auto 0; border: 2px solid var(--paper); border-bottom: 0; border-radius: 9px 9px 0 0; }
.company-document-lock strong { font-size: 11px; }
.company-document-lock span { color: rgba(242, 240, 233, .65); font-size: 9px; }
.company-document-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.company-document-tab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 13px; cursor: pointer; }
.company-document-tab strong { font-size: 12px; }
.company-document-tab span { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 7px; color: var(--muted); background: var(--paper); border-radius: 999px; font-size: 9px; }
.company-document-tab.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.company-document-tab.active span { color: var(--ink); background: var(--paper); }
.company-document-notice { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; margin-bottom: 14px; color: #4c3978; background: #f1ecfb; border-radius: 12px; }
.company-document-notice.private { color: #215a8b; background: #e8f3fc; }
.company-document-notice.manage { color: #6e4e09; background: #fff3cf; }
.company-document-notice strong { font-size: 11px; }
.company-document-notice span { font-size: 10px; }
.company-document-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.company-document-toolbar > span { color: var(--muted); font-size: 10px; white-space: nowrap; }
.company-document-filters { display: flex; flex-wrap: wrap; gap: 7px; }
.company-document-filter { padding: 9px 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; font-size: 10px; font-weight: 800; cursor: pointer; }
.company-document-filter.active { color: var(--paper); background: var(--ink); border-color: var(--ink); }
.company-document-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.company-document-grid > .empty { grid-column: 1 / -1; }
.company-document-card { display: flex; flex-direction: column; min-height: 280px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.company-document-card:hover { transform: translateY(-2px); border-color: var(--ink); box-shadow: 0 12px 28px rgba(25, 25, 23, .08); }
.company-document-card.archived { opacity: .62; border-style: dashed; }
.company-document-open { display: flex; flex: 1; flex-direction: column; align-items: stretch; width: 100%; padding: 18px; color: var(--ink); text-align: left; background: transparent; border: 0; cursor: pointer; }
.company-document-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 22px; }
.company-document-category,
.company-document-audience,
.company-document-ack,
.company-document-archived { display: inline-flex; width: fit-content; padding: 5px 8px; border-radius: 999px; font-size: 9px; font-weight: 900; }
.company-document-category { color: var(--ink); background: #e9e6dc; }
.company-document-audience { color: #1f5782; background: #e4f2ff; }
.company-document-audience.personal { color: #4c3978; background: #f1ecfb; }
.company-document-audience.representative { color: #8c1f1f; background: #fff1f1; }
.company-document-open > strong { margin-bottom: 8px; font-size: 18px; line-height: 1.3; }
.company-document-open > p { display: -webkit-box; overflow: hidden; min-height: 38px; margin: 0 0 18px; color: var(--muted); font-size: 11px; line-height: 1.65; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.company-document-meta { display: flex; flex-wrap: wrap; gap: 6px 11px; margin-top: auto; color: var(--muted); font-size: 9px; }
.company-document-owner { margin-top: 12px; color: #4c3978; font-size: 10px; font-weight: 800; }
.company-document-ack { margin-top: 10px; color: #8c1f1f; background: #fff1f1; }
.company-document-ack.done { color: #215a8b; background: #e5f1fb; }
.company-document-archived { margin-top: 10px; color: var(--muted); background: #e9e6dc; }
.company-document-card-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 18px 16px; border-top: 1px solid var(--line); }
.company-document-drawer { width: min(720px, 92vw); }
.company-document-read-note { display: grid; gap: 4px; padding: 14px; margin: 15px 0; color: #8c1f1f; background: #fff1f1; border-radius: 12px; }
.company-document-read-note.done { color: #215a8b; background: #e5f1fb; }
.company-document-read-note strong { font-size: 11px; }
.company-document-read-note span { font-size: 10px; line-height: 1.5; }
.company-document-versions { display: grid; gap: 8px; }
.company-document-version { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px; background: #fffdf8; border: 1px solid var(--line); border-radius: 12px; }
.company-document-version.current { border-color: var(--ink); }
.company-document-version > div:first-child { min-width: 0; }
.company-document-version > div:last-child { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.company-document-version span,
.company-document-version strong,
.company-document-version small { display: block; }
.company-document-version span { margin-bottom: 4px; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; }
.company-document-version strong { font-size: 13px; }
.company-document-version p { margin: 5px 0; color: var(--muted); font-size: 10px; }
.company-document-version small { color: var(--muted); font-size: 9px; line-height: 1.45; overflow-wrap: anywhere; }
.company-document-file-field { display: grid; gap: 7px; }
.company-document-file-field > span { color: var(--muted); font-size: 10px; font-weight: 800; }
.company-document-file-field input { width: 100%; padding: 12px; background: #fffdf8; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.company-document-file-field small { color: var(--muted); font-size: 9px; line-height: 1.45; }

@media (max-width: 980px) {
  .company-document-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .company-document-hero { display: grid; padding: 21px; }
  .company-document-lock { min-width: 0; }
  .company-document-tabs { grid-template-columns: 1fr; }
  .company-document-notice,
  .company-document-toolbar,
  .company-document-version { align-items: stretch; flex-direction: column; }
  .company-document-grid { grid-template-columns: 1fr; }
  .company-document-version > div:last-child { justify-content: flex-start; }
}

/* Representative audit change detail */
.audit-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border: 1px solid #c9dceb;
  border-radius: 14px;
  background: #eaf3fa;
}
.audit-guide > div { display: grid; gap: 4px; }
.audit-guide strong { font-size: 12px; }
.audit-guide span { color: #49677d; font-size: 10px; line-height: 1.5; }
.audit-guide > b { flex: 0 0 auto; padding: 7px 10px; color: #214f70; background: #d6e9f6; border-radius: 999px; font-size: 9px; }
.audit-table-wrap table { min-width: 980px; }
.audit-list-row { transition: background .14s ease; }
.audit-list-row td:first-child small,
.audit-list-row td:nth-child(2) small,
.audit-list-row td:nth-child(4) small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.audit-list-row td:nth-child(2) strong,
.audit-list-row td:nth-child(4) strong { display: block; max-width: 230px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-open-button { white-space: nowrap; }
.audit-detail-drawer { width: min(860px, 100%); }
.audit-action-code { display: inline-flex; margin-top: 7px; padding: 5px 8px; color: var(--muted); background: #eeece5; border-radius: 999px; font-size: 9px; font-weight: 800; }
.audit-reason { display: grid; gap: 5px; padding: 15px; color: #654a08; background: #fff3cf; border-radius: 12px; }
.audit-reason span { font-size: 9px; font-weight: 800; }
.audit-reason strong { font-size: 12px; line-height: 1.55; }
.audit-change-head,
.audit-change-row { display: grid; grid-template-columns: minmax(150px, .72fr) minmax(190px, 1fr) minmax(190px, 1fr); gap: 1px; }
.audit-change-head { padding: 0 13px 7px; color: var(--muted); font-size: 9px; font-weight: 800; }
.audit-change-list { display: grid; gap: 8px; }
.audit-change-row { overflow: hidden; border: 1px solid var(--line); border-left: 4px solid #4c86b4; border-radius: 12px; background: var(--line); }
.audit-change-row.added { border-left-color: #28795d; }
.audit-change-row.removed { border-left-color: #b44b43; }
.audit-change-field,
.audit-value { min-width: 0; padding: 13px; background: #fffdf8; }
.audit-change-field { display: grid; align-content: center; gap: 5px; }
.audit-change-field strong { font-size: 11px; }
.audit-change-field small { color: var(--muted); font-size: 8px; overflow-wrap: anywhere; }
.audit-value { display: grid; align-content: start; gap: 6px; }
.audit-value span { color: var(--muted); font-size: 8px; font-weight: 800; }
.audit-value b { font-size: 11px; font-weight: 700; line-height: 1.55; overflow-wrap: anywhere; white-space: pre-wrap; }
.audit-value.before { color: #766f66; background: #f4f1e9; }
.audit-value.after { color: #174f79; background: #edf6fc; }
.audit-no-change { display: grid; gap: 5px; padding: 18px; color: var(--muted); text-align: center; border: 1px dashed var(--line); border-radius: 12px; }
.audit-no-change strong { color: var(--ink); font-size: 12px; }
.audit-no-change span { font-size: 10px; }
.audit-security-note { display: grid; gap: 5px; padding: 14px; margin-top: 18px; color: #5d5a52; background: #eeece5; border-radius: 12px; }
.audit-security-note strong { font-size: 10px; }
.audit-security-note span { font-size: 9px; line-height: 1.55; }

@media (max-width: 680px) {
  .audit-guide { align-items: flex-start; }
  .audit-table-wrap table { min-width: 760px; }
  .audit-detail-drawer { padding: 20px 16px; }
  .audit-detail-meta { grid-template-columns: 1fr; }
  .audit-change-head { display: none; }
  .audit-change-row { grid-template-columns: 1fr; gap: 0; }
  .audit-change-field { border-bottom: 1px solid var(--line); }
  .audit-value { grid-template-columns: 72px minmax(0, 1fr); gap: 10px; }
}

/* Customer quotation builder */
.quote-saved-strip,
.quote-empty-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 15px 17px;
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdf8;
}
.quote-saved-strip > div { display: grid; gap: 3px; min-width: 0; margin-right: auto; }
.quote-saved-strip span,
.quote-saved-strip small,
.quote-empty-strip span { color: var(--muted); font-size: 9px; line-height: 1.45; }
.quote-saved-strip strong,
.quote-empty-strip strong { font-size: 12px; }
.quote-saved-strip > b { color: #1f5782; font-size: 16px; white-space: nowrap; }
.quote-empty-strip { align-items: flex-start; flex-direction: column; gap: 4px; border-style: dashed; }

.action-dialog:has([data-quote-builder]) { width: calc(100vw - 24px); max-width: none; overflow-x: hidden; }
.action-dialog.quote-builder-dialog { width: calc(100vw - 24px); max-width: none; overflow-x: hidden; }
.action-dialog:has([data-quote-builder]) #actionDialogBody,
.action-dialog:has([data-quote-builder]) form,
.action-dialog.quote-builder-dialog #actionDialogBody,
.action-dialog.quote-builder-dialog form,
[data-quote-builder] { width: 100%; min-width: 0; max-width: 100%; }
[data-quote-builder] { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
[data-quote-builder] > * { min-width: 0; max-width: 100%; box-sizing: border-box; }
.quote-builder-section {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fffdf8;
}
.quote-section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.quote-section-head > div { display: grid; grid-template-columns: 28px auto; align-items: center; gap: 2px 9px; }
.quote-section-head > div > span { grid-row: 1 / 3; display: grid; place-items: center; width: 28px; height: 28px; color: var(--paper); background: var(--ink); border-radius: 50%; font-size: 8px; font-weight: 900; }
.quote-section-head strong { font-size: 13px; }
.quote-section-head small { color: var(--muted); font-size: 9px; }
.quote-section-head em { padding: 6px 9px; color: #1f5782; background: #e5f1fb; border-radius: 999px; font-size: 9px; font-style: normal; font-weight: 850; }
.quote-section-head em.locked { color: var(--muted); background: #e9e6dc; }
.quote-field-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.quote-field { display: grid; gap: 7px; min-width: 0; }
.quote-field.full { grid-column: 1 / -1; }
.quote-field > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.quote-field input,
.quote-field textarea,
.quote-rounding select {
  width: 100%;
  min-height: 42px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 11px;
}
.quote-field textarea { min-height: 105px; line-height: 1.55; resize: vertical; }
.quote-field input:disabled { color: var(--muted); background: #efede6; }
.quote-field input:focus,
.quote-field textarea:focus,
.quote-rounding select:focus { border-color: var(--ink); outline: 2px solid rgba(25, 25, 23, .07); }

.quote-edit-access { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; padding: 12px 14px; border: 1px solid #bfc9c4; border-radius: 11px; background: #eef5f1; }
.quote-edit-access strong { flex: 0 0 auto; font-size: 11px; }
.quote-edit-access span { color: var(--muted); font-size: 9px; line-height: 1.5; text-align: right; }
.quote-edit-access.allowed { border-color: #7fa594; box-shadow: inset 4px 0 0 #245f47; }
.quote-edit-access.readonly { border-color: #d8b9ae; background: #fbefeb; box-shadow: inset 4px 0 0 #b54a38; }
.quote-builder-readonly input:disabled,
.quote-builder-readonly textarea:disabled,
.quote-builder-readonly select:disabled { opacity: 1; color: #3f423d; -webkit-text-fill-color: #3f423d; background: #efeee8; cursor: not-allowed; }
.quote-builder-readonly button:disabled { opacity: .42; cursor: not-allowed; }
.quote-responsibility-section {
  border-color: #1d2523;
  background: linear-gradient(135deg, #f7f5ed 0%, #fffdf8 62%, #e8f2ee 100%);
  box-shadow: inset 5px 0 0 #1d2523;
}
.quote-responsibility-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
.quote-responsibility-grid article {
  display: grid;
  gap: 6px;
  min-height: 74px;
  padding: 11px 12px;
  border: 1px solid #cbd5d0;
  border-radius: 9px;
  background: rgba(255, 255, 255, .76);
}
.quote-responsibility-grid article span { color: var(--muted); font-size: 9px; font-weight: 800; }
.quote-responsibility-grid article strong { font-size: 12px; }
.quote-responsibility-grid article small { color: var(--muted); font-size: 8px; }

.quote-section-actions { display: flex !important; grid-template-columns: none !important; gap: 7px !important; }
.quote-lines-section { width: 100%; min-width: 0; max-width: 100%; overflow: visible; content-visibility: visible !important; contain: none !important; contain-intrinsic-size: none !important; }
.quote-line-scroll { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; scrollbar-gutter: stable both-edges; overscroll-behavior-inline: contain; }
.quote-line-list { display: grid; gap: 8px; min-width: 0; }
.quote-line-footer-actions { position: sticky; left: 0; display: flex; align-items: center; justify-content: flex-end; gap: 14px; width: 100%; min-width: 0; margin-top: 12px; padding: 11px 12px; border: 1px dashed #a9a69d; border-radius: 10px; background: #f1efe7; }
.quote-line-footer-actions span { margin-right: auto; color: var(--muted); font-size: 9px; line-height: 1.45; }
.quote-line-footer-actions .btn { flex: 0 0 auto; min-width: 190px; }
.quote-measure-guide { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 9px 11px; border: 1px solid #c7d7e3; border-radius: 9px; color: #315c78; background: #eef7fd; font-size: 9px; line-height: 1.45; }
.quote-measure-guide b { flex: 0 0 auto; padding: 3px 6px; border-radius: 999px; color: #fff; background: #1f5782; font-size: 8px; }
.quote-measure-guide strong { color: #174a70; }
.quote-major-divider {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: 8px;
  padding: 0 14px;
  color: #f7f3e8;
  background: var(--ink);
  border-left: 7px solid #ff5935;
  border-radius: 8px 8px 2px 2px;
}
.quote-major-divider:first-child { margin-top: 0; }
.quote-major-divider b { color: #ff7a59; font-size: 10px; letter-spacing: .08em; }
.quote-major-divider strong { font-size: 12px; }
.quote-major-divider span { color: rgba(247, 243, 232, .45); font-size: 8px; font-weight: 900; letter-spacing: .14em; }
.quote-line {
  display: grid;
  grid-template-columns: 28px minmax(112px, 1.1fr) minmax(128px, 1.2fr) minmax(132px, 1.4fr) minmax(100px, 1.1fr) minmax(112px, .85fr) repeat(3, minmax(100px, .7fr)) minmax(80px, .8fr) minmax(128px, .9fr) 34px;
  align-items: end;
  gap: 7px;
  padding: 10px;
  border: 1px solid #d2cfc5;
  border-left: 3px solid #9c9a92;
  border-radius: 3px 9px 9px 3px;
  background: #f7f5ee;
}
.quote-line + .quote-line { border-top-style: dashed; }
.quote-line > label { display: grid; gap: 5px; min-width: 0; }
.quote-line > label > span,
.quote-line > .quote-line-total > span,
.quote-measure-field > span { color: var(--muted); font-size: 8px; font-weight: 800; }
.quote-spec-field span { display: flex; align-items: center; gap: 4px; }
.quote-spec-field span em { padding: 2px 4px; border-radius: 999px; color: #5c6660; background: #e7e5dc; font-size: 7px; font-style: normal; }
.quote-line input,
.quote-line select { width: 100%; min-width: 0; height: 42px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; font: inherit; font-size: 11px; }
.quote-line .cost-code-combobox-control [data-cost-code-query] { min-height: 42px; height: 42px; padding-right: 42px; }
.quote-line .cost-code-combobox-list { position: fixed; top: auto; right: auto; bottom: auto; left: auto; box-sizing: border-box; }
.quote-measure-field { display: grid; gap: 5px; min-width: 0; }
.quote-measure-field > div { display: grid; grid-template-columns: minmax(0, 1fr) 58px; gap: 4px; }
.quote-measure-field select { padding-inline: 5px; color: #174a70; background: #e8f3fc; font-weight: 850; }
.quote-major-field select { color: #171915; background: #e7e5dc; font-weight: 850; }
.quote-minor-field select { border-color: #bcb8ab; background: #fff; font-weight: 750; }
.quote-major-field .cost-code-combobox-control input { color: #171915; background: #e7e5dc; font-weight: 850; }
.quote-minor-field .cost-code-combobox-control input { border-color: #bcb8ab; background: #fff; font-weight: 750; }
.quote-line-number { align-self: center; color: var(--muted); font-size: 9px; font-weight: 900; text-align: center; }
.quote-line-total { display: grid; align-content: center; gap: 6px; min-height: 42px; padding: 0 9px; border-radius: 8px; color: #1f5782; background: #e8f3fc; }
.quote-line-total strong { font-size: 12px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.quote-line-remove { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 4px; padding: 0; border: 0; border-radius: 50%; color: #8c1f1f; background: #fff1f1; cursor: pointer; }

.quote-legal-section { border-top-color: #1f5782; background: #f8fbfd; }
.quote-legal-toggle { display: flex; align-items: center; gap: 7px; padding: 7px 10px; color: #174a70; background: #e5f1fb; border-radius: 999px; font-size: 9px; font-weight: 900; }
.quote-legal-toggle input,
.quote-legal-check input { width: 15px; height: 15px; accent-color: #1f5782; }
.quote-legal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quote-legal-grid > label { display: grid; align-content: end; gap: 6px; min-width: 0; }
.quote-legal-grid > label > span { color: var(--muted); font-size: 9px; font-weight: 800; }
.quote-legal-grid select,
.quote-legal-grid input:not([type="checkbox"]) { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #c7d7e3; border-radius: 9px; color: var(--ink); background: #fff; font: inherit; font-size: 10px; }
.quote-legal-grid .quote-auto-total input { color: #174a70; background: #e5f1fb; font-size: 12px; font-weight: 950; }
.quote-legal-grid .quote-auto-total small { color: #42708f; font-size: 8px; line-height: 1.4; }
.quote-legal-grid .quote-legal-check { display: flex; align-items: center; align-self: end; min-height: 42px; padding: 9px 11px; border: 1px solid #c7d7e3; border-radius: 9px; background: #fff; }
.quote-legal-status { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; color: #174a70; background: #e5f1fb; border-left: 4px solid #1f5782; border-radius: 5px 9px 9px 5px; }
.quote-legal-status strong { font-size: 9px; white-space: nowrap; }
.quote-legal-status span { font-size: 9px; line-height: 1.45; }
.quote-legal-caution { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.5; }
.quote-rate-field.auto-rate input { color: #174a70; background: #eaf4fb; font-weight: 900; }

.quote-rate-notice { display: grid; gap: 4px; padding: 12px 14px; margin-bottom: 12px; color: #6e4e09; background: #fff3cf; border-radius: 11px; }
.quote-rate-notice strong { font-size: 10px; }
.quote-rate-notice span { font-size: 9px; line-height: 1.5; }
.quote-rate-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.quote-rate-field { display: grid; grid-template-columns: 1fr; gap: 7px; padding: 11px; border: 1px solid var(--line); border-top: 3px solid var(--ink); border-radius: 5px 5px 10px 10px; background: var(--surface); transition: opacity .15s ease; }
.quote-rate-field > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.quote-rate-field > span b { font-size: 10px; }
.quote-rate-field > span em { padding: 3px 5px; color: #1d5f89; background: #e5f1fb; border-radius: 999px; font-size: 7px; font-style: normal; font-weight: 900; }
.quote-rate-field > div { display: grid; grid-template-columns: 58px 1fr 12px; align-items: center; gap: 5px; min-width: 0; }
.quote-rate-field small { overflow: hidden; color: var(--muted); font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.quote-rate-field select,
.quote-rate-field input { width: 100%; height: 35px; padding: 0 7px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; font: inherit; font-size: 9px; }
.quote-rate-field input { text-align: right; }
.quote-rate-field > div > b { color: var(--muted); font-size: 9px; }
.quote-rate-field output { display: block; padding-top: 7px; border-top: 1px dashed var(--line); color: #174a70; font-size: 9px; font-weight: 900; text-align: right; }
.quote-rate-field.excluded { opacity: .48; border-top-color: #a09e96; background: #ebe9e2; }
.quote-rate-field.excluded > span b { text-decoration: line-through; }
.quote-rounding { display: grid; grid-template-columns: 150px minmax(180px, 320px); align-items: center; gap: 12px; margin-top: 13px; }
.quote-rounding > span { color: var(--muted); font-size: 9px; font-weight: 800; }

.quote-commercial-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.quote-commercial-grid label { display: grid; gap: 7px; }
.quote-commercial-grid span { color: var(--muted); font-size: 9px; font-weight: 800; }
.quote-commercial-grid input,
.quote-commercial-grid select { width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); font: inherit; font-size: 10px; }
.quote-payment-total { display: flex !important; grid-template-columns: none !important; align-items: center; gap: 7px !important; color: var(--muted); font-size: 9px; }
.quote-payment-total b { padding: 5px 8px; color: #1d5f89; background: #e5f1fb; border-radius: 999px; }
.quote-payment-total b.warning { color: #8c3b22; background: #ffe7dc; }
.quote-payment-head { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.quote-payment-head strong { font-size: 11px; }
.quote-payment-list { display: grid; gap: 7px; margin-top: 9px; }
.quote-payment-row { display: grid; grid-template-columns: 30px minmax(130px, .8fr) 110px minmax(180px, 1.4fr) 30px; align-items: end; gap: 8px; padding: 9px 10px; border: 1px solid var(--line); border-left: 4px solid var(--ink); border-radius: 4px 9px 9px 4px; background: var(--surface); }
.quote-payment-row > span { align-self: center; color: #ff5935; font-size: 9px; font-weight: 950; }
.quote-payment-row label { display: grid; gap: 5px; }
.quote-payment-row small { color: var(--muted); font-size: 8px; font-weight: 800; }
.quote-payment-row input { width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: #fffdf8; font: inherit; font-size: 10px; }
.quote-payment-row label > div { display: grid; grid-template-columns: 1fr 16px; align-items: center; gap: 3px; }
.quote-payment-row label > div b { color: var(--muted); font-size: 9px; }
.quote-payment-row > button { display: grid; place-items: center; width: 28px; height: 28px; margin-bottom: 4px; border: 0; border-radius: 50%; color: #8c1f1f; background: #fff1f1; cursor: pointer; }

.quote-live-preview { position: sticky; bottom: 0; z-index: 4; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); overflow: hidden; color: var(--paper); background: var(--ink); border: 1px solid var(--ink); border-radius: 14px; box-shadow: 0 -12px 30px rgba(25, 25, 23, .12); }
.quote-live-preview > div { display: grid; gap: 5px; padding: 13px; border-right: 1px solid rgba(242, 240, 233, .14); }
.quote-live-preview > div:last-child { border-right: 0; }
.quote-live-preview span { color: rgba(242, 240, 233, .58); font-size: 8px; }
.quote-live-preview strong { font-size: 12px; }
.quote-live-preview .grand { color: var(--ink); background: #f1c75b; }
.quote-live-preview .grand span { color: rgba(25, 25, 23, .6); }
.quote-builder-save { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quote-builder-save > span { color: var(--muted); font-size: 9px; }
.quote-save-status.saving { color: #8a6415; }
.quote-save-status.saved { color: #26704e; font-weight: 850; }
.quote-save-status.error { color: #a43d35; font-weight: 850; }
.quote-revision-list { display: grid; gap: 8px; }
.quote-revision-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 13px; border: 1px solid var(--line); border-left: 4px solid #566b5e; border-radius: 5px 10px 10px 5px; background: var(--surface); }
.quote-revision-row.voided { border-left-color: #9d5b55; background: #fbf4f2; }
.quote-revision-row > div:first-child { display: grid; gap: 4px; min-width: 0; }
.quote-revision-row strong { font-size: 11px; }
.quote-revision-row span,
.quote-revision-row small { color: var(--muted); font-size: 9px; }
.quote-revision-row > div:last-child { display: flex; flex: 0 0 auto; gap: 7px; }
.quote-revision-empty { margin: 0; padding: 18px; color: var(--muted); background: #f0eee7; border-radius: 10px; font-size: 10px; text-align: center; }
.quote-transfer-panel { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 14px; border: 1px solid rgba(52, 99, 126, .28); border-radius: 12px; color: #23475b; background: #edf4f7; }
.quote-transfer-panel > div { display: grid; gap: 4px; min-width: 0; }
.quote-transfer-panel p { margin: 0; font-size: 10px; line-height: 1.55; }
.quote-transfer-route { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: stretch; gap: 10px; margin-bottom: 14px; }
.quote-transfer-route article { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #f5f3ed; }
.quote-transfer-route span,
.quote-transfer-route small { color: var(--muted); font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.quote-transfer-route strong { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }
.quote-transfer-route > i { align-self: center; color: #7b7164; font-style: normal; font-weight: 950; text-align: center; }
.quote-transfer-impact { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 12px; margin-top: 14px; padding: 13px 14px; border-left: 4px solid #56778a; border-radius: 6px 10px 10px 6px; background: #edf2f3; font-size: 10px; line-height: 1.55; }
.quote-transfer-impact span { min-width: 0; overflow-wrap: anywhere; }
.quote-transfer-impact small { grid-column: 1 / -1; color: var(--muted); }
.quote-transfer-confirm { display: grid; grid-template-columns: 20px minmax(0, 1fr); align-items: start; gap: 10px; margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); font-size: 14px; font-weight: 800; line-height: 1.6; cursor: pointer; }
.quote-transfer-confirm input { width: 20px; height: 20px; margin: 2px 0 0; padding: 0; }
.quote-transfer-confirm span { min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.quote-record-danger { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 12px; padding: 14px; border: 1px solid rgba(168, 72, 66, .35); border-radius: 12px; color: #6f2925; background: #fbefed; }
.quote-record-danger > div:first-child { display: grid; gap: 4px; }
.quote-record-danger p { margin: 0; font-size: 10px; line-height: 1.55; }
.quote-record-danger-actions,
.quote-link-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }

.sales-quote-intro { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin-bottom: 18px; padding: 24px 26px; color: var(--paper); background: var(--ink); border-radius: 18px; }
.sales-quote-intro h2 { margin: 5px 0 7px; font-size: 23px; }
.sales-quote-intro > div:first-child > span { color: rgba(242, 240, 233, .64); font-size: 11px; }
.sales-quote-flow { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.sales-quote-flow b { padding: 9px 11px; color: var(--ink); background: #f1c75b; border-radius: 8px; font-size: 9px; }
.sales-quote-flow i { color: #ff6a45; font-style: normal; font-weight: 950; }
.sales-quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.sales-quote-card { display: grid; gap: 18px; padding: 18px; border: 1px solid var(--line); border-top: 5px solid #aaa79d; border-radius: 8px 8px 16px 16px; background: var(--surface); }
.sales-quote-card.ready { border-top-color: #1f5782; }
.sales-quote-state { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sales-quote-state span { color: var(--muted); font-size: 9px; font-weight: 800; }
.sales-quote-state b { padding: 5px 7px; color: #174a70; background: #e5f1fb; border-radius: 999px; font-size: 8px; }
.sales-quote-card.draft .sales-quote-state b { color: #6f5920; background: #fff3cf; }
.sales-quote-main { display: grid; gap: 6px; }
.sales-quote-main small { color: #ff5935; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.sales-quote-main h2 { margin: 0; font-size: 18px; }
.sales-quote-main p { margin: 0 0 9px; color: var(--muted); font-size: 10px; }
.sales-quote-main > strong { font-size: 19px; }
.sales-quote-main > strong.empty-amount { color: var(--muted); font-size: 13px; }
.sales-quote-main > em { color: var(--muted); font-size: 8px; font-style: normal; }
.quote-linked-project { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px; border: 1px solid #b8cfde; border-radius: 11px; background: #eef6fb; }
.quote-linked-project.missing { border-color: #dcc99b; background: #fff8e6; }
.quote-linked-project > div:first-child { display: grid; gap: 3px; min-width: 0; }
.quote-linked-project span { color: #2b698e; font-size: 8px; font-weight: 900; }
.quote-linked-project.missing span { color: #8a6415; }
.quote-linked-project strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.quote-linked-project small { color: var(--muted); font-size: 8px; }
.quote-linked-project .btn { flex: 0 0 auto; }
.sales-quote-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sales-quote-actions .btn { flex: 1; }

@media (max-width: 1100px) {
  .quote-rate-grid,
  .quote-legal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-quote-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-quote-intro { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 760px) {
  .quote-edit-access { align-items: stretch; flex-direction: column; }
  .quote-edit-access span { text-align: left; }
  .quote-saved-strip { align-items: stretch; flex-direction: column; }
  .quote-saved-strip > b { white-space: normal; }
  .quote-field-grid,
  .quote-responsibility-grid,
  .quote-rate-grid,
  .quote-legal-grid { grid-template-columns: 1fr; }
  .quote-commercial-grid { grid-template-columns: 1fr; }
  .quote-payment-row { grid-template-columns: 24px 1fr 80px; }
  .quote-payment-row label:nth-of-type(3) { grid-column: 2 / 4; }
  .quote-payment-row > button { grid-column: 3; grid-row: 1; justify-self: end; }
  .quote-rounding { grid-template-columns: 1fr; }
  .quote-live-preview { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-live-preview .grand { grid-column: 1 / -1; }
  .quote-builder-save { align-items: stretch; flex-direction: column; }
  .quote-revision-row { align-items: stretch; flex-direction: column; }
  .quote-revision-row > div:last-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-transfer-panel,
  .quote-record-danger { align-items: stretch; flex-direction: column; }
  .quote-transfer-panel .btn { width: 100%; }
  .quote-transfer-route { grid-template-columns: minmax(0, 1fr); }
  .quote-transfer-route > i { transform: rotate(90deg); }
  .quote-transfer-impact { grid-template-columns: minmax(0, 1fr); }
  .quote-transfer-impact small { grid-column: auto; }
  .quote-record-danger-actions,
  .quote-link-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .quote-record-danger-actions .btn,
  .quote-link-actions .btn { width: 100%; }
  .quote-linked-project { align-items: stretch; flex-direction: column; }
  .quote-linked-project .btn { width: 100%; }
  .sales-quote-grid { grid-template-columns: minmax(0, 1fr); }
  .sales-quote-card,
  .sales-quote-main,
  .sales-quote-actions { min-width: 0; }
  .sales-quote-flow { display: grid; grid-template-columns: 1fr auto 1fr; width: 100%; white-space: normal; }
  .sales-quote-flow b { text-align: center; }
}

/* Representative-reviewed Notion changes · retained in build 121 */
.notion-review-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 7px;
  font-style: normal;
  font-weight: 950;
  letter-spacing: .02em;
  white-space: nowrap;
}
.notion-review-badge.update { color: #175fa3; background: #e7f2ff; }
.notion-review-badge.delete { color: #b23932; background: #fff0ed; }
.notion-review-badge.conflict { color: #6940a5; background: #f4edff; }
.work-event.notion-review-update,
.work-focus-item.notion-review-update { box-shadow: inset 4px 0 #287dc4; }
.work-event.notion-review-delete,
.work-focus-item.notion-review-delete { box-shadow: inset 4px 0 #c34b43; }
.work-event.notion-review-conflict,
.work-focus-item.notion-review-conflict { box-shadow: inset 4px 0 #7851ae; }
.work-event.notion-review-update .work-event-title,
.work-focus-item.notion-review-update .work-focus-copy > strong { color: #175fa3; }
.work-event.notion-review-delete .work-event-title,
.work-focus-item.notion-review-delete .work-focus-copy > strong { color: #b23932; text-decoration: line-through; text-decoration-thickness: 1px; }
.work-event.notion-review-conflict .work-event-title,
.work-focus-item.notion-review-conflict .work-focus-copy > strong { color: #6940a5; }
.notion-review-legend { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 11px; margin-top: 12px; }
.notion-review-legend strong { color: var(--ink); font-size: 10px; }
.notion-review-legend span { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 850; }
.notion-review-legend i { width: 8px; height: 8px; border-radius: 2px; background: #287dc4; }
.notion-review-legend i.delete { background: #c34b43; }
.notion-review-legend i.conflict { background: #7851ae; }
.notion-review-legend small { color: var(--muted); font-size: 8px; }
.notion-review-panel { display: grid; gap: 12px; padding: 16px; border: 1px solid #97bfdf; border-left: 6px solid #287dc4; border-radius: 12px; background: #f4f9ff; }
.notion-review-panel.delete { border-color: #e3aaa5; border-left-color: #c34b43; background: #fff7f5; }
.notion-review-panel.conflict { border-color: #c4afe1; border-left-color: #7851ae; background: #faf7ff; }
.notion-review-head { display: grid; gap: 4px; }
.notion-review-head > span { color: #175fa3; font-size: 8px; font-weight: 950; letter-spacing: .12em; }
.notion-review-panel.delete .notion-review-head > span { color: #b23932; }
.notion-review-panel.conflict .notion-review-head > span { color: #6940a5; }
.notion-review-head strong { font-size: 14px; }
.notion-review-head small { color: var(--muted); font-size: 9px; }
.notion-review-diffs { display: grid; gap: 7px; }
.notion-review-diff { display: grid; grid-template-columns: 90px minmax(0, 1fr); align-items: start; gap: 10px; padding: 9px 10px; border: 1px solid rgba(40, 125, 196, .2); border-radius: 8px; background: rgba(255, 255, 255, .78); }
.notion-review-diff > span { color: var(--muted); font-size: 8px; font-weight: 900; }
.notion-review-diff > div { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 8px; min-width: 0; font-size: 9px; line-height: 1.5; }
.notion-review-diff del,
.notion-review-diff ins { min-width: 0; overflow-wrap: anywhere; text-decoration: none; }
.notion-review-diff del { color: #8a625f; }
.notion-review-diff ins { color: #175fa3; font-weight: 900; }
.notion-review-diff i { color: var(--muted); font-style: normal; }
.notion-review-delete-copy { display: grid; gap: 5px; padding: 12px; border-radius: 9px; color: #8b2d28; background: rgba(195, 75, 67, .08); }
.notion-review-delete-copy strong { font-size: 11px; }
.notion-review-delete-copy span { font-size: 9px; line-height: 1.6; }
.notion-review-actions { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 9px; padding: 12px; border: 1px solid #97bfdf; border-radius: 12px; background: rgba(244, 249, 255, .97); box-shadow: 0 -8px 24px rgba(25, 32, 38, .08); }
.notion-review-actions.delete { border-color: #e3aaa5; background: rgba(255, 247, 245, .97); }
.notion-review-actions.conflict { border-color: #c4afe1; background: rgba(250, 247, 255, .97); }
.notion-review-actions > div { display: grid; gap: 3px; margin-right: auto; }
.notion-review-actions > div strong { font-size: 10px; }
.notion-review-actions > div span { color: var(--muted); font-size: 8px; }

/* Responsive operating views · mobile build 149 */
.mobile-only { display: none; }

@media screen {
  .quote-builder-section,
  .sales-quote-card,
  .project-card,
  .dashboard-grid > .panel,
  .mobile-calendar-agenda {
    content-visibility: auto;
    contain-intrinsic-size: auto 360px;
  }
}

@media (max-width: 760px) {
  .mobile-only { display: block; }
  .desktop-only { display: none !important; }

  .main { padding-top: 14px; }
  .topbar h1 { font-size: clamp(23px, 7.5vw, 28px); line-height: 1.12; }
  .topbar .eyebrow { max-width: 100%; overflow-wrap: anywhere; }
  .content { width: 100%; min-width: 0; }
  .content > * { width: 100%; min-width: 0; max-width: 100%; }

  .mobile-appbar,
  .mobile-nav-backdrop { backdrop-filter: none; }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .dashboard-primary-metrics { margin-bottom: 8px; }
  .dashboard-finance-metrics { grid-template-columns: minmax(0, 1fr); }
  .dashboard-finance-metrics .metric { min-height: 118px; padding: 16px; }
  .dashboard-finance-metrics .metric strong { font-size: clamp(24px, 8vw, 34px); }
  .metric { min-height: 126px; padding: 14px; }
  .metric strong { font-size: clamp(19px, 6vw, 27px); }
  .metric small { line-height: 1.35; }

  .lead-mobile-list { display: grid; gap: 10px; }
  .lead-mobile-card {
    width: 100%;
    display: grid;
    gap: 11px;
    padding: 15px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink);
    border-radius: 6px 14px 14px 6px;
    background: var(--surface);
    text-align: left;
  }
  .lead-mobile-top,
  .lead-mobile-meta,
  .lead-mobile-detail { display: flex; align-items: center; min-width: 0; }
  .lead-mobile-top { justify-content: space-between; gap: 10px; }
  .lead-mobile-top strong { min-width: 0; overflow: hidden; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
  .lead-mobile-top em { flex: 0 0 auto; font-style: normal; }
  .lead-mobile-meta { gap: 8px; color: var(--muted); }
  .lead-mobile-meta b { min-width: 0; color: #1f5782; font-size: 9px; }
  .lead-mobile-meta i { min-width: 0; overflow-wrap: anywhere; font-size: 10px; font-style: normal; }
  .lead-mobile-detail { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 8px; padding-top: 9px; border-top: 1px dashed var(--line); }
  .lead-mobile-detail small { color: var(--muted); font-size: 9px; }
  .lead-mobile-detail b { min-width: 0; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .lead-mobile-detail b.open { color: #2d5f48; }
  .lead-mobile-detail b.assigned { color: #334e68; }
  .lead-mobile-detail time { color: var(--muted); font-size: 9px; }
  .lead-mobile-detail.inquiry { grid-template-columns: 62px minmax(0, 1fr); }
  .lead-toolbar { flex-direction: row; align-items: center; }
  .lead-toolbar .searchbox { flex: 1 1 100%; }
  .lead-sort-control { flex: 1 1 auto; justify-content: space-between; }
  .lead-sort-control select { flex: 1 1 auto; width: 100%; }
  .lead-toolbar .result-count { flex: 0 0 auto; margin-left: 0; align-self: center; }

  .calendar-panel,
  .expanded-week { overflow-x: visible; scroll-snap-type: none; }
  .calendar-weekdays,
  .calendar-grid,
  .expanded-week-grid {
    width: 100%;
    min-width: 0;
  }
  .calendar-weekdays span { padding: 7px 1px; font-size: 9px; }
  .calendar-day,
  .work-day {
    min-height: 58px;
    padding: 4px;
    scroll-snap-align: none;
  }
  .calendar-day-head { min-height: 25px; gap: 2px; }
  .calendar-day-head time { width: 25px; height: 25px; font-size: 10px; }
  .calendar-add { width: 24px; height: 24px; padding: 0; }
  .work-day .calendar-day-head > span {
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    color: var(--paper);
    background: var(--ink);
    font-size: 7px;
  }
  .work-calendar-grid .calendar-events,
  .construction-calendar .calendar-events,
  .project-construction-calendar .calendar-events,
  .finance-calendar-grid .calendar-events { display: none; }
  .work-day.selected-week { background: #ece7da; }
  .work-day[data-action="select-work-day"] { min-height: 58px; }
  .work-day[data-action="select-work-day"]:active { background: #d8d2c2; }

  .mobile-calendar-agenda {
    margin: -4px 0 14px;
    padding: 15px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--ink);
    border-radius: 6px 6px 15px 15px;
    background: var(--surface);
  }
  .mobile-agenda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
  .mobile-agenda-head > div { display: grid; gap: 3px; }
  .mobile-agenda-head span { color: #ff5935; font-size: 8px; font-weight: 900; letter-spacing: .12em; }
  .mobile-agenda-head strong { font-size: 14px; }
  .mobile-agenda-head > b { display: grid; place-items: center; min-width: 34px; height: 28px; padding: 0 8px; border-radius: 999px; color: var(--paper); background: var(--ink); font-size: 9px; }
  .mobile-work-agenda-list,
  .mobile-schedule-list { display: grid; gap: 8px; }
  .mobile-work-agenda-list .work-event { min-height: 78px; padding: 10px 11px; }
  .mobile-work-agenda-list .work-event-title { font-size: 12px; white-space: normal; }
  .mobile-work-agenda-list .work-event small { display: block; white-space: normal; line-height: 1.4; }
  .mobile-work-agenda-list .work-payment-event { min-height: 48px; }
  .mobile-agenda-add { width: 100%; margin-top: 10px; }

  .mobile-schedule-row {
    width: 100%;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    padding: 10px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--ink);
    border-radius: 5px 11px 11px 5px;
    background: #f7f5ee;
    text-align: left;
  }
  .mobile-schedule-row.payment { border-left-color: #1f5782; background: #eef6fb; }
  .mobile-schedule-row time { color: #ff5935; font-size: 9px; font-weight: 900; }
  .mobile-schedule-row > div { display: grid; gap: 4px; min-width: 0; }
  .mobile-schedule-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-schedule-row span { color: var(--muted); font-size: 8px; }
  .mobile-schedule-row > b { font-size: 9px; white-space: nowrap; }

  .finance-day-count {
    display: grid;
    place-items: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    color: #fff;
    background: #1f5782;
    font-size: 7px;
    font-weight: 900;
  }
  .mobile-finance-agenda-list { display: grid; gap: 8px; }
  .mobile-finance-row { display: grid; grid-template-columns: 43px minmax(0, 1fr); align-items: center; gap: 8px; }
  .mobile-finance-row > time { color: #1f5782; font-size: 9px; font-weight: 900; }
  .mobile-finance-row .finance-calendar-event { min-height: 56px; padding: 9px 10px; }
  .mobile-finance-row .finance-calendar-event span,
  .mobile-finance-row .finance-calendar-event b,
  .mobile-finance-row .finance-calendar-event small { white-space: normal; line-height: 1.35; }

  .project-hub-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }
  .project-hub-actions .btn { width: 100%; min-width: 0; white-space: normal; }

  .expanded-week-grid { grid-template-columns: 1fr; gap: 9px; }
  .week-day-card { min-height: 0; }
  .work-calendar-details summary { align-items: flex-start; gap: 10px; }
  .work-calendar-details summary b { flex: 0 0 auto; }
  .work-calendar-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work-calendar-summary article:last-child { grid-column: 1 / -1; }
  .work-employee-grid { grid-template-columns: 1fr; }
  .work-team-head,
  .work-focus-head { align-items: stretch; flex-direction: column; }
  .work-focus-item { grid-template-columns: 42px minmax(0, 1fr); }
  .work-focus-side { grid-column: 2; align-items: flex-start; }

  .quote-builder-form { gap: 12px; }
  .action-dialog:has([data-quote-builder]) { width: 100%; max-width: none; overflow-x: hidden; }
  .action-dialog.quote-builder-dialog { width: 100%; max-width: none; overflow-x: hidden; }
  .action-dialog:has([data-quote-builder]) #actionDialogBody,
  .action-dialog:has([data-quote-builder]) form,
  .action-dialog.quote-builder-dialog #actionDialogBody,
  .action-dialog.quote-builder-dialog form,
  [data-quote-builder] { width: 100%; min-width: 0; max-width: 100%; overflow-x: hidden; }
  [data-quote-builder] > *,
  .action-dialog:has([data-quote-builder]) .modal-head,
  .action-dialog:has([data-quote-builder]) .modal-body,
  .action-dialog.quote-builder-dialog .modal-head,
  .action-dialog.quote-builder-dialog .modal-body { width: 100%; min-width: 0; max-width: 100%; }
  .quote-builder-section { padding: 14px; border-radius: 12px; }
  .quote-section-head { align-items: flex-start; flex-direction: column; }
  .quote-section-head > div { width: 100%; }
  .quote-section-actions { width: 100%; }
  .quote-section-actions .btn { flex: 1; }
  .quote-lines-section,
  .quote-line-scroll { overflow-x: visible; }
  .quote-line-list { min-width: 0; }
  .quote-line-footer-actions { position: static; align-items: stretch; flex-direction: column; }
  .quote-line-footer-actions .btn { width: 100%; min-width: 0; }
  .quote-major-divider { grid-template-columns: 36px minmax(0, 1fr); padding: 9px 10px; }
  .quote-major-divider span { grid-column: 2; }
  .quote-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 11px 9px;
  }
  .quote-line-number { grid-row: 1; grid-column: 1; align-self: center; justify-self: start; padding: 5px 8px; border-radius: 999px; background: #e7e5dc; }
  .quote-major-field { grid-row: 2; grid-column: 1 / -1; }
  .quote-minor-field { grid-row: 3; grid-column: 1 / -1; }
  .quote-line-name { grid-row: 4; grid-column: 1 / -1; }
  .quote-spec-field { grid-row: 5; grid-column: 1 / -1; }
  .quote-measure-field { grid-row: 6; grid-column: 1 / -1; }
  .quote-line > label:nth-of-type(5) { grid-row: 7; grid-column: 1; }
  .quote-line > label:nth-of-type(6) { grid-row: 7; grid-column: 2; }
  .quote-line > label:nth-of-type(7) { grid-row: 8; grid-column: 1; }
  .quote-line-total { grid-row: 8; grid-column: 2; min-height: 48px; }
  .quote-line-note { grid-row: 9; grid-column: 1 / -1; }
  .quote-line-remove { grid-row: 1; grid-column: 2; align-self: center; justify-self: end; width: 40px; height: 40px; margin: 0; }
  .quote-line input,
  .quote-line select,
  .quote-rate-field input,
  .quote-rate-field select { height: 48px; font-size: 16px; }
  .quote-line .cost-code-combobox-control [data-cost-code-query] { height: 48px; min-height: 48px; }
  .quote-line .cost-code-combobox-control > button { inset: 2px 2px 2px auto; width: 44px; height: 44px; }
  .quote-measure-field > div { grid-template-columns: minmax(0, 1fr) 84px; }
  .quote-payment-row { grid-template-columns: 26px minmax(0, 1fr) 76px; padding: 10px 8px; }
  .quote-payment-row input { height: 44px; font-size: 16px; }
  .quote-payment-row > button { width: 40px; height: 40px; }
  .quote-live-preview > div { padding: 11px 9px; }
  .quote-live-preview strong { font-size: 11px; }
  .sales-quote-intro { padding: 19px 17px; }
  .sales-quote-intro h2 { font-size: 20px; }
  .sales-quote-flow { grid-template-columns: 1fr auto 1fr; }
  .sales-quote-flow b:nth-of-type(n + 3),
  .sales-quote-flow i:nth-of-type(n + 3) { display: none; }
  .notion-review-legend { align-items: flex-start; }
  .notion-review-legend strong { flex-basis: 100%; }
  .notion-review-panel { padding: 13px 11px; border-left-width: 4px; }
  .notion-review-diff { grid-template-columns: 1fr; gap: 5px; }
  .notion-review-diff > div { grid-template-columns: 1fr; gap: 3px; }
  .notion-review-diff > div i { transform: rotate(90deg); justify-self: start; }
  .notion-review-actions { position: static; display: grid; grid-template-columns: 1fr 1fr; padding: 10px; }
  .notion-review-actions > div { grid-column: 1 / -1; margin: 0; }
  .notion-review-actions .btn { width: 100%; min-width: 0; white-space: normal; }
}

@media (max-width: 380px) {
  .metrics { grid-template-columns: 1fr; }
  .calendar-panel { padding-inline: 8px; }
  .calendar-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1280px) {
  .attendance-company-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .attendance-company-counts {
    max-width: none;
  }

  .attendance-company-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .attendance-company-report {
    margin: 22px 0;
    padding: 0;
  }

  .attendance-company-report > .panel-head {
    padding: 18px 18px 14px;
  }

  .attendance-company-head-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .attendance-company-month-actions,
  .attendance-company-export-actions {
    display: grid;
    width: 100%;
  }

  .attendance-company-month-actions { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .attendance-company-export-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attendance-company-head-actions .btn { width: 100%; min-width: 0; white-space: normal; }

  .attendance-company-controls {
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 0 18px 16px;
  }

  .attendance-company-filters {
    grid-template-columns: 1fr;
  }

  .attendance-company-counts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }

  .attendance-company-counts span { text-align: center; }
  .attendance-company-counts small { grid-column: 1 / -1; text-align: left; }

  .attendance-company-report > .table-wrap {
    width: 100%;
    margin: 0;
    padding: 0 18px 4px;
    box-sizing: border-box;
  }

  .attendance-company-report > .table-wrap table {
    min-width: 920px;
  }

  .attendance-company-pagination {
    align-items: stretch;
    flex-direction: column;
    padding: 14px 18px 18px;
  }

  .attendance-company-pagination > div {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .attendance-company-pagination .btn { width: 100%; }
}

/* Viewport-safe dialogs, drawers and finance drill-downs */
dialog.action-dialog {
  width: min(640px, calc(100dvw - 32px));
  max-width: calc(100dvw - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

dialog.action-dialog:has(.dashboard-drill-modal),
dialog.action-dialog:has(.customer-tax-invoice-detail-modal),
dialog.action-dialog:has(.finance-record-detail-modal),
dialog.action-dialog:has(.finance-day-detail-modal),
dialog.action-dialog:has(.finance-summary-detail-modal) {
  width: min(760px, calc(100dvw - 32px));
}

dialog.action-dialog:has([data-lead-responsibility-form]) {
  width: min(920px, calc(100dvw - 32px));
}

#actionDialogBody,
#actionDialogBody > form,
#actionDialogBody > div,
.modal-head > div,
.drawer-top > div,
.detail-grid,
.detail-box {
  min-width: 0;
  max-width: 100%;
}

#actionDialogBody {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: inherit;
  overflow: hidden;
}

#actionDialogBody > form,
#actionDialogBody > div {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  max-height: inherit;
  overflow: hidden;
}

#actionDialogBody .modal-head {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  background: var(--surface);
}

#actionDialogBody .modal-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

#actionDialogBody .modal-body > * {
  min-width: 0;
  max-width: 100%;
}

#actionDialogBody > form > .modal-actions {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: 0;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

#actionDialogBody > div > .modal-body > .modal-actions,
#actionDialogBody > form > .modal-body > .modal-actions {
  position: sticky;
  z-index: 3;
  bottom: -26px;
  margin: 20px -26px -26px;
  padding: 14px 26px 18px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.dashboard-drill-modal,
.customer-tax-invoice-detail-modal,
.finance-record-detail-modal,
.finance-day-detail-modal,
.finance-summary-detail-modal {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.modal-head h2,
.modal-head p,
.drawer-top h2,
.drawer-top p,
.detail-box strong,
.detail-box span,
.btn {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.modal-head .icon-btn,
.drawer-top .icon-btn {
  flex: 0 0 36px;
}

.drawer,
.project-drawer,
.evaluation-drawer,
.incentive-drawer {
  max-width: 100dvw;
  min-width: 0;
  overflow-x: hidden;
  overscroll-behavior: contain;
}

.finance-calendar-summary > button {
  appearance: none;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink);
  text-align: left;
  background: var(--surface);
  box-shadow: none;
  cursor: pointer;
  transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}

.finance-calendar-summary > button:hover {
  transform: translateY(-1px);
  border-color: #8f8a7d;
  box-shadow: 0 8px 20px rgba(25, 25, 23, .08);
}

.finance-calendar-summary > button:focus-visible {
  outline: 3px solid rgba(25, 25, 23, .24);
  outline-offset: 2px;
}

.finance-calendar-summary > button span,
.finance-calendar-summary > button strong,
.finance-calendar-summary > button small {
  display: block;
}

.finance-calendar-summary > button small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
}

.finance-calendar-summary strong,
.finance-record-amount strong,
.finance-summary-detail-row > b {
  white-space: nowrap;
  overflow-wrap: normal;
  font-variant-numeric: tabular-nums;
}

.finance-summary-detail-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.finance-summary-detail-row {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--ink);
  text-align: left;
  background: #fbfaf6;
}

button.finance-summary-detail-row {
  font: inherit;
  cursor: pointer;
}

button.finance-summary-detail-row:hover {
  border-color: #8f8a7d;
  background: #f3f1e9;
}

.finance-summary-detail-row > time {
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.finance-summary-detail-row > div {
  min-width: 0;
}

.finance-summary-detail-row strong,
.finance-summary-detail-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finance-summary-detail-row strong { font-size: 11px; }
.finance-summary-detail-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.finance-summary-detail-row > b { font-size: 12px; }
.finance-summary-detail-row > span { color: var(--muted); font-size: 9px; font-weight: 800; }

.finance-summary-reconciliation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid;
  border-radius: 10px;
  font-size: 10px;
}

.finance-summary-reconciliation.balanced { border-color: #a8cfc2; color: #1f634f; background: #f0f8f5; }
.finance-summary-reconciliation.mismatch { border-color: #e4a29a; color: #8c1f1f; background: #fff1ef; }

.receipt-correction-note,
.sales-owner-policy {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #b8c9c2;
  border-radius: 11px;
  background: #eef5f1;
}

.receipt-correction-note strong,
.sales-owner-policy strong { font-size: 11px; }
.receipt-correction-note span,
.sales-owner-policy span { color: var(--muted); font-size: 9px; line-height: 1.55; }
.receipt-correction-note.locked { border-color: #e2b394; color: #74420f; background: #fff5e8; }
.receipt-correction-lock { color: #8a4b0e !important; white-space: normal !important; }

.lead-people-cell {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.lead-people-cell > span {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.lead-people-cell small { color: var(--muted); font-size: 8px; }
.lead-people-cell b { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.project-member-chip.sales-owner { border-color: #9abdae; background: #eaf4ef; }
.project-member-chip.external { border-color: #aeb9c4; background: #eef2f5; }
.project-member-chip.external small { color: #526475; }
.people-field.external-participants { border-color: #b7c1ca; background: #f3f6f8; }
.people-field.external-participants > p { color: #526475; }
.people-option.external { border: 1px solid #c3ccd4; background: #fff; }

.project-member-chip {
  max-width: 100%;
  min-width: 0;
}

.project-member-chip > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 1180px) {
  .calendar-panel,
  .expanded-week {
    overflow-x: hidden;
  }

  .calendar-weekdays,
  .calendar-grid,
  .expanded-week-grid {
    width: 100%;
    min-width: 0;
  }

  .expanded-week-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-calendar-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 761px) and (max-width: 1450px) {
  .quote-line-scroll { overflow-x: hidden; }
  .quote-line-list { min-width: 0; }
  .quote-line {
    grid-template-columns: 38px repeat(4, minmax(0, 1fr)) 34px;
    align-items: end;
  }

  .quote-line-number { grid-row: 1 / 6; grid-column: 1; align-self: stretch; display: grid; place-items: center; }
  .quote-major-field { grid-row: 1; grid-column: 2 / 4; }
  .quote-minor-field { grid-row: 1; grid-column: 4 / 6; }
  .quote-line-name { grid-row: 2; grid-column: 2 / 6; }
  .quote-spec-field { grid-row: 3; grid-column: 2 / 4; }
  .quote-measure-field { grid-row: 3; grid-column: 4 / 6; }
  .quote-line > label:nth-of-type(5) { grid-row: 4; grid-column: 2; }
  .quote-line > label:nth-of-type(6) { grid-row: 4; grid-column: 3; }
  .quote-line > label:nth-of-type(7) { grid-row: 4; grid-column: 4; }
  .quote-line-total { grid-row: 4; grid-column: 5; }
  .quote-line-note { grid-row: 5; grid-column: 2 / 6; }
  .quote-line-remove { grid-row: 1 / 6; grid-column: 6; align-self: center; margin: 0; }
}

@media (max-width: 760px) {
  dialog.action-dialog,
  dialog.action-dialog:has(.dashboard-drill-modal),
  dialog.action-dialog:has(.customer-tax-invoice-detail-modal),
  dialog.action-dialog:has(.finance-record-detail-modal),
  dialog.action-dialog:has(.finance-day-detail-modal),
  dialog.action-dialog:has(.finance-summary-detail-modal),
  dialog.action-dialog:has([data-lead-responsibility-form]) {
    width: 100%;
    max-width: none;
    max-height: min(94dvh, calc(100dvh - env(safe-area-inset-top)));
  }

  #actionDialogBody > form > .modal-actions {
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  #actionDialogBody > div > .modal-body > .modal-actions,
  #actionDialogBody > form > .modal-body > .modal-actions {
    bottom: -16px;
    margin: 18px -16px -16px;
    padding: 12px max(16px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  }

  .dashboard-drill-list,
  .finance-day-detail-list {
    max-height: none;
    overflow: visible;
  }

  .drawer-actions,
  .modal-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: auto;
    overflow: visible;
    flex-wrap: wrap;
  }

  .drawer-actions {
    position: sticky;
    top: -20px;
    margin-inline: -16px;
    padding: 10px 16px;
  }

  .drawer-actions .btn,
  .modal-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }

  .finance-calendar-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-calendar-summary > button { padding: 13px 12px; }

  .finance-summary-detail-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .finance-summary-detail-row > time { grid-column: 1; }
  .finance-summary-detail-row > div { grid-column: 1; }
  .finance-summary-detail-row > b { grid-row: 1 / 3; grid-column: 2; }
  .finance-summary-detail-row > span { grid-column: 2; justify-self: end; }

  .finance-summary-reconciliation {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .customer-receipt-row {
    grid-template-columns: 1fr;
  }

  .customer-tax-invoice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    justify-content: stretch;
  }

  .customer-tax-invoice-actions .btn { width: 100%; min-width: 0; white-space: normal; }

  .expanded-week-grid { grid-template-columns: 1fr; }

  .table-wrap.stack-on-mobile,
  .attendance-company-report > .table-wrap.stack-on-mobile {
    width: 100%;
    margin: 0;
    padding: 0 12px 6px;
    overflow: visible;
    box-sizing: border-box;
  }

  .stack-on-mobile table,
  .stack-on-mobile tbody,
  .stack-on-mobile tr,
  .stack-on-mobile td {
    display: block;
    width: 100%;
    min-width: 0 !important;
    box-sizing: border-box;
  }

  .stack-on-mobile thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .stack-on-mobile tbody {
    display: grid;
    gap: 10px;
  }

  .stack-on-mobile tr {
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }

  .stack-on-mobile td {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
    padding: 7px 4px;
    border: 0;
    text-align: left;
    overflow-wrap: anywhere;
  }

  .stack-on-mobile td::before {
    align-self: start;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    line-height: 1.45;
  }

  .stack-on-mobile td:not([colspan]) > * { grid-column: 2; }

  .stack-on-mobile td[colspan] {
    display: block;
    padding: 8px 4px;
  }

  .stack-on-mobile td[colspan]::before { content: none; }

  .attendance-company-stack td:nth-child(1)::before { content: "직원"; }
  .attendance-company-stack td:nth-child(2)::before { content: "날짜"; }
  .attendance-company-stack td:nth-child(3)::before { content: "구분·시각"; }
  .attendance-company-stack td:nth-child(4)::before { content: "출근지"; }
  .attendance-company-stack td:nth-child(5)::before { content: "상태"; }
  .attendance-company-stack td:nth-child(6)::before { content: "지각 사유"; }
  .attendance-company-stack td:nth-child(7)::before { content: "기준점 거리"; }
  .attendance-company-stack td:nth-child(8)::before { content: "GPS 정확도"; }

  .attendance-personal-stack td:nth-child(1)::before { content: "날짜"; }
  .attendance-personal-stack td:nth-child(2)::before { content: "구분"; }
  .attendance-personal-stack td:nth-child(3)::before { content: "시각"; }
  .attendance-personal-stack td:nth-child(4)::before { content: "인증 출근지"; }
  .attendance-personal-stack td:nth-child(5)::before { content: "지각 사유"; }
  .attendance-personal-stack td:nth-child(6)::before { content: "기준점 거리"; }
  .attendance-personal-stack td:nth-child(7)::before { content: "GPS 정확도"; }

  .incentive-stack td:nth-child(1)::before { content: "프로젝트·계약"; }
  .incentive-stack td:nth-child(2)::before { content: "산정 기준"; }
  .incentive-stack td:nth-child(3)::before { content: "요율·마진·잔액"; }
  .incentive-stack td:nth-child(4)::before { content: "인센티브"; }

  .finance-project-stack td:nth-child(1)::before { content: "프로젝트"; }
  .finance-project-stack td:nth-child(2)::before { content: "계산서 완료 수익"; }
  .finance-project-stack td:nth-child(3)::before { content: "미완료 실제입금"; }
  .finance-project-stack td:nth-child(4)::before { content: "승인·마감 원가"; }
  .finance-project-stack td:nth-child(5)::before { content: "월 계산서 확정 손익"; }
  .finance-project-stack td:nth-child(6)::before { content: "월 현금수지"; }
  .finance-project-stack td:nth-child(7)::before { content: "계산서·누적 상태"; }

  .cost-code-stack td:nth-child(1)::before { content: "코드"; }
  .cost-code-stack td:nth-child(2)::before { content: "공종명"; }
  .cost-code-stack td:nth-child(3)::before { content: "상위"; }
  .cost-code-stack td:nth-child(4)::before { content: "정의"; }
  .cost-code-stack td:nth-child(5)::before { content: "레벨"; }

  .notion-run-stack td:nth-child(1)::before { content: "실행 시각"; }
  .notion-run-stack td:nth-child(2)::before { content: "결과"; }
  .notion-run-stack td:nth-child(3)::before { content: "가져옴·갱신"; }
  .notion-run-stack td:nth-child(4)::before { content: "제외"; }
  .notion-run-stack td:nth-child(5)::before { content: "오류"; }

  .audit-stack td:nth-child(1)::before { content: "시각"; }
  .audit-stack td:nth-child(2)::before { content: "사용자"; }
  .audit-stack td:nth-child(3)::before { content: "행동"; }
  .audit-stack td:nth-child(4)::before { content: "대상"; }
  .audit-stack td:nth-child(5)::before { content: "근거·사유"; }
  .audit-stack td:nth-child(6)::before { content: "상세"; }
}

@media (max-width: 640px) {
  .incentive-payout-breakdown { grid-template-columns: 1fr; }
  .incentive-payout-breakdown > i { display: none; }
}

@media (max-width: 480px) {
  .modal-actions { grid-template-columns: 1fr; }
  .dashboard-completion-row,
  .incentive-blocker-list article { align-items: stretch; flex-direction: column; }
  .dashboard-completion-row .btn,
  .incentive-blocker-list article .btn { width: 100%; }
  .incentive-payout-breakdown { grid-template-columns: 1fr; }
  .incentive-payout-breakdown > i { display: none; }
  .project-completion-actions { width: 100%; }
  .project-completion-actions .btn { width: 100%; }
}

@media (max-width: 380px) {
  .finance-calendar-summary,
  .finance-metrics,
  .drawer-actions,
  .modal-actions,
  .customer-tax-invoice-actions {
    grid-template-columns: 1fr;
  }

  .finance-calendar-summary strong { font-size: 13px; }
  .finance-summary-detail-row { grid-template-columns: 1fr; }
  .finance-summary-detail-row > time,
  .finance-summary-detail-row > div,
  .finance-summary-detail-row > b,
  .finance-summary-detail-row > span {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }
}

/* Dashboard notice and sales-stage tabs */
.dashboard-notice-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 280px);
  align-items: start;
  gap: 24px;
}

.dashboard-notice-strip::after {
  z-index: 0;
  pointer-events: none;
}

.dashboard-notice-copy,
.dashboard-notice-meta {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.dashboard-notice-copy h2,
.dashboard-notice-copy p,
.dashboard-notice-meta > span {
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.dashboard-notice-copy h2 {
  margin: 9px 0 0;
  line-height: 1.28;
}

.dashboard-notice-copy p {
  max-width: 760px;
  white-space: pre-wrap;
}

.dashboard-notice-meta {
  display: grid;
  justify-items: end;
  gap: 12px;
  color: #d4d1c8;
  font-size: 10px;
  line-height: 1.5;
  text-align: right;
}

.dashboard-notice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

.dashboard-notice-actions button {
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, .38);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  font: inherit;
  font-weight: 850;
  white-space: nowrap;
  cursor: pointer;
}

.dashboard-notice-actions button:hover {
  background: rgba(255, 255, 255, .2);
}

.dashboard-notice-actions button.danger {
  border-color: rgba(255, 188, 181, .58);
  color: #ffe1dd;
  background: rgba(139, 42, 34, .38);
}

.record-stage-tabs.lead-stage-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  max-width: 100%;
  overflow: hidden;
}

.record-stage-tabs.lead-stage-tabs.staff {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.record-stage-tabs.lead-stage-tabs button {
  align-content: center;
  min-width: 0;
  overflow: hidden;
}

.record-stage-tabs.lead-stage-tabs b,
.record-stage-tabs.lead-stage-tabs span {
  min-width: 0;
  overflow: visible;
  line-height: 1.45;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

@media (max-width: 760px) {
  .dashboard-notice-strip {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    min-height: 0;
  }

  .dashboard-notice-copy h2 {
    max-width: 100%;
    font-size: 21px;
  }

  .dashboard-notice-meta {
    justify-items: stretch;
    text-align: left;
  }

  .dashboard-notice-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
  }

  .dashboard-notice-actions button {
    width: 100%;
    white-space: normal;
  }

  .record-stage-tabs.lead-stage-tabs,
  .record-stage-tabs.lead-stage-tabs.staff {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .record-stage-tabs.lead-stage-tabs button {
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    min-height: 68px;
  }

  .record-stage-tabs.lead-stage-tabs span {
    text-align: left;
  }

  .record-stage-tabs.lead-stage-tabs.staff > button:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 360px) {
  .dashboard-notice-actions,
  .record-stage-tabs.lead-stage-tabs,
  .record-stage-tabs.lead-stage-tabs.staff {
    grid-template-columns: minmax(0, 1fr);
  }

  .record-stage-tabs.lead-stage-tabs.staff > button:last-child {
    grid-column: auto;
  }
}

.lead-responsibility-form,
.lead-responsibility-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border: 1px solid #d8d4ca;
  border-radius: 18px;
  background: #f7f5ef;
}

.lead-responsibility-form > header,
.lead-responsibility-panel > header,
.lead-responsibility-request > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.lead-responsibility-form > header div,
.lead-responsibility-panel > header div,
.lead-responsibility-request > header div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.lead-responsibility-form > header span,
.lead-responsibility-panel > header span,
.lead-responsibility-request > header span,
.lead-responsibility-review > span {
  color: #6f6a60;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .14em;
}

.lead-responsibility-form > header strong,
.lead-responsibility-panel > header strong,
.lead-responsibility-request > header strong {
  font-size: 16px;
  line-height: 1.35;
  word-break: keep-all;
}

.lead-responsibility-form > header small,
.lead-responsibility-panel > header small {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.55;
  text-align: right;
  word-break: keep-all;
}

.lead-responsibility-policy {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 4px solid #3f6d5d;
  border-radius: 10px;
  background: #e8f0ec;
}

.lead-responsibility-policy strong { font-size: 12px; }
.lead-responsibility-policy span { color: #4d5f58; font-size: 11px; line-height: 1.55; word-break: keep-all; }
.lead-responsibility-form.locked .lead-responsibility-fields { opacity: .78; }
.lead-responsibility-form.locked input,
.lead-responsibility-form.locked select { cursor: not-allowed; }

.lead-responsibility-fields,
.lead-responsibility-current {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
}

.lead-responsibility-fields > .full { grid-column: auto; }
.lead-responsibility-fields .people-options { grid-template-columns: minmax(0, 1fr); }

.lead-responsibility-current article {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #e1ddd3;
  border-radius: 12px;
  background: #fffdfa;
}

.lead-responsibility-current article span { color: var(--muted); font-size: 10px; font-weight: 800; }
.lead-responsibility-current article strong { font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; word-break: keep-all; }

.lead-responsibility-request {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid #dfc8aa;
  border-radius: 14px;
  background: #fff6e8;
}

.lead-responsibility-request-actions,
.lead-responsibility-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.lead-responsibility-waiting {
  padding: 7px 10px;
  border-radius: 999px;
  color: #6d4f25;
  background: #f1dfbe;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.lead-responsibility-diffs { display: grid; gap: 7px; min-width: 0; }
.lead-responsibility-diff {
  display: grid;
  grid-template-columns: minmax(110px, .8fr) minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .72);
}

.lead-responsibility-diff span { color: #676157; font-size: 10px; font-weight: 800; }
.lead-responsibility-diff del,
.lead-responsibility-diff ins { min-width: 0; font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; word-break: keep-all; }
.lead-responsibility-diff del { color: #876a62; }
.lead-responsibility-diff ins { color: #315f50; font-weight: 900; text-decoration: none; }
.lead-responsibility-diff i { color: #8a8479; font-style: normal; }

.lead-responsibility-review {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 14px;
  background: #eef3ef;
}

.lead-responsibility-review.reject { background: #f8ece9; }
.lead-responsibility-review > strong { font-size: 18px; }
.lead-responsibility-review > p { margin: 0; color: #5f5a52; line-height: 1.55; }

.dashboard-drill-row.responsibility { border-left: 4px solid #967142; }

/* Representative approval center */
.dashboard-approval-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-approval-filters { display: flex; flex-wrap: wrap; gap: 7px; min-width: 0; }
.dashboard-approval-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #514d46;
  background: #f4f1ea;
  cursor: pointer;
}

.dashboard-approval-filter span { font-size: 11px; font-weight: 850; }
.dashboard-approval-filter b { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #5e584f; background: #e5e0d5; font-size: 9px; }
.dashboard-approval-filter.selected { border-color: var(--ink); color: var(--paper); background: var(--ink); }
.dashboard-approval-filter.selected b { color: var(--ink); background: var(--paper); }
.dashboard-approval-list { display: grid; gap: 9px; }
.dashboard-approval-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfaf6;
}

.dashboard-approval-kind { align-self: stretch; display: flex; align-items: center; padding: 10px; border-left: 4px solid #7d776d; border-radius: 9px; background: #efede7; }
.dashboard-approval-kind span { color: #514c45; font-size: 10px; font-weight: 900; line-height: 1.45; word-break: keep-all; overflow-wrap: anywhere; }
.dashboard-approval-kind.group-project { border-color: #547563; background: #e8f0eb; }
.dashboard-approval-kind.group-sales { border-color: #967142; background: #f3ece2; }
.dashboard-approval-kind.group-finance { border-color: #60768d; background: #e8edf2; }
.dashboard-approval-kind.group-people { border-color: #78698a; background: #eeeaf2; }
.dashboard-approval-copy { min-width: 0; }
.dashboard-approval-copy > strong,
.dashboard-approval-copy > small,
.dashboard-approval-copy > em { display: block; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.dashboard-approval-copy > strong { color: var(--ink); font-size: 14px; }
.dashboard-approval-copy > small { margin-top: 4px; color: #4f4a43; font-size: 11px; line-height: 1.5; }
.dashboard-approval-copy > em { margin-top: 5px; color: var(--muted); font-size: 10px; font-style: normal; }
.dashboard-approval-copy > p { margin: 8px 0 0; color: #625c53; font-size: 11px; line-height: 1.55; white-space: pre-wrap; word-break: keep-all; overflow-wrap: anywhere; }
.dashboard-approval-modal .modal-actions > span { margin-right: auto; color: var(--muted); font-size: 10px; }

@media (max-width: 760px) {
  .dashboard-approval-toolbar { align-items: stretch; flex-direction: column; }
  .dashboard-approval-toolbar > .btn { width: 100%; }
  .dashboard-approval-filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-approval-filter { justify-content: space-between; width: 100%; border-radius: 10px; }
  .dashboard-approval-row { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 9px; padding: 12px; }
  .dashboard-approval-kind { align-self: auto; min-height: 38px; }
  .dashboard-approval-row > .btn { width: 100%; }
  .dashboard-approval-modal .modal-actions { grid-template-columns: minmax(0, 1fr); }
  .dashboard-approval-modal .modal-actions > span { margin: 0; text-align: center; }

  .lead-responsibility-form,
  .lead-responsibility-panel { padding: 14px; border-radius: 14px; }

  .lead-responsibility-form > header,
  .lead-responsibility-panel > header,
  .lead-responsibility-request > header { display: grid; }

  .lead-responsibility-form > header small,
  .lead-responsibility-panel > header small { max-width: none; text-align: left; }

  .lead-responsibility-fields,
  .lead-responsibility-current { grid-template-columns: minmax(0, 1fr); }

  .lead-responsibility-request-actions { justify-content: stretch; }
  .lead-responsibility-request-actions .btn { flex: 1 1 120px; }

  .lead-responsibility-diff {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
  }

  .lead-responsibility-diff span { grid-column: 1 / -1; }

  /* Keep every quotation workflow step visible without horizontal scrolling. */
  .sales-quote-intro .sales-quote-flow {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    gap: 5px;
    white-space: normal;
  }
  .sales-quote-intro .sales-quote-flow b,
  .sales-quote-intro .sales-quote-flow i { display: block !important; }
  .sales-quote-intro .sales-quote-flow b { text-align: center; }
  .sales-quote-intro .sales-quote-flow i { transform: rotate(90deg); text-align: center; line-height: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* Independent attendance review board */
.attendance-review-board { margin-bottom: 24px; min-width: 0; }
.attendance-review-board .attendance-correction-card { min-width: 0; overflow-wrap: anywhere; }
.attendance-review-history { margin-top: 16px; }
.attendance-review-history summary { cursor: pointer; padding: 12px 0; font-weight: 700; }
.attendance-late-reason-cell .btn { display: block; margin-top: 8px; }
@media (max-width: 600px) { .attendance-review-board .section-title, .attendance-review-board .panel-head { align-items: flex-start; flex-wrap: wrap; gap: 10px; } .attendance-review-board .attendance-correction-actions .btn { min-height: 44px; } }

/* TEST: compact navigation with persistent environment and role context. */
.test-workspace { padding-top:48px; --paper:#f5f3ed; --surface:#fffefa; }
.test-environment-banner { position:fixed; z-index:180; inset:0 0 auto; min-height:48px; display:flex; align-items:center; gap:18px; padding:6px 24px; color:#fff; background:#345348; font-size:13px; line-height:1.4; }
.test-environment-banner strong { font-size:12px; letter-spacing:.08em; white-space:nowrap; }
.test-environment-banner label { margin-left:auto; display:flex; align-items:center; gap:8px; font-size:12px; }
.test-environment-banner select { width:auto; min-height:32px; padding:4px 26px 4px 8px; border:1px solid #91a49b; border-radius:6px; background:#fffefa; color:#243d32; font-size:13px; }
.test-workspace .sidebar { top:48px; height:calc(100dvh - 48px); }
.test-workspace .shell { min-height:calc(100dvh - 48px); }
.nav-group { border-top:1px solid #ffffff22; margin-top:12px; padding-top:8px; }
.nav-group summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; min-height:44px; align-items:center; padding:10px 14px; font-size:15px; font-weight:650; }
.nav-group summary::after { content:'+'; font-size:19px; font-weight:400; }
.nav-group[open] summary::after { content:'−'; }
.nav-group summary:focus-visible { outline:2px solid #fff; outline-offset:-2px; }
.nav-group > div { display:grid; gap:3px; padding-left:6px; }
.test-entry { width:min(680px,calc(100% - 48px)); margin:clamp(60px,15vh,160px) auto; }
.test-entry h1 { font-size:clamp(30px,4vw,52px); line-height:1.25; letter-spacing:-.045em; margin:28px 0; }
.test-entry > p:not(.eyebrow) { font-size:16px; line-height:1.8; color:var(--muted); }
.test-entry .btn { margin-top:26px; min-height:52px; padding:12px 24px; }
@media(max-width:760px) {
  .test-environment-banner { padding:6px 12px; gap:8px; }
  .test-environment-banner > span { display:none; }
  .test-environment-banner label { gap:6px; }
  .test-workspace .mobile-appbar { top:48px; }
  .test-workspace .sidebar { top:48px; height:calc(100dvh - 48px); }
}
/* Configuration editors keep job titles independent from actual authority. */
.org-editor,.permission-editor{border:1px solid var(--line,#dedbd4);border-radius:16px;padding:16px;background:#fff}
.org-editor summary,.permission-editor summary{font-weight:750;cursor:pointer;padding:4px 0 12px}
.org-checks{display:flex;gap:10px 20px;flex-wrap:wrap;padding:12px 0}
.org-checks label{display:flex;gap:6px;align-items:center}
.permission-editor>p,.permission-preview{font-size:12px;color:#596258;line-height:1.65}
.permission-preview{padding:12px;background:#eff5ec;border-radius:10px;margin-bottom:12px}
.permission-editor fieldset{border:0;margin:12px 0;padding:0;min-width:0}
.permission-editor legend{font-size:13px;font-weight:800;padding:8px 0}
.permission-row{display:flex;align-items:center;gap:12px;justify-content:space-between;border-top:1px solid #eeeae2;padding:12px 0}
.permission-row>label{display:flex;align-items:flex-start;gap:10px;flex:1;min-width:0}
.permission-row input{margin-top:3px;accent-color:#385941;flex-shrink:0}
.permission-row small{display:block;line-height:1.6;color:#687065;margin-top:4px;font-size:12px;font-weight:400}
.permission-row>div{display:flex;align-items:center;gap:6px;flex-shrink:0;font-size:11px;color:#60705a}
.permission-row [data-effect-label]{max-width:75px}
@media(max-width:600px){.permission-row{align-items:flex-start;flex-wrap:wrap}.permission-row>div{padding-left:24px;width:100%}.permission-editor,.org-editor{padding:12px}}

/* Keep checkboxes compact under the shared form input rules. */
.org-checks label{flex:0 0 auto;white-space:nowrap;font-size:13px;line-height:1.4;width:auto;min-width:0}
.org-checks input,.org-editor .checkbox input,.permission-row input{width:18px!important;min-width:18px!important;max-width:18px;height:18px!important;padding:0;flex:0 0 18px}
.org-editor .checkbox{display:flex;flex-direction:row;align-items:center;gap:8px}
body:has(dialog[open]){overflow:hidden}
.management-profit{background:#fff;border:1px solid #d9dfdc;border-radius:20px;padding:28px;margin-bottom:24px}
.profit-toolbar,.profit-period-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.profit-toolbar h2{font-size:24px;margin:0}.profit-mode{display:flex;border:1px solid #cbd4cf;border-radius:9px;padding:3px}
.profit-mode button{border:0;background:transparent;padding:8px 15px;border-radius:6px;font-size:14px;cursor:pointer}.profit-mode button[aria-pressed=true]{background:#253e34;color:white}
.profit-result{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%;border:0;border-bottom:1px solid #d9dfdc;background:transparent;padding:28px 0;text-align:left;cursor:pointer;color:#203e33}
.profit-result strong{font-size:clamp(28px,4vw,42px);font-weight:700;overflow-wrap:anywhere}.profit-result span{font-size:15px}
.profit-components,.profit-months{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;padding-top:24px}
.profit-components article,.profit-months article{display:flex;flex-direction:column;gap:8px;min-width:0}.profit-components span,.profit-months span{font-size:14px;color:#51625a}.profit-components strong,.profit-months strong{font-size:20px;overflow-wrap:anywhere}
.profit-months{border-top:1px dashed #d9dfdc;margin-top:24px}.profit-basis{color:#626d66;font-size:14px;line-height:1.6;margin:24px 0 0}
.profit-signals{display:flex;gap:12px 24px;flex-wrap:wrap;font-size:14px;margin-top:20px}.profit-signals b{margin-left:6px}
.profit-explanation{padding-left:22px;line-height:1.7;font-size:16px}.profit-explanation li+li{margin-top:12px}
.profit-contribution{display:flex;align-items:center;justify-content:space-between;gap:20px;border-bottom:1px solid #d9dfdc;padding:20px 0}.profit-contribution>div{display:flex;flex-direction:column;gap:7px;min-width:0}.profit-contribution h3,.profit-contribution p{margin:0}.profit-contribution strong{font-size:22px;overflow-wrap:anywhere}.profit-contribution span,.profit-contribution p{font-size:14px}.profit-contribution small{font-size:13px;color:#63736a}.profit-contribution .btn{align-self:flex-start}
.project-management-entry{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-wrap:wrap;padding:20px;background:#edf3ef;border:1px solid #d9dfdc;border-radius:14px;margin:16px 0}.project-management-entry>div{display:flex;flex-direction:column;gap:6px;min-width:0}.project-management-entry strong{font-size:18px}.project-management-entry span{font-size:14px}.management-feedback{padding:24px 0;border-bottom:1px solid #d9dfdc}.management-feedback p{font-size:16px;line-height:1.7;overflow-wrap:anywhere}.management-feedback small{display:block;color:#5f6e65;font-size:13px}.management-feedback details{margin:16px 0;font-size:14px}.management-feedback blockquote{margin:16px 0;padding:16px;border-left:3px solid #7c9784;background:#f2f5f3}.preserve-lines{white-space:pre-wrap}
.management-shortcuts{display:flex;justify-content:flex-end;gap:12px;margin-bottom:16px}.cash-weeks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:24px}.cash-week{padding:20px;border:1px solid #d5ded7;border-radius:14px;min-width:0}.cash-week>span{font-size:14px;color:#5e6c63}.cash-week>strong{display:block;font-size:22px;margin:14px 0;overflow-wrap:anywhere}.cash-week>p{font-size:14px;line-height:1.8}.cash-week details{font-size:14px}.cash-evidence{display:flex;flex-direction:column;gap:4px;padding:14px 0;border-bottom:1px solid #e0e5e1;font-size:14px;overflow-wrap:anywhere}.cash-evidence span{color:#5a6e61}.cash-followup{margin-top:24px;font-size:14px}.cash-followup summary{cursor:pointer;font-weight:600}.cash-followup p{line-height:1.6}@media(max-width:600px){.cash-weeks{grid-template-columns:1fr}.cash-week{padding:16px}.management-shortcuts{justify-content:flex-start;flex-wrap:wrap}}
@media(max-width:600px){.management-profit{padding:20px 16px}.profit-period-actions{gap:8px}.profit-components,.profit-months{gap:12px;grid-template-columns:1fr}.profit-components article,.profit-months article{flex-direction:row;align-items:center;justify-content:space-between}.profit-components strong,.profit-months strong{font-size:18px}.profit-contribution{align-items:flex-start;flex-direction:column}.profit-contribution>div{width:100%}.profit-mode button{min-height:40px}}
/* Task-first home and compact settlement status. */
.role-home-head{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:24px;padding:8px 0 20px;border-bottom:1px solid var(--line,#ddd)}
.role-home-head h2{margin:6px 0 0;font-size:28px;letter-spacing:-.04em}.role-home-head>div>span{font-size:14px;color:var(--muted,#626762)}
.role-home-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;max-width:58%}
.home-metrics,.home-notice{margin:20px 0}.home-metrics>summary,.home-notice>summary{font-size:16px;font-weight:700;cursor:pointer;padding:14px 0}.home-notice .hero-strip{margin-top:4px}
.settlement-counts{display:flex;gap:12px;flex-wrap:wrap;margin:22px 0}.settlement-count{display:flex;align-items:center;gap:8px;padding:12px;background:#f0f2f2;border-radius:10px;font-size:14px}.settlement-count b{font-size:23px}
.permission-row.settlement-permission{flex-wrap:wrap}
.settlement-baseline{display:block;min-width:0;margin:7px 0 14px;padding:14px;border:1px solid #b6d6c7;border-left:4px solid #487d63;border-radius:10px;background:#edf5f1;color:#274c41;box-sizing:border-box}
.settlement-baseline p{margin:6px 0 0;font-size:13px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
.settlement-scope-note{padding:16px;border:1px solid #c9dcd3;border-radius:12px;background:#f0f6f3}
.settlement-scope-note p{margin:8px 0 0;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
.settlement-scope-warning{font-weight:600!important;color:#71501e!important;line-height:1.7}
.settlement-row{display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #dce0df;padding:20px 0}.settlement-row h3{font-size:17px;margin:10px 0}.settlement-row p{margin:8px 0;font-size:16px}.settlement-row small{font-size:14px;color:#656c69}.settlement-status{border-radius:6px;padding:5px 8px;background:#edf1ef;font-size:14px;font-weight:700}.settlement-status.needs_work,.settlement-status.carry_check{background:#f9e7db;color:#793614}.settlement-status.paid{color:#41694b}
@media(max-width:650px){.role-home-head{align-items:stretch;flex-direction:column;gap:14px}.role-home-head h2{font-size:25px}.role-home-actions{justify-content:flex-start;max-width:none}.role-home-actions .btn{min-height:42px}.settlement-row{align-items:stretch;flex-direction:column}.settlement-row>.btn{align-self:flex-start}.settlement-counts{gap:6px}.settlement-count{padding:8px;font-size:14px}}
.calendar-mode-tabs{display:flex;gap:8px;margin-bottom:20px}.unified-calendar{border:1px solid #dce0df;border-radius:16px;background:#fff;padding:24px}.unified-filters{display:flex;gap:8px;flex-wrap:wrap;padding:16px 0;border-bottom:1px solid #dce0df}.unified-day{display:grid;grid-template-columns:160px minmax(0,1fr);gap:20px;border-bottom:1px solid #e4e7e5;padding:18px 0}.unified-day>h3{font-size:16px;margin:10px 0;line-height:1.5}.unified-event{display:grid;grid-template-columns:155px minmax(0,1fr) 20px;gap:18px;align-items:center;text-align:left;width:100%;border:0;border-left:3px solid #367e78;background:#f5f8f7;border-radius:6px;margin:6px 0;padding:16px;cursor:pointer;color:#202b27}.unified-event.work{border-left-color:#b7773c}.unified-event.done{opacity:.7}.unified-event strong,.unified-event small{display:block;overflow-wrap:anywhere}.unified-event strong{font-size:17px;margin:5px 0}.unified-event small,.unified-time,.unified-source{font-size:14px;line-height:1.5}.unified-source{color:#576963}.unified-event:hover{background:#edf3f0}.calendar-export{margin-top:22px}.calendar-export summary{font-size:14px;cursor:pointer}.calendar-export p{font-size:14px;color:#58655f}
@media(max-width:650px){.unified-calendar{padding:14px}.unified-day{display:block;padding:12px 0}.unified-day>h3{margin:4px 0 12px}.unified-event{grid-template-columns:minmax(0,1fr) 18px;gap:8px;padding:12px}.unified-event .unified-time{grid-column:1/-1}.unified-event>div{grid-column:1}.unified-calendar .calendar-toolbar{gap:12px}.unified-calendar .calendar-actions{flex-wrap:wrap}.calendar-mode-tabs .btn{font-size:15px}}

/* Clear hierarchy and readable actions across the redesigned workspace. */
.btn.small{font-size:14px;line-height:1.35;min-height:40px;padding:9px 12px}
.btn.secondary,.btn.ghost{background:#fff;color:var(--ink);border-color:#c6cdca;box-shadow:none}.btn.secondary:hover,.btn.ghost:hover{background:#eef2f0}.btn.primary{background:var(--ink);color:#fff}
.role-home-actions .btn,.profit-period-actions .btn{font-size:14px}.test-scenario-button{border:1px solid #9db9ac;border-radius:7px;background:transparent;color:#fff;padding:7px 9px;cursor:pointer;font-size:14px;white-space:nowrap}.test-environment-banner{flex-wrap:wrap;gap:10px}
.unified-calendar .calendar-toolbar h2{font-size:24px}.unified-calendar .calendar-toolbar p{font-size:16px}.calendar-mode-tabs .btn.secondary{background:#fff;color:var(--ink)}
@media(max-width:650px){.btn.small{min-height:44px}.test-environment-banner{padding:8px 12px}.test-scenario-button{font-size:12px;padding:5px 7px}.unified-calendar .calendar-toolbar h2{font-size:21px}}

.test-workspace{padding-top:var(--test-banner-height,48px)}.test-workspace .sidebar{top:var(--test-banner-height,48px);height:calc(100dvh - var(--test-banner-height,48px))}.test-workspace .shell{min-height:calc(100dvh - var(--test-banner-height,48px))}.test-workspace .mobile-appbar{top:var(--test-banner-height,48px)}.unified-time{word-break:keep-all}
/* Project workspace: each tab keeps one type of work in view. */
.project-section-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:8px 0 18px;border-bottom:1px solid var(--line,#d7dedc);margin-bottom:24px}
.project-section-tabs button{font:inherit;font-size:16px;border:1px solid transparent;border-radius:10px;padding:12px 20px;background:transparent;color:var(--ink,#1b2825);cursor:pointer;min-height:44px}
.project-section-tabs button.active{background:#19392f;color:#fff;border-color:#19392f}
.project-section-tabs button:focus-visible{outline:3px solid #bd7445;outline-offset:2px}
.project-section-content{display:grid;gap:24px;min-width:0}
.records-panel{padding:28px;min-width:0}
.record-panel-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:22px;flex-wrap:wrap}
.record-panel-head:not(:first-child){margin-top:34px;padding-top:28px;border-top:1px solid #dce3df}
.record-panel-head h2{font-size:22px;margin:0 0 8px}.record-panel-head p{font-size:16px;line-height:1.6;color:#52645a;margin:0;max-width:60ch}
.document-record,.material-record{border:1px solid #dce3df;border-radius:12px;padding:20px;margin-bottom:12px;background:white;min-width:0;overflow-wrap:anywhere}
.document-record.confirmed{border-left:4px solid #27654b}.document-record.superseded{background:#f3f5f4}
.record-title h3,.material-record h3{font-size:18px;line-height:1.45;margin:5px 0 7px}
.document-record p,.material-record p,.as-record-grid p{font-size:16px;line-height:1.6;margin:5px 0 12px}
.document-record small,.material-record small,.record-badge{font-size:14px;line-height:1.6;color:#4f6159}
.record-actions{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.document-record details{font-size:14px;line-height:1.7}.document-record details summary{cursor:pointer;padding:8px 0}.document-record details li{padding:3px 0}
.material-record{display:flex;align-items:center;justify-content:space-between;gap:18px}.material-record>div{min-width:0}.material-record>button{flex-shrink:0}
.record-people{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px}.record-person{display:flex;align-items:center;gap:10px;border:1px solid #dce3df;border-radius:8px;min-height:48px;padding:10px;font-size:16px}.record-person input{width:20px;height:20px;flex-shrink:0}
.as-record-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.as-record-grid article{padding:22px;border:1px solid #dce3df;border-radius:12px;background:white;overflow-wrap:anywhere}.as-record-grid h3{font-size:18px;margin:0 0 12px}
@media(max-width:640px){.project-section-tabs{gap:3px;margin-bottom:12px}.project-section-tabs button{font-size:14px;padding:10px 12px;flex:1 0 auto}.records-panel{padding:16px}.document-record,.material-record{padding:16px}.material-record{align-items:flex-start;flex-direction:column;gap:8px}.as-record-grid{grid-template-columns:1fr}.record-panel-head h2{font-size:20px}.record-actions .btn{flex:1 0 auto}}
.personal-work-inbox{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin:20px 0 28px}.personal-work-column{padding:24px;border:1px solid #dce3df;border-radius:18px;background:white;min-width:0}.personal-work-column .record-panel-head{margin-bottom:12px;align-items:center}.personal-work-column h2{font-size:20px;margin:0}.personal-action{display:flex;flex-direction:column;gap:5px;width:100%;text-align:left;border:0;border-top:1px solid #e7ece9;background:white;padding:16px 0;color:#21382d;cursor:pointer}.personal-action strong{font-size:16px;line-height:1.5;overflow-wrap:anywhere}.personal-action small,.personal-action span{font-size:14px;line-height:1.5;color:#576960}.personal-action.overdue small{color:#a0362c}.personal-empty{font-size:16px;line-height:1.7;color:#61736a;margin:24px 0}.personal-action:focus-visible{outline:2px solid #28654b;outline-offset:3px}
.project-hub-head{padding:24px 28px}.project-hub-head h2{font-size:30px}.project-hub-progress{width:92px;height:92px}.project-hub-progress b{font-size:28px}
@media(max-width:760px){.personal-work-inbox{grid-template-columns:1fr;gap:12px}.personal-work-column{padding:18px}.project-hub-head{padding:20px}.project-hub-head h2{font-size:25px}.project-hub-progress{width:70px;height:70px;flex-shrink:0}.project-hub-progress b{font-size:22px}}
.google-connection-card {display:grid;gap:12px;padding:20px;border:1px solid var(--line,#d8dbd2);border-radius:16px;background:#f5f6f1;min-width:0}
.google-connection-card>strong {font-size:19px;overflow-wrap:anywhere}
.google-connection-card .status {justify-self:start}
.google-calendar-actions {display:flex;flex-wrap:wrap;gap:8px}
.google-team,.google-connection-details {margin-top:20px;border-top:1px solid #d8dbd2;padding-top:18px}
.google-team summary,.google-connection-details summary {font-weight:750;cursor:pointer}
.google-team-row {display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;border-bottom:1px solid #e5e7df}
.google-team-row>div {display:grid;gap:6px;min-width:0}
.google-team-row small {color:#61665e}
.google-preference-options {display:grid;gap:10px;margin:14px 0}
.google-calendar-center p {line-height:1.7}
@media(max-width:600px){.google-team-row{align-items:flex-start;flex-wrap:wrap}.google-calendar-actions>.btn{flex:1 1 145px;min-height:44px}.google-connection-card{padding:16px}.google-preference-options .duty-option{grid-template-columns:20px minmax(0,1fr)}}

/* Work evidence and automation status share a compact responsive layout. */
[data-project-duplicate-candidates]:empty { display:none; }
.automation-status-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr)); gap:16px; margin-top:20px; }
.automation-status-card { min-width:0; padding:22px; border:1px solid var(--line,#dedbd3); border-radius:18px; background:var(--paper,#fffefa); }
.automation-status-card.needs-attention { border-color:#b9674b; }
.automation-status-card h2 { font-size:17px; margin:0; }
.automation-status-card p,.automation-status-card details { font-size:13px; line-height:1.65; overflow-wrap:anywhere; }
.automation-status-card details { margin-top:14px; }
.automation-status-counts { display:flex; flex-wrap:wrap; gap:8px 14px; margin-top:14px; font-size:13px; }
.finance-evidence-section { padding:16px 0; border-bottom:1px solid var(--line,#dedbd3); }
.finance-evidence-section summary { font-weight:700; cursor:pointer; }
.finance-evidence-section .profit-period-actions { margin-top:14px; flex-wrap:wrap; }
.finance-evidence-comparison { display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px; margin:12px 0; font-size:13px; }
.finance-evidence-list { display:grid; gap:12px; }
.finance-evidence-list article { min-width:0; border:1px solid var(--line,#dedbd3); border-radius:12px; padding:12px; }
.finance-evidence-list article>span,.finance-evidence-list article>small { display:block; font-size:12px; margin:6px 0; }
.finance-evidence-list .finance-calendar-event { width:100%; max-width:100%; padding:12px; font-size:14px; line-height:1.5; white-space:normal; }
.finance-evidence-list .finance-calendar-event span,.finance-evidence-list .finance-calendar-event b,.finance-evidence-list .finance-calendar-event small { font-size:inherit; white-space:normal; overflow-wrap:anywhere; }
.workspace-search>label { display:block; font-weight:700; margin-bottom:12px; }
.workspace-search>.searchbox { width:100%; max-width:none; }
.workspace-personal-lists { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; margin-top:24px; }
.workspace-personal-lists h2,[data-workspace-results] h2 { font-size:18px; }
.workspace-personal-lists h2 small,[data-workspace-results] h2 small { font-size:12px; font-weight:400; }
.workspace-result { display:flex; align-items:center; gap:12px; padding:12px; margin:8px 0; border:1px solid var(--line,#dedbd3); border-radius:12px; background:var(--paper,#fffefa); }
.workspace-result-open { flex:1; min-width:0; text-align:left; color:inherit; border:0; background:none; cursor:pointer; padding:6px; }
.workspace-result-open strong,.workspace-result-open small,.workspace-result-open span { display:block; overflow-wrap:anywhere; }
.workspace-result-open strong { margin:5px 0; line-height:1.5; }
.workspace-result-open small,.workspace-result-open span { font-size:12px; }
.workspace-result>.btn { flex-shrink:0; }
.project-personal-actions { display:flex; justify-content:flex-end; padding:10px 0; }
@media(max-width:700px) { .workspace-personal-lists { grid-template-columns:1fr; gap:12px; } .workspace-result { gap:6px; padding:8px; } }
.project-entry-menu { padding:16px 18px; border:1px solid var(--line,#dedbd3); border-radius:14px; margin:16px 0; background:var(--paper,#fffefa); }
.project-entry-menu>summary { font-weight:700; cursor:pointer; line-height:1.5; }
.project-entry-menu .project-hub-actions { margin:18px 0 0; }
.project-card .money-strip { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px 12px; }
.project-card .money-strip>span { grid-column:1/-1; }
.project-card .money-strip>strong,.project-card .money-strip>em { white-space:nowrap; }
.company-comparison{margin:24px 0;padding:20px;border:1px solid var(--line,#ddd);border-radius:18px;background:#f5f4ee}
.company-comparison-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.company-comparison-grid article{min-width:0;background:#fff;border-radius:12px;padding:16px}
.company-comparison-grid h4{margin:0 0 12px}
.company-comparison-grid dl{margin:0;display:grid;gap:8px}
.company-comparison-grid dl div{display:flex;flex-wrap:wrap;justify-content:space-between;gap:6px 14px}
.company-comparison-grid dt{font-size:13px;color:#52635d}
.company-comparison-grid dd{margin:0;font-weight:700;overflow-wrap:anywhere}
@media(max-width:600px){.company-comparison{padding:14px}.company-comparison-grid{grid-template-columns:1fr}.company-comparison-grid article{padding:12px}}
.handover-list{display:grid;gap:10px;margin:16px 0}
.handover-item{display:flex;align-items:flex-start;gap:12px;border:1px solid #d3dbd6;border-radius:12px;padding:14px;background:#fff}
.handover-item input{width:20px;height:20px;margin-top:2px;flex-shrink:0}
.handover-item span{min-width:0;display:grid;gap:6px;overflow-wrap:anywhere}
.handover-item small{color:#53655e}
.handover-item:has(input:disabled){background:#f2f2ee;color:#68716c}
/* v301: grouped project actions and complete, visible permission controls. */
.project-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:24px 0}
.project-action-group{padding:18px;border:1px solid #cfddd5;border-radius:14px;background:#fafcf9;min-width:0}
.project-action-group h3{font-size:14px;color:#345b54;margin:0 0 12px}
.project-action-group>div{display:flex;flex-wrap:wrap;gap:9px}
.project-action-group .btn{white-space:normal;text-align:left;min-height:44px;justify-content:flex-start}
.project-action-group:last-child:has(.danger){background:#fffafa;border-color:#e5cece}
.permission-editor .permission-legend{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0;font-size:12px}
.permission-legend span{padding:5px 8px;border-radius:5px;background:#f1f3ef}
.permission-legend .granted{background:#e5f2e9;color:#285640}.permission-legend .added{background:#e9f0ff;color:#345c9d}.permission-legend .denied{background:#fff0ee;color:#9b403e}
.permission-editor .permission-category{margin:14px 0;border:1px solid #d8e1dc;border-radius:10px;padding:12px}
.permission-editor .permission-row{margin:7px 0;border:1px solid #d8e1dc;border-left:4px solid #d8e1dc;border-radius:8px;padding:12px;background:#fff}
.permission-editor .permission-row.permission-granted{background:#e9f4ed;border-left-color:#46795a}
.permission-editor .permission-row.permission-added{background:#ecf2ff;border-left-color:#4677b9}
.permission-editor .permission-row.permission-denied{background:#fff1ef;border-left-color:#bb5550}
.permission-editor .permission-row [data-effect-label]{max-width:none;font-weight:700;color:#345a50}
.permission-editor .permission-row.permission-denied [data-effect-label]{color:#983d39}
.permission-editor .permission-row.permission-added [data-effect-label]{color:#345b92}
.permission-editor .permission-row input[type=checkbox]{appearance:auto!important;display:inline-block!important;width:20px!important;height:20px!important;opacity:1!important;position:static!important;accent-color:#386858}
.access-duty-columns .duty-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.access-duty-columns .duty-option{padding:12px!important;min-height:0!important}
.access-duty-columns .duty-option small{font-size:12px;line-height:1.5}
.access-duty-columns .duty-option input[type=checkbox]{appearance:auto!important;opacity:1!important;position:static!important;display:inline-block!important}
@media(max-width:650px){.project-quick-actions{grid-template-columns:1fr;gap:10px}.project-action-group{padding:14px}.project-action-group>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.project-action-group .btn{width:100%;min-width:0;padding:11px;font-size:12px}.access-duty-columns .duty-options{grid-template-columns:1fr}.permission-editor .permission-row{padding:10px}.permission-editor .permission-row-tools{padding-left:28px}}

/* Project lifetime expense limit, v302. */
.project-expense-form{display:grid;gap:14px}.expense-basis{display:grid;gap:6px;padding:18px;border-radius:12px;background:var(--surface-2)}.expense-basis strong{font-size:24px}.expense-rate-control{display:flex;align-items:center;gap:12px;max-width:300px}.expense-rate-control input{width:160px;font-size:28px;font-weight:750;min-height:68px}.expense-rate-control>div{display:grid;gap:4px}.expense-rate-control button{min-width:52px;min-height:40px;border:1px solid var(--line);background:var(--surface);border-radius:7px;cursor:pointer}.expense-rate-control button:disabled{opacity:.5;cursor:default}.expense-limit-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:16px;background:#edf5ef;border-radius:12px}.expense-limit-totals>div{display:grid;gap:8px;min-width:0}.expense-limit-totals strong{font-size:19px;overflow-wrap:anywhere}.expense-limit-totals span,.expense-basis small{font-size:13px;color:var(--muted)}.expense-project-picker{display:grid;gap:10px}.project-expense-form p{margin:0;line-height:1.6}@media(max-width:640px){.expense-limit-totals{grid-template-columns:1fr}.expense-limit-totals>div{display:flex;justify-content:space-between;gap:10px}.expense-limit-totals strong{font-size:17px}}
.expense-tier-breakdown{border:1px solid var(--line);border-radius:10px;padding:10px;min-width:0}.expense-tier-row{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(42px,.45fr) minmax(0,1fr);gap:8px;padding:8px 4px;font-size:13px;border-bottom:1px solid var(--line);align-items:center}.expense-tier-row>:last-child{text-align:right;overflow-wrap:anywhere}.expense-tier-row.heading{font-weight:700;color:var(--muted)}.expense-tier-row.active{background:#edf5ef}.expense-tier-breakdown small{display:block;margin-top:10px;font-size:12px;line-height:1.5;color:var(--muted)}.expense-budget-equation{display:grid;gap:9px;padding:15px;border-radius:10px;background:var(--surface-2)}.expense-budget-equation>div{display:flex;gap:12px;justify-content:space-between}.expense-budget-equation strong{overflow-wrap:anywhere;text-align:right}.expense-budget-equation>div:last-child{border-top:1px solid var(--line);padding-top:10px;font-size:18px}.expense-adjustment{padding:14px;border:1px solid var(--line);border-radius:10px;min-width:0}.expense-adjustment summary{cursor:pointer;font-weight:700;line-height:1.5}.expense-adjustment .form-grid{margin-top:14px}.expense-adjustment small{display:block;color:var(--muted);line-height:1.5;margin-top:10px}.project-expense-form .expense-limit-totals{grid-template-columns:repeat(2,minmax(0,1fr))}@media(max-width:640px){.project-expense-form .expense-limit-totals{grid-template-columns:1fr}.expense-tier-row{font-size:12px;gap:5px}}
.permission-area{border:1px solid #cbd8d4;border-radius:12px;margin:12px 0;background:#fafcfb;overflow:hidden}.permission-area>summary{display:flex;justify-content:space-between;gap:12px;cursor:pointer;padding:18px 16px;background:#eaf1ee;font-size:16px}.permission-area>summary span{font-size:12px;color:#526b64}.permission-area>.permission-category{margin:10px;border:1px solid #d6dfdc}.permission-area .permission-category>summary{padding:14px;cursor:pointer}.permission-help{padding:14px 0;line-height:1.6}.permission-template-tools{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.permission-row .permission-location{font-weight:600;color:#37665b;margin-bottom:5px}.permission-row .permission-dependency{color:#875d28}.permission-editor .permission-row.permission-added{background:#e7f2ec;border-left-color:#4b7a62}.permission-row label>span{min-width:0;overflow-wrap:anywhere}.payment-pre-review-note{width:100%;padding:12px;background:#e7f2ec;border-radius:8px;overflow-wrap:anywhere}.payroll-toolbar{flex-wrap:wrap;gap:10px}.payroll-toolbar label{min-width:110px;max-width:100%}@media(max-width:480px){.permission-area>summary{padding:15px 12px;font-size:14px}.permission-area>.permission-category{margin:6px}.permission-row{padding:12px!important;flex-wrap:wrap}.permission-row-tools{margin-left:28px}.permission-template-tools .btn{width:100%}.payroll-toolbar label{flex:1 1 110px}.payroll-toolbar>.btn{flex:1 1 130px}}

.project-responsibilities-entry{grid-column:1/-1;flex:0 0 100%;width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:4px 0 16px;border-bottom:1px solid #cbded9;margin-bottom:4px}.project-responsibilities-entry>div{display:grid;gap:6px;min-width:0}.project-responsibilities-entry span{font-size:12px;color:#59716f;overflow-wrap:anywhere}.project-responsibilities-entry .btn{flex-shrink:0}@media(max-width:480px){.project-responsibilities-entry{align-items:flex-start}.project-responsibilities-entry .btn{padding:12px}}

/* Payment review keeps identity and linked proof visible on mobile. */
.payment-identity-panel,.payment-evidence-panel { padding:16px; margin:12px 0; border:1px solid var(--line); border-radius:12px; min-width:0; }
.payment-identity-panel { background:#edf5f1; }
.payment-identity-panel.missing { background:#fff5e8; }
.payment-identity-panel p,.payment-evidence-panel p { overflow-wrap:anywhere; }
.payment-identity-panel .detail-grid { margin:12px 0 0; }
.payment-identity-panel .detail-grid > * { min-width:0; overflow-wrap:anywhere; }
.payment-evidence-file { display:flex; gap:12px; padding:12px 0; color:inherit; text-decoration:none; border-bottom:1px solid var(--line); }
.payment-evidence-file img { width:88px; height:88px; object-fit:contain; background:white; border-radius:8px; flex-shrink:0; }
.payment-evidence-file span { min-width:0; display:grid; gap:5px; overflow-wrap:anywhere; }
.payment-evidence-file small { color:var(--muted); }
@media(max-width:600px) { .payment-identity-panel .detail-grid { grid-template-columns:1fr; } }

/* Actual receipt variance: preserve readable amounts and reasons on mobile. */
.receipt-variance{display:grid;gap:8px;padding:14px;border:1px solid #b6cdc5;border-radius:12px;background:#eef6f2;min-width:0;overflow-wrap:anywhere}
.receipt-variance span,.receipt-variance small{line-height:1.55}.receipt-variance strong{font-size:16px;color:#315f55}.receipt-variance-reason{white-space:pre-wrap;overflow-wrap:anywhere}

/* Receipt source cards: keep the action hint separate on narrow screens. */
.finance-metrics .metric-link { text-align: left; padding-bottom: 38px; }
.finance-metrics .metric-link:focus-visible { outline: 3px solid var(--brand, #38665e); outline-offset: 3px; }
.finance-summary-detail-row .finance-receipt-status { color: var(--ink); }
.finance-summary-detail-row strong, .finance-summary-detail-row small { word-break: keep-all; overflow-wrap: anywhere; }

.finance-metrics .metric-heading { word-break: keep-all; overflow-wrap: anywhere; }
.finance-metrics .finance-tone-label { white-space: nowrap; }
.finance-summary-detail-row strong { font-size: 14px; }
.finance-summary-detail-row small, .finance-summary-detail-row > time { font-size: 12px; }
.finance-summary-detail-row > b { font-size: 14px; }
.finance-summary-detail-row > span { font-size: 11px; }

/* Workspace layout: shared navigation and role home. Bundled into the existing CSS request. */
.os-workspace {
  --paper: #f4f5f7; --surface: #fff; --surface-2: #ebedf0;
  --ink: #20252d; --muted: #626a75; --line: #dfe3e8; --sage: #e9ecf0;
  --orange: #a6532b; --orange-pale: #f8e9df; --forest: #20252d;
  background: var(--paper); color: var(--ink);
}
.os-workspace .sidebar { padding: 22px 14px 14px; background: #fff; color: #39414b; border-right: 1px solid var(--line); }
.os-workspace .brand { padding: 0 10px 24px; background: #fff; }
.os-workspace .workspace-brand { display: flex; gap: 13px; text-align: left; }
.os-workspace .workspace-brand > span:last-child { font-size: 19px; font-weight: 850; letter-spacing: .055em; }
.os-workspace .workspace-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.os-workspace .sidebar-symbol { color: var(--ink); width: 29px; height: 31px; }
.os-workspace .attendance-quick { min-height: 62px; margin: 0 0 17px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #f4f5f7; box-shadow: none; transform: none; }
.os-workspace .attendance-quick-copy strong { font-size: 14px; }
.os-workspace .attendance-quick-copy small { font-size: 11px; white-space: normal; }
.os-workspace .attendance-quick > b { font-size: 11px; }
.os-workspace .nav { display: grid; gap: 0; padding-right: 4px; scrollbar-color: #c8cdd4 transparent; }
.os-workspace .nav-shortcuts { display: grid; gap: 4px; padding-bottom: 6px; }
.os-workspace .nav button { position: relative; width: 100%; min-height: 44px; padding: 10px 12px; gap: 12px; border-radius: 8px; font-size: 15px; font-weight: 550; color: #4c5561; }
.os-workspace .nav button > span { min-width: 0; overflow-wrap: anywhere; }
.os-workspace .nav button:hover { background: #eef0f3; color: var(--ink); }
.os-workspace .nav button.active { background: #252c36; color: #fff; font-weight: 750; }
.os-workspace .nav button.active::after { content: ''; margin-left: auto; width: 5px; height: 5px; border-radius: 50%; background: #e9ac86; flex: none; }
.workspace-icon { width: 20px; height: 20px; flex: 0 0 20px; }
.os-workspace .nav-group { margin: 8px 0 0; padding: 8px 0 0; border-top: 1px solid #e8ebef; }
.os-workspace .nav-group summary { min-height: 38px; padding: 8px 12px; color: #69727e; font-size: 13px; font-weight: 750; letter-spacing: .015em; }
.os-workspace .nav-group summary::-webkit-details-marker { display: none; }
.os-workspace .nav-group summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); margin-right: 4px; }
.os-workspace .nav-group[open] summary::after { transform: rotate(45deg); }
.os-workspace .nav-group > div { padding: 0; gap: 2px; }
.os-workspace .nav button:focus-visible, .os-workspace .nav-group summary:focus-visible, .os-workspace .brand-home:focus-visible { outline: 2px solid #a6532b; outline-offset: -2px; }
.os-workspace .sidebar-foot { margin-top: 12px; padding: 12px 2px 0; border-top: 1px solid var(--line); background: #fff; }
.os-workspace .user-mini { border: 0; padding: 6px 8px; background: transparent; }
.os-workspace .user-mini strong { font-size: 14px; }
.os-workspace .user-mini span { color: var(--muted); font-size: 12px; }
.os-workspace .avatar { border-radius: 10px; background: #f2e3d9; color: #854323; }
.os-workspace .sidebar-account-actions { gap: 4px; margin-top: 6px; }
.os-workspace .sidebar-account-actions button { min-height: 38px; padding: 8px; border-color: transparent; font-size: 12px; color: #626a75; }
.os-workspace .sidebar-account-actions button:hover, .os-workspace .sidebar-account-actions button.active { background: #ebedf0; color: var(--ink); }
.os-workspace .topbar { min-height: 62px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.workspace-location { margin: 0 0 7px; color: var(--muted); font-size: 13px; line-height: 1.4; }
.os-workspace .topbar h1 { font-size: 27px; font-weight: 750; letter-spacing: -.04em; }
.os-workspace .top-actions [data-view="profile"], .os-workspace .top-actions [data-action="logout"] { display: none; }
.os-workspace .btn { border-radius: 8px; }
.os-workspace .panel, .os-workspace .project-card, .os-workspace .records-panel { border-radius: 12px; box-shadow: none; background: #fff; }
.os-workspace .project-card { padding: 22px; border: 1px solid var(--line); border-top: 3px solid #8b95a3; }
.os-workspace .project-card.risk { border-top-color: var(--red); }
.os-workspace .project-card h2 { font-size: 22px; line-height: 1.4; }
.os-workspace .project-stage-section > header { padding: 12px 0; }
.os-workspace .project-stage-section > header h2 { font-size: 20px; }
.os-workspace .project-card .money-strip { background: #f4f5f7; border-radius: 8px; }
.os-workspace .project-hub-head { border-radius: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--orange); }
.os-workspace .role-home-head { margin: 0 0 20px; padding: 0; border: 0; align-items: flex-start; }
.os-workspace .role-home-head h2 { font-size: 30px; margin-top: 7px; }
.os-workspace .role-home-head > div > span { font-size: 13px; }
.os-workspace .role-home-actions { gap: 7px; max-width: 60%; }
.os-workspace .role-home-actions .btn { min-height: 40px; font-size: 13px; background: #fff; }
.os-workspace .role-home-actions .btn:first-child { background: #252c36; border-color: #252c36; color: #fff; }
.os-workspace .dashboard-primary-metrics { display: grid; grid-template-columns: repeat(auto-fit,minmax(155px,1fr)); gap: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 0 0 24px; background: #fff; }
.os-workspace .dashboard-primary-metrics .metric { min-height: 154px; padding: 19px 18px 30px; border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.os-workspace .dashboard-primary-metrics .metric:last-child { border-right: 0; }
.os-workspace .dashboard-primary-metrics .metric > span { font-size: 13px; }
.os-workspace .dashboard-primary-metrics .metric strong { margin: 10px 0 7px; font-size: clamp(23px,2.1vw,32px); letter-spacing: -.035em; }
.os-workspace .dashboard-primary-metrics .metric small { font-size: 12px; line-height: 1.5; }
.os-workspace .dashboard-primary-metrics .metric > i { display: none; }
.os-workspace .dashboard-primary-metrics .metric.danger, .os-workspace .dashboard-primary-metrics .metric.attention { background: #fff4ef; }
.os-workspace .dashboard-primary-metrics .metric.danger strong, .os-workspace .dashboard-primary-metrics .metric.attention strong { color: #a14031; }
.os-workspace .dashboard-primary-metrics .metric-link-arrow { font-size: 12px; bottom: 11px; right: 16px; }
.home-workbench { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,.46fr); grid-template-areas: 'daily priorities'; align-items: start; gap: 22px; }
.home-daily { grid-area: daily; display: grid; gap: 22px; min-width: 0; }
.home-priorities { grid-area: priorities; display: grid; gap: 18px; min-width: 0; }
.os-workspace .home-workbench .panel-head { padding: 20px 20px 16px; }
.os-workspace .home-workbench .panel-head h2 { font-size: 18px; }
.os-workspace .home-workbench .panel-head p { font-size: 13px; line-height: 1.5; }
.os-workspace .home-attention { border-top: 3px solid #b76a3f; }
.os-workspace .home-attention .panel-body { padding: 0 20px 18px; }
.os-workspace .home-attention .empty-state { padding: 18px 0; background: transparent; border: 0; min-height: 0; }
.os-workspace .home-workbench .empty-state strong { font-size: 15px; }
.os-workspace .home-workbench .empty-state span { font-size: 13px; line-height: 1.6; }
.os-workspace .home-workbench .attention-item { width: 100%; padding: 14px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; text-align: left; align-items: flex-start; }
.os-workspace .home-workbench .attention-item strong { font-size: 15px; }
.os-workspace .home-workbench .attention-item span { font-size: 13px; line-height: 1.5; }
.os-workspace .home-workbench .personal-work-inbox { grid-template-columns: minmax(0,1fr); gap: 18px; margin: 0; }
.os-workspace .home-workbench .personal-work-column { padding: 20px; border-radius: 12px; }
.os-workspace .home-workbench .record-panel-head { gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.os-workspace .home-workbench .record-panel-head h2 { font-size: 18px; }
.os-workspace .home-workbench .record-panel-head .btn { min-height: 36px; font-size: 12px; padding: 6px 9px; }
.os-workspace .home-workbench .personal-empty { font-size: 14px; line-height: 1.6; }
.os-workspace .home-workbench .personal-action { font-size: 15px; padding: 16px 0; }
.os-workspace .home-workbench .personal-action small, .os-workspace .home-workbench .personal-action > span { font-size: 13px; }
.os-workspace .home-workbench .dashboard-work-panel { border-radius: 12px; padding: 22px; gap: 18px; background: #fff; box-shadow: none; }
.os-workspace .home-workbench .dashboard-work-head h2 { font-size: 22px; }
.os-workspace .home-workbench .dashboard-work-head > div > span { font-size: 13px; line-height: 1.5; }
.os-workspace .home-workbench .dashboard-work-columns { grid-template-columns: minmax(0,1fr); gap: 14px; }
.os-workspace .home-workbench .dashboard-work-columns > article { border-radius: 8px; background: #fafbfc; }
.os-workspace .home-workbench .dashboard-work-section-head h3 { font-size: 16px; }
.os-workspace .home-workbench .dashboard-work-section-head p { font-size: 12px; }
.os-workspace .home-workbench .dashboard-person-chip { min-width: 104px; border-radius: 8px; background: #f4f5f7; }
.os-workspace .home-workbench .dashboard-person-chip.active { background: #252c36; }
.os-workspace .home-workbench .dashboard-person-chip strong { font-size: 14px; }
.os-workspace .home-workbench .dashboard-person-chip small { font-size: 12px; }
.os-workspace .home-workbench .dashboard-work-title-line > button { font-size: 15px; white-space: normal; }
.os-workspace .home-workbench .dashboard-work-copy > small, .os-workspace .home-workbench .dashboard-work-due { font-size: 12px; line-height: 1.5; }
.os-workspace .home-projects .panel-body { padding: 0 20px 18px; }
.os-workspace .home-projects .project-row { grid-template-columns: minmax(0,1fr) 68px 36px; gap: 12px; padding: 18px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
.os-workspace .home-projects .project-row strong { font-size: 15px; }
.os-workspace .home-projects .project-row span { font-size: 12px; line-height: 1.6; }
.os-workspace .home-projects .project-row em { grid-column: 1 / -1; text-align: right; font-size: 15px; }
.os-workspace .home-metrics, .os-workspace .home-notice { border-top: 1px solid var(--line); margin: 24px 0 0; }
@media (min-width: 761px) {
  .os-workspace.shell { grid-template-columns: 248px minmax(0,1fr); }
  .os-workspace .sidebar { position: sticky; width: auto; display: flex; flex-direction: column; overflow: hidden; }
  .os-workspace .main { padding: 24px clamp(20px,2.5vw,40px) 48px; }
}
@media (max-width: 1150px) {
  .home-workbench { grid-template-columns: minmax(0,1fr); grid-template-areas: 'priorities' 'daily'; }
  .home-priorities { grid-template-columns: minmax(0,1fr); }
  .os-workspace .home-workbench .personal-work-inbox { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .os-workspace .role-home-head { flex-direction: column; gap: 14px; }
  .os-workspace .role-home-actions { max-width: none; justify-content: flex-start; }
}
@media (max-width: 760px) {
  .os-workspace.shell { grid-template-columns: minmax(0,1fr); }
  .os-workspace .sidebar { padding: 16px 14px 20px; }
  .os-workspace .brand { min-height: 64px; padding: 6px 8px 16px; top: -16px; }
  .os-workspace .mobile-menu-close { background: #eff1f4; color: var(--ink); border-color: var(--line); }
  .os-workspace .nav { flex: none; overflow: visible; }
  .os-workspace .nav button { min-height: 48px; font-size: 16px; }
  .os-workspace .nav-group summary { min-height: 44px; font-size: 14px; }
  .os-workspace .main { padding: 18px 16px 32px; }
  .os-workspace .topbar { align-items: flex-start; gap: 12px; margin-bottom: 18px; padding-bottom: 16px; }
  .os-workspace .topbar h1 { font-size: 25px; }
  .os-workspace .role-home-head h2 { font-size: 25px; }
  .os-workspace .role-home-actions .btn { min-height: 44px; font-size: 13px; }
  .os-workspace .dashboard-primary-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 18px; }
  .os-workspace .dashboard-primary-metrics .metric { min-height: 145px; padding: 16px 14px 30px; border-bottom: 1px solid var(--line); }
  .os-workspace .dashboard-primary-metrics .metric strong { font-size: 25px; overflow-wrap: anywhere; }
  .os-workspace .dashboard-primary-metrics .metric:nth-child(2n) { border-right: 0; }
  .os-workspace .home-workbench .personal-work-inbox { grid-template-columns: minmax(0,1fr); }
  .os-workspace .home-workbench .dashboard-work-panel { padding: 16px; }
  .os-workspace .project-card { padding: 18px; }
  .os-workspace .home-projects .project-row { grid-template-columns: minmax(0,1fr) 44px; }
  .os-workspace .home-projects .project-row .progress { display: none; }
}
@media (prefers-reduced-motion: reduce) { .os-workspace *, .os-workspace *::before, .os-workspace *::after { scroll-behavior: auto; transition: none; animation: none; } }

/* Permission dialogs also live outside the workspace shell. */
.access-simple h3 { margin: 0 0 14px; font-size: 16px; }
.access-simple .permission-preview { background: #f0f5fa; padding: 16px; color: #34445a; }
.permission-preview p { margin: 0 0 10px; }
.permission-preview small { display: block; margin-top: 5px; }
.permission-menu-preview { display: flex; flex-wrap: wrap; gap: 6px; }
.permission-menu-preview span { background: white; padding: 5px 9px; border: 1px solid #dce5ee; border-radius: 6px; font-size: 12px; }
.permission-change-detail { margin-top: 12px; }
.permission-change-detail p { margin: 10px 0 0; overflow-wrap: anywhere; }
.permission-adjust > summary { padding: 12px 0; font-weight: 700; cursor: pointer; }
.permission-adjust > p, .org-editor > p, .rating-evaluation-evidence > p { color: #637082; font-size: 12px; line-height: 1.7; }
.permission-tools { display: grid; grid-template-columns: minmax(0,1fr) 160px; gap: 12px; margin: 16px 0; }
.permission-tools label { min-width: 0; font-size: 12px; color: #637082; }
.permission-tools input, .permission-tools select { display: block; width: 100%; min-width: 0; margin-top: 6px; }
.permission-category { border: 1px solid #dce2e9; border-radius: 10px; margin-top: 10px; overflow: hidden; }
.permission-category > summary { padding: 14px; cursor: pointer; background: #f8f9fb; font-size: 13px; }
.permission-category > summary span { float: right; color: #65758a; font-size: 12px; margin-left: 8px; }
.permission-category > div { padding: 0 14px; }
.access-simple .permission-row { align-items: flex-start; padding: 14px 0; }
.access-simple .permission-row:first-child { border-top: 0; }
.access-simple .permission-row strong { font-size: 13px; line-height: 1.6; }
.access-simple .permission-row [data-effect-label] { max-width: none; font-size: 11px; margin-top: 2px; }
.access-simple .permission-row-tools { align-items: flex-start; max-width: 48%; flex-wrap: wrap; justify-content: flex-end; }
.permission-help { min-width: 0; max-width: 100%; }
.permission-help summary { cursor: pointer; padding: 9px 5px; min-height: 36px; color: #425d7c; }
.permission-help p { max-width: 260px; font-size: 12px; line-height: 1.7; margin: 8px 0; overflow-wrap: anywhere; }
.permission-help .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.permission-help[open] { flex-basis: 100%; }
.access-simple [hidden] { display: none !important; }
.access-policy-note summary { font-weight: 600; cursor: pointer; }
.access-policy-note span { display: block; margin-top: 10px; }
.rating-evaluation-evidence { border: 1px solid #dce2e9; padding: 16px; border-radius: 12px; margin: 14px 0; }
.rating-evaluation-evidence summary { cursor: pointer; font-weight: 700; }
.rating-evaluation-evidence article { border-top: 1px solid #e5e9ee; padding: 14px 0; }
.rating-evaluation-evidence article > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; }
.rating-evaluation-evidence article span { color: #375e82; }
.rating-evaluation-evidence article small, .rating-evaluation-evidence article p { display: block; margin: 6px 0 0; line-height: 1.6; font-size: 12px; color: #637082; }
@media (max-width: 600px) {
  .permission-tools { grid-template-columns: minmax(0,1fr); }
  .access-simple .permission-row > label { flex-basis: 100%; }
  .access-simple .permission-row-tools { max-width: 100%; padding-left: 28px; justify-content: flex-start; gap: 12px; }
  .permission-help summary, .access-simple .permission-row-tools button { min-height: 44px; }
  .permission-help p { max-width: none; }
  .permission-category > summary { padding: 14px 10px; }
}

.document-slot{border-top:1px solid #ddd;padding:20px 0}.photo-phase-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.photo-phase-grid article{padding:12px;background:#f5f5f5;margin:10px 0;overflow-wrap:anywhere}.additional-item{margin:16px 0;border:1px solid #ddd;padding:16px;min-width:0}.document-slot h3{font-size:18px}@media(max-width:700px){.photo-phase-grid{grid-template-columns:1fr}.project-section-tabs{overflow:auto}.record-actions{flex-wrap:wrap}}

.permission-editor[hidden],.duty-field[hidden],[data-access-presets][hidden],[data-external-access-note][hidden]{display:none!important}

.card-finance-toolbar{display:flex;align-items:center;gap:1rem;flex-wrap:wrap;margin-bottom:1rem}.card-finance-toolbar span{font-size:.9rem}.card-accounts{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr));gap:1rem}.card-account{border:1px solid var(--line,#dce1e7);border-radius:12px;padding:1rem}.card-account small{font-size:.9rem}.card-purchase-list{max-height:45vh;overflow:auto}.card-purchase-row{display:flex;align-items:center;gap:.8rem;padding:1rem 0;border-bottom:1px solid #dce1e7}.card-purchase-row span{flex:1;min-width:0;overflow-wrap:anywhere}.card-purchase-row small{display:block;font-size:.875rem;margin-top:.3rem}.card-purchase-row b{white-space:nowrap}.card-management-modal .document-record{margin-top:1rem}.card-management-modal p{line-height:1.6}

/* Personal planning shares the calendar shell, with private content in its own surface. */
.personal-planner{display:grid;gap:22px;max-width:1480px;margin:0 auto;color:#172d36}
.planner-intro{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:26px 28px;background:#153f45;color:white;border-radius:20px}
.planner-intro h2{font-size:clamp(24px,2.8vw,34px);line-height:1.25;margin:10px 0}
.planner-intro p{font-size:16px;line-height:1.6;color:#e2efed;margin:0;max-width:580px}
.planner-private{display:inline-block;font-size:14px;background:#ffffff16;border:1px solid #ffffff40;border-radius:99px;padding:5px 12px}
.planner-toolbar{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end;max-width:440px}
.planner-toolbar .btn.secondary{background:#fff;color:#153f45;border-color:#fff}.planner-toolbar .btn.primary{background:#e8a547;color:#182d31;border-color:#e8a547}
.planner-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.planner-stats article{background:#fff;border:1px solid #dbe4e6;border-radius:16px;padding:18px 20px;min-width:0}
.planner-stats article>span{display:block;font-size:14px;color:#4c656e;margin-bottom:9px}
.planner-stats strong{font-size:30px;line-height:1.3}.planner-stats small{font-size:14px;font-weight:500;color:#526b71}
.planner-goal-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.planner-panel{background:#fff;border:1px solid #dbe4e6;border-radius:18px;padding:22px;min-width:0}
.planner-panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:18px}
.planner-panel-head h2{font-size:21px;margin:4px 0 0;line-height:1.35}
.planner-panel-head span{font-size:14px;color:#5d727a}
.planner-row{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;min-width:0}
.planner-goals{display:grid;gap:12px}
.planner-goal{padding:17px;border:1px solid #dce7e7;border-left:4px solid #317f80;border-radius:12px;background:#fbfdfd;min-width:0}
.planner-goal strong{font-size:17px;line-height:1.45;overflow-wrap:anywhere}.planner-goal p{font-size:15px;color:#4f646e;margin:12px 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.planner-goal small{display:block;font-size:14px;color:#526b71;line-height:1.5;overflow-wrap:anywhere}
.planner-goal.done{border-left-color:#88a396;background:#f4f8f5}.planner-goal.archived{border-left-color:#a9b6ba;background:#f5f6f7}
.planner-progress{display:flex;gap:12px;align-items:center;margin:12px 0}.planner-progress progress{flex:1;min-width:0;height:9px;accent-color:#277978}.planner-progress b{font-size:14px}
.planner-deadline{flex-shrink:0;white-space:nowrap;font-size:14px;font-weight:700;background:#eaf1f1;color:#245653;border-radius:8px;padding:5px 9px;line-height:1.4}
.planner-deadline.late{background:#fff0eb;color:#ab3d23}.planner-deadline.now{background:#fff1ce;color:#755108}
.planner-card-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:15px}.planner-card-actions>span{font-size:14px;color:#60747c}
.planner-main-columns{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(290px,1fr);gap:18px;align-items:start}
.planner-side{display:grid;gap:18px}
.planner-task-list{display:grid;gap:0}.planner-task{padding:19px 0;border-top:1px solid #e4eaec;min-width:0}.planner-task h3{font-size:17px;line-height:1.5;margin:0;overflow-wrap:anywhere}
.planner-task p{font-size:14px;color:#5c717a;line-height:1.6;margin:8px 0;overflow-wrap:anywhere}
.planner-next{background:#eef5f3;padding:11px 13px;font-size:15px;line-height:1.6;border-radius:8px;overflow-wrap:anywhere;white-space:pre-wrap}
.planner-next b{color:#28655e;margin-right:5px}.planner-hint{font-size:14px;color:#61767c}.planner-task .planner-note{white-space:pre-wrap}
.planner-dday-row{width:100%;display:flex;align-items:center;justify-content:space-between;gap:12px;text-align:left;padding:14px 0;border:0;border-top:1px solid #e3eaec;background:transparent;color:#17363e}
.planner-dday-row>span:first-child{font-size:16px;line-height:1.5;overflow-wrap:anywhere}.planner-dday-row small{display:block;font-size:14px;color:#61767c}
.planner-empty{padding:18px 6px;font-size:15px;color:#526c75;line-height:1.8}
.planner-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}.planner-days button{min-height:43px;border:1px solid #dce6e7;border-radius:8px;background:white;color:#27454b;font-size:15px;display:grid;place-content:center;position:relative}
.planner-days button.recorded{background:#e7f2ec;border-color:#b3d1c7}.planner-days button.selected{outline:2px solid #397b77;outline-offset:1px}.planner-days button:disabled{opacity:.45;cursor:default}.planner-days i{font-style:normal;line-height:5px;font-size:15px}
.planner-explanation{font-size:14px;color:#526a72;line-height:1.65;margin:10px 0 16px}
.planner-history .planner-review{border-top:1px solid #e1e8ea}.planner-review summary{display:flex;justify-content:space-between;gap:15px;align-items:center;padding:18px 0;cursor:pointer;font-size:16px}.planner-review summary span{font-size:14px;color:#57716d}
.planner-review>div{padding:0 0 20px;max-width:1000px}.planner-review h4{font-size:15px;margin:17px 0 7px;color:#1c5b54}.planner-review p{font-size:16px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin:0}.planner-review small{font-size:14px;color:#62777c;margin-left:12px}
.planner-pagination{display:flex;justify-content:center;align-items:center;gap:16px;border-top:1px solid #e4eaec;padding-top:16px;flex-wrap:wrap}.planner-pagination span{font-size:14px;color:#56717b}
.planner-carry{background:#fff5e9;border:1px solid #e8d3b4;border-radius:14px;padding:18px}.planner-carry>summary{font-size:16px;font-weight:700;cursor:pointer;color:#714e1e}.planner-carry .planner-goal-columns{margin-top:18px}
.personal-planner button:focus-visible{outline:3px solid #287a93;outline-offset:3px}
.calendar-mode-tabs{flex-wrap:wrap}
@media(max-width:1100px){.planner-intro{align-items:flex-start;flex-direction:column}.planner-toolbar{justify-content:flex-start;max-width:none}.planner-main-columns{grid-template-columns:minmax(0,1fr) minmax(270px,.8fr)}}
@media(max-width:800px){.planner-goal-columns,.planner-main-columns{grid-template-columns:minmax(0,1fr)}.planner-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.planner-side{grid-template-columns:repeat(2,minmax(0,1fr))}.planner-intro{padding:22px}.planner-panel{padding:18px}}
@media(max-width:560px){.personal-planner{gap:15px}.planner-side{grid-template-columns:minmax(0,1fr)}.planner-intro{border-radius:14px;padding:20px}.planner-stats article{padding:14px}.planner-stats strong{font-size:25px}.planner-row{gap:8px}.planner-panel-head{align-items:flex-start}.planner-review summary{align-items:flex-start;flex-direction:column;gap:6px}.planner-card-actions .btn{min-height:40px}.planner-goal{padding:14px}.planner-toolbar .btn{flex-grow:1}.planner-panel{padding:16px}.planner-review small{display:block;margin:10px 0 0}}

/* Unified additional contracts and missing execution budgets */
.additional-workflow{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;list-style:none;padding:0;margin:20px 0}
.additional-workflow li{padding:16px;border:1px solid var(--line,#ddd);border-radius:12px}
.additional-workflow b,.additional-workflow span{display:block}.additional-workflow span{font-size:13px;line-height:1.6;margin-top:8px}
.additional-seal-preview{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:20px 0}
.additional-seal-preview>div{border:1px solid #888;padding:20px;min-height:130px;display:flex;flex-direction:column;gap:20px}
.additional-seal-preview span{overflow-wrap:anywhere}
.budget-missing-alert{background:#fff1ef;border:2px solid #a72e27;border-left-width:8px;color:#78211b;border-radius:12px;padding:20px;margin:18px}
.budget-missing-alert>strong{display:block;font-size:19px;line-height:1.5}.budget-missing-alert p{line-height:1.65;font-size:14px;margin:8px 0 14px}
@media(max-width:640px){.additional-workflow,.additional-seal-preview{grid-template-columns:1fr}.budget-missing-alert{margin:12px;padding:14px}.budget-missing-alert .btn{width:100%}.record-panel-head{flex-wrap:wrap;gap:12px}}

.os-workspace .project-hub-head,.os-workspace .project-hub-head h2,.os-workspace .project-hub-head .hub-back,.os-workspace .project-hub-progress b{color:var(--ink)}
.os-workspace .project-hub-head .eyebrow,.os-workspace .project-hub-head span{color:var(--muted)}
.os-workspace .project-hub-progress{border-color:var(--line)}

/* Native monthly payroll statements */
.company-personal-tabs{margin:0 0 24px}
.payroll-allowance-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.payroll-allowance{min-width:0;margin:0;padding:12px;border:1px solid var(--line);border-radius:12px}.payroll-allowance legend{font-weight:700;padding:0 6px}.payroll-gross-summary{display:grid;gap:8px;padding:18px;margin-top:18px;background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow-wrap:anywhere}.payroll-gross-summary strong{font-size:18px}.payroll-gross-summary span,.payroll-gross-summary small{color:var(--muted);line-height:1.6}
.payroll-allowance-nontax{grid-column:1/-1}
@media(max-width:760px){.payroll-allowance-fields{grid-template-columns:minmax(0,1fr)}}
.payroll-check{justify-content:flex-start}.payroll-check input[type="checkbox"]{width:17px;min-width:17px;max-width:17px;height:17px;flex:0 0 17px;margin:0;padding:0}

.payroll-panel{color:var(--ink);min-width:0}.payroll-header,.payroll-toolbar,.payroll-actions,.payroll-detail-head,.payroll-basis{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.payroll-header h3{margin:0}.payroll-header p,.payroll-muted{color:var(--muted);line-height:1.6}.payroll-scope{display:flex;gap:8px;flex-wrap:wrap}.payroll-toolbar{justify-content:flex-start;margin:20px 0}.payroll-toolbar label{display:flex;align-items:center;gap:8px}.payroll-toolbar select{max-width:100%;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--paper);color:var(--ink)}
.payroll-months{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:12px}.payroll-month{border:1px solid var(--line);border-radius:14px;overflow:hidden;min-width:0;background:var(--paper)}.payroll-month.open{grid-column:1/-1}.payroll-month h4{margin:0}.payroll-month h4>button{width:100%;display:flex;align-items:center;gap:12px;text-align:left;padding:17px;background:transparent;border:0;color:var(--ink);cursor:pointer}.payroll-month h4 strong{font-size:18px}.payroll-month h4 span{flex:1;font-size:13px;color:var(--muted);font-weight:400}.payroll-month h4 i{font-size:22px;font-style:normal}.payroll-month-body{padding:0 16px 16px}.payroll-statement{border-top:1px solid var(--line)}.payroll-statement-open{width:100%;display:flex;justify-content:space-between;align-items:center;gap:16px;padding:16px 0;border:0;background:transparent;text-align:left;color:var(--ink);cursor:pointer}.payroll-statement-open>span:last-child{text-align:right;flex-shrink:0}.payroll-statement-open small{display:block;color:var(--muted);line-height:1.5}.payroll-statement-open strong,.payroll-net strong,.payroll-breakdown dd{font-variant-numeric:tabular-nums}.payroll-statement-open strong{line-height:1.5}
.payroll-detail{padding:8px 0 20px}.payroll-detail-head{font-size:13px;margin-bottom:10px}.payroll-detail-head span{color:var(--muted)}.payroll-net{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:22px;border-radius:12px;background:var(--surface);margin:12px 0 20px}.payroll-net strong{font-size:28px;overflow-wrap:anywhere}.payroll-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}.payroll-breakdown h4{font-size:15px;margin:0 0 8px}.payroll-breakdown dl{margin:0}.payroll-breakdown dl>div{display:flex;justify-content:space-between;gap:12px;padding:12px 0;border-bottom:1px solid var(--line)}.payroll-breakdown dt{min-width:0;overflow-wrap:anywhere}.payroll-breakdown dt small{display:block;color:var(--muted);font-size:12px;line-height:1.6;margin-top:5px;white-space:pre-wrap}.payroll-breakdown dd{margin:0;white-space:nowrap}.payroll-subtotal{font-weight:700}.payroll-basis{font-size:12px;color:var(--muted);margin:14px 0}.payroll-notes{white-space:pre-wrap;line-height:1.6;overflow-wrap:anywhere}.payroll-sources{font-size:12px;margin:12px 0}.payroll-sources a{display:inline-block;margin:8px 8px 0 0;overflow-wrap:anywhere}
.payroll-ack{display:grid;gap:10px;padding:18px;border:1px solid var(--line);border-radius:12px;margin:18px 0}.payroll-ack label{display:flex;gap:10px;align-items:flex-start;line-height:1.5}.payroll-ack input{flex:0 0 auto;margin-top:4px;width:17px;height:17px;accent-color:var(--ink)}.payroll-ack p,.payroll-ack small,.payroll-ack>span{margin:0;color:var(--muted);font-size:12px;line-height:1.6}.payroll-ack .btn{justify-self:start}.payroll-ack.done{background:var(--surface)}.payroll-draft,.payroll-history,.payroll-advanced{border:1px solid var(--line);padding:16px;border-radius:12px;margin:16px 0}.payroll-draft summary,.payroll-history summary,.payroll-advanced summary{font-weight:700;cursor:pointer}.payroll-history ol{padding:0;list-style:none}.payroll-history li{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:14px 0;border-top:1px solid var(--line)}.payroll-history small{display:block;color:var(--muted);line-height:1.6;margin-top:6px}.payroll-history p{font-size:13px;white-space:pre-wrap}.payroll-actions{justify-content:flex-end;margin-top:16px}
.payroll-editor{min-width:0}.payroll-editor section{margin:20px 0}.payroll-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.payroll-field{display:grid;gap:8px;font-size:13px;margin:10px 0;min-width:0}.payroll-field input,.payroll-field select,.payroll-field textarea{width:100%;box-sizing:border-box;min-width:0;border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:8px;padding:11px;font:inherit}.payroll-field textarea{min-height:80px;resize:vertical}.payroll-line{display:grid;grid-template-columns:minmax(90px,1fr) minmax(90px,.8fr) minmax(120px,1.3fr) auto auto;align-items:end;gap:10px;border-bottom:1px solid var(--line);padding:8px 0 14px}.payroll-check{display:flex;align-items:center;gap:7px;font-size:13px;min-height:40px}.payroll-insurances{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.payroll-insurance{border:1px solid var(--line);border-radius:10px;padding:12px;min-width:0}.payroll-insurance legend{font-weight:700}.payroll-insurance summary{font-size:12px;font-weight:400;line-height:1.5}.payroll-preview-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:22px 0 12px}.payroll-preview-actions span{font-size:12px;color:var(--muted)}
@media(max-width:760px){.payroll-header{align-items:flex-start}.payroll-months,.payroll-columns,.payroll-insurances{grid-template-columns:minmax(0,1fr)}.payroll-month.open{grid-column:auto}.payroll-toolbar{align-items:stretch}.payroll-toolbar label{flex:1}.payroll-toolbar select{min-width:0;width:100%}.payroll-columns{gap:20px}.payroll-net{padding:18px}.payroll-net strong{font-size:24px}.payroll-line{grid-template-columns:repeat(2,minmax(0,1fr))}.payroll-line>.payroll-field:nth-child(3){grid-column:1/-1}.payroll-line>.btn{justify-self:end}.payroll-statement-open{align-items:flex-start}.payroll-statement-open>span:first-child{min-width:0;overflow-wrap:anywhere}.payroll-statement-open>span:last-child{max-width:50%;flex-shrink:1}.payroll-statement-open strong{overflow-wrap:anywhere}.payroll-breakdown dd{font-size:13px}}
@media(max-width:420px){.payroll-form-grid{grid-template-columns:minmax(0,1fr)}.payroll-net{align-items:flex-start;flex-direction:column}.payroll-scope .btn{flex:1}.payroll-scope{width:100%}.payroll-month-body{padding:0 12px 12px}.payroll-ack{padding:14px}}
.payroll-retirement{margin-top:20px;padding:18px;border:1px solid #ccb799;border-radius:12px;background:#faf7f0;min-width:0;overflow-wrap:anywhere}
.payroll-loan{margin:20px 0;padding:18px;border:1px solid var(--line);border-radius:12px;background:var(--surface);min-width:0;overflow-wrap:anywhere}.payroll-loan h3,.payroll-loan h4{margin:0 0 12px}.payroll-loan-balance{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px 16px}.payroll-loan-balance strong{font-size:22px;font-variant-numeric:tabular-nums}.payroll-loan .payroll-field{max-width:420px}.payroll-loan p:last-child{margin-bottom:0}
.payroll-retirement h3,.payroll-retirement h4{margin:0 0 12px}
.payroll-retirement fieldset{border:0;padding:14px 0 0;margin:0;min-width:0}
.payroll-retirement [hidden]{display:none}
.payroll-retirement dl>div{display:flex;gap:16px;justify-content:space-between;padding:12px 0;border-bottom:1px solid #e6ddd0}
.payroll-retirement dt{min-width:0}.payroll-retirement dt small{display:block;font-weight:400;color:#68635c;margin-top:6px;line-height:1.6}
.payroll-retirement dd{margin:0;white-space:nowrap;font-weight:700}
@media(max-width:560px){.payroll-retirement{padding:14px}.payroll-retirement dl>div{display:block}.payroll-retirement dd{margin-top:8px}}

/* Representative employee preview: persistent, visible on desktop and mobile. */
.employee-preview-mode { padding-top:var(--employee-preview-height,100px); }
.employee-preview-bar { position:fixed; inset:0 0 auto; z-index:150; display:flex; align-items:center; gap:16px; padding:12px 24px; background:#fff3d6; color:#473916; border-bottom:1px solid #d7bd7d; box-shadow:0 3px 12px #0000000d; }
.employee-preview-bar > div { flex:1; min-width:0; display:grid; gap:4px; }
.employee-preview-bar strong { font-size:15px; }
.employee-preview-bar span { font-size:12px; line-height:1.5; }
.employee-preview-bar select { max-width:240px; min-height:42px; padding:8px 12px; background:#fffaf0; border:1px solid #cdbb92; border-radius:8px; color:inherit; }
.employee-preview-bar .btn { min-height:42px; flex-shrink:0; }
.employee-preview-mode .os-workspace .sidebar { top:var(--employee-preview-height,100px); height:calc(100dvh - var(--employee-preview-height,100px)); }
.employee-preview-mode .mobile-appbar { top:var(--employee-preview-height,100px); }
@media(max-width:760px) {
 .employee-preview-bar { flex-wrap:wrap; gap:8px; padding:10px 14px; }
 .employee-preview-bar > div { flex-basis:100%; }
 .employee-preview-bar label { flex:1; min-width:0; }
 .employee-preview-bar select { width:100%; max-width:none; }
 .employee-preview-bar .btn { font-size:12px; padding:8px 10px; }
 .employee-preview-mode .os-workspace .sidebar { height:auto; }
}
.payroll-panel .payroll-toolbar{align-items:flex-end}.payroll-panel .payroll-toolbar label{display:flex;flex-direction:column;align-items:stretch;gap:6px;min-width:110px;max-width:100%;flex:0 1 150px;white-space:nowrap}.payroll-panel .payroll-toolbar select{width:100%;min-width:0}.payroll-panel .payroll-toolbar>.btn{min-height:42px}@media(max-width:480px){.payroll-panel .payroll-toolbar label{flex:1 1 120px}.payroll-panel .payroll-toolbar>.btn{flex:1 1 130px}}
/* Bank reconciliation stays readable on narrow phones. */
.clobe-sync { width: min(1040px, 100%); }
.clobe-sync .modal-body { display:grid; gap:16px; }
.clobe-status { padding:16px; background:#edf5f1; border-radius:12px; }
.clobe-help,.clobe-resolution p { color:#596f75; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.clobe-controls { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.clobe-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(160px,.7fr); gap:16px; padding:18px 0; border-bottom:1px solid #d0dedd; overflow-wrap:anywhere; }
.clobe-row h3 { margin:8px 0; }.clobe-row p { margin:6px 0; }
.clobe-link-list { max-height:300px; overflow:auto; }.clobe-link { display:flex; gap:10px; justify-content:space-between; padding:10px 0; border-bottom:1px solid #d0dedd; }
.clobe-link span { flex:1; min-width:0; overflow-wrap:anywhere; }.clobe-link small { display:block; }.clobe-link input[type=checkbox] { width:auto; display:inline-block; }.clobe-link input[type=number] { width:130px; }
.clobe-resolution { display:grid; gap:14px; }.clobe-resolution [hidden] { display:none!important; }.clobe-resolution label { display:grid; gap:7px; }.clobe-resolution .clobe-link { display:flex; }
.clobe-match-filters{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:16px 0}.clobe-match-filters>label{min-width:0}.clobe-match-filters select,.clobe-match-filters input{width:100%;min-width:0}
.clobe-link-summary{padding:14px;background:#eaf3ef;border:1px solid #bad2c8;border-radius:10px;font-weight:700;line-height:1.8;overflow-wrap:anywhere}
.clobe-resolution .clobe-link-list{max-height:440px;margin:12px 0;padding-right:5px}.clobe-match-card{border:1px solid #cedcda;border-radius:10px;padding:14px;margin:10px 0;min-width:0;word-break:keep-all;overflow-wrap:anywhere}.clobe-match-card.selected{border-color:#47776c;background:#f0f7f4}.clobe-resolution .clobe-match-pick{display:flex;align-items:flex-start;gap:12px}.clobe-match-pick input[type=checkbox]{width:20px;height:20px;flex:0 0 20px;margin:3px 0}.clobe-match-pick span{min-width:0}.clobe-match-pick small{display:block;margin-top:5px;color:#526d64}.clobe-match-card p{margin:10px 0}.clobe-match-amount{display:flex;gap:6px 12px;flex-wrap:wrap;justify-content:space-between;line-height:1.7}.clobe-match-amount span{font-size:12px;color:#526d64}.clobe-match-input{margin-top:12px}.clobe-match-input input{max-width:100%;width:100%}.clobe-match-card>small{display:block;margin-top:6px;color:#526d64}
@media(max-width:600px){.clobe-match-filters{grid-template-columns:1fr}.clobe-match-card{padding:12px}.clobe-resolution .clobe-link-list{max-height:380px}.clobe-match-amount{flex-direction:column}}
.clobe-project-expense { padding:18px; border:1px solid #b9d0c6; border-left:4px solid #396961; border-radius:12px; background:#f3f8f5; min-width:0; }
.clobe-bank-fixed { margin:14px 0; padding:12px; border-radius:8px; background:#e1eee7; line-height:1.7; overflow-wrap:anywhere; }
.clobe-project-expense .form-grid>* { min-width:0; }.clobe-project-expense input[type=checkbox] { width:auto; justify-self:start; }
.clobe-project-expense label:has(input[type=checkbox]) { display:flex; align-items:center; gap:8px; margin:10px 0; }
.clobe-project-expense input[type=file] { width:100%; min-width:0; }.clobe-project-expense small { color:#596f75; line-height:1.6; }
@media(max-width:600px){.clobe-project-expense{padding:12px;}.clobe-project-expense .form-grid{grid-template-columns:minmax(0,1fr);}}
@media(max-width:600px){.clobe-row{grid-template-columns:1fr}.clobe-link{flex-wrap:wrap}.clobe-link input[type=number]{width:100%}.clobe-controls .btn{flex:1}.clobe-sync .form-grid{grid-template-columns:1fr}}

/* Card reconciliation: prevent global form styles stretching checkboxes. */
.card-purchase-row>input[type="checkbox"]{width:18px;height:18px;min-width:18px;flex:0 0 18px;margin:0}

.card-profit-choice{display:flex!important;align-items:center;gap:12px;padding:16px;margin:14px 0;border:1px solid #9bbdb0;border-radius:12px;background:#edf5f0;font-size:15px!important;font-weight:700;line-height:1.5;cursor:pointer}.card-profit-choice:has(input:checked){background:#dceee4;border-color:#376c59}.card-profit-choice>input[type="checkbox"]{width:20px;height:20px;flex:0 0 20px;margin:0}.card-profit-preview p{margin:8px 0}.card-profit-preview strong{display:block;margin-top:12px}

/* BESPACE OS 2.0: quiet pastel workspaces, strong semantic finance colors. */
:root,.os-workspace{--ink:#263d40;--charcoal:var(--ink);--muted:#586c70;--paper:#eff3f2;--ivory:var(--paper);--surface:#fcfdfb;--surface-2:#e6eeec;--line:#cfdbd8;--line-soft:#dce5e2;--forest:#315e59;--forest-2:#244c48;--sage:#dfebe3;--orange:#38675f;--orange-dark:#28544d;--orange-pale:#e2eee7;--blue:#535b84;--red:#983e49;--danger:var(--red);--v2-lilac:#ece9f5;--v2-peach:#f5e9df;--v2-good:#17675b;--v2-bad:#983e49;--v2-watch:#825d1b;--shadow:0 10px 30px #263d4009;--radius:18px;--radius-lg:22px}
body{background:var(--paper);color:var(--ink)}
.os-workspace .sidebar,.os-workspace .brand,.os-workspace .sidebar-foot{background:#e9f0ec}
.os-workspace .sidebar{border-right:1px solid #cbd9d2;padding-top:24px}
.os-workspace .workspace-brand small{font-size:14px;letter-spacing:0;color:#435f58}
.os-workspace .sidebar-symbol{color:#315e59}.os-version{display:inline-block;padding:3px 9px;border-radius:7px;background:#d2e2d8;color:#315e59;font-size:12px;font-weight:750;letter-spacing:0;margin-left:6px}
.os-workspace .nav{gap:4px}.os-workspace .nav button{border-radius:12px;min-height:46px;color:#3f5953;font-size:15px}
.os-workspace .nav button .workspace-icon{width:23px;height:23px;flex-basis:23px}
.os-workspace .nav button:hover{background:#dce8e1;color:#244b43}
.os-workspace .nav button.active{background:#d0e2d7;color:#224b40;box-shadow:inset 3px 0 #38675f}
.os-workspace .nav button.active::after{display:none}.os-workspace .nav-group{border-top-color:#cbd9d2}.os-workspace .nav-group summary{font-size:14px;color:#516b60}
.os-workspace .attendance-quick{background:#f8fbf8;border-color:#c8d8d0;border-radius:14px}
.os-workspace .attendance-quick-copy small,.os-workspace .sidebar-account-actions button,.os-workspace .user-mini span{font-size:14px}
.os-workspace .attendance-quick-mark{background:#d5e8dd;color:#315e59}.os-workspace .avatar{background:var(--v2-lilac);color:#57547b}
.os-workspace .main{max-width:1800px}.os-workspace .topbar{border:0;padding-bottom:0;margin-bottom:24px}.os-workspace .topbar h1{font-size:30px;letter-spacing:-.04em}
.os-workspace .workspace-location{font-size:14px}.workspace-title-icon{display:inline-flex;vertical-align:middle;margin-right:11px;padding:10px;border-radius:14px;background:#e1e8ee;color:#3d596b}.workspace-title-icon svg{width:24px;height:24px}
.os-workspace .btn,.action-dialog .btn{border-radius:11px;min-height:44px;font-size:14px;box-shadow:none;transform:none}
.os-workspace .btn.primary,.os-workspace .btn.orange,.action-dialog .btn.primary,.action-dialog .btn.orange{background:#38675f;border-color:#38675f;color:#fff}
.os-workspace .btn.secondary,.action-dialog .btn.secondary{background:#f9fbf8;color:#335e54;border:1px solid #c2d4cb}
.os-workspace .btn.danger,.action-dialog .btn.danger{background:#f6e6e8;border-color:#d5a3a9;color:#8c3440}
.os-workspace .btn:disabled,.action-dialog .btn:disabled{opacity:.55;cursor:not-allowed}
.os-workspace :is(.panel,.role-work-card,.task-board-column,.planner-panel,.company-document-card,.directory-card){background:var(--surface);border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow)}
.os-workspace :is(.panel-head,.planner-panel-head){padding-bottom:16px;border-bottom-color:#dde7e2}
.os-workspace :is(.project-hub-head,.company-document-hero,.directory-hero,.lead-workspace-hero,.work-calendar-hero){background:#e5eee8;border-color:#c9dad0;border-radius:22px;color:var(--ink);box-shadow:none}
.os-workspace .project-hub-head{border-left:0;border-top:4px solid #8aa998}
.os-workspace .metric{border-radius:17px;background:#fcfdfb;border:1px solid var(--line);padding:20px;box-shadow:none;overflow:hidden}
.os-workspace .metric>i{display:none}.metric-heading{display:flex!important;align-items:center;gap:10px;color:#425d59;font-size:14px;font-weight:650}
.metric-heading .workspace-icon{padding:7px;background:#e5eee8;border-radius:10px;width:34px;height:34px;flex-basis:34px}
.os-workspace .metric strong{font-variant-numeric:tabular-nums;letter-spacing:-.025em;color:var(--ink)}
.os-workspace .metric small{font-size:14px;line-height:1.5;color:var(--muted)}
.os-workspace .dashboard-primary-metrics{gap:14px}.os-workspace .dashboard-primary-metrics .metric:nth-child(2){background:#f2edf7}.os-workspace .dashboard-primary-metrics .metric:nth-child(3){background:#eef4ed}
.os-workspace .metric.attention,.os-workspace .dashboard-primary-metrics .metric.attention{background:#f5ecdc;border-color:#d6ba87}.os-workspace .metric.attention strong{color:var(--v2-watch)}
.os-workspace .metric.danger,.os-workspace .dashboard-primary-metrics .metric.danger{background:#f5e7e9;border-color:#d2a4ac}.os-workspace .metric.danger strong{color:var(--v2-bad)}
.v2-guide{display:flex;align-items:flex-start;gap:16px;margin:0 0 22px;padding:18px 21px;background:#e6ebf4;border:1px solid #cbd4e4;border-radius:16px}
.v2-guide>.workspace-icon{width:24px;height:24px;flex-basis:24px;margin-top:3px;color:#53617e}.v2-guide>div{flex:1;min-width:0}
.v2-guide strong{font-size:16px}.v2-guide p{font-size:14px;line-height:1.7;margin:5px 0 0;color:#455a6b}
.v2-guide details{margin-top:8px;font-size:14px;line-height:1.7}.v2-guide summary{cursor:pointer;font-weight:650;min-height:32px}
.v2-guide ol{padding-left:20px;margin:8px 0}.v2-guide li+li{margin-top:6px}
.v2-guide .guide-link{display:inline-flex;gap:6px;align-items:center;margin-top:10px;color:#334e77;font-weight:650;text-decoration:underline}
.os-workspace :is(.project-stage-guide i,.attendance-route-guide article>b){display:grid;place-items:center;background:#e1ebe4;color:#3d6556;border-radius:12px;font-style:normal;width:42px;height:42px;font-size:16px}
.os-workspace :is(.project-stage-guide,.attendance-route-guide){background:transparent;border:0;gap:12px}.os-workspace :is(.project-stage-guide article,.attendance-route-guide article){padding:18px;background:#fbfcfa;border:1px solid var(--line);border-radius:17px}
.os-workspace :is(.project-hub-tabs,.calendar-mode-tabs,.company-document-tabs){gap:8px;background:transparent;padding:4px 0;border:0}
.os-workspace :is(.project-hub-tab,.company-document-tab,.calendar-mode-tab){border-radius:13px;background:#fcfdfb;border:1px solid var(--line);color:var(--ink)}
.os-workspace :is(.project-hub-tab.active,.company-document-tab.active,.calendar-mode-tab.active){background:#e6e1f2;border-color:#c8bddf;color:#534574;box-shadow:none}
.v2-finance-key{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0;font-size:14px}.v2-finance-key span{display:flex;gap:7px;align-items:center;padding:8px 12px;border-radius:10px;background:#fdfefb;border:1px solid var(--line)}
.os-workspace .finance-metrics{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.os-workspace .finance-metrics .metric{min-height:155px;border-top:4px solid #8295aa}
.os-workspace .finance-metrics .metric[data-finance-tone="profit"]{background:#e2eee8;border-color:#b1cec0;border-top-color:#286d5b}
.os-workspace .finance-metrics .metric[data-finance-tone="loss"]{background:#f3e4e7;border-color:#d4acb3;border-top-color:#983e49}
.os-workspace .finance-metrics .metric[data-finance-tone="watch"]{background:#f5ecdc;border-color:#d7c08f;border-top-color:#825d1b}
.os-workspace .finance-metrics .metric[data-finance-tone="profit"] strong,.os-workspace .positive,.v2-finance-key .profit{color:var(--v2-good)}
.os-workspace .finance-metrics .metric[data-finance-tone="loss"] strong,.os-workspace .negative,.v2-finance-key .loss{color:var(--v2-bad)}
.os-workspace .finance-metrics .metric[data-finance-tone="watch"] strong,.v2-finance-key .watch{color:var(--v2-watch)}
.finance-tone-label{font-size:13px;font-weight:750;margin-left:auto}.os-workspace .finance-project-stack td:is(.negative,.positive){font-weight:750}
.os-workspace .finance-project-stack td.negative{background:#f7e9eb}.os-workspace .finance-project-stack td.positive{background:#eef5f0}
.os-workspace .finance-basis-note{background:#e8edf5;border-color:#c4cfe1;color:#3f5576;border-radius:14px}
.os-workspace .card-finance-toolbar{background:#e3eee9;border:1px solid #bad2c5;border-radius:15px;padding:17px}
.v2-planner-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 22px}.v2-planner-tabs button{display:flex;align-items:center;gap:9px;padding:12px 20px;min-height:46px;border:1px solid var(--line);border-radius:13px;background:var(--surface);color:var(--ink);font-size:16px}
.v2-planner-tabs button[aria-pressed="true"]{background:#e4ddf0;border-color:#bdb0d4;color:#4f426c;font-weight:750}
.personal-planner .planner-intro{background:#e8e5f0;border:1px solid #d7cfe2;border-radius:22px;padding:27px;align-items:center}.personal-planner .planner-intro h2{font-size:29px;letter-spacing:-.035em}.personal-planner .planner-intro p{font-size:16px;color:#625b73}
.personal-planner .planner-private{background:#faf8ff;border:1px solid #d7cfe2;color:#5a4d74;border-radius:8px;font-size:14px}.personal-planner .planner-goal{border-radius:14px;background:#fcfdfb;border-color:#d0dcd4}
.personal-planner .planner-goal.done{background:#e6f0e8}.personal-planner progress{accent-color:#668a77}.personal-planner .planner-task{background:#fbfcf8;border-radius:14px;border-color:#d9e1d8}
.personal-planner .planner-deadline{font-size:14px;background:#e2ece4;color:#395e4a}.personal-planner .planner-deadline.late{background:#f2dfe4;color:#8f3548}.personal-planner .planner-deadline.now{background:#f4e6cc;color:#76521a}
.v2-diary{display:grid;grid-template-columns:minmax(0,1fr) 280px;gap:24px;align-items:start}.v2-diary-main,.v2-diary-side{min-width:0}.v2-diary-side{display:grid;gap:18px}
.v2-diary-welcome{padding:28px;border:1px solid #d2c5dc;background:#f2ecf4;border-radius:22px;margin-bottom:22px}.v2-diary-welcome h2{font-size:27px;margin:0 0 9px}.v2-diary-welcome>p{font-size:16px;line-height:1.8;color:#66566d;margin:0 0 20px}
.v2-writing-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.v2-writing-choices button{text-align:left;background:#fffdfa;border:1px solid #d8ccd7;border-radius:14px;padding:17px;color:#4c4157;min-width:0}.v2-writing-choices .workspace-icon{display:block;margin-bottom:11px;width:26px;height:26px}.v2-writing-choices strong{display:block;font-size:16px;margin-bottom:8px}.v2-writing-choices small{display:block;font-size:14px;line-height:1.7;color:#685b70}
.v2-diary .planner-history{padding:24px}.v2-diary .planner-review{border-bottom-color:#e1d9e6}.v2-diary .planner-review>summary{padding:18px 0}.v2-diary .planner-review p{font-size:16px;line-height:1.9;white-space:pre-wrap;overflow-wrap:anywhere}
.v2-diary .planner-days button{min-height:38px;border-radius:9px;font-size:14px}.v2-diary .planner-days .selected{background:#ddd1e8;color:#534166}.v2-diary .planner-days .recorded{box-shadow:inset 0 -3px #9c86af}
.v2-diary-aside-note{background:#e8eee4;padding:20px;border:1px solid #c6d3bd;border-radius:17px;font-size:14px;line-height:1.8;color:#4a6041}.v2-diary-aside-note h3{margin:0 0 8px;font-size:17px}
.v2-journal-editor{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:22px}.v2-journal-editor textarea{min-height:130px;font-size:16px;line-height:1.9}.v2-journal-editor [name="journal"]{min-height:290px;background:#fdfbf7}.v2-journal-main{min-width:0}.v2-journal-prompts{background:#eee8f3;border-radius:15px;padding:20px;align-self:start;font-size:14px;line-height:1.8;color:#594769}.v2-journal-prompts h3{font-size:18px;margin:0 0 10px}.v2-journal-prompts button{margin-top:12px;width:100%}
.v2-access-section{border:1px solid var(--line);border-radius:17px;padding:20px;background:#f9fbf8;margin:8px 0;min-width:0}.v2-access-section>h3{display:flex;align-items:center;gap:10px;font-size:19px;margin:0 0 8px}.v2-access-section>p{font-size:14px;line-height:1.8;color:var(--muted);margin:0 0 16px}
.v2-access-section .duty-field{border:0;padding:0;margin:0}.v2-access-section .duty-options{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.v2-access-section .duty-option{background:#fff;border-radius:12px;border-color:#d1ded5;min-height:80px}.v2-access-section .duty-option:has(input:checked){background:#e1eee5;border-color:#8dac98}
.v2-access-section .duty-option strong{font-size:16px}.v2-access-section .duty-option small{font-size:14px;line-height:1.6}.v2-access-section .permission-editor{padding:0;border:0;background:transparent}
.v2-access-section .permission-preview{background:#e7edf4;border:1px solid #c4d0de;border-radius:14px;padding:18px}.v2-access-section .permission-menu-preview>span{padding:8px 12px;border:1px solid #c2cddd;background:#fcfdff;color:#3a5372;font-size:14px;border-radius:9px}
.v2-access-section .permission-adjust{margin-top:18px}.v2-access-advanced{padding:16px 20px;border:1px dashed #bfcfc6;border-radius:14px;background:#f7faf6;min-width:0}.v2-access-advanced>summary{font-size:15px;font-weight:650;cursor:pointer;min-height:32px}.v2-access-advanced>.form-grid{margin-top:18px}
.action-dialog{background:#fcfdfb;border-radius:22px}.action-dialog input,.action-dialog select,.action-dialog textarea{border-color:#cbd8d1;border-radius:10px;color:#29463e;font-size:16px;background:#fff}.action-dialog .dialog-head{background:#eff4ef}.action-dialog .dialog-foot{background:#eff4ef}
.test-environment-banner{background:#f2f0e9!important;color:#191917!important;border-bottom:1px solid #d5d1c6}.test-entry,.employee-login-card{border-radius:22px}
:is(button,input,select,textarea,a,summary):focus-visible{outline:3px solid #6b72a0;outline-offset:3px}
@media(min-width:1100px){.os-workspace .main{padding:30px 34px}.shell.os-workspace{grid-template-columns:252px minmax(0,1fr)}}
@media(max-width:1150px){.os-workspace .finance-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.v2-diary{grid-template-columns:minmax(0,1fr) 240px}.v2-writing-choices{grid-template-columns:1fr}.v2-writing-choices button{display:grid;grid-template-columns:32px 1fr;column-gap:10px}.v2-writing-choices svg{grid-row:1/3}.v2-writing-choices strong,.v2-writing-choices small{grid-column:2}}
@media(max-width:760px){.v2-diary,.v2-journal-editor{grid-template-columns:minmax(0,1fr)}.v2-diary-side{grid-template-columns:repeat(2,minmax(0,1fr))}.v2-journal-prompts{order:-1}.v2-guide{padding:15px;gap:12px}.v2-guide>.workspace-icon{display:none}.personal-planner .planner-intro{padding:20px}.personal-planner .planner-intro h2{font-size:25px}.os-workspace .topbar h1{font-size:25px}.v2-planner-tabs{gap:6px}.v2-planner-tabs button{flex:1;justify-content:center;padding:12px 10px;font-size:14px}.v2-diary-welcome{padding:20px}.v2-access-section{padding:15px}.v2-access-section .duty-options{grid-template-columns:1fr}.workspace-title-icon{padding:7px;margin-right:8px}.os-workspace .finance-metrics .metric{padding:16px}.os-workspace .metric strong{font-size:24px}.os-workspace .mobile-header{background:#e5eee7;color:#315e59;border-bottom-color:#bdd0c3}}
@media(max-width:440px){.v2-diary-side{grid-template-columns:minmax(0,1fr)}.os-workspace .finance-metrics{grid-template-columns:minmax(0,1fr)}.v2-finance-key{gap:6px}.v2-finance-key span{font-size:13px}.v2-planner-tabs .workspace-icon{width:18px;height:18px;flex-basis:18px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;transition:none!important}}

/* Existing representative export UI */
.backup-transfer { width: min(680px, 100%); display: flex; flex-direction: column; min-height: 0; max-height: inherit; overflow: hidden; }
.backup-transfer .modal-body { display: grid; gap: 16px; }
.backup-transfer-destination { background: #f3f0e9; border-radius: 14px; padding: 18px; }
.backup-transfer-destination span, .backup-transfer-destination strong { display: block; }
.backup-transfer-destination strong { margin-top: 6px; font-size: 20px; overflow-wrap: anywhere; }
.backup-transfer p { margin: 6px 0 0; line-height: 1.6; overflow-wrap: anywhere; }
.backup-transfer-help { color: var(--muted, #6b6a64); font-size: 13px; }
.backup-transfer-steps { display: flex; padding: 0; gap: 8px; margin: 0; list-style: none; }
.backup-transfer-steps li { flex: 1; padding: 10px 6px; text-align: center; border-radius: 10px; background: #f1f0ec; color: #6b6a64; font-size: 13px; }
.backup-transfer-steps li.active { background: #f5e2d4; color: #874822; font-weight: 700; }
.backup-transfer-steps li.done { background: #e3eee6; color: #285a3e; }
.backup-transfer [data-backup-status] { padding: 18px; border: 1px solid #dcd9d0; border-radius: 14px; }
.backup-transfer .backup-transfer-actions { display: flex; gap: 10px; flex-wrap: wrap; flex: 0 0 auto; margin-top: 0; padding: 14px 20px 18px; border-top: 1px solid var(--line); }
.backup-transfer [hidden] { display: none !important; }
@media (max-width: 480px) {
  .backup-transfer .backup-transfer-actions .btn { flex: 1 1 100%; width: 100%; white-space: normal; }
  .backup-transfer .backup-transfer-actions [data-backup="download"], .backup-transfer .backup-transfer-actions [data-backup="copy"] { flex: 1 1 calc(50% - 5px); width: auto; }
  .backup-transfer .modal-body { padding: 20px; }
  .backup-transfer-destination { padding: 12px; }
  .backup-transfer-destination strong { font-size: 17px; }
}
.login-shell{background:#eff3f2}.login-story{background:#e0e9e2;color:#294a40}.login-story-copy h1{color:#294a40}.login-story-copy h1 em{color:#65517c}.login-story-copy p,.login-story-copy>span{color:#4b655a}.login-panel{background:#f6f7f3}.login-submit{background:#315e59}.login-card{color:#263d40}.login-help{color:#586c70}
.personal-planner .planner-intro h2{color:#4d4664}
.os-workspace .attendance-quick-icon{background:#d0e1d6;color:#315e59}

/* Original BESPACE colors belong only to navigation chrome; content keeps the v2 palette. */
.os-workspace :is(.sidebar,.topbar,.mobile-appbar){--ink:#191917;--muted:#696860;--paper:#f2f0e9;--forest:#191917;--forest-2:#30302c;--line:#d5d1c6}
.os-workspace :is(.sidebar,.brand,.sidebar-foot){background:#f2f0e9;color:#191917}
.os-workspace .sidebar{border-right-color:#d5d1c6}
.os-workspace .sidebar-foot,.os-workspace .nav-group{border-color:#d5d1c6}
.os-workspace :is(.workspace-brand small,.nav-group summary,.user-mini span){color:#696860}
.os-workspace :is(.sidebar-symbol,.user-mini strong){color:#191917}
.os-workspace .os-version{background:#30302c;color:#f2f0e9}
.os-workspace .nav{scrollbar-color:#aaa79e transparent}
.os-workspace .nav::-webkit-scrollbar-thumb{background:#aaa79e}
.os-workspace .nav button{color:#191917}
.os-workspace .nav button:hover{background:#e5e2d8;color:#191917}
.os-workspace .nav button.active{background:#191917;color:#f2f0e9;box-shadow:none}
.os-workspace :is(.nav button,.nav-group summary,.brand-home):focus-visible{outline-color:#191917}
.os-workspace .nav button.active:focus-visible{outline-color:#f2f0e9}
.os-workspace .attendance-quick{background:#fbfaf6;border-color:#d5d1c6;color:#191917}
.os-workspace .attendance-quick:hover{background:#e5e2d8;border-color:#aaa79e}
.os-workspace .attendance-quick-copy small{color:#696860}
.os-workspace .attendance-quick>b{color:#191917}
.os-workspace .attendance-quick.active{background:#191917;border-color:#191917;color:#f2f0e9}
.os-workspace .attendance-quick.active .attendance-quick-copy small,.os-workspace .attendance-quick.active>b{color:#f2f0e9}
.os-workspace :is(.attendance-quick-mark,.attendance-quick-icon,.sidebar .avatar){background:#e5e2d8;color:#191917}
.os-workspace .attendance-quick-mark::before,.os-workspace .attendance-quick-mark::after{background:#191917}
.os-workspace .attendance-quick-mark i{border-color:#191917}
.os-workspace .sidebar-account-actions button{background:transparent;border-color:#d5d1c6;color:#191917}
.os-workspace .sidebar-account-actions button:hover{background:#e5e2d8;color:#191917}
.os-workspace .sidebar-account-actions button.active{background:#191917;color:#f2f0e9}
.os-workspace :is(.topbar,.mobile-appbar){background:#f2f0e9;color:#191917;border-color:#d5d1c6}
.os-workspace .topbar h1{color:#191917}
.os-workspace .topbar .workspace-location{color:#696860}
.os-workspace .workspace-title-icon{background:#e5e2d8;color:#191917}
.os-workspace :is(.mobile-menu-toggle,.mobile-menu-close){background:#f2f0e9;color:#191917;border-color:#d5d1c6}
.os-workspace .mobile-menu-toggle i{background:#191917}
.os-workspace .mobile-attendance-button{background:#191917;color:#f2f0e9;border-color:#191917}
.os-workspace .mobile-appbar .brand-home:focus-visible{outline-color:#191917}
.test-environment-banner button{color:#191917!important;background:#fbfaf6!important;border-color:#d5d1c6!important}
.test-environment-banner select{background:#fbfaf6;color:#191917;border-color:#d5d1c6}
#actionDialog:has(.v2-journal-editor),#actionDialog:has(.v2-access-section){width:min(1080px,calc(100vw - 32px));max-width:1080px}
#actionDialog .field>span,#actionDialog .field>label,#actionDialog .duty-field>legend,#actionDialog .duty-field>p{font-size:14px;line-height:1.6}
#actionDialog:has(.v2-journal-editor) .modal-body{padding:24px}
@media(max-width:600px){#actionDialog:has(.v2-journal-editor),#actionDialog:has(.v2-access-section){width:calc(100vw - 16px)}#actionDialog:has(.v2-journal-editor) .modal-body{padding:16px}.v2-journal-prompts{order:0}}

/* Today-centered calendar. Names and dates remain readable on a phone. */
.automatic-metric-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.automatic-metric{padding:16px}.automatic-metric span,.automatic-metric strong{font-size:14px;line-height:1.5}.automatic-metric p,.automatic-metric small{font-size:13px;line-height:1.7}.automatic-metric>div:first-child{align-items:flex-start}.automatic-metric strong{white-space:nowrap}.automatic-score-note{font-size:13px;line-height:1.7}@media(max-width:600px){.automatic-metric-list{grid-template-columns:1fr}}
.weekly-date-strip{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px;margin:18px 0}
.unified-calendar .calendar-toolbar>div{min-width:0}.unified-calendar .calendar-toolbar p{white-space:normal;overflow-wrap:anywhere}
.weekly-date-strip button{display:grid;gap:4px;justify-items:center;border:1px solid var(--line,#ddd);border-radius:12px;background:#f5f4f0;color:#444;padding:10px 3px;cursor:pointer}
.weekly-date-strip b{font-size:20px}.weekly-date-strip .today{border:2px solid #627b75}.weekly-date-strip .selected{background:#dce9e4;color:#203f37}
.weekly-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;align-items:start}
.weekly-day{min-width:0;padding:8px;border:1px solid #e4e5df;border-radius:12px;min-height:150px;background:#fafaf7}.weekly-day.today{border:2px solid #78988e;background:#f0f6f2}
.weekly-day h3{font-size:14px;margin:4px 0 12px}.weekly-day .unified-event{display:block;width:100%;text-align:left;padding:10px;margin:8px 0;min-width:0;overflow-wrap:anywhere}
.unified-person{display:block!important;font-size:17px!important;font-weight:850;color:#2d5147;margin-bottom:6px}.unified-event .unified-time{display:block;font-size:12px;margin-bottom:8px;white-space:normal}.unified-event strong,.unified-event small{display:block;margin:4px 0}
.work-event .owner-badge{font-size:14px!important;font-weight:800!important;background:#ddebe5;color:#274e41}
.weekly-overdue{padding:14px;border-radius:12px;background:#fbedea;color:#883b35;margin:12px 0}.weekly-overdue summary{font-weight:750;cursor:pointer}.weekly-overdue-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:8px}
.month-mode .weekly-date-strip{display:none}.month-mode .weekly-calendar-grid{grid-template-columns:repeat(7,minmax(0,1fr))}
@media(max-width:1100px) and (min-width:761px){.weekly-calendar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.month-mode .weekly-calendar-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.weekly-calendar-grid,.month-mode .weekly-calendar-grid{display:block}.week-mode .weekly-day{display:none}.week-mode .weekly-day.selected{display:block}.weekly-day{margin-bottom:12px}.weekly-day .unified-event{padding:14px}.weekly-date-strip{gap:3px}.weekly-date-strip button{font-size:12px}.weekly-date-strip b{font-size:18px}.weekly-date-strip small{font-size:10px}.calendar-actions{flex-wrap:wrap}.unified-person{font-size:19px!important}}

.automatic-metric.red{border:2px solid #b96058;background:#fcf0ee}.automatic-metric.red>div:first-child strong,.evaluation-alert.red{color:#983b34}.automatic-metric.red .automatic-meter i{background:#b96058}.automatic-metric.amber{border-color:#bd975f;background:#fff8ea}.evaluation-improvement{font-size:12px;line-height:1.6!important}.evaluation-domain-mix{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.evaluation-domain-mix span{padding:10px 14px;border-radius:10px;background:#e9efea}.quality-source{border:1px solid #ddd;border-radius:12px;padding:16px;margin:12px 0}.quality-source p{white-space:pre-wrap;overflow-wrap:anywhere}.quality-source button{margin-left:12px}.quality-person{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) auto;gap:12px;align-items:end;margin-bottom:14px}.quality-person .field{min-width:0}.quality-person button{margin-bottom:2px}@media(max-width:600px){.quality-person{grid-template-columns:minmax(0,1fr);padding:12px;border:1px solid #ddd;border-radius:10px}.automatic-score-hero{overflow-wrap:anywhere}.quality-source button{margin:12px 0 0}}
/* Peer requests reuse the calendar surface and existing form controls. */
.access-duty-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.access-duty-columns .duty-options{grid-template-columns:1fr}
.access-duty-columns .duty-field{min-width:0;margin:0;padding:18px;border:1px solid #dedbd4;border-radius:14px;background:#faf9f5}
.access-duty-columns .access-duty-operating{background:#edf2ef;border-color:#bfcfc6}
.access-duty-columns .access-duty-practical{background:#f5f0e7;border-color:#d8cdbb}
.access-duty-columns .access-duty-legacy,.access-duty-columns .access-duty-representative{grid-column:1/-1}
.access-duty-columns legend{font-weight:800;font-size:16px;padding:0 6px}
.work-request-center{background:#faf9f5;border:1px solid #dedbd4;border-radius:18px;padding:24px;min-width:0}
.work-request-center .panel-head{padding:0;gap:16px;flex-wrap:wrap}
.work-request-center .panel-head p{margin-top:8px;color:#66665f;line-height:1.6}
.work-request-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:20px 0 12px}
.work-request-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:18px 0}
.work-request-list>.empty-state{grid-column:1/-1}
.work-request-card{padding:20px;background:#fff;border:1px solid #dedbd4;border-radius:14px;min-width:0;overflow-wrap:anywhere}
.work-request-card header{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;color:#696961}
.work-request-card header strong{font-size:16px;color:#30312d;margin-left:5px}
.work-request-card h3{margin:16px 0 10px;font-size:18px;line-height:1.5}
.work-request-card p{font-size:13px;line-height:1.65;margin:8px 0}
.work-request-description,.work-request-response p{white-space:pre-wrap}
.work-request-status{padding:5px 10px;border-radius:20px;background:#e9e8e3;font-weight:750;color:#4a4c46}
.work-request-status.status-pending{background:#f4e7ce;color:#77562f}
.work-request-status.status-in_progress{background:#e2ece8;color:#355b4b}
.work-request-status.status-completed{background:#dce7ed;color:#365567}
.work-request-response{border-left:3px solid #8a9c90;padding:8px 12px;background:#f0f4f1;margin-top:14px}
.work-request-sync{color:#52675a}
.work-request-inbox{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;padding:18px 22px;background:#e8eeea;border:1px solid #bfcfc6;border-radius:14px;margin-bottom:20px}
.work-request-inbox strong{font-size:17px;color:#365746}.work-request-inbox p{font-size:13px;margin:7px 0 0}
.employee-contract-summary{margin:0 0 24px;min-width:0}
.employee-contract-heading h2,.dashboard-request-head h2{font-size:19px;margin:0;color:#243f42}
.employee-contract-heading p{font-size:12px;color:#667d80;line-height:1.7;margin:7px 0 14px}
.employee-contract-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.employee-contract-card{min-width:0;background:#fff;border:1px solid #ccd9d8;border-radius:16px;padding:20px}
.employee-contract-period h3{font-size:15px;margin:0 0 5px;color:#335f59}
.employee-contract-period span{font-size:11px;color:#667d80}
.employee-contract-total{display:block;margin-top:18px;font-size:clamp(22px,2.15vw,32px);letter-spacing:-1px;overflow-wrap:anywhere;color:#243f42;font-variant-numeric:tabular-nums}
.employee-contract-card>p{font-size:12px;color:#667d80;margin:5px 0 16px}
.employee-contract-card dl{margin:0;border-top:1px solid #e3ebe9;padding-top:12px;display:grid;gap:12px}
.employee-contract-card dl>div{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.employee-contract-card dt{font-size:12px;display:flex;align-items:center;gap:6px;color:#445f61}
.employee-contract-card dt small{color:#809293}.employee-contract-card dd{margin:0;font-size:15px;font-weight:700;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.contract-dot{width:7px;height:7px;display:inline-block;border-radius:50%;background:#4b7b70}.contract-dot.completed{background:#949bb0}
.employee-contract-note{font-size:12px;color:#8b5c30;margin:10px 0 0}
.work-request-inbox.dashboard-requests{display:block;padding:20px 22px}
.dashboard-request-head{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;align-items:center}
.dashboard-request-list{display:grid;gap:0;margin-top:12px}
.dashboard-request-row{display:flex;align-items:center;gap:12px;border-top:1px solid #ccd9d2;padding:12px 0;min-width:0}
.dashboard-request-row>div{min-width:0;flex:1}.dashboard-request-row strong{display:block;font-size:14px;overflow-wrap:anywhere}
.dashboard-request-row small{display:block;margin-top:5px;font-size:12px;color:#5e7570;overflow-wrap:anywhere;line-height:1.6}
.dashboard-request-row .work-request-status{flex-shrink:0}.dashboard-request-priority{font-size:11px;color:#91502d;flex-shrink:0}
.work-request-inbox .dashboard-request-note{font-size:11px;color:#647c75}.dashboard-request-empty{padding:8px 0;color:#647c75}
@media(max-width:1050px){.employee-contract-grid{grid-template-columns:1fr}.employee-contract-card{padding:18px}.employee-contract-total{font-size:28px}}
@media(max-width:600px){.work-request-inbox.dashboard-requests{padding:16px}.dashboard-request-head .row-actions{width:100%;justify-content:space-between}.dashboard-request-row{gap:8px;align-items:flex-start}.dashboard-request-row .work-request-status{font-size:10px}.employee-contract-card dl>div{gap:6px}}
.work-request-card .row-actions{margin-top:18px;gap:8px;flex-wrap:wrap}
@media(max-width:760px){.access-duty-columns,.work-request-list{grid-template-columns:1fr}.work-request-center{padding:15px}.work-request-card{padding:16px}.work-request-card .row-actions .btn{flex:1 1 160px}.work-request-center .panel-head>.btn{width:100%}}
.project-member-strip { display:flex;flex-wrap:wrap;align-items:flex-start;gap:10px; }
.project-member-category { min-width:150px;flex:1 1 150px;border:1px solid var(--line);border-radius:12px;background:var(--paper); }
.project-member-category summary { padding:13px 15px;cursor:pointer;font-weight:750;font-size:13px; }
.project-member-category summary span { margin-left:8px;font-size:11px;font-weight:500;color:var(--muted); }
.project-member-category > div { display:flex;flex-wrap:wrap;gap:7px;padding:0 12px 13px; }
.payment-tax-fields,.payment-withholding-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px; }
.payment-tax-fields [hidden] { display:none!important; }
.payment-tax-fields .full { grid-column:1/-1; }
.payment-tax-preview,.payment-tax-summary { display:flex;flex-wrap:wrap;gap:12px;align-items:center;padding:18px;border:1px solid #c7d7cd;border-radius:12px;background:#eef5ef; }
.payment-tax-preview strong { margin-left:auto; }
.payment-tax-summary { margin:14px 0; }
.payment-tax-summary div { display:grid;gap:7px; }
.payment-tax-summary p,.payment-tax-summary small { width:100%;margin:0;overflow-wrap:anywhere; }
.payment-recipient-shortcuts { display:flex;align-items:center;gap:12px;flex-wrap:wrap; }
.payment-recipient-shortcuts span { font-size:12px;color:var(--muted); }
.payment-review-notice { margin:16px 0; border:1px solid #dcc69a; border-radius:12px; background:#fff9ec; padding:18px; }
.payment-review-notice p { white-space:pre-wrap; overflow-wrap:anywhere; }
.payment-review-notice small { display:block; line-height:1.6; }
.payment-return-button { border-color:#b0833f; color:#76551f; background:#fff9ec; }
@media(max-width:600px){.payment-tax-fields,.payment-withholding-fields{grid-template-columns:1fr}.payment-tax-preview{align-items:flex-start;flex-direction:column}.payment-tax-preview strong{margin-left:0}.project-member-category{flex-basis:45%;min-width:120px}}

/* Work requests: visible actions and deadlines. */
.work-request-inbox.dashboard-requests{background:#fff8eb;border:1px solid #d7b376;border-top:5px solid #bf781c;border-radius:18px;box-shadow:0 7px 24px #5039190b}
.request-kicker{font-size:10px;letter-spacing:.14em;color:#8b5b1e;font-weight:800}.dashboard-request-head h2{font-size:24px}.request-count{display:inline-block;border-radius:9px;background:#a85913;color:white;padding:4px 10px}.dashboard-request-list{gap:10px}
.dashboard-request-row.request-emphasis{background:white;border:1px solid #e2d8c9;border-left:5px solid #ce913d;border-radius:12px;padding:16px;gap:16px}.request-emphasis.in_progress{border-left-color:#397b70}.request-emphasis.overdue{border-left-color:#b63547;background:#fff6f6}.request-copy strong{font-size:17px!important;line-height:1.5}.request-deadline{display:block;color:#a45a14;margin-top:6px;font-size:14px}.overdue .request-deadline{color:#a51f36}.request-actions{display:flex;gap:8px;flex:0 0 auto!important}.request-state{flex:0 0 auto!important}.request-nav-badge{margin-left:auto;border-radius:8px;background:#b75f1f;color:#fff;padding:2px 7px;font-size:12px}.request-nav-badge[hidden]{display:none}.status-overdue{background:#f9dde1;color:#9e2135}
.evidence-flag{display:inline-block;padding:7px 10px;border-radius:8px;font-size:12px;font-weight:800;line-height:1.5;white-space:normal}.evidence-flag.invoice{color:#8c470b;background:#fff0d7;border:1px solid #e4b56c}.evidence-flag.identity{color:#673da0;background:#f1e8fc;border:1px solid #b998de}.evidence-flag.resolved{color:#285f51;background:#e3f1e9}.invoice-attention{border-left:5px solid #d19437!important}.identity-attention{border-left:5px solid #8b5eb9!important;background:#faf6ff!important}.evidence-filter-bar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:18px 0}.evidence-filter-bar small{flex-basis:100%;color:#5e7275}.payment-attention-flags{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}.task-alert.urgent{border:3px solid #d6973e!important;box-shadow:0 14px 60px #0004!important;max-width:min(540px,calc(100vw - 24px));z-index:10020}.task-alert.urgent strong{font-size:20px}.task-alert.urgent p{font-size:16px;line-height:1.5}
@media(max-width:600px){.dashboard-request-head h2{font-size:20px}.dashboard-request-row.request-emphasis{display:grid;grid-template-columns:1fr;padding:14px;gap:9px}.request-copy strong{font-size:16px!important}.request-actions{justify-content:flex-end}.request-actions .btn{min-height:44px}.task-alert.urgent{left:12px;right:12px;bottom:16px;width:auto}}
/* Project cost budget pilot: missing settings are distinct from overspending. */
.budget-pilot-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:20px 0}.budget-pilot-summary>div{padding:16px;background:#eef5f1;border-radius:12px}.budget-pilot-summary small,.budget-trade-metrics small{display:block;color:#526a62;font-size:12px;margin-bottom:6px}.budget-pilot-summary strong{font-size:23px;font-variant-numeric:tabular-nums}.budget-pilot-note{color:#526a62;line-height:1.7}.budget-pilot-guide{margin:14px 0 22px}.budget-pilot-guide summary,.budget-trade summary{cursor:pointer;color:#38665d;padding:8px 0;min-height:40px}.budget-pilot-guide p,.budget-trade details p{color:#526a62;line-height:1.65}.budget-trades{display:grid;gap:12px}.budget-trade{padding:18px;border:1px solid #cbdad4;border-radius:14px;background:#fff}.budget-trade-head{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.budget-trade-head>strong{flex:1;min-width:150px}.budget-state{font-size:12px;font-weight:600;border-radius:20px;padding:5px 9px;background:#e7f0eb;color:#28584a}.budget-state.unset{color:#62716a;background:#edf0ee}.budget-state.warning{color:#845209;background:#fff0ce}.budget-state.danger{color:#a13740;background:#fde7e8}.budget-trade-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:16px 0}.budget-trade-metrics b{font-variant-numeric:tabular-nums;font-size:16px}.budget-usage{height:5px;background:#edf1ef;border-radius:4px;overflow:hidden}.budget-usage i{display:block;height:100%;background:#427568}.budget-usage.warning i{background:#bc831d}.budget-usage.danger i{background:#b54751}.budget-plan-editor{display:grid;gap:14px}.budget-plan-edit-row{padding:16px;border:1px solid #cbdad4;border-radius:12px}.budget-plan-edit-row h3{margin:0 0 8px}.budget-plan-edit-row p{color:#526a62;line-height:1.6}.budget-plan-edit-row .field{margin-top:12px}.estimate-inline-alert.unset{color:#626f68;background:#edf0ee}
@media(max-width:700px){.budget-pilot-summary{grid-template-columns:1fr;gap:8px}.budget-pilot-summary>div{padding:12px}.budget-trade-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.budget-trade{padding:14px}.budget-pilot-panel .estimate-panel-head{display:block}.budget-pilot-panel .action-row{margin-top:12px;flex-wrap:wrap}.budget-plan-edit-row input{font-size:16px}.budget-pilot-summary strong{font-size:21px}}
.payment-budget-check.unset,.payment-review-budget.unset,.payment-budget-chip.unset{background:#f0f3f1;color:#52685f;border-color:#cbd8d2}
/* v336: keep project navigation in document flow, including narrow Korean layouts. */
.os-workspace .project-hub-head{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px;align-items:center}
.os-workspace .project-hub-head>.hub-back{position:static;grid-column:1/-1;justify-self:start;min-height:44px;padding:8px 0;text-align:left;line-height:1.5;white-space:normal;word-break:keep-all}
.os-workspace .project-hub-head>div:first-of-type{min-width:0;max-width:none;padding-top:0}
.os-workspace .project-hub-progress{position:static;min-width:0}
.os-workspace .project-hub-head h2{line-height:1.3;word-break:keep-all;overflow-wrap:anywhere}
.os-workspace .project-hub-head>div:first-of-type>span{line-height:1.6;word-break:keep-all;overflow-wrap:anywhere}
.cash-evidence .cash-evidence-project{font-size:15px;color:var(--ink);word-break:keep-all;overflow-wrap:anywhere}
.cash-evidence .cash-evidence-amount{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 12px}
.cash-evidence-amount strong{white-space:nowrap;font-variant-numeric:tabular-nums}
.cash-evidence>.btn{align-self:flex-start;min-height:44px;white-space:normal}
.cash-evidence small{color:var(--muted);line-height:1.5}
.cash-week summary{cursor:pointer;min-height:32px;line-height:1.6}
.cash-scenarios{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.cash-scenarios>.btn{white-space:normal;word-break:keep-all;min-width:0;min-height:44px}
@media(max-width:760px){
 .os-workspace .project-hub-head{grid-template-columns:minmax(0,1fr);padding:18px;gap:10px}
 .os-workspace .project-hub-head h2{font-size:24px}
 .os-workspace .project-hub-progress{display:flex;align-items:baseline;gap:8px;width:auto;height:auto;justify-self:start;padding:8px 12px;border-radius:12px;background:#ffffff75}
 .os-workspace .project-hub-progress span{font-size:13px}
 .os-workspace :is(.record-panel-head,.estimate-panel-head,.modal-head)>div{min-width:0}
 .os-workspace :is(.record-panel-head,.estimate-panel-head,.modal-head) :is(h2,h3,p){word-break:keep-all;overflow-wrap:anywhere}
 .os-workspace :is(.record-actions,.project-hub-actions,.modal-foot) .btn{white-space:normal;word-break:keep-all;overflow-wrap:anywhere;line-height:1.5;min-height:44px}
 .cash-scenarios{grid-template-columns:repeat(2,minmax(0,1fr))}
 .cash-evidence .cash-evidence-project{font-size:16px}
}

.quote-trade-group{display:grid;gap:10px;min-width:0}.quote-trade-group h3{margin:14px 0 4px;color:#315d53}.quote-line-spec{color:#647971;font-size:13px;overflow-wrap:anywhere}.quote-usage-record{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid #e1e9e5;flex-wrap:wrap}.quote-usage-record>div{flex:1;min-width:180px;overflow-wrap:anywhere}.quote-usage-record span,.quote-usage-record small{display:block;line-height:1.6;color:#647971}.quote-usage-record>strong{font-variant-numeric:tabular-nums}.quote-unlinked{padding:16px;background:#fff7e8;border:1px solid #e4d1a6;border-radius:12px;margin:12px 0 22px}.quote-unlinked>summary,.quote-legacy-budget>summary{cursor:pointer;font-weight:600;min-height:40px}.quote-legacy-budget{margin-top:24px;padding-top:16px;border-top:1px solid #cbdad4}.quote-payment-selector select{max-width:100%;min-width:0}.quote-payment-selector .payment-budget-check{margin:8px 0}.quote-usage-panel .budget-trade-metrics>div{min-width:0;overflow-wrap:anywhere}@media(max-width:700px){.quote-usage-record>div{min-width:100%;}.quote-usage-panel .budget-trade-head>strong{min-width:100%;overflow-wrap:anywhere}.quote-unlinked{padding:12px}.quote-usage-panel .budget-trade-metrics b{font-size:14px}}
.quote-expense-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}.quote-expense-line{border:1px solid #aec7bd;background:#f6faf7}.quote-difference{display:block;color:#9f4d0f;font-size:13px}.quote-allocation-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:10px 0 16px}.quote-allocation-summary>div{padding:12px;background:#eef4f1;border-radius:10px;min-width:0}.quote-allocation-summary small,.quote-allocation-summary strong{display:block;overflow-wrap:anywhere}.quote-allocation-summary small{font-size:12px;color:#526a61;margin-bottom:5px}.quote-allocation-rows{display:grid;gap:12px}.quote-allocation-row{display:grid;grid-template-columns:minmax(0,1fr) 155px;gap:10px;padding:14px;border:1px solid #ccd9d2;border-radius:12px;margin-bottom:4px;min-width:0}.quote-allocation-row label{display:grid;gap:6px;min-width:0;font-size:13px}.quote-allocation-row select,.quote-allocation-row input{width:100%;min-width:0;max-width:100%;padding:11px;border:1px solid #baccc3;border-radius:8px;background:#fff;font:inherit}.quote-allocation-row input{text-align:right}.quote-allocation-buttons{grid-column:1/-1;display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.quote-allocation-row>small{grid-column:1/-1;color:#466454}.quote-allocation-message{padding:12px;border-radius:8px;font-size:13px;line-height:1.6}.quote-allocation-message.warning{background:#fff5df;color:#8d5b11}.quote-allocation-message.danger{background:#fcebed;color:#9f2e42}.quote-allocation-message.safe{background:#eaf5ef;color:#2c674d}.quote-allocation-editor{min-width:0}.quote-payment-selector{min-width:0}@media(max-width:700px){.quote-allocation-row{grid-template-columns:minmax(0,1fr);padding:10px}.quote-allocation-summary{gap:5px}.quote-allocation-summary>div{padding:8px}.quote-allocation-summary strong{font-size:13px}.quote-allocation-row select{font-size:13px}.quote-allocation-summary small{font-size:11px}}

/* Automatic project expense totals and evidence remain readable on phones. */
.project-expense-form p,.project-expense-form details,.project-expense-form .expense-budget-equation{word-break:keep-all;overflow-wrap:anywhere}

.work-request-response small{display:block;margin-top:4px;color:#667976;font-size:12px}.work-request-response.request-completed{border-left-color:#386e60;background:#eaf5ef}.work-request-response.request-followup{margin-top:10px}

/* Request notes keep help text outside the input focus ring on every screen. */
.work-request-note-form{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;min-width:0}
.work-request-note-form .field{gap:10px}
.work-request-note-form textarea{display:block;min-height:144px;max-width:100%;line-height:1.65;resize:vertical}
.work-request-note-form>p{margin:0;padding:12px 14px;background:#eef4f1;border-radius:10px;color:#526a62;font-size:13px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
@media(max-width:600px){.work-request-note-form{gap:16px}.work-request-note-form textarea{min-height:132px}}
/* Contract forms and cash comparison share a wrapping mobile layout. */
.manual-contract-form{display:grid;gap:20px;min-width:0}.manual-contract-form fieldset{min-width:0;border:1px solid #cbdad4;border-radius:12px;padding:16px}.manual-contract-form legend{font-weight:750;padding:0 6px}.contract-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.manual-contract-form label{display:grid;gap:8px;min-width:0}.manual-contract-form input,.manual-contract-form select,.manual-contract-form textarea{box-sizing:border-box;max-width:100%;width:100%;min-width:0}.manual-contract-form fieldset:disabled{opacity:1}.contract-payment-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid #d8e1dd}.contract-actions{display:flex;gap:10px;flex-wrap:wrap}.contract-request{display:grid;gap:14px;border-top:1px solid #d8e1dd;padding-top:20px}.manual-contract-form .contract-check{display:flex;align-items:center;gap:10px}.contract-check input{width:20px;flex:none}.contract-note,.contract-totals{padding:12px;background:#f7f1e2;line-height:1.7;overflow-wrap:anywhere}.manual-contract-inbox{margin-bottom:20px}.project-cash-comparison .panel-head{display:flex;flex-wrap:wrap;gap:16px}.cash-compare-body{padding:20px;display:grid;gap:18px}.cash-compare-row{display:grid;grid-template-columns:80px minmax(0,1fr) minmax(130px,auto);align-items:center;gap:12px}.cash-track{background:#e8eeeb;height:20px;border-radius:10px;overflow:hidden}.cash-bar{height:100%;border-radius:10px}.cash-bar.received{background:#34675e}.cash-bar.spent{background:#647d98}.cash-bar.over{background:#ad4854}.cash-over{color:#a43b4b}.cash-balance{font-size:18px;font-weight:750}.cash-compare-body small{line-height:1.6;color:#687e79}.cash-compare-row b{font-variant-numeric:tabular-nums;text-align:right;overflow-wrap:anywhere}
@media(max-width:640px){.contract-fields{grid-template-columns:1fr}.contract-payment-row{grid-template-columns:repeat(2,minmax(0,1fr))}.contract-payment-row label:first-child{grid-column:1/-1}.contract-payment-row button{grid-column:1/-1;justify-self:end}.contract-actions .btn{flex:1 1 150px}.cash-compare-row{grid-template-columns:1fr auto}.cash-compare-row .cash-track{grid-column:1/-1;grid-row:2}.cash-compare-row b{grid-column:2;grid-row:1}.cash-compare-body{padding:16px}.manual-contract-form fieldset{padding:12px}}

/* Person-level labor input: independent labels and mobile stacking. */
.payment-labor{display:block;width:100%;min-width:0;padding:18px;border:1px solid #c9d8d4;border-radius:14px;background:#f7faf8;box-sizing:border-box}
.payment-labor h3{margin:0 0 10px}.payment-labor p,.payment-labor small{display:block;line-height:1.65;word-break:keep-all;overflow-wrap:anywhere;margin:10px 0}
.payment-labor-row{padding:16px;margin:14px 0;border:1px solid #cad8d3;border-radius:12px;background:#fff;min-width:0}
.payment-labor-row-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.payment-labor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 14px;margin-top:18px}
.payment-labor .field{display:flex;flex-direction:column;gap:8px;min-width:0;margin:0}
.payment-labor label{position:static;line-height:1.5;margin:0;white-space:normal;word-break:keep-all}
.payment-labor input,.payment-labor select{width:100%;min-width:0;box-sizing:border-box;min-height:44px}.payment-labor input[readonly]{background:#f0f4f2}
.payment-labor-summary{display:flex;flex-direction:column;gap:8px;padding:14px 0;border-bottom:1px solid #d6e0dc;overflow-wrap:anywhere}
@media(max-width:600px){.payment-labor{padding:14px}.payment-labor-row{padding:12px}.payment-labor-grid{grid-template-columns:minmax(0,1fr);gap:16px}.payment-labor-row-head .btn{flex:none}}

.project-expense-card{margin:16px 0;padding:18px 22px;background:#fff;border:1px solid #c9d8d4;border-radius:14px;min-width:0;box-sizing:border-box}
.project-card-current{display:flex;align-items:center;justify-content:space-between;gap:16px}.project-card-current>div{display:flex;flex-direction:column;gap:7px;min-width:0}.project-card-current strong{font-size:20px}.project-card-current span,.project-card-current small{color:#637972;line-height:1.5}.project-card-current .btn{flex-shrink:0}
.project-card-history{margin-top:16px;border-top:1px solid #d9e3df;padding-top:14px}.project-card-history summary{cursor:pointer;line-height:1.6;min-height:32px}.project-card-history article{padding:14px 0;border-bottom:1px solid #e4ebe8}.project-card-history article>div{display:flex;flex-direction:column;gap:7px;overflow-wrap:anywhere}.project-card-history p{margin:0;white-space:pre-wrap}.project-card-history small{color:#637972;line-height:1.5}
.project-card-form{display:flex;flex-direction:column;gap:20px;min-width:0}.project-card-form .field{display:flex;flex-direction:column;gap:9px;min-width:0;margin:0}.project-card-form label{position:static;margin:0;line-height:1.5}.project-card-form input,.project-card-form select,.project-card-form textarea{min-width:0;width:100%;box-sizing:border-box}.project-card-note{margin:0;padding:12px 14px;background:#edf4f0;border-radius:10px;line-height:1.7;word-break:keep-all;overflow-wrap:anywhere}
@media(max-width:600px){.project-expense-card{padding:16px}.project-card-current{align-items:stretch;flex-direction:column;gap:14px}.project-card-current .btn{align-self:flex-start}.project-card-history{font-size:14px}.project-card-current strong{font-size:19px}}
.operating-expense-totals{margin:0 20px 20px;padding:18px 20px;border:1px solid #b8cec6;border-radius:12px;background:#eaf3ef;color:#234d44;min-width:0}.operating-expense-total-main{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap}.operating-expense-total-main strong,.operating-expense-total-main small{display:block}.operating-expense-total-main small{margin-top:6px;font-size:12px;line-height:1.6;color:#526d64}.operating-expense-total-main>b{font-size:24px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}.operating-expense-total-breakdown{display:flex;gap:12px 28px;flex-wrap:wrap;margin-top:14px;padding-top:12px;border-top:1px solid #cbdcd5;font-size:14px}.operating-expense-total-breakdown span{display:flex;gap:12px;flex-wrap:wrap}.operating-expense-total-breakdown b{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}@media(max-width:600px){.operating-expense-totals{margin:0 12px 12px;padding:16px}.operating-expense-total-main{align-items:flex-start;flex-direction:column;gap:10px}.operating-expense-total-main>b{font-size:22px}.operating-expense-total-breakdown{flex-direction:column;gap:10px}.operating-expense-total-breakdown span{justify-content:space-between}}

.clobe-small-adjustment{padding:16px;margin:16px 0;border:1px solid #c8a666;border-radius:12px;background:#fff8e8;display:grid;gap:12px;min-width:0}.clobe-small-adjustment[hidden]{display:none}.clobe-small-adjustment p{margin:0}.clobe-small-adjustment label{display:grid;gap:6px;min-width:0}.clobe-small-adjustment label[hidden]{display:none}.clobe-small-adjustment input,.clobe-small-adjustment select,.clobe-small-adjustment button{max-width:100%;min-width:0}.clobe-small-adjustment small{line-height:1.6;overflow-wrap:anywhere}

.paid-method-panel{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px;border:1px solid #c9d9d5;border-radius:12px;margin:16px 0;background:#eef5f1}.paid-method-panel>div{display:grid;gap:6px;min-width:0}.paid-method-panel strong{overflow-wrap:anywhere}.paid-method-panel .btn{flex-shrink:0}@media(max-width:420px){.paid-method-panel{align-items:stretch;flex-direction:column}.paid-method-panel .btn{width:100%}}

/* The release page owns its palette; the signed-in workspace keeps its design. */
.auth-layout {
  --ink: #201f1b;
  --paper: #f5f1e8;
  --muted: #666159;
  --line: #c9c3b8;
  --auth-accent: #ae4e28;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 clamp(24px, 3.2vw, 64px);
  background: var(--paper);
  color: var(--ink);
  overflow: clip;
}
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 86px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.auth-wordmark { display: flex; align-items: center; gap: 17px; }
.auth-layout .auth-symbol { width: 30px; height: 35px; gap: 3px; color: var(--ink); }
.auth-wordmark > span:last-child { display: grid; gap: 6px; }
.auth-wordmark strong { font-size: 22px; font-weight: 650; letter-spacing: .29em; line-height: 1; }
.auth-wordmark small { font-size: 9px; letter-spacing: .37em; }
.auth-header > p { margin: 0; font-size: 10px; font-weight: 500; letter-spacing: .2em; }
.auth-grid { display: grid; grid-template-columns: minmax(0, 1.94fr) minmax(330px, 1fr); gap: 0; }
.auth-announcement { position: relative; isolation: isolate; overflow: hidden; background: var(--paper); min-width: 0; min-height: 780px; padding: 45px 32px 45px 0; }
.auth-intro { position: relative; z-index: 1; }
.auth-release-label { display: flex; align-items: center; gap: 12px; margin: 0 0 19px; font-size: 15px; font-weight: 700; }
.auth-release-label i { width: 10px; height: 10px; border-radius: 50%; background: #d56627; }
.auth-intro h1 { margin: 0; font-size: clamp(37px, 4.15vw, 72px); line-height: 1.1; letter-spacing: -.047em; font-weight: 790; }
.auth-intro h1 > span { white-space: nowrap; }
.auth-release-notes { position: relative; z-index: 1; list-style: none; padding: 0; margin: 24px 0 0; width: min(51%, 440px); }
.auth-release-notes::before { content: ""; position: absolute; z-index: -1; inset: 0 -16px -8px 0; background: var(--paper); box-shadow: 18px 8px 22px 7px var(--paper); }
.auth-release-notes li { display: flex; align-items: flex-start; gap: 18px; padding: 15px 0 14px; }
.auth-release-notes li + li { border-top: 1px solid var(--line); }
.auth-release-notes li > span { color: var(--auth-accent); font-size: 19px; font-weight: 700; line-height: 1.4; }
.auth-release-notes h3 { margin: 0 0 3px; font-size: 19px; font-weight: 730; letter-spacing: -.035em; line-height: 1.4; }
.auth-release-notes p { margin: 0; font-size: 14px; line-height: 1.65; color: #48443e; word-break: keep-all; }
.auth-architecture { display: block; position: absolute; z-index: 0; width: 112%; max-width: none; height: auto; right: -13%; bottom: -19px; mix-blend-mode: multiply; pointer-events: none; }
.auth-panel { position: relative; display: flex; align-items: center; min-width: 0; margin: 45px 0 35px; padding: 20px 0 20px clamp(35px, 4vw, 76px); border-left: 1px solid var(--line); }
.auth-panel .login-card { width: 100%; max-width: 460px; margin-left: auto; }
.auth-layout .login-card h2 { color: var(--ink); font-size: clamp(32px, 3.15vw, 54px); letter-spacing: -.05em; line-height: 1.2; font-weight: 780; }
.auth-layout .login-card .eyebrow { font-size: 11px; color: var(--muted); }
.auth-layout .login-description { max-width: none; margin: 13px 0 42px; font-size: 16px; line-height: 1.55; color: #4a463f; word-break: keep-all; }
.auth-layout .login-form { gap: 24px; }
.auth-layout .login-field { min-width: 0; gap: 10px; }
.auth-layout .login-field > span { color: var(--ink); font-size: 13px; font-weight: 650; }
.auth-layout .login-field input { width: 100%; min-width: 0; height: 52px; padding: 0 16px; border: 1px solid #b8b1a5; border-radius: 2px; background: #ffffff16; color: var(--ink); font-size: 16px; font-weight: 400; }
.auth-layout .login-field input::placeholder { color: #8a847a; font-weight: 400; opacity: 1; }
.auth-layout .login-field input:focus { border-color: var(--auth-accent); outline: 2px solid #ae4e283b; outline-offset: 2px; box-shadow: none; }
.auth-layout .login-submit { position: relative; justify-content: center; gap: 12px; height: 58px; margin-top: 5px; padding: 0 20px; border: 1px solid var(--auth-accent); border-radius: 3px; background: var(--auth-accent); color: #fffaf2; font-size: 17px; font-weight: 650; }
.auth-layout .login-submit > b { position: absolute; right: 21px; font-size: 27px; }
.auth-layout .login-submit:hover { background: #95401e; border-color: #95401e; transform: none; }
.auth-layout .login-submit:disabled { cursor: wait; opacity: .65; }
.auth-layout .passkey-login { margin-top: 12px; gap: 13px; }
.auth-layout .passkey-login > button { border-color: #8b8579; border-radius: 3px; min-height: 54px; padding: 11px 10px; color: var(--ink); }
.auth-layout .passkey-login > button b { font-size: 13px; font-weight: 500; line-height: 1.5; }
.auth-layout .passkey-login > button i { flex-shrink: 0; }
.auth-layout .passkey-login > small { font-size: 11px; line-height: 1.65; color: var(--muted); word-break: keep-all; }
.auth-layout .login-help { margin-top: 23px; font-size: 13px; }
.auth-layout .login-help a { display: inline-flex; align-items: center; min-height: 36px; text-underline-offset: 4px; }
.auth-layout .login-security { margin-top: 29px; padding-top: 21px; border-color: var(--line); color: var(--muted); font-size: 11px; line-height: 1.75; }
.auth-layout .login-error { font-size: 13px; overflow-wrap: anywhere; }
.auth-layout .login-password-rule { font-size: 12px; line-height: 1.7; }
.auth-layout :is(button, a):focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 4px; }
.auth-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; position: relative; z-index: 1; min-height: 69px; padding: 20px 0; border-top: 1px solid var(--line); color: #4f4a42; }
.auth-footer > span { font-size: 10px; letter-spacing: .18em; }
.auth-footer > p { margin: 0; font-size: 13px; }
@media (min-width: 1600px) {
  .auth-announcement { min-height: 840px; }
  .auth-release-notes { margin-top: 32px; width: 440px; }
  .auth-release-notes li { padding: 18px 0; }
  .auth-release-notes h3 { font-size: 21px; }
  .auth-release-notes p { font-size: 16px; }
}
@media (min-width: 901px) and (max-width: 1200px) {
  .auth-grid { grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); }
  .auth-announcement { min-height: 740px; padding-right: 23px; }
  .auth-intro h1 { font-size: 37px; }
  .auth-release-notes { width: 92%; margin-top: 24px; }
  .auth-release-notes::before { display: none; }
  .auth-architecture { position: relative; width: 112%; right: auto; bottom: auto; margin: 20px 0 -45px -4%; }
  .auth-release-notes li { gap: 12px; }
  .auth-release-notes h3 { font-size: 17px; }
  .auth-release-notes p { font-size: 13px; }
  .auth-panel { padding-left: 29px; }
  .auth-layout .login-description { font-size: 14px; }
  .auth-layout .passkey-login > button b { font-size: 12px; }
}
@media (max-width: 900px) {
  .auth-layout { padding: 0 24px; }
  .auth-header { min-height: 72px; padding: 20px 0; }
  .auth-wordmark { gap: 12px; }
  .auth-wordmark strong { font-size: 18px; }
  .auth-wordmark small { font-size: 8px; letter-spacing: .3em; }
  .auth-layout .auth-symbol { width: 25px; height: 30px; }
  .auth-header > p { font-size: 8px; letter-spacing: .12em; }
  .auth-grid { grid-template-columns: minmax(0, 1fr) 150px; gap: 0; max-width: 580px; width: 100%; margin: 0 auto; padding-top: 27px; }
  .auth-announcement { display: contents; }
  .auth-intro { grid-column: 1; grid-row: 1; padding: 0 0 24px; }
  .auth-release-label { font-size: 12px; gap: 8px; margin-bottom: 12px; }
  .auth-release-label i { width: 7px; height: 7px; }
  .auth-intro h1 { font-size: 28px; line-height: 1.2; }
  .auth-architecture { position: static; grid-column: 2; grid-row: 1; align-self: center; width: 155%; margin-left: -35%; margin-top: 9px; max-width: none; }
  .auth-panel { grid-column: 1 / -1; grid-row: 2; margin: 0; padding: 24px 0 30px; border: 0; border-top: 1px solid var(--line); }
  .auth-panel .login-card { max-width: none; margin: 0; }
  .auth-layout .login-card h2 { font-size: 31px; }
  .auth-layout .login-description { font-size: 14px; margin: 10px 0 26px; }
  .auth-layout .login-form { gap: 20px; }
  .auth-layout .login-field input { height: 50px; }
  .auth-layout .login-submit { height: 53px; font-size: 16px; }
  .auth-layout .passkey-login > button { min-height: 50px; }
  .auth-layout .login-help { margin-top: 11px; }
  .auth-layout .login-help a { min-height: 44px; }
  .auth-layout .login-security { margin-top: 13px; padding-top: 17px; }
  .auth-release-notes { grid-column: 1 / -1; grid-row: 3; width: 100%; margin: 0 0 29px; border-top: 1px solid var(--line); }
  .auth-release-notes::before { display: none; }
  .auth-release-notes li { background: none; padding: 17px 0; gap: 16px; }
  .auth-release-notes li > span { font-size: 16px; }
  .auth-release-notes h3 { font-size: 16px; }
  .auth-release-notes p { font-size: 13px; }
  .auth-footer { min-height: 75px; justify-content: center; padding: 20px 0; text-align: center; }
  .auth-footer > span { font-size: 9px; letter-spacing: .11em; }
  .auth-footer > p { display: none; }
}
@media (max-width: 520px) {
  .auth-header > p { max-width: 105px; font-size: 7px; line-height: 1.75; letter-spacing: .09em; text-align: right; }
  .auth-grid { grid-template-columns: minmax(0, 1fr) 95px; }
  .auth-intro h1 { font-size: 25px; }
  .auth-architecture { width: 165%; margin-left: -50%; }
  .auth-footer > span:last-child { display: none; }
}
@media (max-width: 360px) {
  .auth-layout { padding: 0 18px; }
  .auth-header > p { display: none; }
  .auth-grid { grid-template-columns: minmax(0, 1fr) 75px; }
  .auth-intro h1 { font-size: 22px; }
  .auth-layout .passkey-login > button b { font-size: 12px; }
}
