/* S3U Gate - custom styles on top of Bootstrap 5.3
 *
 * Light and dark mode: Bootstrap "data-bs-theme" on <html>, set by theme.js.
 * Colors are CSS variables, so every component follows the theme.
 */

/* ---------- Colors ----------
 * Brand colors (--s3u-*) and fonts come from brand.css. Here: the layout colors of the app.
 */
:root,
[data-bs-theme="light"] {
    --app-gradient: linear-gradient(135deg, #12B3A0 0%, var(--s3u-teal-text) 100%);

    /* status colors, kept apart from the brand teal */
    --app-success: #16A34A;
    --app-success-rgb: 22, 163, 74;
    --app-success-text: #15803D;
    --app-warning: #F79009;
    --app-danger: #F04438;
    --bs-success: var(--app-success);
    --bs-success-rgb: var(--app-success-rgb);

    --app-bg: #f3f5f9;
    --app-surface: #ffffff;
    --app-border: #e4e7ec;
    --app-muted: var(--s3u-slate);
    --app-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
    --app-shadow-hover: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .10);

    --app-sidebar-bg: var(--s3u-ink);
    --app-sidebar-text: var(--s3u-slate-light);
    --app-sidebar-section: #7D8994;
    --app-sidebar-hover: rgba(255, 255, 255, .06);
    --app-sidebar-active: rgba(var(--s3u-teal-rgb), .18);

    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--s3u-ink);
    --bs-border-color: var(--app-border);
}

[data-bs-theme="dark"] {

    --app-bg: #0b0f17;
    --app-surface: #121826;
    --app-border: #1f2937;
    --app-muted: var(--s3u-slate-light);
    --app-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 4px 16px rgba(0, 0, 0, .25);
    --app-shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 12px 32px rgba(0, 0, 0, .4);

    --app-sidebar-bg: #08111A;

    --bs-body-bg: var(--app-bg);
    --bs-body-color: #e4e7ec;
    --bs-border-color: var(--app-border);
    --bs-secondary-bg: #1a2233;
    --bs-tertiary-bg: #161d2b;
}

/* ---------- Base ---------- */
html,
body {
    height: 100%;
}

body {
    background: var(--app-bg);
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

.icon {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -.2em;
    flex-shrink: 0;
}


.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    min-height: 0;
    padding: 0;
    border-radius: .75rem;
    color: var(--app-muted);
    border: 0;
}

.btn-icon .icon {
    margin: 0;
    width: 1.25rem;
    height: 1.25rem;
}

.btn-icon:hover {
    background: var(--s3u-teal-soft);
    color: var(--s3u-teal);
}

/* ---------- Buttons ----------
 * 38 px high like the inputs, icon and text aligned, the same .5rem between neighbouring buttons.
 * The teal focus outline comes from brand.css (:focus-visible).
 */
.btn {
    --bs-btn-padding-y: .5rem;
    --bs-btn-padding-x: 1rem;
    --bs-btn-font-weight: 500;
    --bs-btn-line-height: 1.25;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    min-height: 38px;
    border-radius: .65rem;
}

.btn-sm {
    --bs-btn-padding-y: .3rem;
    --bs-btn-padding-x: .75rem;
    gap: .35rem;
    min-height: 31px;
}

.btn-lg {
    min-height: 46px;
}

/* neighbouring buttons outside a flex container / button group */
:where(:not(.btn-group, .btn-group-vertical, .input-group, .d-flex, .d-inline-flex, .modal-footer, .table-actions)) > .btn + .btn {
    margin-inline-start: .5rem;
}

.modal-footer {
    --bs-modal-footer-gap: .5rem;
}

.text-muted,
.text-body-secondary {
    color: var(--app-muted) !important;
}

/* ---------- App layout ---------- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 264px;
    flex-shrink: 0;
    background: var(--app-sidebar-bg) !important;
    color: var(--app-sidebar-text);
    display: flex;
    flex-direction: column;
}

@media (min-width: 992px) {
    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
    }
}

.sidebar-brand {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1.25rem 1.25rem 1rem;
}

.sidebar-brand-text {
    min-width: 0;
}

.sidebar-logo {
    display: block;
    height: 2.5rem;
    width: auto;
    margin-left: -.35rem;   /* the logo has its own space left of the corner bracket */
}

.sidebar-company {
    margin-top: .3rem;
    font-size: .75rem;
    font-weight: 500;
    color: var(--app-sidebar-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.sidebar-nav {
    flex: 1;
    padding: .25rem .75rem 1rem;
}

.sidebar-section {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--app-sidebar-section);
    padding: 1.1rem .75rem .4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    margin-bottom: .15rem;
    border-radius: .65rem;
    color: var(--app-sidebar-text);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    transition: background-color .15s ease, color .15s ease;
}

.sidebar-link:hover {
    background: var(--app-sidebar-hover);
    color: #fff;
}

.sidebar-link.active {
    background: var(--app-sidebar-active);
    color: #fff;
    box-shadow: inset 3px 0 0 var(--s3u-teal);
}

.sidebar-link.active .icon {
    color: var(--s3u-teal);
}

.sidebar-footer {
    padding: 1rem 1.25rem;
    font-size: .75rem;
    color: var(--app-sidebar-section);
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .9rem 1.75rem;
    background: color-mix(in srgb, var(--app-bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--app-border);
}

.topbar-mark {
    height: 1.5rem;
    width: auto;
}

/* a long title gets "…", the buttons on the right always stay visible */
.app-topbar > .ms-auto {
    flex-shrink: 0;
}

.page-title {
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0;
}

.app-content {
    flex: 1;
    padding: 1.75rem;
}

.app-footer {
    padding: 1rem 1.75rem;
    font-size: .8rem;
    color: var(--app-muted);
}

@media (max-width: 575.98px) {
    .app-content {
        padding: 1rem;
    }

    .app-topbar {
        padding: .75rem 1rem;
    }
}

/* user in the top bar */
.user-chip {
    align-items: center;
    gap: .6rem;
    padding: .25rem .75rem .25rem .25rem;
    border-radius: 2rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
}

.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--app-gradient);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1.2rem;
}

.user-chip-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.user-chip-name {
    font-weight: 600;
    font-size: .85rem;
}

.user-chip-role {
    font-size: .72rem;
    color: var(--app-muted);
}

/* theme button: show the icon of the current mode */
.theme-toggle .icon {
    display: none;
}

[data-theme-mode="auto"] .theme-toggle .theme-icon-auto,
[data-theme-mode="light"] .theme-toggle .theme-icon-light,
[data-theme-mode="dark"] .theme-toggle .theme-icon-dark {
    display: inline-block;
}

/* ---------- Cards ---------- */
/* body, header and footer share the same side padding, so everything lines up */
.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--app-border);
    --bs-card-border-radius: 1rem;
    --bs-card-inner-border-radius: calc(1rem - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.5rem;
    --bs-card-cap-padding-y: 1rem;
    --bs-card-cap-padding-x: 1.5rem;
    box-shadow: var(--app-shadow);
}

.card-header {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

/* cards that follow each other in one column */
.card + .card {
    margin-top: 1.5rem;
}

.card-hover {
    transition: transform .15s ease, box-shadow .15s ease;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow-hover);
}

/* statistic tiles on the dashboards */
.stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: .9rem;
    background: var(--s3u-teal-soft);
    color: var(--s3u-teal);
}

.stat-icon .icon {
    width: 1.4rem;
    height: 1.4rem;
}

.stat-icon.is-info { background: rgba(46, 144, 250, .12); color: #2e90fa; }
.stat-icon.is-warning { background: rgba(247, 144, 9, .12); color: #f79009; }
.stat-icon.is-danger { background: rgba(240, 68, 56, .12); color: #f04438; }
.stat-icon.is-purple { background: rgba(122, 90, 248, .12); color: #7a5af8; }

.stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.1;
}

.stat-label {
    font-size: .8rem;
    color: var(--app-muted);
}

/* ---------- Status ---------- */
.status-dot {
    display: inline-block;
    width: .55rem;
    height: .55rem;
    border-radius: 50%;
    background: var(--app-muted);
    margin-right: .35rem;
}

.status-dot.is-online {
    background: var(--app-success);
    box-shadow: 0 0 0 0 rgba(var(--app-success-rgb), .6);
    animation: pulse 2s infinite;
}

.status-dot.is-warning { background: var(--app-warning); }
.status-dot.is-offline { background: var(--app-danger); }

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--app-success-rgb), .55); }
    70% { box-shadow: 0 0 0 .45rem rgba(var(--app-success-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--app-success-rgb), 0); }
}

/* badges / status pills: one definition for all of them */
.badge-soft,
.badge {
    display: inline-flex;
    align-items: center;
    gap: .35em;
    font-size: .75rem;
    font-weight: 600;
    line-height: 1.2;
    padding: .25em .6em;
    border-radius: 999px;
    white-space: nowrap;
    vertical-align: middle;
}

.badge-soft .icon,
.badge .icon {
    width: 1em;
    height: 1em;
    vertical-align: 0;
}

/* space between neighbouring badges; in a flex row use .badge-group (or the row's gap) */
:where(:not(.d-flex, .d-inline-flex, .badge-group)) > :is(.badge-soft, .badge) + :is(.badge-soft, .badge) {
    margin-inline-start: .375rem;
}

.badge-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .375rem;
}

.badge-soft.is-success { background: rgba(var(--app-success-rgb), .12); color: var(--app-success-text); }
.badge-soft.is-danger { background: rgba(240, 68, 56, .12); color: #C0261A; }
.badge-soft.is-warning { background: rgba(247, 144, 9, .14); color: #A04006; }
.badge-soft.is-info { background: rgba(46, 144, 250, .12); color: #1561D0; }
.badge-soft.is-muted { background: rgba(74, 85, 96, .10); color: var(--app-muted); }

[data-bs-theme="dark"] .badge-soft.is-success { color: #4ADE80; }
[data-bs-theme="dark"] .badge-soft.is-danger { color: #F97066; }
[data-bs-theme="dark"] .badge-soft.is-warning { color: #FDB022; }
[data-bs-theme="dark"] .badge-soft.is-info { color: #53B1FD; }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: .75rem 1rem;
    vertical-align: middle;
}

.table-sm > :not(caption) > * > * {
    padding: .4rem .75rem;
}

.table > thead th {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
    color: var(--app-muted);
    background: var(--bs-tertiary-bg);
    border-bottom-width: 1px;
    white-space: nowrap;
}

/* IP addresses, serials, ports never break over two lines */
.table td.font-mono,
.table td .font-mono {
    white-space: nowrap;
}

/* action buttons in the last column: right aligned, centred, the same gap */
.table td.table-actions {
    text-align: right;
    white-space: nowrap;
    font-size: 0;               /* no extra space from the line breaks between the buttons */
}

.table td.table-actions > * {
    font-size: .875rem;
    vertical-align: middle;
}

.table td.table-actions > * + * {
    margin-inline-start: .5rem;
}

/* a table straight in a card lines up with the card header ... */
.card > .table-responsive > .table > :not(caption) > * > :first-child,
.card > .table > :not(caption) > * > :first-child {
    padding-inline-start: 1.5rem;
}

.card > .table-responsive > .table > :not(caption) > * > :last-child,
.card > .table > :not(caption) > * > :last-child {
    padding-inline-end: 1.5rem;
}

/* ... and a table inside the card body too (the cell padding reaches into the body padding).
 * DataTables (Bootstrap 5 layout) puts the table into a .row: no gutter there, our margin instead. */
.card-body div.dt-container > .row {
    --bs-gutter-x: 0;
}

.card-body > .table-responsive,
.card-body > .table,
.card-body div.dt-container > .dt-layout-table {
    margin-inline: -1rem;
    width: calc(100% + 2rem);
}

/* wide tables scroll inside their own box on small screens, never the page */
.table-responsive,
div.dt-container > .dt-layout-table > div {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* the badge group fills the cell and wraps without indent */
.table td > .badge-group {
    display: flex;
}

.table-hover > tbody > tr:hover > * {
    --bs-table-bg-state: var(--s3u-teal-soft);
}

div.dt-container .dt-search input {
    border-radius: .65rem;
    min-width: 240px;
}

/* ---------- Auth pages (login, errors) ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(60rem 30rem at 15% -10%, rgba(var(--s3u-teal-rgb), .18), transparent 60%),
        radial-gradient(50rem 30rem at 110% 110%, rgba(var(--s3u-ink-rgb), .06), transparent 60%),
        var(--app-bg);
}

.auth-topbar {
    position: fixed;
    top: 1rem;
    right: 1rem;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .35rem;
    margin-bottom: 1.75rem;
    text-align: center;
}

.auth-logo {
    height: 4rem;
    width: auto;
}

.auth-company {
    font-size: .9rem;
    font-weight: 500;
    color: var(--app-muted);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 1.25rem !important;
    box-shadow: var(--app-shadow-hover);
}

.auth-card-wide {
    max-width: 480px;
}

.auth-footer {
    margin-top: 2rem;
    font-size: .8rem;
    color: var(--app-muted);
}

.error-code {
    font-size: 3.5rem;
    font-weight: 700;
    letter-spacing: -.04em;
    background: var(--app-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- 2FA / QR ---------- */
.otp-input {
    font-family: var(--s3u-font-mono);
    font-size: 1.6rem;
    letter-spacing: .5em;
    text-align: center;
    padding-left: .5em;
}

.qr-box {
    display: inline-block;
    padding: .75rem;
    background: #fff;
    border-radius: 1rem;
    border: 1px solid var(--app-border);
}

.qr-box img {
    display: block;
    width: 200px;
    height: 200px;
    image-rendering: pixelated;
}

.secret-box {
    font-family: var(--s3u-font-mono);
    background: var(--bs-tertiary-bg);
    border: 1px dashed var(--app-border);
    border-radius: .75rem;
    padding: .6rem .9rem;
    word-break: break-all;
}

.backup-codes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .5rem;
    font-family: var(--s3u-font-mono);
}

.backup-codes span {
    background: var(--bs-tertiary-bg);
    border-radius: .5rem;
    padding: .4rem;
    text-align: center;
}

/* steps (wizard, enrolment) */
.steps {
    display: flex;
    gap: .5rem;
    counter-reset: step;
}

.steps .step {
    flex: 1;
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .85rem;
    color: var(--app-muted);
}

.steps .step::before {
    counter-increment: step;
    content: counter(step);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.8rem;
    height: 1.8rem;
    border-radius: 50%;
    border: 2px solid var(--app-border);
    font-weight: 700;
    font-size: .8rem;
}

.steps .step.active {
    color: var(--bs-body-color);
    font-weight: 600;
}

/* phones: only the current step shows its name, the others their number */
@media (max-width: 575.98px) {
    .steps .step:not(.active) {
        flex: 0 0 auto;
        font-size: 0;
        gap: 0;
    }
}

.steps .step.active::before,
.steps .step.done::before {
    border-color: var(--s3u-teal);
    background: var(--s3u-teal);
    color: #fff;
}

/* ---------- Live log ---------- */
.log-window {
    background: #0b1020;
    color: #c9d4e5;
    font-family: var(--s3u-font-mono);
    font-size: .8rem;
    border-radius: .75rem;
    padding: 1rem;
    height: 65vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
}

/* ---------- Small helpers (instead of inline styles) ---------- */
.progress-thin {
    height: 6px;
}

.cell-details {
    max-width: 22.5rem;
}

.cell-progress {
    min-width: 7.5rem;
}

.scroll-box {
    max-height: 17.5rem;
    overflow-y: auto;
}

.log-window-tall {
    height: 26rem;
}

/* ---------- Toasts, modals, misc ---------- */
.toast {
    border: 0;
    border-radius: .9rem;
    box-shadow: var(--app-shadow-hover);
    background: var(--app-surface);
}

.toast .toast-body {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}

.toast.is-success .toast-icon { color: var(--app-success); }
.toast.is-danger .toast-icon { color: #f04438; }
.toast.is-warning .toast-icon { color: #f79009; }
.toast.is-info .toast-icon { color: #2e90fa; }

.modal-content {
    border: 0;
    border-radius: 1.1rem;
    background: var(--app-surface);
}

.confirm-icon .icon {
    width: 2.6rem;
    height: 2.6rem;
    padding: .6rem;
    border-radius: 50%;
    background: rgba(240, 68, 56, .12);
    color: #f04438;
    box-sizing: content-box;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--app-muted);
}

.empty-state .icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: .75rem;
    opacity: .6;
}

.is-loading {
    position: relative;
    pointer-events: none;
    opacity: .7;
}

.fade-in {
    animation: fadeIn .25s ease both;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ---------- Forms ----------
 * Inputs as high as the buttons, the same distance from every label to its input.
 */
.form-label {
    margin-bottom: .375rem;
    font-weight: 500;
}

.form-control,
.form-select {
    min-height: 38px;
    padding-top: .45rem;
    padding-bottom: .45rem;
    border-radius: .65rem;
}

.form-control-sm,
.form-select-sm {
    min-height: 31px;
    padding-top: .25rem;
    padding-bottom: .25rem;
}

.form-text {
    margin-top: .375rem;
}

.input-group > .btn {
    min-height: 0;
}

/* ---------- Settings ---------- */
.settings-section {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 600;
    color: var(--app-muted);
    margin: 1.5rem 0 .75rem;
    padding-bottom: .4rem;
    border-bottom: 1px solid var(--app-border);
}

.settings-section:first-child {
    margin-top: 0;
}

.preset-card {
    cursor: pointer;
    border: 2px solid var(--app-border);
    border-radius: .9rem;
    padding: .75rem 1rem;
    transition: border-color .15s ease, background-color .15s ease;
    background: var(--app-surface);
    width: 100%;
    text-align: left;
    color: inherit;
}

.preset-card:hover,
.preset-card.active {
    border-color: var(--s3u-teal);
    background: var(--s3u-teal-soft);
}

.test-steps .test-step {
    display: flex;
    gap: .6rem;
    padding: .5rem 0;
    border-bottom: 1px dashed var(--app-border);
    font-size: .875rem;
}

.test-steps .test-step:last-child {
    border-bottom: 0;
}

.test-step.is-ok .icon { color: var(--app-success); }
.test-step.is-failed .icon { color: var(--app-danger); }

.log-line { display: block; }
.log-line .log-time { color: #6b7a99; margin-right: .75rem; }
.log-line.is-error { color: #f97066; }
.log-line.is-warning { color: #fdb022; }
.log-line.is-highlight { background: rgba(253, 176, 34, .15); }
/* management socket polling of the portal / timers (status, quit), hidden unless "Portal polling" is on */
.log-window.hide-polling .log-line.is-polling { display: none; }

/* radio cards (wizard) */
.btn-check:checked + .preset-card {
    border-color: var(--s3u-teal);
    background: var(--s3u-teal-soft);
    box-shadow: 0 0 0 .2rem rgba(var(--s3u-teal-rgb), .12);
}

.btn-check:focus-visible + .preset-card {
    outline: 2px solid var(--s3u-teal);
    outline-offset: 2px;
}

label.preset-card {
    display: block;
}

.rotate-180 {
    transform: rotate(180deg);
}

.steps .step[data-goto] {
    cursor: default;
}

.steps .step.done[data-goto] {
    cursor: pointer;
}

/* tabs / pills (colors in brand.css) */
.nav-pills {
    --bs-nav-link-color: var(--bs-body-color);
    --bs-nav-link-hover-color: var(--s3u-teal-text);
    gap: .5rem;
}

.nav-pills .nav-link {
    border-radius: .65rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* DataTables right-aligns columns which sort by a number (data-order), keep our layout */
table.dataTable th.dt-type-numeric,
table.dataTable td.dt-type-numeric,
table.dataTable th.dt-type-date,
table.dataTable td.dt-type-date {
    text-align: left;
}

table.dataTable td.text-end,
table.dataTable th.text-end {
    text-align: right;
}

table.dataTable th.dt-type-numeric div.dt-column-header,
table.dataTable th.dt-type-date div.dt-column-header {
    flex-direction: row;
}
