/* Habits and calls stay readable as a work diary, including on narrow screens. */
.modal-card.operations-modal { display: flex; flex-direction: column; max-height: min(92dvh, 900px); overflow: hidden; }
.operations-modal .modal-header, .operations-modal .modal-footer { flex: 0 0 auto; }
.operations-modal .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.ops-root { min-width: 0; }
.ops-tabs { display: flex; gap: 24px; margin: 0 0 24px; border-bottom: 1px solid var(--line, #e6e3df); }
.ops-tabs button { position: relative; min-height: 44px; padding: 8px 0 13px; border: 0; background: transparent; color: #716c64; font: inherit; font-weight: 600; cursor: pointer; }
.ops-tabs button[aria-selected="true"] { color: var(--ink, #1b1916); }
.ops-tabs button[aria-selected="true"]::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--accent, #f26322); content: ""; }
.ops-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin: 0 0 20px; }
.ops-heading h2 { margin: 0 0 7px; font-size: 22px; }
.ops-heading p { max-width: 58ch; margin: 0; color: #6d675f; font-size: 13px; line-height: 1.6; }
.ops-panel { min-width: 0; padding: 23px; border: 1px solid var(--line, #e6e3df); border-radius: 14px; background: #fff; }
.ops-panel + .ops-panel { margin-top: 20px; }
.ops-panel h3 { margin: 0 0 7px; font-size: 16px; }
.ops-panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.ops-panel-heading h3 { margin-bottom: 0; }
.ops-empty { max-width: 65ch; margin: 12px 0; color: #746e66; font-size: 13px; line-height: 1.7; }
.ops-note { margin: 14px 0; padding: 12px 14px; border-left: 3px solid #bfb5a1; border-radius: 0 7px 7px 0; color: #655c4b; background: #f6f3ed; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ops-note.is-ready { border-color: #72917a; color: #47604c; background: #f0f5ef; }
.ops-error { margin: 12px 0; padding: 12px 14px; border: 1px solid #e5c3b9; border-radius: 8px; background: #fcf3ef; color: #8a4437; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.ops-error[hidden], .ops-root [hidden], .operations-modal [hidden] { display: none; }
.ops-list { display: grid; gap: 0; }
.ops-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 19px 0; }
.ops-row:first-child { padding-top: 0; }
.ops-row:last-child { padding-bottom: 0; }
.ops-row + .ops-row { border-top: 1px solid #eeeae5; }
.ops-row-copy { flex: 1 1 300px; min-width: 0; }
.ops-row-copy h3, .ops-row-copy h4 { margin: 0 0 5px; font: inherit; font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.ops-row-copy p { max-width: 70ch; margin: 6px 0 0; color: #716a62; font-size: 12px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: 7px; color: #756e65; font-size: 11px; line-height: 1.6; }
.ops-status { display: inline-flex; align-items: center; width: fit-content; padding: 3px 8px; border-radius: 5px; color: #655e55; background: #f0ece7; font-size: 11px; font-weight: 600; line-height: 1.5; }
.ops-status.is-active, .ops-status.is-completed { color: #47604c; background: #edf3eb; }
.ops-status.is-awaiting_approval, .ops-status.is-uncertain { color: #775a29; background: #f8f0da; }
.ops-status.is-failed, .ops-status.is-blocked, .ops-status.is-rejected { color: #934c40; background: #f8eae5; }
.ops-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; flex: 0 1 280px; gap: 8px; }
.ops-actions .small-action, .ops-actions .button { min-height: 36px; }
.ops-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; margin: 0 0 20px; }
.ops-filter .field-group { flex: 1 1 200px; max-width: 340px; margin: 0; }
.ops-line { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, .7fr); gap: 28px; }
.ops-number { display: block; margin: 10px 0; color: #302a24; font-size: clamp(21px, 4vw, 29px); font-weight: 650; letter-spacing: -.025em; overflow-wrap: anywhere; }
.ops-line-aside { padding-left: 25px; border-left: 1px solid #eee9e1; }
.ops-line-aside p { color: #6d675f; font-size: 12px; line-height: 1.65; }
.ops-form .field-group { margin-bottom: 17px; }
.ops-form label { display: block; margin-bottom: 6px; color: #49423b; font-size: 12px; font-weight: 600; }
.ops-form input:not([type="checkbox"]), .ops-form select, .ops-form textarea { box-sizing: border-box; width: 100%; min-width: 0; min-height: 42px; padding: 10px 11px; border: 1px solid #dfd9d1; border-radius: 8px; color: #39322c; background: #fff; font: inherit; font-size: 13px; }
.ops-form textarea { resize: vertical; line-height: 1.6; }
.ops-form small { display: block; margin-top: 6px; color: #797168; font-size: 11px; line-height: 1.6; }
.ops-two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.ops-check { display: flex !important; align-items: flex-start; gap: 10px; min-height: 30px; line-height: 1.6; }
.ops-check input { margin-top: 4px; accent-color: var(--accent, #f26322); }
.ops-check span { flex: 1; }
.ops-form-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.ops-details { display: grid; gap: 13px; margin: 0 0 20px; }
.ops-details div { min-width: 0; }
.ops-details dt { margin-bottom: 3px; color: #7c7267; font-size: 11px; }
.ops-details dd { margin: 0; color: #3f3831; font-size: 13px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.ops-history { margin: 20px 0 0; padding-left: 18px; border-left: 2px solid #e9e3da; }
.ops-history article + article { margin-top: 18px; }
.ops-history article { min-width: 0; }
.ops-history strong { display: block; color: #51483e; font-size: 12px; }
.ops-history p { margin: 4px 0; color: #776d61; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.ops-transcript { max-height: 360px; padding: 16px; overflow-y: auto; border-radius: 9px; background: #f6f4f0; color: #4a433a; font-size: 13px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }
.operations-modal .modal-copy { font-size: 13px; line-height: 1.65; }
.ops-root button:focus-visible, .operations-modal button:focus-visible, .ops-form :is(input, select, textarea):focus-visible { outline: 2px solid #9b4f2c; outline-offset: 3px; }
.ops-root button:disabled, .operations-modal button:disabled { opacity: .58; cursor: default; }
@media (max-width: 700px) {
  .ops-heading { flex-direction: column; gap: 14px; }
  .ops-heading h2 { font-size: 20px; }
  .ops-panel { padding: 18px; }
  .ops-row { flex-direction: column; gap: 13px; }
  .ops-row-copy { flex-basis: auto; width: 100%; }
  .ops-actions { flex-basis: auto; justify-content: flex-start; width: 100%; }
  .ops-line { grid-template-columns: 1fr; gap: 16px; }
  .ops-line-aside { padding: 17px 0 0; border-top: 1px solid #eee9e1; border-left: 0; }
  .ops-two-fields { grid-template-columns: 1fr; gap: 0; }
  .ops-form-actions .button { flex: 1 1 140px; }
}
@media (max-width: 390px) {
  .ops-panel { padding: 15px; border-radius: 11px; }
  .ops-heading > .button { width: 100%; }
  .ops-actions .small-action { flex: 1 1 115px; }
  .ops-tabs { gap: 22px; }
}
