/* --------------------------------------------------------------------------
   Portcall lists and edit screen
   -------------------------------------------------------------------------- */
.portcall-imo-panel { width: 33.333%; }
.portcall-imo-duplicate-warning {
    grid-column: 1 / -1;
    margin: 8px 0;
    padding: 14px 16px;
    font-size: 1rem;
    font-weight: 800;
}
.portcall-imo-duplicate-warning .errorlist {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: inherit;
    list-style: none;
}
.status-controls > h2 { margin-bottom: 5px; }
.next-portcall-id-control { display: flex; align-items: stretch; gap: 5px; }
.next-portcall-id-control input { height: var(--sb-control-h); min-width: 110px; }
.portcall-toolbar__actions { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 5px; }
.portcall-list-controls {
    display: grid;
    grid-template-columns: minmax(180px, .9fr) minmax(280px, 1.4fr) minmax(190px, .65fr) minmax(220px, .75fr);
    align-items: stretch;
    gap: 7px;
    margin-bottom: 8px;
}
.portcall-list-control-card {
    margin: 0;
    background: #d2d9de;
    border-color: #a7b2ba;
}

.portcall-list-control-card > h2 { margin: 0 0 6px; color: #203a50; font-size: .8rem; }
#portcall-search {
    height: var(--sb-control-h);
    padding: 2px 0 2px 3px;
}
.portcall-sort-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; align-items: end; }
.portcall-sort-form .field { min-width: 0; margin: 0; }
.portcall-list-control-card--actions .portcall-toolbar__actions {
    height: calc(100% - 1.15rem);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    align-content: center;
}
.portcall-list-control-card--actions .portcall-toolbar__actions .btn { width: 100%; }
.portcall-table__clickable-row { cursor: pointer; }
.portcall-table__clickable-row > td:not(:last-child) { padding: 0; }
.portcall-row-link {
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 5px 7px;
    color: inherit;
    text-decoration: none;
}
.portcall-row-link:hover { color: inherit; text-decoration: none; }
.portcall-date-highlight--today { color: #b42318; font-weight: 700; }
.portcall-date-highlight--adjacent { color: #000; font-weight: 700; }
.portcall-table__clickable-row:focus-visible td { box-shadow: inset 0 0 0 2px rgba(43,107,153,.45); }
.list-section { padding: 7px 8px; }

/* Keep the original column proportions; auto layout lets the new narrow
   progress column take its space from the flexible columns. */
.portcall-table { width: 100%; table-layout: auto; }
.portcall-table__id-column { width: 6%; min-width: 90px; }
.portcall-table thead th { background: #dedede; }
.portcall-table__update-column { width: 2%; min-width: 42px; }
.portcall-table__progress-column { width: 2%; min-width: 42px; text-align: center; white-space: nowrap; }
.portcall-table__name-column { width: 18%; min-width: 160px; white-space: normal; }
.vessel-occurrence-markers { white-space: nowrap; }
.portcall-table__status-column { width: 5%; min-width: 86px; }
.portcall-table__actions-column { width: 4.5%; min-width: 70px; }
.portcall-table--archived .portcall-table__actions-column { width: 9%; min-width: 150px; }
.portcall-table__actions-column .actions { flex-wrap: wrap; }
.portcall-table__actions-column .actions > *,
.portcall-table__actions-column .btn { min-width: 0; max-width: 100%; white-space: normal; }

.portcall-id-with-colors { display: inline-flex; align-items: center; gap: 5px; }
.portcall-color-chip {
    flex: 0 0 var(--portcall-color-chip-width);
    width: var(--portcall-color-chip-width);
    height: auto;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(42,55,71,.16);
    border-radius: 2px;
    background: #fff;
}
.portcall-color-chip i { flex: 0 0 auto; display: block; min-height: 0; }
.portcall-color-chip i + i { border-top: 1px solid #fff; }
.portcall-pin-button--off { background: #eef2f6; color: #516174; }
.portcall-pin-button--on { background: #315f85; border-color: #315f85; color: #fff; }
.portcall-pin-button--on:hover { background: #274d6b; border-color: #274d6b; color: #fff; }

/* Hourly changelog timeline */
.history-hour { margin: 0; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: var(--sb-surface); overflow: hidden; }
.history-hour + .history-hour { margin-top: 8px; }
.history-hour > summary {
    display: grid;
    grid-template-columns: 1fr 20px;
    grid-template-rows: auto auto;
    gap: 6px 12px;
    padding: 9px 11px;
    cursor: pointer;
    list-style: none;
    background: #eef3f7;
    color: #203a50;
}
.history-hour > summary::-webkit-details-marker { display: none; }
.history-hour > summary::marker { content: ""; }
.history-hour__heading { grid-column: 1; grid-row: 1; display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.history-hour > summary small { color: var(--sb-text-soft); font-size: .76rem; font-weight: 600; }
.history-summary { grid-column: 1; grid-row: 2; display: block; margin: 0; padding: 0; color: #29475c; line-height: 1.45; }
.history-hour__chevron {
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sb-text-soft);
    font-size: 1.1rem;
    transition: transform .15s ease;
    align-self: center;
}
.history-hour[open] .history-hour__chevron { transform: rotate(180deg); }
.history-hour[open] .history-change-table-wrap { border-top: 1px solid var(--sb-border); }
.history-summary__label { display: inline-block; margin-right: 8px; color: #50718a; font-size: .72rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.history-summary--pending { color: var(--sb-text-soft); font-style: italic; }
.history-timeline { padding: 12px 14px 14px 23px; }
.history-commit { position: relative; padding: 0 0 13px 16px; border-left: 2px solid #c8d6e0; }
.history-commit:last-child { padding-bottom: 0; border-left-color: transparent; }
.history-commit__marker { position: absolute; top: 2px; left: -6px; width: 10px; height: 10px; border: 2px solid var(--sb-surface); border-radius: 50%; background: #4e7c9b; box-shadow: 0 0 0 1px #4e7c9b; }
.history-commit__content header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.history-commit__content h3 { margin: 0; color: #29475c; font-size: .82rem; }
.history-commit__content header small { color: var(--sb-text-soft); font-size: .75rem; }
.history-change-table-wrap { overflow-x: auto; }
.history-change-table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: .78rem; }
.history-change-table th { padding: 5px 7px; border-bottom: 1px solid #cbd8e1; color: var(--sb-text-soft); font-size: .68rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.history-change-table td { padding: 3.5px 7px; border-top: 1px solid #e7edf1; vertical-align: middle; }
.history-change-table th:first-child, .history-change-table td:first-child { width: 9%; text-align: center; white-space: nowrap; }
.history-change-table td:first-child input[type="radio"] { margin-right: 4px; vertical-align: middle; }
.history-change-table td:nth-child(2) { width: 21%; }
.history-change-table td:nth-child(3) { width: 13%; }
.history-change-table td:nth-child(4), .history-change-table td:nth-child(5) { width: 24%; overflow-wrap: anywhere; }
.history-change-table td:nth-child(6) { width: 15%; white-space: nowrap; }
.history-change-table td:last-child { width: 12%; white-space: nowrap; }
.history-operation { display: inline-flex; padding: 2px 5px; border-radius: 3px; background: #edf2f5; color: #486275; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.history-operation--update { background: #e8f2f8; color: #2e6485; }
.history-operation--creation { background: #eaf6ed; color: #367149; }
.history-operation--deletion { background: #fff0ec; color: #9a4b40; }
.history-operation--restore { background: #f3edfc; color: #704c98; }
.history-value { white-space: pre-wrap; }
.history-empty-value { color: #9aa9b3; }
.history-restore-dialog { width: min(520px, calc(100vw - 28px)); padding: 0; border: 1px solid #aebdca; border-radius: 8px; background: var(--sb-surface); color: var(--sb-text); box-shadow: 0 18px 55px rgba(23,42,58,.28); }
.history-restore-dialog::backdrop { background: rgba(18,32,44,.55); backdrop-filter: blur(2px); }
.history-restore-dialog form { display: grid; gap: 12px; padding: 18px; }
.history-restore-dialog header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.history-restore-dialog h2 { margin: 2px 0 0; color: #203a50; font-size: 1.05rem; }
.history-dialog__eyebrow { color: #61798c; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.history-dialog__close { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: #edf2f5; color: #40566d; cursor: pointer; font-size: 1.25rem; line-height: 1; }
.history-dialog__selection { margin: 0; padding: 8px 10px; border-left: 3px solid #6c93ad; background: #eef4f7; color: #29475c; overflow-wrap: anywhere; }
.history-restore-dialog .field { display: grid; gap: 4px; margin: 0; }
.history-restore-dialog textarea { resize: vertical; }
.history-dialog__notice { margin: 0; color: var(--sb-text-soft); font-size: .75rem; }
.history-dialog__actions { display: flex; justify-content: flex-end; gap: 7px; padding-top: 2px; }

.portcall-create-identity, .portcall-admin-static, .portcall-header-section { margin-bottom: 7px; }
.portcall-identity-fields { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 9px; }
.portcall-vessel-search-row { grid-column: auto; }
.portcall-create-identity .portcall-identity-fields input,
.portcall-create-identity .portcall-identity-fields select { font-size: 1.17rem; }
.portcall-create-identity .portcall-identity-fields select {
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    padding: 2px 24px 2px 3px;
    background-image:
        linear-gradient(45deg, transparent 50%, currentColor 50%),
        linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position:
        calc(100% - 12px) 50%,
        calc(100% - 8px) 50%;
    background-size: 4px 4px, 4px 4px;
    background-repeat: no-repeat;
}
.portcall-vessel-search-row input[type="search"] { width: 100%; }
.portcall-create-identity input[readonly],
.portcall-create-identity input:disabled,
.portcall-create-identity select:disabled { background: #e6e9ec !important; color: #45515d; }
.portcall-form .portcall-header-section input[readonly],
.portcall-form .portcall-header-section input:disabled,
.portcall-form .portcall-header-section select:disabled,
.portcall-form .portcall-header-section textarea[readonly],
.portcall-form .section-wrapper input[readonly],
.portcall-form .section-wrapper input:disabled,
.portcall-form .section-wrapper select:disabled,
.portcall-form .section-wrapper textarea[readonly] {
    background: #e7e7e0 !important;
    color: #45515d;
    cursor: not-allowed;
}
.portcall-vessel-search { position: relative; }
.portcall-vessel-search__menu { position: absolute; z-index: 10; top: calc(100% + 4px); left: 0; right: 0; max-height: 240px; overflow-y: auto; background: #fff; border: 1px solid var(--sb-border-strong); box-shadow: var(--sb-shadow); }
.portcall-vessel-search__option { display: block; width: 100%; padding: 6px 8px; border: 0; background: #fff; color: var(--sb-text); font-size: 1.17rem; text-align: left; cursor: pointer; }
.portcall-vessel-search__option:hover, .portcall-vessel-search__option:focus { background: var(--sb-primary-soft); }
.portcall-create-actions { grid-column: 1 / -1; justify-content: center; margin-top: 4px; }
.portcall-create-errors { min-height: 1.5rem; margin: 0 0 7px; }
.portcall-create-errors ul { margin: 0; }
.portcall-vessel-proposal { display: grid; gap: 8px; margin: 0 0 8px; }
.portcall-vessel-proposal h2, .portcall-vessel-proposal p { margin: 0; }
.portcall-vessel-proposal__choices { display: grid; gap: 6px; }
.portcall-vessel-proposal__choice { display: flex; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--sb-border); border-radius: var(--sb-radius-sm); background: #f7f9fb; }
.portcall-vessel-proposal__confirm, .portcall-vessel-proposal__local { display: flex; gap: 7px; align-items: center; }
.portcall-vessel-history { margin-top: 8px; }
.portcall-vessel-history h2 { margin-top: 0; }
.portcall-vessel-history ul { margin: 0; padding-left: 18px; }
.portcall-operational-status-grid .sub-block-card { margin: 0; }
.portcall-status-fields { display: grid; grid-template-columns: 1fr; gap: 6px; align-items: end; }
.portcall-status-fields .form-row-custom,
.portcall-identity-fields .form-row-custom { display: block; margin: 0; }
.portcall-status-fields .form-row-custom > label,
.portcall-identity-fields .form-row-custom > label { margin-bottom: 3px; }
.portcall-status-fields .field-control,
.portcall-identity-fields .field-control { width: 100%; }
.portcall-sent-change > h3 { margin: 0 0 5px; font-size: .82rem; }

.section-layout { display: flex; flex-direction: column; gap: 6px; }
.section-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); align-items: start; gap: 6px; }
.section-grid--mask-row { --mask-min-column-width: 150px; display: flex; flex-wrap: wrap; gap: 6px; align-items: start; }
.section-grid--mask-row > .sub-block-card {
    flex: var(--mask-block-span, 2) 1 0;
    width: auto;
    min-width: min-content;
}
.section-grid--mask-row > .sub-block-card.mask-row__last-item { flex: 0 0 var(--mask-last-item-width); }
.section-grid--mask-row > .mask-grid-spacer {
    flex: var(--mask-spacer-span, 1) 1 0;
    min-width: 0;
}
.section-grid--mask-row.mask-row--compact > .mask-grid-spacer { display: none; }
.section-grid--mask-row .form-row-custom > label {
    flex: 0 0 40%;
    min-width: 120px;
    max-width: 175px;
}
.section-grid--mask-row .form-row-custom > .field-control {
    flex: 1 1 auto;
    min-width: 135px;
}
.section-grid--mask-row .form-row-custom.form-row-custom--full-width {
    /* Match the minimum content width of a labelled row: label + control + row gap. */
    min-width: calc(120px + 135px + 4px);
}
.form-row-custom.form-row-custom--full-width > .field-control { flex: 1 1 100%; width: 100%; }
.sub-block-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
    margin: 0 0 6px;
    padding: 0 0 5px;
    border-bottom: 1px solid var(--sb-border);
}
.sub-block-heading--colored { border-bottom-width: 3px; border-bottom-color: var(--mask-border); }
.sub-block-heading .sub-block-title {
    flex: 1 1 auto;
    margin: 0;
    padding: 0;
    border-bottom: 0;
}
.sub-block-actions { display: flex; align-items: center; gap: 3px; }
.field-note-toggle {
    flex: 0 0 auto;
    width: 25px;
    min-width: 25px;
    height: 25px;
    min-height: 25px;
    padding: 0;
    border: 1px solid rgba(38,58,85,.5);
    border-radius: 50%;
    background: transparent;
    color: rgba(38,58,85,.5);
    line-height: 1;
}
.field-note-toggle:hover,
.field-note-toggle:focus-visible { background: #fff8cc; color: rgba(38,58,85,.65); }
.field-note-toggle[aria-pressed="true"] { background: transparent; border-color: rgba(38,58,85,.5); color: rgba(38,58,85,.75); }
.field-note-row { margin: 0 0 7px; }
.field-note-separator {
    margin: 8px 0 0;
    border: 0;
    border-top: 1px solid #dfe7ee;
}
.field-note-control { width: 100%; }
.field-note-control .field-note-input {
    width: 100%;
    min-height: 25px;
    padding: 4px var(--sb-control-pad-x);
    padding-left: 4px;
    background: #fff8cc;
    border-color: #d7be5e;
    color: #59480a;
    font-size: .78rem;
}
.portcall-form .section-wrapper .field-note-control .field-note-input[readonly],
.portcall-form .section-wrapper .field-note-control .field-note-input:disabled {
    background: #fff8cc !important;
    color: #59480a;
}
.mask-block-label {
    margin: 5px 0 3px;
    color: var(--sb-text-soft);
    font-weight: 750;
}
.mask-block-spacer { min-height: 10px; }


/* Static and operational scalo data form the strongest nested information level. */
.portcall-create-identity .sub-block-card,
.portcall-admin-static .sub-block-card,
.portcall-header-section .sub-block-card,
.portcall-operational-status-grid > .sub-block-card {
    background: #d2d9de;
    border-color: #a7b2ba;
}
.portcall-create-identity .sub-block-title,
.portcall-admin-static .sub-block-title,
.portcall-header-section .sub-block-title,
.portcall-operational-status-grid > .sub-block-card > .sub-block-title {
    color: #203a50;
}

/* HEADER keeps the former static-data card treatment while retaining MASK row layout. */
.portcall-header-section {
    padding: 0;
}
.portcall-header-section .section-header {
    color: #203a50;
}

/* Dynamic MASK colours */
.mask-value--green  { --mask-bg:#dcefe3; --mask-fg:#1e603d; --mask-border:#9bc9ae; }
.mask-value--red    { --mask-bg:#f8dddd; --mask-fg:#842f2f; --mask-border:#dda6a6; }
.mask-value--yellow { --mask-bg:#fff1bf; --mask-fg:#775b0b; --mask-border:#ddc56f; }
.mask-value--orange { --mask-bg:#f8dfc7; --mask-fg:#7b4719; --mask-border:#ddb284; }
.mask-value--blue   { --mask-bg:#dcebf7; --mask-fg:#285b80; --mask-border:#a5c7df; }
.mask-value--gray   { --mask-bg:#e6e8ea; --mask-fg:#4d535a; --mask-border:#c5c9ce; }
.mask-value--violet { --mask-bg:#eadff6; --mask-fg:#664283; --mask-border:#c8addf; }
.mask-value--purple { --mask-bg:#e6dff6; --mask-fg:#59427e; --mask-border:#bfaedf; }
.mask-value--white  { --mask-bg:#fff; --mask-fg:#263242; --mask-border:#c9d2dc; }
.mask-value--black  { --mask-bg:#2c3036; --mask-fg:#fff; --mask-border:#17191d; }
.mask-value--apricot{ --mask-bg:#f7e0d2; --mask-fg:#744936; --mask-border:#d9b39e; }
.mask-value--azure  { --mask-bg:#dff0fa; --mask-fg:#285d7e; --mask-border:#afd0e3; }
/* Change only colour saturation for dynamic list dropdowns in SCALO edit. */
.portcall-form[data-portcall-edit="1"] .mask-choice-control[class*="mask-value--"] { filter: saturate(150%); }
.mask-choice-control,
.field-control[class*="mask-value--"] .mask-choice-control,
.status-cell[class*="mask-value--"],
.status-value { transition: background-color .12s ease, color .12s ease, border-color .12s ease; }
.mask-choice-control[class*="mask-value--"],
.field-control[class*="mask-value--"] .mask-choice-control {
    background-color: var(--mask-bg);
    color: var(--mask-fg);
    border-color: var(--mask-border);
    font-weight: 750;
}
.mask-reference-control .mask-choice-control[class*="mask-value--"] {
    background-color: var(--mask-bg) !important;
    color: #6b7280;
    border-color: var(--mask-border);
}
.portcall-form .section-wrapper .mask-reference-control .mask-choice-control[class*="mask-value--"] {
    background-color: var(--mask-bg) !important;
    color: #6b7280 !important;
    border-color: var(--mask-border) !important;
}
/* Radio buttons and checkbox groups intentionally keep their neutral native
   background in the port-call edit view. Semantic colours remain available
   for dropdowns and for the read-only STATUS grid. */

/* Collaborative port-call editing */
.portcall-live-status {
    display: inline-flex;
    align-items: center;
    min-height: 1.8rem;
    padding: .18rem .5rem;
    border: 1px solid var(--sb-border);
    border-radius: var(--sb-radius-sm);
    background: var(--sb-surface);
    font-size: .78rem;
    font-weight: 650;
    white-space: nowrap;
}
.portcall-live-status.is-saved { background: #dffbe4; border-color: #b8d8be; }
.portcall-live-status.is-error { background: #fff0ec; border-color: #e6b3a5; }
.portcall-live-status.is-remote { background: #fff500; border-color: #c9ad00; color: #3d3200; }
.live-field-conflict { outline: 2px solid #d98745 !important; outline-offset: 1px; }
.live-field-invalid { outline: 2px solid #c7473f !important; outline-offset: 1px; }
.live-field-remote { animation: starboard-live-field-flash 2.2s ease-out; }
.live-field-message {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .45rem;
    margin-top: .25rem;
    padding: .25rem .4rem;
    border-radius: var(--sb-radius-sm);
    font-size: .78rem;
    line-height: 1.25;
}
.live-field-message--error { background: #fff0ec; border: 1px solid #e6b3a5; }
@keyframes starboard-live-field-flash {
    0% { box-shadow: 0 0 0 3px rgba(217, 135, 69, .35); background: #fff2e6; }
    100% { box-shadow: none; }
}
/* --------------------------------------------------------------------------
   Port-call collaboration and STATUS refinements
   -------------------------------------------------------------------------- */
.portcall-operational-status-grid {
    display: grid;
    /* Fr tracks consume the complete row after gaps; their ratios compensate
       for the requested control widths instead of leaving a trailing void. */
    grid-template-columns: 29.4fr 29.4fr 7fr 15fr 11fr;
    align-items: stretch;
    gap: 7px;
    margin-bottom: 7px;
}
.portcall-operational-pair {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 6px 9px;
    align-items: end;
}
.portcall-operational-triplet {
    display: grid;
    grid-template-columns: minmax(0, 1.53fr) minmax(0, .8fr) minmax(0, .48fr);
    gap: 6px 9px;
    align-items: end;
}
.portcall-operational-pair .form-row-custom,
.portcall-operational-triplet .form-row-custom { display: block; margin: 0; }
.portcall-operational-pair .form-row-custom > label,
.portcall-operational-triplet .form-row-custom > label { display: block; margin-bottom: 3px; }
.portcall-operational-pair .field-control,
.portcall-operational-triplet .field-control { width: 100%; }
.portcall-form-row--eta-time .field-control,
.portcall-form-row--ets-time .field-control { width: 96%; }
.portcall-form-row--status .field-control { width: 100%; }
.portcall-form-row--logbook > label { white-space: nowrap; }
.portcall-form-row--logbook .field-control { width: 100%; }
.portcall-operational-single--stacked .form-row-custom { display: block; }
.portcall-operational-single--stacked .form-row-custom > label { display: block; margin-bottom: 3px; }
.portcall-operational-single--stacked .field-control { width: 100%; }

.portcall-change-panel {
    background: #fff1df;
    border-color: #e7c28f;
    border-left: 3px solid #d9902f;
}
.portcall-change-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.portcall-change-heading h2 { margin: 0 0 2px; font-size: .82rem; }
.portcall-change-heading p { margin: 0; font-size: .78rem; color: #6f5b43; }
.portcall-change-ack { flex: 0 0 auto; background: #fff; border-color: #d8a866; color: #704b1e; }
.portcall-change-ack:hover { background: #ffe6c5; border-color: #ca9143; color: #5e3b12; }
.portcall-change-ack:disabled { opacity: .55; cursor: not-allowed; }
.portcall-email-ack-warning { margin: 0 0 12px; }
.btn-disabled[data-portcall-email-action] { pointer-events: auto; }
.portcall-change-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    align-items: start;
}
.portcall-change-section-group {
    grid-column: 1 / -1;
    min-width: 0;
}
.portcall-change-section-title {
    margin: 0;
    color: #67471e;
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .025em;
}
.portcall-change-section-group > hr {
    margin: 3px 0 6px;
    border: 0;
    border-top: 1px solid #d9b47d;
}
.portcall-change-block-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.portcall-change-block-card,
.portcall-change-section-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e5c49b;
    border-radius: var(--sb-radius-sm);
    background: rgba(255,255,255,.55);
}
.portcall-change-block-card > h4,
.portcall-change-section-card > h3 {
    margin: 0;
    padding: 4px 6px;
    background: #f7ddbb;
    border-bottom: 1px solid #e5c49b;
    color: #67471e;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.missing-fields-panel { width: 100%; }
.missing-fields-list { margin: 0; padding: 6px 8px 7px 22px; font-size: .78rem; }
.missing-fields-list li { margin: 2px 0; color: #4f4335; font-weight: 750; }
.portcall-change-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: .78rem; }
.portcall-change-table th,
.portcall-change-table td {
    padding: 3px 4px;
    border-right: 1px solid #ead7be;
    border-bottom: 1px solid #ead7be;
    vertical-align: top;
    overflow-wrap: anywhere;
    background: transparent !important;
}
.portcall-change-table tr:last-child > * { border-bottom: 0; }
.portcall-change-table tr > *:last-child { border-right: 0; }
.portcall-change-table thead th { color: #735a3c; font-size: .78rem; font-weight: 800; text-align: left; }
.portcall-change-table th:nth-child(1), .portcall-change-table td:nth-child(1) { width: 36%; }
.portcall-change-table th:nth-child(2), .portcall-change-table td:nth-child(2),
.portcall-change-table th:nth-child(3), .portcall-change-table td:nth-child(3) { width: 32%; }
.portcall-change-row--conflict td { background: rgba(255,226,191,.55) !important; }
.portcall-change-conflict-note { margin-top: 3px; color: #8b4c10; font-size: .78rem; font-weight: 750; }
.portcall-change-conflict-actions { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.portcall-change-conflict-actions .btn { min-height: 1.45rem; padding: .08rem .28rem; font-size: .78rem; }
.portcall-change-panel--live { margin-top: 7px; }

/* Structural STATUS removals are grouped separately from field-level changes. */
.portcall-deleted-blocks { grid-column: 1 / -1; }
.portcall-change-table--deleted-blocks th,
.portcall-change-table--deleted-blocks td {
    width: 50%;
}

.portcall-summary-section { overflow-x: auto; }
.portcall-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 7px;
    align-items: start;
    min-width: 0;
}
.portcall-summary-card { min-width: 0; }
.portcall-summary-block-separator {
    margin: 8px 0;
    border: 0;
    border-top: 1px solid var(--sb-border-strong);
}
.portcall-summary-block__label {
    margin: 0 0 3px;
    color: #516176;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .025em;
    text-transform: uppercase;
}
.portcall-summary-row {
    display: block;
    padding: 2px 0;
    border-top: 1px solid #e8edf1;
    font-size: .78rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}
.portcall-summary-row__label { color: #31465c; font-weight: 500; }
.portcall-summary-row__value { font-weight: 850; }
.portcall-summary-row__value--multiline { display: block; margin-top: 2px; white-space: pre-wrap; }
.portcall-summary-row__value--colored {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid var(--mask-border);
    border-radius: 3px;
    background-color: var(--mask-bg);
    color: var(--mask-fg);
}
.portcall-summary-row__note {
    display: inline-block;
    padding: 1px 5px;
    border: 1px solid #d7be5e;
    border-radius: 3px;
    background: #fff8cc;
    color: #70590d;
    font-weight: 650;
    white-space: pre-wrap;
}
.portcall-summary-empty { margin: 0; color: var(--sb-text-soft); font-size: .78rem; }
