/* SMC Unified Responsive Layout Contract v1.0 — 2026-09-08 */

:root {
  --smc-page-gutter:clamp(12px,1.4vw,28px);
  --smc-dashboard-max:1920px;
  --smc-content-max:1760px;
  --smc-table-row-min:36px;
}

body { min-width:320px; }

table th,
table td { min-height:var(--smc-table-row-min); vertical-align:middle; }

@media (min-width:1600px) {
  html[data-smc-module="pms"] #page,
  html[data-smc-module="hire"] .hire-shell,
  html[data-smc-module="admin"] main.main {
    width:min(94vw,var(--smc-dashboard-max)) !important;
    max-width:var(--smc-dashboard-max) !important;
    margin-left:auto !important;
    margin-right:auto !important;
  }

  html[data-smc-module="pms"] #page { padding-left:var(--smc-page-gutter) !important; padding-right:var(--smc-page-gutter) !important; }
  html[data-smc-module="hire"] .hire-shell { padding-left:var(--smc-page-gutter) !important; padding-right:var(--smc-page-gutter) !important; }

  html[data-smc-module="spares"] main.app {
    grid-template-columns:minmax(280px,360px) minmax(0,1fr) !important;
    width:100% !important;
  }

  html[data-smc-module="spares"] main.app > .main,
  html[data-smc-module="spares"] section.main,
  html[data-smc-module="spares"] .table-wrap,
  html[data-smc-module="spares"] .tableWrap {
    width:100% !important;
    max-width:none !important;
    min-width:0 !important;
  }

  html[data-smc-module="spares"] table { width:100% !important; min-width:1380px; }
}

@media (min-width:2560px) {
  html[data-smc-module="purchase"] .main,
  html[data-smc-module="inventory"] .main,
  html[data-smc-module="crew"] .app-shell,
  html[data-smc-module="log-books"] .lb-app {
    padding-left:clamp(16px,1vw,30px);
    padding-right:clamp(16px,1vw,30px);
  }
}

@media (max-width:860px) {
  :root { --smc-page-gutter:10px; --smc-table-row-min:40px; }
  .smc-topbar,
  .smc-module-topbar,
  [data-smc-module-topbar],
  .topbar { min-height:52px; }
}

@media (prefers-reduced-motion:reduce) {
  *,
  *::before,
  *::after {
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    scroll-behavior:auto !important;
    transition-duration:.01ms !important;
  }
}
