/* SPSB Customer Portal - Bootstrap 5 theme additions (ported from yii1 css/main.css, styles.css) */

:root {
    --spsb-primary: #374979;
    --spsb-primary-light: #4a5f96;
    --spsb-accent: #bf873c;
    --spsb-teal: #374979;
}

/* Bootstrap "primary" in the logo navy (--spsb-primary) */
:root {
    --bs-primary: #374979;
    --bs-primary-rgb: 55, 73, 121;
    --bs-primary-text-emphasis: #1f2a46;
    --bs-primary-bg-subtle: #eceff6;
    --bs-primary-border-subtle: #c3cadb;
    --bs-link-color: #374979;
    --bs-link-color-rgb: 55, 73, 121;
    --bs-link-hover-color: #2a3960;
    --bs-link-hover-color-rgb: 42, 57, 96;
    --bs-focus-ring-color: rgba(55, 73, 121, .25);
}

.btn-primary {
    --bs-btn-bg: #374979;
    --bs-btn-border-color: #374979;
    --bs-btn-hover-bg: #2e3e67;
    --bs-btn-hover-border-color: #2b3a61;
    --bs-btn-active-bg: #2b3a61;
    --bs-btn-active-border-color: #28365a;
    --bs-btn-disabled-bg: #374979;
    --bs-btn-disabled-border-color: #374979;
    --bs-btn-focus-shadow-rgb: 85, 100, 141;
}

.btn-outline-primary {
    --bs-btn-color: #374979;
    --bs-btn-border-color: #374979;
    --bs-btn-hover-bg: #374979;
    --bs-btn-hover-border-color: #374979;
    --bs-btn-active-bg: #374979;
    --bs-btn-active-border-color: #374979;
    --bs-btn-disabled-color: #374979;
    --bs-btn-disabled-border-color: #374979;
    --bs-btn-focus-shadow-rgb: 55, 73, 121;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #9ba4bc;
    box-shadow: 0 0 0 .25rem rgba(55, 73, 121, .25);
}

.form-check-input:checked {
    background-color: #374979;
    border-color: #374979;
}

.pagination {
    --bs-pagination-active-bg: #374979;
    --bs-pagination-active-border-color: #374979;
    --bs-pagination-focus-box-shadow: 0 0 0 .25rem rgba(55, 73, 121, .25);
}

.dropdown-menu {
    --bs-dropdown-link-active-bg: #374979;
}

.list-group {
    --bs-list-group-active-bg: #374979;
    --bs-list-group-active-border-color: #374979;
}

.progress,
.progress-stacked {
    --bs-progress-bar-bg: #374979;
}

body {
    background: #f6f8fa url(../images/noise-diagonal.png);
}

main > .container,
main > .container-fluid {
    padding-top: 76px;
}

.navbar-brand img {
    height: 26px;
}

/* navbar cart with the count of invoices in the active e-Payment basket */
.nav-cart {
    position: relative;
    display: inline-block;
}

.nav-cart__badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #d92d20;
    color: #fff;
    font-size: .65rem;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
}

/* ---- data table ----
 * <div class="data-table-wrap">            bordered white card (skip when already inside a card)
 *   <table class="table data-table">       add data-table--compact for dense lists
 * cells: col-num (row number), col-money (right aligned amounts), col-action (buttons)
 * rows:  is-error, is-selected (also .selected, set by the select-invoice script)
 */
.data-table-wrap {
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
    overflow-x: auto;
}

.table.data-table {
    --bs-table-bg: transparent;
    --bs-table-color: #1f2933;
    --data-table-head-bg: #f8f9fb;
    --data-table-line: #eef0f3;
    margin-bottom: 0;
    font-size: .85rem;
}

.data-table > :not(caption) > * > * {
    padding: 10px 16px;
    border-bottom: 1px solid var(--data-table-line);
    vertical-align: middle;
}

.data-table > thead > tr > th {
    background: var(--data-table-head-bg);
    border-bottom-color: #e4e7eb;
    color: #6b7785;
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table > thead > tr > th a {
    color: inherit;
    text-decoration: none;
}

.data-table > thead > tr > th a:hover,
.data-table > thead > tr > th a.asc,
.data-table > thead > tr > th a.desc {
    color: var(--spsb-primary);
}

.data-table > thead > tr > th a.asc::after {
    content: ' \2191';
}

.data-table > thead > tr > th a.desc::after {
    content: ' \2193';
}

/* GridView filter row */
.data-table > thead > tr.filters > td {
    background: #fff;
    padding: 8px 16px;
}

.data-table .filters .form-control,
.data-table .filters .form-select {
    padding: .25rem .5rem;
    font-size: .8rem;
}

.data-table > tbody > tr:hover > * {
    --bs-table-bg-state: #f6f8fb;
}

.data-table > tbody > tr:last-child > * {
    border-bottom: 0;
}

.data-table > tfoot > tr > * {
    background: var(--data-table-head-bg);
    border-top: 1px solid #e4e7eb;
    border-bottom: 0;
    font-weight: 600;
}

.data-table .col-num {
    width: 1%;
    white-space: nowrap;
    color: #9aa5b1;
}

.data-table .col-money {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.data-table .col-action {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.data-table > tbody > tr.is-error > * {
    --bs-table-bg-state: #fff5f5;
}

.data-table > tbody > tr.is-selected > *,
.data-table > tbody > tr.selected > * {
    --bs-table-bg-state: var(--bs-primary-bg-subtle);
}

/* "No results found." of GridView / TableWidget */
.data-table .empty,
.data-table .data-table__empty {
    padding: 28px 0;
    text-align: center;
    color: #6b7785;
}

.data-table--compact > :not(caption) > * > * {
    padding: 6px 12px;
}

.data-table--compact {
    font-size: .8rem;
}

/* submit button while its form is being sent (web/js/form-submit.js) */
.btn.is-loading,
input.is-loading {
    pointer-events: none;
    opacity: .8;
}

/* lines up with the p-3 padding of #content (column1/column2 layouts) */
.breadcrumb.site-breadcrumb {
    --bs-breadcrumb-divider: '\203A';
    --bs-breadcrumb-item-padding-x: .5rem;
    --bs-breadcrumb-divider-color: #9aa5b1;
    margin: 8px 0 0;
    padding: 0 1rem;
    font-size: .82rem;
}

.site-breadcrumb .breadcrumb-item a {
    color: #6b7785;
    text-decoration: none;
}

.site-breadcrumb .breadcrumb-item a:hover {
    color: var(--spsb-primary);
}

.site-breadcrumb .breadcrumb-item.active {
    color: #1f2933;
    font-weight: 500;
}

.site-footer {
    margin-top: 48px;
    padding: 20px 0;
    background: #fff;
    border-top: 1px solid #e4e7eb;
    font-size: .8rem;
    color: #6b7785;
}

.site-footer__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 24px;
}

.site-footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer__links .bi {
    margin-right: 4px;
}

.site-footer a {
    color: inherit;
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--spsb-primary);
}

@media (max-width: 575.98px) {
    .site-footer__inner {
        flex-direction: column;
        text-align: center;
    }

    .site-footer__links {
        justify-content: center;
    }
}

/* ---- port tabs (home, invoice, payment pages) ---- */
.ports-tab {
    border-bottom: 4px solid var(--spsb-primary);
    gap: 2px;
}

.ports-tab .nav-link {
    color: #000;
    font-size: 0.8rem;
    border-radius: 0;
    background: #fff;
}

.ports-tab .nav-link:hover {
    background: var(--spsb-primary-light);
    color: #fff;
}

.ports-tab .nav-link.active {
    background: var(--spsb-primary);
    color: #fff;
    border-bottom: 4px solid var(--spsb-accent);
    margin-bottom: -4px;
}

/* ---- home page (site/index) ---- */
.home {
    --home-border: #e4e7eb;
    --home-muted: #6b7785;
    --home-text: #1f2933;
    color: var(--home-text);
}

.home-header {
    margin-bottom: 20px;
}

.home-eyebrow {
    font-size: .85rem;
    color: var(--home-muted);
    margin-bottom: 2px;
}

.home-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin: 0;
}

.home-ports {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-bottom: 24px;
    scrollbar-width: thin;
}

.home-port {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto;
    min-width: 120px;
    padding: 8px 14px;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    color: var(--home-text);
    text-decoration: none;
    line-height: 1.25;
    transition: border-color .15s ease, background-color .15s ease;
}

.home-port:hover {
    border-color: var(--spsb-primary);
    color: var(--home-text);
}

.home-port.active {
    background: var(--spsb-primary);
    border-color: var(--spsb-primary);
    color: #fff;
}

.home-port__name {
    font-size: .85rem;
    font-weight: 600;
}

.home-port__type {
    font-size: .75rem;
    opacity: .75;
}

.home-notice {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    margin-bottom: 24px;
    background: #f1f3f8;
    border: 1px solid #d6dbe7;
    border-radius: 8px;
    font-size: .9rem;
}

.home-notice__icon {
    color: var(--spsb-primary);
    font-size: 1.1rem;
    line-height: 1.3;
}

.home-notice__text {
    margin: 0 0 6px;
}

.home-notice__links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.home-notice__links a {
    font-weight: 600;
    color: var(--spsb-primary);
    text-decoration: none;
}

.home-notice__links a:hover {
    text-decoration: underline;
}

.home-section {
    margin-bottom: 32px;
}

.home-section__title {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--home-muted);
    margin-bottom: 12px;
}

.home-service {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: 100%;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--home-border);
    border-radius: 8px;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.home-service:hover {
    border-color: var(--spsb-primary);
    box-shadow: 0 4px 12px rgba(31, 41, 51, .06);
}

.home-service__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    height: 36px;
    border-radius: 8px;
    background: #eceff6;
    color: var(--spsb-primary);
    font-size: 1.05rem;
}

.home-service__body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.home-service__link {
    font-size: .9rem;
    font-weight: 500;
    color: var(--home-text);
    text-decoration: none;
}

.home-service__link:hover {
    color: var(--home-text);
}

/* sits above the card's stretched link */
.home-service__extra {
    position: relative;
    z-index: 2;
    font-size: .78rem;
    color: var(--spsb-primary);
    text-decoration: none;
}

.home-card {
    background: #fff;
    border: 1px solid var(--home-border, #e4e7eb);
    border-radius: 10px;
    overflow: hidden;
}

.home-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--home-border, #e4e7eb);
}

.home-card__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.home-card__actions {
    display: flex;
    gap: 14px;
    font-size: .85rem;
}

.home-card__actions a {
    color: var(--spsb-primary);
    text-decoration: none;
    font-weight: 500;
}

.home-card__actions a:hover {
    text-decoration: underline;
}

.home-card__count {
    font-size: .8rem;
    color: var(--home-muted, #6b7785);
}

.home-card__empty {
    padding: 32px 18px;
    text-align: center;
    font-size: .875rem;
    color: var(--home-muted, #6b7785);
}

.home-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.home-list li {
    padding: 12px 18px;
    border-bottom: 1px solid #f0f2f4;
}

.home-list li:last-child {
    border-bottom: 0;
}

.home-list__title {
    display: block;
    font-size: .9rem;
    font-weight: 500;
    color: var(--home-text, #1f2933);
    text-decoration: none;
    overflow-wrap: anywhere;
}

.home-list__title:hover {
    color: var(--spsb-primary);
}

.home-list__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: .78rem;
    color: var(--home-muted, #6b7785);
}

.home-badge {
    padding: 1px 7px;
    border-radius: 999px;
    background: #fdecea;
    color: #b42318;
    font-size: .7rem;
    font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
    .home-port,
    .home-service {
        transition: none;
    }
}

a.link-box {
    min-height: 80px;
    width: 110px;
    margin: 10px 0 10px 10px;
    padding: 5px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid #444;
    border-radius: .375rem;
    text-decoration: none;
    color: inherit;
    background: #fff;
}

a.link-box:hover {
    background: var(--spsb-primary);
    color: #fff;
}

a.link-box .bi {
    font-size: 1.6rem;
}

table.rep_table {
    font-size: 12px;
}

/* ---- manifest status ---- */
.status {
    display: inline-block;
    text-align: center;
    padding: 0.4em 0.8em;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

.status-P { background: #faf3eb; }
.status-A { background: #c6e1cf; }
.status-E { background: #f7b7d2; }
.status-C { background: #cae9eb; }
.status-D { background: #e0e0e2; }
.status-R { background: #eee0dd; }
.status-X { background: rgb(203, 176, 255); }

/* ---- SOA ---- */
#soa_viewer {
    padding: 1em;
    border: 1px solid #ddd;
    margin-top: 1em;
    box-shadow: 1px 1px 5px #555;
    background: #fff;
    min-height: 400px;
}

#soa_viewer table td {
    font-size: 0.9em;
}

table td.total_summary {
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
}

/* ---- notifications ---- */
.notification {
    color: #000;
    margin: 0;
}

.notification a {
    text-decoration: none;
    color: inherit;
}

.notification h5.title {
    margin: 0.5em 0 0;
    font-size: 1rem;
}

.notification p.desc {
    margin: 0.5em 0;
    font-size: smaller;
}

.notification.read {
    color: gray;
    border-left: 1px solid #888;
    padding-left: 1em;
}

.notification.read h5 {
    color: gray;
    font-weight: normal;
}

.notification.unread {
    border-left: 6px solid var(--spsb-teal);
    padding-left: 1em;
}

.dropdown-item.notification-unread {
    font-weight: 600;
}

.dropdown-item.notification-read {
    color: gray;
}

.notification-menu {
    max-width: 360px;
}

.notification-menu .dropdown-item {
    white-space: normal;
}

/* ---- legacy page-number pager (TablePaging widget) ---- */
.page-number-pager a.page-link.active {
    background-color: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

/* ---- grid filter bar ---- */
form.datagrid_filter {
    background: #efefef;
    border-radius: 5px;
    padding: 0.5em;
    text-align: right;
}

/* ---- print ---- */
@media print {
    .navbar, .site-footer, .hidden-print, .btn {
        display: none !important;
    }

    main > .container {
        padding-top: 0;
    }
}

.print-wrapper th,
.print-wrapper td {
    font-size: 8pt;
}

.print-wrapper {
    padding: 1em;
    margin: 1em;
}

/* ---- e-Payment (views/payment, reuses .home-card / .data-table) ---- */
.pay-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.pay-meta {
    font-size: .82rem;
    color: #6b7785;
}

.pay-tabs {
    --bs-nav-underline-link-active-color: var(--spsb-primary);
    --bs-nav-link-color: #52606d;
    --bs-nav-link-hover-color: var(--spsb-primary);
    border-bottom: 1px solid #e4e7eb;
    margin-bottom: 24px;
    font-size: .9rem;
}

.pay-tabs .nav-link {
    font-weight: 500;
}

/* SOA mismatch remark under a basket item (row has .is-error) */
.pay-row__error {
    margin-top: 2px;
    font-size: .78rem;
    color: #b42318;
}

.pay-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    color: #9aa5b1;
    text-decoration: none;
}

.pay-remove:hover {
    background: #fdecea;
    color: #b42318;
}

.pay-summary {
    padding: 20px;
}

@media (min-width: 992px) {
    .pay-summary {
        position: sticky;
        top: 76px;
    }
}

.pay-summary__label {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #6b7785;
}

.pay-summary__total {
    padding-bottom: 18px;
    margin-bottom: 18px;
    border-bottom: 1px solid #e4e7eb;
}

.pay-summary__amount {
    margin: 4px 0;
    font-size: 1.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #1f2933;
}

.pay-summary__words {
    font-size: .8rem;
    color: #52606d;
}

.pay-summary__count {
    margin-top: 8px;
    font-size: .78rem;
    color: #9aa5b1;
}

.pay-methods {
    margin-bottom: 18px;
}

.pay-methods legend {
    float: none;
    margin-bottom: 10px;
}

.pay-method {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.pay-method .form-check-input {
    flex: 0 0 auto;
    margin: 0;
}

.pay-method:hover {
    border-color: #9ba4bc;
}

.pay-method:has(input:checked) {
    border-color: var(--spsb-primary);
    background: var(--bs-primary-bg-subtle);
}

.pay-method.is-disabled {
    cursor: not-allowed;
    opacity: .55;
}

.pay-method__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    line-height: 1.3;
}

.pay-method__name {
    font-size: .9rem;
    font-weight: 600;
}

.pay-method__desc {
    font-size: .78rem;
    color: #6b7785;
}

.pay-method__info {
    padding: 4px;
    border: 0;
    background: none;
    color: #9aa5b1;
    line-height: 1;
}

.pay-method__info:hover {
    color: var(--spsb-primary);
}

.pay-note {
    margin: 4px 0 0;
    font-size: .8rem;
    color: #8a5a00;
}

.pay-secure {
    margin: 10px 0 0;
    text-align: center;
    font-size: .78rem;
    color: #6b7785;
}

.pay-banks {
    columns: 2;
    padding-left: 1.1rem;
    font-size: .9rem;
}

.pay-empty {
    max-width: 520px;
    margin: 24px auto;
    padding: 40px 24px;
    text-align: center;
}

.pay-empty__img {
    width: 160px;
    margin-bottom: 20px;
}

.pay-empty__title {
    font-size: 1.2rem;
    font-weight: 600;
}

.pay-empty__text {
    color: #6b7785;
}

.pay-footer {
    margin: 40px 0 0;
    text-align: center;
    font-size: .82rem;
    color: #6b7785;
}

@media (prefers-reduced-motion: reduce) {
    .pay-method {
        transition: none;
    }
}

/* ---- container inquiry (site/check-container-info-v2) ---- */
.ci-header {
    margin-bottom: 16px;
}

.ci-search {
    padding: 20px;
    margin-bottom: 24px;
}

.ci-search .form-label {
    font-size: .875rem;
    font-weight: 500;
}

.ci-search__row {
    display: flex;
    gap: 10px;
    max-width: 560px;
}

.ci-search__field {
    position: relative;
    flex: 1 1 auto;
}

.ci-search__field .bi {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: #9aa5b1;
}

.ci-search__field .form-control {
    padding-left: 40px;
    font-size: 1rem;
    letter-spacing: .04em;
}

/* input and buttons of the search bars share one height (also customs hold "All held containers") */
.ci-search__field .form-control,
.ci-search__row .btn,
.ch-search__all .btn {
    height: 48px;
}

.ci-search__row .btn,
.ch-search__all .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-left: 20px;
    padding-right: 20px;
    font-size: 1rem;
}

/* text-uppercase is for the typed ID, not the hint */
.ci-search__field .form-control::placeholder {
    text-transform: none;
    letter-spacing: normal;
}

.ci-container-id {
    font-size: 1.15rem;
    letter-spacing: .06em;
}

.ci-pill {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--spsb-primary);
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.ci-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #6b7785;
}

.ci-toggle:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--spsb-primary);
}

.ci-toggle .bi {
    transition: transform .15s ease;
}

.ci-toggle:not(.collapsed) .bi {
    transform: rotate(180deg);
}

/* the details row has no line of its own; the line sits under the expanded content */
.data-table > tbody > tr.ci-detail-row > td {
    border-bottom: 0;
}

.data-table > tbody > tr:has(+ .ci-detail-row) > td {
    border-bottom: 0;
}

.data-table > tbody > tr.ci-detail-row:not(:last-child) > td {
    border-bottom: 1px solid var(--data-table-line);
}

.data-table > tbody > tr.ci-detail-row:hover > * {
    --bs-table-bg-state: transparent;
}

.ci-detail {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px 24px;
    margin: 0;
    padding: 14px 16px 16px;
    background: #f8f9fb;
}

.ci-detail dt {
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #6b7785;
}

.ci-detail dd {
    margin: 2px 0 0;
    overflow-wrap: anywhere;
}

.ci-empty {
    padding: 40px 24px;
    text-align: center;
    color: #6b7785;
}

.ci-empty .bi {
    display: block;
    margin-bottom: 10px;
    font-size: 2rem;
    color: #c3cadb;
}

.ci-empty p {
    margin: 0;
}

@media (max-width: 575.98px) {
    .ci-search__row {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ci-toggle .bi {
        transition: none;
    }
}

/* ---- container in yard (container/rep-container-in-yard, reuses .ci-*) ---- */
.ciy-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.ciy-filters .form-label {
    font-size: .8rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.ciy-filters__field {
    flex: 1 1 220px;
    max-width: 320px;
}

.ciy-filters__field--sm {
    flex: 0 1 170px;
}

.ciy-filters__actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

.ciy-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.ciy-stat {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
}

.ciy-stat__value {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.ciy-stat__label {
    font-size: .75rem;
    color: #6b7785;
}

.ciy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.ciy-chip {
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--spsb-primary);
    font-size: .8rem;
}

.ciy-find {
    flex: 0 1 320px;
}

.ciy-find .form-control {
    padding-left: 36px;
}

@media (max-width: 575.98px) {
    .ciy-filters__field,
    .ciy-filters__field--sm {
        flex-basis: 100%;
        max-width: none;
    }

    .ciy-filters__actions {
        width: 100%;
        margin-left: 0;
    }
}

/* ---- customs hold (site/customs-hold, site/cust-hold, reuses .ci-*) ---- */
.ch-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    padding: 20px;
    margin-bottom: 20px;
}

.ch-search__form {
    flex: 1 1 420px;
}

.ch-search .form-label {
    font-size: .875rem;
    font-weight: 500;
}

.ch-wait {
    align-items: center;
    background: #fff8e6;
    border-color: #f5dfa6;
    color: #7a5200;
}

.ch-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
}

.ch-status--held {
    background: #fdecea;
    color: #b42318;
}

.ch-status--clear {
    background: #e7f6ec;
    color: #146c2e;
}

.ch-hold {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ch-clear {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    color: #52606d;
}

.ch-form {
    padding: 16px 18px;
    border-top: 1px solid #e4e7eb;
    background: #f8f9fb;
}

.ch-form .form-label {
    font-size: .85rem;
    font-weight: 500;
}

.ch-form__row {
    display: flex;
    gap: 10px;
    max-width: 640px;
}

@media (max-width: 575.98px) {
    .ch-form__row {
        flex-direction: column;
    }
}

/* ---- statement of account (invoice/soa, invoice/soa-view, invoice/soa-print) ---- */
.soa-picker {
    padding: 16px 20px;
    margin-bottom: 20px;
}

.soa-picker__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.soa-picker__item {
    padding: 6px 14px;
    border: 1px solid #e4e7eb;
    border-radius: 999px;
    background: #fff;
    color: #1f2933;
    font-size: .875rem;
    font-weight: 500;
    letter-spacing: .02em;
    text-decoration: none;
}

.soa-picker__item:hover {
    border-color: var(--spsb-primary);
    color: var(--spsb-primary);
}

.soa-picker__item.active {
    background: var(--spsb-primary);
    border-color: var(--spsb-primary);
    color: #fff;
}

.soa-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.soa-toolbar__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

.soa-billto {
    padding: 16px 20px;
    font-size: .875rem;
}

.soa-billto__name {
    margin-top: 4px;
    font-size: 1.05rem;
    font-weight: 600;
}

.soa-billto__contact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 8px;
    color: #6b7785;
}

.soa-tiles {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.soa-tile {
    padding: 14px 16px;
    background: #fff;
    border: 1px solid #e4e7eb;
    border-radius: 10px;
}

.soa-tile--main {
    grid-column: 1 / -1;
    background: var(--spsb-primary);
    border-color: var(--spsb-primary);
    color: #fff;
}

.soa-tile--main .pay-summary__label {
    color: rgba(255, 255, 255, .75);
}

.soa-tile__value {
    margin-top: 2px;
    font-size: 1.6rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.soa-tile__value--sm {
    font-size: 1rem;
}

.soa-tile--main .text-muted {
    color: inherit !important;
}

.soa-warning {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    margin-bottom: 12px;
    border: 1px solid #f5c2c0;
    border-radius: 8px;
    background: #fdf2f1;
    color: #8a1c13;
    font-size: .875rem;
}

.soa-aging tbody th,
.soa-aging tfoot th {
    font-weight: 600;
    white-space: nowrap;
}

.data-table > thead > tr > th.soa-late {
    color: #b42318;
}

.soa-notes {
    padding: 10px 14px;
    border: 1px solid #e4e7eb;
    border-radius: 8px;
    background: #f8f9fb;
    color: #6b7785;
    font-size: .68rem;
    line-height: 1.4;
}

.soa-notes ol {
    margin: 0;
    padding-left: 1rem;
}

.soa-notes li + li {
    margin-top: 2px;
}

.soa-notes__ports {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0 16px;
    margin: 3px 0 0;
    padding: 0;
    list-style: none;
}

.soa-notes__ports span {
    font-weight: 600;
    color: #1f2933;
}

@media (max-width: 575.98px) {
    .soa-tiles {
        grid-template-columns: 1fr 1fr;
    }
}

@media print {
    /* A4 portrait (layouts/printing): the @page margin replaces the wrapper spacing */
    .print-wrapper {
        margin: 0;
        padding: 0;
    }

    /* the print width is below the lg breakpoint: keep bill-to and tiles side by side */
    .soa .row > .col-lg-5 {
        flex: 0 0 42%;
        max-width: 42%;
    }

    .soa .row > .col-lg-7 {
        flex: 0 0 58%;
        max-width: 58%;
    }

    .soa .table-responsive {
        overflow: visible;
    }

    .soa .data-table > :not(caption) > * > * {
        padding: 4px 6px;
    }

    .soa-tile {
        padding: 8px 10px;
    }

    .soa-tile__value {
        font-size: 1.2rem;
    }

    .soa-tile__value--sm {
        font-size: .9rem;
    }

    .soa-tile--main {
        background: #fff;
        color: #1f2933;
    }

    .soa-notes {
        padding: 6px 8px;
        font-size: 6.5pt;
    }

    .soa-notes__ports {
        grid-template-columns: repeat(4, 1fr);
    }

    .soa-tile--main .pay-summary__label {
        color: #6b7785;
    }

    .soa .home-card,
    .soa-tile,
    .soa-notes {
        break-inside: avoid;
    }
}

/* ---- sign-in pages (layouts/auth) ---- */
body.auth-page {
    background: #fff;
    color: #1f2933;
}

.auth {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    display: none;
    position: relative;
    flex: 0 0 44%;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 85% 10%, rgba(255, 255, 255, .08), transparent 55%),
        linear-gradient(165deg, #3d5187 0%, #2c3b66 55%, #1f2a4a 100%);
    color: #fff;
}

/* animated waves, web/js/auth-bg.js */
.auth-brand__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.auth-brand__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 48px 56px;
}

.auth-brand__name {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    opacity: .8;
}

.auth-brand__title {
    font-size: 2.4rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.auth-brand__lead {
    max-width: 380px;
    font-size: 1rem;
    line-height: 1.6;
    opacity: .85;
    margin: 0;
}

.auth-brand__foot {
    font-size: .8rem;
    opacity: .6;
}

.auth-main {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px 24px;
}

.auth-panel {
    width: 100%;
    max-width: 380px;
    margin: auto 0;
}

.auth-logo {
    display: block;
    height: 32px;
    margin-bottom: 36px;
}

.auth-tag {
    display: inline-block;
    padding: 3px 10px;
    margin-bottom: 12px;
    border-radius: 999px;
    background: var(--bs-primary-bg-subtle);
    color: var(--spsb-primary);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.auth-title {
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
}

.auth-subtitle {
    color: #6b7785;
    margin-bottom: 28px;
}

.auth-panel .form-label {
    font-size: .875rem;
    font-weight: 500;
}

.auth-panel .form-control-lg {
    font-size: 1rem;
}

/* password input with the show/hide button inside it */
.auth-password {
    position: relative;
}

.auth-password .form-control {
    padding-right: 52px;
    background-image: none; /* no Bootstrap valid/invalid icon next to the eye */
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #6b7785;
    font-size: 1.1rem;
}

.auth-password__toggle:hover {
    background: var(--bs-primary-bg-subtle);
    color: var(--spsb-primary);
}

.auth-password__toggle:focus-visible {
    outline: 2px solid var(--spsb-primary);
    outline-offset: 1px;
}

.auth-link {
    font-size: .875rem;
    font-weight: 500;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-register {
    margin: 24px 0 0;
    text-align: center;
    font-size: .875rem;
    color: #6b7785;
}

.auth-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 20px;
    margin-top: 40px;
    font-size: .78rem;
    color: #9aa5b1;
}

.auth-footer a {
    color: inherit;
    text-decoration: none;
}

.auth-footer .bi {
    margin-right: 4px;
}

@media (min-width: 992px) {
    .auth-brand {
        display: block;
    }
}

/* ---- public pages (main page, container info) ---- */
body.public-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #fff 11%, #e4f1ff 40%, #fef7ff 74%, #fff 100%) no-repeat;
}

.small-table td,
.small-table th {
    font-size: 11px;
}
