@font-face {
    font-family: "Nunito Sans";
    src: url("../fonts/NunitoSans.ttf") format("truetype");
    font-weight: 100 1000;
    font-style: normal;
    font-display: swap;
}

:root {
    --mz-font-family: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mz-body-bg: #f8f9fa;
    --mz-body-color: #212529;
    --mz-card-bg: #ffffff;
    --mz-card-border: #dee2e6;
    --mz-table-stripe: #f7f9fb;
    --mz-muted-bg: #f1f3f5;
    --mz-muted-color: #6c757d;
    --mz-navbar-bg: #333741;
    --mz-navbar-color: #f8f9fa;
    --mz-primary: #F2672D;
    --mz-primary-dark: #da5824;
    --mz-service-unmanaged: #fff8d6;
    --mz-service-unmanaged-alt: #fff4bf;
    --mz-service-managed: #eaf6ff;
    --mz-service-managed-alt: #dff0ff;
    --mz-service-child: #f4f8ff;
    --mz-service-parent-border: #9ec5fe;
    --mz-payment-success: #e9f8ec;
    --mz-renew-red-bg: #ffe1e4;
    --mz-renew-red-color: #a40011;
    --mz-renew-yellow-bg: #fff4c2;
    --mz-renew-yellow-color: #6b5200;
    --mz-renew-green-color: #146c43;
    --mz-bw-ok-color: #198754;
    --mz-bw-warning-color: #800020;
    --mz-bw-danger-color: #dc3545;
    --mz-row-success: #e8f7ea;
    --mz-row-muted: #f1f3f5;
    --mz-ticket-hover: #fff8d8;
    --mz-ticket-assigned-me: #eaf7e3;
    --mz-ticket-assigned-group: #f3f7ff;
    --mz-ticket-closed: #f1f1f1;
    --mz-ticket-closed-hover: #e2e2e2;
    --mz-ticket-staff-followup: #eaf6ff;
    --mz-ticket-change-bg: #f1f3f5;
    --mz-ticket-change-color: #495057;
    --mz-ticket-conflict-bg: #fff5f5;
    --mz-ticket-todo-bg: #ffe86b;
    --mz-ticket-todo-color: #111;
    --mz-ticket-purple: #6c2eb9;
    --mz-ticket-chip-staff: #e9ecef;
    --mz-ticket-chip-group: #d7ecff;
    --mz-monitor-ok-bg: #d1e7dd;
    --mz-monitor-ok-color: #0f5132;
    --mz-monitor-warn-bg: #fff3cd;
    --mz-monitor-warn-color: #664d03;
    --mz-monitor-crit-bg: #f8d7da;
    --mz-monitor-crit-color: #842029;
    --mz-monitor-unknown-bg: #e9ecef;
    --mz-monitor-unknown-color: #495057;
}

[data-bs-theme="dark"] {
    --mz-body-bg: #171a1f;
    --mz-body-color: #e9ecef;
    --mz-card-bg: #23272f;
    --mz-card-border: #3b414d;
    --mz-table-stripe: #20242b;
    --mz-muted-bg: #2b3038;
    --mz-muted-color: #adb5bd;
    --mz-navbar-bg: #20242b;
    --mz-navbar-color: #f8f9fa;
    --mz-service-unmanaged: #4b4223;
    --mz-service-unmanaged-alt: #574c29;
    --mz-service-managed: #203947;
    --mz-service-managed-alt: #254253;
    --mz-service-child: #242f42;
    --mz-service-parent-border: #4f81bd;
    --mz-payment-success: #183626;
    --mz-renew-red-bg: #4a1f25;
    --mz-renew-red-color: #f5b5bd;
    --mz-renew-yellow-bg: #463912;
    --mz-renew-yellow-color: #ffe08a;
    --mz-renew-green-color: #9ee6bd;
    --mz-bw-ok-color: #9ee6bd;
    --mz-bw-warning-color: #ffb3c7;
    --mz-bw-danger-color: #f5b5bd;
    --mz-row-success: #183626;
    --mz-row-muted: #2b3038;
    --mz-ticket-hover: #332f20;
    --mz-ticket-assigned-me: #1f3928;
    --mz-ticket-assigned-group: #223247;
    --mz-ticket-closed: #282d34;
    --mz-ticket-closed-hover: #303640;
    --mz-ticket-staff-followup: #203947;
    --mz-ticket-change-bg: #2b3038;
    --mz-ticket-change-color: #ced4da;
    --mz-ticket-conflict-bg: #3a2528;
    --mz-ticket-todo-bg: #665b19;
    --mz-ticket-todo-color: #fff3a6;
    --mz-ticket-purple: #c6a4ff;
    --mz-ticket-chip-staff: #343a40;
    --mz-ticket-chip-group: #213a55;
    --mz-monitor-ok-bg: #143625;
    --mz-monitor-ok-color: #9ee6bd;
    --mz-monitor-warn-bg: #463912;
    --mz-monitor-warn-color: #ffe08a;
    --mz-monitor-crit-bg: #4a1f25;
    --mz-monitor-crit-color: #f5b5bd;
    --mz-monitor-unknown-bg: #343a40;
    --mz-monitor-unknown-color: #ced4da;
}

html,
body {
    font-family: var(--mz-font-family);
}

body {
    background: var(--mz-body-bg);
    color: var(--mz-body-color);
}

.navbar.bg-dark {
    background-color: var(--mz-navbar-bg) !important;
}

.card,
.dropdown-menu {
    background-color: var(--mz-card-bg);
    border-color: var(--mz-card-border);
}

.text-muted {
    color: var(--mz-muted-color) !important;
}

.table {
    --bs-table-bg: var(--mz-card-bg);
    --bs-table-color: var(--mz-body-color);
    --bs-table-border-color: var(--mz-card-border);
    color: var(--mz-body-color);
}

.table-light {
    --bs-table-bg: var(--mz-muted-bg);
    --bs-table-color: var(--mz-body-color);
    --bs-table-border-color: var(--mz-card-border);
}

.table-success {
    --bs-table-bg: var(--mz-row-success);
    --bs-table-color: var(--mz-body-color);
    --bs-table-border-color: var(--mz-card-border);
}

.form-control,
.form-select,
.input-group-text {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: .05em;
}

.account-bar {
    font-size: .85rem;
}

.content-wrapper {
    padding: 1.5rem 0;
}

.flash-messages .alert {
    margin-bottom: .5rem;
}

table.data-table thead th {
    white-space: nowrap;
}

.badge-rating-plus {
    background-color: #198754;
}

.badge-rating-minus {
    background-color: #dc3545;
}

.service-monitor {
    min-width: 3.8rem;
    text-align: center;
    font-weight: 700;
}

.service-monitor.service-monitor-ok {
    background: var(--mz-monitor-ok-bg) !important;
    color: var(--mz-monitor-ok-color);
}

.service-monitor.service-monitor-warn {
    background: var(--mz-monitor-warn-bg) !important;
    color: var(--mz-monitor-warn-color);
}

.service-monitor.service-monitor-crit {
    background: var(--mz-monitor-crit-bg) !important;
    color: var(--mz-monitor-crit-color);
}

.service-monitor.service-monitor-unknown {
    background: var(--mz-monitor-unknown-bg) !important;
    color: var(--mz-monitor-unknown-color);
}

.service-monitor.service-monitor-disabled {
    background: transparent !important;
}

.service-cp-col,
.service-cp {
    width: 1%;
    min-width: 6rem;
    max-width: 11rem;
}

.service-cp,
.service-cp .service-panel-link {
    white-space: normal;
    overflow-wrap: anywhere;
}

.service-table {
    table-layout: auto;
    width: auto;
    min-width: 100%;
}

.service-table .service-dedic-ip-col,
.service-table .service-dedic-ip,
.service-table .service-dedic-ip code {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.service-ip-nowrap {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
}

.service-table tbody tr:nth-child(even):not(.service-unmanaged):not(.service-managed):not(.payment-succeeded)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-table-stripe) !important;
}

.service-table tbody tr.service-unmanaged>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-unmanaged) !important;
}

.service-table tbody tr.service-unmanaged:nth-child(even)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-unmanaged-alt) !important;
}

.service-table tbody tr.service-managed>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-managed) !important;
}

.service-table tbody tr.service-managed:nth-child(even)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-managed-alt) !important;
}

.bw-percent-ok {
    color: var(--mz-bw-ok-color);
    font-weight: 700;
}

.bw-percent-warning {
    color: var(--mz-bw-warning-color);
    font-weight: 700;
}

.bw-percent-danger {
    color: var(--mz-bw-danger-color);
    font-weight: 700;
}

.service-renew-expired,
.service-renew-red {
    background: var(--mz-renew-red-bg) !important;
    color: var(--mz-renew-red-color) !important;
    font-weight: 700;
}

.service-renew-yellow {
    background: var(--mz-renew-yellow-bg) !important;
    color: var(--mz-renew-yellow-color) !important;
    font-weight: 700;
}

.service-renew-green {
    color: var(--mz-renew-green-color) !important;
}

.service-table tbody tr.payment-succeeded>*:not(.service-monitor):not([class*="service-renew-"]) {
    background: var(--mz-payment-success) !important;
}

.payment-succeeded>*,
.payment-row-verified-success>*,
.invoice-row-paid>* {
    background: var(--mz-row-success) !important;
}

.payment-row-non-success>*,
.invoice-row-void>* {
    background: var(--mz-row-muted) !important;
    color: var(--mz-muted-color) !important;
}

.service-table tbody tr.service-parent>*:not(.service-monitor):not([class*="service-renew-"]) {
    border-top-color: var(--mz-service-parent-border) !important;
}

.service-table tbody tr.service-child>*:not(.service-monitor):not([class*="service-renew-"]) {
    background: var(--mz-service-child) !important;
}

[data-bs-theme="dark"] .service-subrow {
    background: var(--mz-muted-bg) !important;
}

[data-bs-theme="dark"] .service-table tbody tr:nth-child(even):not(.service-unmanaged):not(.service-managed):not(.payment-succeeded)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-table-stripe) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.service-unmanaged>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-unmanaged) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.service-unmanaged:nth-child(even)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-unmanaged-alt) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.service-managed>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-managed) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.service-managed:nth-child(even)>*:not(.service-monitor):not([class*="service-renew-"]) {
    background-color: var(--mz-service-managed-alt) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.payment-succeeded>*:not(.service-monitor):not([class*="service-renew-"]) {
    background: var(--mz-payment-success) !important;
}

[data-bs-theme="dark"] .service-table tbody tr.service-child>*:not(.service-monitor):not([class*="service-renew-"]) {
    background: var(--mz-service-child) !important;
}

[data-bs-theme="dark"] .service-renew-expired,
[data-bs-theme="dark"] .service-renew-red {
    background: var(--mz-renew-red-bg) !important;
    color: var(--mz-renew-red-color) !important;
}

[data-bs-theme="dark"] .service-renew-yellow {
    background: var(--mz-renew-yellow-bg) !important;
    color: var(--mz-renew-yellow-color) !important;
}

[data-bs-theme="dark"] .service-renew-green,
[data-bs-theme="dark"] .bw-percent-ok {
    color: var(--mz-bw-ok-color) !important;
}

[data-bs-theme="dark"] .bw-percent-warning {
    color: var(--mz-bw-warning-color) !important;
}

[data-bs-theme="dark"] .bw-percent-danger {
    color: var(--mz-bw-danger-color) !important;
}

.btn-primary {
    background-color: var(--mz-primary);
    border-color: var(--mz-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--mz-primary-dark);
    border-color: var(--mz-primary-dark);
}

.alert-error {
    background-color: #f8d7da;
    color: #842029;
    border-color: #f5c2c7;
}

.theme-switch {
    position: relative;
    display: inline-flex;
    align-items: center;
    width: 3.7rem;
    height: 1.8rem;
    padding: .15rem;
    border: 1px solid rgba(255, 255, 255, .35);
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease;
}

.theme-switch:hover {
    background: rgba(255, 255, 255, .2);
}

.theme-switch-icon {
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    color: rgba(255, 255, 255, .72);
    user-select: none;
}

[data-bs-theme="light"] .theme-switch-icon:first-child,
[data-bs-theme="dark"] .theme-switch-icon:nth-child(2) {
    color: #333741;
}

.theme-switch-icon svg {
    width: .82rem;
    height: .82rem;
    stroke: currentColor;
}

.theme-switch-thumb {
    position: absolute;
    top: .18rem;
    left: .18rem;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 .1rem .35rem rgba(0, 0, 0, .22);
    transition: transform .18s ease;
}

[data-bs-theme="dark"] .theme-switch-thumb {
    transform: translateX(1.85rem);
}

.select2-container--bootstrap-5 .select2-selection {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.select2-container--bootstrap-5.select2-container--focus .select2-selection,
.select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: var(--mz-primary);
    box-shadow: 0 0 0 .2rem rgba(242, 103, 45, .18);
}

.select2-container--bootstrap-5 .select2-dropdown {
    background-color: var(--mz-card-bg);
    border-color: var(--mz-card-border);
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-results__option {
    background-color: var(--mz-card-bg);
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-results__option--highlighted,
.select2-container--bootstrap-5 .select2-results__option--highlighted.select2-results__option[aria-selected="true"] {
    background-color: var(--mz-primary);
    color: #fff;
}

.select2-container--bootstrap-5 .select2-results__option[aria-selected="true"] {
    background-color: var(--mz-muted-bg);
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-selection__rendered,
.select2-container--bootstrap-5 .select2-selection__placeholder,
.select2-container--bootstrap-5 .select2-selection__clear,
.select2-container--bootstrap-5 .select2-selection__arrow b {
    color: var(--bs-body-color);
}

.select2-container--bootstrap-5 .select2-selection__placeholder {
    opacity: .72;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: var(--bs-body-color);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    background-color: var(--mz-muted-bg);
    border-color: var(--mz-card-border);
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__display {
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove {
    color: var(--mz-muted-color);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: var(--mz-body-color);
}

.select2-container--bootstrap-5 .select2-search__field {
    background-color: transparent;
    color: var(--bs-body-color);
}

.select2-container--bootstrap-5 .select2-search--dropdown .select2-search__field {
    background-color: var(--bs-body-bg);
    border-color: var(--bs-border-color);
    color: var(--bs-body-color);
}

.select2-container--bootstrap-5 .select2-selection--multiple .select2-search__field::placeholder {
    color: var(--mz-muted-color);
}

.select2-container--bootstrap-5.select2-container--disabled .select2-selection {
    background-color: var(--mz-muted-bg);
    color: var(--mz-muted-color);
}

[data-bs-theme="dark"] .ticket-assigned-me>*:not(.ticket-priority-cell) {
    background: var(--mz-ticket-assigned-me) !important;
}

[data-bs-theme="dark"] .ticket-assigned-group:not(.ticket-assigned-me)>*:not(.ticket-priority-cell) {
    background: var(--mz-ticket-assigned-group) !important;
}

[data-bs-theme="dark"] .ticket-closed>* {
    background: var(--mz-ticket-closed) !important;
}

[data-bs-theme="dark"] .staff-ticket-table tbody tr:hover>* {
    background: var(--mz-ticket-hover) !important;
}

[data-bs-theme="dark"] .staff-ticket-table tbody tr.ticket-closed:hover>* {
    background: var(--mz-ticket-closed-hover) !important;
}

[data-bs-theme="dark"] .staff-ticket-cat:hover,
[data-bs-theme="dark"] .staff-ticket-cat.active {
    background: var(--mz-ticket-assigned-group) !important;
    border-color: var(--mz-service-parent-border) !important;
}

[data-bs-theme="dark"] .ticket-followup-staff .card-header {
    background-color: var(--mz-ticket-staff-followup) !important;
}

[data-bs-theme="dark"] .ticket-followup-conflict-new .card-header {
    background-color: var(--mz-renew-red-bg) !important;
    color: var(--mz-renew-red-color) !important;
}

[data-bs-theme="dark"] .ticket-followup-conflict-new .card-body {
    background-color: var(--mz-ticket-conflict-bg) !important;
}

[data-bs-theme="dark"] .ticket-change-log {
    background: var(--mz-ticket-change-bg) !important;
    border-top-color: var(--mz-card-border) !important;
    color: var(--mz-ticket-change-color) !important;
}

[data-bs-theme="dark"] .ticket-staff-subject,
[data-bs-theme="dark"] .ticket-title-staff-subject {
    color: var(--mz-ticket-purple) !important;
}

[data-bs-theme="dark"] .ticket-todo {
    background: var(--mz-ticket-todo-bg) !important;
    color: var(--mz-ticket-todo-color) !important;
}

[data-bs-theme="dark"] .ticket-chip-staff {
    background: var(--mz-ticket-chip-staff) !important;
}

[data-bs-theme="dark"] .ticket-chip-group {
    background: var(--mz-ticket-chip-group) !important;
}

[data-bs-theme="dark"] .invoice-row-paid>*,
[data-bs-theme="dark"] .payment-row-verified-success>* {
    background: var(--mz-row-success) !important;
}

[data-bs-theme="dark"] .invoice-row-void>*,
[data-bs-theme="dark"] .payment-row-non-success>* {
    background: var(--mz-row-muted) !important;
    color: var(--mz-muted-color) !important;
}

[data-bs-theme="dark"] .bg-light {
    background-color: var(--mz-muted-bg) !important;
    color: var(--mz-body-color) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-unmanaged>* {
    background-color: var(--mz-service-unmanaged) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-unmanaged:nth-child(even)>* {
    background-color: var(--mz-service-unmanaged-alt) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-managed>* {
    background-color: var(--mz-service-managed) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-managed:nth-child(even)>* {
    background-color: var(--mz-service-managed-alt) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-inactive>* {
    background-color: #30343b !important;
    color: var(--mz-body-color) !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-inactive a {
    color: #9ec5fe !important;
}

[data-bs-theme="dark"] .dedic-list tbody tr.dedic-inactive .text-muted {
    color: var(--mz-muted-color) !important;
}
