/* ebmsNGYEP portal stylesheet - plain hand-written CSS, no build step.
   Native cascade layers keep the precedence the portal always had:
   theme < base < utilities < everything unlayered further down.
   Per-tenant brand variables (--brand10..--brand160, --colorBrand*) are emitted per request
   from PrincipalBranding (see BrandRamp.cs); --color-brand falls back when none are set. */
@layer theme, base, utilities;

@layer theme {
  :root {
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
      "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji",
      "Segoe UI Symbol", "Noto Color Emoji";
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
      "Courier New", monospace;
    --color-red-50: oklch(97.1% 0.013 17.38);
    --color-red-200: oklch(88.5% 0.062 18.334);
    --color-red-700: oklch(50.5% 0.213 27.518);
    --color-gray-100: oklch(96.7% 0.003 264.542);
    --color-gray-300: oklch(87.2% 0.01 258.338);
    --color-gray-400: oklch(70.7% 0.022 261.325);
    --color-gray-500: oklch(55.1% 0.027 264.364);
    --color-gray-600: oklch(44.6% 0.03 256.802);
    --color-gray-700: oklch(37.3% 0.034 259.733);
    --color-gray-900: oklch(21% 0.034 264.665);
    --color-white: #fff;
    --spacing: 0.25rem;
    --container-3xl: 48rem;
    --text-xs: 0.75rem;
    --text-xs--line-height: calc(1 / 0.75);
    --text-sm: 0.875rem;
    --text-sm--line-height: calc(1.25 / 0.875);
    --text-lg: 1.125rem;
    --text-lg--line-height: calc(1.75 / 1.125);
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --tracking-wide: 0.025em;
    --tracking-wider: 0.05em;
    --leading-relaxed: 1.625;
    --radius-xl: var(--radiusXLarge);
    --radius-2xl: 1rem;
    --default-font-family: var(--font-sans);
    --default-mono-font-family: var(--font-mono);
    --color-brand: var(--colorBrandBackground, var(--brand, #1b6ec2));
    --color-brand-ink: var(--colorNeutralForegroundOnBrand, var(--brand-ink, #ffffff));
  }
}

@layer base {
  *, ::after, ::before, ::backdrop, ::file-selector-button {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    border: 0 solid;
  }
  html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
    font-family: var(--default-font-family, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");
    font-feature-settings: var(--default-font-feature-settings, normal);
    font-variation-settings: var(--default-font-variation-settings, normal);
    -webkit-tap-highlight-color: transparent;
  }
  hr {
    height: 0;
    color: inherit;
    border-top-width: 1px;
  }
  abbr:where([title]) {
    -webkit-text-decoration: underline dotted;
    text-decoration: underline dotted;
  }
  h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
  }
  a {
    color: inherit;
    -webkit-text-decoration: inherit;
    text-decoration: inherit;
  }
  b, strong {
    font-weight: bolder;
  }
  code, kbd, samp, pre {
    font-family: var(--default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);
    font-feature-settings: var(--default-mono-font-feature-settings, normal);
    font-variation-settings: var(--default-mono-font-variation-settings, normal);
    font-size: 1em;
  }
  small {
    font-size: 80%;
  }
  sub, sup {
    font-size: 75%;
    line-height: 0;
    position: relative;
    vertical-align: baseline;
  }
  sub {
    bottom: -0.25em;
  }
  sup {
    top: -0.5em;
  }
  table {
    text-indent: 0;
    border-color: inherit;
    border-collapse: collapse;
  }
  :-moz-focusring:where(:not(iframe)) {
    outline: auto;
  }
  progress {
    vertical-align: baseline;
  }
  summary {
    display: list-item;
  }
  ol, ul, menu {
    list-style: none;
  }
  img, svg, video, canvas, audio, iframe, embed, object {
    display: block;
    vertical-align: middle;
  }
  img, video {
    max-width: 100%;
    height: auto;
  }
  button, input, select, optgroup, textarea, ::file-selector-button {
    font: inherit;
    font-feature-settings: inherit;
    font-variation-settings: inherit;
    letter-spacing: inherit;
    color: inherit;
    border-radius: 0;
    background-color: transparent;
    opacity: 1;
  }
  :where(select:is([multiple], [size])) optgroup {
    font-weight: bolder;
  }
  :where(select:is([multiple], [size])) optgroup option {
    padding-inline-start: 20px;
  }
  ::file-selector-button {
    margin-inline-end: 4px;
  }
  ::placeholder {
    opacity: 1;
  }
  @supports (not (-webkit-appearance: -apple-pay-button))  or (contain-intrinsic-size: 1px) {
    ::placeholder {
      color: currentcolor;
      @supports (color: color-mix(in lab, red, red)) {
        color: color-mix(in oklab, currentcolor 50%, transparent);
      }
    }
  }
  textarea {
    resize: vertical;
  }
  ::-webkit-search-decoration {
    -webkit-appearance: none;
  }
  ::-webkit-date-and-time-value {
    min-height: 1lh;
    text-align: inherit;
  }
  ::-webkit-datetime-edit {
    display: inline-flex;
  }
  ::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
  }
  ::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
    padding-block: 0;
  }
  ::-webkit-calendar-picker-indicator {
    line-height: 1;
  }
  :-moz-ui-invalid {
    box-shadow: none;
  }
  button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
    appearance: button;
  }
  ::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
    height: auto;
  }
  [hidden]:where(:not([hidden="until-found"])) {
    display: none !important;
  }
}

@layer utilities {
  .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border-width: 0;
  }
  .mx-auto {
    margin-inline: auto;
  }
  .mt-0\.5 {
    margin-top: calc(var(--spacing) * 0.5);
  }
  .mt-1 {
    margin-top: var(--spacing);
  }
  .mt-2 {
    margin-top: calc(var(--spacing) * 2);
  }
  .mt-4 {
    margin-top: calc(var(--spacing) * 4);
  }
  .mt-5 {
    margin-top: calc(var(--spacing) * 5);
  }
  .mt-6 {
    margin-top: calc(var(--spacing) * 6);
  }
  .mr-2 {
    margin-right: calc(var(--spacing) * 2);
  }
  .mb-1 {
    margin-bottom: var(--spacing);
  }
  .mb-2 {
    margin-bottom: calc(var(--spacing) * 2);
  }
  .mb-3 {
    margin-bottom: calc(var(--spacing) * 3);
  }
  .mb-4 {
    margin-bottom: calc(var(--spacing) * 4);
  }
  .mb-6 {
    margin-bottom: calc(var(--spacing) * 6);
  }
  .mb-8 {
    margin-bottom: calc(var(--spacing) * 8);
  }
  .mb-16 {
    margin-bottom: calc(var(--spacing) * 16);
  }
  .ml-auto {
    margin-left: auto;
  }
  .block {
    display: block;
  }
  .flex {
    display: flex;
  }
  .grid {
    display: grid;
  }
  .hidden {
    display: none;
  }
  .inline-flex {
    display: inline-flex;
  }
  .h-9 {
    height: calc(var(--spacing) * 9);
  }
  .h-10 {
    height: calc(var(--spacing) * 10);
  }
  .h-16 {
    height: calc(var(--spacing) * 16);
  }
  .min-h-screen {
    min-height: 100vh;
  }
  .w-1\/2 {
    width: calc(1 / 2 * 100%);
  }
  .w-64 {
    width: calc(var(--spacing) * 64);
  }
  .w-auto {
    width: auto;
  }
  .w-full {
    width: 100%;
  }
  .max-w-3xl {
    max-width: var(--container-3xl);
  }
  .grow {
    flex-grow: 1;
  }
  .border-collapse {
    border-collapse: collapse;
  }
  .list-disc {
    list-style-type: disc;
  }
  .grid-cols-7 {
    grid-template-columns: repeat(7, minmax(0, 1fr));
  }
  .grid-cols-\[1fr_auto_1fr\] {
    grid-template-columns: 1fr auto 1fr;
  }
  .flex-col {
    flex-direction: column;
  }
  .flex-wrap {
    flex-wrap: wrap;
  }
  .items-center {
    align-items: center;
  }
  .items-start {
    align-items: flex-start;
  }
  .justify-between {
    justify-content: space-between;
  }
  .gap-1 {
    gap: var(--spacing);
  }
  .gap-1\.5 {
    gap: calc(var(--spacing) * 1.5);
  }
  .gap-2 {
    gap: calc(var(--spacing) * 2);
  }
  .gap-2\.5 {
    gap: calc(var(--spacing) * 2.5);
  }
  .gap-3 {
    gap: calc(var(--spacing) * 3);
  }
  .gap-4 {
    gap: calc(var(--spacing) * 4);
  }
  :where(.space-y-3 > :not(:last-child)) {
    margin-block-end: calc(var(--spacing) * 3);
  }
  .rounded-2xl {
    border-radius: var(--radius-2xl);
  }
  .rounded-xl {
    border-radius: var(--radius-xl);
  }
  .border {
    border-style: solid;
    border-width: 1px;
  }
  .border-t {
    border-top-style: solid;
    border-top-width: 1px;
  }
  .border-dashed {
    border-style: dashed;
  }
  .border-gray-300 {
    border-color: var(--color-gray-300);
  }
  .border-gray-400 {
    border-color: var(--color-gray-400);
  }
  .border-gray-500 {
    border-color: var(--color-gray-500);
  }
  .border-red-200 {
    border-color: var(--color-red-200);
  }
  .bg-gray-100 {
    background-color: var(--color-gray-100);
  }
  .bg-red-50 {
    background-color: var(--color-red-50);
  }
  .bg-white {
    background-color: var(--color-white);
  }
  .p-4 {
    padding: calc(var(--spacing) * 4);
  }
  .p-6 {
    padding: calc(var(--spacing) * 6);
  }
  .p-8 {
    padding: calc(var(--spacing) * 8);
  }
  .p-10 {
    padding: calc(var(--spacing) * 10);
  }
  .px-2 {
    padding-inline: calc(var(--spacing) * 2);
  }
  .py-1 {
    padding-block: var(--spacing);
  }
  .pt-1 {
    padding-top: var(--spacing);
  }
  .pb-1 {
    padding-bottom: var(--spacing);
  }
  .pl-5 {
    padding-left: calc(var(--spacing) * 5);
  }
  .text-center {
    text-align: center;
  }
  .align-top {
    vertical-align: top;
  }
  .text-lg {
    font-size: var(--text-lg);
    line-height: var(--text-lg--line-height);
  }
  .text-sm {
    font-size: var(--text-sm);
    line-height: var(--text-sm--line-height);
  }
  .text-xs {
    font-size: var(--text-xs);
    line-height: var(--text-xs--line-height);
  }
  .text-\[9px\] {
    font-size: 9px;
  }
  .text-\[10px\] {
    font-size: 10px;
  }
  .text-\[11px\] {
    font-size: 11px;
  }
  .leading-relaxed {
    line-height: var(--leading-relaxed);
  }
  .font-bold {
    font-weight: var(--font-weight-bold);
  }
  .font-semibold {
    font-weight: var(--font-weight-semibold);
  }
  .tracking-wide {
    letter-spacing: var(--tracking-wide);
  }
  .tracking-wider {
    letter-spacing: var(--tracking-wider);
  }
  .text-brand {
    color: var(--color-brand);
  }
  .text-gray-400 {
    color: var(--color-gray-400);
  }
  .text-gray-500 {
    color: var(--color-gray-500);
  }
  .text-gray-600 {
    color: var(--color-gray-600);
  }
  .text-gray-700 {
    color: var(--color-gray-700);
  }
  .text-gray-900 {
    color: var(--color-gray-900);
  }
  .text-red-700 {
    color: var(--color-red-700);
  }
  .uppercase {
    text-transform: uppercase;
  }
  .tabular-nums {
    font-variant-numeric: tabular-nums;
  }
  @media (width >= 64rem) {
    .lg\:hidden {
      display: none;
    }
    .lg\:grid-cols-\[1fr_auto_1fr_1\.2fr_auto\] {
      grid-template-columns: 1fr auto 1fr 1.2fr auto;
    }
  }
  @media (width >= 80rem) {
    .xl\:sticky {
      position: sticky;
    }
    .xl\:top-5 {
      top: calc(var(--spacing) * 5);
    }
    .xl\:grid-cols-\[minmax\(0\,1fr\)_384px\] {
      grid-template-columns: minmax(0,1fr) 384px;
    }
  }
}



/* ============================================================================
   FLUENT 2 DESIGN TOKENS
   Non-color tokens (spacing/radius/type/motion) are theme-neutral and live
   here. Neutral color palettes are theme-scoped below (light/dark). Brand
   color vars (--brand10..--brand160, --colorBrandBackground*, etc.) are NOT
   defined here — they depend on the current tenant's PrincipalBranding and
   are emitted per-request by Views/Shared/_PortalHead.cshtml (see BrandRamp.cs).
   ========================================================================== */
:root {
    --spacingXXS: 2px; --spacingXS: 4px; --spacingSNudge: 6px; --spacingS: 8px;
    --spacingMNudge: 10px; --spacingM: 12px; --spacingL: 16px; --spacingXL: 20px;
    --spacingXXL: 24px; --spacingXXXL: 32px;

    --radiusNone: 0; --radiusSmall: 2px; --radiusMedium: 4px; --radiusLarge: 6px;
    --radiusXLarge: 8px; --radiusCircular: 9999px;

    --strokeWidthThin: 1px; --strokeWidthThick: 2px; --strokeWidthThicker: 3px;

    --fontFamilyBase: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif;
    --fontFamilyDisplay: "Segoe UI Variable Display", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    --fontFamilyMono: "Cascadia Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Consolas, monospace;
    --fontWeightRegular: 400; --fontWeightMedium: 500; --fontWeightSemibold: 600; --fontWeightBold: 700;

    --caption2: 10px/14px var(--fontFamilyBase);
    --caption1: 12px/16px var(--fontFamilyBase);
    --body1: 14px/20px var(--fontFamilyBase);
    --body2: 16px/22px var(--fontFamilyBase);
    --subtitle2: 16px/22px var(--fontFamilyDisplay);
    --subtitle1: 20px/26px var(--fontFamilyDisplay);
    --title3: 24px/32px var(--fontFamilyDisplay);
    --title2: 28px/36px var(--fontFamilyDisplay);
    --title1: 32px/40px var(--fontFamilyDisplay);

    --durationUltraFast: 50ms; --durationFaster: 100ms; --durationFast: 150ms;
    --durationNormal: 200ms; --durationSlow: 300ms; --durationGentle: 500ms;
    --curveAccelerateMid: cubic-bezier(1,0,1,1);
    --curveDecelerateMid: cubic-bezier(0.1,0.9,0.2,1);
    --curveEasyEase: cubic-bezier(0.33,0,0.67,1);

    --colorNeutralForeground1: #242424;
    --colorNeutralForeground2: #424242;
    --colorNeutralForeground3: #616161;
    --colorNeutralForeground4: #707070;
    --colorNeutralForegroundDisabled: #BDBDBD;
    --colorNeutralForegroundInverted: #FFFFFF;
    --colorNeutralForegroundOnBrand: #FFFFFF;

    --colorNeutralBackground1: #FFFFFF;
    --colorNeutralBackground1Hover: #F5F5F5;
    --colorNeutralBackground1Pressed: #E0E0E0;
    --colorNeutralBackground1Selected: #EBEBEB;
    --colorNeutralBackground2: #FAFAFA;
    --colorNeutralBackground3: #F5F5F5;
    --colorNeutralBackground4: #F0F0F0;
    --colorNeutralBackground5: #EBEBEB;
    --colorNeutralBackground6: #E6E6E6;
    --colorNeutralBackgroundDisabled: #F0F0F0;
    --colorNeutralBackgroundInverted: #292929;

    --colorSubtleBackground: transparent;
    --colorSubtleBackgroundHover: #F5F5F5;
    --colorSubtleBackgroundPressed: #E0E0E0;
    --colorSubtleBackgroundSelected: #EBEBEB;

    --colorNeutralStroke1: #D1D1D1;
    --colorNeutralStroke1Hover: #C7C7C7;
    --colorNeutralStroke2: #E0E0E0;
    --colorNeutralStroke3: #F0F0F0;
    --colorNeutralStrokeAccessible: #616161;
    --colorNeutralStrokeDisabled: #E0E0E0;
    --colorTransparentStroke: transparent;

    --colorStrokeFocus1: #FFFFFF;
    --colorStrokeFocus2: #000000;

    --colorPaletteGreenForeground1: #0E700E;
    --colorPaletteGreenBackground1: #F1FAF1;
    --colorPaletteGreenBorder1: #9FD89F;
    --colorPaletteYellowForeground1: #7A5300;
    --colorPaletteYellowBackground1: #FFF9E5;
    --colorPaletteYellowBorder1: #EFD98B;
    --colorPaletteDarkOrangeForeground1: #BC4B09;
    --colorPaletteDarkOrangeBackground1: #FDF6F3;
    --colorPaletteDarkOrangeBorder1: #F4BFAB;
    --colorPaletteRedForeground1: #B10E1C;
    --colorPaletteRedBackground1: #FDF3F4;
    --colorPaletteRedBorder1: #EEACB2;
    --colorPaletteBerryBackground2: #E5D5F5;
    --colorPaletteBerryForeground2: #7719AA;

    --shadow2: 0 0 2px rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.14);
    --shadow4: 0 0 2px rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.14);
    --shadow8: 0 0 2px rgba(0,0,0,.12),0 4px 8px rgba(0,0,0,.14);
    --shadow16: 0 0 2px rgba(0,0,0,.12),0 8px 16px rgba(0,0,0,.14);
    --shadow28: 0 0 8px rgba(0,0,0,.12),0 14px 28px rgba(0,0,0,.14);
    --shadow64: 0 0 8px rgba(0,0,0,.12),0 32px 64px rgba(0,0,0,.14);
    --colorBackgroundOverlay: rgba(0,0,0,.4);
    --skeletonBase: #EBEBEB; --skeletonShine: #F5F5F5;
}


html, body {
    font-family: var(--fontFamilyBase);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.011em;
    color: var(--colorNeutralForeground1);
    background: var(--colorNeutralBackground3);
}

/* Hide the browser's native password reveal/clear controls (Edge/IE) so only our
   custom eye-toggle button shows. */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

/* In the base layer so the utility classes (text-gray-700, ...) can override the link colour.
   Unlayered, this rule outranks every utility and left e.g. the sailing panel's "Create booking" label red on red. */
@layer base {
    a, .btn-link {
        color: var(--colorBrandForegroundLink, var(--brand, #006bb7));
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

/* MVC emits its own validation class names where Blazor emitted .invalid /
   .validation-message. Aliased here so the migrated views inherit the exact
   same error styling without touching the rules above. */
.input-validation-error {
    outline: 1px solid #e50000;
}

.field-validation-error {
    color: #e50000;
}

.validation-summary-errors {
    color: #e50000;
}

/* ============================================================================
   SHELL RULES FOLDED IN FROM BLAZOR CSS ISOLATION
   MVC views have no scoped-CSS equivalent, so the genuinely component-specific
   rules that lived in AppLayout.razor.css and PortalNavMenu.razor.css move
   here verbatim. The #blazor-error-ui rules are deliberately NOT carried over
   - that banner is framework-specific and goes away with the circuit.
   ========================================================================== */
.nav {
    transition: width 0.15s ease;
}

@media (max-width: 900px) {
    .nav {
        display: none;
    }
}

.nav-ico-img {
    height: 20px;
    width: 20px;
    object-fit: contain;
}

html.sidebar-collapsed .nav-ico-img,
.shell.rail .nav-ico-img {
    height: 24px;
    width: 24px;
}


.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: #6c757d;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ============================================================================
   FLUENT 2 COMPONENTS
   Ported from the Fluent 2 reference artifact (YEP_Customer_Portal_Fluent2.html).
   Replaces the former .btn-primary — every previous usage must move to
   `.btn.primary` (or `.btn` for the default/outline style).
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; color: inherit; }
svg { display: block; flex: none; }
.i { width: 20px; height: 20px; }
.i16 { width: 16px; height: 16px; }
.i24 { width: 24px; height: 24px; }
.ic-r { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

:where(button,a,input,select,textarea,[tabindex]):focus-visible {
  outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2);
  outline-offset: var(--strokeWidthThin);
  border-radius: var(--radiusMedium);
}

/* ---- Shell ---- */
.shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.hdr {
  height: 48px; flex: none; display: flex; align-items: center; gap: var(--spacingS);
  padding: 0 var(--spacingM);
  background: var(--colorBrandBackground, var(--brand));
  color: var(--colorNeutralForegroundOnBrand);
  position: relative; z-index: 40;
}
.hdr-brand { display: flex; align-items: center; gap: var(--spacingMNudge); min-width: 0; }
.hdr-mark {
  width: 28px; height: 28px; flex: none; border-radius: var(--radiusMedium);
  background: var(--colorNeutralForegroundOnBrand); color: var(--colorBrandBackground, var(--brand));
  display: grid; place-items: center; font: var(--caption1); font-weight: var(--fontWeightBold); letter-spacing: .02em;
}
.hdr-title { font: var(--body1); font-weight: var(--fontWeightSemibold); white-space: nowrap; }
.hdr-sep { width: 1px; height: 20px; background: rgba(255,255,255,.28); flex: none; }
.hdr-sub { font: var(--caption1); opacity: .85; white-space: nowrap; }
.hdr-spacer { flex: 1; }
.hdr-actions { display: flex; align-items: center; gap: var(--spacingXXS); }
.hdr-btn {
  width: 32px; height: 32px; border: 0; border-radius: var(--radiusMedium); background: transparent;
  color: inherit; display: grid; place-items: center; cursor: pointer; position: relative;
  transition: background var(--durationFaster) var(--curveEasyEase);
}
.hdr-btn:hover { background: rgba(255,255,255,.14); }
.hdr-btn:active { background: rgba(255,255,255,.22); }
.hdr .searchbox {
  width: min(420px,38vw); background: rgba(255,255,255,.16);
  border-color: transparent; color: var(--colorNeutralForegroundOnBrand);
}
.hdr .searchbox input::placeholder { color: rgba(255,255,255,.8); }
.hdr .searchbox:focus-within { background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); }
.hdr .searchbox:focus-within input::placeholder { color: var(--colorNeutralForeground3); }

.body { display: flex; flex: 1; min-height: 0; }

.nav {
  width: 260px; flex: none; background: var(--colorNeutralBackground1);
  border-right: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  display: flex; flex-direction: column; overflow: hidden;
  transition: width var(--durationNormal) var(--curveDecelerateMid);
}
.shell.rail .nav,
html.sidebar-collapsed .nav { width: 48px; }
.nav-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: var(--spacingS) var(--spacingS) var(--spacingXXL); }
.nav-cat {
  font: var(--caption1); font-weight: var(--fontWeightSemibold);
  color: var(--colorNeutralForeground3); text-transform: uppercase; letter-spacing: .04em;
  padding: var(--spacingM) var(--spacingMNudge) var(--spacingXS); white-space: nowrap;
}
.shell.rail .nav-cat,
html.sidebar-collapsed .nav-cat { opacity: 0; height: var(--spacingL); padding: 0; overflow: hidden; }
.nav-item {
  width: 100%; display: flex; align-items: center; gap: var(--spacingM);
  height: 36px; padding: 0 var(--spacingMNudge); margin: 1px 0;
  border: 0; border-radius: var(--radiusMedium); background: var(--colorSubtleBackground);
  color: var(--colorNeutralForeground2); text-align: left; cursor: pointer;
  font: var(--body1); white-space: nowrap; position: relative; text-decoration: none;
  transition: background var(--durationFaster) var(--curveEasyEase);
}
.nav-item .i, .nav-item .nav-ico, .nav-item .nav-ico-img { flex: none; }
.shell.rail .nav-item,
html.sidebar-collapsed .nav-item { padding: 0; gap: 0; justify-content: center; }
.nav-item:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.nav-item:active { background: var(--colorSubtleBackgroundPressed); }
.nav-item[aria-current="page"] {
  background: var(--colorSubtleBackgroundSelected);
  color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold);
}
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: var(--strokeWidthThicker); height: 16px; border-radius: var(--radiusCircular);
  background: var(--colorCompoundBrandStroke);
}
.nav-item[aria-current="page"] .i { color: var(--colorCompoundBrandStroke); }
.nav-label { overflow: hidden; text-overflow: ellipsis; }
.shell.rail .nav-label, .shell.rail .nav-item .cbadge,
html.sidebar-collapsed .nav-label, html.sidebar-collapsed .nav-item .cbadge { display: none; }
/* nav-ico/nav-ico-img predate the Fluent .i icon-sizing convention; PortalNavMenu keeps them
   for its existing <img>/<i> markup, so size them the same as .i16 here rather than touch every
   nav icon element. */
.nav-ico, .nav-ico-img { width: 16px; height: 16px; flex: none; }
.nav-item .cbadge { margin-left: auto; }

.nav-ft {
  flex: none; padding: var(--spacingS);
  border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
}
.nav-toggle { width: 100%; }

.content { flex: 1; min-width: 0; overflow-y: auto; background: var(--colorNeutralBackground3); scroll-behavior: smooth; }
.page { max-width: 1440px; padding: var(--spacingXL) var(--spacingXXXL) 64px; }
.view { display: none; }
.view.on { display: block; animation: fadeUp var(--durationSlow) var(--curveDecelerateMid); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Typography helpers ---- */
.t-title3 { font: var(--title3); font-weight: var(--fontWeightSemibold); }
.t-sub1 { font: var(--subtitle1); font-weight: var(--fontWeightSemibold); }
.t-sub2 { font: var(--subtitle2); font-weight: var(--fontWeightSemibold); }
.t-body1s { font: var(--body1); font-weight: var(--fontWeightSemibold); }
.t-cap1 { font: var(--caption1); }
.t-cap2 { font: var(--caption2); }
.fg2 { color: var(--colorNeutralForeground2); }
.fg3 { color: var(--colorNeutralForeground3); }
.mono { font-family: var(--fontFamilyMono); font-size: 13px; }

/* ---- Breadcrumb ---- */
.crumbs { display: flex; align-items: center; gap: var(--spacingXS); font: var(--caption1); margin-bottom: var(--spacingS); flex-wrap: wrap; }
.crumbs button, .crumbs a {
  border: 0; background: transparent; color: var(--colorNeutralForeground2); text-decoration: none;
  padding: var(--spacingXXS) var(--spacingXS); border-radius: var(--radiusSmall); cursor: pointer;
}
.crumbs button:hover, .crumbs a:hover { background: var(--colorSubtleBackgroundHover); text-decoration: underline; }
.crumbs .cur { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); padding: var(--spacingXXS) var(--spacingXS); }
.crumbs .div { color: var(--colorNeutralForeground4); display: grid; place-items: center; }

/* ---- Page header ---- */
.phead { display: flex; align-items: flex-start; gap: var(--spacingL); flex-wrap: wrap; }
.phead .grow { flex: 1; min-width: 240px; }
.phead   { color: var(--colorNeutralForeground3); margin-top: var(--spacingXS); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--spacingS);
  min-height: 32px; padding: 0 var(--spacingM);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
  border-radius: var(--radiusMedium);
  background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1);
  font: var(--body1); font-weight: var(--fontWeightSemibold); cursor: pointer;
  transition: background var(--durationFaster) var(--curveEasyEase), border-color var(--durationFaster);
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--colorNeutralBackground1Hover); border-color: var(--colorNeutralStroke1Hover); }
.btn:active { background: var(--colorNeutralBackground1Pressed); }
.btn[disabled] {
  background: var(--colorNeutralBackgroundDisabled); border-color: var(--colorNeutralStrokeDisabled);
  color: var(--colorNeutralForegroundDisabled); cursor: not-allowed;
}
.btn.primary { background: var(--colorBrandBackground, var(--brand)); border-color: transparent; color: var(--colorNeutralForegroundOnBrand, var(--brand-ink)); }
.btn.primary:hover { background: var(--colorBrandBackgroundHover, var(--brand)); }
.btn.primary:active { background: var(--colorBrandBackgroundPressed, var(--brand)); }
/* Declared after .btn.primary so a disabled primary button (e.g. Submit for review) reads as disabled. */
.btn.primary[disabled], .btn.primary[disabled]:hover {
  background: var(--colorNeutralBackgroundDisabled); border-color: var(--colorNeutralStrokeDisabled);
  color: var(--colorNeutralForegroundDisabled); cursor: not-allowed;
}
.btn.subtle { background: transparent; border-color: transparent; color: var(--colorNeutralForeground2); font-weight: var(--fontWeightRegular); }
.btn.subtle:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.btn.subtle:active { background: var(--colorSubtleBackgroundPressed); }
.btn.outline { background: transparent; }
.btn.danger { background: var(--colorPaletteRedForeground1); border-color: transparent; color: #fff; }
.btn.small { min-height: 24px; padding: 0 var(--spacingS); font: var(--caption1); font-weight: var(--fontWeightSemibold); }
.btn.large { min-height: 40px; padding: 0 var(--spacingL); font: var(--body2); font-weight: var(--fontWeightSemibold); }
.btn.icon { width: 32px; padding: 0; }
.btn.icon.small { width: 24px; }
.btn .i { color: currentColor; }
.link {
  border: 0; background: none; padding: 0; color: var(--colorBrandForegroundLink, var(--brand));
  font: inherit; font-weight: var(--fontWeightSemibold); cursor: pointer; text-align: left;
}
.link:hover { color: var(--colorBrandForegroundLinkHover, var(--brand)); text-decoration: underline; }

/* ---- Toolbar / command bar ---- */
.cmdbar {
  display: flex; align-items: center; gap: var(--spacingXXS);
  margin: var(--spacingL) 0; padding: var(--spacingXS);
  background: var(--colorNeutralBackground1);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  border-radius: var(--radiusMedium); box-shadow: var(--shadow2);
  flex-wrap: wrap;
}
.cmdbar .tdiv { width: 1px; align-self: stretch; background: var(--colorNeutralStroke2); margin: var(--spacingXS) var(--spacingXS); }
.cmdbar .push { margin-left: auto; }

/* ---- Tooltip ---- */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%;
  transform: translateX(-50%) scale(.96); transform-origin: bottom center;
  background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1);
  border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
  box-shadow: var(--shadow4); border-radius: var(--radiusMedium);
  padding: var(--spacingXS) var(--spacingS); font: var(--caption1); font-weight: var(--fontWeightRegular);
  white-space: nowrap; opacity: 0; pointer-events: none; z-index: 60;
  transition: opacity var(--durationFast) var(--curveEasyEase), transform var(--durationFast);
}
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1; transform: translateX(-50%) scale(1); }

/* ---- Menu / flyout ---- */
.flyhost { position: relative; }
.menu {
  position: absolute; top: calc(100% + 4px); min-width: 200px; z-index: 70;
  background: var(--colorNeutralBackground1); border-radius: var(--radiusLarge);
  box-shadow: var(--shadow16); padding: var(--spacingXS);
  border: var(--strokeWidthThin) solid var(--colorTransparentStroke);
  display: none; animation: popIn var(--durationFast) var(--curveDecelerateMid);
}
.menu.right { right: 0; }
.menu.on { display: block; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.mi {
  width: 100%; display: flex; align-items: center; gap: var(--spacingM);
  border: 0; background: transparent; cursor: pointer; text-align: left;
  padding: var(--spacingS) var(--spacingMNudge); border-radius: var(--radiusMedium);
  font: var(--body1); color: var(--colorNeutralForeground1); text-decoration: none;
}
.mi:hover { background: var(--colorSubtleBackgroundHover); }
.mi .i { color: var(--colorNeutralForeground3); }
.mi.destructive { color: var(--colorPaletteRedForeground1); }
.mi.destructive .i { color: currentColor; }
.mdiv { height: 1px; background: var(--colorNeutralStroke2); margin: var(--spacingXS) 0; }

/* ---- Card ---- */
.card {
  background: var(--colorNeutralBackground1);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  border-radius: var(--radiusLarge); box-shadow: var(--shadow2);
  padding: var(--spacingL);
}
.card.flat { box-shadow: none; }
.card.pad0 { padding: 0; overflow: hidden; }
.card.clickable { cursor: pointer; transition: box-shadow var(--durationFast), transform var(--durationFast); }
.card.clickable:hover { box-shadow: var(--shadow8); border-color: var(--colorNeutralStroke1); }
.card-hd { display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingM) var(--spacingL); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }
.card-hd .push { margin-left: auto; }
.card-ft { padding: var(--spacingM) var(--spacingL); border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2); display: flex; gap: var(--spacingS); align-items: center; }

/* ---- Grids ---- */
.g4 { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: var(--spacingL); }
.g3 { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: var(--spacingL); }
.g2 { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: var(--spacingL); }
.g-split { display: grid; grid-template-columns: 1.15fr .85fr; gap: var(--spacingL); margin-top: var(--spacingL); }
.stack { display: flex; flex-direction: column; gap: var(--spacingL); }
.row { display: flex; align-items: center; gap: var(--spacingS); flex-wrap: wrap; }

/* ---- Metric tile ---- */
.tile-top { display: flex; align-items: center; gap: var(--spacingS); color: var(--colorNeutralForeground3); font: var(--caption1); }
.tile-ico { width: 24px; height: 24px; border-radius: var(--radiusMedium); display: grid; place-items: center; background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); }
.metric { font: var(--title2); font-weight: var(--fontWeightSemibold); margin: var(--spacingS) 0 var(--spacingXXS); letter-spacing: -.01em; }
.delta { display: inline-flex; align-items: center; gap: var(--spacingXXS); font: var(--caption1); }
.up { color: var(--colorPaletteGreenForeground1); }
.down { color: var(--colorPaletteRedForeground1); }
.warnfg { color: var(--colorPaletteDarkOrangeForeground1); }
.brandfg { color: var(--colorBrandForeground1); }

/* ---- Badges ---- */
.badge {
  display: inline-flex; align-items: center; gap: var(--spacingXS);
  height: 20px; padding: 0 var(--spacingS); border-radius: var(--radiusCircular);
  font: var(--caption1); font-weight: var(--fontWeightSemibold); white-space: nowrap;
  background: var(--colorBrandBackground, var(--brand)); color: var(--colorNeutralForegroundOnBrand, var(--brand-ink));
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge.plain::before { display: none; }
.badge.tint { background: var(--colorBrandBackground2); color: var(--colorBrandForeground2); }
.badge.success { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteGreenBorder1); }
.badge.warning { background: var(--colorPaletteYellowBackground1); color: var(--colorPaletteYellowForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteYellowBorder1); }
.badge.severe { background: var(--colorPaletteDarkOrangeBackground1); color: var(--colorPaletteDarkOrangeForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteDarkOrangeBorder1); }
.badge.danger { background: var(--colorPaletteRedBackground1); color: var(--colorPaletteRedForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteRedBorder1); }
.badge.neutral { background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground2); }
.badge.berry { background: var(--colorPaletteBerryBackground2); color: var(--colorPaletteBerryForeground2); }
.cbadge {
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: var(--radiusCircular);
  background: var(--colorPaletteRedForeground1); color: #fff;
  font: var(--caption2); font-weight: var(--fontWeightSemibold);
  display: inline-grid; place-items: center;
}
.nav-item .cbadge { background: var(--colorBrandBackground, var(--brand)); color: var(--colorNeutralForegroundOnBrand, var(--brand-ink)); }
.hdr-btn .cbadge { position: absolute; top: 2px; right: 2px; box-shadow: 0 0 0 2px var(--colorBrandBackground, var(--brand)); }

/* ---- Avatar / presence ---- */
.avatar {
  width: 32px; height: 32px; border-radius: var(--radiusCircular); flex: none; position: relative;
  background: var(--colorPaletteBerryBackground2); color: var(--colorPaletteBerryForeground2);
  display: grid; place-items: center; font: var(--caption1); font-weight: var(--fontWeightSemibold);
}
.avatar.sm { width: 24px; height: 24px; font: var(--caption2); font-weight: var(--fontWeightSemibold); }
.avatar.lg { width: 48px; height: 48px; font: var(--body1); font-weight: var(--fontWeightSemibold); }
.avatar.brand { background: var(--colorBrandBackground2); color: var(--colorBrandForeground2); }
.avatar.green { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); }
.presence {
  position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--colorPaletteGreenForeground1); box-shadow: 0 0 0 2px var(--colorNeutralBackground1);
}
.presence.away { background: var(--colorPaletteYellowForeground1); }
.presence.busy { background: var(--colorPaletteRedForeground1); }
.hdr .presence { box-shadow: 0 0 0 2px var(--colorBrandBackground, var(--brand)); }
.agroup { display: flex; }
.agroup .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--colorNeutralBackground1); }
.agroup .avatar:first-child { margin-left: 0; }

/* ---- Message bar ---- */
.msgbar {
  display: flex; align-items: flex-start; gap: var(--spacingM);
  padding: var(--spacingS) var(--spacingM); border-radius: var(--radiusMedium);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  background: var(--colorNeutralBackground3); font: var(--body1);
}
.msgbar .i { margin-top: 1px; }
.msgbar .mb-body { flex: 1; min-width: 0; }
.msgbar .mb-title { font-weight: var(--fontWeightSemibold); }
.msgbar.info { background: var(--colorBrandBackground2); border-color: var(--colorBrandStroke2); color: var(--colorNeutralForeground1); }
.msgbar.info > .i { color: var(--colorBrandForeground1); }
.msgbar.success { background: var(--colorPaletteGreenBackground1); border-color: var(--colorPaletteGreenBorder1); }
.msgbar.success > .i { color: var(--colorPaletteGreenForeground1); }
.msgbar.warning { background: var(--colorPaletteYellowBackground1); border-color: var(--colorPaletteYellowBorder1); }
.msgbar.warning > .i { color: var(--colorPaletteYellowForeground1); }
.msgbar.severe { background: var(--colorPaletteDarkOrangeBackground1); border-color: var(--colorPaletteDarkOrangeBorder1); }
.msgbar.severe > .i { color: var(--colorPaletteDarkOrangeForeground1); }
.msgbar.danger { background: var(--colorPaletteRedBackground1); border-color: var(--colorPaletteRedBorder1); }
.msgbar.danger > .i { color: var(--colorPaletteRedForeground1); }

/* ---- Form controls ---- */
.field { display: flex; flex-direction: column; gap: var(--spacingXS); min-width: 0; }
.field > label { font: var(--caption1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.field .lbl { display: flex; align-items: baseline; gap: var(--spacingS); }
.field .lbl label { font: var(--caption1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.field .lbl .link { margin-left: auto; font: var(--caption1); }
/* A no-break space keeps the star glued to the last word of a caption that wraps, so it never sits alone on a line. */
.req::after { content: "\00a0*"; color: var(--colorPaletteRedForeground1); }
.hint { font: var(--caption1); color: var(--colorNeutralForeground3); }
.err { font: var(--caption1); color: var(--colorPaletteRedForeground1); display: none; align-items: center; gap: var(--spacingXS); }
.field.invalid .err { display: flex; }

.ctl {
  display: flex; align-items: center; gap: var(--spacingS);
  height: 32px; padding: 0 var(--spacingS);
  background: var(--colorNeutralBackground1);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
  border-bottom-color: var(--colorNeutralStrokeAccessible);
  border-radius: var(--radiusMedium);
  position: relative; overflow: hidden;
  transition: border-color var(--durationFaster) var(--curveEasyEase);
}
.ctl input, .ctl select, .ctl textarea {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 0;
  font: var(--body1); color: var(--colorNeutralForeground1);
}
.ctl input::placeholder, .ctl textarea::placeholder { color: var(--colorNeutralForeground4); }
.ctl .i, .ctl .i16 { color: var(--colorNeutralForeground3); }
.ctl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: var(--strokeWidthThick);
  background: var(--colorCompoundBrandStroke); border-radius: var(--radiusCircular);
  transform: scaleX(0); transition: transform var(--durationNormal) var(--curveDecelerateMid);
}
.ctl:focus-within { border-color: var(--colorNeutralStroke1); }
.ctl:focus-within::after { transform: scaleX(1); }
.ctl:hover { border-color: var(--colorNeutralStroke1Hover); }
.ctl.ta { height: auto; padding: var(--spacingSNudge) var(--spacingS); }
.ctl.ta textarea { resize: vertical; min-height: 64px; line-height: 20px; }
.ctl.lg { height: 40px; padding: 0 var(--spacingMNudge); }
.field.invalid .ctl { border-color: var(--colorPaletteRedForeground1); }
.field.invalid .ctl::after { background: var(--colorPaletteRedForeground1); }
.ctl.disabled { background: var(--colorNeutralBackgroundDisabled); border-color: var(--colorNeutralStrokeDisabled); color: var(--colorNeutralForegroundDisabled); }
.ctl.disabled input { color: var(--colorNeutralForegroundDisabled); }
select { appearance: none; cursor: pointer; }

.searchbox {
  display: flex; align-items: center; gap: var(--spacingS); height: 32px; padding: 0 var(--spacingS);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke1); border-radius: var(--radiusMedium);
  background: var(--colorNeutralBackground1);
}
.searchbox input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: var(--body1); }
.searchbox .clr { display: none; border: 0; background: none; cursor: pointer; color: inherit; padding: 0; }
.searchbox.has .clr { display: block; }

.cbx, .rdo { display: inline-flex; align-items: center; gap: var(--spacingS); cursor: pointer; font: var(--body1); user-select: none; }
.cbx input, .rdo input, .swt input { position: absolute; opacity: 0; width: 0; height: 0; }
.box {
  width: 16px; height: 16px; flex: none; border-radius: var(--radiusSmall);
  border: var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);
  display: grid; place-items: center; color: transparent;
  transition: background var(--durationFaster), border-color var(--durationFaster);
}
.cbx input:checked + .box { background: var(--colorCompoundBrandBackground); border-color: var(--colorCompoundBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.cbx input:indeterminate + .box { background: var(--colorCompoundBrandBackground); border-color: var(--colorCompoundBrandBackground); color: var(--colorNeutralForegroundOnBrand); }
.cbx input:indeterminate + .box .ck { display: none; }
.cbx input:indeterminate + .box::after { content: ""; width: 8px; height: 2px; background: currentColor; border-radius: 1px; }
.cbx input:not(:indeterminate) + .box::after { display: none; }
.cbx input:focus-visible + .box { outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2); outline-offset: 2px; }
.rdo .box { border-radius: 50%; }
.rdo input:checked + .box { border-color: var(--colorCompoundBrandStroke); border-width: var(--strokeWidthThick); }
.rdo input:checked + .box::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--colorCompoundBrandStroke); }
.rdo input:focus-visible + .box { outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2); outline-offset: 2px; }
.swt { display: inline-flex; align-items: center; gap: var(--spacingM); cursor: pointer; font: var(--body1); }
.track {
  width: 40px; height: 20px; flex: none; border-radius: var(--radiusCircular);
  border: var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible);
  background: transparent; padding: 2px; display: flex; align-items: center;
  transition: background var(--durationFast) var(--curveEasyEase), border-color var(--durationFast);
}
.knob { width: 12px; height: 12px; border-radius: 50%; background: var(--colorNeutralStrokeAccessible); transition: transform var(--durationFast) var(--curveDecelerateMid), background var(--durationFast); }
.swt input:checked + .track { background: var(--colorCompoundBrandBackground); border-color: var(--colorCompoundBrandBackground); }
.swt input:checked + .track .knob { transform: translateX(20px); background: var(--colorNeutralForegroundOnBrand); }
.swt input:focus-visible + .track { outline: var(--strokeWidthThick) solid var(--colorStrokeFocus2); outline-offset: 2px; }

.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 20px; background: transparent; cursor: pointer; }
.slider::-webkit-slider-runnable-track { height: 4px; border-radius: var(--radiusCircular); background: var(--colorNeutralStroke1); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -6px; border-radius: 50%; background: var(--colorCompoundBrandBackground); border: 3px solid var(--colorNeutralBackground1); box-shadow: var(--shadow2); }
.slider::-moz-range-track { height: 4px; border-radius: 9999px; background: var(--colorNeutralStroke1); }
.slider::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--colorCompoundBrandBackground); border: 3px solid var(--colorNeutralBackground1); }

.spin { display: flex; align-items: stretch; }
.spin .ctl { border-top-right-radius: 0; border-bottom-right-radius: 0; flex: 1; }
.spin .sbtns { display: flex; flex-direction: column; border: var(--strokeWidthThin) solid var(--colorNeutralStroke1); border-left: 0; border-radius: 0 var(--radiusMedium) var(--radiusMedium) 0; overflow: hidden; }
.spin .sbtns button { flex: 1; width: 24px; border: 0; background: var(--colorNeutralBackground1); cursor: pointer; display: grid; place-items: center; color: var(--colorNeutralForeground3); padding: 0; }
.spin .sbtns button:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.spin .sbtns button:first-child { border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }

.tags { display: flex; flex-wrap: wrap; gap: var(--spacingS); }
.tag {
  display: inline-flex; align-items: center; gap: var(--spacingSNudge); height: 28px; padding: 0 var(--spacingS);
  background: var(--colorNeutralBackground3); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  border-radius: var(--radiusMedium); font: var(--caption1); font-weight: var(--fontWeightSemibold);
}
.tag button { border: 0; background: none; cursor: pointer; color: var(--colorNeutralForeground3); padding: 0; display: grid; place-items: center; }
.tag button:hover { color: var(--colorNeutralForeground1); }

.rating { display: flex; gap: var(--spacingXXS); }
.rating button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--colorNeutralForeground4); }
.rating button.on { color: #EAA300; }

/* ---- Tablist / pivot ---- */
.tablist { display: flex; gap: var(--spacingXS); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); overflow-x: auto; }
.tab {
  position: relative; border: 0; background: transparent; cursor: pointer;
  padding: var(--spacingMNudge) var(--spacingM); font: var(--body1);
  color: var(--colorNeutralForeground2); white-space: nowrap; border-radius: var(--radiusMedium) var(--radiusMedium) 0 0;
}
.tab:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.tab[aria-selected="true"] { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.tab[aria-selected="true"]::after {
  content: ""; position: absolute; left: var(--spacingM); right: var(--spacingM); bottom: 0;
  height: var(--strokeWidthThick); background: var(--colorCompoundBrandStroke); border-radius: var(--radiusCircular);
}
.tabpanel { display: none; padding-top: var(--spacingL); }
.tabpanel.on { display: block; }

/* ---- Data grid ---- */
.gridwrap { overflow-x: auto; }
table.dg { width: 100%; border-collapse: collapse; min-width: 900px; }
table.dg th {
  text-align: left; font: var(--caption1); font-weight: var(--fontWeightSemibold);
  color: var(--colorNeutralForeground3); background: var(--colorNeutralBackground1);
  padding: 0; border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  position: sticky; top: 0; z-index: 2; white-space: nowrap;
}
table.dg th .sort {
  width: 100%; display: flex; align-items: center; gap: var(--spacingXS);
  border: 0; background: none; cursor: pointer; color: inherit; font: inherit;
  padding: var(--spacingMNudge) var(--spacingM);
}
table.dg th .sort:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
table.dg th .sort .i16 { opacity: 0; transition: opacity var(--durationFaster); }
table.dg th[aria-sort] .sort { color: var(--colorNeutralForeground1); }
table.dg th[aria-sort] .sort .i16 { opacity: 1; color: var(--colorBrandForeground1); }
table.dg th[aria-sort="descending"] .sort .i16 { transform: rotate(180deg); }
table.dg th.plain { padding: var(--spacingMNudge) var(--spacingM); }
table.dg td { padding: var(--spacingMNudge) var(--spacingM); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke3); vertical-align: middle; }
table.dg tbody tr { transition: background var(--durationUltraFast); }
table.dg tbody tr:hover { background: var(--colorSubtleBackgroundHover); }
table.dg tbody tr[data-sel="1"] { background: var(--colorBrandBackground2); }
table.dg .num { text-align: right; font-variant-numeric: tabular-nums; }
table.dg .chk { width: 44px; }
.rowactions { display: flex; gap: var(--spacingXXS); opacity: 0; transition: opacity var(--durationFaster); }
tr:hover .rowactions, tr:focus-within .rowactions { opacity: 1; }
.dg-ft { display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingMNudge) var(--spacingL); border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2); flex-wrap: wrap; }
.pager { display: flex; gap: var(--spacingXXS); margin-left: auto; align-items: center; }
.pager .pg {
  min-width: 28px; height: 28px; border: 0; border-radius: var(--radiusMedium); background: transparent;
  cursor: pointer; font: var(--caption1); color: var(--colorNeutralForeground2);
}
.pager .pg:hover { background: var(--colorSubtleBackgroundHover); }
.pager .pg[aria-current="true"] { background: var(--colorBrandBackground, var(--brand)); color: var(--colorNeutralForegroundOnBrand, var(--brand-ink)); font-weight: var(--fontWeightSemibold); }
.filterbar { display: flex; gap: var(--spacingS); padding: var(--spacingM) var(--spacingL); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); flex-wrap: wrap; align-items: flex-end; }
.selbar {
  display: none; align-items: center; gap: var(--spacingM);
  padding: var(--spacingS) var(--spacingL); background: var(--colorBrandBackground2);
  border-bottom: var(--strokeWidthThin) solid var(--colorBrandStroke2); font: var(--caption1);
}
.selbar.on { display: flex; }

/* ---- Auth screens (login / register / password reset) ---- */
.topbar { height: 48px; flex: none; display: flex; align-items: center; gap: var(--spacingS); padding: 0 var(--spacingL); }
.topbar .wordmark { display: flex; align-items: center; gap: var(--spacingS); font: var(--caption1); color: var(--colorNeutralForeground3); }
.topbar .wordmark b { color: var(--colorNeutralForeground2); font-weight: var(--fontWeightSemibold); }
.topbar .spacer { flex: 1; }
.stage { flex: 1; display: grid; place-items: center; padding: var(--spacingXL) var(--spacingL) var(--spacingXXXL); }
.authcard {
  width: 100%; max-width: 400px;
  background: var(--colorNeutralBackground1);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  border-radius: var(--radiusXLarge);
  box-shadow: var(--shadow16);
  padding: var(--spacingXXXL);
  animation: rise var(--durationSlow) var(--curveDecelerateMid);
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.identity { text-align: center; margin-bottom: var(--spacingXXL); }
.identity.left { text-align: left; }
.tenant-mark {
  width: 44px; height: 44px; margin: 0 auto var(--spacingL);
  border-radius: var(--radiusLarge); background: var(--colorBrandBackground, var(--brand)); color: var(--colorNeutralForegroundOnBrand, var(--brand-ink));
  display: grid; place-items: center;
  font: var(--body2); font-weight: var(--fontWeightBold); letter-spacing: .02em;
  box-shadow: var(--shadow4);
}
.identity.left .tenant-mark { margin-left: 0; }
.identity h1 { font: var(--subtitle1); font-weight: var(--fontWeightSemibold); }
.identity p { color: var(--colorNeutralForeground3); margin-top: var(--spacingXS); }
.hostchip {
  display: inline-flex; align-items: center; gap: var(--spacingXS);
  margin-top: var(--spacingM); padding: var(--spacingXXS) var(--spacingS);
  background: var(--colorBrandBackground2); color: var(--colorBrandForeground2);
  border-radius: var(--radiusCircular); font: var(--caption1);
}
.hostchip.mono { font-family: var(--fontFamilyMono); }
.reveal {
  border: 0; background: transparent; cursor: pointer; padding: var(--spacingXS); margin-right: -4px;
  border-radius: var(--radiusMedium); color: var(--colorNeutralForeground3); display: grid; place-items: center;
}
.reveal:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.caps { display: none; align-items: center; gap: var(--spacingXS); font: var(--caption1); color: var(--colorPaletteYellowForeground1); }
.caps.on { display: flex; }
.footer { flex: none; padding: var(--spacingL); text-align: center; font: var(--caption1); color: var(--colorNeutralForeground3); }
.footer a, .footer button { color: var(--colorNeutralForeground2); text-decoration: none; border: 0; background: none; cursor: pointer; font: inherit; }
.footer a:hover, .footer button:hover { text-decoration: underline; }
.footdot { margin: 0 var(--spacingS); opacity: .5; }
@media (max-width: 520px) {
  .authcard { padding: var(--spacingXL); border-radius: var(--radiusLarge); }
  .stage { padding: var(--spacingM) var(--spacingM) var(--spacingXL); }
}

/* Dashboard widget primitives, shared by every widget under Components/Dashboard/Widgets/ so
   they don't each duplicate their own pill/caption styling. */
.dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 650;
    padding: 3px 9px;
    border-radius: 999px;
}

.dash-pill-good {
    background: #e7f5ee;
    color: #1b7a4d;
}

.dash-pill-warn {
    background: #fbf1dc;
    color: #9a6b12;
}

.dash-caption {
    margin-top: 8px;
    font-size: 12px;
    color: #8b98a2;
}

.dash-cta {
    margin-left: 8px;
    font-size: 12px;
    font-weight: 650;
    color: var(--brand, #1b6ec2);
}

.dash-stat {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-variant-numeric: tabular-nums;
}

.dash-progress-track {
    height: 7px;
    border-radius: 999px;
    background: #eef1f4;
    overflow: hidden;
    margin-top: 10px;
}

.dash-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--brand, #1b6ec2);
}

.dash-doc-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12.5px;
}

.dash-doc-check {
    width: 15px;
    height: 15px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 9px;
}

.dash-doc-check.on {
    background: #e7f5ee;
    color: #1b7a4d;
}

.dash-doc-check.off {
    background: #eef1f4;
    color: #8b98a2;
    border: 1px dashed #dde3e8;
}

.dash-tile-disabled {
    border: 1px dashed #dde3e8;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
    position: relative;
    color: #8b98a2;
    cursor: not-allowed;
}

.dash-soon-badge {
    position: absolute;
    top: 0.875rem;
    right: 0.875rem;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: #eef1f4;
    color: #8b98a2;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 650;
}

/* Dashboard layout. The account-setup widgets (onboarding stage, KYC documents, profile completeness) are slim cards on one strip;
   the main area is one tile per module the user has been granted; the "coming soon" tiles are small. */
.dash-setup { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: var(--spacingM); margin-bottom: var(--spacingXL); }
.dash-mini {
    display: flex; flex-direction: column; gap: var(--spacingXS); min-width: 0;
    padding: var(--spacingM) var(--spacingL);
    background: var(--colorNeutralBackground1);
    border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
    border-radius: var(--radiusLarge);
}
.dash-mini-title { font: var(--caption1); text-transform: uppercase; letter-spacing: .04em; color: var(--colorNeutralForeground3); }
.dash-mini-row { display: flex; align-items: center; gap: var(--spacingS); flex-wrap: wrap; min-height: 26px; }
.dash-mini-metric { font-size: 20px; line-height: 26px; font-weight: var(--fontWeightSemibold); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.dash-mini-note { margin: 0; font: var(--caption1); color: var(--colorNeutralForeground3); }
.dash-mini .dash-progress-track { height: 5px; margin-top: 0; }
.dash-mini-checks { display: flex; flex-wrap: wrap; gap: 6px; }
.dash-mini-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px;
    font: var(--caption1); background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground3);
}
.dash-mini-chip i { font-size: 9px; }
.dash-mini-chip.on { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); }

.dash-sec-title { margin: 0 0 var(--spacingM); font: var(--caption1); text-transform: uppercase; letter-spacing: .04em; color: var(--colorNeutralForeground3); }
.dash-mods { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--spacingL); }
.dash-mod {
    display: flex; flex-direction: column; gap: var(--spacingM); padding: var(--spacingL);
    background: var(--colorNeutralBackground1);
    border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
    border-radius: var(--radiusLarge); box-shadow: var(--shadow2);
    transition: box-shadow var(--durationFast), border-color var(--durationFast);
}
.dash-mod:hover { box-shadow: var(--shadow8); border-color: var(--colorNeutralStroke1); }
.dash-mod-hd { display: flex; align-items: center; gap: var(--spacingM); }
.dash-mod-ico {
    width: 40px; height: 40px; flex: none; display: grid; place-items: center;
    border-radius: var(--radiusXLarge); background: var(--colorNeutralBackground3); color: var(--colorBrandForeground1);
}
.dash-mod-ico img { width: 26px; height: 26px; object-fit: contain; }
.dash-mod-name { margin: 0; font-size: 16px; line-height: 22px; font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.dash-mod-desc { flex: 1; margin: 0; font: var(--body1); color: var(--colorNeutralForeground2); }
.dash-mod-acts { display: flex; flex-wrap: wrap; gap: var(--spacingS); }

/* The counts on a module tile: small boxes of number and caption; what needs the customer stands out, good and bad news are tinted. */
.dash-stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--spacingS); }
.dash-stats li {
    display: flex; flex-direction: column; min-width: 0; padding: 6px 10px;
    border-radius: var(--radiusMedium); background: var(--colorNeutralBackground3);
}
.dash-stats b { font-size: 20px; line-height: 24px; font-weight: var(--fontWeightSemibold); font-variant-numeric: tabular-nums; color: var(--colorNeutralForeground1); }
.dash-stats span { font: var(--caption1); color: var(--colorNeutralForeground3); }
.dash-stats li.is-attention { background: var(--colorPaletteYellowBackground1); }
.dash-stats li.is-attention b, .dash-stats li.is-attention span { color: var(--colorPaletteYellowForeground1); }
.dash-stats li.is-good { background: var(--colorPaletteGreenBackground1); }
.dash-stats li.is-good b, .dash-stats li.is-good span { color: var(--colorPaletteGreenForeground1); }
.dash-stats li.is-bad { background: var(--colorPaletteRedBackground1); }
.dash-stats li.is-bad b, .dash-stats li.is-bad span { color: var(--colorPaletteRedForeground1); }
.dash-stats-off { margin: 0; font: var(--caption1); color: var(--colorNeutralForeground4); }

.dash-soon-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--spacingM); }
.dash-soon-row .dash-tile-disabled { padding: .75rem 1rem; }
.dash-soon-row .dash-stat { font-size: 18px; }

/* Voyage schedule: row, rail and pill primitives. Kept here rather than inline so the row markup
   stays readable, matching how the dashboard widget primitives are defined above. */
.vs-row {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 176px;
    gap: var(--spacingL);
    align-items: center;
    width: 100%;
    text-align: left;
    background: var(--colorNeutralBackground1);
    border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
    border-left: 3px solid transparent;
    border-radius: var(--radiusLarge);
    padding: var(--spacingM) var(--spacingL);
    font: inherit;
    color: inherit;
    cursor: pointer;
    transition: border-color .12s ease-out, box-shadow .12s ease-out, transform .12s ease-out;
}

.vs-row:hover {
    border-color: var(--colorNeutralStroke1Hover, var(--colorCompoundBrandStroke, var(--brand)));
    box-shadow: var(--shadow2);
    transform: translateY(-1px);
}

.vs-row[aria-selected="true"] {
    border-left-color: var(--colorCompoundBrandBackground, var(--brand));
    border-color: var(--colorCompoundBrandStroke, var(--brand));
    background: var(--colorBrandBackground2, var(--colorNeutralBackground1));
    box-shadow: var(--shadow2);
}

.vs-row-closed {
    opacity: .62;
}

@media (max-width: 1023px) {
    .vs-row {
        grid-template-columns: 1fr;
    }
}

.vs-mini {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: var(--spacingSNudge, 10px);
    align-items: center;
}

.vs-rail {
    position: relative;
    height: 30px;
}

.vs-rail-line {
    position: absolute;
    top: 14px;
    left: 0;
    right: 0;
    height: 1.5px;
    border-radius: var(--radiusSmall);
    background: linear-gradient(90deg, var(--colorCompoundBrandStroke, var(--brand)) 0%, var(--colorCompoundBrandBackground, var(--brand)) 100%);
    opacity: .55;
}

.vs-rail-line::before,
.vs-rail-line::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 9px;
    height: 9px;
    border-radius: var(--radiusCircular);
    background: var(--colorCompoundBrandBackground, var(--brand));
    transform: translateY(-50%);
}

.vs-rail-line::before { left: 0; }
.vs-rail-line::after { right: 0; }

.vs-rail-mid {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--colorNeutralBackground1);
    padding: 0 var(--spacingS);
    font: var(--caption1);
    font-weight: var(--fontWeightSemibold);
    color: var(--colorNeutralForeground2);
    white-space: nowrap;
}

.vs-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--spacingXS);
    border-radius: var(--radiusMedium);
    padding: var(--spacingXXS) var(--spacingS);
    font: var(--caption1);
    font-weight: var(--fontWeightSemibold);
    white-space: nowrap;
}

.vs-pill-ok { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteGreenBorder1); }
.vs-pill-soon { background: var(--colorPaletteYellowBackground1); color: var(--colorPaletteYellowForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteYellowBorder1); }
.vs-pill-crit { background: var(--colorPaletteRedBackground1); color: var(--colorPaletteRedForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteRedBorder1); }
.vs-pill-dead { background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground3); }

.vs-preset {
    border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
    background: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground2);
    border-radius: var(--radiusCircular);
    padding: var(--spacingXXS) var(--spacingS);
    font: var(--caption1);
    font-weight: var(--fontWeightMedium);
}

.vs-preset:hover { border-color: var(--colorCompoundBrandStroke, var(--brand)); color: var(--colorCompoundBrandStroke, var(--brand)); }
.vs-preset[aria-pressed="true"] { background: var(--colorCompoundBrandBackground, var(--brand)); border-color: transparent; color: var(--colorNeutralForegroundOnBrand, #fff); }

.vs-seg {
    border: 0;
    background: transparent;
    border-radius: var(--radiusCircular);
    padding: var(--spacingXS) var(--spacingM);
    font: var(--caption1);
    font-weight: var(--fontWeightSemibold);
    color: var(--colorNeutralForeground3);
}

.vs-seg[aria-pressed="true"] {
    background: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground1);
    box-shadow: var(--shadow2);
}

/* Months fill the card: one per row on narrow screens, two side by side from tablet up. The day
   cells are square (aspect-ratio: 1), so on a wide screen they grow with the column - which is the
   intended look, matching the reference design. */
.vs-cal-months {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem 2.5rem;
}

@media (min-width: 768px) {
    .vs-cal-months {
        grid-template-columns: 1fr 1fr;
    }
}

.vs-day {
    aspect-ratio: 1;
    border: 1px solid transparent;
    border-radius: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11.5px;
    color: #4b5563;
    background: transparent;
}

.vs-day-has {
    background: #e7f0fa;
    border-color: #cbddf0;
    color: #111827;
    font-weight: 650;
    cursor: pointer;
}

.vs-day-has:hover { border-color: var(--brand, #1b6ec2); }
.vs-day-today { border-color: #111827; font-weight: 700; }

/* Port type-ahead dropdown. Rendered by wwwroot/js/port-lookup.js, which replaced the earlier
   <datalist> so the code / name / country row could be styled. */
.port-ac {
    position: absolute;
    z-index: 40;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 2px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 12px 32px -8px rgba(16, 24, 40, .24);
    max-height: 236px;
    overflow: auto;
}

.port-ac-i {
    display: flex;
    align-items: baseline;
    gap: 9px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
}

.port-ac-i:last-child { border-bottom: 0; }
.port-ac-i:hover,
.port-ac-i.is-active { background: #e7f0fa; }

.port-ac-code {
    font-size: 11.5px;
    font-weight: 650;
    letter-spacing: .03em;
    color: var(--brand, #1b6ec2);
}

.port-ac-name { font-size: 13px; font-weight: 500; color: #111827; }
.port-ac-cy { margin-left: auto; font-size: 11.5px; color: #6b7280; }

/* Last line of a lookup list that is only the beginning of a longer one: not a choice, and always in view at the bottom of the box. */
.port-ac-more {
    position: sticky;
    bottom: 0;
    padding: 6px 12px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 11.5px;
    color: #6b7280;
    cursor: default;
}

/* Direct-only toggle: unpressed looks like the other pill controls in the toolbar; pressed goes
   solid black, matching the reference design's accent for an active binary filter (the same
   black-on-press idiom already used by .vs-preset[aria-pressed="true"]). */
.vs-direct-only {
    border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
    background: var(--colorNeutralBackground1);
    color: var(--colorNeutralForeground2);
    border-radius: var(--radiusCircular);
    padding: var(--spacingXS) var(--spacingM);
    font: var(--caption1);
    font-weight: var(--fontWeightSemibold);
    transition: background-color var(--durationFast), border-color var(--durationFast), color var(--durationFast);
}

.vs-direct-only:hover {
    border-color: var(--colorCompoundBrandStroke, var(--brand));
}

.vs-direct-only[aria-pressed="true"] {
    background: var(--colorCompoundBrandBackground, var(--brand));
    border-color: transparent;
    color: var(--colorNeutralForegroundOnBrand, #fff);
}

/* A small hollow dot on a row's mini-rail marking that the sailing has one or more transship
   stops. Filled dots (the existing .vs-rail-line::before/::after) mean load/discharge; this is
   deliberately hollow so it reads as "extra stop," not another endpoint. */
.vs-rail-node {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 7px;
    height: 7px;
    margin-left: -3.5px;
    margin-top: -3.5px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid var(--brand, #1b6ec2);
}

/* The panel is rebuilt (not just restyled) on every selection, so a transition has nothing to
   interpolate from - only an animation, which plays once regardless of prior state, works here. */
@keyframes vs-panel-in {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#vs-panel-host > * {
    animation: vs-panel-in .16s ease-out;
}

@media (prefers-reduced-motion: reduce) {
    #vs-panel-host > *, .vs-row:hover {
        animation: none;
        transform: none;
    }
}

/* Panel rotation timeline - mirrors the reference prototype's .rot/.stop structure: a single
   continuous rail (one hairline down the left edge) with a dot per port call, rather than a
   bordered card per stop. Dot states:
   - hollow, hairline border: a stop outside the customer's own leg (dimmed via .vs-stop-after)
   - hollow, brand-colored border: a transship stop ON the customer's own leg (same vessel, one
     more call - never a different ship, hence hollow rather than filled, matching the reference's
     load/disc-vs-transship distinction)
   - filled, brand color: the customer's own load or discharge call (a real endpoint of this leg) */
.vs-rot {
    position: relative;
    padding-left: 22px;
}

.vs-rot::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: #e5e7eb;
    border-radius: 2px;
}

.vs-stop {
    position: relative;
    padding: 7px 0;
}

.vs-stop-mk {
    position: absolute;
    left: -22px;
    top: 11px;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: #fff;
    border: 2px solid #e5e7eb;
    z-index: 1;
}

.vs-stop-cust .vs-stop-mk {
    border-color: var(--brand, #1b6ec2);
}

.vs-stop-endpoint .vs-stop-mk {
    background: var(--brand, #1b6ec2);
    border-color: var(--brand, #1b6ec2);
    box-shadow: 0 0 0 3px rgba(27, 110, 194, .12);
}

.vs-stop-after {
    opacity: .5;
}

.vs-stop-name {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 600;
    color: #111827;
}

.vs-stop-code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
}

.vs-stop-times {
    margin-top: 2px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 11px;
    color: #6b7280;
}

.vs-stop-times b {
    color: #374151;
    font-weight: 500;
}

.vs-role {
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    border-radius: 4px;
    padding: 2px 6px;
}

.vs-role-load {
    background: #e4f2ef;
    color: #0f7b6c;
}

.vs-role-disc {
    background: #fbf0dc;
    color: #a2620a;
}

.vs-role-ts {
    background: #e7f0fa;
    color: var(--brand, #0057b8);
}

.vs-rot-toggle {
    margin-top: 6px;
    border: 0;
    background: transparent;
    color: var(--brand, #1b6ec2);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 0;
}

.vs-rot-toggle:hover {
    text-decoration: underline;
}

/* ============================================================================
   PRINT RULES FOLDED IN FROM KycPrint.razor.css
   MVC has no scoped-CSS equivalent; these apply only to the printable KYC form.
   ========================================================================== */
@media print {
    .no-print {
        display: none !important;
    }

    .avoid-break {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* .no-print already hides the only Fluent .btn/.msgbar elements on that page, but keep this
       as a defensive backstop against shadow/border ink bleeding onto the printed sheet if a
       future edit adds .card/.msgbar content outside the no-print toolbar. */
    .card, .msgbar {
        box-shadow: none;
        border: none;
    }
}

.avoid-break {
    break-inside: avoid;
}

/* ============================================================================
   ENQUIRY FORM  (Views/Enquiry/*)
   Section cards, a two-column-aware grid (container queries, so it adapts to the
   space left beside the side navigator, not to the window), switches, cargo line
   cards with tinted HAZ / reefer / out-of-gauge blocks, document rows, a sticky
   action bar and the submit dialog. Built only from the Fluent tokens above.
   ========================================================================== */
.enq-page { display: flex; flex-direction: column; gap: var(--spacingL); }
.enq-page [hidden] { display: none !important; }

/* ---- Page header ---- */
.enq-head { display: flex; flex-direction: column; gap: var(--spacingXS); }
.enq-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacingM); font: var(--title3); font-weight: var(--fontWeightSemibold); }
.enq-meta { display: flex; flex-wrap: wrap; gap: var(--spacingXS) var(--spacingXL); color: var(--colorNeutralForeground3); font: var(--body1); }
.enq-meta i { margin-right: var(--spacingXS); }
.enq-meta b { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }

.enq-alert {
  display: flex; gap: var(--spacingM); padding: var(--spacingM) var(--spacingL);
  border-radius: var(--radiusXLarge); background: var(--colorPaletteRedBackground1);
  border: var(--strokeWidthThin) solid var(--colorPaletteRedBorder1); color: var(--colorNeutralForeground1);
}
.enq-alert:focus { outline: var(--strokeWidthThick) solid var(--colorPaletteRedForeground1); outline-offset: 2px; }
.enq-alert-ico { color: var(--colorPaletteRedForeground1); font-size: 18px; margin-top: 1px; }
.enq-alert ul { margin: var(--spacingXS) 0 0; padding-left: 18px; list-style: disc; }
.enq-alert li { margin: 2px 0; }
.enq-alert a { color: var(--colorPaletteRedForeground1); text-decoration: underline; }

/* ---- Layout: form column + side navigator ---- */
.enq-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--spacingXL); align-items: start; }
@media (min-width: 1200px) { .enq-layout.has-nav { grid-template-columns: minmax(0, 1fr) 248px; } }
.enq-flow { display: flex; flex-direction: column; gap: var(--spacingXL); min-width: 0; }

/* ---- Section card ---- */
.enq-sec {
  background: var(--colorNeutralBackground1); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  border-radius: var(--radiusXLarge); box-shadow: var(--shadow2); scroll-margin-top: var(--spacingL);
}
.enq-sec-hd {
  display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacingM);
  padding: var(--spacingL) var(--spacingXL); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
}
.enq-sec-ico {
  width: 36px; height: 36px; flex: none; display: grid; place-items: center; font-size: 15px;
  border-radius: var(--radiusXLarge); background: var(--colorBrandBackground2); color: var(--colorBrandForeground1);
}
.enq-sec-tt { flex: 1; min-width: 200px; }
.enq-sec-tt h2 { font: var(--subtitle2); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.enq-sec-tt p { font: var(--caption1); color: var(--colorNeutralForeground3); margin-top: 2px; }
.enq-sec-meta {
  font: var(--caption1); font-weight: var(--fontWeightSemibold); white-space: nowrap;
  padding: 2px 10px; border-radius: var(--radiusCircular); background: var(--colorNeutralBackground4); color: var(--colorNeutralForeground3);
}
.enq-sec-meta:empty { display: none; }
.enq-sec-meta.done { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); }
.enq-sec-bd, .enq-line-bd { padding: var(--spacingXL); container-type: inline-size; }
.enq-hint { font: var(--caption1); color: var(--colorNeutralForeground3); margin-top: var(--spacingM); }
.enq-empty {
  display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingL); border-radius: var(--radiusXLarge);
  border: var(--strokeWidthThin) dashed var(--colorNeutralStroke1); background: var(--colorNeutralBackground2); color: var(--colorNeutralForeground3);
}
.enq-info {
  display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingMNudge) var(--spacingM);
  border-radius: var(--radiusXLarge); background: var(--colorBrandBackground2); color: var(--colorNeutralForeground2);
}
.enq-info i { color: var(--colorBrandForeground1); }

/* ---- Sailing (vessel / voyage) of a booking: the chosen sailing and the list of departures to choose from ---- */
.sail-bar { display: flex; align-items: center; gap: var(--spacingM); flex-wrap: wrap; }
.sail-current {
  flex: 1; min-width: 220px; padding: var(--spacingMNudge) var(--spacingM); border-radius: var(--radiusXLarge);
  background: var(--colorBrandBackground2); color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold);
}
.sail-current.none { background: var(--colorNeutralBackground2); color: var(--colorNeutralForeground3); font-weight: var(--fontWeightRegular); }
.sail-panel {
  margin-top: var(--spacingM); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: var(--radiusXLarge);
  background: var(--colorNeutralBackground1); overflow: hidden;
}
.sail-panel[hidden] { display: none; }
.sail-note { padding: var(--spacingM) var(--spacingL); color: var(--colorNeutralForeground3); font: var(--caption1); }
.sail-note:empty { display: none; }
.sail-list { list-style: none; margin: 0; padding: 0; max-height: 340px; overflow: auto; }
.sail-row {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr) auto; align-items: center; gap: var(--spacingM);
  padding: var(--spacingM) var(--spacingL); border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
}
.sail-row.on { background: var(--colorBrandBackground2); }
.sail-row b { display: block; color: var(--colorNeutralForeground1); }
.sail-row small { display: block; color: var(--colorNeutralForeground3); font: var(--caption1); }
.sail-row .when { color: var(--colorNeutralForeground2); font: var(--caption1); }
.sail-row .when b { font: var(--body1); font-weight: var(--fontWeightSemibold); }
.sail-box { min-width: 0; }
.sail-box .enq-hint { margin-top: var(--spacingS); }
@container (max-width: 620px) {
  .sail-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sail-row > :first-child, .sail-row > .btn { grid-column: 1 / -1; }
}

/* ---- Field grid: columns follow the width of the card, not of the window ---- */
.enq-grid { display: grid; gap: var(--spacingL) var(--spacingXL); grid-template-columns: minmax(0, 1fr); align-items: start; }
.enq-grid .full { grid-column: 1 / -1; }
@container (min-width: 520px) {
  .enq-grid.c2, .enq-grid.c3, .enq-grid.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .enq-grid .span2 { grid-column: span 2; }
}
@container (min-width: 780px) {
  .enq-grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .enq-grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* A caption that wraps (a long label in a narrow column) must not push its control down: where the browser supports subgrid, the
   fields of one grid row share three row tracks - caption, control, message - so the controls of a row line up whatever the
   captions do, and a one-line caption sits right above its control. The row gap moves into each field (the 6px between its parts
   plus a bottom margin that makes up the row spacing), so nothing else about the layout changes. Other browsers keep the old layout. */
@supports (grid-template-rows: subgrid) {
  .enq-page .enq-grid { row-gap: 0; }
  .enq-page .enq-grid > .field {
    display: grid; grid-template-rows: subgrid; grid-row: span 3; row-gap: 6px;
    margin-bottom: calc(var(--spacingL) - 6px);
  }
  .enq-page .enq-grid > .field > .lbl { align-self: end; }
}

/* ---- Fields ---- */
.enq-page .field { gap: 6px; }
.enq-page .field > .lbl { display: flex; align-items: baseline; gap: 6px; min-height: 18px; }
.enq-page .field > .lbl label,
.enq-page .field > .lbl > span[data-label] { font: 13px/18px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2); }
.enq-lbl-ico { margin-right: 6px; color: var(--colorNeutralForeground3); }
.enq-page .ctl { height: 38px; padding: 0 12px; border-radius: var(--radiusLarge); }
.enq-page .ctl.ta { height: auto; padding: var(--spacingS) 12px; }
.enq-page .ctl.ta textarea { min-height: 56px; }
.enq-page .ctl input, .enq-page .ctl select, .enq-page .ctl textarea { font-size: 14px; }
.enq-page .ctl .ico { flex: none; margin-left: var(--spacingS); font-size: 13px; color: var(--colorNeutralForeground3); }
.enq-page .ctl .sfx {
  flex: none; margin-left: var(--spacingS); padding-left: var(--spacingMNudge);
  border-left: var(--strokeWidthThin) solid var(--colorNeutralStroke2);
  font: 12px/16px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold); letter-spacing: .02em; color: var(--colorNeutralForeground3);
}
.enq-page .ctl.ro { background: var(--colorNeutralBackground3); border-style: dashed; }
.enq-page .ctl.ro input, .enq-page .ctl.ro textarea { color: var(--colorNeutralForeground2); }
.enq-page .ctl:focus-within {
  border-color: var(--colorCompoundBrandStroke);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--colorCompoundBrandStroke) 18%, transparent);
}
.enq-page .field.invalid .ctl { border-color: var(--colorPaletteRedForeground1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--colorPaletteRedForeground1) 12%, transparent); }
.enq-page .err { gap: 6px; font: 12px/16px var(--fontFamilyBase); }
.enq-page input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
.enq-page input[type="number"]::-webkit-outer-spin-button,
.enq-page input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Read-only page: plain label + value */
.enq-val .lbl label { font: 12px/16px var(--fontFamilyBase); text-transform: uppercase; letter-spacing: .03em; color: var(--colorNeutralForeground3); }
.enq-v { display: flex; align-items: center; min-height: 28px; font: var(--body1); color: var(--colorNeutralForeground1); word-break: break-word; }
.enq-v.empty { color: var(--colorNeutralForeground4); font-style: italic; }
.enq-v.multi { align-items: flex-start; white-space: pre-wrap; }

/* ---- Chips and pills ---- */
.enq-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--radiusCircular);
  font: 12px/18px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold);
  background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground2);
}
.enq-chip.yes { background: var(--colorPaletteGreenBackground1); color: var(--colorPaletteGreenForeground1); }
.enq-chip.tone-haz { background: #fff7ed; color: #c2410c; }
.enq-chip.tone-ref { background: #f0fdf4; color: #15803d; }
.enq-chip.tone-odc { background: #fdf4ff; color: #7e22ce; }
.enq-pill {
  margin-left: var(--spacingS); padding: 1px 8px; border-radius: var(--radiusCircular);
  font: 11px/16px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold);
  background: var(--colorNeutralBackground4); color: var(--colorNeutralForeground3);
}
.enq-pill.req { background: var(--colorPaletteRedBackground1); color: var(--colorPaletteRedForeground1); }

/* ---- Switches (Y/N flags, cargo type) ---- */
.seg {
  display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; max-width: 100%;
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: var(--radiusXLarge); background: var(--colorNeutralBackground4);
}
.seg > label { position: relative; display: block; cursor: pointer; }
.seg > label > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.seg > label > span, .seg-btn {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 6px 14px; white-space: nowrap;
  border: 0; border-radius: var(--radiusLarge); background: transparent; cursor: pointer;
  font: 13px/18px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2);
  transition: background var(--durationFast) var(--curveEasyEase), color var(--durationFast);
}
.seg > label:hover > span, .seg-btn:hover { color: var(--colorNeutralForeground1); }
.seg > label > input:checked + span, .seg-btn[aria-checked="true"] {
  background: var(--colorNeutralBackground1); color: var(--colorBrandForeground1); box-shadow: var(--shadow4);
}
.seg-btn[aria-checked="true"][data-tone="haz"] { color: #c2410c; }
.seg-btn[aria-checked="true"][data-tone="ref"] { color: #15803d; }
.seg-btn[aria-checked="true"][data-tone="odc"] { color: #7e22ce; }
.seg > label > input:focus-visible + span, .seg-btn:focus-visible { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: 1px; }
.seg.ro { opacity: .6; }
.seg.ro > label, .seg.ro .seg-btn, .seg.ro > label > input { cursor: not-allowed; }

/* ---- Cargo line card ---- */
.enq-line { border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: 10px; background: var(--colorNeutralBackground1); }
/* The card that holds the focused box is raised, so a lookup list that spills past its bottom edge is not painted over by the next card. */
.enq-sec:focus-within, .enq-line:focus-within { position: relative; z-index: 20; }
.enq-line + .enq-line { margin-top: var(--spacingL); }
.enq-line-hd { display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingMNudge) var(--spacingM); background: var(--colorNeutralBackground2); cursor: pointer; user-select: none; border-radius: 9px 9px 0 0; }
.enq-line.collapsed .enq-line-hd { border-radius: 9px; }
.enq-line-hd:hover { background: var(--colorNeutralBackground3); }
.enq-line-hd:focus-visible { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: -2px; }
.enq-line-no {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: var(--colorBrandBackground); color: var(--colorNeutralForegroundOnBrand); font: 13px/1 var(--fontFamilyBase); font-weight: var(--fontWeightSemibold);
}
.enq-line-sum { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.enq-line-sum .muted { color: var(--colorNeutralForeground4); font-weight: var(--fontWeightRegular); }
.enq-line-tags { display: flex; gap: 6px; }
.enq-line-actions { display: flex; align-items: center; gap: 2px; }
.enq-iconbtn {
  width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--radiusLarge);
  background: transparent; color: var(--colorNeutralForeground3); cursor: pointer;
}
.enq-iconbtn:hover { background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground1); }
.enq-iconbtn.danger:hover { background: var(--colorPaletteRedBackground1); color: var(--colorPaletteRedForeground1); }
.enq-chev { margin-left: var(--spacingXS); color: var(--colorNeutralForeground3); transition: transform var(--durationFast); }
.enq-line.collapsed .enq-chev { transform: rotate(-90deg); }
.enq-line.collapsed .enq-line-bd { display: none; }
.enq-line-bd { border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }

/* ---- Shipment Instruction: container rows and shipping-bill rows (they reuse the card of an Enquiry cargo line, but are not collapsible) ---- */
.si-cont .enq-line-hd, .si-bill .enq-line-hd { cursor: default; }
.si-cont .enq-line-hd:hover, .si-bill .enq-line-hd:hover { background: var(--colorNeutralBackground2); }
.si-cont.is-on { border-color: var(--colorBrandStroke1, var(--colorCompoundBrandStroke)); }
.si-cont:not(.is-on) { border-style: dashed; }
.si-cont:not(.is-on) .enq-line-bd { display: none; }
.si-cont:not(.is-on) .enq-line-hd { border-radius: 9px; }
.si-cont:not(.is-on) .enq-line-sum { color: var(--colorNeutralForeground3); font-weight: var(--fontWeightRegular); }
.si-tick { position: relative; display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; cursor: pointer; }
.si-tick > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.si-tick-box {
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: var(--radiusMedium);
  border: var(--strokeWidthThin) solid var(--colorNeutralStrokeAccessible); background: var(--colorNeutralBackground1);
  color: transparent; font-size: 12px; transition: background var(--durationFaster) var(--curveEasyEase), color var(--durationFaster) var(--curveEasyEase);
}
.si-tick:hover > .si-tick-box { border-color: var(--colorNeutralStroke1Hover); }
.si-tick > input:checked + .si-tick-box { background: var(--colorBrandBackground, var(--brand)); border-color: transparent; color: var(--colorNeutralForegroundOnBrand, var(--brand-ink)); }
.si-tick > input:focus-visible + .si-tick-box { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: 2px; }
.si-remarks { white-space: pre-wrap; }

/* ---- HAZ / reefer / out-of-gauge blocks (tints follow the booking portal) ---- */
.enq-block { margin-top: var(--spacingXL); padding: var(--spacingL); border: var(--strokeWidthThin) solid; border-left-width: 4px; border-radius: var(--radiusXLarge); }
.enq-block.haz { background: #fff7ed; border-color: #fed7aa; border-left-color: #f97316; }
.enq-block.ref { background: #f0fdf4; border-color: #bbf7d0; border-left-color: #22c55e; }
.enq-block.odc { background: #fdf4ff; border-color: #e9d5ff; border-left-color: #a855f7; }
.enq-block-hd { display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacingS); margin-bottom: var(--spacingM); font: 13px/18px var(--fontFamilyBase); }
.enq-block-hd span { font-size: 12px; color: var(--colorNeutralForeground3); }
.enq-block.haz .enq-block-hd i { color: #ea580c; }
.enq-block.ref .enq-block-hd i { color: #16a34a; }
.enq-block.odc .enq-block-hd i { color: #9333ea; }

/* ---- Documents ---- */
.enq-docs { display: flex; flex-direction: column; gap: var(--spacingM); }
.enq-doc {
  display: flex; align-items: center; gap: var(--spacingM); padding: var(--spacingM) var(--spacingL);
  border: var(--strokeWidthThin) dashed var(--colorNeutralStroke1); border-radius: 10px; background: var(--colorNeutralBackground2);
}
.enq-doc.has { border-style: solid; border-color: var(--colorPaletteGreenBorder1); background: var(--colorPaletteGreenBackground1); }
.enq-doc-ico { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: var(--radiusXLarge); background: var(--colorNeutralBackground5); color: var(--colorNeutralForeground3); }
.enq-doc.has .enq-doc-ico { background: #fff; color: var(--colorPaletteGreenForeground1); }
.enq-doc-main { flex: 1; min-width: 0; }
.enq-doc-name { font: var(--body1); font-weight: var(--fontWeightSemibold); }
.enq-doc-sub { margin-top: 2px; overflow: hidden; text-overflow: ellipsis; font: var(--caption1); color: var(--colorNeutralForeground3); }
.enq-doc-sub a { color: var(--colorBrandForegroundLink); text-decoration: none; }
.enq-doc-sub a:hover { text-decoration: underline; }
.enq-docs-sub { display: flex; align-items: baseline; gap: var(--spacingS); margin-top: var(--spacingS); font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2); }
.enq-docs-sub span { font: var(--caption1); font-weight: var(--fontWeightRegular); color: var(--colorNeutralForeground3); }
.enq-add-doc { align-self: flex-start; }
.enq-doc-actions { display: flex; align-items: center; gap: 6px; }
.enq-file { position: relative; cursor: pointer; }
.enq-file:focus-within { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: 2px; }

/* ---- Side navigator ---- */
.enq-side { position: sticky; top: var(--spacingL); display: flex; flex-direction: column; gap: var(--spacingM); }
.enq-progress { padding: var(--spacingM) var(--spacingL); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: 10px; background: var(--colorNeutralBackground1); box-shadow: var(--shadow2); }
.enq-progress-top { display: flex; justify-content: space-between; font: 12px/16px var(--fontFamilyBase); color: var(--colorNeutralForeground3); }
.enq-progress-top b { color: var(--colorNeutralForeground1); }
.enq-progress-track { height: 6px; margin-top: var(--spacingS); overflow: hidden; border-radius: var(--radiusCircular); background: var(--colorNeutralBackground5); }
.enq-progress-track i { display: block; height: 100%; border-radius: var(--radiusCircular); background: var(--colorBrandBackground); transition: width var(--durationSlow) var(--curveDecelerateMid); }
.enq-nav { display: flex; flex-direction: column; gap: 2px; padding: 6px; border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: 10px; background: var(--colorNeutralBackground1); box-shadow: var(--shadow2); }
.enq-nav a { display: flex; align-items: center; gap: var(--spacingMNudge); padding: var(--spacingS) var(--spacingMNudge); border-radius: var(--radiusLarge); color: var(--colorNeutralForeground2); font: var(--body1); text-decoration: none; }
.enq-nav a > i { width: 16px; text-align: center; color: var(--colorNeutralForeground3); }
.enq-nav a:hover { background: var(--colorNeutralBackground1Hover); }
.enq-nav a.active { background: var(--colorBrandBackground2); color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.enq-nav a.active > i { color: var(--colorBrandForeground1); }
.enq-nav .tick { margin-left: auto; width: 18px; height: 18px; display: grid; place-items: center; font-size: 9px; color: transparent; border: 1.5px solid var(--colorNeutralStroke1); border-radius: 50%; }
.enq-nav a.done .tick { background: var(--colorPaletteGreenForeground1); border-color: var(--colorPaletteGreenForeground1); color: #fff; }

/* ---- Sticky action bar ---- */
.enq-bar {
  position: sticky; bottom: 0; z-index: 30; display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacingM);
  margin: var(--spacingL) calc(-1 * var(--spacingXXXL)) -64px; padding: var(--spacingM) var(--spacingXXXL);
  background: rgba(255, 255, 255, .94); backdrop-filter: blur(8px);
  border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2); box-shadow: 0 -4px 12px rgba(0, 0, 0, .05);
}
.enq-bar-spacer { flex: 1; }
.enq-inline { display: inline; }
.enq-state { display: inline-flex; align-items: center; gap: var(--spacingS); font: var(--body1); color: var(--colorNeutralForeground3); }
.enq-state[data-state="saved"] i { color: var(--colorPaletteGreenForeground1); }
.enq-state[data-state="dirty"] { color: var(--colorPaletteYellowForeground1); }
.enq-state[data-state="dirty"] i { color: var(--colorPaletteYellowForeground1); }
.enq-bar-progress { font: var(--caption1); color: var(--colorNeutralForeground3); }

/* ---- Submit dialog ---- */
.enq-dialog { margin: auto; width: calc(100% - 32px); max-width: 440px; padding: 28px; border: 0; border-radius: 14px; box-shadow: var(--shadow64); text-align: center; color: var(--colorNeutralForeground1); }
.enq-dialog::backdrop { background: var(--colorBackgroundOverlay); backdrop-filter: blur(2px); }
.enq-dialog-ico { display: inline-grid; place-items: center; width: 52px; height: 52px; margin-bottom: var(--spacingM); border-radius: 50%; background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: 22px; }
.enq-dialog h2 { font: var(--subtitle1); font-weight: var(--fontWeightSemibold); }
.enq-dialog p { margin: var(--spacingS) 0 var(--spacingXL); color: var(--colorNeutralForeground3); }
.enq-dialog-actions { display: flex; justify-content: center; gap: var(--spacingMNudge); }

/* Destructive confirmation (delete a draft): same dialog, red icon, red primary action. */
.enq-dialog.danger .enq-dialog-ico { background: var(--colorPaletteRedBackground1); color: var(--colorPaletteRedForeground1); box-shadow: inset 0 0 0 1px var(--colorPaletteRedBorder1); }
.enq-dialog-name { display: block; margin: var(--spacingS) 0 0; padding: var(--spacingS) var(--spacingM); border-radius: var(--radiusLarge); background: var(--colorNeutralBackground3); font-weight: var(--fontWeightSemibold); overflow-wrap: anywhere; }
.btn.danger:hover { background: #8e0b17; }
.btn.danger-ghost { color: var(--colorPaletteRedForeground1); }
.btn.danger-ghost:hover { background: var(--colorPaletteRedBackground1); border-color: var(--colorPaletteRedBorder1); color: var(--colorPaletteRedForeground1); }

/* ---- Enquiry list: one row-card per enquiry (not a wide table) ---- */
.enq-lp { max-width: 1120px; }
.enq-lp-head { display: flex; align-items: flex-end; gap: var(--spacingL); flex-wrap: wrap; margin-bottom: var(--spacingXL); }
.enq-lp-head > div { flex: 1; min-width: 240px; }
.enq-lp-head h1 { font: var(--title3); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.enq-lp-head p { margin-top: var(--spacingXXS); color: var(--colorNeutralForeground3); }
/* ---- Dashboard alerts (a booking the user submitted, ...) ---- */
.dash-alerts { display: flex; flex-direction: column; gap: var(--spacingS); margin-bottom: var(--spacingXL); }
.dash-alerts .msgbar { align-items: center; }
.dash-alerts .mb-body a { margin-left: var(--spacingS); font-weight: var(--fontWeightSemibold); }
.dash-alert-read { margin-left: auto; flex: none; }
.enq-lp-search { display: flex; align-items: center; gap: var(--spacingM); flex-wrap: wrap; margin-bottom: var(--spacingL); }
.enq-lp-search .ctl { flex: 1; min-width: 240px; max-width: 520px; }
.enq-lp-list { display: flex; flex-direction: column; gap: var(--spacingS); margin: 0; padding: 0; list-style: none; }
.enq-row {
  --enq-accent: var(--colorNeutralStroke1);
  position: relative; display: grid; align-items: center; gap: var(--spacingL);
  grid-template-columns: minmax(200px, 1.5fr) minmax(150px, 1fr) minmax(120px, .8fr) auto;
  padding: var(--spacingL) var(--spacingXL) var(--spacingL) calc(var(--spacingXL) + 3px);
  background: var(--colorNeutralBackground1); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: 10px;
  box-shadow: var(--shadow2), inset 3px 0 0 var(--enq-accent);
  transition: box-shadow var(--durationFast), border-color var(--durationFast);
}
.enq-row:hover { border-color: var(--colorNeutralStroke1); box-shadow: var(--shadow4), inset 3px 0 0 var(--enq-accent); }
.enq-row[data-status="Draft"] { --enq-accent: var(--colorPaletteYellowBorder1); }
.enq-row[data-status="Submitted"] { --enq-accent: var(--colorBrandStroke1, #0F6CBD); }
.enq-row[data-status="Converted"] { --enq-accent: var(--colorPaletteGreenForeground1); }
.enq-row[data-status="Rejected"] { --enq-accent: var(--colorPaletteRedForeground1); }
.enq-row-main { min-width: 0; }
.enq-row-title { display: inline-block; font: var(--body2); font-size: 15px; font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); text-decoration: none; }
.enq-row-title:hover { color: var(--colorBrandForegroundLink, var(--brand)); text-decoration: underline; }
.enq-row-title::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }   /* the whole card opens the enquiry */
.enq-row-title:focus-visible { outline: none; }
.enq-row-title:focus-visible::after { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: 1px; }
.enq-row-sub { margin-top: 2px; font: var(--caption1); color: var(--colorNeutralForeground3); }
.enq-row-sub b { font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2); }
.enq-row-route { display: flex; align-items: center; gap: var(--spacingM); }
.enq-row-route .pt { display: flex; flex-direction: column; line-height: 1.25; }
.enq-row-route .pt b { font-size: 15px; font-weight: var(--fontWeightSemibold); letter-spacing: .02em; }
.enq-row-route .pt span { font: 11px/14px var(--fontFamilyBase); color: var(--colorNeutralForeground3); text-transform: uppercase; letter-spacing: .04em; }
.enq-row-route > i { font-size: 11px; color: var(--colorNeutralForeground4); }
.enq-row-route .none { color: var(--colorNeutralForeground4); }
.enq-row-status { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.enq-row-acts { position: relative; z-index: 1; display: grid; grid-template-columns: 96px 32px 32px; align-items: center; gap: var(--spacingXS); justify-content: end; }
.enq-row-acts .btn.outline { justify-content: center; min-height: 32px; }
.enq-row-acts form { display: contents; }
.enq-row-acts .btn.icon { width: 32px; height: 32px; min-height: 32px; color: var(--colorNeutralForeground3); }
.enq-row-acts .btn.icon:hover { color: var(--colorNeutralForeground1); }
.enq-row-acts .btn.icon.danger-ghost:hover { color: var(--colorPaletteRedForeground1); }
.enq-lp-foot { display: flex; align-items: center; gap: var(--spacingM); margin-top: var(--spacingL); color: var(--colorNeutralForeground3); font: var(--caption1); }
.enq-lp-foot .pager { margin-left: auto; gap: var(--spacingS); }
.enq-empty-state { padding: 56px var(--spacingXL); text-align: center; }
.enq-empty-state .ico { display: inline-grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--spacingM); border-radius: 50%; background: var(--colorBrandBackground2); color: var(--colorBrandForeground1); font-size: 22px; }

@media (max-width: 900px) {
  .enq-row { grid-template-columns: 1fr auto; row-gap: var(--spacingM); }
  .enq-row-main { grid-column: 1 / -1; }
  .enq-row-acts { grid-column: 1 / -1; justify-content: start; }
  .enq-bar { margin-left: calc(-1 * var(--spacingXL)); margin-right: calc(-1 * var(--spacingXL)); padding-left: var(--spacingXL); padding-right: var(--spacingXL); }
  .enq-sec-hd, .enq-sec-bd, .enq-line-bd { padding-left: var(--spacingL); padding-right: var(--spacingL); }
  .enq-line-tags { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .enq-chev, .enq-progress-track i, .seg > label > span, .seg-btn { transition: none; }
}

/* ============================================================================================
   QUOTATION (list tabs, summary, charge groups, decision card)
   ============================================================================================ */
.qt-tabs { display: flex; flex-wrap: wrap; gap: var(--spacingXS); margin-bottom: var(--spacingL); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }
.qt-tab {
  margin-bottom: -1px; padding: 10px 14px; border-bottom: 2px solid transparent; border-radius: var(--radiusMedium) var(--radiusMedium) 0 0;
  font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2); text-decoration: none;
}
.qt-tab:hover { background: var(--colorSubtleBackgroundHover); color: var(--colorNeutralForeground1); }
.qt-tab.active { color: var(--colorBrandForeground1); border-bottom-color: var(--colorBrandBackground, var(--brand)); }
.enq-row[data-status="waiting"] { --enq-accent: var(--colorBrandStroke1, #0F6CBD); }
.enq-row[data-status="approved"] { --enq-accent: var(--colorPaletteGreenForeground1); }
.enq-row[data-status="countered"] { --enq-accent: var(--colorPaletteYellowBorder1); }
.enq-row[data-status="rejected"] { --enq-accent: var(--colorPaletteRedForeground1); }
.enq-row[data-status="expired"], .enq-row[data-status="rework"], .enq-row[data-status="other"] { --enq-accent: var(--colorNeutralStroke1); }
.qt-soon { color: var(--colorPaletteRedForeground1) !important; font-weight: var(--fontWeightSemibold); }

.qt-page .enq-meta .qt-pdf { margin-left: auto; font-weight: var(--fontWeightSemibold); color: var(--colorBrandForegroundLink, var(--brand)); text-decoration: none; }
.qt-page .enq-meta .qt-pdf:hover { text-decoration: underline; }
.qt-page .msgbar { margin-bottom: var(--spacingL); }
.qt-quote { display: block; margin-top: var(--spacingXS); font-style: italic; color: var(--colorNeutralForeground3); }

.qt-routes { display: flex; flex-direction: column; gap: var(--spacingM); margin-bottom: var(--spacingL); }
.qt-route { display: flex; align-items: center; flex-wrap: wrap; gap: var(--spacingM); }
.qt-route > i { font-size: 12px; color: var(--colorNeutralForeground4); }
.qt-port { display: flex; flex-direction: column; font-size: 16px; font-weight: var(--fontWeightSemibold); line-height: 1.25; }
.qt-port small { font: 11px/14px var(--fontFamilyBase); font-weight: var(--fontWeightRegular); text-transform: uppercase; letter-spacing: .04em; color: var(--colorNeutralForeground3); }
.qt-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--spacingL); margin: 0; }
.qt-facts dt { font: var(--caption1); color: var(--colorNeutralForeground3); }
.qt-facts dd { margin: 2px 0 0; font-weight: var(--fontWeightSemibold); }

.qt-group { margin-bottom: var(--spacingL); overflow: hidden; border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: 10px; background: var(--colorNeutralBackground1); }
.qt-group:last-child { margin-bottom: 0; }
.qt-group-hd { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--spacingL); padding: 12px var(--spacingL); background: var(--colorNeutralBackground3); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }
.qt-group-hd h3 { font: var(--body2); font-weight: var(--fontWeightSemibold); }
.qt-group-hd p { margin-top: 2px; font: var(--caption1); color: var(--colorNeutralForeground3); }
.qt-group-total { white-space: nowrap; font: var(--body1); color: var(--colorNeutralForeground3); }
.qt-group-total b { font-size: 15px; color: var(--colorNeutralForeground1); }
.qt-scroll { overflow-x: auto; }
.qt-grid { width: 100%; min-width: 720px; border-collapse: collapse; }
.qt-grid th { padding: 10px 14px; border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); text-align: left; white-space: nowrap; font: 12px/16px var(--fontFamilyBase); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground3); }
.qt-grid td { padding: 10px 14px; border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke3); vertical-align: top; }
.qt-grid tbody tr:last-child td { border-bottom: 0; }
.qt-grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qt-charge { font-weight: var(--fontWeightSemibold); }
.qt-sub { max-width: 360px; margin-top: 2px; font: var(--caption1); color: var(--colorNeutralForeground3); }
.qt-counter {
  width: 112px; height: 32px; padding: 0 8px; text-align: right; font: 14px var(--fontFamilyBase); font-variant-numeric: tabular-nums;
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke1); border-radius: var(--radiusMedium); background: var(--colorNeutralBackground1);
}
.qt-counter:focus { outline: var(--strokeWidthThick) solid var(--colorCompoundBrandStroke); outline-offset: 0; }
/* The global legacy ".invalid" outline would box the whole field wrapper; the control's own red border is the marker here. */
.qt-page .invalid { outline: none; }
.qt-counter.invalid { border-color: var(--colorPaletteRedForeground1); box-shadow: 0 0 0 3px color-mix(in srgb, var(--colorPaletteRedForeground1) 12%, transparent); }
.qt-grid tr.changed td { background: var(--colorBrandBackground2); }
.qt-group-ft { padding: 10px var(--spacingL); border-top: var(--strokeWidthThin) solid var(--colorNeutralStroke2); background: var(--colorBrandBackground2); text-align: right; font: var(--body1); }
.qt-err { margin-top: 4px; font: 12px/16px var(--fontFamilyBase); color: var(--colorPaletteRedForeground1); }
.qt-err:empty { display: none; }

.qt-note { margin-bottom: var(--spacingL); }
.qt-note:last-child { margin-bottom: 0; }
.qt-note h3 { margin-bottom: 2px; font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground2); }
.qt-note p { white-space: pre-line; }

.qt-decide {
  padding: var(--spacingXL); border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: var(--radiusXLarge);
  background: var(--colorNeutralBackground1); box-shadow: var(--shadow2);
}
.qt-decide h2 { font: var(--subtitle1); font-weight: var(--fontWeightSemibold); }
.qt-decide > header p { margin: var(--spacingXS) 0 var(--spacingL); color: var(--colorNeutralForeground3); }
.qt-decide-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: var(--spacingL); }
.qt-decide-side { display: flex; flex-direction: column; gap: var(--spacingL); }
.qt-hint { font-weight: var(--fontWeightRegular); font-size: 12px; color: var(--colorNeutralForeground3); }
.qt-actions { display: flex; flex-wrap: wrap; gap: var(--spacingMNudge); margin-top: var(--spacingL); }
.qt-actions .btn { min-height: 38px; }

/* The quotation status labels are longer than the enquiry ones ("Waiting for your approval"), so on a phone the row stacks. */
@media (max-width: 560px) {
  .qt-list .enq-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .qt-decide-grid { grid-template-columns: 1fr; }
  .qt-page .enq-meta .qt-pdf { margin-left: 0; }
}

/* Booking: the Excel upload page (three steps, then what to fix in a refused file). Everything else on the Booking pages reuses the .enq-* rules. */
.bk-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--spacingL); margin-bottom: var(--spacingXL); }
.bk-step {
  display: flex; flex-direction: column; gap: var(--spacingS); padding: var(--spacingL);
  border: var(--strokeWidthThin) solid var(--colorNeutralStroke2); border-radius: var(--radiusXLarge);
  background: var(--colorNeutralBackground1); box-shadow: var(--shadow2);
}
.bk-step h2 { font: var(--subtitle2); font-weight: var(--fontWeightSemibold); display: flex; align-items: center; gap: var(--spacingS); }
.bk-step p { color: var(--colorNeutralForeground3); }
.bk-step .btn, .bk-step input[type="file"] { align-self: flex-start; }
.bk-step input[type="file"] { max-width: 100%; }
.bk-step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--colorBrandBackground2); color: var(--colorBrandForeground2); font: var(--caption1); font-weight: var(--fontWeightSemibold);
}
.bk-issues { overflow-x: auto; }
.bk-issues table { width: 100%; border-collapse: collapse; min-width: 560px; }
.bk-issues th { text-align: left; font: var(--caption1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground3); padding: var(--spacingS) var(--spacingM); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke2); }
.bk-issues td { padding: var(--spacingS) var(--spacingM); border-bottom: var(--strokeWidthThin) solid var(--colorNeutralStroke3); vertical-align: top; }
.bk-issues td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* =====================================================================
   KYC page (Views/Kyc). Everything is scoped under .kyc-* so it cannot
   leak into other portal pages. Light theme only - the portal defines no
   dark token set, so a dark KYC page would clash with the shell.
   ===================================================================== */
.kyc-i { width: 1.125rem; height: 1.125rem; flex: none; }
.kyc-i.lg { width: 1.75rem; height: 1.75rem; }
.kyc-req { color: var(--colorPaletteRedForeground1); }

/* Step bar */
.kyc-steps { display: flex; align-items: center; gap: .5rem; margin-bottom: var(--spacingS); }
.kyc-step { display: flex; align-items: center; gap: .5rem; font: var(--caption1); color: var(--colorNeutralForeground3); white-space: nowrap; }
.kyc-step b { display: grid; place-items: center; width: 1.625rem; height: 1.625rem; border-radius: 999px; border: 2px solid var(--colorNeutralStroke1); font-weight: 600; background: var(--colorNeutralBackground1); }
.kyc-step.active { color: var(--colorNeutralForeground1); font-weight: 600; }
.kyc-step.active b { border-color: var(--colorCompoundBrandStroke); background: var(--colorBrandBackground, var(--brand)); color: var(--colorNeutralForegroundOnBrand, #fff); }
.kyc-step.done b { border-color: var(--colorPaletteGreenForeground1); background: var(--colorPaletteGreenForeground1); color: #fff; }
.kyc-step-line { flex: 1; height: 2px; background: var(--colorNeutralStroke2); min-width: 1rem; }
.kyc-progress { margin-bottom: var(--spacingL); }
.kyc-progress-track { height: 6px; border-radius: 999px; background: var(--colorNeutralStroke2); overflow: hidden; margin-top: .375rem; }
.kyc-progress-fill { height: 100%; background: var(--colorBrandBackground, var(--brand)); transition: width .3s; }
@media (max-width: 40rem) { .kyc-step span { display: none; } .kyc-step.active span { display: inline; } }

/* Sticky progress header: step bar + next-step line + progress bar stay visible while scrolling.
   .content is the scroll container and paints --colorNeutralBackground3, so match it to hide what scrolls under. */
.kyc-sticky { position: sticky; top: 0; z-index: 40; background: var(--colorNeutralBackground3); padding: .75rem 0 .25rem; margin-bottom: var(--spacingS); border-bottom: 1px solid var(--colorNeutralStroke2); }
.kyc-sticky .kyc-progress { margin-bottom: .5rem; }
.kyc-next { margin: 0 0 .5rem; }

/* Accordion cards (details/summary): filled sections collapse after Save details */
.kyc-card[hidden] { display: none; }
.kyc-acc > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
.kyc-acc > summary::-webkit-details-marker { display: none; }
.kyc-acc > summary::after { content: ""; margin-left: auto; width: .5rem; height: .5rem; border-right: 2px solid var(--colorNeutralForeground3); border-bottom: 2px solid var(--colorNeutralForeground3); transform: rotate(45deg); transition: transform .15s; flex: none; }
.kyc-acc[open] > summary::after { transform: rotate(-135deg); }
.kyc-acc > summary:focus-visible { outline: 2px solid var(--colorCompoundBrandStroke); outline-offset: 4px; border-radius: 6px; }
.kyc-acc-state { font: var(--caption1); color: var(--colorPaletteGreenForeground1); margin-left: .25rem; }
.kyc-acc[open] > summary { margin-bottom: 1rem; }

/* Section cards */
.kyc-card { background: var(--colorNeutralBackground1); border: 1px solid var(--colorNeutralStroke2); border-radius: 12px; padding: 1.25rem; margin-bottom: 1.25rem; box-shadow: var(--shadow2); }
.kyc-card.readonly { background: var(--colorNeutralBackground3); box-shadow: none; }
.kyc-card-h { display: flex; align-items: center; gap: .625rem; margin-bottom: 1rem; font-size: 1rem; font-weight: 600; color: var(--colorNeutralForeground1); }
.kyc-card-h .ico { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; background: color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 12%, transparent); color: var(--colorCompoundBrandStroke, var(--brand)); }
.kyc-card-h small { margin-left: auto; font: var(--caption1); font-weight: 400; color: var(--colorNeutralForeground3); }
.kyc-grid { display: grid; gap: 1.125rem 1.5rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .kyc-grid { grid-template-columns: 1fr 1fr; } .kyc-grid .span2 { grid-column: span 2; } }
.kyc-label { display: block; margin-bottom: .25rem; font: var(--caption1); font-weight: 600; color: var(--colorNeutralForeground2); }
.kyc-hint { margin-top: .25rem; font: var(--caption1); color: var(--colorNeutralForeground3); }
.kyc-group-title { grid-column: 1 / -1; font: var(--caption1); font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--colorNeutralForeground3); padding-top: .75rem; border-top: 1px dashed var(--colorNeutralStroke2); }
.kyc-group-title.first { border-top: 0; padding-top: 0; }

/* Fields with leading icon + validity state */
.kyc-field { position: relative; }
.kyc-field .kyc-lead { position: absolute; left: .75rem; top: 1.25rem; transform: translateY(-50%); color: var(--colorNeutralForeground3); pointer-events: none; display: flex; }
.kyc-field.has-lead .kyc-input { padding-left: 2.375rem; }
.kyc-field .kyc-state { position: absolute; right: .75rem; top: 1.25rem; transform: translateY(-50%); display: none; }
.kyc-field.is-valid .kyc-state.ok, .kyc-field.is-invalid .kyc-state.bad { display: flex; }
.kyc-field .kyc-state.ok { color: var(--colorPaletteGreenForeground1); }
.kyc-field .kyc-state.bad { color: var(--colorPaletteRedForeground1); }
.kyc-input { width: 100%; min-height: 2.5rem; border-radius: 8px; border: 1px solid var(--colorNeutralStroke1); padding: .5rem 2.25rem .5rem .75rem; font-size: .875rem; background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); }
.kyc-input:focus { outline: none; border-color: var(--colorCompoundBrandStroke, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 25%, transparent); }
.kyc-field.is-valid .kyc-input { border-color: var(--colorPaletteGreenBorder1); }
.kyc-field.is-invalid .kyc-input { border-color: var(--colorPaletteRedForeground1); background: var(--colorPaletteRedBackground1); }
.kyc-error { margin-top: .25rem; font: var(--caption1); color: var(--colorPaletteRedForeground1); }
select.kyc-input { padding-right: .75rem; }

/* Declarations */
.kyc-decl { display: flex; gap: .75rem; padding: .875rem; border: 1px solid var(--colorNeutralStroke2); border-radius: 10px; font-size: .8125rem; line-height: 1.5; cursor: pointer; margin-bottom: .625rem; }
.kyc-decl:has(input:checked) { border-color: var(--colorPaletteGreenBorder1); background: var(--colorPaletteGreenBackground1); }
.kyc-decl input[type=checkbox] { width: 1.125rem; height: 1.125rem; margin-top: .125rem; flex: none; accent-color: var(--colorBrandBackground, var(--brand)); }

/* Upload cards */
.kyc-upload { position: relative; display: flex; flex-direction: column; align-items: center; gap: .25rem; padding: 1.25rem 1rem; border: 2px dashed var(--colorNeutralStroke1); border-radius: 12px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; background: var(--colorNeutralBackground1); min-height: 8.5rem; justify-content: center; }
.kyc-upload:hover, .kyc-upload.drag { border-color: var(--colorCompoundBrandStroke, var(--brand)); background: color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 6%, transparent); }
.kyc-upload .ico { color: var(--colorCompoundBrandStroke, var(--brand)); }
.kyc-upload .t { font-weight: 600; font-size: .875rem; }
.kyc-upload .s { font: var(--caption1); color: var(--colorNeutralForeground3); }
.kyc-upload input[type=file] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.kyc-upload.done { border-style: solid; border-color: var(--colorPaletteGreenBorder1); background: var(--colorPaletteGreenBackground1); cursor: default; }
.kyc-upload.done .ico { color: var(--colorPaletteGreenForeground1); }
.kyc-upload.done .file { display: flex; align-items: center; gap: .375rem; max-width: 100%; font-weight: 600; font-size: .8125rem; word-break: break-all; }
.kyc-upload .acts { display: flex; gap: .5rem; margin-top: .375rem; position: relative; z-index: 2; }
.kyc-iconbtn { display: inline-grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 8px; border: 1px solid var(--colorNeutralStroke1); background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground2); cursor: pointer; }
.kyc-iconbtn:hover { background: var(--colorSubtleBackgroundHover); }
.kyc-iconbtn.danger { color: var(--colorPaletteRedForeground1); }
.kyc-upload.error { border-color: var(--colorPaletteRedForeground1); background: var(--colorPaletteRedBackground1); }
.kyc-upload .bar { display: none; width: 80%; height: 6px; border-radius: 999px; background: var(--colorNeutralStroke2); overflow: hidden; }
.kyc-upload .bar i { display: block; height: 100%; width: 0; background: var(--colorBrandBackground, var(--brand)); transition: width .15s; }
.kyc-upload.busy .bar { display: block; }
.kyc-upload.busy .t, .kyc-upload.busy .s { opacity: .7; }
.kyc-upload.busy { cursor: progress; }
.kyc-upload.busy input[type=file] { pointer-events: none; }

/* Selectable document-type cards */
.kyc-choices { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); margin-bottom: 1rem; }
.kyc-choice { position: relative; display: flex; flex-direction: column; align-items: center; gap: .375rem; padding: 1rem .75rem; border: 2px solid var(--colorNeutralStroke2); border-radius: 12px; cursor: pointer; font-weight: 600; font-size: .875rem; min-height: 5.5rem; justify-content: center; background: var(--colorNeutralBackground1); }
.kyc-choice:hover { border-color: var(--colorNeutralStroke1Hover); }
.kyc-choice input { position: absolute; opacity: 0; pointer-events: none; }
.kyc-choice .ico { color: var(--colorNeutralForeground3); }
.kyc-choice:has(input:checked) { border-color: var(--colorCompoundBrandStroke, var(--brand)); background: color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 8%, transparent); }
.kyc-choice:has(input:checked) .ico { color: var(--colorCompoundBrandStroke, var(--brand)); }
.kyc-choice:has(input:focus-visible) { outline: 2px solid var(--colorStrokeFocus2); outline-offset: 2px; }

/* Signature */
.kyc-seg { display: inline-flex; padding: .1875rem; border-radius: 999px; background: var(--colorNeutralBackground6); margin-bottom: .875rem; }
.kyc-seg button { border: 0; background: transparent; padding: .375rem 1.125rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; color: var(--colorNeutralForeground2); cursor: pointer; min-height: 2rem; }
.kyc-seg button.on { background: var(--colorNeutralBackground1); color: var(--colorNeutralForeground1); box-shadow: var(--shadow2); }
.kyc-sig-wrap { position: relative; max-width: 26rem; border: 1px solid var(--colorNeutralStroke1); border-radius: 10px; background: var(--colorNeutralBackground1); overflow: hidden; }
.kyc-sig-line { position: absolute; left: 1rem; right: 1rem; bottom: 2.25rem; border-bottom: 1px solid var(--colorNeutralStroke1); pointer-events: none; font-size: .75rem; color: var(--colorNeutralForeground3); padding-bottom: .125rem; }
.kyc-sig-wrap canvas { display: block; width: 100%; height: auto; touch-action: none; position: relative; z-index: 1; border: 0; }
.kyc-sig-tools { display: flex; gap: .5rem; margin-top: .625rem; }

/* Sticky action bar */
.kyc-bar { position: sticky; bottom: 0; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem; padding: .75rem 1rem; background: color-mix(in srgb, var(--colorNeutralBackground1) 94%, transparent); backdrop-filter: blur(6px); border-top: 1px solid var(--colorNeutralStroke2); border-radius: 12px 12px 0 0; box-shadow: 0 -4px 12px rgba(0,0,0,.06); }
.kyc-bar .status { margin-right: auto; font: var(--caption1); font-weight: 700; color: var(--colorNeutralForeground2, var(--colorNeutralForeground3)); }
.kyc-bar .btn { gap: .375rem; min-height: 2.5rem; }
@media (max-width: 40rem) { .kyc-bar .btn { flex: 1 1 100%; min-height: 2.75rem; justify-content: center; } .kyc-bar .status { flex: 1 1 100%; } .kyc-bar form { flex: 1 1 100%; display: flex; } .kyc-bar form .btn { flex: 1; } }
.btn.loading { pointer-events: none; opacity: .8; }
.btn.loading::before { content: ""; width: .875rem; height: .875rem; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: kyc-spin .7s linear infinite; }
@keyframes kyc-spin { to { transform: rotate(360deg); } }

/* Toasts */
.kyc-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; max-width: min(24rem, calc(100vw - 2rem)); }
.kyc-toast { display: flex; gap: .625rem; align-items: flex-start; padding: .75rem .875rem; border-radius: 10px; background: var(--colorNeutralBackground1); border: 1px solid var(--colorNeutralStroke1); box-shadow: var(--shadow16); font-size: .8125rem; animation: kyc-in .2s ease-out; }
.kyc-toast.success { border-color: var(--colorPaletteGreenBorder1); } .kyc-toast.success .kyc-i { color: var(--colorPaletteGreenForeground1); }
.kyc-toast.danger { border-color: var(--colorPaletteRedBorder1); } .kyc-toast.danger .kyc-i { color: var(--colorPaletteRedForeground1); }
@keyframes kyc-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .kyc-toast, .btn.loading::before { animation: none; } .kyc-progress-fill { transition: none; } }

/* KYC Customer Information Sheet: true A4 output. A zero page margin also removes the browser's
   date / URL / page-number header and footer; the sheet supplies its own margins. */
@page kycsheet { size: A4; margin: 0; }
.kyc-print { page: kycsheet; }
@media print {
    /* Compact enough for the whole sheet (about 22 rows, declaration, signature) to fit one A4 page. */
    .kyc-print { max-width: none; width: auto; margin: 0; padding: 10mm 14mm; font-size: 10pt; line-height: 1.3; }
    .kyc-print h1 { font-size: 13pt; margin-bottom: 3mm; }
    .kyc-print h2 { font-size: 10pt; margin-bottom: 1.5mm; }
    .kyc-print table { font-size: 9pt; margin-bottom: 3.5mm; }
    .kyc-print td { padding: .7mm 1.8mm; }
    .kyc-print p, .kyc-print .space-y-3 { font-size: 8.5pt; line-height: 1.3; }
    .kyc-print .space-y-3 > * + * { margin-top: 1.5mm; }
    .kyc-print .mb-8 { margin-bottom: 4mm; }
    .kyc-print .mb-16 { margin-bottom: 10mm; }
    .kyc-print img { height: 12mm; }
}

/* =====================================================================
   Registration page (Views/Account/Register.cshtml). Reuses the .kyc-*
   cards/fields; .reg-* is only the shell, rail, grid and password extras.
   ===================================================================== */
.reg-page { position: fixed; inset: 0; z-index: 1; background: var(--colorNeutralBackground3); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow: auto; }
.reg-shell { margin: 0 auto; display: flex; width: 100%; max-width: 72rem; max-height: 100%; overflow: hidden; }
.reg-rail { display: none; width: 20%; min-width: 15rem; flex-direction: column; justify-content: space-between; gap: 1.5rem; padding: 1.5rem; background: var(--colorBrandBackground2); }
@media (min-width: 64rem) { .reg-rail { display: flex; } }
.reg-points { list-style: none; margin: 0; padding: 0; display: grid; gap: .875rem; font-size: 12px; color: var(--colorNeutralForeground2); }
.reg-points li { display: flex; gap: .625rem; align-items: flex-start; }
.reg-points b { display: block; color: var(--colorNeutralForeground1); }
.reg-points .ico { flex: none; display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 8px; background: var(--colorNeutralBackground1); color: var(--colorCompoundBrandStroke, var(--brand)); }
.reg-main { display: flex; flex: 1; min-width: 0; flex-direction: column; overflow: hidden; }
.reg-form { display: flex; flex: 1; min-height: 0; flex-direction: column; }
.reg-body { flex: 1; min-height: 0; overflow-y: auto; padding: 1rem 1.5rem; }
.reg-card:last-child { margin-bottom: 0; }
.reg-grid { grid-template-columns: 1fr; }
@media (min-width: 40rem) { .reg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .reg-grid .span3 { grid-column: 1 / -1; } .reg-grid .span2 { grid-column: span 2; } }
@media (min-width: 56rem) { .reg-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.reg-bar { position: static; border-radius: 0; box-shadow: none; justify-content: flex-end; }
.reg-badge { display: inline-flex; margin-left: .375rem; padding: 0 .5rem; border-radius: 999px; font-size: 11px; font-weight: 600; background: color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 12%, transparent); color: var(--colorCompoundBrandStroke, var(--brand)); }
.reg-badge[hidden] { display: none; }
textarea.kyc-input { min-height: 4.5rem; padding-top: .625rem; resize: vertical; }
.kyc-field:has(textarea) .kyc-lead { top: 1.25rem; }
.reg-pw .kyc-state { right: 2.75rem; }
.reg-pw .kyc-input { padding-right: 4.5rem; }
.reg-eye { position: absolute; right: .25rem; top: .25rem; width: 2rem; height: 2rem; display: grid; place-items: center; border: 0; background: transparent; color: var(--colorNeutralForeground3); border-radius: 6px; cursor: pointer; }
.reg-eye:hover { color: var(--colorNeutralForeground1); }
.reg-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .5rem; }
.reg-meter i { height: 4px; border-radius: 999px; background: var(--colorNeutralStroke2); transition: background .2s; }
.reg-rules { display: flex; flex-wrap: wrap; gap: .375rem .875rem; margin-top: .5rem; font: var(--caption1); color: var(--colorNeutralForeground3); }
.reg-rules span { display: inline-flex; align-items: center; gap: .3rem; }
.reg-rules span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid currentColor; }
.reg-rules span.met { color: var(--colorPaletteGreenForeground1); }
.reg-rules span.met::before { background: currentColor; }
.kyc-field.is-invalid + .kyc-hint { color: var(--colorPaletteRedForeground1); }
@media (max-width: 40rem) { .reg-body { padding: 1rem; } .reg-bar .status { flex-basis: 100%; } }

/* ===== Voyage Schedule: search card in the Register / KYC style, and the detail panel =====
   The search card reuses .kyc-card / .kyc-field / .kyc-input so a field looks and validates the same everywhere. */
.vs-search { margin-bottom: var(--spacingL); }
.vs-search .kyc-card { margin-bottom: 0; }
.vs-route { display: grid; gap: 1.125rem 1rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 48rem) { .vs-route { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
.vs-swap { margin-top: 1.5rem; width: 2.5rem; height: 2.5rem; padding: 0; justify-content: center; }
@media (max-width: 47.99rem) { .vs-swap { margin-top: 0; justify-self: start; } }
.vs-dates { display: grid; gap: 1.125rem 1rem; grid-template-columns: 1fr; margin-top: 1.125rem; }
@media (min-width: 40rem) { .vs-dates { grid-template-columns: 1fr 1fr; } }
.vs-search-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-top: 1.125rem; padding-top: 1rem; border-top: 1px dashed var(--colorNeutralStroke2); }
.vs-search-foot .grow { flex: 1; min-width: 12rem; font: var(--caption1); color: var(--colorNeutralForeground3); }
/* Unlayered rules above beat the layered .hidden utility, so hiding is restated for the two parts the script toggles. */
.vs-search .hidden, .vs-summary.hidden { display: none; }
.vs-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .875rem 1.25rem; }
.vs-summary .ico { color: var(--colorNeutralForeground3); }

.vs-empty { text-align: center; padding: 2.5rem 1.5rem; border: 1px dashed var(--colorNeutralStroke1); border-radius: 12px; background: var(--colorNeutralBackground1); margin-top: var(--spacingL); }
.vs-empty b { display: block; font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.vs-empty span { display: block; margin-top: .25rem; font: var(--caption1); color: var(--colorNeutralForeground3); }
.vs-empty .ico { display: inline-grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .75rem; border-radius: 10px; color: var(--colorCompoundBrandStroke, var(--brand)); background: color-mix(in srgb, var(--colorBrandBackground, var(--brand)) 12%, transparent); }

.vs-errors { margin-top: var(--spacingL); }
.vs-errors ul { margin: .25rem 0 0; padding-left: 1.125rem; list-style: disc; }

.vs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin: var(--spacingL) 0 var(--spacingM); }
.vs-bar .vs-count { font: var(--caption1); font-weight: var(--fontWeightSemibold); text-transform: uppercase; letter-spacing: .04em; color: var(--colorNeutralForeground3); }
.vs-bar .vs-tools { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.vs-split { display: grid; gap: var(--spacingL); align-items: start; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 80rem) { .vs-split { grid-template-columns: minmax(0, 1fr) 384px; } .vs-aside { position: sticky; top: 1.25rem; } }
.vs-list { display: flex; flex-direction: column; gap: .625rem; }
.vs-vessel { font: var(--body1); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.vs-sub { margin-top: 2px; font: var(--caption1); color: var(--colorNeutralForeground2); font-variant-numeric: tabular-nums; }
.vs-sub b { color: var(--colorCompoundBrandStroke, var(--brand)); font-weight: var(--fontWeightSemibold); }
.vs-sub.mute { color: var(--colorNeutralForeground3); }
.vs-pt { text-align: center; font-variant-numeric: tabular-nums; }
.vs-pt b { display: block; font: var(--caption1); font-weight: var(--fontWeightSemibold); letter-spacing: .04em; color: var(--colorNeutralForeground1); }
.vs-pt span { display: block; font: var(--caption1); color: var(--colorNeutralForeground2); }
.vs-pt small { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--colorNeutralForeground3); }
.vs-cut { font-size: 11px; font-variant-numeric: tabular-nums; color: var(--colorNeutralForeground3); }
.vs-cut b { color: var(--colorNeutralForeground1); font-weight: var(--fontWeightSemibold); }
.vs-side { display: flex; flex-direction: column; align-items: flex-start; gap: .375rem; }

/* Detail panel (built by voyage-schedule.js) */
.vs-panel { overflow: hidden; border: 1px solid var(--colorNeutralStroke2); border-radius: 12px; background: var(--colorNeutralBackground1); box-shadow: var(--shadow2); }
.vs-panel-msg { padding: 2.5rem 1.5rem; text-align: center; font: var(--caption1); color: var(--colorNeutralForeground3); border: 1px solid var(--colorNeutralStroke2); border-radius: 12px; background: var(--colorNeutralBackground1); }
.vs-sec { padding: 1rem 1.125rem; border-bottom: 1px solid var(--colorNeutralStroke2); }
.vs-sec:last-child { border-bottom: 0; }
.vs-sec-h { margin-bottom: .625rem; font: var(--caption1); font-weight: var(--fontWeightSemibold); letter-spacing: .04em; text-transform: uppercase; color: var(--colorNeutralForeground3); }
.vs-title { font: var(--subtitle2); font-weight: var(--fontWeightSemibold); color: var(--colorNeutralForeground1); }
.vs-meta { margin-top: .25rem; font: var(--caption1); color: var(--colorNeutralForeground2); font-variant-numeric: tabular-nums; }
.vs-transit { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .75rem; }
.vs-transit b { font: var(--title3); font-weight: var(--fontWeightSemibold); font-variant-numeric: tabular-nums; color: var(--colorNeutralForeground1); }
.vs-transit span { font: var(--caption1); color: var(--colorNeutralForeground3); }
.vs-kv { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.vs-kv > div { padding: .625rem; border: 1px solid var(--colorNeutralStroke2); border-radius: 8px; background: var(--colorNeutralBackground3); min-width: 0; }
.vs-kv.plain > div { padding: 0; border: 0; background: transparent; }
.vs-k { font-size: 11px; color: var(--colorNeutralForeground3); }
.vs-v { margin-top: 2px; font: var(--caption1); font-weight: var(--fontWeightSemibold); font-variant-numeric: tabular-nums; color: var(--colorNeutralForeground1); overflow-wrap: anywhere; }
.vs-cd { margin-top: 2px; font-size: 10px; font-weight: var(--fontWeightSemibold); }
.vs-cd.urg-passed { color: var(--colorNeutralForeground3); }
.vs-cd.urg-critical { color: var(--colorPaletteRedForeground1); }
.vs-cd.urg-soon { color: var(--colorPaletteYellowForeground1); }
.vs-cd.urg-ok { color: var(--colorPaletteGreenForeground1); }
.vs-acts { display: flex; gap: .5rem; padding: 1rem 1.125rem; background: var(--colorNeutralBackground3); }
.vs-acts .btn { flex: 1; justify-content: center; text-align: center; }
.vs-acts .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.vs-note { padding: 0 1.125rem 1rem; background: var(--colorNeutralBackground3); font-size: 11px; color: var(--colorNeutralForeground3); }
.vs-tag { margin-left: .5rem; }

/* Enquiry / Booking form: a field that has been judged and is fine gets the same green border and tick as Register and KYC. */
.enq-page .field.valid .ctl { border-color: var(--colorPaletteGreenBorder1); }
.enq-page .field.valid > .lbl::after {
  content: ""; display: inline-block; width: 12px; height: 12px; margin-left: 6px; vertical-align: -1px;
  background: var(--colorPaletteGreenForeground1);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><path d='M20 6 9 17l-5-5'/></svg>") center / contain no-repeat;
}
.enq-page .field.invalid > .lbl::after { content: none; }
