﻿.site-banner {
    border: 2px solid #1bb99a !important;
    background-color: rgba(27, 185, 154) !important;
    padding: 10px;
    color: #FFF;
    position: sticky;
    top: 0px;
    z-index: 1000;
}

footer.footer .site-banner {
    margin: -21px -15px;
    padding-left: 25px;
    font-size: 1rem;
}

footer.footer .container-fluid {
    margin-top: 25px;
}

a.disabled {
    color: #495057;
    opacity: 0.65;
    cursor: default;
}

.edit-column, .delete-column {
    width: 39px;
}

div.templateWrapper {
    text-align: center;
    border-bottom: #a4172a 15px solid;
}

table.templateTable {
    margin: 0 auto;
    padding: 0 0;
    border-collapse: collapse;
    width: 100%;
}

    table.templateTable tr td.topBanner {
        background: url(../../Images/header_bg.gif) repeat-x top left;
        vertical-align: bottom;
    }

    table.templateTable tr td.contentCell {
        width: 33%;
    }

td.contentCell {
    width: 1043px !important;
}

table.contentTable {
    border-collapse: collapse;
    width: 1043px;
    margin: 0 0;
    padding: 0 0;
}

    table.templateTable tr td,
    table.contentTable tr td {
        margin: 0 0;
        padding: 0 0;
    }

        table.contentTable tr td.headerImage {
            background: url(../../Images/header_logo.gif) no-repeat top left;
            height: 88px;
            width: 1043px;
        }

        table.contentTable tr td.leftMenu {
            background-color: #ffffff;
            background-image: url(../../Images/left_menu_bg.gif);
            background-repeat: repeat-y;
            background-position: top left;
            width: 268px;
            vertical-align: top;
            text-align: left;
        }

            table.contentTable tr td.leftMenu div.leftMenuWrapper {
                padding-left: 20px;
                padding-top: 20px;
            }

        table.contentTable tr td.leftMenuBottom {
            background: url(../../Images/left_menu_bg.gif) repeat-y top left;
            width: 268px;
            vertical-align: bottom;
        }

            table.contentTable tr td.leftMenuBottom div {
                background: url(../../Images/thamer_logo.gif) no-repeat bottom left;
                width: 268px;
                height: 73px;
                vertical-align: bottom;
            }

        table.contentTable tr td.contentPanel {
            background-color: #ffffff;
            background-image: url(../../Images/content_bg.gif);
            background-repeat: repeat-y;
            background-position: top left;
            width: 775px;
            text-align: left;
            vertical-align: top;
            padding-left: 10px;
            padding-right: 15px;
        }

            table.contentTable tr td.contentPanel div.contentWrapper {
                min-height: 800px;
                max-width: 750px;
            }

        table.contentTable tr td.contentFooter {
            background: #000000 url(../../Images/content_footer.gif) no-repeat top left;
            width: 1043px;
            height: 5px;
        }

td.footer, div.footerTop {
    background-color: #000000;
}

td.footer {
    text-align: left;
    color: #ffffff;
}

div.footerTop {
    height: 82px;
}

td.footer div.copyright {
    padding-left: 270px;
    margin-bottom: 15px;
}

div.divider {
    background: url(../../Images/dot.gif) repeat-x top left;
}

header, footer, hgroup,
nav, section {
    display: block;
}

mark {
    background-color: #a6dbed;
    padding-left: 5px;
    padding-right: 5px;
}

hgroup.title {
    display: block;
    padding-top: 10px;
    margin-bottom: 50px;
}

h1, h2, h3,
h4, h5, h6 {
    color: #000;
    margin-bottom: 0;
    padding-bottom: 0;
}

h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.75em;
}

h3 {
    font-size: 1.2em;
}

h4 {
    font-size: 1.1em;
}

h5, h6 {
    font-size: 1em;
}

    h5 a:link, h5 a:visited, h5 a:active {
        padding: 0;
        text-decoration: none;
    }


/* main layout
----------------------------------------------------------*/
.content-wrapper {
    margin: 0 auto;
    max-width: 960px;
}

#body {
    background-color: #efeeef;
    clear: both;
    padding-bottom: 35px;
}

footer {
    clear: both;
    background-color: #e2e2e2;
    font-size: .9em;
    height: 100px;
}

/* forms */
fieldset {
    border: none;
    margin: 0;
    padding: 0;
}

    fieldset legend {
        display: none;
    }

    fieldset ol {
        padding: 0;
        list-style: none;
    }

        fieldset ol li {
            padding-bottom: 5px;
        }

label.checkbox {
    display: inline;
}

label.required {
    background: transparent url(../../Images/icons/required.png) no-repeat 0px;
    padding-left: 14px;
    color: #b94a48;
    white-space: nowrap;
}

input[type="text"],
input[type="password"],
textarea,
select {
    border: 1px solid #e2e2e2;
    background: #fff;
    color: #333;
    margin: 0 0 0 0;
    padding: 4px 6px;
}

.ui-datepicker-trigger {
    vertical-align: middle;
    padding-left: 2px;
    cursor: pointer;
}

.datePickerInput {
    width: 100px !important;
    display: inline-block;
}

textarea {
    font-family: inherit;
    width: 500px;
    resize: none;
    overflow-y: scroll;
}

    input:focus, textarea:focus, select:focus {
        border: 1px solid #64b0f2;
        -webkit-box-shadow: 0 0 0 1px #64b0f2;
        box-shadow: 0 0 0 1px #64b0f2;
    }

select:focus-visible {
    outline: none;
}

/* Undoes the portal's generic text-input styling for native checkboxes.
   Bootstrap 5's .form-check-input is excluded because it is not a native
   checkbox any more - it paints its own border, its tick from a background
   image, and sizes itself to 1em. This selector's specificity (0,1,1)
   outranks .form-check-input (0,1,0), so without the :not() it strips all
   three: `border: inherit` and `background: transparent` erase the box and
   the tick, and `width: auto` collapses a floated appearance:none control
   to zero width, leaving the checkbox invisible. */
input[type="checkbox"]:not(.form-check-input) {
    background: transparent;
    border: inherit;
    width: auto;
}

/* info and errors */
.message-info {
    border: 1px solid;
    clear: both;
    padding: 10px 20px;
}

.message-error {
    clear: both;
    color: #e80c4d;
    font-size: 1.1em;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

.alert-success {
    font-weight: bold;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.alert-error {
    background-image: -webkit-linear-gradient(top,#f2dede 0%,#e7c3c3 100%);
    background-image: -o-linear-gradient(top,#f2dede 0%,#e7c3c3 100%);
    background-image: -webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));
    background-image: linear-gradient(to bottom,#f2dede 0%,#e7c3c3 100%);
    filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede',endColorstr='#ffe7c3c3',GradientType=0);
    background-repeat: repeat-x;
    border-color: #dca7a7;
    color: #b94a48;
}

.alert-success span {
    background: url(../../Images/icons/tick.png) no-repeat 0 0;
    padding-left: 25px;
}

.alert-error h4,
.validation-summary-errors span {
    margin-top: 2px;
    color: #b94a48;
    font-size: 1em;
}

    .alert-error h4 .fa-exclamation-circle {
        margin-right: 3px;
    }

.alert-error ul li {
    word-wrap: break-word;
    max-width: 100%;
}

.message-success {
    color: #7ac0da;
    font-size: 1.3em;
    font-weight: bold;
    margin: 20px 0 10px 0;
}

.error {
    color: #e80c4d;
}

.field-validation-error {
    color: #e80c4d;
    font-weight: bold;
}

.field-validation-valid {
    display: none;
}

span.input-validation-error,
input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error,
.ts-control.input-validation-error,
.field-input.input-validation-error {
    border: 1px solid #e80c4d !important;
}

input[type="checkbox"].input-validation-error {
    border: 0 none;
}

.validation-summary-errors {
    color: #b94a48;
}

    .validation-summary-errors span {
        font-size: 14px;
        font-weight: bold;
        display: block;
        margin-bottom: 10px;
        padding-bottom: 3px;
    }

.validation-summary-valid {
    display: none;
}

.dialogError {
    padding-bottom: 0 !important;
}


/* tables
----------------------------------------------------------*/
table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 0 0 0 0;
    border: 0 none;
}

th {
    font-size: 1.2em;
    text-align: left;
    border: none 0px;
    padding-left: 0;
}

    th a {
        display: block;
        position: relative;
    }

        th a:link, th a:visited, th a:active, th a:hover {
            color: #333;
            font-weight: 600;
            text-decoration: none;
            padding: 0;
        }

        th a:hover {
            color: #000;
        }

    th.asc a, th.desc a {
        margin-right: .75em;
    }

        th.asc a:after, th.desc a:after {
            display: block;
            position: absolute;
            right: 0em;
            top: 0;
            font-size: 0.75em;
        }

        th.asc a:after {
            content: '▲';
        }

        th.desc a:after {
            content: '▼';
        }

table.contentTable tr td.contentPanel table tr td {
    padding: 3px 3px;
    margin: 0 0 0 0;
    border: 0 none;
}

div.buttonBar {
    margin-top: 25px;
    padding-top: 25px;
    text-align: center;
}

/* GRID STYLES */
div.DataGrid > table {
    border-left: 1px solid #d9d9d9;
    border-right: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    width: 100%;

    /* Alternating row shading. Bootstrap's own default for
       --bs-table-striped-bg is rgba(0, 0, 0, 0.05), which is what v2 shipped and
       what the portal has always shown; Uplon v3 overrides it at :root with
       rgba(var(--bs-light-rgb), 0.45) - 45% of #f8f9fa, itself an almost-white
       grey. Over a white row that resolves to about rgb(252, 252, 253): roughly a
       2/255 step, which is not a stripe anyone can see. Bootstrap's value is a
       13/255 step, and over white it is exactly the #F2F2F2 that the Barges grid
       below already hardcodes for its sticky columns - so the two agree rather
       than compete.

       Set on the grid table rather than at :root so this is scoped to grids: it
       deliberately leaves table.stowplan alone, whose rows are tinted by cargo
       state (--rmg-planned / --rmg-loaded / --rmg-neutral) and must not have a
       stripe laid over that coding. */
    --bs-table-striped-bg: rgba(0, 0, 0, 0.05);
}

    /* Grid headers read as a distinct band rather than blending into the rows
       below, using the same treatment across every grid including the Stow Plan
       (`table.stowplan > tr.header-row` in VesselLoading/shared.css).

       This was #337ab7 - Bootstrap 3's primary. The theme's primary is #64b0f2,
       a far lighter and airier blue, so the two sat together as unrelated blues
       from different eras rather than as one palette. --rmg-hull keeps the theme
       primary's hue family (~209deg) and takes it down in lightness and
       saturation, so it reads as the brand blue in shadow. White on it measures
       8.4:1, comfortably past AA. */
    div.DataGrid > table > thead > tr,
    div.DataGrid > table > thead > tr > td > a {
        color: #ffffff;
        background-color: var(--rmg-hull, #337ab7);
        border-color: var(--rmg-hull-edge, #2e6da4);
        border-bottom: 2px solid var(--rmg-hull-edge, #2e6da4);
        font-weight: 400;
    }

    /* Bootstrap 5 applies `color` to every cell directly:
           .table > :not(caption) > * > * { color: var(--bs-table-color…) }
       A colour set ON the cell always beats one inherited from the row, so the
       white above never reached the header text and it rendered dark on the
       blue band. Set it on the cells themselves — this selector outranks
       Bootstrap's, and the sort buttons keep inheriting via `color: inherit`.
       The variable is set too so any Bootstrap state variant resolves white
       rather than falling back to the default table colour.

       `.header-edit` is excluded deliberately: that is the inline filter row,
       which sits on a light green background and needs dark text. */
    div.DataGrid > table > thead > tr:not(.header-edit) > td {
        --bs-table-color: #ffffff;
        color: #ffffff;
    }

    /* UI.Grid (>= .127) renders sortable column headers as a
       <button class="grid-sort-button"> instead of an <a> (for a11y:
       role="columnheader" / aria-sort). The old "thead td > a" styling no
       longer matches, so the buttons fall back to native chrome (a 2px outset
       border box). Reset them to read as plain, left-aligned header text. */
    .DataGrid .grid-sort-button {
        padding: 0;
        border: 0;
        background: transparent;
        font: inherit;
        /* Inherit the header row's white so the sortable columns match the
           non-sortable ones; a fixed colour here would leave dark text on the
           blue band. */
        color: inherit;
        cursor: pointer;
        text-align: inherit;
    }

        .DataGrid .grid-sort-button:hover {
            text-decoration: underline;
        }

.DataGrid > table > thead > tr > td,
.DataGrid > table > tbody > tr > td {
    position: relative;
}

.DataGrid.Editable > table > thead > tr > td {
    padding: 0.55rem 0.15rem;
}

.DataGrid.Editable > table > thead > tr.header-edit > td {
    background-color: #d4edda;
    padding: 0.18rem !important;
}

.DataGrid.Editable > table > thead > tr.header-edit > td,
.DataGrid.Editable > table > tbody > tr.edit-mode > td {
    vertical-align: middle;
    padding: 0 0.15rem;
}

    .DataGrid.Editable > table > thead > tr.header-edit > td > .form-control.ts-wrapper,
    .DataGrid.Editable > table > tbody > tr.edit-mode > td > .form-control.ts-wrapper {
        margin-top: 5px;
    }

        .DataGrid.Editable > table > thead > tr.header-edit > td > .form-control.ts-wrapper > .ts-control,
        .DataGrid.Editable > table > tbody > tr.edit-mode > td > .form-control.ts-wrapper > .ts-control {
            padding-top: 6px;
            padding-bottom: 6px;
        }

    .DataGrid.Editable > table > thead > tr.header-edit > td > .field-caret,
    .DataGrid.Editable > table > tbody > tr.edit-mode > td > .field-caret {
        position: absolute;
        top: 20%;
        right: 8px;
    }

        .DataGrid.Editable > table > thead > tr.header-edit > td > .field-caret > svg,
        .DataGrid.Editable > table > tbody > tr.edit-mode > td > .field-caret > svg {
            vertical-align: bottom;
        }

.DataGrid > table > thead > tr > td > .button-container,
.DataGrid > table > tbody > tr > td > .button-container {
    position: absolute;
    top: -22px;
    right: 8px;
    margin-top: 0;
}

    .DataGrid > table > thead > tr > td > .button-container > button,
    .DataGrid > table > tbody > tr > td > .button-container > button {
        height: 27px;
        width: 27px;
        font-size: 11px;
        margin-right: 2px;
        border: 1px #ccc solid;
        opacity: 0.75;
    }

div.DataGrid > table > tfoot > tr {
    background-color: #ddd;
    border-left: #ccc 1px solid;
    border-right: #ccc 1px solid;
    border-top: #ccc 1px solid;
    border-bottom: #ccc 1px solid;
}

    div.DataGrid > table > tfoot > tr > td {
        padding: 5px 5px;
        text-align: right;
        font-weight: bold;
        color: #696969;
    }

span.LoadGridText {
    display: block;
    text-align: center;
    margin: 0 0;
    padding: 30px 0 15px 0;
    background: url(../../Images/ajax-loader.gif) no-repeat center 15px;
}

/* LOGIN HEADER */
section.loginHeader {
    padding-top: 10px;
}

    section.loginHeader div.loginLink {
        padding-right: 5px;
        color: white;
    }

/* LEFT MENU BAR */
.left-menu-nav,
.left-menu-sub-nav {
    background-color: #ffffff;
    margin: 0px 0px 0px !important;
    padding: 0px !important;
    border-radius: 6px;
    width: 230px;
    box-shadow: 0px 1px 4px rgba(0,0,0,0.065);
    -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, .065);
    -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, .065);
    -moz-border-radius: 6px;
    -webkit-border-radius: 6px;
}

    .left-menu-nav > li > a,
    .left-menu-sub-nav > li > a {
        margin: 0 0 !important;
        padding: 8px 8px !important;
        border-left: 1px solid rgb(229, 229, 229);
        border-top: 1px solid rgb(229, 229, 229);
        border-right: 1px solid rgb(229, 229, 229);
        border-bottom: 0;
        width: 214px;
        display: block;
        color: #A4172A;
    }

    .left-menu-sub-nav > li > a {
        padding-left: 20px !important;
        width: 202px;
    }

    .left-menu-nav > li:first-child > a {
        border-radius: 6px 6px 0px 0px;
        -moz-border-radius: 6px 6px 0 0;
        -webkit-border-radius: 6px 6px 0 0;
    }

    .left-menu-nav > li:last-child > a {
        border-radius: 0px 0px 6px 6px;
        -moz-border-radius: 0 0 6px 6px;
        -webkit-border-radius: 0 0 6px 6px;
    }

    .left-menu-nav > .active > a,
    .left-menu-sub-nav > .active > a {
        padding: 9px 15px;
        border: 0px currentColor;
        position: relative;
        z-index: 2;
        box-shadow: inset 1px 0px 0px rgba(0,0,0,0.1), inset -1px 0px 0px rgba(0,0,0,0.1);
        text-shadow: 0px 1px 0px rgba(0,0,0,0.15);
        -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1), inset -1px 0 0 rgba(0, 0, 0, .1);
        -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, .1), inset -1px 0 0 rgba(0, 0, 0, .1);
    }

    .left-menu-nav .icon-chevron-right,
    .left-menu-nav .icon-chevron-down,
    .left-menu-sub-nav .icon-chevron-right,
    .left-menu-sub-nav .icon-chevron-down {
        margin-top: 2px;
        margin-right: -6px;
        float: right;
        opacity: 0.25;
    }

    .left-menu-nav > li > a:hover,
    .left-menu-sub-nav > li > a:hover {
        background-color: rgb(245, 245, 245);
    }

    .left-menu-nav a:hover .icon-chevron-right,
    .left-menu-sub-nav a:hover .icon-chevron-right,
    .left-menu-nav a:hover .icon-chevron-down,
    .left-menu-sub-nav a:hover .icon-chevron-down {
        opacity: 0.5;
    }

    .left-menu-nav .active .icon-chevron-right,
    .left-menu-sub-nav .active .icon-chevron-right,
    .left-menu-nav .active .icon-chevron-down,
    .left-menu-sub-nav .active .icon-chevron-down {
        opacity: 1;
        background-image: url("../content/bootstrap/img/glyphicons-halflings-white.png");
    }

    .left-menu-nav .active a:hover .icon-chevron-right,
    .left-menu-sub-nav .active a:hover .icon-chevron-right,
    .left-menu-nav .active a:hover .icon-chevron-down,
    .left-menu-sub-nav .active a:hover .icon-chevron-down {
        opacity: 1;
        background-image: url("../content/bootstrap/img/glyphicons-halflings-white.png");
    }

span.WaitDialog {
    background: #ffffff url('../../Images/ajax-loader2.gif') no-repeat 3px 18px;
    padding-left: 25px;
    padding-top: 20px;
    padding-bottom: 20px;
    display: inline-block;
    font-weight: bold;
}

td.contentPanel {
    padding-top: 20px !important;
}

table.PasswordStrengthWrapper {
    margin-left: 10px;
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
}

    table.PasswordStrengthWrapper tbody tr td {
        margin: 0 !important;
        padding: 0 !important;
    }

div.PasswordStrengthFrame,
div.PasswordStrengthScore,
div.PasswordStrengthVeryWeak,
div.PasswordStrengthWeak,
div.PasswordStrengthGood,
div.PasswordStrengthStrong,
div.PasswordStrengthVeryStrong {
    height: 15px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

div.PasswordStrengthScore {
    text-align: center;
    width: 100%;
    z-index: 2;
}

div.PasswordStrengthVeryWeak {
    background-color: #d9534f;
}

div.PasswordStrengthWeak {
    background-color: #f0ad4e;
}

div.PasswordStrengthGood,
div.PasswordStrengthStrong,
div.PasswordStrengthVeryStrong {
    background-color: #d6e9c6;
}

div.PasswordStrengthContainer,
div.PasswordStrengthFrame {
    width: 75px;
}

div.PasswordStrengthFrame {
    border-left: 1px #999999 solid;
    border-top: 1px #999999 solid;
    border-right: 1px #999999 solid;
    border-bottom: 1px #999999 solid;
    position: relative;
}

td.PasswordStrengthText {
    text-align: center;
    padding-top: 0 !important;
    padding-bottom: 2px !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
}

.alert-error a {
    color: #3a87ad;
}

div.GridPager {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

div.GridPager > span {
    display: inline-block;
    text-align: left;
}

    div.GridPager > span > span {
        float: left;
        line-height: 32px;
    }

        div.GridPager > span > span.row-count {
            padding-left: 10px;
            vertical-align: middle;
            line-height: 32px;
        }

div.GridPager > nav {
    margin-left: auto;
}

/* Pin the grid pager to the horizontal scroll viewport. The .DataGrid container
   is the horizontal scroll element, and the framework renders .GridPager as a
   block child of it — so by default the pager is anchored at the table's content
   origin (content-space left:0) and slides leftward, "floating" mid-grid, as the
   user scrolls right. A block child of an overflow-x:auto box is only as wide as
   the viewport (not the scroll width), so sticky left:0 keeps the pager's left
   edge at the scrollport: the right-aligned nav stays pinned right and the
   row-count stays left, at any horizontal scroll position. Harmless (no-op) for
   grids that don't scroll horizontally. */
.DataGrid > div.GridPager {
    position: sticky;
    left: 0;
}

i.icon-sort-up {
    width: 12px;
    height: 12px;
    background: url(../../Images/icons/up_arrow_small.png);
    display: inline-block;
}

i.icon-sort-down {
    width: 12px;
    height: 12px;
    background: url(../../Images/icons/down_arrow_small.png);
    display: inline-block;
}

td.FieldLabel {
    text-align: right;
    padding-right: 5px;
}

label.checkbox span {
    display: inline-block;
    padding-top: 2px;
}

    label.checkbox span.checkbox-wrapper {
        padding: 0;
        margin-right: 3px;
    }

.break-text {
    overflow-wrap: break-word;
    word-wrap: break-word;
    -ms-word-break: break-all;
    word-break: break-all;
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.nav-icon {
    opacity: 0.35;
    margin-right: 5px !important;
    color: #000000;
    min-width: 16px;
    font-size: 14.4px;
}

    .nav-icon.fa {
        font-size: 1.25em;
        padding-left: 2px;
    }

.nav-link.active .nav-icon {
    opacity: 0.75;
}

.nav-tabs a.nav-link.active {
    color: #64b0f2 !important;
}

.nav-tabs .nav-link.active .nav-icon {
    color: #64b0f2;
}

/* Tab and pill labels. v3 inherits Bootstrap's own .nav-link weight, which
   reads heavier than the rest of the portal's chrome - the sidebar links are
   already pulled back to 400 below. Match them so tabs and the menu agree. */
.nav-pills > li > a,
.nav-tabs > li > a {
    font-weight: 400;
}

ul.breadcrumb li {
    vertical-align: middle;
}

    ul.breadcrumb li i {
        opacity: 0.5;
        margin-top: -1px;
        padding-right: 5px;
    }

        ul.breadcrumb li i.fa {
            font-size: 14px;
        }

.breadcrumb-item .svg-inline--fa {
    width: 20px;
}

.DataGrid {
    margin-top: 20px;
}

div.NoPermission span {
    padding-left: 5px;
}

.status-text {
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    padding: 10px 10px;
    width: 260px;
    border-width: 2px;
    border-style: solid;
    margin: 5px 5px;
    float: right;
}

.headerText {
    font-size: 16px;
    font-weight: bold;
    padding-bottom: 10px;
}

.headerText-padding {
    padding-top: 5px;
}

.no-bottom-padding {
    padding-bottom: 0;
}

.search-text {
    width: 643px;
}

.panel .search-text {
    width: 616px;
}

#wrapperTable tr td {
    padding-left: 0;
    padding-top: 0;
}

.fieldLabelCell {
    text-align: right;
}

.datepicker {
    width: 75px;
}

/* PROGRESS BARS */
div.ProgressText {
    padding-bottom: 10px;
    text-align: center;
    font-size: 0.9em;
}

div.ProgressDialog {
    height: 80px;
    padding: 10px 10px 40px;
    border-bottom-left-radius: 0 !important;
    border-bottom-top-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-bottom-radius: 0 !important;
}

.ui-progressbar-value {
    padding-top: 7px;
    text-align: center;
}

.user-top-label {
    padding-left: 3px;
    padding-right: 3px;
    text-shadow: none;
    color: #ffffff;
}

.user-top-caret {
    border-top-color: #ffffff;
    border-bottom-color: #ffffff;
}

.no-padding {
    padding: 0 0 !important;
}

.no-margin {
    margin: 0 0 !important;
}

table.no-padding tr td {
    padding: 0 0 !important;
}

table.no-margin tr td {
    margin: 0 0 !important;
}

.panel-heading > i,
.panel-heading > .headerText > i {
    margin-top: 3px;
}

.menu-expanded {
    background-color: #f5f5f5;
}

.DataGrid .btn-link {
    font-family: Verdana, ​ Helvetica, ​ sans-serif;
    background-color: transparent;
    margin: 0 !important;
    padding: 0 !important;
    border-width: 0 !important;
}

    .DataGrid .btn-link.disabled {
        color: #A9A9A9;
        margin-top: -3px !important;
    }

#SessionTimeout .modal-header {
    text-align: left !important;
}

.left-label {
    text-align: right;
    padding-right: 5px;
}

.tooltip-wrapper {
    display: inline-block;
}

    .tooltip-wrapper .btn[disabled] {
        pointer-events: none;
    }

    .tooltip-wrapper.disabled {
        cursor: not-allowed;
    }

.btn > i {
    margin-right: 5px;
}

.btn-link.disabled {
    background-color: transparent !important;
}

.btn-link > i.fa {
    font-size: 12px !important;
}

.portal-list {
    padding-top: 10px;
    margin-left: 380px;
    float: left;
}

    .portal-list .left-label {
        padding-right: 5px;
        text-align: right;
        color: #ffffff;
    }

#ddPortalList {
    width: 375px;
}

.select-column {
    width: 37px;
    text-align: center !important;
}

.DataGrid > table > tbody > tr > td.icon-column {
    width: 25px;
    padding-left: 7px;
    padding-right: 7px;
}

.page-size > select {
    width: 60px !important;
}

#PasswordStrength {
    position: absolute;
    right: 6px;
    top: 2px;
    font-size: .85714em;
}

div.PasswordStrengthFrame {
    border-left: 1px #d9d9d9 solid !important;
    border-top: 1px #d9d9d9 solid !important;
    border-right: 1px #d9d9d9 solid !important;
    border-bottom: 1px #d9d9d9 solid !important;
}

input[type="text"][readonly], textarea[readonly] {
    background-color: #eee;
}

.card-body {
    border-left: #d9d9d9 1px solid;
    border-right: #d9d9d9 1px solid;
    border-top: #d9d9d9 1px solid;
    border-bottom: #d9d9d9 1px solid;
}

.dropdown-item svg {
    margin-right: 5px;
}

.tab-content {
    background: #fff;
    border-left: #efefef 1px solid;
    border-right: #efefef 1px solid;
    border-bottom: #efefef 1px solid;
    padding: 25px 15px;
}

.button-divider {
    margin-top: 25px;
    padding-top: 25px;
    text-align: center;
}

.hidden {
    display: none;
}

select[disabled] {
    background-color: #eee;
}

.authentication-bg .application-version {
    text-align: center;
    margin-top: 2em;
}

.bg-theme {
    background-color: #2b3d51;
}

.divider-vertical {
    margin: 0 9px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.move-list {
    height: 200px;
}

    .move-list > table {
        width: 100%;
        height: 100%;
    }

    .move-list > tbody > tr > td > div {
        height: 100%;
    }

    .move-list > tbody > tr > td.list-container {
        width: 50%;
    }

        .move-list > tbody > tr > td.list-container > div > select {
            height: 100%;
            width: 100%;
            min-width: 100%;
        }

    .move-list > tbody > tr > td.add-remove-buttons,
    .move-list > tbody > tr > td.up-down-buttons {
        vertical-align: middle;
        padding: 10px 10px;
        display: block;
    }

        .move-list > tbody > tr > td.add-remove-buttons > button {
            display: block;
            width: 110px;
            margin-bottom: 5px;
        }

        .move-list > tbody > tr > td.up-down-buttons > button {
            margin-bottom: 5px;
        }

        .move-list > tbody > tr > td.add-remove-buttons > button > span {
            display: inline-block;
        }

            .move-list > tbody > tr > td.add-remove-buttons > button > span.text-left {
                margin-right: 5px;
            }

            .move-list > tbody > tr > td.add-remove-buttons > button > span.text-right {
                margin-left: 5px;
            }


.card-header {
    border-left: #d9d9d9 1px solid;
    border-right: #d9d9d9 1px solid;
    border-top: #d9d9d9 1px solid;
}

.card-title {
    margin-bottom: 0;
    color: #495057;
}

    .card-title i,
    .card-title .svg-inline--fa {
        margin-right: 5px;
    }

.button-container {
    text-align: center;
    margin-top: 20px;
}

.field-wrapper {
    width: 100%;
}

.no-wrap {
    white-space: nowrap;
}

.upload-container {
    /* An interactive drop target, so it takes the theme's interactive blue
       rather than the retired Bootstrap 3 one. */
    border: 1px dotted var(--bs-primary, #64b0f2);
    text-align: left;
    vertical-align: middle;
    padding: 10px 10px 10px 10px;
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #f5f5f5;
}

    .upload-container > .upload-footer > .upload-message {
        margin-right: 10px;
    }


.progress-footer {
    width: 100%;
}

.valign-top {
    vertical-align: top;
}

.pull-left {
    float: left;
}

.pull-right {
    float: right;
}

.header-label {
    font-weight: bold;
    margin-top: 30px;
}

.error-modal .modal-body > p {
    word-break: break-word;
}

.checkbox-wrapper label {
    font-weight: normal;
}

.checkbox-wrapper > tbody > tr > td + td {
    padding-left: 5px;
    padding-bottom: 3px;
}

span.logo-lg {
    cursor: pointer;
}


.checkbox-horizontal-list {
    border-color: #d9d9d9;
    background-clip: padding-box;
    border-radius: 5px;
    border-style: solid;
    border-width: 1px;
    position: relative;
    padding-top: 1.5em;
    padding-bottom: .35714em;
}

    .checkbox-horizontal-list .checkbox-list-item {
        display: inline-block;
        padding-right: 7px;
        padding-top: 7px;
    }

        .checkbox-horizontal-list .checkbox-list-item > label {
            font-weight: normal;
        }

    .checkbox-horizontal-list .checkbox-list-item-first {
        padding-left: 0.78571em;
    }


li.nav-item {
    white-space: nowrap;
}

.hide-check {
    visibility: hidden;
}

#SelectedViewName {
    display: inline-block;
    padding: 0 5px;
}

#SelectedViewDirty {
    margin-left: -5px;
    margin-right: 5px;
    color: red;
    font-weight: bold;
}

.card-title i,
.card-title .svg-inline--fa {
    margin-right: 5px;
}

.checkbox-item label,
.radio-button-item label {
    font-weight: normal;
}

.custom-checkbox.input-validation-error .custom-control-label::before {
    border: 1px solid #e80c4d !important;
}

.ui-datepicker {
    z-index: 10000 !important;
}

body > .ts-dropdown {
    z-index: 10000;
}

#divCurrentFilter #lblFilter {
    font-size: .85714em;
    font-weight: normal;
    position: absolute;
    top: 0;
    width: 100%;
    z-index: 1;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-transform: translateY(3px);
    transform: translateY(3px);
    pointer-events: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
    color: #737373;
    display: block;
    text-align: left;
    margin: .5em 0;
}

#divCurrentFilter {
    margin-top: 15px;
    margin-bottom: 15px
}

    #divCurrentFilter > table {
        width: 100%
    }

        #divCurrentFilter > table > tbody > tr > td {
            vertical-align: top
        }

            #divCurrentFilter > table > tbody > tr > td.filter-text {
                padding-top: 18px;
                color: #737373;
            }

            #divCurrentFilter > table > tbody > tr > td.buttons {
                width: 170px;
                white-space: nowrap;
            }

#AdvancedSearchDialog > .modal-dialog > .modal-content > .modal-footer > table {
    width: 100%;
}

#divAdvanced > table {
    min-width: 800px;
}

@media (max-width: 991px) {
    #AdvancedSearchDialog .modal-footer td.text-left, AdvancedSearchDialog .modal-footer td.text-right, #EditDialog .modal-footer td.text-left, #EditDialog .modal-footer td.text-right {
        width: 50%
    }

    #AdvancedSearchDialog .modal-footer td.text-left, #EditDialog .modal-footer td.text-left {
        padding-right: 3px
    }

    #AdvancedSearchDialog .modal-footer td.text-right, #EditDialog .modal-footer td.text-right {
        padding-left: 3px
    }

    #AdvancedSearchDialog .tooltip-wrapper, #AdvancedSearchDialog .btn, #EditDialog .tooltip-wrapper, #EditDialog .btn {
        width: 100%
    }

    #AdvancedSearchDialog .modal-footer .btn, #EditDialog .modal-footer button, #ResponseDialog .modal-footer button {
        margin-bottom: 3px
    }
}

.dropdown-toggle-split {
    border-left: rgba(0, 0, 0, 0.05) 1px solid;
}

.dropdown-submenu {
    position: relative;
}

    /* `.dropdown-submenu a::after` used to draw the submenu caret here. It is gone:
       the submenu toggles now carry `drop-arrow-none` (`.drop-arrow-none::after
       { display: none }`) and supply their own `<i class="fa-caret-right">`, so
       the rule no longer reached its only intended target. Left in place it still
       matched every anchor INSIDE both submenus -- Assign, Unassign and the six
       Export items -- harmless only while none of them sets `content` on ::after.
       The moment any `.dropdown-item::after` gains content (a checkmark, a badge,
       an icon) all eight would draw it rotated -90deg and pinned to the submenu
       box's right:6px/top:.8em rather than on their own rows. The live caret rule
       is `.dropdown-submenu .fa-caret-right` below. */

    .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-left: .1rem;
        margin-right: .1rem;
    }

    .dropdown-submenu .fa-caret-right {
        right: 5px;
        position: absolute;
        top: 9px;
    }

/* STYLES FOR STACK TRACE */
.st-type {
    color: #A19599;
    font-weight: bolder;
}

.st-method {
    color: #8D561F;
    font-weight: bolder;
}

.st-frame-params {
    color: #212529;
    font-weight: normal;
}

.st-param-type {
    color: #0a8472;
}

.st-param-name {
    color: #212529;
}

.st-file {
    color: #212529;
}

.st-line {
    color: #A3235E;
}

.accordion > .card {
    margin-bottom: 0;
}

    .accordion > .card > .card-body {
        border-bottom: none;
        max-height: 400px;
        overflow-y: auto;
        overflow-x: hidden;
    }

        .accordion > .card > .card-body.collapsing {
            overflow-y: hidden;
        }

/* Fix fa-sharp-duotone icons rendering both layers side-by-side instead of stacked */
.fa-sharp-duotone,
.fasds {
    position: relative;
    letter-spacing: normal;
}

    .fa-sharp-duotone:before,
    .fasds:before {
        position: absolute;
        color: var(--fa-primary-color, currentColor);
        opacity: var(--fa-primary-opacity, 1);
    }

    .fa-sharp-duotone:after,
    .fasds:after {
        color: var(--fa-secondary-color, currentColor);
        opacity: var(--fa-secondary-opacity, .4);
    }

/* ==========================================================================
   MOBILE-FIRST FOUNDATION (Phase 0)
   Cross-cutting responsive rules for phone/tablet. site.css loads AFTER
   app.css, so these override the theme. Everything is scoped to
   <= 767.98px (Bootstrap's md breakpoint) so desktop is untouched. Per-module
   and per-page mobile polish (Inventory, VesselLoading, ...) builds on top.
   Note: module modal-width overrides are all gated to @media (min-width:1200px),
   so on mobile Bootstrap's near-full-width modal defaults already apply — the
   real mobile gaps are form-field stacking, popup overflow, and shell chrome.
   ========================================================================== */
@media (max-width: 767.98px) {

    /* --- Forms: stack the label above the input --------------------------
       Module forms use a fixed-width left label (.left-label, often
       ID-scoped) or a table-based field layout (.field-wrapper) that stays
       side-by-side and overflows a phone. Force a stacked (label-over-input)
       layout. !important beats the ID-scoped per-dialog width rules. */
    .left-label {
        width: auto !important;
        display: block !important;
        margin-bottom: 0.25rem;
        text-align: left !important;
    }

    .field-wrapper,
    .field-wrapper > tbody,
    .field-wrapper > tbody > tr {
        display: block !important;
        width: 100% !important;
    }

        .field-wrapper > tbody > tr > td {
            display: block !important;
            width: 100% !important;
            padding: 2px 0 !important;
        }

    /* --- Server-rendered wide tables scroll, not the page ----------------
       Some grids (e.g. VesselLoading's barge tables and the stow plan) are
       server-rendered <table>s inside .DataGrid.table-responsive, not
       client-rendered grids that collapse into cards. Here the wrapper's
       overflow-x resolves to visible, so a table wider than the phone pushes
       the whole page into horizontal scroll. Constrain it so the wide table
       scrolls inside its own box instead. (Card-collapsing grids have no
       overflow, so this is a no-op for them.) */
    .DataGrid.table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* --- Fixed-width form controls cap to the container ------------------
       Some dialogs hardcode a control width (e.g. a comments textarea at
       width:500px) that overflows a phone and pushes the page into
       horizontal scroll even while the dialog is off-screen. Cap to the
       container; box-sizing keeps padding/border inside the cap. */
    textarea {
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* A native <select> sizes to its widest option, so a long option (e.g. a
       commodity name) can push the control past a narrow dialog and force the
       modal to scroll horizontally. Cap selects inside dialogs to the
       container. (Scoped to .modal so page/grid editors are untouched.) */
    .modal select {
        max-width: 100% !important;
    }

    /* --- Autocomplete / date-picker popups fit the viewport --------------
       Tom Select dropdowns append to <body> and size to their widest option
       (min-width: max-content); flatpickr calendars can overflow a narrow
       screen. Cap both to the viewport so options stay reachable. */
    body > .ts-dropdown,
    .ts-wrapper .ts-dropdown {
        max-width: 95vw !important;
        min-width: 0 !important;
    }

    .flatpickr-calendar {
        max-width: 95vw !important;
    }

    /* Bootstrap popovers append to <body> and some modules widen them to a
       fixed width (e.g. .popover { width:400px; max-width:none }), which
       overflows a phone narrower than that width. Cap to the viewport. */
    .popover {
        max-width: calc(100vw - 1rem) !important;
    }

    /* --- Modal button rows wrap instead of overflowing ------------------- */
    .modal .button-container {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Making .button-container a flexbox (above) defeats its .text-center
       (text-align does not center flex items — they default to flex-start),
       so a centered section button like "Add Email" ends up left-aligned on
       mobile. Honor the centering intent under flex. */
    .modal .button-container.text-center {
        justify-content: center;
    }

    /* Many dialogs lay out their footer buttons as a 2-cell <table> (a
       text-left group — often a save-progress spinner — and a text-right
       button group). On a phone the cells stay side-by-side and the buttons
       overflow. Stack the cells full-width so each group wraps cleanly, and
       give the buttons a little vertical breathing room for touch. Shared
       across every module's dialogs (Inventory, Common, Railcar, ...). */
    .modal-footer > table,
    .modal-footer > table tbody,
    .modal-footer > table tr {
        display: block;
        width: 100%;
    }

    .modal-footer > table td {
        display: block;
        width: 100% !important;
        max-width: none !important;
    }

    .modal-footer > table .btn {
        margin-top: 0.25rem;
    }

    /* --- App shell ------------------------------------------------------- */
    /* Treat the slide-in left menu as a modal drawer: dim + scroll-lock the
       page behind it (menu.js already toggles body.sidebar-enable and closes
       on outside click). The sidebar is z-index 10 when open, so the backdrop
       sits just under it at 9. */
    body.sidebar-enable {
        overflow: hidden;
    }

        body.sidebar-enable::before {
            content: "";
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.4);
            z-index: 9;
        }

    /* The profile dropdown is a fixed 200px and the portal switcher is laid
       out for desktop (fixed width + large left margin); both cause horizontal
       overflow on a phone. Let them fit the viewport. */
    .profile-dropdown {
        width: auto !important;
        max-width: 90vw;
    }

    .portal-list {
        margin-left: 0 !important;
        max-width: 100%;
    }

        .portal-list #ddPortalList,
        #ddPortalList {
            width: 100% !important;
            max-width: 100%;
        }

    /* Align the page-title gutters with the reduced mobile content padding so
       the title box doesn't overhang and trigger horizontal scroll. */
    .page-title-box {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: -10px !important;
        margin-right: -10px !important;
    }

    /* Keep toasts on-screen, below the topbar, and full-width (clear of the
       sidebar drawer) instead of a fixed top-right box that can clip. */
    #toast-container {
        top: 80px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
    }

        #toast-container > div {
            width: 100% !important;
            max-width: none !important;
        }

    /* --- Touch targets: enlarge small controls toward ~44px -------------
       Grid per-row action buttons/icons, pager links, the modal close
       button, and nested (level 2-3) menu items all render below the ~44px
       touch minimum. Enlarge the tap area (and the tiny 11px grid-button
       glyph). In the responsive card layout the action buttons ride the
       card's top-right corner, so this enlarges them there too. */

    /* Per-row grid action buttons (edit/delete/print) — were 27x27 @ 11px */
    .DataGrid > table > thead > tr > td > .button-container > button,
    .DataGrid > table > tbody > tr > td > .button-container > button {
        width: 40px !important;
        height: 40px !important;
        font-size: 15px !important;
    }

    /* Per-row action icon links (edit / delete / info) */
    .DataGrid td.icon-column a,
    .DataGrid td.edit-column a,
    .DataGrid td.delete-column a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
    }

    /* Grid pager links */
    .GridPager .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 40px;
        min-height: 40px;
        padding: 0.4rem 0.6rem;
    }

    /* Modal close button */
    .modal .close {
        min-width: 44px;
        min-height: 44px;
        padding: 0.25rem 0.6rem;
        font-size: 1.6rem;
    }

    /* Nested sidebar menu items (drawer, level 2-3) — were ~26px tall */
    .nav-second-level li a,
    .nav-thrid-level li a {
        padding-top: 11px !important;
        padding-bottom: 11px !important;
        padding-left: 16px !important;
    }

    /* --- Responsive card polish ----------------------------------------- */

    /* Empty/colspan message rows ("No rows to display.", loading) inherit the
       card value alignment (right); center them across the card. */
    .mt-grid-responsive tbody td[colspan] {
        text-align: center !important;
        justify-content: center !important;
    }

    /* Hide the grid's own outer frame (div.DataGrid > table draws
       border-left/right/bottom) once it has collapsed into cards — the per-card
       borders are the only frame wanted in card view. */
    .DataGrid.mt-grid-responsive > table {
        border: 0 !important;
    }

    /* Tighten the dead space around a card-collapsed grid: the .card-body
       padding (20px) stacks with the grid's own top margin (20px) and its
       table's bottom margin (16px) into ~40px gaps on a phone. */
    .card-body:has(.mt-grid-responsive) {
        padding: 0.5rem;
    }

    .DataGrid.mt-grid-responsive {
        margin-top: 0;
    }

        .DataGrid.mt-grid-responsive > table {
            margin-bottom: 0;
        }

    /* Each card carries a bottom margin for inter-card spacing; on the last
       card that margin lands against the card-body padding and makes the
       below-grid gap larger than the above-grid gap. Drop it so the stack is
       flush and the whitespace above/below the grid is equal. */
    .mt-grid-responsive tbody tr:last-child {
        margin-bottom: 0;
    }

    /* With the last card flush (above) and the table's bottom margin zeroed,
       the pager would butt against the last card; restore a gap above it. */
    .mt-grid-responsive .GridPager {
        margin-top: 0.75rem;
    }

    /* Cubics/Holds table: the Cubics + Depth fields use float:left to sit side
       by side on desktop. Once the table cells stack on mobile (Phase 0), the
       uncleared floats leak into the next row and shove each following hold's
       "Available" checkbox to the right edge. Drop the float so each hold
       stacks cleanly (available checkbox, then Cubics, then Depth). */
    .cubics-wrapper .holds-table .field {
        float: none;
    }

    /* Card-header bars (e.g. "Search Options") lay out their title + collapse
       caret as a 2-cell .field-wrapper table. The generic .field-wrapper
       stacking (above) drops the caret onto its own line; keep header
       field-wrappers as a single title-left / caret-right row. */
    .card-header .field-wrapper {
        display: table !important;
        width: 100% !important;
    }

        .card-header .field-wrapper > tbody {
            display: table-row-group !important;
        }

        .card-header .field-wrapper > tbody > tr {
            display: table-row !important;
        }

            .card-header .field-wrapper > tbody > tr > td {
                display: table-cell !important;
                width: auto !important;
            }

    /* A centered section button (e.g. "Add Email") sits in a .button-container
       with a .divider spacer; once the container is flex the divider shares
       the line and pushes the button off-center — give it its own row. */
    .modal .button-container.text-center .divider {
        flex-basis: 100%;
    }
}

/* ==========================================================================
   GRID TOTALS FOOTER IN CARD VIEW
   A grid <tfoot> totals row is laid out to align each total under its column
   (the non-total columns are empty cells carrying colspan). If it cards like a
   data row, those empty spacer cells stack into a tall mostly-blank block
   (e.g. the LoadOrders Lots grid showed ~282px of empty lines below the data).
   Instead, present the footer as one compact, bold, right-aligned totals line:
   hide the empty colspan spacer cells, drop the data-label gutter, and set off
   the row with a top border so the totals stay visible but tidy.
   ========================================================================== */
@container (max-width: 600px) {
    .mt-grid-responsive tfoot {
        display: block;
    }

    .mt-grid-responsive tfoot tr {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: baseline;
        gap: 0.25rem 0.75rem;
        margin-top: 0.25rem;
        padding: 0.5rem 0.75rem;
        border-top: 2px solid var(--mt-grid-card-border, #dee2e6);
        font-weight: 600;
    }

    .mt-grid-responsive tfoot td {
        display: inline-block;
        min-height: 0;
        padding: 0;
        border: 0;
        text-align: right;
    }

        /* Empty alignment spacers (they carry colspan); the totals are in the
           non-spanning cells. */
        .mt-grid-responsive tfoot td[colspan] {
            display: none;
        }

        .mt-grid-responsive tfoot td::before {
            content: none;
        }
}

/* ==========================================================================
   GRID CARD CELL LAYOUT FIXES (card view)
   Corrects three issues once a grid collapses to cards (Inventory barge list
   surfaced all three, but the fixes are generic):
   1. A desktop per-column width cap (e.g. a date column pinned to ~130px,
      injected by the grid, not via a readable rule) leaks into card view, so
      the cell can't stack full-width — the row's justify-content:flex-end then
      strands the capped cell on the right with its value overflowing. Reset
      the cap so every cell stacks the full card width.
   2. The selection-checkbox cell (no header, no link, so the action-grouping
      :has(a,button) rule skips it) defaulted to a full-width line with the
      checkbox pushed right by justify-content:space-between. Lift it onto the
      card's first line at content width, pinned LEFT (margin-right:auto), so
      it sits opposite the action buttons that already group top-right.
   3. RMG's custom "location" tracking column emits no data-label, so its card
      line showed the value with no bold label. Supply the label.
   ========================================================================== */
@container (max-width: 600px) {
    .mt-grid-responsive tbody td {
        max-width: none !important;
    }

    /* Frozen/sticky columns (e.g. the Barge ID column in the Inventory grid)
       carry a vertical border-right for the column-freeze boundary in table
       view; once collapsed to stacked cards that renders as a stray vertical
       line on the value. Strip side borders in card view (the card keeps its
       outer border + the per-row bottom divider). Needs the .DataGrid prefix +
       !important to beat the grid's frozen-column border rule. Scoped to
       @container, so tracking-mode TABLE view (container-type:normal, this
       query doesn't match) keeps its frozen-column borders. */
    .DataGrid.mt-grid-responsive tbody td {
        border-left: 0 !important;
        border-right: 0 !important;
    }

    /* Selection checkbox -> card top-left; action buttons stay top-right. */
    .mt-grid-responsive tbody td:not([data-label]):has(input[type='checkbox']),
    .mt-grid-responsive tbody td[data-label='']:has(input[type='checkbox']) {
        order: -1;
        flex: 0 0 auto;
        width: auto;
        min-height: 0;
        margin-right: auto;
        padding: 0.25rem 0.5rem;
        border-bottom: 0;
        justify-content: flex-start;
    }

    /* Action-button cell (edit/delete icon link): the link is a 40px touch
       target, wider than its auto-sized cell, so it overflowed the card's
       right edge (clipped to a sliver). Give the cell room to contain it and
       pin it to the card's right. The .DataGrid prefix raises specificity
       above the framework's own action-cell rule, which loads AFTER site.css
       and would otherwise win the tie and reset padding-right. */
    .DataGrid.mt-grid-responsive tbody td:not([data-label]):has(a, button),
    .DataGrid.mt-grid-responsive tbody td[data-label='']:has(a, button) {
        min-width: 2.75rem;
        justify-content: flex-end;
        padding-right: 0.75rem;
    }

    /* Custom location-tracking column carries no header text. The framework
       no-label rule (td:not([data-label])::before { content: '' }) has the
       same specificity but loads AFTER site.css, so it would win and blank the
       label; out-specify it by also matching :not([data-label]). */
    .mt-grid-responsive tbody td.location:not([data-label])::before {
        content: 'Location';
    }
}

/* ==========================================================================
   KEEP INLINE-EDIT GRIDS TABULAR (don't collapse to cards while editing)
   The responsive card layout is a read-only browsing view: one column per
   line, each editor reached by double-click. The Inventory barge-list
   "Location Tracking" mode is a dense inline-edit grid (~20 editable columns);
   stacked into single-column cards the editors are cramped and effectively
   unusable on a phone. While the grid is in tracking/edit mode, neutralize the
   size-query container so the @container card rules no longer match and the
   grid stays a normal horizontally-scrollable table (.table-responsive
   supplies overflow-x:auto), where inline editing works as designed.
   Specificity (0,3,0) beats the framework's .mt-grid-responsive (0,1,0). */
.DataGrid.mt-grid-responsive.location-tracking-mode,
.DataGrid.mt-grid-responsive.edit-mode-active {
    container-type: normal;
}

/* The size-query container (container-type:inline-size, set unconditionally by
   the responsive-cards feature) changes the containing block for the grid's
   position:sticky frozen columns and causes transient repaint artifacts in the
   sticky header during horizontal scroll on desktop. Cards only render at
   <= 600px — where the table, and its frozen columns, isn't shown — so only
   establish the size-query container there; at wider widths drop containment so
   the sticky columns/header paint cleanly. (The frozen position:sticky columns
   keep working without it — verified.) */
@media (min-width: 601px) {
    .DataGrid.mt-grid-responsive {
        container-type: normal;
    }
}

/* The grid's edit-mode header row (thead tr.header-edit) is collapsed via an
   INLINE display:none that the grid's JS applies AFTER first render, so it
   flashes a duplicate header on initial load (and on re-render). Hide it from
   first paint in read-only so there is no flash; the JS still manages it and
   shows it in edit mode (where .edit-mode-active is present, so this rule no
   longer matches and the JS inline display wins). Verified: read-only -> none,
   edit mode -> table-row. */
.DataGrid:not(.edit-mode-active) thead tr.header-edit {
    display: none;
}

/* ---------------------------------------------------------------------------
   Uplon v3 chrome compatibility.

   The page-title and user-menu markup is unchanged from v2, but v3 ships rules
   for .page-title-box only. .page-title, .page-title-right and .noti-title are
   undefined there, so the classes stay on the elements and simply stop doing
   anything: the breadcrumb stops floating and stacks above the heading, the
   heading falls back to the plain h4 size (15.84px), and the dropdown header
   loses its bar. Nothing errors, which is why it is easy to miss.

   Values are the v2 ones from this repo's own pre-migration app.min.css.
   v2's `line-height: 60px` on .page-title is deliberately not carried over:
   there it set the bar height because .page-title-box used `padding: 0 30px`,
   whereas v3 gets the same ~60px from `padding: 20px 24px`. Applying both makes
   the bar ~100px tall.

   The sidebar logo needs no override here - Menu.cshtml sizes it with an
   explicit height attribute, so v3's --bs-logo-lg-height does not reach it.

   Superseded by uplon-v3-compat.css in MeyerTechnologies.UI.Shared.Epsilon.js
   once this portal takes that package; remove this block then so the two cannot
   drift.
   --------------------------------------------------------------------------- */
.page-title-box .page-title {
    font-size: 18px;
    margin: 0;
}

/* v2 paired `margin-top: 7px` here with a `.breadcrumb { padding: .75rem 0 }`
   and a 60px-tall title line, and the three together centred the breadcrumb
   against the heading. v3 gets the bar height from padding instead, so the two
   inherited offsets now stack on top of that padding and push the breadcrumb
   ~20px below the heading it is supposed to sit beside. Both are zeroed, which
   lands the breadcrumb's centre within 1px of the heading's. */
.page-title-box .page-title-right {
    float: right;
    margin-top: 0;
}

.page-title-box .breadcrumb {
    margin-bottom: 0;
    padding: 0;
}

.dropdown-menu .noti-title {
    background-color: var(--bs-primary, #64b0f2);
    padding: 15px 20px;
    border-radius: .25rem .25rem 0 0;
    margin-top: -7px;
}

    .dropdown-menu .noti-title,
    .dropdown-menu .noti-title h5,
    .dropdown-menu .noti-title h6 {
        color: #fff;
    }

/* ---------------------------------------------------------------------------
   RMG palette.

   The portal had two unrelated blues: the theme primary (#64b0f2) and a
   Bootstrap 3 leftover (#337ab7) on every grid header. These tokens replace the
   leftover with a blue drawn from the theme's own hue family, and give the
   Vessel Loading screens a small vocabulary that means something on a cargo
   diagram rather than a set of arbitrary hexes.

   Named for the subject: an operator reading a stow plan already thinks in
   hulls, decks, holds and separations.
   --------------------------------------------------------------------------- */
:root {
    /* Structure */
    /* Header bands. This was taken down to #234a63 ("the theme blue in
       shadow") during the Bootstrap 5 uplift, which read as too heavy against
       the lighter v3 chrome. Back to the portal blue the Stow Plan table has
       always used, which is the reference the client asked every grid header
       to match. White on it measures 4.7:1 - still past AA for the 600-weight
       text it originally carried, and comfortably so now the weight is normal. */
    --rmg-hull: #337ab7; /* header bands - the portal blue */
    --rmg-hull-edge: #2e6da4; /* the rule under a header band */
    --rmg-rule: #d5dde3; /* cell and cargo-item borders */

    /* The required-column marker on a hull-blue header band. The old marker
       was brick red (#b94a48), which measures 1.12:1 on the hull and was
       effectively invisible once the bands went blue. Amber is the only warm
       note in an otherwise all-blue header, so it separates by hue and
       temperature rather than by lightness alone, and it clears 3:1 on the
       hull where no usable red does. */
    --rmg-required: #ffd27a; /* required-column asterisk - 3.2:1 on the hull */

    /* Cargo state. Two tints that differ in temperature, not just value, so
       planned and loaded are separable at a glance without a legend. */
    --rmg-planned: #eef3f7; /* cool - prestow / cargo rows, not yet aboard */
    --rmg-loaded: #f4f1ea; /* warm - loaded rows, cargo settled */
    --rmg-neutral: #f7f8f9; /* cubics and other computed rows */

    /* Separations. Hue carries the meaning; the solid/dotted border style is
       kept as redundant coding so the distinction survives a mono print and
       colour-blind vision. */
    --rmg-barrier: #b5761f; /* artificial - a physical barrier that was placed */
    --rmg-boundary: #2f8f83; /* natural - where one commodity meets the next */
}

/* v2 had `.page-dropdown{width:auto!important}`; v3 ships no rule for the class
   at all, so the page-size select stretched to its container - 306px for a
   two-character value. */
.page-dropdown {
    width: auto !important;
}

/* Sidebar text weight and colour.

   v2 styled the menu with `#sidebar-menu > ul > li > a { color: #6e768e }` and
   no font-weight, so the links sat at the body's normal 400 in a soft grey.
   v3 restyles the same links as `.side-nav-link`, taking the colour to
   `--bs-menu-item-color: #495057` and adding `font-weight: 500` - noticeably
   darker and heavier than the menu the portal has always had.

   Set the theme's own variable rather than the colour directly, so the hover
   and active states that derive from it stay consistent, and scope it to
   `.side-nav` (closer to the links than wherever the theme defines it, so it
   wins on proximity rather than needing !important). */
.side-nav {
    --bs-menu-item-color: #6e768e;

    /* Selected top-level item. v3's default is a 10% tint of the theme blue,
       which against the white menu is so faint it reads as no selection at
       all. v2 used an opaque #f5f8fb band with the label in gold, which is
       what the portal has always shown as "you are here". Measured off
       production: background #f5f8fb, text #c3912e.

       Only the top-level rule consumes these two - the theme paints an active
       SUB item from --bs-menu-item-hover-color (#64b0f2, blue), which already
       matches production, so it is deliberately left alone. */
    --bs-menu-item-active-bg: #f5f8fb;
    --bs-menu-item-active-color: #c3912e;
}

    /* Weight and size have to be reclaimed at the theme's own specificity.
       v3 sets them from two places:

         .side-nav .side-nav-item .side-nav-link                          (0,3,0)
         .side-nav > .side-nav-item.active .side-nav-link.active,
         .side-nav > .side-nav-item.active > a                            (0,4,0)

       so a plain `.side-nav .side-nav-link` (0,2,0) loses to both - which is
       why the ACTIVE item in particular stayed bold. Matching the same
       selectors wins on source order, since site.css loads after app.min.css.

       Measured against production: 15.5px at weight 400, line-height 1.5
       (23.25px). v3 had 15px/500 with line-height locked to the font size,
       which is what made the menu read as heavier and tighter. */
    .side-nav .side-nav-item .side-nav-link,
    .side-nav > .side-nav-item.active .side-nav-link.active,
    .side-nav > .side-nav-item.active > a {
        font-weight: 400;
        font-size: 15.5px;
        line-height: 1.5;
    }

    /* v2's menu heading was 11px/600; v3 ships 10.5px/700. */
    .side-nav .side-nav-title {
        font-size: 11px;
        font-weight: 600;
    }

/* Card headers. v2 gave them a light grey band (#e9ecef) that separated the
   title from the card body; v3 leaves them transparent, so the header and the
   body read as one undifferentiated block. Padding matched to production too
   (12px 20px rather than v3's 15px 20px). */
.card > .card-header {
    background-color: #e9ecef;
    padding: 12px 20px;
}

/* The grid carries its own 20px top margin, which lands inside a .card-body
   that already pads 20px - so the gap above a grid was double the gap at its
   sides and below.

   Only drop it when the grid is the FIRST thing in the card body, where the
   body's own padding already provides the space. A grid that follows
   something - the Customer / Lot dropdowns above the Barge List, or the
   Elevator Sublot list - still needs that 20px to separate itself from the
   controls above, and keeps it. */
.card-body > .DataGrid:first-child {
    margin-top: 0;
}

/* Sidebar logo. Menu.cshtml asks for `height="40"` on the wide logo, but v3
   styles it as `.logo-lg img { height: var(--bs-logo-lg-height) }` and ships
   that variable at 22px - and a CSS height beats the HTML attribute, so the
   mark rendered at 84x40 -> 84x22, roughly half its intended size. Restore the
   variable to the height the markup (and production) already use; measured
   153x40 against production. --bs-logo-sm-height is left alone: its 24px
   already agrees with the collapsed logo's own attribute. */
:root {
    --bs-logo-lg-height: 40px;
}

/* Grid card mode: drop the row striping.

   Bootstrap paints .table-striped on the CELLS, not the row -
   `.table-striped > tbody > tr:nth-of-type(odd) > *` only sets
   --bs-table-bg-type, which each td turns into an `inset 0 0 0 9999px` shadow.
   In card mode the <tr> IS the card and carries the background, so on a striped
   card the tds tint themselves while the card's own first line - the strip the
   headerless action cells are lifted onto by `order: -1`, which no td spans -
   keeps the card's white. On the Voyages list that reads as a white band with
   the two icon buttons floating in it, above tinted label rows.

   Striping earns its keep on a table, where rows abut and the tint is what
   separates them. Cards are already separated by their own margin and border,
   so the stripe only buys this mismatch. Scoped to the same @container
   breakpoint the card layout uses, so the desktop table keeps its stripes. The
   selector carries one more class than Bootstrap's (0,3,2 vs 0,2,2), so it wins
   on specificity rather than relying on load order. */
@container (max-width: 600px) {
    .mt-grid-responsive .table-striped > tbody > tr:nth-of-type(odd) > * {
        --bs-table-bg-type: transparent;
        --bs-table-color-type: var(--bs-table-color);
    }
}
