/**
 * Privus "Navy Vault" theme for the SecurLine panel.
 *
 * Loaded after style.css by the layouts in privus/views/layouts. Only overrides:
 * the upstream stylesheets stay untouched so upstream merges never conflict here.
 * See docs/securline/BRANDING.md.
 */

/* IBM Plex, self-hosted (SIL OFL 1.1, see ../fonts/IBMPlex/LICENSE.txt) */

@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-sans-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-mono-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-mono-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-mono-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/IBMPlex/ibm-plex-mono-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/** Tokens **/

body {
    font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: #0F1E2B;
    background-color: var(--pv-surface);

    /* Fixed Privus navy: the per-space hue setting no longer recolours the panel */
    --main-1: #E5EDF5;
    --main-2: #CBD9E6;
    --main-3: #9DB2C6;
    --main-4: #3E5C78;
    --main-5: #0B2540;
    --main-6: #163A5C;
    --main-7: #061829;

    --second-4: #8394A3;
    --second-5: #5A6B7A;
    --second-6: #3D4E5D;
    --second-7: #2A3B4A;
    --second-8: #1A2A38;
    --second-9: #0F1E2B;

    --grey-1: #F3F5F8;
    --grey-2: #E4E9EE;
    --grey-3: #C5CFD8;
    --grey-4: #8394A3;
    --grey-5: #5A6B7A;

    --danger-1: #FBE9E9;
    --danger-2: #F6D3D3;
    --danger-5: #C23B3F;
    --danger-6: #A3262A;

    --color-green: #2F8A5B;
    --color-blue: #1E7FB8;
    --color-yellow: #E3A008;
    --color-pink: #C23B3F;
    --color-orange: #C2620E;

    --pv-ground: #F3F5F8;
    --pv-surface: #FFFFFF;
    --pv-border: #DDE3E8;
    --pv-border-strong: #C5CFD8;
    --pv-row: #EEF1F4;
    --pv-ink: #0F1E2B;
    --pv-muted: #5A6B7A;
    --pv-nav-text: #C9D6E2;
    --pv-nav-muted: #9DB2C6;
    --pv-focus: 0 0 0 3px rgba(11, 37, 64, 0.18);
    --pv-link: var(--main-5);
    --pv-nav-bg: #0B2540;
    --pv-code-bg: #0F1E2B;
    --pv-hover-row: #F8FAFC;
}

body:not(.welcome) {
    background-color: var(--pv-ground);
}

code,
pre,
.mono {
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
}

p,
a,
ul li,
ol li,
pre {
    color: var(--second-7);
}

/** Titles **/

h1 {
    font-size: 2.8rem;
    line-height: 3.4rem;
    font-weight: 700;
    color: var(--pv-ink);
    min-width: 0;
    overflow-wrap: anywhere;
}

h1 i {
    font-size: 2.6rem;
    color: var(--pv-muted);
}

h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--pv-ink);
}

h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--pv-ink);
    border-bottom-color: var(--pv-row);
}

h4 {
    color: var(--pv-ink);
}

small {
    color: var(--pv-muted);
}

/** Top header: only on welcome pages and on mobile **/

header nav {
    padding: 2rem 2.4rem;
    align-items: center;
}

header nav a {
    color: var(--pv-muted);
    font-size: 1.4rem;
}

header nav a#logo {
    gap: 1.2rem;
    padding-left: 0;
    color: var(--pv-ink);
    font-size: 1.7rem;
}

header nav a#logo::before {
    display: none;
}

header nav a#menu {
    color: var(--pv-link);
}

.brand_mark {
    width: 3rem;
    height: 3rem;
    object-fit: contain;
    flex-shrink: 0;
}

.brand_mark.custom {
    background-color: #FFFFFF;
    border-radius: 0.6rem;
    padding: 0.3rem;
    box-sizing: border-box;
}

body:not(.welcome) > header {
    display: none;
}

/** Layout **/

content {
    gap: 0;
}

content nav + section {
    flex: 1;
    min-width: 0;
    max-width: 120rem;
    margin: 0 auto;
    padding: 3.2rem 4rem 6rem;
    box-sizing: border-box;
}

content section header {
    margin-bottom: 2.4rem;
}

content section header p {
    color: var(--pv-muted);
    font-size: 1.4rem;
}

/** Sidebar **/

content > nav {
    width: 24rem;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 2.4rem 1.6rem;
    border-radius: 0;
    background-color: var(--pv-nav-bg);
    background-image: none;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

content > nav a {
    color: var(--pv-nav-text);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 4.4rem;
    margin: 0;
    padding: 0 1.2rem;
    border-radius: 0.8rem;
}

content > nav a i {
    font-size: 1.9rem;
    margin-right: 1.2rem;
}

content > nav a:hover,
content > nav a:focus-visible {
    background-color: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
}

content > nav a.current {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    font-weight: 600;
    border-radius: 0.8rem;
    box-shadow: none;
}

content > nav a.brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    line-height: normal;
    padding: 0 0.8rem;
    margin-bottom: 2.8rem;
    white-space: normal;
}

content > nav a.brand:hover {
    background: none;
}

content > nav .brand_mark:not(.custom) {
    filter: brightness(0) invert(1);
}

content > nav a.brand b {
    display: block;
    color: #FFFFFF;
    font-size: 1.7rem;
    font-weight: 700;
}

content > nav small,
content > nav .nav_label {
    color: var(--pv-nav-muted);
    margin: 0;
}

content > nav .nav_label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 0 1.2rem 0.8rem;
}

content > nav .nav_label ~ .nav_label {
    margin-top: 2rem;
}

content > nav .nav_account {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 1rem;
    background-color: rgba(255, 255, 255, 0.06);
}

content > nav .nav_account .avatar {
    width: 3.6rem;
    height: 3.6rem;
    border-radius: 50%;
    flex-shrink: 0;
    background-color: var(--pv-nav-text);
    color: var(--pv-nav-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
}

content > nav .nav_account .who {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

content > nav .nav_account .who b {
    color: #FFFFFF;
    font-size: 1.35rem;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

content > nav .nav_account a.signout {
    margin-left: auto;
    padding: 0;
    width: 4.4rem;
    justify-content: center;
    flex-shrink: 0;
}

content > nav .nav_account a.signout i {
    margin: 0;
}

@media screen and (max-width: 800px) {
    body:not(.welcome) > header {
        display: block;
        background-color: var(--pv-surface);
        border-bottom: 1px solid var(--pv-border);
    }

    header nav {
        padding: 1rem 1.6rem;
    }

    content > nav {
        position: absolute;
        width: 100%;
        height: auto;
        min-height: 100vh;
    }

    content nav + section {
        padding: 2rem 1.6rem 4rem;
    }
}

/** Breadcrumb **/

.breadcrumb li {
    font-size: 1.3rem;
    color: var(--pv-muted);
}

.breadcrumb li a {
    color: var(--pv-link);
}

.breadcrumb li.active {
    color: var(--pv-muted);
}

/** Buttons **/

form div input[type="file"]::file-selector-button,
.btn {
    border-radius: 0.8rem;
    font-size: 1.4rem;
    line-height: 4.2rem;
    padding: 0 1.6rem;
}

.btn.small {
    border-radius: 0.6rem;
    line-height: 3rem;
}

.btn i {
    font-size: 1.7rem;
    margin-right: 0.2rem;
}

.btn:focus-visible {
    box-shadow: var(--pv-focus);
}

.btn.secondary {
    background-color: var(--pv-surface);
    border-color: var(--pv-border-strong);
    color: var(--pv-ink);
    font-weight: 500;
}

.btn.secondary:hover {
    background-color: var(--pv-ground);
    border-color: var(--main-3);
}

.btn.secondary:active {
    background-color: var(--main-1);
    border-color: var(--main-3);
    color: var(--pv-ink);
}

.btn.tertiary {
    background-color: transparent;
    border-color: transparent;
    font-weight: 500;
}

.btn.tertiary:hover {
    background-color: var(--main-1);
    border-color: var(--main-1);
}

.btn.icon {
    border-radius: 0.6rem;
}

/* Destructive buttons: a red that keeps white text readable in both themes */
.btn.danger {
    --main-1: var(--danger-1);
    --main-5: #B4262B;
    --main-6: #951E22;
    --main-7: #7A181C;
}

/** Forms **/

form label {
    font-size: 1.3rem;
}

form input:not([type=checkbox])~label,
form textarea~label,
form select~label {
    font-weight: 600;
    color: var(--second-6);
}

form div input:not([type=range]):not([type=button]):not([type=file]):not(.btn),
form div textarea,
form div select {
    padding: 1.1rem 1.4rem;
    background-color: var(--pv-surface);
    border-radius: 0.8rem;
    border-color: var(--pv-border-strong);
    color: var(--pv-ink);
    font-family: inherit;
}

form div input[type=file] {
    border-radius: 0.8rem;
    background-color: var(--pv-surface);
    border-color: var(--pv-border-strong);
}

form div select {
    padding-right: 4rem;
}

form div input:hover,
form div textarea:hover,
form div select:hover {
    border-color: var(--main-3);
}

form div input:not(.btn):focus-visible,
form div input:not(.btn):active,
form div textarea:focus-visible,
form div textarea:active,
form div select:focus-visible {
    color: var(--pv-ink);
    border-color: var(--main-5);
    box-shadow: var(--pv-focus);
}

form div input[readonly],
form div textarea[readonly] {
    background-color: var(--pv-ground);
    border-color: var(--pv-border);
}

form div input:autofill {
    background: var(--pv-surface);
}

form.inline {
    background-color: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: 1.2rem;
    padding: 1.6rem;
    align-items: end;
}

/** Tabs **/

ul.tabs {
    border-bottom: 1px solid var(--pv-border);
}

ul.tabs li {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 4.4rem;
    color: var(--pv-muted);
    opacity: 1;
    margin: 0 1rem;
}

ul.tabs li a {
    color: inherit;
}

ul.tabs li:hover {
    color: var(--pv-ink);
}

ul.tabs li.current {
    color: var(--pv-link);
    border-color: var(--pv-link);
}

/** Cards **/

.card {
    background-color: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: 1.2rem;
    padding: 2rem;
}

.card header {
    border-bottom-color: var(--pv-row);
}

.card li {
    border-bottom-color: var(--pv-row);
}

.card li .content p {
    overflow-wrap: anywhere;
}

.card li .icon {
    background-color: var(--main-1);
    color: var(--pv-link);
    border-radius: 0.8rem;
}

/** Tables **/

table {
    background-color: var(--pv-surface);
    border: 1px solid var(--pv-border);
    border-radius: 1.2rem;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

.card table,
dialog table {
    background-color: transparent;
    border: 0;
    border-radius: 0;
}

table thead {
    border-bottom: 0;
}

table tr th {
    line-height: 4.4rem;
    padding: 0 2rem;
    border-bottom: 1px solid var(--pv-border);
}

table tr th,
table tr th a {
    color: var(--pv-muted);
    font-size: 1.2rem;
    letter-spacing: 0.06em;
}

table tr td {
    padding: 1.2rem 2rem;
    font-size: 1.45rem;
    border-bottom: 1px solid var(--pv-row);
}

table tbody tr:last-child td {
    border-bottom: 0;
}

table tr:nth-child(2n) {
    background-color: transparent;
}

table tbody tr:not(.empty):hover {
    background-color: var(--pv-hover-row);
}

table tr td a:not(.btn) {
    color: var(--pv-ink);
    font-weight: 500;
}

table tr td a:not(.btn):hover {
    color: var(--pv-link);
}

table tr.empty {
    background-color: var(--pv-surface);
    color: var(--pv-muted);
}

table tr.empty td:before {
    color: var(--main-3);
}

/* Phones: wide tables scroll sideways inside their own frame instead of running off screen */
@media screen and (max-width: 800px) {
    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table tr td,
    table tr th {
        white-space: nowrap;
    }

    table tr.empty td {
        white-space: normal;
    }

    /* Upstream sets an inline min-width: 40rem on the provisioning link field */
    form div input[style*="min-width"] {
        min-width: 0 !important;
    }
}

/** Badges: soft chips **/

.badge {
    background-color: var(--pv-row);
    color: var(--second-6);
    border-radius: 1.2rem;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 2.4rem;
    padding: 0 1rem;
}

.badge i {
    vertical-align: -0.2rem;
}

.badge.badge-main,
.badge.badge-primary {
    background-color: var(--main-1);
    color: var(--pv-link);
}

.badge.badge-strong {
    background-color: var(--main-5);
    color: #FFFFFF;
}

.badge.badge-info {
    background-color: #E3F1FA;
    color: #0B5A80;
}

.badge.badge-success {
    background-color: #E6F4EC;
    color: #1E6B43;
}

.badge.badge-warning {
    background-color: #FFF4DB;
    color: #7A4F00;
}

.badge.badge-error {
    background-color: var(--danger-1);
    color: var(--danger-6);
}

.badge.badge-message {
    background-color: #F0E9FB;
    color: #5B2E9E;
}

/** Pagination **/

ul.pagination {
    justify-content: flex-end;
}

ul.pagination li .page-link {
    border-radius: 0.8rem;
    min-width: 4rem;
    line-height: 4rem;
    padding: 0 0.4rem;
    font-size: 1.4rem;
    box-sizing: border-box;
}

ul.pagination li:not(.disabled):not(.active) .page-link {
    color: var(--pv-ink);
}

ul.pagination li:not(.disabled) .page-link:hover {
    border-color: var(--pv-border-strong);
}

/** Steps, toggles, misc **/

ol.steps li.active:before {
    background-color: var(--main-5);
    border-color: var(--main-5);
}

div.checkbox:has(> input[type="checkbox"]:checked)::before {
    background-color: var(--main-5);
}

dialog {
    border-radius: 1.2rem;
}

pre {
    background-color: var(--pv-code-bg);
    border-radius: 0.8rem;
}

/** Welcome pages (sign-in, recovery, documentation) **/

body.welcome::after {
    display: none;
}

body.welcome > header {
    border-bottom: 1px solid var(--pv-border);
}

body.welcome content {
    padding: 4rem 1.6rem;
    box-sizing: border-box;
}

/* Split sign-in screen: brand panel left, form right */

body.split content {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    align-items: stretch;
    flex-wrap: wrap;
}

body.split .brand_panel {
    flex: 1 1 42rem;
    box-sizing: border-box;
    padding: 4.8rem 5.6rem;
    background-color: var(--pv-nav-bg);
    color: var(--pv-nav-text);
    display: flex;
    flex-direction: column;
    gap: 3.2rem;
}

body.split .brand_panel .brand {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    color: #FFFFFF;
    font-size: 1.8rem;
    font-weight: 700;
}

body.split .brand_panel .brand_mark:not(.custom) {
    filter: brightness(0) invert(1);
}

body.split .brand_panel .pitch {
    margin: auto 0;
    max-width: 42rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

body.split .brand_panel .pitch .brand_mark {
    width: 12rem;
    height: 12rem;
    opacity: 0.9;
}

body.split .brand_panel .pitch .brand_mark.custom {
    border-radius: 2rem;
    padding: 1.2rem;
}

body.split .brand_panel h2 {
    margin: 0;
    padding: 0;
    font-size: 3.4rem;
    line-height: 1.2;
    font-weight: 600;
    color: #FFFFFF;
}

body.split .brand_panel p {
    margin: 0;
    font-size: 1.6rem;
    line-height: 1.6;
    color: #B5C6D6;
}

body.split .brand_panel small {
    color: var(--pv-nav-muted);
    font-size: 1.3rem;
}

body.split content > section {
    flex: 1 1 42rem;
    max-width: none;
    margin: 0;
    padding: 4.8rem 5.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body.split content > section > * {
    width: 100%;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

body.split content > section form {
    grid-template-columns: 1fr;
    gap: 2rem;
}

body.split content > section form > div.on_desktop {
    display: none !important;
}

body.split content > section form input.btn {
    width: 100%;
    line-height: 4.8rem;
    font-size: 1.5rem;
}

body.split content > section .pt-3 i {
    color: var(--pv-muted);
    margin-right: 0.6rem;
}

@media screen and (max-width: 800px) {
    body.split content {
        align-content: flex-start;
    }

    body.split .brand_panel {
        flex-basis: 100%;
        padding: 2rem 1.6rem;
        gap: 0;
    }

    body.split .brand_panel .pitch,
    body.split .brand_panel small {
        display: none;
    }

    body.split content > section {
        padding: 3.2rem 1.6rem;
    }
}

/** Text that upstream colours with --main-5 (a fill colour): use the link token instead **/

p>a:not(.btn),
ul:not(.tabs)>li>a,
form div span.supporting a,
label>a,
.btn.tertiary,
.btn[disabled],
form div input:focus-visible+label,
form div input:active+label,
form div textarea:focus-visible+label,
form div textarea:active+label,
form .picker .color-input i:hover,
.tooltip:hover {
    color: var(--pv-link);
}

ul.pagination li:not(.disabled).active .page-link {
    color: #FFFFFF;
}

form section.block,
.tooltiptext,
input[type=number].digit,
dialog {
    background-color: var(--pv-surface);
    color: var(--pv-ink);
}

/** Theme toggle **/

.theme_toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4.4rem;
    height: 4.4rem;
    flex-shrink: 0;
    padding: 0;
    border: 0;
    border-radius: 0.8rem;
    background: transparent;
    color: var(--pv-muted);
    font-size: 2rem;
    cursor: pointer;
}

.theme_toggle:hover {
    background-color: var(--pv-row);
    color: var(--pv-ink);
}

.theme_toggle:focus-visible {
    box-shadow: var(--pv-focus);
}

.theme_toggle .ph-sun,
html[data-theme="dark"] .theme_toggle .ph-moon {
    display: none;
}

html[data-theme="dark"] .theme_toggle .ph-sun {
    display: inline;
}

content > nav .theme_toggle,
body.split .brand_panel .theme_toggle {
    color: var(--pv-nav-text);
}

content > nav .theme_toggle:hover,
body.split .brand_panel .theme_toggle:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #FFFFFF;
}

content > nav .brand_row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 2.8rem;
}

content > nav .brand_row a.brand {
    margin-bottom: 0;
    flex: 1;
    min-width: 0;
}

body.split .brand_panel .brand_row {
    display: flex;
    align-items: center;
    gap: 1.2rem;
}

body.split .brand_panel .brand_row .theme_toggle {
    margin-left: auto;
}

header nav .theme_toggle {
    margin-left: auto;
}

header nav .theme_toggle ~ a.oppose {
    margin-left: 0;
}

/** Dark theme: set on <html> by scripts/privus-theme.js before first paint **/

html[data-theme="dark"] {
    color-scheme: dark;
}

html[data-theme="dark"] body {
    color: #E6EDF3;

    --main-1: #17304A;
    --main-2: #1F3D5C;
    --main-3: #4F7090;
    --main-4: #6F93B6;
    --main-5: #2E6BA6;
    --main-6: #3A7BB8;
    --main-7: #24598C;

    --second-4: #7E91A4;
    --second-5: #93A4B5;
    --second-6: #B4C2CF;
    --second-7: #CBD6E0;
    --second-8: #08121B;
    --second-9: #E6EDF3;

    --grey-1: #16263A;
    --grey-2: #22344A;
    --grey-3: #2E4560;
    --grey-4: #6F8296;
    --grey-5: #A3B3C2;

    --danger-1: #3A1A1D;
    --danger-2: #4A2226;
    --danger-5: #E36A6E;
    --danger-6: #F2A7A9;
    --success-1: #12301F;
    --success-5: #4CB37E;
    --success-6: #7FD3A5;
    --warning-1: #33280C;
    --warning-5: #E3A008;
    --warning-6: #F5CF73;
    --info-1: #0E2A3B;
    --info-5: #3D9BD6;
    --info-6: #8CC8EE;

    --pv-ground: #0B1620;
    --pv-surface: #111F2C;
    --pv-border: #22344A;
    --pv-border-strong: #2F4660;
    --pv-row: #1A2A3A;
    --pv-ink: #E6EDF3;
    --pv-muted: #93A4B5;
    --pv-nav-bg: #07121C;
    --pv-nav-text: #C2D0DD;
    --pv-nav-muted: #8EA3B8;
    --pv-focus: 0 0 0 3px rgba(140, 192, 238, 0.35);
    --pv-link: #8CC0EE;
    --pv-code-bg: #08121B;
    --pv-hover-row: #152536;
}

html[data-theme="dark"] content > nav {
    border-right: 1px solid var(--pv-row);
}

html[data-theme="dark"] header .brand_mark:not(.custom),
html[data-theme="dark"] img.brand_mark:not(.custom) {
    filter: brightness(0) invert(1);
}

html[data-theme="dark"] .badge.badge-strong {
    background-color: #C2D0DD;
    color: #07121C;
}

html[data-theme="dark"] .badge.badge-info {
    background-color: #0E2A3B;
    color: #8CC8EE;
}

html[data-theme="dark"] .badge.badge-success {
    background-color: #12301F;
    color: #7FD3A5;
}

html[data-theme="dark"] .badge.badge-warning {
    background-color: #33280C;
    color: #F5CF73;
}

html[data-theme="dark"] .badge.badge-error {
    background-color: #3A1A1D;
    color: #F2A7A9;
}

html[data-theme="dark"] .badge.badge-message {
    background-color: #2A1D42;
    color: #CDB4F5;
}

html[data-theme="dark"] body.split .brand_panel p {
    color: #A9BACB;
}

html[data-theme="dark"] dialog::backdrop {
    opacity: 0.7;
}

/** Emergency wipe (resources/views/admin/account/wipe/create.blade.php) **/

.wipe_form p {
    margin-bottom: 1rem;
}

.wipe_form .wipe_target {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    margin: 0.4rem 0 0;
    padding: 0.6rem 1.2rem;
    border-radius: 0.8rem;
    background-color: var(--pv-row);
    color: var(--pv-ink);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 1.45rem;
    font-weight: 500;
}

.wipe_form .card.warning {
    margin: 1.2rem 0 0;
}

.device_picker {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-width: 0;
}

.device_picker legend {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--second-6);
    margin-bottom: 0.8rem;
}

form label.device_option {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    padding: 1.4rem 1.6rem;
    border: 1px solid var(--pv-border-strong);
    border-radius: 1rem;
    background-color: var(--pv-surface);
    color: var(--pv-ink);
    white-space: normal;
    overflow: visible;
    cursor: pointer;
}

form label.device_option:hover {
    border-color: var(--main-3);
}

form label.device_option:has(input:checked) {
    border-color: var(--danger-5);
    background-color: var(--danger-1);
}

form label.device_option:has(input:focus-visible) {
    box-shadow: var(--pv-focus);
}

form label.device_option input[type=radio] {
    flex-shrink: 0;
    width: 1.8rem;
    height: 1.8rem;
    margin: 0.1rem 0 0;
    accent-color: var(--danger-5);
}

.device_option_body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    min-width: 0;
}

.device_option_body b {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--pv-ink);
}

.device_option_body small {
    margin: 0;
    font-size: 1.3rem;
    color: var(--pv-muted);
    overflow-wrap: anywhere;
}

.device_option_body small.mono {
    font-size: 1.2rem;
}

dialog.wipe_confirm {
    border: 1px solid var(--pv-border);
    padding: 2.4rem;
}

dialog.wipe_confirm h2 {
    border-bottom: 0;
    padding-top: 0;
    overflow-wrap: anywhere;
}

dialog.wipe_confirm .dialog_actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
}

/** Call history: Type column (privus/views/parts/call_logs/table.blade.php) **/

.badge.call_type_call {
    background-color: var(--main-1);
    color: var(--pv-link);
}

.badge.call_type_meeting {
    background-color: #E3F1FA;
    color: #0B5A80;
}

.badge.call_type_chat_room {
    background-color: var(--pv-row);
    color: var(--second-6);
}

html[data-theme="dark"] .badge.call_type_meeting {
    background-color: #0E2A3B;
    color: #8CC8EE;
}

/** Devices overview (privus/views/admin/devices/index.blade.php) **/

.device_versions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.6rem;
}

.devices_table td i.ph {
    vertical-align: -0.2rem;
}

.devices_table td {
    white-space: nowrap;
}
