/* SHIO / 汐 — Existing business modules share the same four-color system.
   Loaded after the historical styles; selectors preserve all business markup. */

.ops-content :is(.toolbar, .well-board-head, .quality-page-head) {
  background: var(--shio-paper);
  border: 1px solid var(--shio-mist);
  box-shadow: none;
  border-radius: 6px;
}
.ops-content .toolbar {
  padding: 14px 16px;
  margin-bottom: 20px;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.ops-content :is(.toolbar-left, .toolbar-right) { gap: 8px; min-width: 0; flex-wrap: wrap; }
.ops-content .toolbar-left { flex: 1 1 240px; }
.ops-content .toolbar-right { justify-content: flex-end; }
.ops-content .toolbar .search { width: min(400px, 100%); max-width: 100%; }
.ops-content :is(.list-summary, .field-help, .import-center-card > small) {
  color: var(--shio-sea);
  font-size: 12px;
  line-height: 1.8;
}
.ops-content :is(.card, .quality-panel, .operation-wells-wrap, .table-wrap, .report-card) {
  background: var(--shio-paper);
  border-color: var(--shio-mist);
  box-shadow: none;
  border-radius: 8px;
}
.ops-content .card { padding: 20px; }
.ops-content .card .table-wrap { border-radius: 5px; }
.ops-content .grid { gap: 16px; }
.ops-content .grid > * { min-width: 0; }
.ops-content .section-title {
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--shio-mist);
  flex-wrap: wrap;
}
.ops-content .section-title :is(h2, h3, h4) {
  color: var(--shio-ink);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  letter-spacing: .01em;
  margin: 0 0 4px;
}
.ops-content .section-title > :is(.muted, span) { line-height: 1.8; }
.ops-content :is(.metric, .well-overview-card, .quality-card) {
  background: var(--shio-paper);
  color: var(--shio-ink);
  border: 1px solid var(--shio-mist);
  box-shadow: none;
}
.ops-content .metric { min-height: 110px; padding: 18px 20px; border-radius: 6px; }
.ops-content .metric > span { font-size: 12px; color: var(--shio-sea); }
.ops-content .metric > strong { font-size: 27px; font-weight: 550; line-height: 1.5; letter-spacing: -.03em; }
.ops-content .metric > small { font-size: 12px; line-height: 1.7; color: var(--shio-sea); }

/* Tables retain their data density and use one type and spacing scale. */
.ops-content .table-wrap { max-width: 100%; overflow: auto; }
.ops-content .table-wrap :is(th, td) { padding: 12px 14px; line-height: 1.7; }
.ops-content .table-wrap th {
  background: var(--shio-mist);
  color: var(--shio-ink);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .025em;
  border-color: var(--shio-paper);
  border-bottom: 1px solid var(--shio-sea);
}
.ops-content .table-wrap td { background: var(--shio-paper); color: var(--shio-ink); font-size: 13px; border-color: var(--shio-mist); font-variant-numeric: tabular-nums; }
.ops-content .table-wrap tbody tr:nth-child(even) td { background: var(--shio-paper); }
.ops-content .table-wrap tbody tr:hover td { background: var(--shio-mist); }
.ops-content .table-wrap td > strong { font-weight: 600; }
.ops-content .table-wrap td .muted { margin-top: 3px; font-size: 11px; line-height: 1.7; }
.ops-content :is(.actions, .inline-actions, .table-actions) { gap: 8px; }
.ops-content .table-wrap :is(.actions, .inline-actions, .table-actions) :is(button, a) {
  min-height: 32px;
  font-size: 12px;
  padding: 6px 10px;
}
.ops-content .table-wrap.compact :is(th, td),
.ops-content .compact-table :is(th, td) { padding: 11px 14px; }
.ops-content .empty { padding: 52px 24px; color: var(--shio-sea); font-size: 13px; line-height: 1.9; }

/* Meaning is carried by the existing words plus distinct border treatments,
   never by adding a fifth warning/success/error color. */
.ops-shell .tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  color: var(--shio-sea);
  background: var(--shio-mist);
  border: 1px solid var(--shio-mist);
  border-radius: 5px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.65;
}
.ops-shell .tag.green { border-color: var(--shio-mist); color: var(--shio-sea); background: var(--shio-mist); }
.ops-shell .tag.blue { border-color: var(--shio-sea); color: var(--shio-sea); background: var(--shio-paper); }
.ops-shell .tag.amber { border-color: var(--shio-sea); border-style: dashed; color: var(--shio-ink); background: var(--shio-paper); }
.ops-shell .tag.red { border-color: var(--shio-ink); border-width: 1px 1px 1px 3px; color: var(--shio-ink); background: var(--shio-mist); font-weight: 650; }
.ops-shell .tag.gray { border-color: var(--shio-mist); color: var(--shio-ink); background: var(--shio-paper); }
.ops-content :is(.progress, .progress-cell) { background: var(--shio-mist); border-radius: 3px; }
.ops-content :is(.progress, .progress-cell) > span { background: var(--shio-sea) !important; border-radius: 3px; }
.ops-content .progress-cell strong { color: var(--shio-ink); }
.vessel-map svg, .typhoon-map-shell svg { fill: var(--shio-ink); }

/* Worksites use a calm status rail, not five competing colored cards. */
.ops-content .well-board-head { padding: 20px; gap: 20px; border-top: 2px solid var(--shio-sea); }
.ops-content .well-board-title .eyebrow { color: var(--shio-sea); font-size: 10px; letter-spacing: .14em; font-weight: 500; }
.ops-content .well-board-title h2 { color: var(--shio-ink); font-size: 16px; font-weight: 550; letter-spacing: .01em; line-height: 1.5; margin: 0; }
.ops-content .well-board-title p { margin-top: 8px; color: var(--shio-sea); font-size: 13px; line-height: 1.8; }
.ops-content .well-board-actions { gap: 8px; }
.ops-content .well-overview-grid { gap: 8px; }
.ops-content .well-overview-card { border-radius: 6px; padding: 16px; min-height: 74px; }
.ops-content .well-overview-card strong { font-size: 26px; font-weight: 550; color: var(--shio-ink); }
.ops-content .well-overview-card span { color: var(--shio-sea); font-size: 12px; }
.ops-content .well-overview-card.blue { border-top: 2px solid var(--shio-sea); }
.ops-content .well-overview-card.amber { border-style: dashed; }
.ops-content .well-status-rail { background: var(--shio-sea); width: 3px; border-radius: 2px; }
.ops-content .well-row-gray .well-status-rail { background: var(--shio-mist); border: 1px solid var(--shio-sea); }
.ops-content .well-row-amber .well-status-rail { background: var(--shio-paper); border: 1px dashed var(--shio-sea); }
.ops-content .well-identity strong { font-size: 14px; font-weight: 600; color: var(--shio-ink); }
.ops-content :is(.well-phone, .well-type-cell span, .well-date-cell span, .well-crew-cell span) { color: var(--shio-ink); font-size: 12px; }

/* Legacy personnel boards and editable sheets. */
.ops-content .upcoming-offshore-panel { background: var(--shio-paper) !important; border: 1px solid var(--shio-mist) !important; border-radius: 8px; }
.ops-content .upcoming-offshore-panel > .section-title { padding: 18px 20px; background: var(--shio-paper); border-color: var(--shio-mist); border-top: 2px solid var(--shio-sea); }
.ops-content .upcoming-offshore-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; padding: 16px; gap: 12px !important; }
.ops-content .upcoming-offshore-day { background: var(--shio-paper); border-color: var(--shio-mist); box-shadow: none; border-radius: 8px; overflow: hidden; }
.ops-content .upcoming-offshore-day-head { min-height: 52px; background: var(--shio-mist); border-color: var(--shio-mist); }
.ops-content .upcoming-offshore-day-head strong { font-size: 15px; font-weight: 600; color: var(--shio-ink); }
.ops-content .upcoming-offshore-day-head span { color: var(--shio-sea); font-size: 12px; font-weight: 500; }
.ops-content .upcoming-offshore-section-head,
.ops-content .upcoming-offshore-row { grid-template-columns: minmax(78px, 1fr) minmax(0, 1.2fr) minmax(60px, .8fr) !important; gap: 10px; padding: 10px 12px; }
.ops-content .upcoming-offshore-section-head { background: var(--shio-paper); border-bottom: 1px solid var(--shio-mist); }
.ops-content .upcoming-offshore-section-head :is(strong, span),
.ops-content .upcoming-offshore-section-head::after { font-size: 11px; font-weight: 550; color: var(--shio-sea); }
.ops-content .upcoming-offshore-row :is(strong, .upcoming-offshore-contact) { font-size: 12px; font-weight: 500; color: var(--shio-ink); }
.ops-content .upcoming-offshore-counts { gap: 4px; }
.ops-content .upcoming-offshore-empty { background: var(--shio-paper) !important; border-color: var(--shio-mist) !important; }
.ops-content :is(.workflow-summary, .wbs-workflow-summary) { background: var(--shio-mist); border: 1px solid var(--shio-mist); border-left: 3px solid var(--shio-sea); border-radius: 6px; padding: 16px 20px; margin-bottom: 20px; }
.ops-content .workflow-summary strong { color: var(--shio-ink); font-size: 14px; font-weight: 600; }
.ops-content .workflow-summary span:not(.tag) { color: var(--shio-sea); line-height: 1.8; font-size: 12px; }
.online-sheet :is(.sheet-title-row th, .sheet-onboard-title) { background: var(--shio-mist) !important; color: var(--shio-ink); }
.online-sheet .sheet-offboard-title { background: var(--shio-paper) !important; color: var(--shio-ink); border-bottom: 2px solid var(--shio-sea); }
.online-sheet .sheet-divider { border-left-color: var(--shio-sea) !important; }
.online-sheet :is(.formula-input, .plan-input:disabled) { background: var(--shio-mist); color: var(--shio-ink); }
.online-sheet .plan-input:focus { background: var(--shio-paper); outline-color: var(--shio-sea); }
.sheet-kpis > div { background: var(--shio-paper); border-color: var(--shio-mist); }
.sheet-kpis strong { color: var(--shio-ink); font-weight: 550; }
.sheet-kpis span { color: var(--shio-sea); font-weight: 500; }

/* Reconciliation stays a distinct page section with progressive disclosure. */
.ops-content :is(.logistics-benchmark-panel, .sap-reconcile-panel) { padding: 20px; margin-bottom: 20px; border-top: 2px solid var(--shio-sea); }
.sap-reconcile-form { background: var(--shio-mist); border-color: var(--shio-mist); border-radius: 8px; padding: 20px; gap: 18px; }
.sap-reconcile-form .field label { font-size: 12px; font-weight: 550; color: var(--shio-ink); }
.sap-reconcile-action > span { color: var(--shio-sea); line-height: 1.7; }
.sap-scope-note { border: 1px solid var(--shio-mist); border-radius: 7px; margin: 16px 0; }
.sap-scope-note summary { width: 100%; padding: 13px 16px; color: var(--shio-sea); font-size: 12px; font-weight: 550; }
.sap-scope-note[open] summary { border-bottom: 1px solid var(--shio-mist); }
.sap-scope-note > div { padding: 15px 16px; gap: 12px 22px; }
.sap-scope-note span { white-space: normal; line-height: 1.8; color: var(--shio-ink); }
.sap-scope-note span strong { color: var(--shio-sea); font-weight: 500; font-variant-numeric: tabular-nums; }
.sap-preview-context { background: var(--shio-mist); border-color: var(--shio-mist); border-radius: 8px; }
.sap-preview-context > div { background: var(--shio-paper); padding: 16px; }
.sap-preview-context span { color: var(--shio-sea); }
.sap-breakdown-title { color: var(--shio-ink); font-size: 13px; }
.sap-preview-footnote { font-size: 12px; color: var(--shio-sea); line-height: 1.8; }

/* Notices, import mapping and the system acceptance workbench. */
.ops-shell :is(.import-errors, .warning-note, .success-note, .coverage-box, .readiness-strip, .trial-gate) {
  color: var(--shio-ink);
  background: var(--shio-mist);
  border: 1px solid var(--shio-mist);
  border-radius: 8px;
  box-shadow: none;
  line-height: 1.85;
}
.ops-shell :is(.import-errors, .readiness-strip.danger, .trial-gate.danger) { border-left: 3px solid var(--shio-ink); }
.ops-shell :is(.warning-note, .readiness-strip.warning, .trial-gate.warning) { border: 1px dashed var(--shio-sea); }
.ops-shell :is(.import-errors, .warning-note, .success-note) strong { color: var(--shio-ink); font-weight: 600; }
.ops-shell .import-error-item { background: var(--shio-paper); border-color: var(--shio-mist); color: var(--shio-ink); }
.ops-shell .import-error-index { background: var(--shio-mist); color: var(--shio-ink); border-color: var(--shio-sea); }
.ops-shell :is(.mapping-item, .mapping-item.ok, .result-item, .formula-cell, .system-param, .permission-grid span) { background: var(--shio-paper); border-color: var(--shio-mist); color: var(--shio-ink); border-radius: 6px; }
.ops-shell .mapping-item.missing { border: 1px dashed var(--shio-sea); background: var(--shio-mist); }
.ops-shell :is(.mapping-item, .result-item, .system-param) > span { color: var(--shio-sea); font-size: 12px; }
.ops-shell :is(.mapping-item, .result-item, .system-param) > strong { font-size: 13px; line-height: 1.7; }
.ops-shell .collapsible-panel { background: var(--shio-paper); border-color: var(--shio-mist); border-radius: 6px; box-shadow: none; }
.ops-shell .collapsible-panel summary { padding: 16px 20px; color: var(--shio-ink); background: var(--shio-paper); font-size: 13px; line-height: 1.7; }
.ops-shell .collapsible-panel summary::before { color: var(--shio-sea); }
.ops-shell .collapsible-panel summary small { color: var(--shio-sea); }
.ops-shell .collapsible-panel summary:hover { background: var(--shio-mist); }
.ops-shell .collapsible-panel .collapsible-content { border-color: var(--shio-mist); background: var(--shio-paper); padding: 20px; }
.ops-shell .collapsible-panel.danger { border-left: 3px solid var(--shio-ink); }
.ops-shell .collapsible-panel.warning { border-style: dashed; border-color: var(--shio-sea); }
.ops-content :is(.quality-panel, .acceptance-panel) { padding: 20px; }
.ops-content .quality-page-head { padding: 20px; border-top: 2px solid var(--shio-sea); }
.ops-content .quality-page-head h2 { font-size: 16px; color: var(--shio-ink); font-weight: 550; }
.ops-content .quality-page-head p { color: var(--shio-sea); line-height: 1.8; }
.ops-content :is(.quality-score, .quality-score.ok, .quality-score.warn) { color: var(--shio-ink); background: var(--shio-mist); font-size: 28px; font-weight: 550; }
.ops-content :is(.quality-filter, .acceptance-filters button) { color: var(--shio-sea); background: var(--shio-paper); border-color: var(--shio-mist); border-radius: 6px; }
.ops-content .quality-filter.active { color: var(--shio-paper); background: var(--shio-sea); border-color: var(--shio-sea); }
.ops-content :is(.quality-card, .quality-item) { background: var(--shio-paper); border-color: var(--shio-mist); box-shadow: none; border-radius: 8px; }
.ops-content :is(.quality-card.warning, .quality-item.warning) { border-style: dashed; border-color: var(--shio-sea); }
.ops-content :is(.quality-card.danger, .quality-item.danger) { border-left: 3px solid var(--shio-ink); }
.ops-content :is(.quality-card, .quality-item) :is(p, span) { color: var(--shio-sea); line-height: 1.8; }
.ops-content .quality-item-main strong { color: var(--shio-ink); font-weight: 550; }
.ops-content .user-admin-summary > div { background: var(--shio-mist); border-color: var(--shio-mist); border-radius: 6px; padding: 14px; }
.ops-content .user-admin-summary > div.danger { border-left: 3px solid var(--shio-ink); }
.ops-content .user-admin-summary span { color: var(--shio-sea); font-size: 12px; }
.ops-content .user-admin-summary strong { color: var(--shio-ink); font-weight: 550; }
.ops-content .user-lock-meta { color: var(--shio-ink); font-weight: 550; }
.ops-content .import-center-flow { padding: 20px 24px; gap: 10px; }
.ops-content .import-center-flow span { background: var(--shio-mist); border-color: var(--shio-mist); color: var(--shio-sea); border-radius: 5px; font-size: 12px; }
.ops-content .import-center-card { gap: 10px; min-height: 180px; }
.ops-content .import-center-card > strong { font-size: 23px; font-weight: 550; color: var(--shio-ink); }
.ops-content .import-center-card-foot { border-color: var(--shio-mist); padding-top: 12px; }
.ops-content .report-sections { gap: 24px; margin-top: 24px; }

/* Legacy dialogs remain functional, with one calm surface and clear footers. */
.ops-shell .modal-mask { padding: 28px; backdrop-filter: blur(3px); }
.ops-shell .modal { background: var(--shio-paper); border: 1px solid var(--shio-mist); border-radius: 8px; max-height: 90dvh; }
.ops-shell :is(.modal-head, .modal-foot) { background: var(--shio-paper); border-color: var(--shio-mist); padding: 22px 28px; }
.ops-shell .modal-head { gap: 20px; border-top: 3px solid var(--shio-sea); }
.ops-shell .modal-head h2 { color: var(--shio-ink); font-size: 21px; font-weight: 550; letter-spacing: -.01em; line-height: 1.5; }
.ops-shell .modal-body { padding: 26px 28px; }
.ops-shell .modal-foot { position: sticky; bottom: 0; z-index: 3; gap: 10px; flex-wrap: wrap; }
.ops-shell .modal .field { margin-bottom: 18px; }
.ops-shell .modal .field label { font-size: 12px; color: var(--shio-ink); font-weight: 550; margin-bottom: 8px; }
.ops-shell .modal :is(input, select, textarea) { color: var(--shio-ink); background: var(--shio-paper); border-color: var(--shio-mist); border-radius: 5px; }
.ops-shell .modal :is(input, select, textarea):focus-visible { outline: 2px solid var(--shio-sea); outline-offset: 2px; }
.ops-shell .modal .form-grid { gap: 8px 22px; }
.ops-shell .detail-tabs { gap: 18px; margin-bottom: 24px; border-color: var(--shio-mist); overflow-x: auto; }
.ops-shell .detail-tabs button { color: var(--shio-sea); padding: 13px 4px; white-space: nowrap; font-size: 13px; }
.ops-shell .detail-tabs button.active { color: var(--shio-ink); border-bottom: 2px solid var(--shio-sea); font-weight: 600; }
.ops-shell .modal :is(th, td) { font-size: 12px; line-height: 1.7; padding: 12px; border-color: var(--shio-mist); }
.ops-shell .modal th { background: var(--shio-mist); color: var(--shio-ink); }
.ops-shell .modal td { background: var(--shio-paper); color: var(--shio-ink); }
.ops-shell .modal .muted { color: var(--shio-sea); }
.ops-shell .modal .section-title { margin: 22px 0 16px; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.ops-shell .modal .section-title h2 { font-size: 16px; color: var(--shio-ink); }

@media (max-width: 1200px) {
  .ops-content .upcoming-offshore-grid { grid-template-columns: 1fr !important; }
  .ops-content .upcoming-offshore-section-head,
  .ops-content .upcoming-offshore-row { grid-template-columns: minmax(120px, 1fr) minmax(0, 1.5fr) minmax(100px, .8fr) !important; }
  .sap-reconcile-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ops-content :is(.card, .well-board-head, .quality-page-head, .quality-panel, .acceptance-panel, .logistics-benchmark-panel, .sap-reconcile-panel) { padding: 16px; border-radius: 6px; }
  .ops-content .toolbar { padding: 14px; gap: 12px; margin-bottom: 18px; }
  .ops-content :is(.toolbar-left, .toolbar-right) { flex: 1 1 100%; justify-content: flex-start; }
  .ops-content .toolbar .search { width: 100%; }
  .ops-content .toolbar-right { gap: 8px; }
  .ops-content .toolbar-right button { min-height: 40px; }
  .ops-content .section-title { margin-bottom: 16px; gap: 12px; }
  .ops-content .section-title :is(h2, h3, h4) { font-size: 16px; }
  .ops-content :is(.well-board-title h2, .quality-page-head h2) { font-size: 16px; }
  .ops-content .well-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ops-content .well-overview-card { padding: 12px; min-height: 68px; }
  .ops-content .well-overview-card strong { font-size: 24px; }
  .ops-content .metric { padding: 18px; min-height: 112px; }
  .ops-content .operation-wells-table tbody td { padding: 10px 12px; }
  .ops-content .operation-wells-table tbody tr { border-color: var(--shio-mist); background: var(--shio-paper); box-shadow: none; }
  .ops-content .upcoming-offshore-panel > .section-title { padding: 18px; }
  .ops-content .upcoming-offshore-grid { padding: 12px; gap: 12px !important; }
  .ops-content .upcoming-offshore-section-head,
  .ops-content .upcoming-offshore-row { grid-template-columns: 1fr !important; }
  .ops-content .upcoming-offshore-counts { justify-content: flex-start; }
  .ops-content .upcoming-offshore-section-head::after { display: none; }
  .ops-content :is(.workflow-summary, .wbs-workflow-summary) { padding: 16px; gap: 12px; }
  .sap-reconcile-form { grid-template-columns: 1fr; padding: 16px; gap: 16px; }
  .sap-preview-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sap-scope-note > div { flex-direction: column; gap: 8px; }
  .ops-content .import-center-card { min-height: 156px; }
  .ops-shell .collapsible-panel summary { padding: 14px 16px; }
  .ops-shell .collapsible-panel .collapsible-content { padding: 16px; }
  .ops-shell .modal-mask { padding: 12px; }
  .ops-shell .modal { max-height: 94dvh; border-radius: 8px; }
  .ops-shell :is(.modal-head, .modal-body, .modal-foot) { padding: 18px; }
  .ops-shell .modal-head h2 { font-size: 19px; }
  .ops-shell .modal-head { flex-wrap: wrap; align-items: flex-start; gap: 16px; }
  .ops-shell .modal-head > div { min-width: 0; max-width: 100%; }
  .ops-shell .modal-head > .actions { flex: 1 1 100%; width: 100%; flex-wrap: wrap; gap: 8px; }
  .ops-shell .modal-head > .actions button { white-space: normal; min-height: 40px; }
  .ops-shell .modal .airport-strip { grid-template-columns: minmax(0,1fr); }
  .ops-shell .modal .airport-strip span { min-width: 0; overflow-wrap: anywhere; }
  .ops-shell .modal .grid.cols-3 { grid-template-columns: minmax(0,1fr); }
  .ops-shell .modal .grid > * { min-width: 0; }
  .ops-shell .modal .form-grid { grid-template-columns: minmax(0, 1fr); }
  .ops-shell .modal :is(input, select, textarea) { font-size: 16px; min-height: 44px; }
  .ops-shell .modal :is(input[type="checkbox"], input[type="radio"]) { min-height: 0; }
  .ops-shell .modal-foot button { min-height: 44px; }
  .ops-shell .modal .sheet-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
