/* Portal spacing overrides on the VoiceX theme; loaded last. Screen only, so print and exports keep the theme. */

/* header */
@media screen {
    .layout-top-nav .nav-brand {
        position: fixed;
        z-index: 811;
        margin: 0;
        line-height: 0;
    }
    .layout-top-nav .nav-brand img {
        width: auto;
        max-width: none;
    }
}
@media screen {
    /* The theme sizes this link as a 45px icon circle, so the name wrapped word by word below the bar. */
    .layout-top-nav .navbar-custom-menu .navbar-nav > li.user-menu > a.dropdown-toggle {
        width: auto;
        max-width: 200px;
        padding: 6px 10px;
        border-radius: 22px;
    }
    .layout-top-nav .main-header .user-menu > a .user-name {
        margin: 0;
        font-size: 15px;
        line-height: 18px;
        text-align: right;
    }
    .layout-top-nav .main-header .user-menu > a .user-name span,
    .layout-top-nav .main-header .user-menu > a .user-name small {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .layout-top-nav .main-header .user-menu > a .user-name small {
        line-height: 14px;
    }
}
@media screen and (min-width: 992px) {
    /* Inside the 95% bar, vertically centred on its 61px height. */
    .layout-top-nav .nav-brand {
        top: 10px;
        left: 2.5%;
    }
    .layout-top-nav .nav-brand img {
        height: 40px;
    }
    /* Margin, not padding, so the theme's max-width still leaves the menu its full room. */
    .layout-top-nav .main-nav,
    .layout-top-nav.fixed .main-nav {
        margin-left: 52px;
    }
    /* Signed out the header holds only the fixed nav and collapses; keep it the bar's height. */
    .layout-top-nav.fixed .main-header {
        min-height: 61px;
    }
    .layout-top-nav.fixed .content-wrapper {
        padding-top: 69px;
    }
}
@media screen and (max-width: 991px) {
    /* Closed, the user/icon row sits behind the bar and its text leaked below it; ⋯ swaps hmobile for smobile. */
    .layout-top-nav .main-header .navbar.icon-topbar.hmobile {
        visibility: hidden;
    }
    .layout-top-nav .nav-brand {
        top: 7px;
        left: 16px;
    }
    .layout-top-nav .nav-brand img {
        height: 36px;
    }
    .layout-top-nav.fixed .main-header {
        min-height: 50px;
    }
    .layout-top-nav.fixed .content-wrapper {
        padding-top: 58px;
    }
}
@media screen and (min-width: 768px) and (max-width: 991px) {
    /* Menu items sit in the bar here, so start them right of the logo. */
    .layout-top-nav .main-nav {
        padding-left: 64px;
    }
    /* The bar grows to 55px here. */
    .layout-top-nav.fixed .content-wrapper {
        padding-top: 63px;
    }
}

/* page header */
@media screen {
    .content-header {
        margin-top: 0 !important; /* theme: layouts/theme.blade.php inline .content-header margin-top !important */
    }
    .content-wrapper section.content {
        padding-top: 12px;
    }
    .layout-top-nav .art-bg {
        min-height: max(220px, var(--grc-band, 0px));
    }
}
@media screen and (max-width: 767px) {
    .layout-top-nav .art-bg {
        min-height: max(160px, var(--grc-band, 0px));
    }
    /* Same side gutter as section.content on phones, so titles and cards share one left edge. */
    .content-header {
        padding-top: 8px;
        padding-left: 10px;
        padding-right: 10px;
    }
    .content-header > .d-flex {
        flex-wrap: wrap;
        gap: 8px;
    }
    .content-header .page-title {
        font-size: 20px;
        padding-top: 0;
        padding-bottom: 0;
    }
    .content-header .page-title[style] {
        font-size: 20px !important; /* theme: causelist/show.blade.php inline font-size: 22px */
    }
    .content-header .page-title + p {
        margin: 0;
        font-size: 13px;
    }
    .content-header .d-flex > .btn,
    .content-header .d-flex > div > .btn {
        padding: 4px 12px;
        font-size: 12px;
        line-height: 1.5;
    }
    .content-header .d-flex > div > .btn + .btn {
        margin-left: 4px !important; /* theme: bootstrap.css .ml-2 margin-left !important */
    }
}

/* tiles */
@media screen and (max-width: 767px) {
    /* Stat tiles on /payments, /hearings/upcoming and /dashboard, two per row. */
    .content-wrapper .row > .col-xl-3.col-12,
    .content-wrapper .row > .col-md-6.col-12 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    .content-wrapper .row > .col-xl-3.col-12:nth-child(odd),
    .content-wrapper .row > .col-md-6.col-12:nth-child(odd) {
        padding-right: 6px;
    }
    .content-wrapper .row > .col-xl-3.col-12:nth-child(even),
    .content-wrapper .row > .col-md-6.col-12:nth-child(even) {
        padding-left: 6px;
    }
    .content-wrapper .row > .col-xl-3.col-12 .box.box-body,
    .content-wrapper .row > .col-md-6.col-12 .box.box-body {
        padding: 12px;
        margin-bottom: 12px;
        min-height: 0;
        /* Equal heights across a pair; the margin is the row gap. */
        height: calc(100% - 12px);
    }
    .content-wrapper .row > .col-xl-3.col-12 > a {
        display: block;
        height: 100%;
    }
    .content-wrapper .row > .col-xl-3.col-12 .box-body h6,
    .content-wrapper .row > .col-md-6.col-12 .box-body h6 {
        font-size: 12px;
        margin-bottom: 4px;
    }
    .content-wrapper .row > .col-xl-3.col-12 .box-body .flexbox,
    .content-wrapper .row > .col-md-6.col-12 .box-body .flexbox {
        margin-top: 0 !important; /* theme: bootstrap.css .mt-2 margin-top !important */
    }
    .content-wrapper .row > .col-xl-3.col-12 .box-body [class*="font-size-2"],
    .content-wrapper .row > .col-xl-3.col-12 .box-body [class*="font-size-3"],
    .content-wrapper .row > .col-md-6.col-12 .box-body h2 {
        font-size: 22px;
        line-height: 1.2;
        margin-bottom: 0;
    }
    /* /dashboard's three-count tile: one label and count per line, as the half-width tile is too narrow for three columns. */
    .content-wrapper .row > .col-xl-3.col-12 .box-body > .d-flex {
        flex-direction: column;
        align-items: stretch !important; /* theme: bootstrap.css .align-items-center !important */
    }
    .content-wrapper .row > .col-xl-3.col-12 .box-body > .d-flex > div {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 6px;
    }
    .content-wrapper .row > .col-xl-3.col-12 .box-body > .d-flex h6 {
        margin: 0;
    }
    .content-wrapper .row > .col-md-6.col-12 .box-body .font-size-50 {
        font-size: 22px;
    }
}

/* account pages */
@media screen {
    .content-top-agile .aut-logo {
        margin-top: 16px !important; /* theme: style.css .my-40 margin-top !important */
        margin-bottom: 16px !important; /* theme: style.css .my-40 margin-bottom !important */
    }
    .content-top-agile .aut-logo img {
        width: 96px;
    }
    /* The outer .row has no container, so its gutters scrolled the page sideways (15px at every width). */
    body > .h-p100 > .row {
        margin-left: 0;
        margin-right: 0;
    }
}
@media screen and (max-width: 767px) {
    .content-top-agile .aut-logo img {
        width: 120px;
    }
}

/* tables */
@media screen {
    /* Label, control and words on one line; the inputs are .form-control, which the theme makes full-width blocks. */
    .dataTables_wrapper .dataTables_length label,
    .dataTables_wrapper .dataTables_filter label {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        margin: 0;
        white-space: nowrap;
    }
    .dataTables_wrapper .dataTables_length select,
    .dataTables_wrapper .dataTables_filter input {
        width: auto;
        margin: 0;
    }
    .dataTables_wrapper .dataTables_filter {
        padding-top: 0;
    }
    .dataTables_wrapper .dt-buttons {
        margin-bottom: 8px;
    }
    /* /cases captions; the serif face stays from the page's own style. */
    .box-header:has(> center > .case-caption) {
        padding-top: 0;
        padding-bottom: 0;
    }
    /* Two classes: the page's own .case-caption style comes later in the document. */
    .box-header .case-caption {
        margin: 0;
        padding: 8px 0;
        font-size: 14px;
    }
    /* Cause-list captions and crest. */
    .dataTables_wrapper thead th[colspan][style] {
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 14px !important; /* theme: causelist/partials/table.blade.php inline font-size: large */
    }
    .dataTables_wrapper thead th[colspan]:has(> img) {
        padding-top: 8px;
        padding-bottom: 8px;
    }
    .dataTables_wrapper thead th[colspan] > img {
        width: 64px !important; /* theme: causelist/partials/table.blade.php inline width: 10% */
    }
}
@media screen and (max-width: 767px) {
    /* Nested boxes and tabs each added 21px a side, leaving the table ~210px of a 390px screen. */
    .box > .box-body:has(.dataTables_wrapper),
    .box:has(.dataTables_wrapper) > .box-header {
        padding: 12px;
    }
    .tab-content > .tab-pane > .col-12 {
        padding-left: 0;
        padding-right: 0;
    }
    .tab-content .box {
        margin-bottom: 0;
    }
    .tab-content .box > .box-body:has(.dataTables_wrapper) {
        padding: 8px;
    }
    .dataTables_wrapper.container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    /* Both tabs on one row. */
    .nav-tabs {
        flex-wrap: nowrap;
    }
    .nav-tabs .nav-link {
        padding: 8px 10px;
        font-size: 13px;
        white-space: nowrap;
    }
    .nav-tabs .nav-link .mr-15 {
        margin-right: 6px !important; /* theme: style.css .mr-15 margin-right !important */
    }
    /* Buttons ('B' layouts) float left; Search takes the rest of the row, or the next row if too narrow. */
    .dataTables_wrapper .dt-buttons {
        float: left;
        width: auto;
        margin: 0 8px 8px 0;
    }
    .dataTables_wrapper .dt-buttons .btn {
        padding: 4px 8px;
        font-size: 12px;
        line-height: 1.5;
    }
    .dataTables_wrapper .dataTables_filter {
        float: none;
        text-align: left;
    }
    .dataTables_wrapper > .dataTables_filter {
        overflow: hidden;
        min-width: 140px;
        margin-bottom: 8px;
    }
    .dataTables_wrapper .dataTables_filter label {
        display: flex;
    }
    .dataTables_wrapper .dataTables_filter input {
        flex: 1 1 auto;
        width: 100%;
        min-width: 80px;
    }
    /* Bootstrap layouts: "Show N entries" and Search share the first row while they fit. */
    .dataTables_wrapper.container-fluid > .row {
        margin-left: 0;
        margin-right: 0;
    }
    .dataTables_wrapper.container-fluid > .row:first-child {
        gap: 0 12px;
        margin-bottom: 8px;
    }
    .dataTables_wrapper.container-fluid > .row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }
    .dataTables_wrapper.container-fluid > .row:first-child > [class*="col-"] {
        flex: 0 0 auto;
        width: auto;
        max-width: 100%;
    }
    .dataTables_wrapper.container-fluid > .row:first-child > [class*="col-"]:last-child {
        flex: 1 1 0;
    }
    .dataTables_wrapper.container-fluid > .row:first-child .dataTables_length {
        margin: 0;
    }
    /* Off-screen in the middle of a wide table otherwise. */
    .dataTables_wrapper thead th[colspan] {
        text-align: left !important; /* theme: bootstrap.css .text-center text-align !important */
    }
    /* Cause-list date picker: full width, icon and input on one row. */
    .box-header > .form-group.col-3 {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding: 0;
        margin-bottom: 0;
    }
    .box-header .input-group.date {
        flex-wrap: nowrap;
    }
}
@media screen and (min-width: 768px) {
    /* No list's action labels wrap; on the case page Edit and Resend sit side by side. */
    .content table.dataTable > tbody > tr > td:last-child .btn,
    #hearings_table > tbody > tr > td:nth-last-child(2),
    #hearings_table > tbody > tr > td:nth-last-child(-n+2) .btn {
        white-space: nowrap;
    }
}
@media screen and (max-width: 1299px) {
    /* Pin each list's action column (View, Join, Action) to the right so it never scrolls out of reach. */
    .content table.dataTable > thead > tr > th:last-child,
    .content table.dataTable > tbody > tr > td:last-child {
        position: sticky;
        right: 0;
        z-index: 1;
        background-color: #fff;
        box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);
    }
    /* Keep the row tints the theme lays over the white card. */
    .content table.dataTable.table-striped > tbody > tr:nth-of-type(odd) > td:last-child {
        background-image: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05));
    }
    .content table.dataTable.table-hover > tbody > tr:hover > td:last-child {
        background-image: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.075));
    }
    /* The case page's hearings list has two action columns (Edit/Resend, Start Session): pin both; Action sizes to its buttons. */
    #hearings_table > thead > tr > th:last-child,
    #hearings_table > tbody > tr > td:last-child {
        width: 108px;
        min-width: 108px;
        max-width: 108px;
    }
    #hearings_table > thead > tr > th:nth-last-child(2),
    #hearings_table > tbody > tr > td:nth-last-child(2) {
        position: sticky;
        right: 108px;
        z-index: 1;
        min-width: 72px;
        background-color: #fff;
        box-shadow: -6px 0 6px -4px rgba(0, 0, 0, 0.15);
    }
    #hearings_table > tbody > tr > td:last-child {
        box-shadow: none;
    }
    #hearings_table.table-hover > tbody > tr:hover > td:nth-last-child(2) {
        background-image: linear-gradient(rgba(0, 0, 0, 0.075), rgba(0, 0, 0, 0.075));
    }
    /* Tighter cells so fewer columns need scrolling. */
    .content table.dataTable > thead > tr > th,
    .content table.dataTable > tbody > tr > td {
        padding: 10px 10px;
    }
}
@media screen and (max-width: 767px) {
    /* Nested page, column and box padding took 126px of a 390px screen on the case page; trim it on phones. */
    .content-wrapper section.content {
        padding-left: 10px;
        padding-right: 10px;
    }
    .content-wrapper section.content .box-body {
        padding-left: 10px;
        padding-right: 10px;
    }
    .content-wrapper section.content .box-body .row > [class*="col-"] {
        padding-left: 6px;
        padding-right: 6px;
    }
    .content-wrapper section.content .box-body .row {
        margin-left: -6px;
        margin-right: -6px;
    }
    /* Full-size buttons made the pinned action column take half the table; small size, long labels wrap. */
    .content table.dataTable > tbody > tr > td:last-child .btn,
    #hearings_table > tbody > tr > td:nth-last-child(2) .btn {
        font-size: 12px;
        line-height: 1.4;
        padding: 4px 8px;
        white-space: normal;
        max-width: 84px;
    }
    .content table.dataTable > tbody > tr > td:last-child .batch-remove {
        width: auto !important; /* theme: hearings/batch.blade.php inline width 100px */
        height: auto !important; /* theme: hearings/batch.blade.php inline height 36px */
        font-size: 12px !important; /* theme: hearings/batch.blade.php inline font-size 14px */
        padding: 4px 8px !important; /* theme: hearings/batch.blade.php inline padding 5px */
    }
    .content table.dataTable > thead > tr > th:last-child,
    .content table.dataTable > tbody > tr > td:last-child {
        padding: 8px 6px;
    }
    #hearings_table > thead > tr > th:last-child,
    #hearings_table > tbody > tr > td:last-child {
        width: 84px;
        min-width: 84px;
        max-width: 84px;
    }
    #hearings_table > thead > tr > th:nth-last-child(2),
    #hearings_table > tbody > tr > td:nth-last-child(2) {
        right: 84px;
        min-width: 52px;
    }
    /* Admin's Resend stacks under Edit at one width; its icon goes so the pair fits. */
    #hearings_table > tbody > tr > td:nth-last-child(2) .btn {
        display: block;
        width: 100%;
        margin: 0 0 4px 0 !important; /* theme: bootstrap .mr-1 on Edit */
    }
    #hearings_table > tbody > tr > td:nth-last-child(2) .btn:last-child {
        margin-bottom: 0 !important; /* theme: bootstrap .mr-1 on Edit */
    }
    #hearings_table > tbody > tr > td:nth-last-child(2) .h-resend-email .fa {
        display: none;
    }
}
@media screen and (max-width: 767px) {
    /* The theme hid each page's title block on phones (and the dashboard's division filter with it). */
    .content-header .d-md-block.d-none {
        display: block !important; /* theme: bootstrap.css .d-none display none !important */
    }
}
@media screen and (max-width: 767px) {
    /* Scrolled on a phone, the top bar turns see-through; an open ☰ menu keeps it solid. */
    .layout-top-nav .main-nav,
    .layout-top-nav.fixed .main-header {
        transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out;
    }
    .layout-top-nav.grc-scrolled .main-nav:not(:has(#main-menu-state:checked)) {
        background-color: rgba(255, 255, 255, 0.55);
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
        box-shadow: none;
    }
    .layout-top-nav.fixed.grc-scrolled .main-header:not(:has(#main-menu-state:checked)) {
        background-image: none;
    }
}
@media screen {
    /* Colour roles: one readable colour per role; the theme's orange, pink and yellow fail contrast with white text. */
    /* primary */
    body.theme-patriot .btn-primary,
    body.theme-patriot .btn-info {
        background-color: #4a5cc1;
        border-color: #4a5cc1;
        color: #ffffff;
    }
    body.theme-patriot .btn-primary:hover,
    body.theme-patriot .btn-primary:active,
    body.theme-patriot .btn-primary:focus,
    body.theme-patriot .btn-primary.active,
    body.theme-patriot .show > .btn-primary.dropdown-toggle,
    body.theme-patriot .btn-info:hover,
    body.theme-patriot .btn-info:active,
    body.theme-patriot .btn-info:focus,
    body.theme-patriot .btn-info.active,
    body.theme-patriot .show > .btn-info.dropdown-toggle {
        background-color: #3747a1 !important; /* theme: color_theme.css .theme-patriot .btn-primary:hover */
        border-color: #3747a1 !important; /* theme: color_theme.css .theme-patriot .btn-primary:hover */
        color: #ffffff;
    }
    body.theme-patriot .btn-primary:disabled,
    body.theme-patriot .btn-info:disabled,
    body.theme-patriot .btn-primary.disabled,
    body.theme-patriot .btn-info.disabled {
        background-color: #4a5cc1;
        border-color: #4a5cc1;
        opacity: 0.65;
    }
    body.theme-patriot .btn-outline.btn-primary,
    body.theme-patriot .btn-outline.btn-info {
        background-color: transparent;
        border-color: #4a5cc1;
        color: #4a5cc1;
    }
    body.theme-patriot .btn-outline.btn-primary:hover,
    body.theme-patriot .btn-outline.btn-primary:active,
    body.theme-patriot .btn-outline.btn-primary.active,
    body.theme-patriot .show > .btn-outline.btn-primary.dropdown-toggle,
    body.theme-patriot .btn-outline.btn-info:hover,
    body.theme-patriot .btn-outline.btn-info:active,
    body.theme-patriot .btn-outline.btn-info.active,
    body.theme-patriot .show > .btn-outline.btn-info.dropdown-toggle {
        background-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-primary:hover */
        border-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-primary:hover */
        color: #ffffff !important; /* theme: color_theme.css .btn-outline.btn-secondary:hover */
    }
    body.theme-patriot .btn-outline-primary {
        border-color: #4a5cc1;
        color: #4a5cc1;
    }
    body.theme-patriot .btn-outline-primary:hover,
    body.theme-patriot .btn-outline-primary:not(:disabled):not(.disabled):active,
    body.theme-patriot .btn-outline-primary:not(:disabled):not(.disabled).active {
        background-color: #4a5cc1;
        border-color: #4a5cc1;
        color: #ffffff;
    }
    body.theme-patriot .bg-primary {
        background-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .bg-primary */
        color: #ffffff;
    }
    body.theme-patriot .badge-primary,
    body.theme-patriot .badge-info {
        background-color: #4a5cc1;
        color: #ffffff;
    }
    body.theme-patriot .badge-primary[href]:hover,
    body.theme-patriot .badge-primary[href]:focus,
    body.theme-patriot .badge-info[href]:hover,
    body.theme-patriot .badge-info[href]:focus {
        background-color: #3747a1;
        color: #ffffff;
    }
    /* secondary */
    body.theme-patriot .btn-secondary {
        background-color: #5c6975;
        border-color: #5c6975;
        color: #ffffff;
    }
    body.theme-patriot .btn-secondary:hover,
    body.theme-patriot .btn-secondary:active,
    body.theme-patriot .btn-secondary:focus,
    body.theme-patriot .btn-secondary.active,
    body.theme-patriot .show > .btn-secondary.dropdown-toggle {
        background-color: #455059 !important; /* theme: color_theme.css .theme-patriot .btn-secondary:hover */
        border-color: #455059 !important; /* theme: color_theme.css .theme-patriot .btn-secondary:hover */
        color: #ffffff;
    }
    body.theme-patriot .btn-secondary:disabled,
    body.theme-patriot .btn-secondary.disabled {
        background-color: #5c6975;
        border-color: #5c6975;
        opacity: 0.65;
    }
    body.theme-patriot .btn-outline.btn-secondary {
        background-color: transparent;
        border-color: #5c6975 !important; /* theme: color_theme.css .btn-outline.btn-secondary */
        color: #5c6975 !important; /* theme: color_theme.css .btn-outline.btn-secondary */
    }
    body.theme-patriot .btn-outline.btn-secondary:hover,
    body.theme-patriot .btn-outline.btn-secondary:active,
    body.theme-patriot .btn-outline.btn-secondary.active,
    body.theme-patriot .show > .btn-outline.btn-secondary.dropdown-toggle {
        background-color: #5c6975 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-secondary:hover */
        border-color: #5c6975 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-secondary:hover */
        color: #ffffff !important; /* theme: color_theme.css .btn-outline.btn-secondary:hover */
    }
    body.theme-patriot .badge-secondary {
        background-color: #5c6975;
        color: #ffffff;
    }
    body.theme-patriot .badge-secondary[href]:hover,
    body.theme-patriot .badge-secondary[href]:focus {
        background-color: #455059;
        color: #ffffff;
    }
    /* success */
    body.theme-patriot .btn-success {
        background-color: #2e7d32;
        border-color: #2e7d32;
        color: #ffffff;
    }
    body.theme-patriot .btn-success:hover,
    body.theme-patriot .btn-success:active,
    body.theme-patriot .btn-success:focus,
    body.theme-patriot .btn-success.active,
    body.theme-patriot .show > .btn-success.dropdown-toggle {
        background-color: #256628 !important; /* theme: color_theme.css .theme-patriot .btn-success:hover */
        border-color: #256628 !important; /* theme: color_theme.css .theme-patriot .btn-success:hover */
        color: #ffffff;
    }
    body.theme-patriot .btn-success:disabled,
    body.theme-patriot .btn-success.disabled {
        background-color: #2e7d32;
        border-color: #2e7d32;
        opacity: 0.65;
    }
    body.theme-patriot .btn-outline.btn-success {
        background-color: transparent;
        border-color: #2e7d32;
        color: #2e7d32;
    }
    body.theme-patriot .btn-outline.btn-success:hover,
    body.theme-patriot .btn-outline.btn-success:active,
    body.theme-patriot .btn-outline.btn-success.active,
    body.theme-patriot .show > .btn-outline.btn-success.dropdown-toggle {
        background-color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-success:hover */
        border-color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-success:hover */
        color: #ffffff !important; /* theme: color_theme.css .btn-outline.btn-secondary:hover */
    }
    body.theme-patriot .btn-outline-success {
        border-color: #2e7d32;
        color: #2e7d32;
    }
    body.theme-patriot .btn-outline-success:hover,
    body.theme-patriot .btn-outline-success:not(:disabled):not(.disabled):active,
    body.theme-patriot .btn-outline-success:not(:disabled):not(.disabled).active {
        background-color: #2e7d32;
        border-color: #2e7d32;
        color: #ffffff;
    }
    body.theme-patriot .bg-success {
        background-color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .bg-success */
        color: #ffffff;
    }
    body.theme-patriot .badge-success {
        background-color: #2e7d32;
        color: #ffffff;
    }
    body.theme-patriot .badge-success[href]:hover,
    body.theme-patriot .badge-success[href]:focus {
        background-color: #256628;
        color: #ffffff;
    }
    /* danger */
    body.theme-patriot .btn-danger {
        background-color: #c62828;
        border-color: #c62828;
        color: #ffffff;
    }
    body.theme-patriot .btn-danger:hover,
    body.theme-patriot .btn-danger:active,
    body.theme-patriot .btn-danger:focus,
    body.theme-patriot .btn-danger.active,
    body.theme-patriot .show > .btn-danger.dropdown-toggle {
        background-color: #a32020 !important; /* theme: color_theme.css .theme-patriot .btn-danger:hover */
        border-color: #a32020 !important; /* theme: color_theme.css .theme-patriot .btn-danger:hover */
        color: #ffffff;
    }
    body.theme-patriot .btn-danger:disabled,
    body.theme-patriot .btn-danger.disabled {
        background-color: #c62828;
        border-color: #c62828;
        opacity: 0.65;
    }
    body.theme-patriot .btn-outline.btn-danger {
        background-color: transparent;
        border-color: #c62828;
        color: #c62828;
    }
    body.theme-patriot .btn-outline.btn-danger:hover,
    body.theme-patriot .btn-outline.btn-danger:active,
    body.theme-patriot .btn-outline.btn-danger.active,
    body.theme-patriot .show > .btn-outline.btn-danger.dropdown-toggle {
        background-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-danger:hover */
        border-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-danger:hover */
        color: #ffffff !important; /* theme: color_theme.css .btn-outline.btn-secondary:hover */
    }
    body.theme-patriot .bg-danger {
        background-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .bg-danger */
        color: #ffffff;
    }
    body.theme-patriot .badge-danger {
        background-color: #c62828;
        color: #ffffff;
    }
    body.theme-patriot .badge-danger[href]:hover,
    body.theme-patriot .badge-danger[href]:focus {
        background-color: #a32020;
        color: #ffffff;
    }
    /* warning */
    body.theme-patriot .btn-warning {
        background-color: #ff8f00;
        border-color: #ff8f00;
        color: #2f363c;
    }
    body.theme-patriot .btn-warning:hover,
    body.theme-patriot .btn-warning:active,
    body.theme-patriot .btn-warning:focus,
    body.theme-patriot .btn-warning.active,
    body.theme-patriot .show > .btn-warning.dropdown-toggle {
        background-color: #e07d00 !important; /* theme: color_theme.css .theme-patriot .btn-warning:hover */
        border-color: #e07d00 !important; /* theme: color_theme.css .theme-patriot .btn-warning:hover */
        color: #2f363c;
    }
    body.theme-patriot .btn-warning:disabled,
    body.theme-patriot .btn-warning.disabled {
        background-color: #ff8f00;
        border-color: #ff8f00;
        opacity: 0.65;
    }
    body.theme-patriot .btn-outline.btn-warning {
        background-color: transparent;
        border-color: #ff8f00;
        color: #2f363c;
    }
    body.theme-patriot .btn-outline.btn-warning:hover,
    body.theme-patriot .btn-outline.btn-warning:active,
    body.theme-patriot .btn-outline.btn-warning.active,
    body.theme-patriot .show > .btn-outline.btn-warning.dropdown-toggle {
        background-color: #ff8f00 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-warning:hover */
        border-color: #ff8f00 !important; /* theme: color_theme.css .theme-patriot .btn-outline.btn-warning:hover */
        color: #2f363c !important; /* theme: color_theme.css .btn-outline.btn-secondary:hover */
    }
    body.theme-patriot .bg-warning {
        background-color: #ff8f00 !important; /* theme: color_theme.css .theme-patriot .bg-warning */
        color: #2f363c;
    }
    body.theme-patriot .badge-warning {
        background-color: #ff8f00;
        color: #2f363c;
    }
    body.theme-patriot .badge-warning[href]:hover,
    body.theme-patriot .badge-warning[href]:focus {
        background-color: #e07d00;
        color: #2f363c;
    }
    /* Text, link-hover and border colours: the theme paints them orange, green, pink and yellow. */
    body.theme-patriot .text-primary,
    body.theme-patriot a.text-primary:hover,
    body.theme-patriot a.text-primary:focus,
    body.theme-patriot .hover-primary:hover,
    body.theme-patriot .hover-primary:focus {
        color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .text-primary */
    }
    body.theme-patriot .text-info,
    body.theme-patriot a.text-info:hover,
    body.theme-patriot a.text-info:focus,
    body.theme-patriot .hover-info:hover,
    body.theme-patriot .hover-info:focus {
        color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .text-info */
    }
    body.theme-patriot .text-success,
    body.theme-patriot a.text-success:hover,
    body.theme-patriot a.text-success:focus,
    body.theme-patriot .hover-success:hover,
    body.theme-patriot .hover-success:focus {
        color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .text-success */
    }
    body.theme-patriot .text-danger,
    body.theme-patriot a.text-danger:hover,
    body.theme-patriot a.text-danger:focus,
    body.theme-patriot .hover-danger:hover,
    body.theme-patriot .hover-danger:focus {
        color: #c62828 !important; /* theme: color_theme.css .theme-patriot .text-danger */
    }
    body.theme-patriot .text-warning,
    body.theme-patriot a.text-warning:hover,
    body.theme-patriot a.text-warning:focus,
    body.theme-patriot .hover-warning:hover,
    body.theme-patriot .hover-warning:focus {
        color: #9a5b00 !important; /* theme: color_theme.css .theme-patriot .text-warning */
    }
    /* The sign-in pages' white links sit on the primary blue: underline instead of recolouring. */
    body.theme-patriot .text-white.hover-info:hover,
    body.theme-patriot .text-white.hover-info:focus {
        color: #ffffff !important; /* theme: color_theme.css .theme-patriot .hover-info:hover */
        text-decoration: underline;
    }
    /* Grey helper text: the theme's greys fail 4.5:1 on the page grey. */
    body.theme-patriot .text-secondary {
        color: #5c6975 !important; /* theme: color_theme.css .text-secondary */
    }
    body.theme-patriot .text-muted {
        color: #5c6975 !important; /* theme: bootstrap.min.css .text-muted */
    }
    body.theme-patriot .text-fade {
        color: #5c6975 !important; /* theme: color_theme.css .text-fade */
    }
    body.theme-patriot .border-primary {
        border-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .border-primary */
    }
    body.theme-patriot .border-info {
        border-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .border-info */
    }
    body.theme-patriot .border-success {
        border-color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .border-success */
    }
    body.theme-patriot .border-danger {
        border-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .border-danger */
    }
    body.theme-patriot .border-warning {
        border-color: #ff8f00 !important; /* theme: color_theme.css .theme-patriot .border-warning */
    }
    /* Alerts: the sign-in messages and the change-password pop-up. */
    body.theme-patriot .alert-primary {
        border-color: #4a5cc1;
        background-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .alert-primary */
        color: #ffffff;
    }
    body.theme-patriot .alert-info {
        border-color: #4a5cc1;
        background-color: #4a5cc1 !important; /* theme: color_theme.css .theme-patriot .alert-info */
        color: #ffffff;
    }
    body.theme-patriot .alert-success {
        border-color: #2e7d32;
        background-color: #2e7d32 !important; /* theme: color_theme.css .theme-patriot .alert-success */
        color: #ffffff;
    }
    body.theme-patriot .alert-danger {
        border-color: #c62828;
        background-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .alert-danger */
        color: #ffffff;
    }
    body.theme-patriot .alert-error {
        border-color: #c62828;
        background-color: #c62828 !important; /* theme: color_theme.css .theme-patriot .alert-error */
        color: #ffffff;
    }
    body.theme-patriot .alert-warning {
        border-color: #ff8f00;
        background-color: #ff8f00 !important; /* theme: color_theme.css .theme-patriot .alert-warning */
        color: #2f363c;
    }
    body.theme-patriot [type=checkbox]:checked.chk-col-danger + label:before {
        border-right: 2px solid #c62828;
        border-bottom: 2px solid #c62828;
    }
    body.theme-patriot [type=checkbox].filled-in:checked.chk-col-danger + label:after {
        border: 2px solid #c62828;
        background-color: #c62828;
    }
    /* Neutral stat tile: white, with the role colour as a left edge only. */
    body.theme-patriot .box.box-body.grc-stat {
        background-color: #ffffff;
        color: #5c6975;
        border-left: 4px solid #4a5cc1;
    }
    body.theme-patriot .grc-stat-success { border-left-color: #2e7d32; }
    body.theme-patriot .grc-stat-warning { border-left-color: #ff8f00; }
    body.theme-patriot .grc-stat h6,
    body.theme-patriot .grc-stat .text-uppercase {
        color: #5c6975;
    }
    body.theme-patriot .grc-stat h2,
    body.theme-patriot .grc-stat p,
    body.theme-patriot .grc-stat [class*="font-size-"] {
        color: #2f363c;
    }
    body.theme-patriot .grc-stat .ti-layers-alt,
    body.theme-patriot .grc-stat .ti-check,
    body.theme-patriot .grc-stat .ti-time,
    body.theme-patriot .grc-stat .ti-money,
    body.theme-patriot .grc-stat .ion {
        color: #5c6975;
    }
    /* SweetAlert 1 takes its cancel colour from this CSS, not from cancelButtonColor. */
    .sweet-alert button.cancel,
    .sweet-alert button.cancel:hover,
    .sweet-alert button.cancel:focus {
        background-color: #5c6975;
        color: #ffffff;
    }
    .sweet-alert button.cancel:hover,
    .sweet-alert button.cancel:active { background-color: #455059; }
}

/* Plan 19: one pop-up style; the body scrolls so the header and Save/Cancel footer stay on screen. */
@media screen {
    .grc-modal .modal-dialog {
        max-width: 560px;
        margin: 16px auto;
    }
    .grc-modal .modal-dialog-centered {
        min-height: calc(100% - 32px);
    }
    .grc-modal .modal-dialog-centered::before {
        height: calc(100vh - 32px);
        height: calc(100dvh - 32px);
    }
    .grc-modal .modal-content {
        display: flex;
        flex-direction: column;
        max-height: calc(100vh - 32px);
        max-height: calc(100dvh - 32px);
    }
    .grc-modal .modal-content > form {
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
        min-height: 0;
    }
    .grc-modal .modal-header,
    .grc-modal .modal-footer {
        flex-shrink: 0;
    }
    .grc-modal .modal-body {
        overflow-y: auto;
        min-height: 0;
    }
    /* The theme makes the footer inline-block; keep Bootstrap's right-aligned row. */
    .grc-modal .modal-footer {
        display: flex;
    }
}
@media screen and (max-width: 599px) {
    .grc-modal .modal-dialog {
        max-width: none;
        margin: 16px;
    }
}
@media screen {
    /* Case page sections: a solid primary bar sets each header apart from the page and its body. */
    .box.grc-section > .box-header {
        display: flex;
        align-items: center;
        padding: 14px 20px;
        background-color: #4a5cc1;
        border-bottom-color: #4a5cc1;
        border-radius: 5px 5px 0 0;
    }
    .box.grc-section > .box-header .box-title {
        margin: 0;
        color: #ffffff;
    }
    .box.grc-section .box-body .table {
        margin-top: 0;
        margin-bottom: 0;
    }
    /* A fixed label share keeps values close to their labels on wide sections. */
    td.grc-label {
        width: 35%;
    }
    /* Detail rows: the label reads bolder and darker than the value it describes. */
    .grc-label h5 {
        font-weight: 700;
        color: #2f363c;
    }
    .grc-label + td h5 {
        font-weight: 400;
        color: #5c6975;
    }
}
