/* ═══════════════════════════════════════════════════════════════════════════
   SBR Air — modules/jobs/jobs.record.sa.css  (G2, Nov 6 2026)
   Full job record ("Open full job") in the SBR Air layout. Values are the v1.1 tokens
   (shared/ui/sbr-air.tokens.css), written literally because the record's tab content is legacy markup that
   must stay outside .sa-scope (it relies on the legacy-skin form/table rules).
   ═══════════════════════════════════════════════════════════════════════════ */
.jr-overlay { position: fixed; inset: 0; z-index: 10900; background: rgba(28, 31, 36, .32); align-items: center; justify-content: center; padding: 20px;
  font-family: "SBR Air Inter", Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #1F2328; font-size: 14px; line-height: 20px; }
.jr-panel { width: 100%; max-width: 1180px; height: min(88vh, 900px); display: flex; flex-direction: column; overflow: hidden;
  background: #FFFFFF; border-radius: 12px; box-shadow: 0 12px 32px rgba(16, 24, 40, .16); animation: jr-in .15s ease-out; }
@keyframes jr-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* Header */
.jr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #E4E6EA; flex-shrink: 0; }
.jr-head__info { min-width: 0; }
.jr-head__title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jr-head__title { margin: 0; font-size: 20px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }
.jr-head__sub { margin-top: 2px; font-size: 13px; line-height: 18px; color: #57606A; }
.jr-head__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.jr-btn-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Badge (v1.1 §12) */
.jr-badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 7px; border: 1px solid; border-radius: 4px; font-size: 12px; line-height: 16px; font-weight: 500; white-space: nowrap; }
.jr-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.jr-badge--blue  { background: #EFF4FF; border-color: #BFD3FE; color: #1D4ED8; }
.jr-badge--green { background: #ECFDF3; border-color: #ABEFC6; color: #166534; }
.jr-badge--amber { background: #FFF7E6; border-color: #FCD9A0; color: #92400E; }
.jr-badge--red   { background: #FEF2F2; border-color: #FECACA; color: #B91C1C; }
.jr-badge--gray  { background: #F3F4F6; border-color: #E5E7EB; color: #4B5563; }

/* Buttons (v1.1 §11) */
.jr-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 6px;
  border: 1px solid #8C959F; background: #FFFFFF; color: #1F2328; font: inherit; font-size: 13px; font-weight: 500; white-space: nowrap; cursor: pointer;
  transition: background-color .1s ease-out, border-color .1s ease-out; }
.jr-btn:hover { background: #F7F8FA; }
.jr-btn:active { background: #F0EFEB; }
.jr-btn:focus-visible, .jr-icon-btn:focus-visible, .jr-nav-item:focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
.jr-btn--primary { background: #2563EB; border-color: #2563EB; color: #FFFFFF; font-weight: 600; }
.jr-btn--primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.jr-btn--danger { color: #B91C1C; }
.jr-btn--danger:hover { background: #FEF2F2; border-color: #FECACA; }
.jr-btn--attention { color: #92400E; }
.jr-btn--attention:hover { background: #FFF7E6; border-color: #FCD9A0; }
.jr-btn--success { color: #166534; }
.jr-btn--success:hover { background: #ECFDF3; border-color: #ABEFC6; }
.jr-btn .jr-ico { width: 14px; height: 14px; flex: none; }
.jr-icon-btn { display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 6px; background: transparent; color: #57606A; cursor: pointer; }
.jr-icon-btn:hover { background: #F7F8FA; color: #1F2328; }

/* Body: section nav + content */
.jr-body { display: flex; flex: 1; min-height: 0; }
.jr-side { width: 224px; flex-shrink: 0; display: flex; flex-direction: column; overflow-y: auto; background: #FAFAF8; border-right: 1px solid #E4E6EA; }
.jr-side__meta { padding: 16px; border-bottom: 1px solid #E4E6EA; }
.jr-side__dates { font-size: 13px; line-height: 18px; color: #57606A; }
.jr-side__day { margin-top: 4px; font-size: 13px; font-weight: 600; color: #1D4ED8; }
.jr-side__loc { margin-top: 4px; font-size: 12px; line-height: 16px; color: #636A73; }
.jr-side__nav { padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.jr-nav-item { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px; border-radius: 6px;
  font-size: 14px; color: #57606A; cursor: pointer; position: relative; }
.jr-nav-item:hover { background: #F7F8FA; color: #1F2328; }
.jr-nav-item[aria-current="true"] { background: #F2F6FE; color: #1D4ED8; font-weight: 600; box-shadow: inset 3px 0 0 #2563EB; }
.jr-nav-item i { font-size: 16px; width: 16px; text-align: center; flex: none; }
.jr-side__stats { margin-top: auto; padding: 12px 16px 16px; border-top: 1px solid #E4E6EA; }
.jr-side__stats-title { font-size: 12px; line-height: 16px; font-weight: 600; color: #57606A; margin-bottom: 6px; }
.jr-stat { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; font-size: 13px; line-height: 18px; }
.jr-stat__label { color: #57606A; }
.jr-stat__val { color: #1F2328; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }

.jr-main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-y: auto; background: #F6F5F2; }
.jr-main__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; background: #FFFFFF; border-bottom: 1px solid #E4E6EA; flex-shrink: 0; position: sticky; top: 0; z-index: 2; }
.jr-main__title { margin: 0; font-size: 16px; line-height: 24px; font-weight: 600; }
.jr-main__content { padding: 20px 24px; flex: 1; }

/* Content helpers used by jobs.record.js (section, infoRow, mCard, td, thd) */
.jr-section { background: #FFFFFF; border: 1px solid #E4E6EA; border-radius: 8px; margin-bottom: 16px; }
.jr-section__title { padding: 12px 16px; border-bottom: 1px solid #E4E6EA; font-size: 14px; line-height: 20px; font-weight: 600; }
.jr-section__body { padding: 8px 16px 12px; }
.jr-info { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid #F0EFEB; font-size: 14px; line-height: 20px; }
.jr-info:last-child { border-bottom: 0; }
.jr-info__label { color: #57606A; flex: none; }
.jr-info__val { color: #1F2328; font-weight: 500; text-align: right; }
.jr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.jr-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.jr-metric { background: #FFFFFF; border: 1px solid #E4E6EA; border-radius: 8px; padding: 12px 14px; }
.jr-metric__label { font-size: 12px; line-height: 16px; font-weight: 500; color: #57606A; }
.jr-metric__num { margin-top: 2px; font-size: 24px; line-height: 28px; font-weight: 600; font-variant-numeric: tabular-nums; color: #1F2328; }
.jr-table-wrap { background: #FFFFFF; border: 1px solid #E4E6EA; border-radius: 8px; overflow: auto; }
.jr-table-wrap > table { width: 100%; border-collapse: collapse; font-size: 14px !important; }
.jr-th { height: 36px; padding: 0 10px; text-align: left; white-space: nowrap; }
.jr-td { height: 44px; padding: 6px 10px; border-bottom: 1px solid #E4E6EA; vertical-align: middle; color: #1F2328; }
.jr-td--muted { color: #57606A; }
.jr-td--strong { font-weight: 500; }
.jr-chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-left: 6px; border: 1px solid; border-radius: 999px; font-size: 12px; font-weight: 500; vertical-align: 1px; }
.jr-chip--green { background: #ECFDF3; border-color: #ABEFC6; color: #166534; }
.jr-chip--gray { background: #F3F4F6; border-color: #E5E7EB; color: #4B5563; }
.jr-chip--blue { background: #EFF4FF; border-color: #BFD3FE; color: #1D4ED8; }
.jr-empty { padding: 32px 16px; text-align: center; color: #57606A; font-size: 14px; }

/* Tablet: section nav becomes a horizontal tab strip; phone: full-screen sheet */
@media (max-width: 1023px) {
  .jr-overlay { padding: 0; }
  .jr-panel { max-width: none; height: 100%; border-radius: 0; }
  .jr-body { flex-direction: column; }
  .jr-side { width: auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid #E4E6EA; }
  .jr-side__meta, .jr-side__stats { display: none; }
  .jr-side__nav { flex-direction: row; padding: 6px 8px; }
  .jr-nav-item { white-space: nowrap; height: 40px; }
  .jr-nav-item[aria-current="true"] { box-shadow: inset 0 -2px 0 #2563EB; }
  .jr-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-btn, .jr-icon-btn { min-height: 44px; }
  .jr-icon-btn { width: 44px; }
}
@media (max-width: 767px) {
  .jr-head { flex-direction: column; padding: 12px 16px; }
  .jr-head__actions { justify-content: flex-start; width: 100%; }
  .jr-head__actions .jr-icon-btn { position: absolute; top: 8px; right: 8px; }
  .jr-panel { position: relative; }
  .jr-main__head, .jr-main__content { padding-left: 16px; padding-right: 16px; }
  .jr-grid-2 { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .jr-panel { animation: none; } }
@media print { .jr-overlay { position: static; background: none; padding: 0; } .jr-panel { height: auto; box-shadow: none; } }
.jr-metrics--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.jr-nav-item .sa-ico { display: inline-block; width: 16px; height: 16px; flex: none; line-height: 0; }
.jr-nav-item .sa-ico svg { width: 100%; height: 100%; display: block; }
.jr-info__val { max-width: 60%; }
.jr-section__body > div[style*="justify-content:space-between"] { gap: 12px; }
.jr-crew-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #F0EFEB; }
.jr-crew-row:last-child { border-bottom: 0; }
.jr-crew-row__name { font-size: 14px; font-weight: 500; }
.jr-crew-row__role { font-size: 13px; color: #57606A; }
.jr-crew-row__meta { display: flex; align-items: center; gap: 10px; flex: none; white-space: nowrap; }
.jr-crew-row__meta .jr-chip { margin-left: 0; }
.jr-crew-row__phone { font-size: 13px; color: #57606A; font-variant-numeric: tabular-nums; }
@media (max-width: 1023px) {
  .jr-panel { position: relative; }
  .jr-head { padding-right: 60px; }
  .jr-head__actions .jr-icon-btn { position: absolute; top: 10px; right: 10px; }
  .jr-head__actions { justify-content: flex-start; }
}
