/* VMA surfaces follow the SMC portal palette. */
:root {
  color-scheme:dark;
  --surface-3:var(--bg-input);
  --border-strong:var(--border-active);
  --vma-accent:color-mix(in srgb,var(--accent) 60%,var(--text-primary));
  --green:color-mix(in srgb,var(--success) 60%,var(--text-primary));
  --amber:color-mix(in srgb,var(--warning) 60%,var(--text-primary));
  --red:color-mix(in srgb,var(--danger) 60%,var(--text-primary));
}
:root:is([data-theme="paper"],[data-theme="harbor-light"],[data-theme="frost"]) { color-scheme:light; }

#smcModuleTopbar .smc-std-module { min-width:0; overflow:hidden; text-overflow:ellipsis; }
#smcModuleTopbar #smcGlobalThemeControl { position:static; z-index:auto; flex:none; }
#smcModuleTopbar .smc-global-theme-toggle { width:auto; height:auto; box-shadow:none; }
#smcModuleTopbar .smc-global-theme-toggle:focus-visible { outline:3px solid var(--vma-accent); outline-offset:2px; }
#smcModuleTopbar .smc-global-theme-panel {
  top:calc(100% + 8px);
  right:10px;
  max-height:65dvh;
  overflow:auto;
}
@media(max-width:980px) {
  #smcModuleTopbar .smc-std-right { flex-wrap:wrap; }
}
@media(min-width:681px) and (max-width:860px) {
  .vessel-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

[hidden] { display:none!important; }
button:focus-visible,a:focus-visible,summary:focus-visible,[tabindex]:focus-visible { outline:3px solid var(--vma-accent); outline-offset:3px; }
.field label,.kpi-card .label { font-size:.72rem; }
.kpi-card .sub { white-space:normal; font-size:.76rem; line-height:1.4; }
.vessel-card .period,.vessel-metric span,.condition-card-meta,.condition-card-components,.quality-row small,.toast span { font-size:.72rem; }
.scope-context { margin:0 0 12px; color:var(--muted); font-size:.78rem; }
.management-insights { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-bottom:14px; }
.insight { padding:16px; border:1px solid var(--border); border-top:3px solid var(--vma-accent); border-radius:8px; background:var(--surface); min-width:0; }
.insight h2 { margin:0 0 7px; font-size:.78rem; text-transform:uppercase; color:var(--muted); }
.insight strong { display:block; font-size:1.05rem; }
.insight p { font-size:.78rem; color:var(--muted); margin:6px 0 12px; }
#managementReportPanel { margin-bottom:12px; }
.text-action { border:0; padding:3px 0; background:none; color:var(--vma-accent); text-decoration:underline; font:700 .78rem 'Rajdhani',sans-serif; cursor:pointer; text-align:left; }
.movement-table { min-width:1460px; }
.movement-table .col-date { width:150px; }
.movement-table .col-vessel { width:175px; }
.movement-table .col-location { width:170px; }
.movement-table .col-timeline { width:500px; }
.movement-table th,.movement-table td { padding:12px; }
.movement-table td:nth-child(2),.movement-table td:nth-child(3) { white-space:normal; overflow-wrap:anywhere; }
.movement-table td:last-child,.movement-table th:last-child { position:sticky; right:0; background:var(--surface); box-shadow:-3px 0 5px rgba(0,0,0,.12); width:110px; }
.timeline,.timeline-scale { display:grid; grid-template-columns:repeat(25,minmax(0,1fr)); width:470px; gap:2px; }
.timeline { height:30px; }
.timeline-scale { font:500 9px 'JetBrains Mono',monospace; margin-top:6px; text-align:center; }
.hour-segment { display:grid; place-items:center; color:white; font:700 8px 'JetBrains Mono',monospace; }
.hour-segment.not-applicable { opacity:.25; background:var(--surface-3); }
.hour-segment.status-SB,.hour-segment.status-DL,.hour-segment.status-DB,.hour-segment.status-AL,.hour-segment.status-AB,.hour-segment.status-PD,
.year-hour-cell.status-SB,.year-hour-cell.status-DL,.year-hour-cell.status-DB,.year-hour-cell.status-AL,.year-hour-cell.status-AB,.year-hour-cell.status-PD { color:#071321; }
.inline-code-legend { display:flex; flex-wrap:wrap; gap:8px 16px; padding:12px 14px; border-bottom:1px solid var(--border); font-size:.76rem; }
.inline-code-legend span { display:inline-flex; align-items:center; gap:6px; }
.inline-code-legend b { color:var(--text); }
.entry-layout { display:grid; grid-template-columns:minmax(0,1fr) 340px; gap:12px; align-items:start; }
.annual-ledger-panel { height:calc(100dvh - 210px); min-height:560px; }
.ledger-edit-bar { align-items:start; flex-direction:column; }
.grid-status-palette { width:100%; }
.ledger-save-tools { width:100%; justify-content:flex-end; }
.grid-status-tool { min-height:32px; min-width:38px; }
.grid-status-tool b { font-size:.65rem; }
.year-grid-controls .control { height:36px; font-size:.78rem; }
.year-date-col .text-action { font-family:inherit; font-size:inherit; }
.day-editor { position:sticky; top:132px; padding-bottom:12px; }
.day-editor .panel-body { display:grid; gap:12px; }
.day-editor .control { width:100%; min-width:0; }
.day-editor textarea { min-height:110px; resize:vertical; }
.day-editor .field { min-width:0; }
.day-nav { display:grid; grid-template-columns:38px minmax(0,1fr) 38px; align-items:end; gap:6px; }
.day-nav .icon-btn { width:38px; }
.hour-range-fields { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.draft-summary { color:var(--muted); font-size:.76rem; line-height:1.45; padding:10px 14px; border-top:1px solid var(--border); margin:0; }
.day-editor .action-btn { width:100%; }
.report-subnav { display:flex; gap:8px; flex-wrap:wrap; margin:14px 0; }
.report-subnav button[aria-pressed="true"] { color:var(--bg-primary); background:var(--vma-accent); border-color:var(--vma-accent); }
.issue-filters { display:flex; align-items:end; flex-wrap:wrap; gap:8px; padding:0 0 14px; }
.issue-filters .field { flex:1; min-width:130px; }
.ai-review-layout { display:block; }
.ai-review-section + .ai-review-section { border-left:0; border-top:1px solid var(--border); }
.ai-issue-list { max-height:none; overflow:visible; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.issue-group { border:1px solid var(--border); border-left:3px solid var(--amber); border-radius:6px; background:var(--surface-2); padding:12px; min-width:0; }
.issue-group.high,.issue-group.critical { border-left-color:var(--red); }
.issue-group summary { cursor:pointer; font-size:.86rem; font-weight:700; }
.issue-group .issue-meta { display:block; color:var(--muted); font-size:.74rem; margin:6px 0; }
.issue-item { display:grid; gap:4px; padding:12px 0; border-top:1px solid var(--border); }
.issue-item small { font-size:.72rem; color:var(--muted); overflow-wrap:anywhere; }
.issue-item p { margin:0; font-size:.78rem; }
.audit-table { min-width:980px; }
.audit-table td { white-space:normal; vertical-align:top; }
.audit-table td:nth-child(1),.audit-table td:nth-child(2),.audit-table td:nth-child(3) { white-space:nowrap; }
.import-guide { color:var(--muted); font-size:.78rem; line-height:1.5; margin:12px 0 0; }
.upload-zone input { display:block; position:relative; width:100%; max-width:300px; height:auto; opacity:1; font-size:.74rem; margin-top:12px; }
.upload-zone:focus-within { outline:3px solid var(--vma-accent); }
.review-dialog { width:min(880px,calc(100vw - 32px)); max-height:85dvh; border:1px solid var(--border-strong); border-radius:10px; padding:22px; background:var(--bg-modal); color:var(--text); }
.review-dialog::backdrop { background:rgba(0,0,0,.65); }
.dialog-head { display:flex; align-items:start; justify-content:space-between; gap:12px; }
.dialog-head h2 { margin:0; }
.review-dialog .warning-item p { overflow-wrap:anywhere; }
.scope-loading { display:none; color:var(--vma-accent); font-size:.76rem; margin:0 0 10px; }
.scope-loading.show { display:block; }
@media(max-width:1200px) { .entry-layout { grid-template-columns:minmax(0,1fr); } .day-editor { position:static; order:-1; } .day-editor .panel-body { grid-template-columns:repeat(2,minmax(0,1fr)); } .day-editor .draft-summary { grid-column:1/-1; } }
@media(max-width:700px) { .management-insights,.ai-issue-list { grid-template-columns:1fr; } .day-editor .panel-body { grid-template-columns:1fr; } .command-controls { width:100%; } .command-controls>.field { min-width:0; max-width:100%; } .command-controls>.field:has(.vessel-switch) { flex-basis:100%; } .module-identity h1 { font-size:1.18rem; } .annual-ledger-panel:not(.full-table-view) { min-height:520px; height:65dvh; } .insight { padding:12px; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { animation-duration:.01ms!important; transition-duration:.01ms!important; scroll-behavior:auto!important; } }
@media print { .day-editor,.report-subnav,.text-action,.scope-loading { display:none!important; } .management-insights { grid-template-columns:repeat(3,1fr); } }

#issueHeading { scroll-margin-top:160px; }

.day-editor { position:static; }
.day-editor .panel-body { gap:8px; }
.day-editor textarea { min-height:84px; }
.day-editor .control { min-height:36px; padding:5px 8px; }

.kpi-unit { display:block; color:var(--muted); font:600 .7rem/1.6 'Rajdhani',sans-serif; }

.hour-segment { font-size:10px; }
.timeline-scale { font-size:10px; }
#focusDayEditorBtn { min-height:32px; margin-bottom:6px; }

/* Informational toasts must not intercept controls underneath. */
.toast-stack { pointer-events:none; }
