/* ═══════════════════════════════════════════════════════════════════════
   ui/shared/crew_planning_editor.css                    [CREW-DEM-4 D4.3]
   THE stylesheet of the shared Crew Planning editor (crew_planning_editor.js).
   Loaded by Ops Settings (ui/gbc_dashboard.html) and by Sales V2
   (ui/sales_v2/shell.html) — one OCC visual language, one implementation.

   Every rule is scoped to the component root (#gbc-cpe.gbc-cpe), so it never
   reaches the host page, and it is specific enough to hold against a host's
   own panel theme. The visual language is the accepted D4.2D Crew Complement
   workspace: light #f1f5f9 workspace, white OCC cards with a 4px left accent,
   compact uppercase labels, white controls, blue primary actions, red outlined
   Withdraw, amber for a missing prerequisite, collapsed Technical evidence.
   Host differences are layout only (data-cpe-host): inside the Sales dialog
   the dialog body is the ONE scroll container, so nothing in here scrolls.
   ═══════════════════════════════════════════════════════════════════════ */

#gbc-cpe.gbc-cpe { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; color: #334155; font-size: 12px; line-height: 1.5; min-width: 0; max-width: 100%; }
#gbc-cpe.gbc-cpe *, #gbc-cpe.gbc-cpe *::before, #gbc-cpe.gbc-cpe *::after { box-sizing: border-box; }

/* read-only notice — the same `manage_crew` gate in both hosts */
#gbc-cpe.gbc-cpe .os-cc-ro {
    margin: 0 0 14px; padding: 9px 12px; border-radius: 6px; font-size: 12px; font-weight: 600; line-height: 1.5;
    background: #fffbeb; border: 1px solid #f59e0b; color: #92400e;
}
#gbc-cpe.gbc-cpe .os-cc-ro[hidden], #gbc-cpe.gbc-cpe [hidden] { display: none !important; }

/* cards — white OCC sections, fine blue-grey border, 4px left accent */
#gbc-cpe.gbc-cpe .os-card {
    background: #ffffff !important; border: 1px solid #e2e8f0 !important; border-left: 4px solid #93c5fd !important;
    border-radius: 8px !important; margin: 0 0 16px; padding: 0 0 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); overflow: visible;
}
#gbc-cpe.gbc-cpe #os-cc-role-ref.os-card { border-left-color: #cbd5e1 !important; }
#gbc-cpe.gbc-cpe .os-card-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    background: #ffffff !important; border-bottom: 1px solid #e2e8f0 !important; padding: 12px 16px; border-radius: 8px 8px 0 0;
}
#gbc-cpe.gbc-cpe .os-card-title { color: #0f172a !important; font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: none; }
#gbc-cpe.gbc-cpe .os-card-count { color: #475569 !important; font-size: 11px; font-weight: 600; }

/* explanation */
#gbc-cpe.gbc-cpe .os-cc-guide { background: #ffffff !important; color: #475569 !important; border: 0 !important; font-size: 12px; line-height: 1.6; padding: 12px 16px 4px; max-width: 132ch; }

/* status strips — blue informational, amber required, neutral optional, red inconsistent / to review */
#gbc-cpe.gbc-cpe .os-cc-strip {
    display: flex; align-items: center; gap: 8px; margin: 8px 16px 0; padding: 8px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 600; letter-spacing: .01em;
    background: #f8fafc !important; border: 1px solid #cbd5e1 !important; color: #475569 !important;
}
#gbc-cpe.gbc-cpe .os-cc-strip:empty { display: none; }
#gbc-cpe.gbc-cpe .os-cc-strip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; background: currentColor; }
#gbc-cpe.gbc-cpe .os-cc-strip.is-ok       { background: #eff6ff !important; border-color: #93c5fd !important; color: #1d4ed8 !important; }
#gbc-cpe.gbc-cpe .os-cc-strip.is-required { background: #fffbeb !important; border-color: #f59e0b !important; color: #92400e !important; }
#gbc-cpe.gbc-cpe .os-cc-strip.is-optional { background: #f8fafc !important; border-color: #cbd5e1 !important; border-style: dashed !important; color: #475569 !important; }
#gbc-cpe.gbc-cpe .os-cc-strip.is-inconsistent { background: #fef2f2 !important; border-color: #fca5a5 !important; color: #b91c1c !important; }

/* automatic Operating AOC / FTL line — read only, blue informational */
#gbc-cpe.gbc-cpe .os-cc-ctx {
    margin: 10px 16px 0; padding: 9px 12px; font-size: 12px; line-height: 1.55; border-radius: 6px;
    background: #f0f9ff !important; border: 1px solid #bae6fd !important; border-left: 3px solid #0284c7 !important; color: #0c4a6e !important;
}
#gbc-cpe.gbc-cpe .os-cc-ctx b { color: #075985 !important; font-weight: 700; }
#gbc-cpe.gbc-cpe .os-cc-ctx .os-muted { color: #0369a1 !important; }

/* declaration forms — an inset band, compact uppercase labels, white controls */
#gbc-cpe.gbc-cpe .os-cc-form {
    display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end;
    margin: 12px 16px 0; padding: 12px 14px 14px; gap: 12px 14px; border-radius: 6px;
    background: #f8fafc !important; border: 1px solid #e2e8f0 !important;
}
#gbc-cpe.gbc-cpe .os-cc-form label {
    display: flex; flex-direction: column; gap: 5px; min-width: 0; grid-column: span 3;
    color: #475569 !important; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
#gbc-cpe.gbc-cpe .os-cc-form input, #gbc-cpe.gbc-cpe .os-cc-form select,
#gbc-cpe.gbc-cpe .os-moc-positions select, #gbc-cpe.gbc-cpe .os-moc-positions input:not([type="checkbox"]) {
    width: 100%; min-width: 0; margin: 0; background: #ffffff !important; border: 1px solid #cbd5e1 !important; border-radius: 4px;
    color: #0f172a !important; font: inherit; font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none;
    padding: 6px 8px; min-height: 30px; box-shadow: none !important;
}
#gbc-cpe.gbc-cpe input::placeholder { color: #94a3b8; }
#gbc-cpe.gbc-cpe .os-cc-form input:focus, #gbc-cpe.gbc-cpe .os-cc-form select:focus,
#gbc-cpe.gbc-cpe .os-moc-positions select:focus, #gbc-cpe.gbc-cpe .os-moc-positions input:not([type="checkbox"]):focus { border-color: #2563eb !important; outline: none; }
#gbc-cpe.gbc-cpe .os-cc-form input[readonly] { background: #f1f5f9 !important; color: #334155 !important; border-style: dashed !important; }
#gbc-cpe.gbc-cpe .os-moc-positions input[data-moc="label"][readonly] {
    background: #f1f5f9 !important; color: #1e3a8a !important; border-style: dashed !important; font-weight: 700; cursor: default;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .02em;
}
#gbc-cpe.gbc-cpe [disabled] { background: #f1f5f9 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#gbc-cpe.gbc-cpe .os-cc-act { display: flex; align-items: flex-end; }
#gbc-cpe.gbc-cpe .os-cc-act .os-add-btn { width: 100%; }

/* 1 · Minimum Operating Crew — scope, then authority and effective dates */
#gbc-cpe.gbc-cpe #os-cc-min-form > label:nth-child(n+5) { grid-column: span 4; border-top: 1px solid #e2e8f0; padding-top: 12px; }
/* 2 · Crew Base Assignment — scope; dates and declarer; source and the action */
#gbc-cpe.gbc-cpe #os-crew-base-form > label, #gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-act { grid-column: span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(4) { grid-row: 2; grid-column: 1 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(5) { grid-row: 2; grid-column: 5 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(8) { grid-row: 2; grid-column: 9 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(6) { grid-row: 3; grid-column: 1 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(7) { grid-row: 3; grid-column: 5 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-act { grid-row: 3; grid-column: 9 / span 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-msg { grid-row: 4; }
#gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(n+4), #gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-act { border-top: 1px solid #e2e8f0; padding-top: 12px; }
/* 3 · Planning Capacity — rank and scope; limits and dates; source and declarer; the action */
#gbc-cpe.gbc-cpe #os-plan-cap-form > label:nth-child(n+9) { grid-column: span 4; }
#gbc-cpe.gbc-cpe #os-plan-cap-form > label:nth-child(n+5) { border-top: 1px solid #e2e8f0; padding-top: 12px; }
#gbc-cpe.gbc-cpe #os-plan-cap-form > .os-cc-act { grid-column: 1 / span 4; }
#gbc-cpe.gbc-cpe .os-cc-form > .os-cc-msg { grid-column: 1 / -1; }

/* crew-position composition */
#gbc-cpe.gbc-cpe .os-moc-positions-wrap { margin: 12px 16px 0; padding: 0; border: 1px solid #e2e8f0; border-radius: 6px; background: #ffffff; }
#gbc-cpe.gbc-cpe .os-moc-positions td { vertical-align: middle; }
#gbc-cpe.gbc-cpe .os-moc-positions td:nth-child(1) { min-width: 190px; }
#gbc-cpe.gbc-cpe .os-moc-positions td:nth-child(3) { min-width: 130px; }
#gbc-cpe.gbc-cpe .os-moc-positions td:nth-child(4) { width: 84px; }
#gbc-cpe.gbc-cpe .os-moc-flag label { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: #334155 !important; white-space: nowrap; text-transform: none; letter-spacing: 0; font-weight: 500; }
#gbc-cpe.gbc-cpe .os-moc-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px 16px 2px; }
#gbc-cpe.gbc-cpe .os-moc-pos { font-size: 12px; line-height: 1.7; }
#gbc-cpe.gbc-cpe .os-moc-rowacts { display: flex; gap: 6px; flex-direction: column; align-items: stretch; }

/* tables — white, readable rows, wrapping headers, no page overflow */
#gbc-cpe.gbc-cpe .os-cc-scroll { margin: 12px 16px 0; max-width: calc(100% - 32px); overflow-x: auto; }
#gbc-cpe.gbc-cpe .os-cc-scroll.os-moc-positions-wrap { max-width: calc(100% - 32px); }
#gbc-cpe.gbc-cpe .os-table { width: 100%; min-width: 100%; border-collapse: collapse; background: #ffffff !important; font-size: 12px; }
#gbc-cpe.gbc-cpe .os-table thead tr { background: #f8fafc !important; }
#gbc-cpe.gbc-cpe .os-table thead th {
    color: #475569 !important; background: #f8fafc !important; border-bottom: 1px solid #e2e8f0 !important; text-align: left;
    font-size: 10px !important; font-weight: 700; letter-spacing: .06em !important; text-transform: uppercase; padding: 8px 10px !important; white-space: normal !important;
}
#gbc-cpe.gbc-cpe .os-table tbody tr { border-top: 1px solid #eef2f7 !important; background: #ffffff !important; }
#gbc-cpe.gbc-cpe .os-table tbody tr:nth-child(2n) { background: #fbfcfe !important; }
#gbc-cpe.gbc-cpe .os-table tbody tr:hover { background: #f8fafc !important; }
#gbc-cpe.gbc-cpe .os-table td { color: #1e293b !important; padding: 9px 10px !important; vertical-align: top; overflow-wrap: break-word; border: 0; background: transparent; }
#gbc-cpe.gbc-cpe .os-mono, #gbc-cpe.gbc-cpe .os-table td.os-mono { color: #1d4ed8 !important; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#gbc-cpe.gbc-cpe .os-table td.os-mono { white-space: nowrap; }
#gbc-cpe.gbc-cpe .os-muted { color: #64748b !important; }
/* the declared register — the declaration in force reads first and strongest */
#gbc-cpe.gbc-cpe #os-cc-min-crew > .os-cc-scroll:not(.os-moc-positions-wrap) { border: 1px solid #bfdbfe; border-left: 3px solid #2563eb; border-radius: 6px; background: #ffffff; }
#gbc-cpe.gbc-cpe #os-cc-min-crew > .os-cc-scroll:not(.os-moc-positions-wrap) thead th { background: #eff6ff !important; color: #1e3a8a !important; }
#gbc-cpe.gbc-cpe #os-cc-min-tbody > tr[data-fleet-type] > td:nth-child(1), #gbc-cpe.gbc-cpe #os-cc-min-tbody > tr[data-fleet-type] > td:nth-child(5) { white-space: nowrap; }
#gbc-cpe.gbc-cpe #os-cc-min-tbody > tr[data-fleet-type] > td:nth-child(3) { min-width: 180px; }
/* 4 · Role Reference */
#gbc-cpe.gbc-cpe #os-cc-role-ref .os-table td:nth-child(1) { white-space: nowrap; width: 90px; }
#gbc-cpe.gbc-cpe #os-cc-role-ref .os-table td:nth-child(2) { font-weight: 600; color: #0f172a !important; }
#gbc-cpe.gbc-cpe #os-cc-role-ref .os-table td:nth-child(2) .os-muted { font-weight: 400; }

/* reference templates (Ops Settings only) — clearly secondary */
#gbc-cpe.gbc-cpe .os-moc-subhead {
    display: flex; align-items: center; gap: 8px; margin: 16px 16px 0; padding: 10px 0 6px; border-top: 1px dashed #cbd5e1 !important;
    color: #64748b !important; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
#gbc-cpe.gbc-cpe #os-complement-list { margin: 0 16px; border: 1px solid #e2e8f0; border-radius: 6px; background: #f8fafc; overflow: hidden; }
#gbc-cpe.gbc-cpe .os-comp-row { border-bottom: 1px solid #e2e8f0 !important; background: #f8fafc; padding: 10px 12px; flex-wrap: wrap; }
#gbc-cpe.gbc-cpe .os-comp-row:last-child { border-bottom: none !important; }
#gbc-cpe.gbc-cpe .os-comp-fleet { color: #334155 !important; }
#gbc-cpe.gbc-cpe .os-comp-meta { color: #64748b !important; font-size: 10.5px; white-space: normal; }
#gbc-cpe.gbc-cpe .os-cc-rowstate { display: block; font-size: 11px; margin-top: 5px; color: #475569 !important; }
#gbc-cpe.gbc-cpe .os-cc-rowstate.is-ok { color: #1d4ed8 !important; }
#gbc-cpe.gbc-cpe .os-cc-rowstate.is-ref { color: #475569 !important; font-style: italic; }
#gbc-cpe.gbc-cpe .os-chip.empty { background: #f1f5f9 !important; color: #64748b !important; border-color: #cbd5e1 !important; }

/* pills */
#gbc-cpe.gbc-cpe .os-pill { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
#gbc-cpe.gbc-cpe .os-pill.ok   { background: #f0fdf4 !important; color: #166534 !important; border: 1px solid #bbf7d0 !important; }
#gbc-cpe.gbc-cpe .os-pill.warn { background: #fffbeb !important; color: #92400e !important; border: 1px solid #fde68a !important; }
#gbc-cpe.gbc-cpe .os-pill.crit { background: #fef2f2 !important; color: #b91c1c !important; border: 1px solid #fecaca !important; }
#gbc-cpe.gbc-cpe .os-pill.off  { background: #f8fafc !important; color: #475569 !important; border: 1px solid #e2e8f0 !important; }

/* actions — blue primary, neutral secondary, red outlined Withdraw */
#gbc-cpe.gbc-cpe .os-add-btn {
    background: #2563eb !important; border: 1px solid #2563eb !important; color: #ffffff !important; cursor: pointer;
    border-radius: 6px !important; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .02em; padding: 7px 14px; min-height: 32px;
}
#gbc-cpe.gbc-cpe .os-add-btn:hover { background: #1d4ed8 !important; border-color: #1d4ed8 !important; }
#gbc-cpe.gbc-cpe .os-row-btn {
    background: #ffffff !important; border: 1px solid #cbd5e1 !important; color: #334155 !important; cursor: pointer;
    border-radius: 6px !important; font: inherit; font-size: 11.5px; font-weight: 600; padding: 5px 10px; min-height: 28px; white-space: nowrap;
}
#gbc-cpe.gbc-cpe .os-row-btn:hover { background: #eff6ff !important; border-color: #93c5fd !important; color: #1d4ed8 !important; }
#gbc-cpe.gbc-cpe .os-row-btn.os-moc-withdraw { border-color: #dc2626 !important; color: #b91c1c !important; }
#gbc-cpe.gbc-cpe .os-row-btn.os-moc-withdraw:hover { background: #fef2f2 !important; border-color: #b91c1c !important; color: #991b1b !important; }

/* messages — next to the affected section */
#gbc-cpe.gbc-cpe .os-cc-msg { font-size: 12px; line-height: 1.5; color: #475569 !important; min-height: 1px; }
#gbc-cpe.gbc-cpe .os-cc-msg:not(:empty) { padding: 8px 12px; border-radius: 6px; background: #f8fafc; border: 1px solid #e2e8f0; }
#gbc-cpe.gbc-cpe .os-moc-msg:not(:empty) { margin: 8px 16px 0; }
#gbc-cpe.gbc-cpe .os-cc-msg.is-ok { color: #1d4ed8 !important; background: #eff6ff; border-color: #93c5fd; }
#gbc-cpe.gbc-cpe .os-cc-msg.is-refused { color: #92400e !important; background: #fffbeb; border-color: #f59e0b; }

/* refused fields / inconsistent or to-review records — red */
#gbc-cpe.gbc-cpe #os-cc-min-form .is-invalid,
#gbc-cpe.gbc-cpe .os-moc-positions select.is-invalid,
#gbc-cpe.gbc-cpe .os-moc-positions input.is-invalid:not([type="checkbox"]) { border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626 !important; background: #fef2f2 !important; }
#gbc-cpe.gbc-cpe .os-moc-positions input[type="checkbox"].is-invalid { outline: 2px solid #dc2626; outline-offset: 1px; }
#gbc-cpe.gbc-cpe .os-moc-positions tr.is-invalid td { background: #fef2f2 !important; }
#gbc-cpe.gbc-cpe .os-moc-positions tr.is-invalid td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
#gbc-cpe.gbc-cpe #os-cc-min-tbody tr.is-inconsistent td { background: #fef2f2 !important; }
#gbc-cpe.gbc-cpe #os-cc-min-tbody tr.is-inconsistent td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
#gbc-cpe.gbc-cpe .os-moc-incons { color: #991b1b !important; font-size: 12px; line-height: 1.45; margin-top: 6px; padding: 6px 8px; border-radius: 4px; background: #fee2e2; border: 1px solid #fecaca; overflow-wrap: anywhere; }
#gbc-cpe.gbc-cpe .os-moc-incons b { color: #b91c1c !important; }
#gbc-cpe.gbc-cpe .os-moc-review { color: #92400e !important; background: #fffbeb; border-color: #fde68a; }
#gbc-cpe.gbc-cpe .os-moc-review b { color: #92400e !important; }

/* technical evidence — collapsed, quiet, at the foot of each card */
#gbc-cpe.gbc-cpe .os-cc-tech { margin-top: 14px; border-top: 1px solid #e2e8f0 !important; background: #fcfdfe; }
#gbc-cpe.gbc-cpe .os-cc-tech > summary { list-style: none; cursor: pointer; padding: 9px 16px; font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #64748b !important; }
#gbc-cpe.gbc-cpe .os-cc-tech > summary::-webkit-details-marker { display: none; }
#gbc-cpe.gbc-cpe .os-cc-tech > summary::before { content: '\25B8  '; }
#gbc-cpe.gbc-cpe .os-cc-tech[open] > summary::before { content: '\25BE  '; }
#gbc-cpe.gbc-cpe .os-cc-tech > summary:hover { color: #1d4ed8 !important; }
#gbc-cpe.gbc-cpe .os-cc-tech-body { padding: 0 16px 10px; color: #475569 !important; font-size: 11px; overflow-wrap: anywhere; }
#gbc-cpe.gbc-cpe .os-cc-tech-body .os-mono { color: #334155 !important; font-weight: 500; }

/* visible keyboard focus */
#gbc-cpe.gbc-cpe input:focus-visible, #gbc-cpe.gbc-cpe select:focus-visible, #gbc-cpe.gbc-cpe button:focus-visible,
#gbc-cpe.gbc-cpe .os-cc-tech > summary:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }

/* the withdrawal confirmation — fixed, above either host's dialogs */
#gbc-cpe.gbc-cpe .os-moc-dlg { position: fixed; inset: 0; z-index: 10050; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 23, .72); }
#gbc-cpe.gbc-cpe .os-moc-dlg[hidden] { display: none !important; }
#gbc-cpe.gbc-cpe .os-moc-dlg-box { width: min(520px, calc(100vw - 32px)); padding: 18px 20px 16px; border-radius: 10px; border: 1px solid #334155; background: #0f172a; color: #e2e8f0; box-shadow: 0 20px 50px rgba(0, 0, 0, .55); font-size: 13px; line-height: 1.5; }
#gbc-cpe.gbc-cpe .os-moc-dlg-title { margin: 0 0 8px; font-size: 14px; font-weight: 700; color: #f1f5f9; overflow-wrap: anywhere; }
#gbc-cpe.gbc-cpe .os-moc-dlg-body { margin: 0 0 16px; color: #cbd5e1; }
#gbc-cpe.gbc-cpe .os-moc-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
#gbc-cpe.gbc-cpe .os-moc-dlg-acts button { font: inherit; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 6px; cursor: pointer; border: 1px solid #334155; background: #1e293b; color: #e2e8f0; }
#gbc-cpe.gbc-cpe .os-moc-dlg-acts button.is-danger { border-color: #b91c1c; background: #7f1d1d; color: #fee2e2; }
#gbc-cpe.gbc-cpe .os-moc-dlg-acts button:focus-visible { outline: 2px solid #38bdf8 !important; outline-offset: 2px; }

/* ── host layout: Sales dialog — the dialog body is the ONE scroll container ── */
#gbc-cpe.gbc-cpe[data-cpe-host="sales"] .os-cc-scroll { overflow: visible; }
#gbc-cpe.gbc-cpe[data-cpe-host="sales"] .os-table { table-layout: auto; }
#gbc-cpe.gbc-cpe[data-cpe-host="sales"] .os-table td { white-space: normal; }

/* narrower screens (1440 × 900 and below): forms fall back to two / three columns */
@media (max-width: 1500px) {
    #gbc-cpe.gbc-cpe .os-cc-guide { font-size: 11.5px; }
    #gbc-cpe.gbc-cpe .os-cc-form { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    #gbc-cpe.gbc-cpe .os-cc-form label, #gbc-cpe.gbc-cpe .os-cc-form > .os-cc-act,
    #gbc-cpe.gbc-cpe #os-cc-min-form > label:nth-child(n+5), #gbc-cpe.gbc-cpe #os-plan-cap-form > label:nth-child(n+9),
    #gbc-cpe.gbc-cpe #os-plan-cap-form > .os-cc-act { grid-column: span 2; grid-row: auto; }
    #gbc-cpe.gbc-cpe #os-crew-base-form > label, #gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-act,
    #gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(n) { grid-column: span 2; grid-row: auto; }
    #gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-msg { grid-row: auto; }
}
@media (max-width: 1100px) {
    #gbc-cpe.gbc-cpe .os-cc-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    #gbc-cpe.gbc-cpe .os-cc-form label, #gbc-cpe.gbc-cpe .os-cc-form > .os-cc-act,
    #gbc-cpe.gbc-cpe #os-cc-min-form > label:nth-child(n+5), #gbc-cpe.gbc-cpe #os-plan-cap-form > label:nth-child(n+9),
    #gbc-cpe.gbc-cpe #os-plan-cap-form > .os-cc-act, #gbc-cpe.gbc-cpe #os-crew-base-form > label:nth-child(n),
    #gbc-cpe.gbc-cpe #os-crew-base-form > .os-cc-act { grid-column: span 1; }
}
