
:root {
    --primary: #05645b;
    --primary-dark: #044f48;
    --primary-darker: #033d38;
    --primary-light: #e8f4f2;
    --secondary: #d7df21;
    --secondary-dark: #b9c100;
    --secondary-light: #f7f9d8;

    --white: #ffffff;
    --body-bg: #f4f7f6;
    --surface: #ffffff;
    --surface-soft: #f8fbfa;
    --text: #263735;
    --muted: #70827f;
    --border: #dce6e4;

    --success: #198754;
    --danger: #dc3545;
    --warning: #f59e0b;
    --info: #0d9fc0;
    --secondary-ui: #6c757d;

    --sidebar-width: 250px;
    --shadow-sm: 0 4px 14px rgba(5, 100, 91, 0.08);
    --shadow-md: 0 10px 30px rgba(5, 100, 91, 0.12);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 18px;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--body-bg);
    color: var(--text);
    font-family: "Open Sans", Arial, sans-serif;
    font-size: 0.94rem;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    max-width: 100%;
    vertical-align: middle;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color .2s ease, background-color .2s ease, border-color .2s ease;
}

a:hover {
    color: var(--primary-dark);
}

h1,
h2,
h3,
h4,
h5,
h6,
p {
    margin-top: 0;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* Layout */
.main-content {
    min-height: 100vh;
    margin-left: calc(var(--sidebar-width) + 1.5rem);
    padding-top: .25rem;
    overflow: visible !important;
    transition: margin-left .25s ease;
}

.container,
.container-fluid {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: .75rem;
    padding-left: .75rem;
}

.container {
    max-width: 1140px;
}

.row {
    --gutter-x: 1.5rem;
    --gutter-y: 0;
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--gutter-y));
    margin-right: calc(-.5 * var(--gutter-x));
    margin-left: calc(-.5 * var(--gutter-x));
}

.row > * {
    width: 100%;
    max-width: 100%;
    padding-right: calc(.5 * var(--gutter-x));
    padding-left: calc(.5 * var(--gutter-x));
    margin-top: var(--gutter-y);
}

.g-0 { --gutter-x: 0; --gutter-y: 0; }
.g-1 { --gutter-x: .25rem; --gutter-y: .25rem; }
.g-2 { --gutter-x: .5rem; --gutter-y: .5rem; }
.g-3 { --gutter-x: 1rem; --gutter-y: 1rem; }
.g-4 { --gutter-x: 1.5rem; --gutter-y: 1.5rem; }

.col { flex: 1 0 0%; }
.col-auto { flex: 0 0 auto; width: auto; }
.col-1 { flex: 0 0 auto; width: 8.333333%; }
.col-2 { flex: 0 0 auto; width: 16.666667%; }
.col-3 { flex: 0 0 auto; width: 25%; }
.col-4 { flex: 0 0 auto; width: 33.333333%; }
.col-5 { flex: 0 0 auto; width: 41.666667%; }
.col-6 { flex: 0 0 auto; width: 50%; }
.col-7 { flex: 0 0 auto; width: 58.333333%; }
.col-8 { flex: 0 0 auto; width: 66.666667%; }
.col-9 { flex: 0 0 auto; width: 75%; }
.col-10 { flex: 0 0 auto; width: 83.333333%; }
.col-11 { flex: 0 0 auto; width: 91.666667%; }
.col-12 { flex: 0 0 auto; width: 100%; }

/* Sidebar */
.sidenav {
    position: fixed;
    top: 1rem;
    bottom: 1rem;
    left: 1rem;
    z-index: 1030;
    width: var(--sidebar-width);
    overflow: hidden;
    border: 0 !important;
    border-radius: var(--radius-lg) !important;
    background: var(--primary) !important;
    box-shadow: var(--shadow-md);
    color: var(--white);
    transform: translateX(0);
    transition: transform .25s ease;
}

.sidenav-header {
    position: relative;
    display: flex;
    min-height: 88px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,.12);
}

.sidenav-header .navbar-brand {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    padding: 15px 24px;
}

.sidenav-header .navbar-brand-img {
    display: block;
    width: auto;
    max-width: 150px;
    max-height: 58px;
    object-fit: contain;
}

#sidenav-collapse-main {
    height: calc(100% - 88px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(215,223,33,.6) transparent;
}

#sidenav-collapse-main::-webkit-scrollbar { width: 6px; }
#sidenav-collapse-main::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(215,223,33,.6);
}

.sidebar-navigation {
    width: 100%;
    padding: 8px 12px 30px;
}

.sidebar-item {
    width: 100%;
    margin-bottom: 5px;
}

.sidebar-link {
    display: flex;
    width: 100%;
    min-height: 48px;
    align-items: center;
    gap: 11px;
    padding: 8px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,.92);
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.sidebar-link:hover {
    background: rgba(215,223,33,.18);
    color: #fff;
}

.sidebar-link.active {
    background: var(--secondary);
    color: var(--primary);
    box-shadow: 0 5px 16px rgba(0,0,0,.12);
}

.sidebar-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
    min-width: 34px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: rgba(255,255,255,.14);
    color: #fff;
}

.sidebar-link.active .sidebar-icon {
    background: var(--primary);
    color: var(--secondary);
}

.sidebar-icon i { font-size: 14px; }
.sidebar-label { min-width: 0; flex: 1; white-space: normal; }
.sidebar-chevron {
    margin-left: auto;
    font-size: 11px;
    transition: transform .25s ease;
}

.sidebar-link[aria-expanded="true"] .sidebar-chevron {
    transform: rotate(180deg);
}

.sidebar-submenu {
    display: none;
    width: 100%;
    padding: 5px 0 5px 47px;
}

.sidebar-submenu.show { display: block; }

.sidebar-submenu-link {
    display: flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.78);
    font-size: .82rem;
    font-weight: 500;
}

.sidebar-submenu-link:hover {
    background: rgba(215,223,33,.15);
    color: #fff;
}

.sidebar-submenu-link.active {
    background: var(--secondary);
    color: var(--primary);
    font-weight: 700;
}

.sidebar-submenu-icon {
    display: inline-flex;
    width: 20px;
    min-width: 20px;
    align-items: center;
    justify-content: center;
}

.sidebar-submenu-icon i { font-size: 11px; }

.sidebar-link.logout-link { color: #ffd5d9; }
.sidebar-link.logout-link .sidebar-icon {
    background: var(--danger);
    color: #fff;
}
.sidebar-link.logout-link:hover {
    background: rgba(220,53,69,.2);
    color: #fff;
}

/* Navbar */
.navbar {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-main {
    margin: 0 1.5rem;
    padding: .55rem 0;
    border-radius: var(--radius-md);
    background: var(--primary) !important;
    box-shadow: var(--shadow-sm);
}

.navbar-main .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-collapse {
    display: flex;
    flex-basis: auto;
    flex-grow: 1;
    align-items: center;
}

.navbar-nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.navbar-main h6,
.navbar-main .nav-link,
.navbar-main .text-dark,
.navbar-main .text-body,
.navbar-main .breadcrumb-item,
.navbar-main .breadcrumb-item.active {
    color: #fff !important;
}

.navbar-main .breadcrumb-item a {
    color: var(--secondary) !important;
    opacity: 1 !important;
}

.navbar-user-link {
    display: flex;
    align-items: center;
    gap: 7px;
}

.mobile-sidebar-button {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #fff;
    cursor: pointer;
}

.mobile-sidebar-button:hover {
    background: rgba(255,255,255,.1);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin: 0;
    list-style: none;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: left;
    padding: 0 .5rem;
    color: rgba(255,255,255,.6);
    content: "/";
}

/* Cards */
.card {
    position: relative;
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow-wrap: break-word;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: transparent;
}

/* Forms */
.form-label {
    display: inline-block;
    margin-bottom: .4rem;
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
}

.form-control,
.form-select {
    display: block;
    width: 100%;
    min-height: 42px;
    padding: .58rem .78rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: .9rem;
    line-height: 1.4;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.form-select {
    padding-right: 2.2rem;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--primary) 50%),
        linear-gradient(135deg, var(--primary) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.form-control:focus,
.form-select:focus {
    outline: 0;
    border-color: var(--primary);
    box-shadow: 0 0 0 .18rem rgba(5,100,91,.12);
}

textarea.form-control { min-height: 110px; resize: vertical; }

.form-control:disabled,
.form-select:disabled {
    background: #eef3f2;
    cursor: not-allowed;
}

/* Buttons */
.btn {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .55rem 1rem;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:disabled,
.btn.disabled {
    opacity: .65;
    pointer-events: none;
}

.btn-sm {
    min-height: 32px;
    padding: .42rem .75rem;
    font-size: .8rem;
}

.btn-primary,
.bg-gradient-primary {
    border-color: var(--primary) !important;
    background: var(--primary) !important;
    color: #fff !important;
}

.btn-primary:hover,
.bg-gradient-primary:hover {
    background: var(--primary-dark) !important;
}

.btn-success,
.bg-gradient-success {
    border-color: var(--secondary-dark) !important;
    background: var(--secondary) !important;
    color: var(--primary) !important;
}

.btn-success:hover,
.bg-gradient-success:hover {
    background: var(--secondary-dark) !important;
}

.btn-danger,
.bg-gradient-danger {
    background: var(--danger) !important;
    color: #fff !important;
}

.btn-warning,
.bg-gradient-warning {
    background: var(--warning) !important;
    color: #fff !important;
}

.btn-info,
.bg-gradient-info {
    background: var(--info) !important;
    color: #fff !important;
}

.btn-secondary,
.bg-gradient-secondary {
    background: var(--secondary-ui) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    border-color: #adb5bd;
    background: transparent;
    color: #59636d;
}

.btn-outline-secondary:hover {
    background: #eef1f3;
    color: #343a40;
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
    color: var(--text);
}

.table th,
.table td {
    padding: .8rem .9rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table thead th {
    background: var(--surface-soft);
    color: var(--muted);
    font-size: .67rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: rgba(5,100,91,.025);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .38em .68em;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.badge-sm { font-size: .67rem; }

/* Alerts */
.alert {
    position: relative;
    padding: .9rem 2.6rem .9rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
}

.alert-success { background: #d1e7dd; color: #0f5132; }
.alert-danger { background: #f8d7da; color: #842029; }
.alert-warning { background: #fff3cd; color: #664d03; }
.alert-info { background: #cff4fc; color: #055160; }

.alert-dismissible .btn-close {
    position: absolute;
    top: .65rem;
    right: .65rem;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1055;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
    outline: 0;
    background: rgba(0,0,0,.45);
}

.modal.show { display: block; }

.modal-dialog {
    position: relative;
    width: auto;
    max-width: 500px;
    margin: 1.75rem auto;
    pointer-events: none;
}

.modal-dialog-centered {
    display: flex;
    min-height: calc(100% - 3.5rem);
    align-items: center;
}

.modal-dialog-scrollable {
    height: calc(100% - 3.5rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: 100%;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-body {
    overflow-y: auto;
}

.modal-lg { max-width: 800px; }
.modal-xl { max-width: 1140px; }

.modal-content {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: column;
    pointer-events: auto;
    border: 0;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: 0 18px 60px rgba(0,0,0,.2);
    outline: 0;
}

.modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.modal-title { margin-bottom: 0; }
.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1.25rem;
}

.modal-footer {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: #000;
}

.modal-backdrop.show { opacity: .5; }

.btn-close {
    width: 1em;
    height: 1em;
    padding: .25em;
    border: 0;
    background: transparent;
    color: currentColor;
    cursor: pointer;
}

.btn-close::before {
    content: "×";
    display: block;
    font-size: 1.5rem;
    line-height: .7;
}

/* Pagination */
.pagination {
    display: flex;
    gap: .35rem;
    padding-left: 0;
    list-style: none;
}

.page-link {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--primary);
}

.page-item.active .page-link {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.page-item.disabled .page-link {
    opacity: .5;
    pointer-events: none;
}

/* Spinner */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: .15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner .75s linear infinite;
}

.spinner-border-sm {
    width: .8rem;
    height: .8rem;
    border-width: .12em;
}

@keyframes spinner {
    to { transform: rotate(360deg); }
}

/* Text and color helpers */
.text-primary { color: var(--primary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-info { color: var(--info) !important; }
.text-secondary,
.text-muted { color: var(--muted) !important; }
.text-dark,
.text-body { color: var(--text) !important; }
.text-white { color: #fff !important; }
.text-center { text-align: center !important; }
.text-start { text-align: left !important; }
.text-end { text-align: right !important; }
.text-uppercase { text-transform: uppercase !important; }

.text-xs { font-size: .75rem !important; }
.text-sm { font-size: .875rem !important; }
.text-xxs { font-size: .65rem !important; }
.font-weight-bold,
.font-weight-bolder { font-weight: 700 !important; }
.opacity-5 { opacity: .5 !important; }
.opacity-7 { opacity: .7 !important; }

/* Display and flex helpers */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.align-items-start { align-items: flex-start !important; }
.align-items-center { align-items: center !important; }
.align-items-end { align-items: flex-end !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-end { justify-content: flex-end !important; }
.gap-1 { gap: .25rem !important; }
.gap-2 { gap: .5rem !important; }
.gap-3 { gap: 1rem !important; }
.w-100 { width: 100% !important; }
.h-100 { height: 100% !important; }
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.top-0 { top: 0 !important; }
.end-0 { right: 0 !important; }
.start-0 { left: 0 !important; }
.fixed-start { position: fixed !important; }

/* Spacing helpers */
.m-0 { margin: 0 !important; }
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: .25rem !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: .25rem !important; }
.me-2 { margin-right: .5rem !important; }
.me-3 { margin-right: 1rem !important; }
.me-4 { margin-right: 1.5rem !important; }
.me-5 { margin-right: 3rem !important; }
.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: .25rem !important; }
.ms-2 { margin-left: .5rem !important; }
.ms-3 { margin-left: 1rem !important; }
.ms-4 { margin-left: 1.5rem !important; }
.ms-auto { margin-left: auto !important; }
.mx-0 { margin-right: 0 !important; margin-left: 0 !important; }
.mx-4 { margin-right: 1.5rem !important; margin-left: 1.5rem !important; }
.my-3 { margin-top: 1rem !important; margin-bottom: 1rem !important; }

.p-0 { padding: 0 !important; }
.p-2 { padding: .5rem !important; }
.p-3 { padding: 1rem !important; }
.px-0 { padding-right: 0 !important; padding-left: 0 !important; }
.px-2 { padding-right: .5rem !important; padding-left: .5rem !important; }
.px-3 { padding-right: 1rem !important; padding-left: 1rem !important; }
.py-1 { padding-top: .25rem !important; padding-bottom: .25rem !important; }
.py-2 { padding-top: .5rem !important; padding-bottom: .5rem !important; }
.py-4 { padding-top: 1.5rem !important; padding-bottom: 1.5rem !important; }
.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: .25rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-2 { padding-bottom: .5rem !important; }
.ps-3 { padding-left: 1rem !important; }
.pe-3 { padding-right: 1rem !important; }

.border-0 { border: 0 !important; }
.border-radius-lg { border-radius: var(--radius-md) !important; }
.border-radius-xl { border-radius: var(--radius-lg) !important; }
.shadow-none { box-shadow: none !important; }
.bg-transparent { background: transparent !important; }
.bg-gray-100 { background: var(--body-bg) !important; }
.overflow-hidden { overflow: hidden !important; }

/* MwanyiPay user page helpers */
.user-stat-card,
.user-filter-card,
.user-table-card {
    border: 0;
    border-radius: 14px;
}

.user-stat-card { height: 100%; }
.user-stat-card .card-body { padding: 13px 15px; }

.user-stat-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-stat-label {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.user-stat-value {
    margin: 0;
    color: var(--text);
    font-size: 1.1rem;
    font-weight: 700;
}

.user-stat-icon {
    display: flex;
    width: 36px;
    height: 36px;
    min-width: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: #fff;
}

.user-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.user-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.user-actions button {
    border: 0;
    cursor: pointer;
}

.user-avatar {
    display: flex;
    width: 42px;
    height: 42px;
    min-width: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #078f82);
    color: #fff;
    font-weight: 700;
}

.user-modal-note {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-soft);
    color: var(--muted);
}

.user-view-label {
    margin-bottom: 3px;
    color: #8392ab;
    font-size: .67rem;
    font-weight: 700;
    text-transform: uppercase;
}

.user-view-value {
    margin-bottom: 15px;
    overflow-wrap: anywhere;
    color: var(--text);
    font-weight: 600;
    white-space: normal;
}

/* 700px Add/Edit user modal with working body scroll */
#addUserModal,
#editUserModal {
    overflow-y: auto !important;
    padding-right: 0 !important;
}

#addUserModal .user-form-modal-dialog,
#editUserModal .user-form-modal-dialog,
#addUserModal .modal-dialog,
#editUserModal .modal-dialog {
    width: calc(100% - 2rem) !important;
    max-width: 700px !important;
    height: calc(100vh - 2rem);
    max-height: 700px;
    margin: 1rem auto !important;
}

#addUserModal .modal-content,
#editUserModal .modal-content {
    display: flex;
    height: 100%;
    max-height: 100% !important;
    flex-direction: column;
    overflow: hidden;
}

#addUserModal .user-modal-form,
#editUserModal .user-modal-form {
    display: flex;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    overflow: hidden;
}

#addUserModal .modal-header,
#editUserModal .modal-header {
    flex: 0 0 auto;
    border-bottom: 3px solid var(--secondary);
    background: var(--primary);
}

#addUserModal .modal-header .modal-title,
#editUserModal .modal-header .modal-title {
    color: #fff;
}

#addUserModal .modal-header .text-muted,
#editUserModal .modal-header .text-muted {
    color: rgba(255,255,255,.72) !important;
}

#addUserModal .modal-header .btn-close,
#editUserModal .modal-header .btn-close {
    color: #fff;
}

#addUserModal .modal-body,
#editUserModal .modal-body {
    min-height: 0;
    flex: 1 1 auto;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#addUserModal .modal-footer,
#editUserModal .modal-footer {
    flex: 0 0 auto;
    background: #fff;
}

/* Responsive */
@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-sm-3 { flex: 0 0 auto; width: 25%; }
    .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-sm-6 { flex: 0 0 auto; width: 50%; }
    .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-sm-9 { flex: 0 0 auto; width: 75%; }
    .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-sm-12 { flex: 0 0 auto; width: 100%; }
    .d-sm-inline { display: inline !important; }
    .d-sm-block { display: block !important; }
}

@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-md-9 { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
    .ms-md-auto { margin-left: auto !important; }
    .me-md-0 { margin-right: 0 !important; }
    .pe-md-3 { padding-right: 1rem !important; }
}

@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
    .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-lg-9 { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
}

@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-xl-3 { flex: 0 0 auto; width: 25%; }
    .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-xl-6 { flex: 0 0 auto; width: 50%; }
    .col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-xl-9 { flex: 0 0 auto; width: 75%; }
    .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-xl-12 { flex: 0 0 auto; width: 100%; }
    .d-xl-none { display: none !important; }
}

@media (max-width: 1199.98px) {
    .sidenav {
        top: 0;
        bottom: 0;
        left: 0;
        margin: 0 !important;
        border-radius: 0 18px 18px 0 !important;
        transform: translateX(-105%);
    }

    .g-sidenav-pinned .sidenav {
        transform: translateX(0);
    }

    .g-sidenav-pinned::after {
        position: fixed;
        inset: 0;
        z-index: 1025;
        background: rgba(0,0,0,.35);
        content: "";
    }

    .main-content {
        margin-left: 0;
    }

    .navbar-main {
        margin-right: .75rem !important;
        margin-left: .75rem !important;
    }

    .d-xl-none { display: flex !important; }
}

@media (max-width: 767.98px) {
    .modal-dialog,
    .modal-lg,
    .modal-xl {
        width: calc(100% - 1rem);
        max-width: none;
        margin: .5rem auto;
    }

    .modal-dialog-centered {
        min-height: calc(100% - 1rem);
    }

    .modal-dialog-scrollable {
        height: calc(100% - 1rem);
    }

    #addUserModal .user-form-modal-dialog,
    #editUserModal .user-form-modal-dialog,
    #addUserModal .modal-dialog,
    #editUserModal .modal-dialog {
        width: calc(100% - 1rem) !important;
        height: calc(100vh - 1rem);
        max-height: none;
        margin: .5rem auto !important;
    }

    .user-toolbar {
        width: 100%;
    }

    .user-toolbar .btn {
        flex: 1 1 calc(50% - 8px);
    }

    .user-actions {
        flex-direction: column;
    }

    .user-actions button {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .container-fluid {
        padding-right: .65rem;
        padding-left: .65rem;
    }

    .navbar-main {
        margin-right: .5rem !important;
        margin-left: .5rem !important;
    }

    .card-body,
    .card-header,
    .card-footer {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .user-toolbar .btn {
        flex: 1 1 100%;
    }

    .d-sm-inline {
        display: none !important;
    }
}

@media (max-height: 760px) {
    #addUserModal .user-form-modal-dialog,
    #editUserModal .user-form-modal-dialog,
    #addUserModal .modal-dialog,
    #editUserModal .modal-dialog {
        height: calc(100vh - 1rem);
        max-height: none;
        margin: .5rem auto !important;
    }
}
