/* ============================================================
   Nauta design system (web portal)
   Brand: deep navy + violet, ship's-wheel mark (see login page)

   Breakpoints (#53): the portal uses Bootstrap's set — md 768px,
   lg 992px — and nothing else. The shell (sidebar, top bar) switches
   at lg: below it the sidebar stacks, above it it is a fixed column.
   This is a laptop product for the office; 1280 and 1920 are the design
   widths. The exception is the client's path (#61) — sign in, find the
   mission, read the timeline, download the report — which also works on
   a phone: below md those lists swap their table for the "phone cards"
   pattern further down. Office and admin screens make no such promise.

   Layout (#53): a list page flows with the document and the page owns
   the only scrollbar. Grids take no Height, so they can never scroll
   internally — the rules under "Telerik grid polish" enforce that.
   ============================================================ */

/* ---- Base scale ----
   The app had no base font rule at all, so every rem in it — ours, Bootstrap's and
   Telerik's — was measured against the browser's 16px default. 15px is a 6.25% cut and it
   is deliberately applied HERE rather than as a pile of smaller font-sizes: it scales the
   spacing with the text, which is what actually reclaims the room. Asked for on 2026-08-29
   after the dashboard had to be run at 80% browser zoom to fit a 1080p screen.

   Do not go below ~14px without checking the French pages: French runs about a third longer
   than English, and the row-actions column has already stood two lines high in French while
   fitting on one in English (Boards 631). */
html {
    font-size: 15px;
}

:root {
    /* Brand tokens */
    --nauta-navy-900: #0f1433;
    --nauta-navy-800: #10163a;
    --nauta-navy-700: #1b2240;
    --nauta-violet-900: #2a0a3d;
    --nauta-violet-700: #3d0d54;
    --nauta-violet-500: #5b2a7d;
    --nauta-accent: #8b6fd0;
    --nauta-primary: #35427c;
    --nauta-primary-hover: #2c3568;
    --nauta-primary-active: #232a52;
    --nauta-surface: #f4f6fa;
    --nauta-card: #ffffff;
    --nauta-border: #e6e9f2;
    --nauta-text: #232838;
    --nauta-text-muted: #6b7280;

    /* ---- The brand gradient, in one place ----
       It was written out by hand in five files — the sidebar, the account avatar, the
       bootstrap buttons, the dialog chip, the rule under a dialog's title — with two
       different end colours between them, which is how a product ends up with two brands.
       Four roles, because a gradient's angle and stops are part of what it is for:

         --nauta-gradient        marks and solid actions: chips, avatars, primary buttons
         --nauta-gradient-rule   the hairline under a heading, left to right
         --nauta-gradient-wash   the almost-white tint behind a dialog title
         --nauta-gradient-shell  the app frame itself, top to bottom (the sidebar)

       Change the brand here and it changes everywhere, which is the whole point. */
    --nauta-gradient: linear-gradient(135deg, var(--nauta-primary) 0%, var(--nauta-violet-500) 100%);
    --nauta-gradient-rule: linear-gradient(90deg, var(--nauta-navy-800) 0%, var(--nauta-accent) 100%);
    --nauta-gradient-wash: linear-gradient(180deg, #f7f5fd 0%, #ffffff 100%);
    --nauta-gradient-shell: linear-gradient(180deg, var(--nauta-navy-800) 0%, #171d45 55%, #22104a 100%);

    /* ---- What a state looks like, in one place ----
       The badges already had a system — six meanings, one colour pair each, reused by the
       missions, the registers, the tenants, the platform checks and the HTTP codes under
       their own names. What they did not have was a NAME for the pair: every family wrote
       the same six hex values out again, which is how #e2e5ee and #eceef5 both came to mean
       "quiet grey" on screens next to each other.

       The meanings, and they are not interchangeable:
         ok       it worked, it is finished, it is live
         info     agreed, invited, moving — a state somebody set, not a result
         warn     waiting on somebody; still working, deal with it today
         bad      refused, failed, suspended
         busy     under way right now (violet, the brand's own)
         idle     nothing to say yet — the fallback
         muted    over: closed, retired. Not a fault, which is why it is not bad
         support  a Nauta operator did this from inside the firm (Boards 29) */
    --nauta-state-ok-bg: #e8f6ee;
    --nauta-state-ok-fg: #14532d;
    --nauta-state-info-bg: #e3eef6;
    --nauta-state-info-fg: #1d6fa5;
    --nauta-state-warn-bg: #fdf5e2;
    --nauta-state-warn-fg: #7a5410;
    --nauta-state-bad-bg: #fdecec;
    --nauta-state-bad-fg: #8f1d1d;
    --nauta-state-done-bg: #e2f3f4;
    --nauta-state-done-fg: #115e67;
    --nauta-state-busy-bg: #ecebf7;
    --nauta-state-busy-fg: var(--nauta-violet-500);
    --nauta-state-idle-bg: #eceef5;
    --nauta-state-idle-fg: var(--nauta-navy-700);
    --nauta-state-muted-bg: #e2e5ee;
    --nauta-state-muted-fg: var(--nauta-navy-800);
    --nauta-state-support-bg: #fff4d6;
    --nauta-state-support-fg: #6b4700;

    /* Telerik (Kendo) theme overrides */
    --kendo-color-primary: var(--nauta-primary);
    --kendo-color-primary-hover: var(--nauta-primary-hover);
    --kendo-color-primary-active: var(--nauta-primary-active);
    --kendo-color-primary-emphasis: var(--nauta-accent);
}

html, body {
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background-color: var(--nauta-surface);
    color: var(--nauta-text);
}

/* ---- Typography ---- */
h1 {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--nauta-navy-800);
    letter-spacing: -0.01em;
    margin-bottom: 1.1rem;
}

h5 {
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--nauta-navy-700);
    margin-bottom: .65rem;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--nauta-primary);
}

.text-muted {
    color: var(--nauta-text-muted) !important;
}

/* ---- Cards ---- */
.card {
    border: 0;
    border-radius: 10px;
    background: var(--nauta-card);
    box-shadow: 0 1px 3px rgba(16, 22, 58, .08), 0 4px 18px rgba(16, 22, 58, .05);
}

/* A card's heading carries the same two marks as a dialog's: the faint wash, and the brand
   at full strength in a 2px rule under it. Both are painted as BACKGROUNDS rather than as a
   border-image, because a border-image makes a browser drop border-radius altogether and
   these cards are rounded — the rule is the last 2px of the background instead. */
.card-header {
    /* The rule is declared FIRST because the first background layer is the one on top: with
       the wash first it painted over the rule and the heading came out plain. */
    background-image: var(--nauta-gradient-rule), var(--nauta-gradient-wash);
    background-size: 100% 2px, 100% 100%;
    background-position: 0 100%, 0 0;
    background-repeat: no-repeat;
    border-bottom: 0;
    border-radius: 10px 10px 0 0 !important;
    font-weight: 600;
    color: var(--nauta-navy-800);
}

/* ---- Alerts ---- */
.alert {
    border: 0;
    border-radius: 8px;
    border-left: 4px solid transparent;
}

.alert-danger {
    background: #fdecec;
    color: #8f1d1d;
    border-left-color: #d64545;
}

.alert-success {
    background: #e8f6ee;
    color: #14532d;
    border-left-color: #2f9e5f;
}

.alert-warning {
    background: #fdf5e2;
    color: #7a5410;
    border-left-color: #dba62a;
}

/* ---- Badges ---- */
.badge {
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 6px;
    padding: .38em .6em;
}

.badge.bg-success {
    background-color: #2f9e5f !important;
}

.badge.bg-secondary {
    background-color: #8a93a6 !important;
}

/* ---- Legacy bootstrap buttons still in use (top bar links etc.) ---- */
.btn-primary {
    color: #fff;
    background: var(--nauta-gradient);
    border: 0;
}

.btn-primary:hover {
    filter: brightness(1.1);
    background: var(--nauta-gradient);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(139, 111, 208, .3);
}

/* ---- The one action a screen is for ----
   Bootstrap's primary buttons have carried the gradient since the design system was written;
   Telerik's — which is what Create, Save, New mission and every other real action in this
   product actually are — were flat navy. So the branded button was the PDF link and the
   plain one was everything that changes data, which is backwards and, side by side on the
   client's report tab, simply looked like two different products.

   Hover brightens rather than re-declaring the gradient: one definition, one place. */
.k-button-solid-primary {
    background: var(--nauta-gradient);
    border-color: transparent;
}

    .k-button-solid-primary:hover,
    .k-button-solid-primary.k-hover {
        background: var(--nauta-gradient);
        filter: brightness(1.08);
    }

    .k-button-solid-primary:active,
    .k-button-solid-primary.k-active,
    .k-button-solid-primary.k-selected {
        background: var(--nauta-gradient);
        filter: brightness(.94);
    }

    /* Disabled is Telerik's own fade over ours; the gradient would read as enabled. */
    .k-button-solid-primary:disabled,
    .k-button-solid-primary.k-disabled {
        background: var(--nauta-primary);
        filter: none;
    }

/* ---- Telerik grid polish ---- */
.k-grid {
    border-radius: 10px;
    border-color: var(--nauta-border);
    box-shadow: 0 1px 3px rgba(16, 22, 58, .06);
    overflow: hidden;
}

/* One scrollbar per screen: the page's. No grid here takes a Height, so grid
   content can never overflow vertically — but the theme ships
   .k-grid-content { overflow-y: scroll }, which paints a permanent dead
   scrollbar track on every grid. /missions at 100% zoom had three scrollbars
   on screen at once because of it. Horizontal stays auto: at the design widths
   (1280, 1920) every column set fits, and below them panning the rows beats
   clipping data. */
.k-grid .k-grid-content {
    overflow-y: auto;
}

/* Nothing to align with when content cannot scroll: the theme pads the header
   for a scrollbar that no longer exists, which offsets every header cell from
   its column by one scrollbar width. Important because the component measures
   and sets it inline. */
.k-grid .k-grid-header {
    padding-inline-end: 0 !important;
    /* The brand's rule under the column names, drawn ONCE across the header rather than
       per cell: a gradient on each `th` restarts at every column and comes out as six
       little gradients. A border-image here and not on the cells, and safe from the
       border-radius problem the cards have, because the grid clips its own corners. */
    border-bottom: 2px solid transparent;
    border-image: var(--nauta-gradient-rule) 1;
}

/* Truncated cell teasers (audit data, log messages). Capped in vw so a 1920
   monitor shows more than a 1280 laptop, instead of one fixed rem for both. */
.cell-truncate {
    display: inline-block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: bottom;
    max-width: min(34rem, 28vw);
}

.cell-truncate-wide {
    max-width: min(52rem, 44vw);
}

/* A cell that carries a code and what the code means. The code stays the lead line
   because that is what twenty years of staff scan for; the name below it is for
   everyone who has not learned the catalogue yet. The sub-line wraps by default --
   where it explains something, a half-shown explanation is no use. */
.cell-stack {
    display: block;
    line-height: 1.25;
    padding-block: .1rem;
}

.cell-stack-sub {
    display: block;
    font-size: .78rem;
    color: var(--nauta-text-muted);
}

    /* ...except in a grid a reader scans down, where a name long enough to wrap made
       that one row taller than its neighbours and the ragged rows were what the eye
       caught. Held to one line, ellipsised, with the whole name on hover and always in
       full on the mission itself. Safe here and nowhere else, because the line above it
       is the identity: the code is never the part that gets clipped. */
    .cell-stack-sub.one-line {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* A COLUMN NAME IS A LABEL, NOT A HEADING. It was a grey-blue band with navy words in it,
   which is the heaviest thing on a screen whose subject is the rows underneath — and the
   most template-looking. Small capitals on the same faint wash the dialogs and cards use,
   so the eye goes to the data and the header still reads as a header.

   Deliberately the same shape as `.particulars-group`, the label over a group of facts on
   every detail page: one way of writing a label in this product, whether it titles a column
   or a column of values. */
.k-grid .k-table-th {
    background: var(--nauta-gradient-wash);
    color: var(--nauta-navy-700);
    font-weight: 600;
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* NO ZEBRA. Alternating fills are a crutch for reading across a wide row, and this table no
   longer needs one: the hairline between rows does that job, and the row under the pointer
   is the only one that has any business being a different colour. With the column rules gone
   the grey bands were the loudest thing left on a list of eight ships.

   Telerik tints the alt row with a 5% black wash rather than a colour, so it has to be taken
   off rather than recoloured. */
.k-grid .k-table-alt-row {
    background-color: transparent;
}

.k-grid .k-table-row:hover {
    background: #f6f4fc;
}

/* NO LINE BETWEEN COLUMNS. A row is read across, and a rule between every value is what
   makes a table look like a spreadsheet — the theme draws one on the inline start of each
   cell, header and body alike. The horizontal hairlines stay: those separate one ship from
   the next, which is the division a reader actually uses. */
.k-grid .k-table-th,
.k-grid .k-table-td {
    border-inline-start-width: 0;
}

/* The card opens and closes in the same tone: the pager takes the header's wash instead of
   a third grey of its own, so a table reads as one object rather than as three bands. */
.k-pager {
    background: var(--nauta-gradient-wash);
    border-top: 1px solid var(--nauta-border);
}

/* ---- Empty states ---- */
.nauta-empty {
    text-align: center;
    padding: 3.5rem 1rem;
    color: var(--nauta-text-muted);
}

.nauta-empty-icon {
    width: 4.25rem;
    height: 4.25rem;
    margin: 0 auto 1rem;
    border-radius: 50%;
    background: #ecebf7;
    color: var(--nauta-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.nauta-empty-icon .k-svg-icon {
    width: 2rem;
    height: 2rem;
}

.nauta-empty-title {
    font-weight: 600;
    color: var(--nauta-navy-700);
    margin-bottom: .3rem;
}

/* The one thing to do about an empty list, under the sentence that says it is empty. */
.nauta-empty-action {
    margin-top: 1.1rem;
}

/* ---- Loading skeleton block ---- */
.nauta-skeleton {
    display: flex;
    flex-direction: column;
    gap: .8rem;
    padding: 1rem 0;
    max-width: 60rem;
}

/* ---- Content area ---- */
.content {
    padding-top: 1.4rem;
    padding-bottom: 2rem;
}

/* ---- Validation / errors (framework defaults, restyled) ---- */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid #2f9e5f;
}

.invalid {
    outline: 1px solid #d64545;
}

.validation-message {
    color: #d64545;
}

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    border-radius: 8px;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred.";
}

/* ---- Mission photo gallery ---- */
.photo-gallery {
    display: grid;
    /* Wide enough for two action links side by side in French ("Retirer",
       "Supprimer") — at 9.5rem they overflowed the card and the delete link was
       clipped away by the overflow:hidden below. */
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: .9rem;
}

.photo-card {
    margin: 0;
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--nauta-card);
}

.photo-frame {
    position: relative;
}

.photo-card img {
    display: block;
    width: 100%;
    height: 7.5rem;
    object-fit: cover;
    background: #eceef5;
}

/* A photo the client cannot see reads as unfinished at a glance, so a grid of
   forty is scannable without reading a single label. */
.photo-card.is-withheld img {
    opacity: .55;
    filter: grayscale(.5);
}

.photo-state {
    position: absolute;
    top: .4rem;
    left: .4rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .15em .5em;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(16, 22, 58, .25);
}

.photo-state.is-released { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.photo-state.is-withheld { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }

/* The frame on the report covers (Boards 734): top right, so it sits beside the release state. */
.photo-cover {
    position: absolute;
    top: .4rem;
    right: .4rem;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
    padding: .15em .5em;
    border-radius: 999px;
    background: var(--nauta-navy, #10163a);
    color: #fff;
    box-shadow: 0 1px 3px rgba(16, 22, 58, .25);
}

.photo-card figcaption {
    padding: .45rem .6rem .55rem;
}

.photo-caption {
    font-size: .84rem;
    font-weight: 600;
    color: var(--nauta-navy-700);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Wraps rather than overflowing: these labels are longer in French, and a card
   that cannot show its delete link may as well not have one. */
.photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .1rem .75rem;
    margin-top: .35rem;
}

.photo-actions .btn {
    font-size: .8rem;
}

.photo-open {
    display: block;
    cursor: zoom-in;
}

.photo-search {
    max-width: 18rem;
}

/* The bar over the gallery: named groups, label above the controls, the same shape as
   the particulars cards so the page has one way of saying "this group is about X". */
.photo-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: .9rem 2.25rem;
    padding: .7rem 1rem .8rem;
    margin-bottom: .75rem;
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    background: var(--nauta-card);
}

.photo-toolbar-group {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.photo-toolbar-release {
    margin-left: auto;
}

.photo-toolbar-label {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nauta-violet-700, #4b3bb5);
}

/* The viewer: one frame on a dark field, the whole viewport, nothing of the page
   behind it. Fixed to the viewport rather than to the tab, so a frame taller than
   the gallery's row is still shown whole. */
.photo-viewer {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: flex;
    flex-direction: column;
    background: rgba(10, 14, 36, .97);
    color: #fff;
    outline: none;
    /* The viewer is focused as it opens so Esc and the arrows work at once, and Chrome
       draws a blinking text caret at the first character of a focused element. There is
       nothing to type into here. */
    caret-color: transparent;
}

/* The release badge is absolutely positioned for the gallery card; in the bar it is
   one more word of the title line, or it lands on top of the counter. */
.photo-viewer .photo-state {
    position: static;
    display: inline-block;
    box-shadow: none;
    vertical-align: middle;
}

.photo-viewer-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .75rem 1rem;
    background: rgba(0, 0, 0, .35);
}

.photo-viewer-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .25rem .75rem;
    min-width: 0;
}

.photo-viewer-count {
    font-variant-numeric: tabular-nums;
    opacity: .75;
}

.photo-viewer-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 60vw;
}

.photo-viewer-meta {
    opacity: .8;
    flex-basis: 100%;
}

.photo-viewer-meta a {
    color: #fff;
}

.photo-viewer-actions {
    display: flex;
    gap: .5rem;
    flex-shrink: 0;
}

.photo-viewer-stage {
    position: relative;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    padding: .5rem 3.5rem;
}

.photo-viewer-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 30px rgba(0, 0, 0, .5);
}

/* The arrows sit over the stage's padding, not over the picture, so a frame as wide
   as the screen keeps its edges visible. */
.photo-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 2.75rem;
    height: 4.5rem;
    border: 0;
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 2.25rem;
    line-height: 1;
    cursor: pointer;
}

.photo-viewer-nav:hover:not(:disabled) {
    background: rgba(255, 255, 255, .25);
}

.photo-viewer-nav:disabled {
    opacity: .25;
    cursor: default;
}

.photo-viewer-nav.is-previous { left: .5rem; }
.photo-viewer-nav.is-next { right: .5rem; }

/* A count of holds is two digits, so the box is sized for what it holds — while the
   sentence under it gets the whole width of its group. Sized on the INPUT and not on the
   field, because the first cut capped the pair at 12rem and the explanation came out ten
   lines tall in a third of a third of a dialog. */
.holds-input {
    max-width: 7rem;
}

/* ---- The row above a list ----
   The controls are a grid and the action is not, so twelve columns of filters can never
   push it onto a second line. On a phone the two stack and the button takes the width,
   because a 44px target at the end of a wrapped row is not one. */
.filter-bar {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
}

.filter-bar-controls {
    flex: 1 1 auto;
    min-width: 0;
}

.filter-bar-action {
    flex: 0 0 auto;
}

@media (max-width: 767.98px) {
    .filter-bar {
        flex-wrap: wrap;
    }

    .filter-bar-action {
        width: 100%;
    }

        .filter-bar-action .k-button {
            width: 100%;
        }
}

/* ---- Status badges (shared look with the field PWA) ---- */
.status-badge {
    display: inline-block;
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .02em;
    border-radius: 6px;
    padding: .3em .6em;
    background: var(--nauta-state-idle-bg);
    color: var(--nauta-state-idle-fg);
    white-space: nowrap;
    /* A hairline of the badge's own colour, so a pale pill still has an edge on a white
       card and a row of them reads as a column rather than as smudges. Inset shadow rather
       than a border: a border would change the height of every badge in the product, and
       these sit inline in grid cells that are already tuned. */
    box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 16%, transparent);
}

/* Confirmed: the office has accepted the job and nobody has started. Blue rather
   than the green of In progress, so "agreed" and "under way" are never read as the
   same thing at a glance; Draft keeps the neutral fallback on purpose. */
.status-badge.status-confirmed { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }
/* In progress is green because it is the state an office wants to see: the work is
   under way. Completed therefore cannot keep the green - it takes petrol blue, still
   calm, still distinct from Confirmed's blue and from Closed's grey. */
.status-badge.status-inprogress { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.status-badge.status-awaitingdocuments, .status-badge.status-awaitingquote { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }
.status-badge.status-quoterefused, .status-badge.status-notcovered { background: var(--nauta-state-bad-bg); color: var(--nauta-state-bad-fg); }
.status-badge.status-completed { background: var(--nauta-state-done-bg); color: var(--nauta-state-done-fg); }
.status-badge.status-closed { background: var(--nauta-state-muted-bg); color: var(--nauta-state-muted-fg); }
/* Tenant lifecycle (#32) — same palette as the mission badges, its own names: a
   company is active or suspended, never "completed". */
.status-badge.status-active { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.status-badge.status-suspended { background: var(--nauta-state-bad-bg); color: var(--nauta-state-bad-fg); }
/* A row a Nauta operator wrote from inside this firm (Boards 29). Amber, the same
   word the support banner uses: this is not a failure and not a destructive act,
   it is "the person here was not one of yours". */
.status-badge.status-support { background: var(--nauta-state-support-bg); color: var(--nauta-state-support-fg); }
/* Retired, for the registers that deactivate rather than delete - a country, a currency, a
   vessel, a client. Its partner is .status-active above: a register row is active or it is
   retired, and neither of those is a mission being "completed" or "closed", which is what
   these six screens used to borrow. Quiet grey, because retiring is not a fault. */
.status-badge.status-retired { background: var(--nauta-state-muted-bg); color: var(--nauta-state-muted-fg); }

/* Which record an entry came from, on the one-request screen (Boards 633). Audit is the
   evidence and reads as the weightier of the two; a log line is working notes. */
.status-badge.status-audit { background: var(--nauta-state-busy-bg); color: var(--nauta-state-busy-fg); }
.status-badge.status-log { background: var(--nauta-state-idle-bg); color: var(--nauta-state-idle-fg); }

/* HTTP status, on the log list and the one-request screen (backlog 100). Read by CLASS of
   status and not by exact code, because that is how anybody scans a log: green answered,
   amber the caller asked for something it could not have, red the service failed.

   The palette is the portal's own and is deliberately borrowed rather than reinvented — the
   same four inks the platform status page uses, so red means the same thing on both. 1xx has
   no rule: it inherits the neutral grey, which is right for a status nothing has to act on.

   Tabular figures so a column of three-digit numbers lines up. */
.status-badge.status-http { font-variant-numeric: tabular-nums; }
.status-badge.status-http-2xx { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.status-badge.status-http-3xx { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }
.status-badge.status-http-4xx { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }
.status-badge.status-http-5xx { background: var(--nauta-state-bad-bg); color: var(--nauta-state-bad-fg); }

/* The platform user list (Boards 108). Its own names rather than borrowed mission ones:
   a badge that means "reaches every tenant" has nothing to do with a mission being
   closed, and sharing a class is how two meanings end up one colour by accident. */
.status-badge.status-platformadmin { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }
.status-badge.status-invited { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }
.status-badge.status-contact { background: var(--nauta-state-idle-bg); color: var(--nauta-state-idle-fg); }
/* The platform status page (Boards 119). Its own names rather than the mission palette's:
   a dependency is not "completed", and an operator scanning for red should not have to
   translate a survey's vocabulary first. Degraded is amber on purpose — it is the state
   that means "still working, deal with it today" and must not read as an outage. */
.status-badge.status-check-ok { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.status-badge.status-check-degraded { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }
.status-badge.status-check-failed { background: var(--nauta-state-bad-bg); color: var(--nauta-state-bad-fg); }
.status-badge.status-check-unknown { background: var(--nauta-state-idle-bg); color: var(--nauta-state-idle-fg); }

/* A checklist form that belongs to no one mission type and is offered on every mission.
   Blue, the portal's "this reaches wider than you might assume" colour, and the same one
   the platform list uses for an account that is not yet claimed: both say "read this row
   twice". Never green — an every-type form is not a state of health. */
.status-badge.status-anytype { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }

/* Share scope (#53) — what a grant covers: the whole mission, in the share blue
   the history timeline already uses, or one report, quiet grey with its number. */
.status-badge.scope-whole { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }
.status-badge.scope-report { background: var(--nauta-state-idle-bg); color: var(--nauta-state-idle-fg); }

/* ---- Label/value facts (#53: the one pattern, everywhere) ----
   Used by the mission, client and vessel detail pages and the admin detail
   windows alike. Muted label column at a fixed measure, values wrap; long
   payload keys and values (audit windows) break rather than overflow. */
.fact-grid {
    display: grid;
    /* minmax(0, 1fr), not 1fr: a grid track defaults to min-width:auto and so cannot go
       narrower than its longest WORD, which means the overflow-wrap below never gets a
       box tight enough to break anything. At 390px a mission carrying a principal like
       "ALMAS SHIPMANAGEMENT SA" pushed the tab's own content 22px wide and Telerik put a
       second scrollbar inside the tab strip. Same defect as `main` had, one level down. */
    grid-template-columns: 12rem minmax(0, 1fr);
    gap: .45rem 1rem;
    margin: 0;
    max-width: 60rem;
}

.fact-grid dt {
    color: var(--nauta-text-muted);
    font-weight: 500;
    overflow-wrap: break-word;
}

.fact-grid dd {
    margin: 0;
    color: var(--nauta-text);
    overflow-wrap: break-word;
}

/* The same stacking, asked for by name rather than by width (Boards 120). The status
   page puts the running build in a third-width side column, where the 12rem label bay
   leaves the value about 110px -- the identical squeeze the 768px rule below fixes one
   size down, arriving early because the card is narrow rather than the screen. */
.fact-grid.fact-grid-stacked {
    grid-template-columns: 1fr;
    gap: 0;
}

.fact-grid.fact-grid-stacked dt {
    margin-top: .6rem;
}

.fact-grid.fact-grid-stacked dt:first-child {
    margin-top: 0;
}

/* On a phone the label bay goes away entirely and the fact stacks. .row-card-facts
   already says why -- "a phone column has no room for a 12rem label bay" -- and this is
   the same grid on the mission, client and vessel pages, which the client's phone
   journey reaches. Narrowing the label column is not enough: at 390px it still leaves
   the value about 130px, and a value broken mid-word ("polypropyl/ene",
   "SHIPMAN/AGEMENT") passes every overflow check while being unreadable. */
@media (max-width: 768px) {
    .fact-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .fact-grid dt {
        margin-top: .6rem;
    }

    .fact-grid dt:first-child {
        margin-top: 0;
    }
}

.checklist-row-open td {
    color: var(--nauta-text-muted);
}

/* Correction mode (#53): the portal's one read-view that edits in place, so the
   mode has to be visible as a state of the table, not only as swapped inputs —
   a faint violet wash says "this is now a form" for as long as it is one. */
.checklist-table.correcting {
    background: #faf9fe;
}

/* ---- Checklist editor actions ----
   Pinned to the bottom of the viewport: the MSC template is 86 rows, so both the add
   and the save used to be a full scroll away every single time. */
.editor-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .6rem;
    margin-top: .75rem;
    padding: .75rem 1rem;
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    background: var(--nauta-card);
    box-shadow: 0 -4px 16px rgba(16, 22, 58, .07);
}

.editor-actions-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}

/* The refusal beside the button that raised it, not a banner scrolled out of reach. */
.editor-actions-error {
    margin-bottom: 0;
    padding: .5rem .75rem;
}

.editor-actions-count {
    margin-left: auto;
    color: var(--nauta-text-muted);
    font-size: .85rem;
}

/* ---- Checklist editor sections (#50) ----
   A section is named once, in its own header, and owns the questions under it. */
.section-head {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.section-head-label {
    flex: 0 0 auto;
    color: var(--nauta-text-muted);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.section-head .section-name {
    flex: 1 1 22rem;
    max-width: 28rem;
}

/* "Repeat for each hold or container": a property of the section, so it stands above its
   questions, and says what it does the moment it is ticked. */
.section-repeat {
    display: flex;
    align-items: center;
    gap: .35rem;
    width: fit-content;
    margin-bottom: .5rem;
    color: var(--nauta-text-muted);
    font-size: .85rem;
    cursor: pointer;
}

.section-repeat-note {
    margin: -.25rem 0 .6rem;
}

.section-head-count {
    margin-left: auto;
    color: var(--nauta-text-muted);
    font-size: .8rem;
    white-space: nowrap;
}

.q-handle-cell {
    cursor: grab;
    text-align: center;
}

/* Six dots, drawn rather than typed: no font on the box is guaranteed to carry a
   drag-handle glyph. */
.q-handle {
    display: inline-block;
    width: .85rem;
    height: 1.15rem;
    border-radius: 3px;
    background-image: radial-gradient(var(--nauta-text-muted) 42%, transparent 46%);
    background-size: .42rem .38rem;
}

    .q-handle:focus-visible {
        outline: 2px solid var(--nauta-navy-700);
        outline-offset: 2px;
    }

/* The insertion point, drawn as a line above the row the question would take over. */
.q-row.drop-before > td {
    box-shadow: inset 0 2px 0 0 var(--nauta-navy-700);
}

/* Always in the DOM so nothing shifts under a drag; only visible when it can be used. */
.q-drop-tail > td {
    height: 0;
    padding: 0;
    border: 0;
    color: var(--nauta-text-muted);
    font-size: .85rem;
    text-align: center;
}

.q-drop-tail.empty > td,
.q-drop-tail.active > td {
    height: auto;
    padding: .5rem;
    border: 1px dashed var(--nauta-border);
    border-radius: 8px;
}

.q-drop-tail.over > td {
    border-color: var(--nauta-navy-700);
    background: #f6f7fb;
}

/* ---- Checklist review ----
   Sections fold on request but never by default: a collapsed section leaves the DOM
   and with it Ctrl+F, which is how an office reviewer actually searches this page. */
.checklist-group-header {
    display: flex;
    align-items: center;
    gap: .55rem;
    width: 100%;
    margin: 1rem 0 .5rem;
    padding: .5rem .75rem;
    border: 1px solid #dfe3ee;
    border-radius: 10px;
    background: #f6f7fb;
    font-size: 1rem;
    font-weight: 650;
    color: var(--nauta-navy-700);
    text-align: left;
}

    .checklist-group-header.open {
        background: #eceef7;
    }

    .checklist-group-header .chevron {
        flex: 0 0 auto;
        color: var(--nauta-text-muted);
        font-size: .8rem;
    }

    .checklist-group-header .group-name {
        flex: 1 1 auto;
    }

/* Readable while the section is shut — that is the whole point of it. */
.section-count {
    flex: 0 0 auto;
    font-size: .78rem;
    font-weight: 600;
    color: #7a5410;
    background: #fdf5e2;
    border-radius: 6px;
    padding: .15em .5em;
}

    .section-count.complete {
        color: #14532d;
        background: #e8f6ee;
    }

/*
 * Questions are short; on a wide screen an auto-sized label column stretched to
 * most of the row and threw the answers against the far edge. Cap the question at
 * a readable measure and let the answer sit next to it.
 */
.checklist-table {
    table-layout: fixed;
}

.checklist-table td:first-child {
    width: 28rem;
}

@media (max-width: 992px) {
    .checklist-table td:first-child {
        width: 45%;
    }
}

/* The stamp column, in CSS rather than inline, so the phone rule below can undo it. */
.checklist-stamp {
    width: 11rem;
}

/*
 * On a phone the three columns stop being columns. Fixed layout plus a 45% question and
 * an 11rem stamp left the ANSWER 12px wide at 390px, so every answer rendered one letter
 * per line -- "T h i s   i s   a   t e s t" straight down the screen. There is no width
 * to redistribute here: three columns do not fit, so the row becomes three lines, which
 * is the same answer .row-cards gives everywhere else below md.
 *
 * The question leads because it is what you are looking for, the answer follows in the
 * weight it already carries, and the stamp drops to the bottom in small muted type --
 * on a phone you are reading the answers, and reaching for when they were recorded is a
 * second question.
 */
@media (max-width: 768px) {
    .checklist-table,
    .checklist-table tbody,
    .checklist-table tr,
    .checklist-table td {
        display: block;
        width: auto;
    }

    .checklist-table tr {
        padding: .55rem .25rem;
        border-bottom: 1px solid var(--nauta-border);
    }

    .checklist-table tr:last-child {
        border-bottom: 0;
    }

    .checklist-table td {
        border: 0;
        padding: .1rem 0;
    }

    .checklist-table td:first-child {
        width: auto;
        color: var(--nauta-text-muted);
        font-size: .85rem;
    }

    /* Left, not right: right-aligned reads as a column edge that is no longer there. */
    .checklist-stamp {
        width: auto;
        text-align: left !important;
        font-size: .78rem;
    }
}

.k-tabstrip .k-tabstrip-content {
    padding-top: 1rem;
    border: 0;
    background: transparent;
}

/* ---- Tabs ----
   Telerik draws a tab as a box with three borders and a notch out of the strip below it,
   which is a 2010 filing-cabinet metaphor and the most generic thing left on the mission
   page. A tab here is a word, and the one you are reading is underlined in the brand — the
   same 2px rule that runs under a dialog's title and a card's heading, so the three places
   that say "this is the current thing" all say it the same way.

   The underline is a background layer rather than a border for the reason the card headings
   give: it can be a gradient, and it costs no height, so switching tabs never moves the page. */
/* `.k-tabstrip-item`, not `.k-item`: this theme names the tab itself, and a rule written
   against the older class matched nothing at all — the tabs kept Telerik's boxes and the
   change looked like it had simply not worked. Found by reading the rendered <li>. */
.k-tabstrip-items .k-tabstrip-item {
    border: 0;
    background: transparent;
    font-weight: 500;
}

    .k-tabstrip-items .k-tabstrip-item .k-link {
        color: var(--nauta-text-muted);
    }

    .k-tabstrip-items .k-tabstrip-item:hover .k-link,
    .k-tabstrip-items .k-tabstrip-item.k-hover .k-link {
        color: var(--nauta-navy-800);
    }

    .k-tabstrip-items .k-tabstrip-item.k-active {
        font-weight: 600;
        background-image: var(--nauta-gradient-rule);
        background-size: 100% 2px;
        background-position: 0 100%;
        background-repeat: no-repeat;
    }

        .k-tabstrip-items .k-tabstrip-item.k-active .k-link {
            color: var(--nauta-navy-800);
        }

/* The track the words sit on. Telerik's own is a full border round the strip; one line is
   enough to say where the tabs end and the content begins. */
.k-tabstrip-items-wrapper {
    border: 0;
    border-bottom: 1px solid var(--nauta-border);
}

/* Rows navigate to the detail page */
.row-nav .k-table-row { cursor: pointer; }

/* A destructive choice inside an overflow menu (deactivate a user): quiet until
   pointed at, and never a red button repeated down a whole grid column. Global
   because the popup renders at the root, outside any page's scope. */
.k-popup .item-danger,
.k-popup .item-danger.k-hover,
.k-popup .item-danger:hover {
    color: #8f1d1d;
}

/* ---- Vendor credit ----
   Quiet by construction: the working chrome above belongs to the surveying firm,
   so this sits at the bottom edge, small and low-contrast, and never competes. */
.app-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    /* The lockup itself cannot go below ~2rem (see below), so the only thing left to give
       is the air around it — 40px of padding for a 34px mark, on every page. */
    padding-top: .75rem;
    padding-bottom: .5rem;
    color: var(--nauta-text-muted);
    font-size: .72rem;
}

/* Sized by the asset, not by the text: the lockup is 3.25:1 and its wordmark is a
   quarter of that height, so anything under ~2rem renders "TreeCatch" illegibly. */
.app-footer img {
    height: 2.1rem;
    opacity: .75;
}

/* ---- Company logo preview ---- */
.company-logo-preview {
    max-width: 100%;
    max-height: 8rem;
    object-fit: contain;
}

/* A letterhead's logo and stamp on the Company page's Letterheads tab (2026-11-09):
   smaller than the firm's own, five groups share the card's width. */
.letterhead-image {
    display: block;
    margin-inline: auto;
    max-width: 100%;
    max-height: 4.5rem;
    object-fit: contain;
}

.letterhead-card.is-retired .card-body {
    opacity: .6;
}

/* ---- A ship's photograph (backlog 101) ----
   One image beside its controls, not a gallery: the card is the ship, and the space it
   takes is fixed whether or not there is a picture in it yet, so the page does not jump
   when one is added. */
.vessel-photo-card {
    display: flex;
    /* A column, because the card is one now: the photograph sits beside the particulars at
       xl and under them below it, and in neither case is there room for the picture and its
       controls side by side. */
    flex-direction: column;
    gap: .75rem;
    align-items: stretch;
}

/* The credit under a photograph that is somebody else's (backlog 101, step 4). Small, but
   NOT hidden behind anything: naming the author and the licence is the condition on which
   the picture may be used at all, so it is drawn wherever the picture is administered. */
.vessel-photo-credit {
    margin: 0;
    font-size: .78rem;
    line-height: 1.35;
    color: var(--nauta-text-muted);
}

/* The offer, while somebody decides about it. Set apart from the photograph above it by a
   rule and a tint, because the two pictures on this card mean different things: one is on
   the record and one is a proposal. */
.vessel-photo-offer {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    align-items: stretch;
    padding-top: .85rem;
    border-top: 1px solid var(--nauta-border);
}

.vessel-photo-offer-title {
    font-weight: 600;
    font-size: .85rem;
    color: var(--nauta-navy-700);
}

.vessel-photo {
    width: 100%;
    /* Capped so the card does not grow a poster when the column is wide: on a stacked phone
       layout the column is the whole screen, and the picture is not the point of the page. */
    max-width: 22rem;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--nauta-radius, .5rem);
    border: 1px solid var(--nauta-border);
    background: var(--nauta-surface-muted, #f6f6fa);
}

/* The placeholder occupies the photograph's frame exactly, so "no photograph yet" reads as
   a state rather than as an image that failed to load. */
.vessel-photo-none {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    color: var(--nauta-text-muted);
    border-style: dashed;
}

.vessel-photo-none svg {
    width: 3.5rem;
    height: auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linejoin: round;
    opacity: .55;
}

.vessel-photo-none span {
    font-size: .875rem;
}

.vessel-photo-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: .5rem;
    max-width: 22rem;
}

/* ---- The ship's picture where a mission shows her (backlog 101) ----
   Two sizes and one job: a cue for the eye, never a fact the reader has to read. Both keep
   the photograph's 3:2 frame so one hull does not letterbox next to another. */
.vessel-cell {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
}

.vessel-thumb {
    flex: 0 0 auto;
    width: 2.75rem;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: .25rem;
    border: 1px solid var(--nauta-border);
}

/* On the mission sheet the picture belongs to THE SHIP and stands beside her facts, so the
   vessel, the port and the holds keep the top of their group. */
.ship-group {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.ship-group > .fact-grid {
    /* The facts take what they need and the picture takes the rest: a dl that grows would
       push the photograph out of a column it is supposed to share. */
    flex: 0 1 auto;
    min-width: 0;
}

.mission-vessel-photo {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 14rem;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: var(--nauta-radius, .5rem);
    border: 1px solid var(--nauta-border);
}

/* Below xl the ship's column is a quarter again and there is nothing to stand beside, so
   the picture goes under her facts — the answer the vessel page gives at the same width. */
@media (max-width: 1199.98px) {
    .ship-group {
        flex-direction: column;
    }

    .mission-vessel-photo {
        width: 100%;
        max-width: 18rem;
    }
}

/* ---- Country flags (vendored SVGs, 4:3) ---- */
/* Fixed height at list-row size; the border keeps mostly-white flags (Japan,
   Monaco at the edge) from vanishing against the page. */
.flag-icon {
    height: 14px;
    width: auto;
    border: 1px solid var(--nauta-border);
    border-radius: 2px;
    vertical-align: -2px;
}

/* Editor pages read better narrow on wide monitors */
.editor-width {
    max-width: 68rem;
}

/* ---- Dashboard ---- */
/* Measured 2026-08-29: six tiles at 188x95 spent 153,000 square pixels on six numbers,
   and the page needed 1,204px on a 950px viewport. A count and its label sit on ONE line
   at a readable size; the poster layout was costing 40px of height per tile to centre a
   digit. Narrower minmax too, so six fit without stretching to fill a 1,600px row. */
/* The folded, optional part of a form written for a first-time reader (Boards 742). */
.new-service-more,
.checklist-description {
    margin-top: .75rem;
}

.new-service-more summary,
.checklist-description summary {
    width: fit-content;
    color: var(--nauta-violet-500);
    cursor: pointer;
    font-size: .9rem;
}

.new-service-intro {
    margin-bottom: 1rem;
}

.checklist-used-by {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .6rem;
    margin-top: .75rem;
}

/* The checklist editor: what a checklist is, then the form beside what it becomes (Boards 742). */
.checklist-how {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: .5rem 1.5rem;
    margin: 0 0 1rem;
    padding: 0;
    list-style: none;
    counter-reset: how;
}

.checklist-how li {
    position: relative;
    padding-left: 2rem;
    font-size: .85rem;
    counter-increment: how;
}

.checklist-how li::before {
    content: counter(how);
    position: absolute;
    top: .05rem;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--nauta-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
}

.checklist-how strong {
    display: block;
    color: var(--nauta-navy-700);
}

.checklist-how span {
    color: var(--nauta-text-muted);
}

.checklist-workspace {
    display: grid;
    gap: 1.5rem;
    max-width: 92rem;
}

.checklist-workspace-main {
    min-width: 0;
}

.checklist-preview-title {
    margin-bottom: .4rem;
    color: var(--nauta-navy-700);
    font-size: .9rem;
    font-weight: 600;
}

.checklist-preview-phone {
    width: 100%;
    max-width: 17rem;
    margin: 0 auto;
}

.checklist-preview-body {
    max-height: 22rem;
    padding: .1rem .45rem .2rem;
    overflow-y: auto;
    font-size: .72rem;
}

.checklist-preview-empty {
    margin: 1.5rem .5rem;
    color: var(--nauta-text-muted);
    text-align: center;
}

.checklist-preview-section {
    display: flex;
    gap: .3rem;
    margin-top: .3rem;
    padding: .3rem .4rem;
    border-radius: 6px;
    background: var(--nauta-state-idle-bg);
    font-weight: 600;
}

.checklist-preview-section-name {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.checklist-preview-question {
    margin-top: .3rem;
    padding: .35rem .45rem;
    border: 1px solid var(--nauta-border);
    border-radius: 6px;
    background: var(--nauta-card);
    overflow-wrap: anywhere;
}

.checklist-preview-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem;
    margin-top: .25rem;
}

.checklist-preview-buttons span {
    flex: 1 1 auto;
    padding: .15rem .3rem;
    border: 1px solid var(--nauta-primary);
    border-radius: 4px;
    color: var(--nauta-primary);
    text-align: center;
}

.checklist-preview-buttons .is-yes {
    border-color: #1e7a3c;
    color: #1e7a3c;
}

.checklist-preview-buttons .is-no {
    border-color: #b32121;
    color: #b32121;
}

.checklist-preview-box {
    min-height: 1.35rem;
    margin-top: .25rem;
    padding: .1rem .3rem;
    border: 1px solid var(--nauta-border);
    border-radius: 4px;
    color: var(--nauta-text-muted);
}

.checklist-preview-box.is-tall {
    min-height: 2.4rem;
}

.checklist-preview-note {
    max-width: 17rem;
    margin: .5rem auto 0;
    color: var(--nauta-text-muted);
    font-size: .78rem;
}

.checklist-preview-report {
    width: 100%;
    max-width: 17rem;
    margin: 0 auto;
}

@media (min-width: 1200px) {
    .checklist-workspace {
        grid-template-columns: minmax(0, 1fr) 18rem;
        align-items: start;
    }

    .checklist-preview {
        position: sticky;
        top: 1rem;
    }
}

/* A new firm's three steps on Home (Boards 742). */
.first-steps-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: .75rem;
}

.first-steps-list {
    display: grid;
    gap: .65rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.first-step {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
    color: var(--bs-secondary-color);
}

.first-step-mark {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 600;
}

.first-step.is-current .first-step-mark {
    border-color: var(--nauta-violet-500);
    background: var(--nauta-violet-500);
    color: #fff;
}

.first-step.is-done .first-step-mark {
    border-color: #bfe3cb;
    background: #e6f4ea;
    color: #1e7a3c;
}

.first-step-text {
    display: flex;
    flex: 1 1 16rem;
    flex-direction: column;
    min-width: 0;
}

.first-step.is-current .first-step-title {
    font-weight: 600;
    color: var(--nauta-navy-700);
}

.first-step-hint {
    font-size: .84rem;
    color: var(--bs-secondary-color);
}

.dash-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
}

.dash-tile {
    position: relative;
    /* Sized to its own label, not stretched to fill the row. An equal-width grid track cut
       "Awaiting documents" in half, and a status tile whose status cannot be read is worse
       than the poster it replaced. */
    flex: 0 1 auto;
    min-width: 7.5rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: .5rem;
    padding: .5rem .7rem;
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(16, 22, 58, .06);
    transition: transform .08s ease, box-shadow .08s ease, border-color .08s ease;
}

    /* A tile is a link to the list filtered to its status, and has to say so at
       rest, not only on hover: the arrow is the standing invitation.

       A FLEX ITEM, not an absolutely positioned one. It used to be `position: absolute;
       right: .85rem`, which reserves no space in the row — so the arrow sat ON TOP of the
       badge on every status whose name is long: "Confirmed→", "In progress→", "Awaiting
       documents→". Only the short ones looked right, because min-width left them slack,
       which is why it survived a review at a glance and was caught in a manual screenshot.
       As a real box it is separated by the row's own gap and cannot overlap anything. */
    .dash-tile::after {
        content: "→";
        margin-left: auto;
        color: var(--nauta-accent);
        opacity: .45;
        transition: opacity .08s ease, transform .08s ease;
    }

    .dash-tile:hover {
        transform: translateY(-2px);
        border-color: var(--nauta-accent);
        box-shadow: 0 4px 14px rgba(16, 22, 58, .12);
    }

        .dash-tile:hover::after {
            opacity: 1;
            transform: translateX(2px);
        }

    .dash-tile:focus-visible {
        outline: 2px solid var(--nauta-accent);
        outline-offset: 2px;
    }

.dash-tile .status-badge {
    white-space: nowrap;
}

.dash-tile-count {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--nauta-navy-800);
    line-height: 1;
}

/* A tile's own words. The mission tiles carry a status badge instead, because a mission
   HAS a status; these count things that do not, so the label is plain. */
.dash-tile-label {
    font-size: .82rem;
    color: var(--nauta-navy-700);
}

/* Non-zero and worth doing something about. Amber rather than red: the admin dashboard is
   read every morning, a permanent red becomes a colour people stop seeing, and the job here
   is only to keep a seven from looking like a zero. */
.dash-tile-alert {
    border-color: #e6c98a;
    background: #fdf9f0;
}

    .dash-tile-alert .dash-tile-count {
        color: #7a5410;
    }

/* A tile that filters the list below it rather than navigating: it has to look pressed
   while it is on, or the grid quietly shows a subset and nothing says why. */
.dash-tile-on {
    border-color: var(--nauta-accent);
    box-shadow: inset 0 0 0 1px var(--nauta-accent);
}

/* Some tiles are buttons rather than links now. A button carries the browser's own styling
   into the grid otherwise, and the tile has to look the same whichever it is. */
button.dash-tile {
    font: inherit;
    text-align: left;
    width: 100%;
    cursor: pointer;
}

/* ---- Dashboard: what is stuck (#53) ----
   The five-second answer to "what needs me": missions waiting for a surveyor,
   as direct links. The list is short by construction — it is capped and the
   normal state is empty, which the card says in words rather than by vanishing. */
.attn-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.attn-list li + li {
    border-top: 1px solid var(--nauta-border);
}

.attn-link {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    padding: .35rem .25rem;
    text-decoration: none;
    color: var(--nauta-text);
    border-radius: 6px;
}

    .attn-link:hover {
        background: #f6f4fc;
    }

    .attn-link .attn-number {
        font-weight: 600;
        color: var(--nauta-primary);
        white-space: nowrap;
    }

    .attn-link .attn-vessel {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .attn-link .attn-age {
        margin-left: auto;
        color: var(--nauta-text-muted);
        font-size: .8rem;
        white-space: nowrap;
    }

/* ---- Dashboard: the cross-mission live feed (#73) ----
   attn-list's shape with a second line: the event reads first, the stamp and the ship
   sit muted underneath. Dot colours come from the timeline's own category classes. */
.feed-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.feed-list li + li {
    border-top: 1px solid var(--nauta-border);
}

.feed-link {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    padding: .3rem .25rem;
    text-decoration: none;
    color: var(--nauta-text);
    border-radius: 6px;
}

    .feed-link:hover {
        background: #f6f4fc;
    }

/* The timeline's dots are absolutely positioned on its rail; here the dot flows with
   the row, so only the category colour classes are shared. */
.feed-dot {
    flex: 0 0 auto;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--nauta-border);
    margin-top: .42rem;
}

.feed-body {
    min-width: 0;
}

.feed-what {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.feed-meta {
    display: block;
    color: var(--nauta-text-muted);
    font-size: .8rem;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The ship on a mixed feed row (#126): the one word that says whose stoppage this is, so
   it is not left in the muted run with the stamp. */
.feed-ship {
    color: var(--nauta-text);
    font-weight: 600;
}

/* ---- The client's own dashboard (#126) ----
   One card per ship, by whichever firm is working it. The firm leads the card because two
   firms both have a 2026-00002; the ship is the biggest thing on it because that is what
   the reader is looking for. */
/* The page spends the screen it has (seen 2026-09-30: two cards and a four-row feed over
   two thirds of a 1080p monitor left blank). On a wide screen the row is the viewport less
   the app bar, the heading and the footer; the map takes what the cards leave on the left,
   and the feed runs the full height on the right and scrolls inside itself. Below lg the
   columns stack and each is as tall as its content. */
@media (min-width: 992px) {
    /* A HEIGHT, not a min-height: the cards' box can only be told "no taller than what is
       left" if the row itself has a size. The floor is for a short laptop, where the page
       scrolls rather than crushing three things into 600px. */
    .client-dash-row {
        height: max(calc(100vh - 12.5rem), 36rem);
    }

        /* One row of small filter controls above it, once there are ships to filter. */
        .client-dash-row.with-filter {
            height: max(calc(100vh - 16rem), 36rem);
        }

        .client-dash-row > [class*="col-"] {
            min-height: 0;
            max-height: 100%;
        }

    /* Natural height up to whatever the map's floor leaves, then it scrolls. The padding is
       room for the focused card's ring, which overflow would otherwise clip. */
    .client-cards-box {
        flex: 0 1 auto;
        min-height: 11rem;
        overflow-y: auto;
        padding: 3px;
        margin: -3px;
    }

    /* Grows into the space few cards leave; never shrinks below a map worth reading. */
    .client-dash-map {
        flex: 1 0 18rem;
        display: flex;
        min-height: 0;
    }

        .client-dash-map .mission-map.mission-map-full {
            min-height: 0;
        }

    .client-dash-feed {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

        .client-dash-feed > .card {
            flex: 1 1 0;
            min-height: 14rem;
            overflow: hidden;
        }

        .client-dash-feed .card-body {
            display: flex;
            flex-direction: column;
            min-height: 0;
            height: 100%;
        }

    .client-feed-list {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
    }
}

@media (max-width: 991.98px) {
    .client-dash-map .mission-map.mission-map-full {
        min-height: 16rem;
    }
}

.client-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
    gap: .9rem;
}

.client-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    overflow: hidden;
}

    .client-card.focused {
        border-color: var(--nauta-primary);
        box-shadow: 0 0 0 2px rgba(53, 66, 124, .18);
    }

.client-card-main {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: .7rem .8rem .5rem;
    border: 0;
    background: none;
    text-align: left;
    color: var(--nauta-text);
    flex: 1 1 auto;
}

    .client-card-main:hover {
        background: #f6f4fc;
    }

.client-card-firm {
    display: flex;
    align-items: center;
    gap: .45rem;
    min-height: 1.75rem;
    font-size: .8rem;
    color: var(--nauta-text-muted);
}

    .client-card-firm img {
        height: 1.75rem;
        max-width: 5rem;
        object-fit: contain;
    }

.client-card-vessel {
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.client-card-sub {
    font-size: .8rem;
    color: var(--nauta-text-muted);
}

/* The green light: work is going on aboard right now. It breathes rather than blinks — a
   blink reads as an alarm — and stands still for a reader who has asked for less motion. */
.live-dot {
    flex: 0 0 auto;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    background: #1f9d55;
    box-shadow: 0 0 0 0 rgba(31, 157, 85, .55);
    animation: live-dot-pulse 2s ease-out infinite;
}

@keyframes live-dot-pulse {
    0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .55); }
    70% { box-shadow: 0 0 0 .45rem rgba(31, 157, 85, 0); }
    100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .live-dot {
        animation: none;
    }
}

.client-card-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2px;
    padding: 0 .8rem;
}

    .client-card-strip img {
        width: 100%;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 4px;
        background: var(--nauta-border);
    }

.client-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .5rem;
    padding: .5rem .8rem .7rem;
}

/* The card's body where choosing a ship does nothing: not a button, so no hover. */
.client-card-plain:hover {
    background: none;
}

/* The ship's name in a grid row or a map row: the card's weight at the list's size. */
.client-grid-vessel {
    font-size: inherit;
}

/* A row of the client's map panel is not itself a button (it carries one), so it keeps the
   row's shape without the pointer. */
.client-map-row {
    cursor: default;
}

    .client-map-row:hover {
        background: none;
    }

    .client-map-row .client-card-firm {
        min-height: 0;
    }

        .client-map-row .client-card-firm img,
        .client-missions-grid .client-card-firm img {
            height: 1.25rem;
        }

/* The button keeps its one line; the stamp beside it is what gives way. */
.client-card-foot .btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ---- Phone cards (#61) ----
   Below md a client-facing list trades its table for cards: one record per
   block, labels and values stacked, and the primary action a full-width
   thumb target instead of a cell in a final column — which at 390px sat
   entirely off-screen, reachable only by a swipe nothing advertised. The
   markup renders both presentations and Bootstrap's d-md-* utilities pick
   one, so above md the grids are byte-for-byte what they were. */
.row-cards {
    display: flex;
    flex-direction: column;
    gap: .7rem;
}

.row-card {
    display: block;
    padding: .8rem .95rem;
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    color: var(--nauta-text);
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(16, 22, 58, .06);
}

a.row-card:focus-visible {
    outline: 2px solid var(--nauta-accent);
    outline-offset: 2px;
}

a.row-card:active {
    border-color: var(--nauta-accent);
    background: #f6f4fc;
}

.row-card-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .6rem;
}

.row-card-title {
    font-weight: 600;
    color: var(--nauta-primary);
}

.row-card-lead {
    display: block;
    font-weight: 600;
    color: var(--nauta-navy-700);
}

/* Tighter than .fact-grid: a phone column has no room for a 12rem label bay. */
.row-card-facts {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .15rem .8rem;
    margin: .4rem 0 0;
    font-size: .88rem;
}

.row-card-facts dt {
    color: var(--nauta-text-muted);
    font-weight: 500;
}

.row-card-facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: break-word;
}

/* The one thing the reader came to do, sized for a thumb: full width, and
   taller than the desk version of the same button ever needs to be. */
.row-card .btn-card-action {
    display: block;
    width: 100%;
    padding: .62rem .75rem;
    font-weight: 600;
}

/* Two cards a row once there is room for two (a phone in landscape, a tablet), one below
   that. Used where the cards replace a grid up to lg rather than md, so the landscape phone
   gets a list it can read instead of the grid's slivers (Platform admin -> Users). */
@media (min-width: 576px) {
    .row-cards.row-cards-2up {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* The person is the card's heading and wraps rather than ellipsises: a clipped name is the
   defect this layout exists to remove. The email breaks anywhere because an address has no
   spaces to break at. */
.platform-user-name {
    overflow-wrap: anywhere;
}

.platform-user-email {
    overflow-wrap: anywhere;
}

/* Chevron-only paging buttons, so no length of French can overflow them. */
.row-cards-pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: .85rem;
}

/* ---- Dialog chrome ----
   A dialog's title bar carried Telerik's own grey and nothing of ours, so the one surface
   that covers the screen and asks for something was the least branded thing in the product.

   The tint is deliberately faint and the colour lives in the 3px rule under it: a full
   gradient band reads well on a three-field dialog and badly on the booking form, which is
   fourteen fields tall and where a dark 50px header eats the first thing you have to read.
   The rule is the brand at full strength and costs no height.

   On .k-dialog-titlebar too — the confirmations come from Telerik's dialog factory, not
   from a window, and a confirmation that looks like a different product is exactly the
   moment somebody stops trusting what they are confirming. */
.k-window-titlebar,
.k-dialog-titlebar {
    background: var(--nauta-gradient-wash);
    border-bottom: 3px solid transparent;
    border-image: var(--nauta-gradient-rule) 1;
    color: var(--nauta-navy-800);
}

.k-window-title,
.k-dialog-title {
    display: flex;
    align-items: center;
    gap: .55rem;
    font-weight: 600;
    color: var(--nauta-navy-800);
}

/* What the dialog is about, in one mark: the same icon the screen behind it uses for the
   thing being created. Gradient here rather than on the bar, so the brand appears at the
   size of a button instead of the size of a banner. Squared-off circle, matching the
   avatar in the account menu. */
.dialog-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    flex: 0 0 auto;
    border-radius: 7px;
    color: #fff;
    background: var(--nauta-gradient);
}

    .dialog-chip .k-svg-icon {
        width: 1rem;
        height: 1rem;
    }

/* ---- Modal content that can outgrow the viewport ----
   TelerikWindow grows with its content instead of scrolling it, so a long mission
   history or an expanded payload runs off the bottom of the screen with no way back.
   The window keeps its own chrome; this scrolls what is inside it. Sized in vh so it
   adapts to the laptop screens these are actually read on. */

/* The backstop nothing used to enforce (#53): whatever a window holds, its
   content can never grow past the viewport — it scrolls instead. Wrapping in
   .window-scroll is still the convention for the long viewers; this catches the
   dialog someone forgets, where before the bottom of the form was simply
   unreachable. */
.k-window-content {
    max-height: 82vh;
    overflow-y: auto;
}

/* A dialog's own actions, pinned to the bottom of that scrolling content — the modal
   cousin of .editor-actions. A mission type with eleven checklists, plus a validation
   message, pushed Create clean out of the window: the button you need in order to leave
   must never be the thing that scrolls away. Error included, so a message appearing
   cannot displace the buttons either. */
.dialog-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--nauta-border);
    background: var(--nauta-card);
}

.window-scroll {
    max-height: 68vh;
    overflow-y: auto;
    /* Bootstrap's .row pulls itself 0.75rem out on BOTH sides and expects a .container to
       have supplied matching padding. This box is that container. Without the left padding
       the label/value grids hung 12px past the edge and every one of these windows carried
       a horizontal scrollbar whatever was in it — 2px of overflow, permanently. So: 0.75rem
       each side to absorb the gutter, plus the old 0.6rem on the right so the vertical
       scrollbar still never sits on the text. */
    padding-left: .75rem;
    padding-right: 1.35rem;
}

/* ---- Audit / log detail windows ---- */
/* The whole point of the detail window is copy-paste into a ticket: selectable,
   scrollable, wrapped so nothing is ever clipped away. */
.detail-pre {
    max-height: 40vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    border-radius: 6px;
    padding: .6rem .75rem;
    font-size: .8rem;
    margin-bottom: 0;
}

/* ---- Mission history timeline (#51) ----
   Read down a day, not across columns: the eye follows the rail, times sit in a
   fixed gutter so they line up, and the actor drops to a second muted line so the
   sentence is what you read first. */
.timeline {
    position: relative;
    padding-left: .25rem;
}

.timeline-day {
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--nauta-text-muted);
    margin: 1.15rem 0 .5rem;
}

.timeline-day:first-child {
    margin-top: 0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .45rem 0 .45rem 1.15rem;
    position: relative;
}

/* The rail. Drawn on the row rather than the container so it stops with the last
   item of a day instead of running past it. */
.timeline-item::before {
    content: "";
    position: absolute;
    left: .3rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--nauta-border);
}

.timeline-dot {
    position: absolute;
    left: 0;
    top: .78rem;
    width: .62rem;
    height: .62rem;
    border-radius: 50%;
    background: var(--nauta-border);
    box-shadow: 0 0 0 3px #fff;
}

.timeline-dot-created { background: var(--nauta-violet-500); }
.timeline-dot-report { background: var(--nauta-navy-800); }
.timeline-dot-final { background: #14532d; }
.timeline-dot-share { background: #1d6fa5; }
.timeline-dot-removed { background: #8f1d1d; }

.timeline-time {
    flex: 0 0 3.1rem;
    font-variant-numeric: tabular-nums;
    color: var(--nauta-text-muted);
    font-size: .85rem;
    padding-top: .05rem;
}

.timeline-body {
    flex: 1 1 auto;
    min-width: 0;
}

.timeline-title {
    font-weight: 600;
}

.timeline-detail {
    color: var(--nauta-navy-800);
    word-break: break-word;
}

.timeline-actor {
    color: var(--nauta-text-muted);
    font-size: .8rem;
}

.timeline-count {
    display: inline-block;
    margin-left: .4rem;
    padding: .05em .45em;
    border-radius: 10px;
    background: #ecebf7;
    color: var(--nauta-violet-500);
    font-size: .72rem;
    font-weight: 700;
}

/* Present but quiet: the raw payload is for the rare "what exactly was stored?", so
   it must not compete with the sentence above it. */
.timeline-raw-toggle {
    flex: 0 0 auto;
    padding: 0 .35rem;
    color: var(--nauta-text-muted);
    text-decoration: none;
}

.timeline-raw {
    margin: 0 0 .6rem 4.9rem;
}

.timeline-raw-line {
    display: flex;
    gap: .6rem;
    font-size: .78rem;
    margin-bottom: .2rem;
}

/* Inside a run, one payload must not push the next occurrence off the screen —
   these stack, unlike the single payload in the admin detail window. */
.timeline-raw .detail-pre {
    max-height: 12rem;
    margin-bottom: .5rem;
}

/* ---- Operational timeline (#73) ----
   The structural timeline rules above are shared with the mission history window —
   same look, different content. What is NOT shared is the caveat: this surface shows
   provisional operational data to an outside party, and the banner must survive being
   cropped into a screenshot, which is why it is loud, inline and never dismissible. */
.provisional-banner {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    border: 1px solid #e4c56b;
    border-left: 4px solid #b8860b;
    background: #fdf4dc;
    color: #5f4200;
    border-radius: 8px;
    padding: .7rem .9rem;
    margin-bottom: 1rem;
    font-size: .9rem;
}

.provisional-banner-badge {
    flex: 0 0 auto;
    background: #b8860b;
    color: #fff;
    font-weight: 800;
    font-size: .72rem;
    letter-spacing: .08em;
    border-radius: 4px;
    padding: .3em .55em;
    margin-top: .1rem;
}

/* Dots by operational meaning, on the shared rail: the job moving forward, something
   the client will ask about, the day's numbers, plain information. */
.timeline-dot-milestone { background: var(--nauta-navy-800); }
.timeline-dot-attention { background: #8f1d1d; }
.timeline-dot-figures { background: #14532d; }
.timeline-dot-info { background: var(--nauta-violet-500); }

/* ---- Cargo manifest and discharge tally (board 77) ----
   The firm's working view. ROB is the number the whole feature exists to make fall,
   so its card is the loud one; balances colour by meaning — short red, over amber —
   because both mean cartons moved and neither may hide the other. */
.cargo-stats {
    display: flex;
    gap: .9rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cargo-stat {
    flex: 1 1 13rem;
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    padding: .8rem 1rem;
}

.cargo-stat-label {
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--nauta-text-muted);
}

.cargo-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nauta-navy-800);
    line-height: 1.2;
}

.cargo-stat-sub {
    font-size: .85rem;
    color: var(--nauta-text-muted);
}

.cargo-stat-rob {
    border-color: var(--nauta-primary);
    border-left-width: 4px;
}

.cargo-stat-rob .cargo-stat-value { color: var(--nauta-primary); }

/* The day header is now a row INSIDE the discharge table rather than a div above its
   own table, so it needs to read as a band across the ledger rather than as a cell. */
.cargo-day-row > td {
    background: #f6f7fb;
    border-top: 1px solid var(--nauta-border);
}

.cargo-day-row:first-child > td {
    border-top: 0;
}

.cargo-day-head {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: baseline;
    padding: .1rem 0;
}

.cargo-day-rob {
    margin-left: auto;
    font-weight: 600;
    color: var(--nauta-primary);
}

.cargo-subtotal td {
    font-weight: 600;
    background: #f6f7fb;
}

.cargo-balance { font-weight: 600; }
.cargo-balance-short { color: #8f1d1d; }
.cargo-balance-over { color: #7a5410; }
.cargo-balance-even { color: var(--nauta-text-muted); font-weight: 400; }

/* A mark's own unit under its column heading, where the marks disagree. */
.cargo-unit-label {
    font-size: .75rem;
    font-weight: 400;
    color: var(--nauta-text-muted);
}

/* ---- The cargo entry assistant (backlog 125) ---- */
.cargo-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    list-style: none;
    padding: 0 0 .5rem;
    margin: 0 0 .75rem;
    border-bottom: 1px solid var(--nauta-border);
}

.cargo-steps .btn-link {
    color: var(--nauta-text-muted);
    text-decoration: none;
}

.cargo-steps li.active .btn-link {
    color: var(--nauta-primary);
    font-weight: 600;
}

/* Sixteen compartments by six marks: every cell as narrow as a six-figure count allows,
   and the compartment column never wrapping, so the grid reads like the plan. */
.cargo-assistant-grid .cargo-cell {
    min-width: 5.5rem;
    font-variant-numeric: tabular-nums;
}

.cargo-assistant-grid td,
.cargo-assistant-grid th {
    white-space: nowrap;
}

.cargo-assistant-grid thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--nauta-card);
}

/* Filling a form from the client's documents with AI: set apart from the form it fills, so
   the office reads it as a way in rather than as one more field. */
.ai-fill {
    border: 1px dashed var(--nauta-border);
    border-radius: 8px;
    padding: .75rem 1rem;
    background: var(--nauta-card);
}

/* A bulk line is a tonnage, not a count: tinted so it is never read as cartons. */
.cargo-cell-bulk {
    background: #f3f0e6;
}

/* The paste box keeps Excel's columns readable: monospace, no wrapping. */
.cargo-paste {
    font-family: Consolas, "Courier New", monospace;
    font-size: .85rem;
    white-space: pre;
    overflow-x: auto;
}

/* The day's figures arrive as typed, line breaks and all. */
.timeline-note {
    white-space: pre-line;
    word-break: break-word;
}

.timeline-event-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .6rem;
    padding-top: .05rem;
}

/* Frames on a timeline entry (#81): small, clickable, and visibly not-yet-released
   when dashed — which only staff ever see, because the API narrows the list first. */
.timeline-photos {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    margin: .3rem 0 .1rem;
}

.timeline-photo-thumb img {
    display: block;
    width: 3.4rem;
    height: 3.4rem;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--nauta-border);
}

.timeline-photo-thumb.is-withheld img {
    opacity: .45;
    border-style: dashed;
}

/* Documents on a timeline entry: one line each, a withheld one dimmed like its photos. */
.timeline-documents {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    margin: .3rem 0 .1rem;
}

.timeline-document {
    overflow-wrap: anywhere;
}

.timeline-document.is-withheld {
    opacity: .7;
}

.timeline-document-state {
    color: var(--nauta-state-warn-fg);
    font-size: .85em;
}

/* A drawer document an entry carries, and whether the client can open it there. */
.attachment-state {
    display: inline-block;
    font-size: .8em;
    padding: .05em .5em;
    border-radius: 999px;
}

.attachment-state.is-released { background: var(--nauta-state-ok-bg); color: var(--nauta-state-ok-fg); }
.attachment-state.is-withheld { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }

.row-nav-table tbody tr {
    cursor: pointer;
}

.row-nav-table tbody tr:hover {
    background: #f6f4fc;
}

/* ---- Report photo picker (#57): which frames this document carries ---- */
.report-photo-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: .6rem;
    /* A long job's photographs scroll INSIDE the card (2026-10-02): COOL GIRL's ninety
       frames made the page so long that the cards after them were out of reach. */
    max-height: min(60vh, 34rem);
    overflow-y: auto;
    padding: 2px .25rem 2px 2px;
}

.report-photo-pick {
    position: relative;
    display: block;
    border: 2px solid var(--nauta-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: var(--nauta-card);
}

.report-photo-pick.is-chosen {
    border-color: var(--nauta-navy-700);
}

.report-photo-pick input {
    position: absolute;
    top: .35rem;
    left: .35rem;
    z-index: 1;
    width: 1.05rem;
    height: 1.05rem;
    cursor: pointer;
}

.report-photo-pick img {
    display: block;
    width: 100%;
    height: 5.5rem;
    object-fit: cover;
    background: #eceef5;
}

.report-photo-pick span {
    display: block;
    padding: .3rem .45rem .4rem;
    font-size: .78rem;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ---- Office surfaces on a phone ----
   #61 made the CLIENT journey work at 390px and deliberately left office and admin
   screens as desk screens. They are being opened on phones anyway, and two of them were
   not merely awkward but unusable. These are the specific repairs, not a general
   commitment that every office screen is a phone screen. */

/* A Telerik Window carries an inline width, so a dialog declared at 520px stayed 520px
   on a 390px screen and put its confirm button off the right edge — the new-mission form
   could not be submitted at all. Overriding an inline style needs !important; there is no
   other hook. The height rule matters just as much: a tall form on a short screen has to
   scroll INSIDE the window, or the buttons sit below the fold with nothing able to reach
   them. Applied to every k-window, because no fixed-width dialog works at this size. */
@media (max-width: 600px) {
    .k-window {
        width: calc(100vw - 1.5rem) !important;
        max-width: calc(100vw - 1.5rem) !important;
        left: 0.75rem !important;
        top: 1rem !important;
        max-height: calc(100vh - 2rem) !important;
    }

    /* Telerik centres with `k-centered`, which is transform: translate(-50%, -50%) -- and a
       transform is applied AFTER left/top, so it drags the dialog back by half its own
       width whatever left says. Measured: left:12px, width:366px, translate(-183px) put the
       window at x = -171, with every field label off the left edge while Cancel and Create
       stayed visible. The width fix alone therefore looked like it had worked. */
    .k-window.k-centered {
        transform: none !important;
    }

    .k-window .k-window-content {
        overflow-y: auto;
    }
}

/* Grids whose fixed columns total more than the viewport. Telerik answers that by
   shrinking every column, which at 390px turns a six-column grid into six unreadable
   slivers, and in landscape into slivers that are merely smaller. Let the grid keep its
   natural width and scroll the whole thing sideways as one unit instead — header and
   body stay in step, which they do not if you scroll them separately. */
.grid-scroll {
    overflow-x: auto;
}

@media (max-width: 768px) {
    /* 64rem, not a snugger figure: these grids carry four or five FIXED-width columns
       (role, language, status, commands) that take their share first, so a smaller floor
       leaves the auto-width ones — the email and the person's name, the two you actually
       read — squeezed to "E…" and "ad…". Sideways scrolling is the cost; an unreadable
       column is not a saving. */
    .grid-scroll .k-grid {
        min-width: 64rem;
    }
}

/* The dashboard's missions-by-port map (Boards 27). MapLibre draws into this element and
   sizes itself to it, so the height has to come from CSS — a container with no height
   renders a map of nothing at all, silently. */
/* 13rem, not 22. At 22rem the map was 1036x352 -- 18% of the whole dashboard -- to show
   a single pin, and it is a locator: the zoom is capped at 9 because the positions are
   arc-minute grade, so there is nothing in the extra height to look at. */
.mission-map {
    /* Viewport-relative like the two lists beside it, so the map takes its share of the
       screen rather than a fixed slice of it. The floor keeps it a map on a phone; the
       ceiling stops it becoming the hero again on a large monitor. */
    height: clamp(9rem, 19vh, 20rem);
    width: 100%;
    border-radius: .375rem;
    overflow: hidden;
    background: #eef1f5; /* what the reader sees while the first tiles are in flight */
}

@media (max-width: 768px) {
    .mission-map {
        height: 11rem;
    }
}

/* The Map screen, where the map is the page rather than a locator beside two lists.

   THE ROW OWNS THE HEIGHT, not the map and not the list. Written the other way first — a
   min-height on the map, the panel free to be as tall as its rows — and a port with twelve
   missions made the row 1004px on a 900px screen, so the map was taller than the window and
   the page scrolled. A flex row is as tall as its tallest child whatever the other one says.

   Bounding it here means the list scrolls inside itself and the map is exactly the space
   there is: viewport minus the app bar, the heading, the filter row and the footer. Below lg
   the columns stack, nothing is beside anything, and each takes its own height. */
.mission-map.mission-map-full {
    height: auto;
    flex: 1 1 auto;
    min-height: 22rem;
}

.map-panel-list {
    overflow-y: auto;
    min-height: 0;
    flex: 1 1 auto;
    /* Stacked, there is no map height to match: cap it, or a port with forty missions pushes
       the footer off the bottom of a phone. */
    max-height: 60vh;
}

@media (min-width: 992px) {
    .map-screen {
        /* Viewport minus the app bar, the heading, ONE row of small filter controls and the
           footer. It was 22rem when the filters were full-size and took two rows. */
        height: max(22rem, calc(100vh - 19rem));
    }

    /* THE COLUMNS NEED A DEFINITE HEIGHT, not permission to be short. `min-height: 0` was
       tried first and changed nothing: Bootstrap's .row is `flex-wrap: wrap`, and a wrapped
       flex line is as tall as its tallest item rather than as tall as its container — so the
       column holding twelve mission rows still grew to 1019px inside a row that was
       correctly 570px, and dragged the map to 1004px with it.

       `height: 100%` against a row whose height IS definite gives the chain something to
       resolve: column 570, card 570, body 570, and the list finally has a bounded box to
       scroll inside. */
    .map-screen > [class*="col-"] {
        height: 100%;
    }

    .map-screen .card,
    .map-screen .card-body,
    .mission-map.mission-map-full {
        min-height: 0;
    }

    .map-panel-list {
        max-height: none;
    }
}

/* A row, not a link: it navigates, but it is a button so the keyboard reaches it in order
   and the whole block is the target rather than the mission number alone. */
.map-panel-row {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
    padding: .5rem .25rem;
    color: inherit;
}

.map-panel-row:last-child {
    border-bottom: 0;
}

/* The ship's line inside a map row reserves the thumbnail's height whether there is one or
   not (backlog 101, step 5), for the reason the missions list and the field cards already
   do: a panel you scan down reads badly when the rows carrying a picture are taller, and
   which hulls happen to have been photographed is not a fact about the work. The number is
   the square's own height — 2.75rem wide at 3:2. */
.map-panel-row .vessel-cell {
    min-height: 1.85rem;
}

.map-panel-row:hover,
.map-panel-row:focus-visible {
    background: #f6f4fc; /* the portal's one row-hover, same as .row-nav-table */
}

/* The chosen pin. Ringed rather than recoloured: the violet is the brand's and a second
   colour here would read as a second KIND of pin rather than the same pin, selected. */
.map-pin-selected {
    box-shadow: 0 0 0 3px var(--nauta-violet-500, #6b4eff), 0 1px 4px rgb(15 20 51 / 35%);
    z-index: 1;
}

/* A pin is the mission COUNT, not a generic teardrop: the number is the whole point of the
   card, and reading it should not need a click. Sized to stay legible with three digits. */
.map-pin {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 .35rem;
    border-radius: 999px;
    background: var(--nauta-violet-500);
    color: #fff;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgb(15 20 51 / 35%);
    cursor: pointer;
}


/* ---- Dashboard density (Boards 27, measured 2026-08-29) ----
   Telerik's default row padding suits a register you read one row at a time. On the
   dashboard the question is "how much is moving", so the answer is more rows, not taller
   ones: 52px per row showed 6 of this tenant's 13 missions. Scoped to the dashboard so the
   Missions register keeps its own comfortable rows. */
.k-grid.dash-grid td,
.k-grid.dash-grid th {
    padding-top: .4rem;
    padding-bottom: .4rem;
}


/* ---- Dashboard: cards own a height budget (Boards 27, measured 2026-08-29) ----
   Every card here used to be unbounded, so its CONTENT set the page height: ten missions
   and twelve events made a 1,174px page, and a 1080p screen at 100% zoom offers about 950.
   The reported symptom was having to run the browser at 80% to see the dashboard.

   So the two long lists scroll inside themselves instead of pushing the page down. clamp()
   rather than a fixed height on purpose: a tall screen spends the extra on more rows, a
   laptop gets fewer, and a phone falls to the floor value rather than a negative one. The
   page then fits whatever it is opened on, and nothing can shove anything else off. */
.k-grid.dash-grid {
    /* DERIVED, not guessed. The left column drives the page height, and it is
       chrome + grid + map: about 26rem of app bar, title, tiles, headings, gap and footer,
       plus the map's 19vh. So the grid takes what is left — 100vh - 19vh - 26rem — and the
       whole page lands inside the viewport with the TreeCatch lockup still on it.

       Tuning a flat vh fraction instead cost two rounds: 42vh pushed the footer off a
       950px screen, 38vh fixed 950 and still cut 900. Verified at 768/900/950/1080; below
       the floor the page scrolls, which is correct on a small screen. */
    height: clamp(16rem, calc(81vh - 26rem), 50rem);
}

.dash-feed {
    max-height: clamp(14rem, 46vh, 60rem);
    overflow-y: auto;
}

/* ---- The feed does NOT scroll inside itself on a phone (measured 2026-08-31) ----
   The clamp above is a desktop budget: it keeps the one-screen dashboard by giving the
   feed a box and letting it scroll inside the column beside the grid and the map. Below
   the two-column layout there is no such budget to keep — the columns have stacked, this
   card is LAST on the page, and there is nothing under it but the footer.

   What the box did there instead: at 390x844 it came to 388px, which stopped the list
   mid-row, and a phone draws no scrollbar at rest. So the screen ended on a sentence cut
   through the middle with the footer beneath it — which reads as a rendering fault, not as
   "there are twenty more of these" — and a swipe over the card moved the feed rather than
   the page it was aimed at.

   Letting the page scroll costs nothing here, because the card is last: the page simply
   goes on. */
@media (max-width: 991.98px) {
    .dash-feed {
        max-height: none;
        overflow-y: visible;
    }
}

/* ---- The feed runs the column (Boards 640) ----
   "Waiting for a surveyor" used to sit above this and the feed's clamp was cut to leave it
   room. With that card gone to the bell, a fixed clamp wasted what it freed: measured at
   1080p the feed stopped at 497px inside an 815px column, a third of the space the change
   bought going to nothing.

   THE COLUMN MUST FOLLOW THE PAGE, NOT SET IT. The obvious version of this — let the card
   flex and drop the max-height — grew the page from 1080px to 1743px, because a bootstrap
   row is as tall as its tallest column and thirty feed rows are taller than the grid. That
   loses the one-screen dashboard, which is the thing the layout was tuned for.

   So the content is taken OUT of the flow: the column keeps no intrinsic height of its own,
   the grid and the map beside it decide how tall the row is, and the inner box fills exactly
   that. The feed then tracks whatever those two do next, at every width, with nothing to
   re-derive. Below lg the columns stack, the row height stops meaning anything, and the
   clamp above is the right rule again. */
@media (min-width: 992px) {
    .dash-column {
        position: relative;
    }

    .dash-column > .dash-column-fill {
        position: absolute;
        top: 0;
        bottom: 0;
        /* NOT inset: 0. A bootstrap gutter is padding on the column, and an absolutely
           positioned child ignores padding — the card came out 12px wider on each side and
           sat flush against the grid beside it, with the row's gap gone. */
        left: calc(var(--bs-gutter-x) * .5);
        right: calc(var(--bs-gutter-x) * .5);
        display: flex;
        flex-direction: column;
    }

    .dash-column .card {
        flex: 1 1 auto;
        /* Without this the flex item refuses to shrink below its content, and the card
           overflows the column instead of the feed scrolling inside it. */
        min-height: 0;
    }

    .dash-column .card-body {
        display: flex;
        flex-direction: column;
        min-height: 0;
    }

    .dash-column .dash-feed {
        max-height: none;
        flex: 1 1 auto;
        min-height: 0;
    }
}

/* ---- Dashboard on a short screen (measured 2026-08-29) ----
   At a 640px viewport — a 1366x768 laptop with browser chrome — the FIXED furniture came to
   400px: app bar, page title, section headings, the gap and the footer. That is 62% of the
   screen before a single mission is shown, and it is why the card clamps bottomed out on
   their floors there while fitting comfortably at 1080p.

   So the furniture shrinks when the screen is short, rather than the content. Keyed on
   height, not width: a 1366-wide laptop and a 1366-wide window on a big monitor have the
   same width and completely different budgets. */
@media (max-height: 900px) {
    .dash-page h1 {
        font-size: 1.6rem;
    }

    .dash-page > .d-flex:first-child {
        margin-bottom: .5rem !important;
    }

    .dash-page h5 {
        font-size: .95rem;
        margin-bottom: .35rem;
    }

    .dash-page h5.mt-4 {
        margin-top: .75rem !important;
    }

    .app-footer {
        padding-top: .4rem;
        padding-bottom: .25rem;
    }

    .app-footer img {
        height: 1.7rem;
    }
}


/* ---- Dashboard: one type scale for row content (reported 2026-08-29) ----
   Telerik sizes its own grid text at 0.875rem of the root, so setting html to 15px moved
   every list on this screen EXCEPT the grid. The two side-by-side lists of mission
   references ended up at 15px against the grid's 13.125px — a 14% difference between two
   cards showing the same kind of thing, which is exactly what a reader notices without
   being able to name it.

   So the row scale is stated once here rather than inherited from two places. The grid is
   the one that cannot be told, so it is the one everything else matches. */
.attn-link,
.feed-link .feed-what {
    font-size: .875rem;
}

.attn-link .attn-age,
.feed-link .feed-meta {
    font-size: .75rem;
}


/* The booking dialog's checklist list (Boards 637, measured 2026-08-29).
   This tenant offers twelve forms on CGO-REEF and the list ran to 311px — the tallest single
   block in the dialog, taller than every booking field put together, and unbounded: a firm
   with twenty templates would simply get a taller dialog. It scrolls inside a budget now,
   the same answer the dashboard's lists got, so adding a template cannot push Create off
   the screen. The budget is generous enough that a short list never scrolls at all. */
/* ONE column now, and taller. The list moved into the dialog's right-hand column, where it
   has the height of the whole booking form beside it to spend — so the pilot's twelve forms
   read as one list instead of a two-column block scrolling inside a dialog that was also
   scrolling. Two nested scrollbars was what the last shape actually produced. */
.checklist-picker {
    display: grid;
    grid-template-columns: 1fr;
    gap: .15rem;
    max-height: 21rem;
    overflow-y: auto;
}

/* Telerik puts the width on the element as an inline style, which a CSS width cannot beat —
   max-width can, so this is what stops a 62rem dialog hanging off a 1366px laptop. */
.booking-dialog {
    max-width: 94vw;
}


/* ---- Form controls join the type scale (reported 2026-08-29) ----
   Telerik sizes everything it renders at 0.875rem of the root and always has. Bootstrap's
   form controls had no size rule at all, so they sat on the root itself — 15px fields under
   13.125px labels, beside 13.125px Telerik pickers, in the same dialog. Measured in the
   booking dialog: select.form-select 15px, input.form-control 15px, textarea 15px, against
   a Telerik combobox at 13.125px.

   Stated once here rather than per screen. It is the same decision the dashboard's lists
   got: the component library is the thing that cannot be told, so everything else matches
   it. Shorter controls are a side effect worth having — a form of ten fields loses about
   40px of height.

   .form-control-sm is pinned rather than left to Bootstrap's relative sizing, which would
   otherwise compound to about 11.5px now that the base has come down. */
.form-control,
.form-select {
    font-size: .875rem;
}

.form-control-sm,
.form-select-sm {
    font-size: .8125rem;
}


/* ---- Checkboxes are the product's colour, not Bootstrap's (found 2026-08-29) ----
   Reported as "one pixel gone when you select a checklist". Measured: nothing moves. Both
   states are 13.13px square at the same position; what changes is that the 1px border
   turns the same colour as the fill, so a checked box reads a hairline tighter than the
   white one above it.

   The border keeps its own darker shade now, which holds the outline at the same weight in
   both states. And the fill was Bootstrap's default #0d6efd - a blue that appears nowhere
   else in this portal, whose accents are violet and whose Kendo primary is already mapped
   to --nauta-primary. That was the thing actually worth seeing. */
.form-check-input:checked {
    background-color: var(--nauta-primary);
    border-color: var(--nauta-primary-active);
}

.form-check-input:focus {
    border-color: var(--nauta-accent);
}

/* ---- The notification bell (Boards 640) ----
   Sits beside the account menu and borrows its dropdown mechanics — same overlay to close,
   same panel treatment — because two dropdowns in one bar that behave differently is two
   things to learn for no reason. */
.notif {
    position: relative;
}

/* Boards 741, option C: the bell and its count SIDE BY SIDE in one pill, never one on top
   of the other. On the corner the red disc still covered most of a 16px glyph, and the user
   could barely see the bell at all. Side by side, the bell is whole and the number is
   whole. The pill's edge marks the pair as one control. */
.notif-button {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .6rem;
    border: 1px solid #d9dce8;
    border-radius: 999px;
    background: transparent;
    color: var(--nauta-text);
    cursor: pointer;
}

    .notif-button .k-svg-icon {
        width: 1.15rem;
        height: 1.15rem;
    }

    .notif-button:hover {
        background: #f6f4fc;
    }

    .notif-button:focus-visible {
        outline: 2px solid var(--nauta-accent);
        outline-offset: 1px;
    }

/* The count, not a bare dot: "3 waiting" is actionable, "something is waiting" is a second
   click. Sized to stay round at one digit and legible at three.

   RED, not the brand navy it started as. On navy it came out as a dark circle on a dark
   bell — two shapes that merge into one at the distance anybody actually looks at a top
   bar, so the badge read as part of the icon and the count did not read at all. The red is
   the palette's own (#b32121, already the strong-danger colour) and white on it is 6.8:1.

   Yes, red is louder than "somebody should be assigned to this" deserves. It is used
   anyway, because a notification count is one of the few places where the convention is
   strong enough that departing from it costs comprehension rather than buying calm — and
   because the badge is absent, not grey, in the state we want, which is the real signal. */
.notif-badge {
    /* BESIDE the bell, in the pill's own flow (Boards 741). It sat first INSIDE the button,
       over the glyph, then on its corner, and both times the disc hid the bell: the two
       dark shapes read as one. A badge that never overlaps cannot hide anything. */
    position: static;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 .25rem;
    border-radius: 999px;
    background: #b32121;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.3rem;
    text-align: center;
    /* The ring is the app bar's own background, so the disc keeps its edge against the bell
       whatever is behind it. */
    border: 2px solid var(--nauta-card);
}

.notif-overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
}

.notif-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + .4rem);
    z-index: 1050;
    width: 22rem;
    max-width: calc(100vw - 2rem);
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgb(16 22 58 / 14%);
    overflow: hidden;
}

.notif-header {
    padding: .6rem .85rem;
    font-weight: 650;
    border-bottom: 1px solid var(--nauta-border);
}

.notif-empty {
    margin: 0;
    padding: .9rem .85rem;
    color: var(--nauta-text-muted);
}

.notif-group-title {
    padding: .55rem .85rem .25rem;
    font-size: .8rem;
    color: var(--nauta-text-muted);
}

.notif-list {
    margin: 0;
    padding: 0 .35rem .35rem;
    list-style: none;
    max-height: 17rem;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    padding: .35rem .5rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--nauta-text);
    font-size: .875rem;
}

    .notif-item:hover {
        background: #f6f4fc;
    }

    .notif-item .notif-item-number {
        font-weight: 600;
        color: var(--nauta-primary);
        white-space: nowrap;
    }

    .notif-item .notif-item-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notif-item .notif-item-since {
        margin-left: auto;
        color: var(--nauta-text-muted);
        font-size: .75rem;
        white-space: nowrap;
    }

.notif-more {
    display: block;
    padding: .25rem .85rem .6rem;
    font-size: .8rem;
}

/* The version, and the future home of the release notes. Quiet on purpose: it answers a
   question people ask rarely and should never compete with what is waiting above it. */
.notif-footer {
    padding: .45rem .85rem;
    border-top: 1px solid var(--nauta-border);
    color: var(--nauta-text-muted);
    font-size: .72rem;
}

/* ---- The panel on a phone (Boards 642, but the defect is older) ----

   FOUND BY LOOKING, and it predates the release notes: the panel is 22rem wide and hangs
   from the bell's right edge, but the bell is not at the right edge of a phone - the avatar
   and its chevron are. So 352px of panel started about 65px off the LEFT of a 390px screen
   and the first characters of every line were cut away. max-width: calc(100vw - 2rem) did
   not save it, because the panel was never too wide, only in the wrong place.

   Anchored to the VIEWPORT below lg rather than to the button, which is what the brief for
   this work already assumed it was: a sheet, not a dropdown. */
@media (max-width: 991.98px) {
    .notif-dropdown {
        position: fixed;
        top: 3.6rem;
        left: .5rem;
        right: .5rem;
        width: auto;
        max-width: none;
        /* Scrolls rather than running off the bottom, now that there is a second group
           under the first. */
        max-height: calc(100dvh - 4.6rem);
        overflow-y: auto;
    }
}

/* ---- The panel becomes a drawer, and gains release notes (Boards 642) ----

   THIS IS THE PART THAT ACTUALLY BROKE. The dropdown above is 22rem by about 170px, which
   is right for two waiting missions and useless for two years of releases. On a desk it
   becomes a right-hand slide-over running the full height and scrolling internally:
   attention first, because it is the thing somebody has to act on, releases below it.

   Below lg it is left exactly as it was — a panel a finger's width off the right edge,
   already capped at the viewport. A phone does not need a second layout to learn. */
@media (min-width: 992px) {
    .notif-drawer {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 26rem;
        max-width: 100vw;
        border-radius: 0;
        border-top: 0;
        border-bottom: 0;
        border-right: 0;
        box-shadow: -10px 0 30px rgb(16 22 58 / 14%);
        display: flex;
        flex-direction: column;
        /* Scrolls INSIDE, so the footer keeps the version in view however long the history
           gets — the one line somebody is told to quote when reporting a problem. */
        overflow-y: auto;
    }

        .notif-drawer .notif-header {
            position: sticky;
            top: 0;
            z-index: 1;
            background: var(--nauta-card);
        }

        /* The attention list stops being its own scroll region: with the whole drawer
           scrolling, a box inside a box is two scrollbars and a trap for a trackpad. */
        .notif-drawer .notif-list {
            max-height: none;
            overflow-y: visible;
        }

        .notif-drawer .notif-footer {
            margin-top: auto;
            position: sticky;
            bottom: 0;
            background: var(--nauta-card);
        }
}

/* A card per release. Chip, date, title, one line, and the way in — nothing else, because
   a card that carries more stops being scannable and the page behind it exists. */
.notif-releases {
    border-top: 1px solid var(--nauta-border);
    margin-top: .35rem;
    padding-bottom: .35rem;
}

.notif-release {
    display: block;
    /* Wrapping and the indent are settled in MainLayout.razor.css: its ::deep rule for
       the top bar's links reaches in here and app.css cannot out-rank it. */
    margin: 0 .5rem .5rem;
    padding: .6rem .7rem;
    border: 1px solid var(--nauta-border);
    /* The same accent edge the history rows carry. The two surfaces show the same thing and
       had drifted into two different shapes; one of them had to give, and the drawer's was
       the better half. */
    border-left: 3px solid var(--nauta-accent);
    border-radius: 8px;
    text-decoration: none;
    color: var(--nauta-text);
    transition: box-shadow .12s ease;
}

    .notif-release:hover {
        background: #f6f4fc;
        box-shadow: 0 4px 12px rgb(16 22 58 / 8%);
    }

    .notif-release:hover .notif-release-open {
        text-decoration: underline;
    }

.notif-release-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .3rem;
}

.notif-chip {
    padding: .05rem .4rem;
    border-radius: 999px;
    background: #e7f3ec;
    color: #1d6b3f;
    font-size: .68rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.notif-release-date {
    color: var(--nauta-text-muted);
    font-size: .72rem;
    margin-left: auto;
    /* A date is four words and it was breaking across two lines beside a long
       title. Nothing is gained by wrapping it and a fortnight of releases reads
       as a ragged column when it does. */
    white-space: nowrap;
}

.notif-release-title {
    font-weight: 650;
    font-size: .9rem;
    /* Navy rather than body ink: the title is the one thing on the card worth
       reading first, and it was competing with its own summary. */
    color: var(--nauta-primary);
}

.notif-release-line {
    color: var(--nauta-text-muted);
    font-size: .82rem;
    /* Two lines and then an ellipsis: the card promises a glance, and the page keeps the
       rest. A card that grows with its sentence makes the drawer unscannable. */
    /* The max-height is not belt and braces - it is the belt. -webkit-box is blockified
       in some contexts, and where that happens the clamp is ignored and the card grows to
       whatever the sentence needs; two lines' worth of height holds it either way. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 3.1em;   /* generous: the clamp above draws the ellipsis, this only catches
                            the case where it is ignored, and must not crop what it allows */
    overflow: hidden;
}

.notif-release-open {
    display: inline-block;
    margin-top: .4rem;
    color: var(--nauta-primary);
    font-size: .8rem;
    font-weight: 600;
}

/* A release note is PROSE, and prose needs a measure. Everything else in the portal is a
   table, a card or a form, all of which want the whole screen; a paragraph does not, and at
   1440px this page ran 90-odd characters to the line, which is the width nobody reads. */
.release-note {
    max-width: 48rem;
}

/* ---- The release history, given the drawer's anatomy (Boards 642) ----

   It was a bootstrap card holding an underlined link with the version and date crammed in
   beside it, wrapping mid-date. The drawer next to it already had a shape that works - chip,
   date, title, one line - so the history uses it too rather than inventing a second one.
   Somebody who learns either screen has learned the other.

   THE COLOUR IS THE PRODUCT'S OWN. The reference this was compared against gets its life
   from an orange call-to-action and a flame emoji on every card; that is somebody else's
   voice, and on a surveyor's file it would read as an advertisement. What is borrowed is
   the STRUCTURE - a chip that names the kind, a date that stays put, a title with weight,
   and a way in that looks like one. */
.release-row {
    display: block;
    padding: .9rem 1rem;
    margin-bottom: .75rem;
    background: var(--nauta-card);
    border: 1px solid var(--nauta-border);
    /* The accent edge carries the colour, so the card itself stays quiet. One rule does
       what an orange button was doing in the reference, without shouting. */
    border-left: 3px solid var(--nauta-accent);
    border-radius: 10px;
    text-decoration: none;
    color: var(--nauta-text);
    transition: box-shadow .12s ease, transform .12s ease;
}

    .release-row:hover {
        color: var(--nauta-text);
        box-shadow: 0 6px 18px rgb(16 22 58 / 10%);
        transform: translateY(-1px);
    }

    .release-row:hover .release-row-open {
        text-decoration: underline;
    }

.release-row-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-bottom: .35rem;
}

.release-row-version {
    font-family: var(--bs-font-monospace, monospace);
    font-size: .75rem;
    color: var(--nauta-text-muted);
}

.release-row-date {
    color: var(--nauta-text-muted);
    font-size: .78rem;
    /* Same reason as the drawer's: a date does not wrap. */
    white-space: nowrap;
    margin-left: auto;
}

.release-row-title {
    font-size: 1.05rem;
    font-weight: 650;
    color: var(--nauta-primary);
    line-height: 1.3;
}

.release-row-line {
    color: var(--nauta-text-muted);
    margin-top: .25rem;
}

.release-row-open {
    display: inline-block;
    margin-top: .5rem;
    color: var(--nauta-primary);
    font-size: .85rem;
    font-weight: 600;
}
/* The count beside a port in the map's list. The same violet as the pin it stands for, so
   the list reads as the legend it is rather than as a second, unrelated set of numbers. */
.map-port-count {
    flex-shrink: 0;
    min-width: 1.5rem;
    padding: 0 .4rem;
    border-radius: 999px;
    background: var(--nauta-violet-500);
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.4rem;
    text-align: center;
}
/* The vessel lookup's suggestion card (backlog 52). Deliberately NOT styled as part of the
   form: it is somebody else's data sitting beside the form, and it should look like a quote
   from elsewhere rather than like fields that are already filled in. */
.lookup-card {
    border: 1px solid var(--bs-border-color, #dee2e6);
    border-left: 3px solid var(--nauta-violet-500);
    border-radius: .375rem;
    padding: .625rem .75rem;
    background: #f8f7fd;
}

.lookup-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: .1rem .75rem;
    font-size: .875rem;
}

/* Where it came from and when. Small, but never hidden: this line is the difference between
   a suggestion and a fact, and it is what would have caught a stale MMSI that every
   validation in the product passed. */
.lookup-source {
    margin-top: .4rem;
    font-size: .75rem;
    color: var(--bs-secondary-color, #6c757d);
}

/* The source is a link to the very entry the figures came from, so a figure that looks wrong
   can be checked in one click. That is what earns a third party's name its place on the
   screen; without it the name was only an implementation detail nobody asked for. */
.lookup-source a {
    color: inherit;
    text-decoration: underline;
}

.lookup-warning {
    margin-top: .25rem;
    font-size: .75rem;
    color: #8a6d1f;
}
/* The lookup button sitting ON the IMO box rather than under the hint below it. Beside the
   field it reads as "this is searchable"; on its own line it read as a control for the whole
   form, and the create dialog could be filled by hand without anybody noticing it. */
.lookup-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
}

/* THE BOX KEEPS THE ROOM. A flex item's min-width defaults to its content, but a Telerik
   textbox carries width:100% inline and shrank to "99…" once a button shared the row with
   it. min-width:0 is what lets it be told how wide to be. */
.lookup-field > .k-input,
.lookup-field > .k-textbox {
    /* BASIS ZERO, not auto. With flex-wrap on, a line wraps when the items' BASE sizes do not
       fit — shrinking only happens afterwards, within a line. The textbox's natural base is
       the full column, so the button was pushed onto its own row instead of the box making
       room for it. Base zero lets the box grow into whatever is left. */
    flex: 1 1 0;
    min-width: 0;
}

/* The flex ITEM is this wrapper, not the button inside it — which is why align-self on the
   button did nothing and it sat 10px shorter than the box beside it. */
.lookup-field > .lookup {
    flex: 0 0 auto;
    align-self: stretch;
    display: flex;
}

/* Square-ish, and sized to the box beside it rather than to a number picked here: the
   Telerik input's height is the theme's, and a hard-coded one drifts away from it. */
.lookup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0 .5rem;
    min-width: 2.25rem;
}

.lookup-button.is-busy :is(svg, .k-svg-icon) {
    animation: lookup-spin 1s linear infinite;
}

@keyframes lookup-spin {
    to { transform: rotate(360deg); }
}

/* The card is NOT floated. It was, hanging off the field, and it lost twice: off the side of
   the dialog when left-aligned, and — once anchored inward — below the dialog's own bottom
   edge, because a dialog cannot size to a child that is out of flow. It sits under the row
   now and the dialog grows. */
/* The register's answer, in the field's own hint slot. It is a form-text like the hint it
   replaces; this only marks it as the answer rather than the rules. */
.lookup-nothing {
    color: #8a6d1f;
}

/* What is saved with the ship that this form has no box for. */
.lookup-carried {
    font-size: .8125rem;
    color: var(--bs-secondary-color, #6c757d);
}
/* A particular the register does not know. Faint, because the point is that the eye slides
   over what IS there and stops on what is not. */
.lookup-missing {
    opacity: .55;
}
/* The particulars form's group headings. Small and quiet: they are there to say which boxes
   belong together, which eighteen fields in one column never did. */
.particulars-group {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--nauta-violet-700, #4b3bb5);
    margin: 0 0 .5rem;
    padding-bottom: .25rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

.particulars .row + .particulars-group {
    margin-top: 1.25rem;
}

/* A label carrying its explanation as a tooltip. The three that had paragraphs under them
   cost eight lines of vertical space each and were read once. */
.particulars label[title] {
    cursor: help;
}
/* The particulars sheet on a vessel's page: label above value, so four groups fit abreast in
   a quarter-width column each. The shared .fact-grid puts them side by side, which needs a
   width this layout does not have. */
.particulars .fact-grid {
    display: block;
}

.particulars .fact-grid dt {
    font-size: .75rem;
    font-weight: 500;
    color: var(--bs-secondary-color, #6c757d);
    margin-top: .5rem;
}

.particulars .fact-grid dd {
    margin: 0;
}

.vessel-notes {
    margin-top: 1.5rem;
}
/* A mission's circumstances, under its facts — the same shape a vessel's notes take under
   its particulars, and for the same reason. */
.mission-circumstances {
    margin-top: 1.5rem;
}
/* A client's notes, under its details — the same shape a vessel's notes and a mission's
   circumstances take, and for the same reason. */
.client-notes {
    margin-top: 1.5rem;
}

/* The firm's order of its checklists (2026-10-02): the position, then two small arrows. */
.checklist-order {
    display: inline-flex;
    align-items: center;
    gap: .1rem;
    white-space: nowrap;
}

.checklist-order-number {
    min-width: 1.5rem;
    font-variant-numeric: tabular-nums;
    color: var(--nauta-text-muted);
}

/* The documents a report files (2026-10-02): an ordered list with its arrows, then what is
   left on the mission to add. */
.report-annex-list {
    padding-left: 1.25rem;
    margin-bottom: .5rem;
}

.report-annex-row {
    padding: .2rem 0;
    border-bottom: 1px solid var(--nauta-border);
}

    .report-annex-row > span {
        margin-right: .5rem;
    }

.report-annex-label {
    font-weight: 600;
}

.report-annex-actions {
    white-space: nowrap;
}

.report-annex-available {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

    .report-annex-available li {
        padding: .15rem 0;
    }

/* The report editor's Preview / Discard / Save, pinned under the top bar while the page
   scrolls. Only where the top bar is itself pinned (lg and up); below it the page is one
   column and the bar is one flick away. Under the top bar's z-index, over the cards. */
@media (min-width: 992px) {
    .report-editor-actions {
        position: sticky;
        top: 3.5rem;
        z-index: 1010;
        padding: .5rem 0;
        background: var(--nauta-surface);
        border-bottom: 1px solid var(--nauta-border);
    }
}

/* ---- Space per firm (Boards 739): a row opens in place ---- */
.storage-table .storage-firm {
    display: inline-flex;
    gap: .25rem;
}

.storage-table .storage-caret {
    flex: 0 0 1em;
    color: var(--nauta-text-muted);
}

.storage-table tr.storage-open > td {
    border-bottom-color: transparent;
}

.storage-table tr.storage-detail,
.storage-table tr.storage-detail:hover {
    cursor: default;
    background: #faf9fd;
}

.storage-table tr.storage-detail > td {
    padding: .75rem 1rem 1rem;
}

.storage-table td.text-end,
.storage-table th.text-end {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* ---- Analysis (Boards 739): the headline figures above the charts ---- */
.analysis-tiles {
    display: flex;
    flex-wrap: wrap;
    gap: .625rem;
}

.analysis-tile {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    min-width: 9rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid #e3e6ef;
    border-radius: 10px;
}

.analysis-tile-value {
    font-size: 1.35rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.analysis-tile-label {
    font-size: .8rem;
    color: var(--nauta-text-muted);
}

/* ---- Firm switch (Boards 740): a native disclosure in the top bar ---- */
.firm-switch {
    position: relative;
    margin-left: .5rem;
    font-size: .85rem;
}

    .firm-switch > summary {
        cursor: pointer;
        list-style: none;
        padding: .2rem .55rem;
        border: 1px solid #d9dce8;
        border-radius: 6px;
        color: var(--nauta-text-muted);
        white-space: nowrap;
    }

        .firm-switch > summary::-webkit-details-marker {
            display: none;
        }

        .firm-switch > summary::after {
            content: " ▾";
        }

.firm-switch-menu {
    position: absolute;
    z-index: 1050;
    top: calc(100% + 4px);
    left: 0;
    min-width: 14rem;
    padding: .25rem;
    background: #fff;
    border: 1px solid #d9dce8;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(16, 22, 58, .14);
}

.firm-switch-item {
    display: block;
    width: 100%;
    padding: .4rem .6rem;
    border: 0;
    border-radius: 6px;
    background: none;
    text-align: left;
    color: inherit;
}

    .firm-switch-item:hover:not(:disabled) {
        background: #f3f1fb;
    }

    .firm-switch-item.current {
        font-weight: 600;
        cursor: default;
    }

/* ---- Mission status (Boards 741): labelled, and the value in its own colour ---- */
.mission-status-control {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.mission-status-label {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--nauta-text-muted);
}

.mission-status-control .k-dropdownlist .k-input-value-text .status-badge,
.k-list-item .status-badge {
    font-size: .74rem;
}

.firm-switch > summary .k-svg-icon {
    width: .95rem;
    height: .95rem;
    vertical-align: -2px;
}

/* The service beside the status (Boards 741): the same small label, the value plain. */
.mission-header-fact {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
}

/* ---- Pages before an account: signing up from the website ------------------------------ */
.public-layout { min-height: 100vh; background: var(--bs-body-bg, #f6f8fb); }
.public-header { display: flex; align-items: baseline; gap: .6rem; padding: 1rem 1.5rem; border-bottom: 1px solid #dce3ee; background: #fff; }
.public-brand { font-weight: 800; letter-spacing: .14em; color: #0b1e3f; }
.public-main { padding: 2rem 1rem 4rem; }
.signup { max-width: 760px; margin: 0 auto; }
.signup-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.signup-plan { display: grid; gap: .15rem; padding: .9rem 1rem; border: 1px solid #dce3ee; border-radius: 10px; background: #fff; cursor: pointer; }
.signup-plan input { position: absolute; opacity: 0; pointer-events: none; }
.signup-plan.sel { border-color: #0b1e3f; box-shadow: 0 0 0 1px #0b1e3f; }
.signup-plan:has(input:focus-visible) { outline: 2px solid #2f6fd1; outline-offset: 2px; }
@media (max-width: 640px) { .signup-plans { grid-template-columns: 1fr; } }

.signup-billing { display: inline-flex; border: 1px solid #dce3ee; border-radius: 999px; padding: 3px; background: #fff; gap: 2px; }
.signup-billing-option { padding: .3rem .9rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .9rem; }
.signup-billing-option input { position: absolute; opacity: 0; pointer-events: none; }
.signup-billing-option.sel { background: #0b1e3f; color: #fff; }
.signup-billing-option:has(input:focus-visible) { outline: 2px solid #2f6fd1; outline-offset: 2px; }

/* ---- Services & checklists (backlog 127) ---------------------------------------------
   A service owns its checklists: the list shows each service as a card with its forms in
   order, the service page lists them with arrows beside a drawing of where they go. */

.services-lead { max-width: 52rem; }
.services-group {
    font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--nauta-text-muted); margin: 1.25rem 0 .6rem;
}
.service-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .9rem; }
.service-card {
    display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem;
    background: var(--nauta-card); border: 1px solid var(--nauta-border); border-radius: 12px;
    color: var(--nauta-text); text-decoration: none;
}
.service-card:hover, .service-card:focus-visible { border-color: var(--nauta-accent); color: var(--nauta-text); }
.service-card-top { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.service-card-code { font-size: .75rem; font-weight: 700; color: var(--nauta-primary); }
.service-card-name { font-size: 1rem; font-weight: 600; }
.service-card-forms { margin: 0; padding-left: 1.2rem; font-size: .85rem; display: flex; flex-direction: column; gap: .15rem; }
.service-card-empty { background: var(--nauta-state-warn-bg); border-style: dashed; }
.service-card-warning { font-size: .85rem; color: var(--nauta-state-warn-fg); }
.service-card-retired { opacity: .7; }

.service-layout { display: flex; flex-wrap: wrap; gap: 1.25rem; align-items: flex-start; }
.service-checklists { flex: 3 1 540px; min-width: 0; }
.service-checklists-empty {
    padding: 1rem; border: 1px dashed var(--nauta-border); border-radius: 10px;
    color: var(--nauta-text-muted); font-size: .9rem;
}
.service-checklist-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; }
.service-checklist {
    display: flex; align-items: center; gap: .75rem; padding: .5rem .75rem .5rem .25rem;
    border: 1px solid var(--nauta-border); border-radius: 10px; background: var(--nauta-card);
}
.service-checklist.is-selected { border: 2px solid var(--nauta-accent); background: #f7f5fd; }
.service-checklist-order { display: flex; flex-direction: column; align-items: center; min-width: 2.75rem; }
.service-checklist-order .btn { padding: 0 .5rem; line-height: 1.4; }
.service-checklist-number { font-weight: 700; color: var(--nauta-primary); }
.service-checklist-body {
    flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: .3rem;
    background: none; border: 0; padding: .25rem 0; text-align: left; color: inherit;
}
.service-checklist-name { font-weight: 600; }
.service-checklist-who { font-size: .85rem; color: var(--nauta-text-muted); }
.service-checklist-chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.service-checklist-actions { display: flex; gap: .35rem; flex-wrap: wrap; justify-content: flex-end; }

.chip {
    display: inline-block; font-size: .75rem; padding: .15rem .55rem; border-radius: 999px;
    background: var(--nauta-state-idle-bg); color: var(--nauta-state-idle-fg); text-decoration: none;
}
.chip-blue { background: var(--nauta-state-info-bg); color: var(--nauta-state-info-fg); }
.chip-violet { background: var(--nauta-state-busy-bg); color: var(--nauta-state-busy-fg); }
.chip-amber { background: var(--nauta-state-warn-bg); color: var(--nauta-state-warn-fg); }
a.chip:hover { text-decoration: underline; }

.library-list { display: flex; flex-direction: column; gap: .5rem; max-height: 52vh; overflow-y: auto; }
.library-row {
    display: flex; gap: .75rem; align-items: flex-start; padding: .65rem .8rem; margin: 0;
    border: 1px solid var(--nauta-border); border-radius: 10px; cursor: pointer;
}
.library-row .form-check-input { margin-top: .2rem; flex: 0 0 auto; }
.library-row.is-here { background: var(--nauta-surface); cursor: default; }
.library-row.is-ticked { border: 2px solid var(--nauta-accent); background: #f7f5fd; }
.library-row-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.library-row-name { font-weight: 600; }

/* Where a checklist goes: a phone and a report page drawn from the service's own list. */
.checklist-journey { flex: 2 1 340px; min-width: 0; }
.journey-steps { list-style: none; counter-reset: journey; margin: .75rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 1rem; }
.journey-steps > li { counter-increment: journey; position: relative; padding-left: 2.4rem; display: flex; flex-direction: column; gap: .3rem; }
.journey-steps > li::before {
    content: counter(journey); position: absolute; left: 0; top: 0;
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    background: var(--nauta-primary); color: #fff; font-size: .8rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.journey-step-title { font-weight: 600; }
.journey-step-body { font-size: .85rem; color: var(--nauta-text-muted); }
.journey-phone {
    align-self: center; width: 220px; margin-top: .4rem; border: 8px solid var(--nauta-navy-700);
    border-radius: 26px; background: var(--nauta-surface); overflow: hidden;
    display: flex; flex-direction: column; gap: .3rem; padding-bottom: .5rem;
}
.journey-phone-bar { background: var(--nauta-navy-800); color: #fff; font-size: .72rem; font-weight: 600; padding: .55rem .7rem; }
.journey-phone-row {
    margin: 0 .45rem; padding: .4rem .5rem; font-size: .72rem; background: var(--nauta-card);
    border: 1px solid var(--nauta-border); border-radius: 6px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.journey-phone-row.is-selected, .journey-report-section.is-selected { border-color: var(--nauta-accent); font-weight: 700; }
.journey-report {
    align-self: center; width: 240px; margin-top: .4rem; padding: .8rem .9rem; background: #fff;
    border: 1px solid #d5d9e6; box-shadow: 0 2px 6px rgba(16, 22, 58, .08);
    display: flex; flex-direction: column; gap: .25rem;
}
.journey-report-rule { height: 4px; background: var(--nauta-gradient-rule); margin-bottom: .2rem; }
.journey-report-heading { font-size: .62rem; font-weight: 700; color: var(--nauta-navy-800); text-transform: uppercase; margin-bottom: .2rem; }
.journey-report-section { font-size: .66rem; font-weight: 700; padding: .05rem .25rem; border: 1px solid transparent; margin-top: .2rem; }
.journey-report-section.is-selected { background: var(--nauta-state-busy-bg); color: var(--nauta-state-busy-fg); }
.journey-report-line { height: 4px; background: var(--nauta-state-idle-bg); width: 92%; }
.journey-report-line.is-short { width: 68%; }
.journey-report-tail { font-size: .6rem; color: var(--nauta-text-muted); margin-top: .35rem; }

/* Booking: the service's own checklists are numbered; one unticked is visibly set aside. */
.checklist-place { font-weight: 700; color: var(--nauta-primary); margin-right: .2rem; }
.checklist-unticked .form-check-label { color: var(--nauta-text-muted); }

/* ---- The mission's conversation (BACKLOG #128) ----
   A thread, oldest first: the reader's own lines sit to the right, a firm-only line is
   dashed and warm so a surveyor never wonders whether the client read it, and one red
   rule marks where this reader stopped reading. */
/* The panel (2026-10-29): WhatsApp Web's shape. Its height is set by nautaChat.attach to
   reach the bottom of the window; the calc is only what it starts at. The thread scrolls
   inside, the composer is the panel's last row and never moves. */
.chat {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 14rem);
    min-height: 20rem;
    border: 1px solid var(--nauta-border);
    border-radius: .75rem;
    background: #f0eff4;
    overflow: hidden;
}

.chat-scroll {
    position: relative;
    flex: 1 1 auto;
    overflow-y: auto;
    padding: .9rem 1.1rem;
}

.chat-notice {
    margin: 0 auto .9rem;
    max-width: 52rem;
    font-size: .78rem;
    color: var(--nauta-text-muted);
    text-align: center;
}

.chat-composer {
    flex-shrink: 0;
    padding: .6rem .9rem .7rem;
    border-top: 1px solid var(--nauta-border);
    background: var(--nauta-card);
}

.chat-audience {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .75rem;
    margin-bottom: .45rem;
}

    .chat-audience .msg-audience-switch {
        margin-bottom: 0;
    }

.chat-audience-hint {
    font-size: .78rem;
    color: var(--nauta-text-muted);
}

.chat-input-row {
    display: flex;
    align-items: flex-end;
    gap: .6rem;
}

    /* Grows with what is typed, up to about six lines, then scrolls; browsers without
       field-sizing keep the minimum and scroll sooner. */
    .chat-input-row textarea {
        flex: 1 1 auto;
        min-height: 2.5rem;
        max-height: 9rem;
        padding: .55rem 1rem;
        border-radius: 1.25rem;
        resize: none;
        field-sizing: content;
    }

.chat-send {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 0;
    border-radius: 50%;
    background: #534ab7;
    color: #fff;
    cursor: pointer;
}

    .chat-send:hover:not(:disabled) {
        background: #3c3489;
    }

    .chat-send:disabled {
        background: #cecbf6;
        cursor: default;
    }

    .chat-send .k-svg-icon {
        width: 1.1rem;
        height: 1.1rem;
    }

.chat-readonly {
    flex-shrink: 0;
    padding: .65rem 1rem;
    border-top: 1px solid var(--nauta-border);
    background: var(--nauta-card);
    color: var(--nauta-text-muted);
    font-size: .85rem;
}

.thread {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

/* Bubbles, as in WhatsApp: everybody else's on the left in white, the reader's own on the
   right in the brand's lilac, a squared corner pointing at who said it. The time sits small
   in the bubble's foot; the author's name only on lines that are not the reader's. */
.msg {
    align-self: flex-start;
    max-width: min(40rem, 70%);
    padding: .4rem .7rem .3rem;
    border-radius: .85rem .85rem .85rem .25rem;
    background: #fff;
    box-shadow: 0 1px 1px rgb(16 22 58 / 6%);
}

.msg-mine {
    align-self: flex-end;
    border-radius: .85rem .85rem .25rem .85rem;
    background: #eeedfe;
    color: #26215c;
}

.msg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3rem;
    margin-bottom: .1rem;
    font-size: .78rem;
}

.msg-author {
    font-weight: 600;
    color: #0f6e56;
}

.msg-party {
    color: var(--nauta-text-muted);
}

.msg-when {
    margin-top: .1rem;
    text-align: right;
    font-size: .7rem;
    color: var(--nauta-text-muted);
    font-variant-numeric: tabular-nums;
}

.msg-mine .msg-when {
    color: #534ab7;
}

.msg-body {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Where the reader stopped: a pill in the middle of the thread, not a red rule across it. */
.thread-unread-line {
    display: flex;
    justify-content: center;
    margin: .5rem 0;
}

    .thread-unread-line span {
        padding: .2rem .8rem;
        border-radius: 999px;
        background: #fff;
        color: #534ab7;
        font-size: .75rem;
        font-weight: 600;
        box-shadow: 0 1px 1px rgb(16 22 58 / 6%);
    }

/* ---- Two conversations (2026-10-29) ----
   "With the client" and "Internal" as underlined tabs at the top of the panel. The internal
   one carries a padlock, on its tab and above its box; the bubbles look the same in both,
   so the reader's eye is drawn to the padlock and the line that names who reads. */
.chat-channels {
    display: flex;
    gap: .25rem;
    flex-shrink: 0;
    padding: 0 .75rem;
    border-bottom: 1px solid var(--nauta-border);
    background: var(--nauta-card);
}

.chat-channel {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem .8rem .5rem;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--nauta-text-muted);
    font-weight: 600;
    font-size: .9rem;
    cursor: pointer;
}

    .chat-channel:hover {
        color: var(--nauta-text);
    }

    .chat-channel.active {
        border-bottom-color: #534ab7;
        color: var(--nauta-navy-800);
    }

    .chat-channel .k-svg-icon {
        width: .95rem;
        height: .95rem;
    }

    .chat-channel .unread-badge {
        margin-left: 0;
    }

/* Who reads what is typed below it, with a padlock in the internal conversation and the
   people icon in the client's. */
.chat-to {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-bottom: .45rem;
    font-size: .8rem;
    color: var(--nauta-text-muted);
}

    .chat-to .k-svg-icon {
        width: .9rem;
        height: .9rem;
        flex-shrink: 0;
    }

.chat-internal .chat-to {
    color: #3c3489;
    font-weight: 600;
}

/* ---- The speech bubble (BACKLOG #128) ----
   The bell's pill and dropdown, with a drawn bubble in place of the bell: two controls side
   by side that open the same way. The count sits BESIDE the glyph for the bell's reason. */
.msgbell-icon {
    width: 1.2rem;
    height: 1.2rem;
}

.msgbell-dropdown .unread-badge {
    margin-left: 0;
}

/* A line of the bubble's list: mission and ship above, conversation and time below, the
   count at the right — the ship's name gets the whole width of the first line. */
.msgbell-item {
    align-items: center;
    padding: .45rem .5rem;
}

.msgbell-item-main {
    display: flex;
    flex-direction: column;
    gap: .15rem;
    flex: 1 1 auto;
    min-width: 0;
}

.msgbell-item-title {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    min-width: 0;
}

.msgbell-item-vessel {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.msgbell-item-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.msgbell-item-since {
    color: var(--nauta-text-muted);
    font-size: .75rem;
    white-space: nowrap;
}

/* Which conversation the waiting lines are in, in that conversation's own colours. */
.msgbell-channel {
    flex-shrink: 0;
    padding: .05em .5em;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 700;
    white-space: nowrap;
}

    .msgbell-channel.client {
        background: #f1efe8;
        color: #444441;
    }

    .msgbell-channel.internal {
        background: #eeedfe;
        color: #3c3489;
    }

    .msgbell-channel .k-svg-icon {
        width: .7rem;
        height: .7rem;
        vertical-align: -1px;
    }

/* Unread lines on a mission, in the speech bubble's list. */
.unread-badge {
    display: inline-block;
    margin-left: .4rem;
    padding: .05em .45em;
    border-radius: 10px;
    background: #8f1d1d;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    vertical-align: middle;
}
