.oft-page { padding: 24px; color: var(--text, #142c4a); min-width: 0; }
.oft-page [hidden], .oft-gate [hidden] { display: none !important; }
.oft-page h2, .oft-page h3, .oft-page p { margin: 0; }
.oft-page p { line-height: 1.5; }
.oft-heading, .oft-section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.oft-heading h2 { margin: 5px 0 8px; font-size: 24px; }
.oft-heading p, .oft-section-heading p { color: #71829a; font-size: 14px; max-width: 760px; }
.oft-gate { display: flex; align-items: center; justify-content: space-between; gap: 18px; background: #fff5e6; border: 1px solid #f4d5a2; border-left: 4px solid #df8b16; border-radius: 12px; padding: 18px 20px; margin: 16px 0; }
.oft-gate p { margin: 6px 0 0; color: #745222; line-height: 1.5; }
.oft-gate .btn { flex-shrink: 0; }
.oft-period { background: #f0f5ff; border: 1px solid #d9e5fa; border-radius: 12px; padding: 15px 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 5px; }
.oft-period span { font-size: 15px; font-weight: 600; }
.oft-period p, .oft-hint, .oft-explanation { font-size: 14px; color: #5a6c83; }
.oft-version { max-width: 100%; margin-bottom: 20px; }
.oft-version .select { max-width: 680px; }
.oft-version p { font-size: 13px; color: #a4670c; margin-top: 8px; }
.oft-hint { margin: 14px 0 !important; }
.oft-explanation { margin: 18px 0; padding-left: 12px; border-left: 3px solid #a3b9e7; line-height: 1.6; }
.oft-roles { display: grid; gap: 14px; margin-bottom: 18px; }
.oft-role { border: 1px solid #dce5f1; border-radius: 13px; padding: 18px; background: #fff; min-width: 0; }
.oft-role.is-custom { border-color: #e3c786; }
.oft-role > header { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.oft-role h3 { font-size: 17px; overflow-wrap: anywhere; }
.oft-role > header span { display: block; font-size: 12px; color: #7d8ba0; margin-top: 5px; }
.oft-role-fields { display: grid; grid-template-columns: minmax(120px, .85fr) minmax(150px, 1.2fr) minmax(130px, 1fr) minmax(140px, 1fr); gap: 14px; align-items: end; }
.oft-page .field { min-width: 0; margin: 0; }
.oft-page .field > span { display: block; white-space: normal; margin-bottom: 7px; font-size: 13px; line-height: 1.3; }
.oft-page .input, .oft-page .select, .oft-page .textarea { width: 100%; max-width: 100%; box-sizing: border-box; min-width: 0; }
.oft-page input[readonly], .oft-page textarea[readonly] { background: #f7f9fc; }
.oft-source-note { font-size: 12px; color: #8290a4; margin-top: 12px !important; }
.oft-source-rate { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.oft-source-rate small { color: #758297; line-height: 1.4; }
.oft-role-total { padding: 11px 13px; border-radius: 9px; background: #f2f6ff; display: flex; flex-direction: column; gap: 5px; }
.oft-role-total span { font-size: 11px; color: #6a7c97; }
.oft-role-total strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.oft-reason { margin-top: 14px !important; }
.oft-optional-hours { display: grid; grid-template-columns: minmax(180px, 1fr) 1fr; gap: 15px; margin-top: 15px; align-items: end; }
.oft-optional-hours small { color: #75859a; font-size: 12px; line-height: 1.5; }
.oft-total { display: flex; align-items: center; justify-content: space-between; gap: 18px; border-radius: 12px; background: #eaf3ff; padding: 18px; margin: 18px 0; }
.oft-total > div { display: flex; flex-direction: column; gap: 7px; }
.oft-total strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.oft-total span { color: #5b7191; font-size: 13px; }
.oft-zero { padding: 16px; border: 1px solid #ead3a6; background: #fff9ef; border-radius: 12px; margin: 16px 0; }
.oft-check { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; line-height: 1.5; font-size: 14px; }
.oft-check input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.oft-page form > .field { margin: 16px 0; }
.oft-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin: 18px 0; }
.oft-add { margin-top: 22px; border-radius: 12px; border: 1px dashed #a6b9d6; padding: 20px; }
.oft-add h3 { margin-bottom: 9px; }
.oft-add p { font-size: 13px; color: #74849a; margin-bottom: 16px; }
.oft-add-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.oft-wide { grid-column: 1 / -1; }
.oft-history, .oft-analysis { margin-top: 30px; border-top: 1px solid #e2e9f3; padding-top: 25px; }
.oft-history h3, .oft-analysis h3 { font-size: 18px; margin-bottom: 8px; }
.oft-section-heading form { display: flex; align-items: flex-end; gap: 10px; }
.oft-history-list { display: flex; flex-direction: column; gap: 8px; }
.oft-history-row { border: 1px solid #e0e7f2; border-radius: 10px; background: #fff; padding: 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto 20px; gap: 14px; text-align: left; color: inherit; cursor: pointer; font: inherit; }
.oft-history-row:hover, .oft-history-row[aria-current] { background: #f1f6ff; border-color: #b9cef5; }
.oft-history-row small { display: block; margin-top: 5px; font-size: 12px; color: #7a8aa0; }
.oft-empty { padding: 20px; color: #718198; background: #f7f9fc; border-radius: 10px; line-height: 1.5; }
.oft-analysis > p, .oft-analysis li { font-size: 13px; color: #6e7f94; line-height: 1.5; }
.oft-analysis-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 15px; }
.oft-analysis-metrics > div { display: flex; flex-direction: column; gap: 8px; background: #f6f8fc; border-radius: 10px; padding: 15px; }
.oft-analysis-metrics span, .oft-analysis-metrics small { color: #75859a; font-size: 12px; }
.oft-analysis-metrics strong { font-size: 21px; }
.oft-page .form-error:not(:empty) { color: #b22532; background: #fff0f1; border-radius: 9px; padding: 12px; margin-top: 14px; line-height: 1.5; }
.oft-page .notice ul { margin: 0; padding-left: 22px; }
.oft-shift-start { display: flex; align-items: center; gap: 12px; margin: 16px 0; }
.oft-shift-start small { color: #72849b; }
.oft-cost-detail, .oft-reconciliation { margin-top: 18px; border: 1px solid #dde6f2; border-radius: 10px; padding: 15px; }
.oft-cost-detail summary, .oft-reconciliation summary { cursor: pointer; font-weight: 600; }
.oft-cost-detail p, .oft-reconciliation p { margin: 12px 0; }
.oft-cost-detail dl > div { display: flex; justify-content: space-between; gap: 20px; padding: 7px 0; }
.oft-cost-detail dd { margin: 0; font-weight: 600; }
.oft-reconciliation-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) repeat(3, minmax(100px, 1fr)); gap: 12px; padding: 14px 0; border-bottom: 1px solid #e3eaf4; }
.oft-reconciliation-row > div { display: flex; flex-direction: column; gap: 5px; }
.oft-reconciliation-row span, .oft-reconciliation-row small { font-size: 12px; color: #73839a; }
@media (max-width: 1050px) {
  .oft-role-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oft-section-heading { flex-direction: column; }
  .oft-total { flex-wrap: wrap; }
}
@media (max-width: 620px) {
  .oft-page { padding: 16px 12px; }
  .oft-heading, .oft-gate { flex-direction: column; align-items: stretch; gap: 12px; }
  .oft-heading .badge { align-self: flex-start; }
  .oft-heading h2 { font-size: 21px; }
  .oft-gate { margin: 12px 0; padding: 15px; }
  .oft-role { padding: 14px 12px; }
  .oft-role-fields { gap: 13px 10px; }
  .oft-page .input, .oft-page .select, .oft-page .textarea { font-size: 16px; min-height: 44px; }
  .oft-page .btn { min-height: 44px; white-space: normal; }
  .oft-source-rate { grid-column: 1 / -1; }
  .oft-optional-hours { grid-template-columns: 1fr; gap: 8px; }
  .oft-total { align-items: stretch; gap: 13px; }
  .oft-total > .btn { width: 100%; }
  .oft-actions { flex-direction: column; }
  .oft-add { padding: 14px; }
  .oft-add-fields { grid-template-columns: 1fr; }
  .oft-section-heading form { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oft-section-heading form .btn { grid-column: 1 / -1; }
  .oft-history-row { grid-template-columns: minmax(0, 1fr) 20px; }
  .oft-history-row > span:nth-child(2) { grid-column: 1; grid-row: 2; }
  .oft-history-row > span:last-child { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .oft-shift-start { flex-direction: column; align-items: stretch; }
  .oft-reconciliation-row { grid-template-columns: 1fr; }
  .oft-reconciliation-row > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .oft-reconciliation-row small { grid-column: 2; }
}
