/*
 * CRS brand foundation (CRS-74).
 *
 * The one place the CRS look is set. Every colour and font the staff portal
 * uses is a variable in the :root block below; change a value there and it
 * changes on every page. Nothing further down this file, and nothing in a
 * page template, should write a brand colour or font out by hand: hovers and
 * tints are mixed from these values so they follow a change too.
 *
 * Values are those read from Mark Ackred's V1 broker workspace designs.
 * Loaded after the old theme (app.css) so it wins wherever the two disagree.
 */
:root {
    /* Brand colours */
    --crs-maroon: #5E192B;   /* buttons, links, accents */
    --crs-navy: #1B1F2A;     /* sidebar and footer */
    --crs-cream: #F3EFE6;    /* page background */
    --crs-card: #FFFFFF;     /* cards, panels, top bar */

    /* Text and lines */
    --crs-ink: #1F2230;
    --crs-ink-soft: #5F6372;
    --crs-line: #E2DCCF;

    /* Fonts */
    --crs-font-heading: 'Newsreader', Georgia, 'Times New Roman', serif;
    --crs-font-body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;

    /* Status colours, for the supplier upload chips (CRS-77) */
    --crs-ok: #2F6B4F;
    --crs-warn: #9A6A12;
    --crs-bad: #A23A2C;

    /* Shell measurements */
    --crs-sidebar-width: 236px;
    --crs-sidebar-compact-width: 68px;
    --crs-topbar-height: 60px;
    --crs-radius: 8px;

    /* Mixed from the above; not to be set by hand */
    --crs-maroon-strong: color-mix(in srgb, var(--crs-maroon) 82%, black);
    --crs-maroon-tint: color-mix(in srgb, var(--crs-maroon) 10%, white);
    --crs-navy-raised: color-mix(in srgb, var(--crs-navy) 86%, white);
    --crs-on-navy: color-mix(in srgb, white 72%, var(--crs-navy));
    --crs-on-navy-faint: color-mix(in srgb, white 45%, var(--crs-navy));
}

/* ------------------------------------------------------------------ */
/* Base type and colour                                                */
/* ------------------------------------------------------------------ */

body.crs-shell {
    background: var(--crs-cream);
    color: var(--crs-ink);
    font-family: var(--crs-font-body);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

body.crs-shell h1,
body.crs-shell h2,
body.crs-shell h3,
body.crs-shell h4,
body.crs-shell h5 {
    font-family: var(--crs-font-heading);
    color: var(--crs-ink);
}

body.crs-shell h1,
body.crs-shell h2 {
    font-weight: 500;
}

body.crs-shell h3,
body.crs-shell h4,
body.crs-shell h5 {
    font-weight: 600;
}

body.crs-shell a {
    color: var(--crs-maroon);
}

body.crs-shell a:hover,
body.crs-shell a:focus {
    color: var(--crs-maroon-strong);
}

body.crs-shell .text-navy {
    color: var(--crs-maroon);
}

/* ------------------------------------------------------------------ */
/* Buttons and accents the old theme drew in its green                 */
/* ------------------------------------------------------------------ */

body.crs-shell .btn {
    border-radius: 6px;
    font-family: var(--crs-font-body);
}

body.crs-shell .btn-primary {
    background-color: var(--crs-maroon);
    border-color: var(--crs-maroon);
    color: #fff;
}

body.crs-shell .btn-primary:hover,
body.crs-shell .btn-primary:focus,
body.crs-shell .btn-primary:active,
body.crs-shell .btn-primary.active,
body.crs-shell .open .dropdown-toggle.btn-primary {
    background-color: var(--crs-maroon-strong);
    border-color: var(--crs-maroon-strong);
    color: #fff;
}

body.crs-shell .btn-primary.btn-outline {
    background-color: transparent;
    color: var(--crs-maroon);
}

body.crs-shell .btn-primary.btn-outline:hover {
    background-color: var(--crs-maroon);
    color: #fff;
}

body.crs-shell .label-primary,
body.crs-shell .badge-primary,
body.crs-shell .progress-bar {
    background-color: var(--crs-maroon);
}

body.crs-shell .pagination > .active > a,
body.crs-shell .pagination > .active > span,
body.crs-shell .pagination > .active > a:hover,
body.crs-shell .pagination > .active > span:hover {
    background-color: var(--crs-maroon);
    border-color: var(--crs-maroon);
    color: #fff;
}

/* The old theme marks its green focus border !important, so this has to too. */
body.crs-shell .form-control:focus,
body.crs-shell .single-line:focus {
    border-color: var(--crs-maroon) !important;
}

/* ------------------------------------------------------------------ */
/* Cards                                                               */
/* ------------------------------------------------------------------ */

body.crs-shell .ibox {
    border-radius: var(--crs-radius);
    box-shadow: 0 1px 2px rgba(27, 31, 42, .06);
}

body.crs-shell .ibox > :first-child {
    border-top-left-radius: var(--crs-radius);
    border-top-right-radius: var(--crs-radius);
}

body.crs-shell .ibox > :last-child {
    border-bottom-left-radius: var(--crs-radius);
    border-bottom-right-radius: var(--crs-radius);
}

body.crs-shell .ibox-title {
    background: var(--crs-card);
    border-color: var(--crs-line);
    border-top: 3px solid var(--crs-maroon);
}

body.crs-shell .ibox-content {
    background: var(--crs-card);
    border-color: var(--crs-line);
}

body.crs-shell .gray-bg,
body.crs-shell .bg-muted {
    background-color: var(--crs-cream);
}

/* ------------------------------------------------------------------ */
/* Shell: sidebar                                                      */
/* ------------------------------------------------------------------ */

.crs-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 2001;
    display: flex;
    flex-direction: column;
    width: var(--crs-sidebar-width);
    overflow-y: auto;
    background: var(--crs-navy);
    color: var(--crs-on-navy);
    transition: transform .2s ease, width .2s ease;
}

.crs-brand {
    display: block;
    padding: 22px 22px 18px;
    border-bottom: 1px solid var(--crs-navy-raised);
    text-decoration: none;
}

body.crs-shell .crs-brand,
body.crs-shell .crs-brand:hover,
body.crs-shell .crs-brand:focus {
    color: #fff;
}

.crs-brand-mark {
    display: block;
    font-family: var(--crs-font-heading);
    font-size: 30px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: .06em;
}

.crs-brand-sub {
    display: block;
    margin-top: 6px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--crs-on-navy-faint);
}

.crs-nav {
    flex: 1 0 auto;
    padding: 8px 0 16px;
}

.crs-nav-group {
    margin: 18px 22px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--crs-on-navy-faint);
}

.crs-sidebar ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

body.crs-shell .crs-sidebar li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 22px;
    border-left: 3px solid transparent;
    color: var(--crs-on-navy);
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
}

body.crs-shell .crs-sidebar li a:hover,
body.crs-shell .crs-sidebar li a:focus {
    background: var(--crs-navy-raised);
    color: #fff;
}

body.crs-shell .crs-sidebar li.active a {
    background: var(--crs-navy-raised);
    border-left-color: var(--crs-maroon);
    color: #fff;
}

.crs-sidebar li .fa {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.crs-sidebar-foot {
    padding: 14px 0 10px;
    border-top: 1px solid var(--crs-navy-raised);
}

.crs-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 22px 10px;
}

.crs-user-avatar {
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--crs-maroon);
    color: #fff;
    font-family: var(--crs-font-heading);
    font-size: 15px;
    font-weight: 600;
}

.crs-user-text {
    min-width: 0;
}

.crs-user-name {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crs-user-role {
    display: block;
    color: var(--crs-on-navy-faint);
    font-size: 11.5px;
}

/* Pre-production role switcher, above Logout (CRS-80) */
.crs-role-switcher {
    margin: 0 22px 10px;
}

.crs-role-switcher-label {
    display: block;
    margin: 0 0 4px;
    color: var(--crs-on-navy-faint);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.crs-role-switcher-row {
    display: flex;
    gap: 6px;
}

.crs-role-switcher select {
    flex: 1 1 auto;
    min-width: 0;
    height: 28px;
    padding: 0 6px;
    border: 1px solid var(--crs-navy-raised);
    border-radius: var(--crs-radius);
    background: var(--crs-navy-raised);
    color: #fff;
    font-family: var(--crs-font-body);
    font-size: 12px;
}

.crs-role-switcher button,
.crs-switch-bar button {
    flex: none;
    height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: var(--crs-radius);
    background: var(--crs-maroon);
    color: #fff;
    font-family: var(--crs-font-body);
    font-size: 12px;
    font-weight: 600;
}

.crs-role-switcher button:hover,
.crs-role-switcher button:focus {
    background: var(--crs-maroon-strong);
}

.crs-role-switcher-empty {
    margin: 0;
    color: var(--crs-on-navy-faint);
    font-size: 11.5px;
}

/* The bar across every page while a test user is being viewed (CRS-80) */
.crs-switch-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 12px;
    padding: 6px 24px;
    background: var(--crs-maroon);
    color: #fff;
    font-size: 12.5px;
}

.crs-switch-bar form {
    margin: 0;
}

.crs-switch-bar-real {
    color: var(--crs-maroon-tint);
}

.crs-switch-bar button {
    height: 26px;
    background: var(--crs-card);
    color: var(--crs-maroon);
}

.crs-switch-bar button:hover,
.crs-switch-bar button:focus {
    background: var(--crs-maroon-tint);
}

.crs-sidebar-backdrop {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Shell: page and top bar                                             */
/* ------------------------------------------------------------------ */

body.crs-shell #wrapper {
    min-height: 100vh;
}

body.crs-shell #page-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 100vh;
    margin: 0 0 0 var(--crs-sidebar-width);
    padding: 0;
    background: var(--crs-cream);
}

.crs-topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--crs-topbar-height);
    padding: 10px 24px;
    background: var(--crs-card);
    border-bottom: 1px solid var(--crs-line);
}

.crs-menu-toggle {
    display: none;
    flex: none;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--crs-line);
    border-radius: 6px;
    background: var(--crs-card);
    color: var(--crs-navy);
    font-size: 16px;
}

.crs-search {
    display: flex;
    flex: 1 1 360px;
    align-items: center;
    max-width: 560px;
    min-width: 0;
    height: 38px;
    margin: 0;
    padding: 0 4px 0 12px;
    border: 1px solid var(--crs-line);
    border-radius: 6px;
    background: var(--crs-cream);
}

.crs-search:focus-within {
    border-color: var(--crs-maroon);
}

.crs-search .fa {
    flex: none;
    color: var(--crs-ink-soft);
}

.crs-search input,
.crs-search select {
    height: 100%;
    border: 0;
    background: transparent;
    color: var(--crs-ink);
    font-family: var(--crs-font-body);
    font-size: 13.5px;
    outline: none;
}

.crs-search input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 10px;
}

.crs-search select {
    flex: none;
    padding: 0 6px;
    border-left: 1px solid var(--crs-line);
    color: var(--crs-ink-soft);
    font-weight: 600;
    cursor: pointer;
}

.crs-rates {
    display: flex;
    flex: none;
    gap: 14px;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
    color: var(--crs-ink);
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.crs-rates span {
    margin-right: 2px;
    color: var(--crs-ink-soft);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
}

body.crs-shell .crs-btn-new-deal {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 6px;
    height: 38px;
    padding: 0 16px;
    border-radius: 6px;
    background: var(--crs-maroon);
    color: #fff;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

body.crs-shell .crs-btn-new-deal:hover,
body.crs-shell .crs-btn-new-deal:focus {
    background: var(--crs-maroon-strong);
    color: #fff;
}

/* Pushed to the right edge, unless the rates are showing and already are. */
body.crs-shell .crs-btn-new-deal {
    margin-left: auto;
}

body.crs-shell .crs-rates + .crs-btn-new-deal {
    margin-left: 0;
}

.crs-page-title {
    padding: 22px 24px 0;
}

body.crs-shell .crs-page-title h1 {
    margin: 0;
    font-size: 26px;
    line-height: 1.2;
}

body.crs-shell .wrapper-content {
    flex: 1 0 auto;
    padding: 20px 24px 32px;
}

body.crs-shell #page-wrapper > .footer {
    position: static;
    min-height: 40px;
    padding: 12px 24px;
    border: 0;
    background: var(--crs-navy);
    color: var(--crs-on-navy-faint);
}

/* Tables take the width they are given rather than pushing the page
   sideways; long words and codes wrap inside their cell. */
body.crs-shell .wrapper-content table {
    max-width: 100%;
}

body.crs-shell .wrapper-content td {
    overflow-wrap: break-word;
}

body.crs-shell .wrapper-content .table {
    font-size: 13px;
}

body.crs-shell .wrapper-content .table > thead > tr > th,
body.crs-shell .wrapper-content .table > tbody > tr > td,
body.crs-shell .wrapper-content .table > tfoot > tr > td {
    padding: 8px 6px;
}

/* ------------------------------------------------------------------ */
/* Compact sidebar: icons only, on the wide wine list screens          */
/* ------------------------------------------------------------------ */

body.crs-shell.mini-navbar .crs-sidebar {
    width: var(--crs-sidebar-compact-width);
}

body.crs-shell.mini-navbar #page-wrapper {
    margin-left: var(--crs-sidebar-compact-width);
}

body.crs-shell.mini-navbar .crs-sidebar .nav-label,
body.crs-shell.mini-navbar .crs-brand-sub,
body.crs-shell.mini-navbar .crs-nav-group,
body.crs-shell.mini-navbar .crs-user-text {
    display: none;
}

body.crs-shell.mini-navbar .crs-role-switcher {
    display: none;
}

body.crs-shell.mini-navbar .crs-brand {
    padding: 20px 0 16px;
    text-align: center;
}

body.crs-shell.mini-navbar .crs-brand-mark {
    font-size: 18px;
}

body.crs-shell.mini-navbar .crs-sidebar li a {
    justify-content: center;
    padding: 11px 0;
}

body.crs-shell.mini-navbar .crs-user {
    justify-content: center;
    padding: 0 0 10px;
}

body.crs-shell.mini-navbar .crs-menu-toggle {
    display: inline-block;
}

/* Opened from the toggle: the full sidebar laid over the page. */
body.crs-shell.mini-navbar.crs-menu-open .crs-sidebar {
    width: var(--crs-sidebar-width);
}

body.crs-shell.mini-navbar.crs-menu-open .crs-sidebar .nav-label,
body.crs-shell.mini-navbar.crs-menu-open .crs-brand-sub,
body.crs-shell.mini-navbar.crs-menu-open .crs-nav-group,
body.crs-shell.mini-navbar.crs-menu-open .crs-user-text,
body.crs-shell.mini-navbar.crs-menu-open .crs-role-switcher {
    display: block;
}

body.crs-shell.mini-navbar.crs-menu-open .crs-brand {
    padding: 22px 22px 18px;
    text-align: left;
}

body.crs-shell.mini-navbar.crs-menu-open .crs-brand-mark {
    font-size: 30px;
}

body.crs-shell.mini-navbar.crs-menu-open .crs-sidebar li a {
    justify-content: flex-start;
    padding: 8px 22px;
}

body.crs-shell.mini-navbar.crs-menu-open .crs-user {
    justify-content: flex-start;
    padding: 0 22px 10px;
}

body.crs-shell.crs-menu-open .crs-sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: block;
    background: rgba(27, 31, 42, .45);
}

/* ------------------------------------------------------------------ */
/* Narrower screens                                                    */
/* ------------------------------------------------------------------ */

@media (max-width: 1180px) {
    .crs-rates {
        display: none;
    }

    body.crs-shell .crs-rates + .crs-btn-new-deal {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    body.crs-shell .crs-sidebar,
    body.crs-shell.mini-navbar .crs-sidebar {
        width: var(--crs-sidebar-width);
        transform: translateX(-100%);
    }

    body.crs-shell.crs-menu-open .crs-sidebar {
        transform: none;
    }

    body.crs-shell.mini-navbar .crs-sidebar .nav-label,
    body.crs-shell.mini-navbar .crs-brand-sub,
    body.crs-shell.mini-navbar .crs-nav-group,
    body.crs-shell.mini-navbar .crs-user-text,
    body.crs-shell.mini-navbar .crs-role-switcher {
        display: block;
    }

    body.crs-shell.mini-navbar .crs-brand {
        padding: 22px 22px 18px;
        text-align: left;
    }

    body.crs-shell.mini-navbar .crs-brand-mark {
        font-size: 30px;
    }

    body.crs-shell.mini-navbar .crs-sidebar li a {
        justify-content: flex-start;
        padding: 8px 22px;
    }

    body.crs-shell #page-wrapper,
    body.crs-shell.mini-navbar #page-wrapper {
        margin-left: 0;
    }

    .crs-menu-toggle {
        display: inline-block;
    }

    .crs-topbar {
        gap: 8px;
        padding: 10px 12px;
    }

    .crs-switch-bar {
        padding: 6px 12px;
    }

    .crs-switch-bar-real {
        display: none;
    }

    .crs-search {
        flex-basis: 0;
    }

    body.crs-shell .crs-btn-new-deal {
        padding: 0 12px;
    }

    .crs-btn-new-deal-label {
        display: none;
    }

    .crs-page-title {
        padding: 16px 12px 0;
    }

    body.crs-shell .crs-page-title h1 {
        font-size: 22px;
    }

    body.crs-shell .wrapper-content {
        padding: 14px 12px 24px;
    }

    /* A table too wide for a phone scrolls inside its own card, so every
       column stays reachable without the whole page moving sideways. */
    body.crs-shell .ibox-content {
        overflow-x: auto;
    }

    .crs-search select {
        max-width: 104px;
    }
}

/* ------------------------------------------------------------------ */
/* Supplier upload journey (CRS-77): step bar, count cards, status     */
/* chips, the two-pane exceptions screen                               */
/* ------------------------------------------------------------------ */

.crs-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 0 0 14px;
    padding: 0;
    list-style: none;
    counter-reset: crs-step;
}

.crs-steps li {
    counter-increment: crs-step;
}

body.crs-shell .crs-steps a,
.crs-steps span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid var(--crs-line);
    border-radius: 999px;
    background: var(--crs-card);
    color: var(--crs-ink-soft);
    font-size: 13px;
    text-decoration: none;
}

.crs-steps a::before,
.crs-steps span::before {
    content: counter(crs-step);
    font-weight: 700;
}

.crs-steps li.crs-step-aside a::before,
.crs-steps li.crs-step-aside span::before {
    content: none;
}

body.crs-shell .crs-steps li.active a {
    border-color: var(--crs-maroon);
    background: var(--crs-maroon);
    color: var(--crs-card);
}

.crs-steps span {
    opacity: .55;
}

.crs-step-aside {
    margin-left: auto;
}

.crs-step-aside + .crs-step-aside {
    margin-left: 0;
}

.crs-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.crs-card {
    padding: 10px 14px;
    border: 1px solid var(--crs-line);
    border-radius: var(--crs-radius);
    background: var(--crs-card);
}

.crs-card strong {
    display: block;
    font-family: var(--crs-font-heading);
    font-size: 24px;
    line-height: 1.2;
    color: var(--crs-ink);
}

.crs-card span {
    color: var(--crs-ink-soft);
    font-size: 12px;
}

.crs-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
    margin: 0;
    color: var(--crs-ink-soft);
}

.crs-facts strong {
    color: var(--crs-ink);
}

.crs-chip {
    display: inline-block;
    margin: 1px 2px 1px 0;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.crs-chip-ok {
    background: color-mix(in srgb, var(--crs-ok) 14%, white);
    color: var(--crs-ok);
}

.crs-chip-warn {
    background: color-mix(in srgb, var(--crs-warn) 16%, white);
    color: var(--crs-warn);
}

.crs-chip-bad {
    background: color-mix(in srgb, var(--crs-bad) 13%, white);
    color: var(--crs-bad);
}

.crs-chip-muted {
    background: var(--crs-cream);
    color: var(--crs-ink-soft);
}

.crs-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.crs-toolbar .nav-tabs {
    flex: 1 1 auto;
    border-bottom: 0;
}

.crs-toolbar .form-control {
    width: auto;
    min-width: 0;
}

body.crs-shell .crs-toolbar .nav-tabs > li.active {
    border: 0;
    background: transparent;
}

body.crs-shell .crs-toolbar .nav-tabs > li > a {
    padding: 6px 10px;
    border-radius: var(--crs-radius) var(--crs-radius) 0 0;
    color: var(--crs-ink-soft);
}

body.crs-shell .crs-toolbar .nav-tabs > li.active > a,
body.crs-shell .crs-toolbar .nav-tabs > li.active > a:hover,
body.crs-shell .crs-toolbar .nav-tabs > li.active > a:focus {
    border: 0;
    border-bottom: 2px solid var(--crs-maroon);
    background: transparent;
    color: var(--crs-maroon);
    font-weight: 600;
}

.crs-muted {
    color: var(--crs-ink-soft);
    font-size: 12px;
}

.crs-upload-table {
    table-layout: fixed;
    width: 100%;
}

.crs-upload-table td {
    vertical-align: top;
}

/* How many lines go live and how many are held back (CRS-88). */
.crs-publish-split {
    font-size: 14px;
    line-height: 1.6;
}

.crs-inline-form {
    display: inline-block;
}

/* The Export choice on the publish step (CRS-79): opens under the button,
   aligned to its left edge, and is not clipped by its card. */
body.crs-shell .ibox-content.crs-export-card {
    overflow: visible;
}

.ibox .crs-export-card .dropdown-menu {
    left: 0;
    right: auto;
}

.crs-split {
    display: grid;
    grid-template-columns: minmax(220px, 300px) 1fr;
    gap: 14px;
    align-items: start;
}

.crs-exception-list {
    max-height: 70vh;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

body.crs-shell .crs-exception-list a {
    display: block;
    padding: 7px 10px;
    border-bottom: 1px solid var(--crs-line);
    color: var(--crs-ink);
    font-size: 12px;
    text-decoration: none;
}

body.crs-shell .crs-exception-list li.active a {
    background: var(--crs-maroon-tint);
    border-left: 3px solid var(--crs-maroon);
}

.crs-exception-list li.crs-done a {
    opacity: .6;
}

.crs-compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.crs-compare > div {
    padding: 10px 12px;
    border: 1px solid var(--crs-line);
    border-radius: var(--crs-radius);
}

.crs-compare h4 {
    margin: 0 0 6px;
    color: var(--crs-ink-soft);
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.crs-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.crs-fields label {
    display: block;
    margin: 0 0 2px;
    color: var(--crs-ink-soft);
    font-size: 11px;
    font-weight: 600;
}

.crs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

body.crs-shell .wrapper-content .btn-default,
body.crs-shell .modal .btn-default {
    border-color: var(--crs-line);
    background: var(--crs-card);
    color: var(--crs-ink);
}

body.crs-shell .wrapper-content .btn-default:hover,
body.crs-shell .wrapper-content .btn-default:focus,
body.crs-shell .modal .btn-default:hover,
body.crs-shell .modal .btn-default:focus {
    border-color: var(--crs-maroon);
    color: var(--crs-maroon);
}

.crs-picker-results {
    max-height: 220px;
    margin: 6px 0 10px;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.crs-picker-results li {
    padding: 5px 8px;
    border-bottom: 1px solid var(--crs-line);
    font-size: 12px;
    cursor: pointer;
}

.crs-picker-results li:hover,
.crs-picker-results li.active {
    background: var(--crs-maroon-tint);
}

.crs-dropzone {
    padding: 22px 14px;
    border: 2px dashed var(--crs-line);
    border-radius: var(--crs-radius);
    text-align: center;
    color: var(--crs-ink-soft);
}

.crs-dropzone.crs-dragover {
    border-color: var(--crs-maroon);
    background: var(--crs-maroon-tint);
}

@media (max-width: 768px) {
    .crs-split,
    .crs-compare {
        grid-template-columns: 1fr;
    }

    .crs-exception-list {
        max-height: 30vh;
    }

    .crs-step-aside {
        margin-left: 0;
    }

    .crs-upload-table .crs-hide-phone {
        display: none;
    }

    body.crs-shell .crs-upload-table {
        table-layout: auto;
    }

    body.crs-shell .crs-upload-table th {
        width: auto !important;
    }

    .crs-upload-table .crs-chip {
        white-space: normal;
    }

    .crs-reset-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ------------------------------------------------------------------ */
/* Signed-out pages (CRS-81): login, forgot and reset password         */
/* ------------------------------------------------------------------ */

body.crs-shell.crs-guest {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    margin: 0;
    padding: 24px 16px;
}

.crs-guest-card {
    width: 100%;
    max-width: 380px;
    overflow: hidden;
    border: 1px solid var(--crs-line);
    border-radius: var(--crs-radius);
    background: var(--crs-card);
    box-shadow: 0 1px 2px rgba(27, 31, 42, .06);
}

.crs-guest-brand {
    padding: 22px 28px 18px;
    background: var(--crs-navy);
    color: #fff;
    text-align: center;
}

.crs-guest-body {
    padding: 24px 28px 26px;
}

body.crs-shell .crs-guest-body h1 {
    margin: 0 0 16px;
    font-size: 24px;
    line-height: 1.2;
    text-align: center;
}

.crs-guest-intro {
    margin: -6px 0 16px;
    color: var(--crs-ink-soft);
    text-align: center;
}

body.crs-shell .crs-guest-body .form-control {
    height: 40px;
    border-color: var(--crs-line);
    border-radius: 6px;
    font-family: var(--crs-font-body);
}

body.crs-shell .crs-guest-body .btn-primary {
    height: 40px;
    margin-bottom: 14px;
    font-weight: 600;
}

body.crs-shell .crs-guest-link {
    display: block;
    text-align: center;
    font-weight: 500;
}

@media (max-width: 480px) {
    .crs-guest-brand {
        padding: 18px 20px 14px;
    }

    .crs-guest-body {
        padding: 20px 20px 22px;
    }
}

/* ------------------------------------------------------------------ */
/* Every other built screen (CRS-94): the old theme's components drawn */
/* in the brand. Status colours are the three above; nothing here     */
/* writes a colour by hand.                                           */
/* ------------------------------------------------------------------ */

/* Spacing. The old theme spaced blocks by a share of the page width, which
   opened large gaps on a wide screen; these are fixed and compact. */
body.crs-shell .voffset1 { margin-top: 6px; }
body.crs-shell .voffset2 { margin-top: 10px; }
body.crs-shell .voffset3 { margin-top: 14px; }
body.crs-shell .voffset4 { margin-top: 18px; }

body.crs-shell .ibox {
    margin-bottom: 18px;
}

/* The old theme floats the title inside its bar; flow-root keeps the bar
   wrapped round it now the bar has no fixed height. */
body.crs-shell .ibox-title {
    display: flow-root;
    min-height: 0;
    padding: 12px 16px 10px;
}

body.crs-shell .ibox-title h5 {
    margin: 0;
}

body.crs-shell .ibox-title h5 {
    font-family: var(--crs-font-heading);
    font-size: 16px;
    font-weight: 600;
    color: var(--crs-ink);
}

body.crs-shell .ibox-content {
    padding: 14px 16px;
}

body.crs-shell .ibox-content.p-md {
    padding: 16px;
}

body.crs-shell .hr-line-dashed {
    border-top-color: var(--crs-line);
}

body.crs-shell small,
body.crs-shell .text-muted,
body.crs-shell .help-block {
    color: var(--crs-ink-soft);
}

/* Text and labels in the status colours */
body.crs-shell .text-primary { color: var(--crs-maroon); }
body.crs-shell .text-success { color: var(--crs-ok); }
body.crs-shell .text-info { color: var(--crs-navy); }
body.crs-shell .text-warning { color: var(--crs-warn); }
body.crs-shell .text-danger { color: var(--crs-bad); }

body.crs-shell .label,
body.crs-shell .badge {
    border-radius: 999px;
    font-family: var(--crs-font-body);
    font-weight: 600;
}

body.crs-shell .label,
body.crs-shell .label-default,
body.crs-shell .badge {
    background-color: var(--crs-cream);
    color: var(--crs-ink-soft);
}

body.crs-shell .label-primary,
body.crs-shell .badge-primary {
    background-color: var(--crs-maroon);
    color: #fff;
}

body.crs-shell .label-success,
body.crs-shell .badge-success {
    background-color: color-mix(in srgb, var(--crs-ok) 14%, white);
    color: var(--crs-ok);
}

body.crs-shell .label-info,
body.crs-shell .badge-info {
    background-color: color-mix(in srgb, var(--crs-navy) 10%, white);
    color: var(--crs-navy);
}

body.crs-shell .label-warning,
body.crs-shell .badge-warning {
    background-color: color-mix(in srgb, var(--crs-warn) 16%, white);
    color: var(--crs-warn);
}

body.crs-shell .label-danger,
body.crs-shell .badge-danger {
    background-color: color-mix(in srgb, var(--crs-bad) 13%, white);
    color: var(--crs-bad);
}

/* Messages */
body.crs-shell .alert {
    padding: 10px 14px;
    border-width: 1px 1px 1px 4px;
    border-radius: var(--crs-radius);
}

body.crs-shell .alert-success {
    border-color: color-mix(in srgb, var(--crs-ok) 30%, white);
    border-left-color: var(--crs-ok);
    background-color: color-mix(in srgb, var(--crs-ok) 8%, white);
    color: var(--crs-ok);
}

body.crs-shell .alert-info {
    border-color: var(--crs-line);
    border-left-color: var(--crs-navy);
    background-color: var(--crs-card);
    color: var(--crs-ink);
}

body.crs-shell .alert-warning {
    border-color: color-mix(in srgb, var(--crs-warn) 30%, white);
    border-left-color: var(--crs-warn);
    background-color: color-mix(in srgb, var(--crs-warn) 8%, white);
    color: var(--crs-warn);
}

body.crs-shell .alert-danger {
    border-color: color-mix(in srgb, var(--crs-bad) 30%, white);
    border-left-color: var(--crs-bad);
    background-color: color-mix(in srgb, var(--crs-bad) 7%, white);
    color: var(--crs-bad);
}

body.crs-shell .alert .alert-link,
body.crs-shell .alert a {
    color: inherit;
    text-decoration: underline;
}

/* Buttons the old theme drew in its blue, teal, orange and red */
body.crs-shell .btn-sm,
body.crs-shell .btn-xs {
    border-radius: 5px;
}

body.crs-shell .btn-success,
body.crs-shell .btn-info,
body.crs-shell .btn-warning,
body.crs-shell .btn-danger,
body.crs-shell .btn-red {
    color: #fff;
}

body.crs-shell .btn-success { background-color: var(--crs-ok); border-color: var(--crs-ok); }
body.crs-shell .btn-info { background-color: var(--crs-navy); border-color: var(--crs-navy); }
body.crs-shell .btn-warning { background-color: var(--crs-warn); border-color: var(--crs-warn); }

body.crs-shell .btn-danger,
body.crs-shell .btn-red {
    background-color: var(--crs-bad);
    border-color: var(--crs-bad);
}

body.crs-shell .btn-success:hover,
body.crs-shell .btn-success:focus,
body.crs-shell .btn-success:active {
    background-color: color-mix(in srgb, var(--crs-ok) 82%, black);
    border-color: color-mix(in srgb, var(--crs-ok) 82%, black);
    color: #fff;
}

body.crs-shell .btn-info:hover,
body.crs-shell .btn-info:focus,
body.crs-shell .btn-info:active {
    background-color: var(--crs-navy-raised);
    border-color: var(--crs-navy-raised);
    color: #fff;
}

body.crs-shell .btn-warning:hover,
body.crs-shell .btn-warning:focus,
body.crs-shell .btn-warning:active {
    background-color: color-mix(in srgb, var(--crs-warn) 82%, black);
    border-color: color-mix(in srgb, var(--crs-warn) 82%, black);
    color: #fff;
}

body.crs-shell .btn-danger:hover,
body.crs-shell .btn-danger:focus,
body.crs-shell .btn-danger:active,
body.crs-shell .btn-red:hover,
body.crs-shell .btn-red:focus,
body.crs-shell .btn-red:active {
    background-color: color-mix(in srgb, var(--crs-bad) 82%, black);
    border-color: color-mix(in srgb, var(--crs-bad) 82%, black);
    color: #fff;
}

body.crs-shell .btn-white {
    border-color: var(--crs-line);
    background: var(--crs-card);
    color: var(--crs-ink);
}

body.crs-shell .btn-white:hover,
body.crs-shell .btn-white:focus,
body.crs-shell .btn-white.active {
    border-color: var(--crs-maroon);
    color: var(--crs-maroon);
}

body.crs-shell .btn-link,
body.crs-shell .btn-link:hover,
body.crs-shell .btn-link:focus {
    color: var(--crs-maroon);
}

body.crs-shell .crs-save-link {
    color: var(--crs-ok);
    font-weight: 600;
}

/* Forms */
body.crs-shell .form-control {
    border-color: var(--crs-line);
    border-radius: 6px;
    color: var(--crs-ink);
    font-family: var(--crs-font-body);
    font-size: 13.5px;
    box-shadow: none;
}

body.crs-shell .form-control[disabled],
body.crs-shell .form-control[readonly] {
    background-color: var(--crs-cream);
}

body.crs-shell .control-label,
body.crs-shell label {
    color: var(--crs-ink);
    font-weight: 600;
}

body.crs-shell .has-error .form-control { border-color: var(--crs-bad); }
body.crs-shell .has-error .control-label,
body.crs-shell .has-error .help-block { color: var(--crs-bad); }
body.crs-shell .has-success .form-control { border-color: var(--crs-ok); }
body.crs-shell .has-success .control-label { color: var(--crs-ok); }

/* The ticked boxes on the wine searches are the old theme's green picture;
   turned to the brand red rather than redrawn. */
body.crs-shell .icheckbox_square-green,
body.crs-shell .iradio_square-green {
    filter: hue-rotate(178deg) saturate(.75) brightness(.62);
}

/* Bootstrap tags input on the wine searches: the box takes the full width
   and the vintage tags sit on their own line height. */
body.crs-shell .bootstrap-tagsinput {
    width: 100%;
    border-color: var(--crs-line);
    border-radius: 6px;
    box-shadow: none;
}

body.crs-shell .bootstrap-tagsinput .label {
    line-height: 2;
}

body.crs-shell .bootstrap-tagsinput .tag.label-info {
    background-color: var(--crs-maroon-tint);
    color: var(--crs-maroon);
}

/* Tabs and pills */
body.crs-shell .nav-tabs {
    border-bottom: 1px solid var(--crs-line);
}

body.crs-shell .nav.nav-tabs > li > a {
    padding: 8px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--crs-ink-soft);
    font-weight: 600;
}

body.crs-shell .nav.nav-tabs > li > a:hover,
body.crs-shell .nav.nav-tabs > li > a:focus {
    background: transparent;
    color: var(--crs-maroon);
}

body.crs-shell .nav.nav-tabs > li.active,
body.crs-shell .nav.nav-tabs > li.active > a,
body.crs-shell .nav.nav-tabs > li.active > a:hover,
body.crs-shell .nav.nav-tabs > li.active > a:focus {
    border: 0;
    background: transparent;
}

body.crs-shell .nav.nav-tabs > li.active > a,
body.crs-shell .nav.nav-tabs > li.active > a:hover,
body.crs-shell .nav.nav-tabs > li.active > a:focus {
    border-bottom: 2px solid var(--crs-maroon);
    color: var(--crs-maroon);
}

body.crs-shell .nav-pills > li > a {
    border-radius: 6px;
    color: var(--crs-ink);
}

body.crs-shell .nav-pills > li.active > a,
body.crs-shell .nav-pills > li.active > a:hover,
body.crs-shell .nav-pills > li.active > a:focus,
body.crs-shell .list-group-item.active,
body.crs-shell .list-group-item.active:hover,
body.crs-shell .list-group-item.active:focus,
body.crs-shell .dropdown-menu > .active > a,
body.crs-shell .dropdown-menu > .active > a:hover,
body.crs-shell .dropdown-menu > .active > a:focus {
    border-color: var(--crs-maroon);
    background-color: var(--crs-maroon);
    color: #fff;
}

body.crs-shell .dropdown-menu {
    border-color: var(--crs-line);
    border-radius: var(--crs-radius);
    box-shadow: 0 6px 18px rgba(27, 31, 42, .12);
}

body.crs-shell .dropdown-menu > li > a:hover,
body.crs-shell .dropdown-menu > li > a:focus {
    background-color: var(--crs-maroon-tint);
    color: var(--crs-ink);
}

/* Tables */
body.crs-shell .wrapper-content .table > thead > tr > th {
    border-bottom: 1px solid var(--crs-line);
    color: var(--crs-ink-soft);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: bottom;
}

body.crs-shell .wrapper-content .table > tbody > tr > td,
body.crs-shell .wrapper-content .table > tbody > tr > th,
body.crs-shell .wrapper-content .table > tfoot > tr > td {
    border-top-color: var(--crs-line);
    vertical-align: middle;
}

body.crs-shell .table-striped > tbody > tr:nth-of-type(odd) {
    background-color: color-mix(in srgb, var(--crs-cream) 55%, white);
}

body.crs-shell .table-hover > tbody > tr:hover,
body.crs-shell .table > tbody > tr.clickable:hover {
    background-color: var(--crs-maroon-tint);
}

body.crs-shell .table-bordered,
body.crs-shell .table-bordered > thead > tr > th,
body.crs-shell .table-bordered > tbody > tr > td {
    border-color: var(--crs-line);
}

/* Data tables (wine lists, searches, dashboard tables) */
body.crs-shell .dataTables_wrapper {
    padding-bottom: 10px;
}

body.crs-shell .dataTables_filter label,
body.crs-shell .dataTables_length label {
    margin-right: 5px;
    font-weight: 600;
}

body.crs-shell .dataTables_filter input,
body.crs-shell .dataTables_length select {
    border: 1px solid var(--crs-line);
    border-radius: 6px;
}

body.crs-shell .dataTables_info {
    color: var(--crs-ink-soft);
    font-size: 12.5px;
}

body.crs-shell button.DTTT_button,
body.crs-shell div.DTTT_button,
body.crs-shell a.DTTT_button,
body.crs-shell .dt-buttons .btn,
body.crs-shell .dt-button {
    padding: 6px 8px;
    border: 1px solid var(--crs-line);
    border-radius: 6px;
    background: var(--crs-card);
    color: var(--crs-ink);
    box-shadow: none;
}

body.crs-shell button.DTTT_button:hover,
body.crs-shell div.DTTT_button:hover,
body.crs-shell a.DTTT_button:hover,
body.crs-shell .dt-buttons .btn:hover,
body.crs-shell .dt-button:hover {
    border-color: var(--crs-maroon);
    background: var(--crs-card);
    color: var(--crs-maroon);
}

body.DTTT_Print,
body.DTTT_Print #page-wrapper {
    margin: 0;
    background: var(--crs-card);
}

body.crs-shell .pagination > li > a,
body.crs-shell .pagination > li > span {
    border-color: var(--crs-line);
    color: var(--crs-ink);
}

body.crs-shell .pagination > li > a:hover,
body.crs-shell .pagination > li > span:hover {
    background-color: var(--crs-maroon-tint);
    color: var(--crs-maroon);
}

/* Pop-up windows */
body.crs-shell .modal-content {
    border: 1px solid var(--crs-line);
    border-radius: var(--crs-radius);
    box-shadow: 0 12px 32px rgba(27, 31, 42, .18);
}

body.crs-shell .modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--crs-line);
    border-top: 3px solid var(--crs-maroon);
    border-radius: var(--crs-radius) var(--crs-radius) 0 0;
}

body.crs-shell .modal-title {
    font-family: var(--crs-font-heading);
    font-size: 19px;
    font-weight: 600;
}

body.crs-shell .modal-body {
    padding: 16px 18px;
}

body.crs-shell .modal-footer {
    padding: 12px 18px;
    border-top: 1px solid var(--crs-line);
}

body.crs-shell .modal-backdrop.in {
    opacity: .45;
}

body.crs-shell .tooltip-inner {
    background-color: var(--crs-navy);
}

/* Progress bars, and the deal-making step wizard built from them */
body.crs-shell .progress {
    background-color: var(--crs-cream);
    box-shadow: none;
}

body.crs-shell .progress-bar-success { background-color: var(--crs-ok); }
body.crs-shell .progress-bar-warning { background-color: var(--crs-warn); }
body.crs-shell .progress-bar-danger { background-color: var(--crs-bad); }
body.crs-shell .progress-bar-info { background-color: var(--crs-navy); }

body.crs-shell .bs-wizard {
    margin-top: 6px;
    margin-bottom: 14px;
    padding: 0 0 6px;
}

body.crs-shell .bs-wizard > .bs-wizard-step .bs-wizard-stepnum {
    color: var(--crs-ink);
    font-size: 13px;
    font-weight: 600;
}

body.crs-shell .bs-wizard > .bs-wizard-step .bs-wizard-info {
    color: var(--crs-ink-soft);
    font-size: 12px;
}

body.crs-shell .bs-wizard > .bs-wizard-step > .bs-wizard-dot {
    background: var(--crs-maroon-tint);
}

body.crs-shell .bs-wizard > .bs-wizard-step > .progress > .progress-bar {
    background: var(--crs-maroon);
}

body.crs-shell .bs-wizard > .bs-wizard-step > .bs-wizard-dot::after {
    background: var(--crs-maroon);
}

body.crs-shell .bs-wizard > .bs-wizard-step.disabled > .bs-wizard-dot {
    background-color: var(--crs-cream);
}

body.crs-shell .bs-wizard > .bs-wizard-step > .progress {
    height: 4px;
    margin: 16px 0;
    background-color: var(--crs-line);
}

body.crs-shell .bs-wizard > .bs-wizard-step > .bs-wizard-dot {
    top: 39px;
}

/* The deal totals on Confirm wines */
body.crs-shell .totals-box,
body.crs-shell .deal-maker-select-wines .totals-box {
    padding: 14px 18px;
    border: 1px solid var(--crs-line);
    border-left: 3px solid var(--crs-maroon);
    border-radius: var(--crs-radius);
    background-color: var(--crs-card);
    font-variant-numeric: tabular-nums;
}

/* File drop areas (wine list upload, homepage images) */
body.crs-shell .dropzone {
    min-height: 120px;
    border: 2px dashed var(--crs-line);
    border-radius: var(--crs-radius);
    background: var(--crs-card);
    color: var(--crs-ink-soft);
}

body.crs-shell .dropzone:hover,
body.crs-shell .dropzone.dz-drag-hover {
    border-color: var(--crs-maroon);
    background: var(--crs-maroon-tint);
}

/* Homepage boxes: the wine picture, and the space left where there is none */
body.crs-shell .wine-image {
    border: 1px solid var(--crs-line);
    border-radius: var(--crs-radius);
}

body.crs-shell .wine-image.crs-image-empty {
    background-color: var(--crs-navy);
}

/* Date picker on Manage deals */
body.crs-shell .datepicker table tr td.active,
body.crs-shell .datepicker table tr td.active:hover,
body.crs-shell .datepicker table tr td.active.active {
    background: var(--crs-maroon);
    color: #fff;
    text-shadow: none;
}

/* jQuery UI autocomplete lists (client and wine pickers) */
body.crs-shell .ui-autocomplete {
    border-color: var(--crs-line);
    border-radius: var(--crs-radius);
    font-family: var(--crs-font-body);
    font-size: 13px;
}

body.crs-shell .ui-menu .ui-menu-item .ui-state-focus,
body.crs-shell .ui-menu .ui-menu-item .ui-state-active {
    margin: 0;
    border-color: var(--crs-maroon-tint);
    background: var(--crs-maroon-tint);
    color: var(--crs-ink);
}

@media (max-width: 768px) {
    /* No tighter than the grid's own 15px gutter, which the rows inside a
       card pull back with negative margins. */
    body.crs-shell .ibox-title,
    body.crs-shell .ibox-content {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Several forms nest one grid row inside another, which on a phone pulls
       the fields out to the card's edge. */
    body.crs-shell .ibox-content .row .row {
        margin-left: 0;
        margin-right: 0;
    }

    body.crs-shell .nav.nav-tabs > li > a {
        padding: 6px 10px;
    }

    body.crs-shell .bs-wizard > .bs-wizard-step .bs-wizard-info {
        display: none;
    }

    body.crs-shell .modal-dialog {
        margin: 10px;
    }
}
