:root {
    --mm-primary: #f5a000;
    --mm-primary-rgb: 245, 160, 0;
    --mm-ink: #20242b;
    --mm-slate: #2d3440;
    --mm-muted: #74788d;
    --mm-surface: #f5f7fb;
    --mm-success: #2ab57d;
    --mm-danger: #fd625e;
    --mm-info: #4ba6ef;
}

body { background: var(--mm-surface); }
body[data-sidebar="dark"] .vertical-menu { background: linear-gradient(180deg, #222832 0%, #161b22 100%); }
body[data-sidebar="dark"] .navbar-brand-box { background: #fff; border-bottom: 1px solid #e8ebf1; box-shadow: inset -1px 0 0 #edf0f5; }
body[data-sidebar="dark"] #sidebar-menu ul li a { color: rgba(255,255,255,.68); }
body[data-sidebar="dark"] #sidebar-menu ul li a:hover,
body[data-sidebar="dark"] #sidebar-menu ul li a.active,
body[data-sidebar="dark"] #sidebar-menu ul li.mm-active > a { color: #fff; background: rgba(var(--mm-primary-rgb), .12); }
body[data-sidebar="dark"] #sidebar-menu ul li a i { color: rgba(255,255,255,.52); }
body[data-sidebar="dark"] #sidebar-menu ul li a.active i,
body[data-sidebar="dark"] #sidebar-menu ul li.mm-active > a i { color: var(--mm-primary); }
body[data-sidebar="dark"] .menu-title { color: rgba(255,255,255,.35); letter-spacing: .11em; }

.btn-primary,
.bg-primary { background-color: var(--mm-primary) !important; border-color: var(--mm-primary) !important; }
.btn-primary:hover,
.btn-primary:focus { filter: brightness(.94); }
.text-primary { color: var(--mm-primary) !important; }
.border-primary { border-color: var(--mm-primary) !important; }
.form-control:focus,
.form-select:focus { border-color: rgba(var(--mm-primary-rgb), .75); box-shadow: 0 0 0 .15rem rgba(var(--mm-primary-rgb), .15); }

.mm-logo { object-fit: contain; }
.mm-logo-shell { min-height: 70px; display: flex; align-items: center; justify-content: center; background:#fff !important; overflow:hidden; }
.mm-logo-shell .logo { height:70px; width:100%; align-items:center; justify-content:center; }
.mm-logo-shell .logo-lg { display:flex; align-items:center; justify-content:center; width:100%; height:70px; }
.mm-logo-shell .logo-sm { display:none; align-items:center; justify-content:center; width:70px; height:70px; }
.mm-logo-full { width:178px; max-width:calc(100% - 24px); max-height:56px; }
.mm-logo-mark { width:42px; height:42px; object-fit:contain; }
body.vertical-collpsed .mm-logo-shell .logo-lg { display:none !important; }
body.vertical-collpsed .mm-logo-shell .logo-sm { display:flex !important; }
body.vertical-collpsed .mm-logo-shell { width:70px !important; }
body.vertical-collpsed .mm-logo-shell .logo { width:70px !important; }

.mm-brand-mark { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #181818; font-weight: 800; background: linear-gradient(135deg, #ffc35a, var(--mm-primary)); box-shadow: 0 7px 18px rgba(var(--mm-primary-rgb), .24); }
.mm-topbar-tenant { min-width: 210px; }
.mm-user-avatar { width: 35px; height: 35px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--mm-primary-rgb), .14); color: #9a6200; font-weight: 700; }
.mm-page-kicker { color: var(--mm-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.mm-page-heading { margin-bottom: 1.4rem; }
.mm-page-heading h4 { margin-bottom: .25rem; }

.card { border: 0; box-shadow: 0 3px 12px rgba(18,38,63,.055); border-radius: .85rem; }
.card-header { background: transparent; border-bottom: 1px solid #edf0f5; padding: 1.15rem 1.25rem; }
.card-body { padding: 1.25rem; }
.table { margin-bottom: 0; }
.table thead th { color: #6f7484; text-transform: uppercase; font-size: .72rem; letter-spacing: .055em; border-bottom-width: 1px; white-space: nowrap; }
.table tbody td { vertical-align: middle; }
.table-responsive { border-radius: .65rem; }
.badge { font-weight: 600; }

.mm-stat-card { overflow: hidden; position: relative; min-height: 133px; }
.mm-stat-card .card-body { position: relative; z-index: 1; }
.mm-stat-card:after { content: ""; position: absolute; width: 64px; height: 56px; right: -20px; top: -18px; background: rgba(var(--mm-primary-rgb), .075); clip-path: polygon(25% 0, 75% 0, 100% 50%, 75% 100%, 25% 100%, 0 50%); pointer-events: none; }
.mm-stat-icon { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.35rem; }
.mm-stat-label { color: var(--mm-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.mm-stat-number { font-size: 1.75rem; line-height: 1.1; font-weight: 700; color: var(--mm-ink); }
.mm-icon-primary { background: rgba(var(--mm-primary-rgb), .14); color: #b06e00; }
.mm-icon-info { background: rgba(75,166,239,.13); color: #348fd9; }
.mm-icon-success { background: rgba(42,181,125,.13); color: #219966; }
.mm-icon-danger { background: rgba(253,98,94,.13); color: #ec514d; }
.mm-icon-warning { background: rgba(245,160,0,.13); color: #b06e00; }
.mm-icon-slate { background: rgba(45,52,64,.1); color: #414957; }

.mm-status-banner { border: 0; border-left: 4px solid currentColor; border-radius: .75rem; }
.mm-quick-link { display: flex; align-items: center; padding: .8rem .9rem; border-radius: .65rem; color: #495057; background: #f8f9fb; transition: .18s ease; }
.mm-quick-link:hover { transform: translateY(-1px); background: rgba(var(--mm-primary-rgb), .09); color: #2f333a; }
.mm-quick-link i { font-size: 1.25rem; margin-right: .7rem; color: var(--mm-primary); }
.mm-empty-state { padding: 2.3rem 1rem; text-align: center; color: var(--mm-muted); }
.mm-empty-state i { font-size: 2rem; color: rgba(var(--mm-primary-rgb), .9); }
.mm-release-pill { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .65rem; border-radius: 999px; background: #f0f2f7; color: #626879; font-size: .75rem; }

.auth-page { min-height: 100vh; background: #fff; }
.auth-full-page-content { min-height: 100vh; }
.auth-logo img { width: min(310px, 82%); height: auto; }
.auth-bg.mm-auth-bg { position: relative; min-height: 100vh; background-image: linear-gradient(135deg, rgba(18,22,29,.9), rgba(45,52,64,.68)), url('/assets/images/auth-bg.jpg'); background-size: cover; background-position: center; overflow: hidden; }
.mm-auth-bg:before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, rgba(var(--mm-primary-rgb), .26), transparent 35%); }
.mm-auth-panel { position: relative; z-index: 2; max-width: 690px; }
.mm-auth-feature { display: flex; gap: .85rem; margin-bottom: 1.1rem; color: rgba(255,255,255,.82); }
.mm-auth-feature-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; color: #1b1d21; background: var(--mm-primary); font-size: 1.2rem; }
.mm-auth-card-title { color: var(--mm-ink); font-weight: 650; }
.auth-pass-inputgroup .btn { border-color: #ced4da; }
.mm-login-footer { color: #9195a1; font-size: .82rem; }

@media (max-width: 767.98px) {
    .auth-full-page-content { min-height: 100vh; }
    .mm-topbar-tenant { min-width: 145px; }
    .mm-user-name { display: none; }
}

/* MaximMail Next 0.5.3 coordinated interface layer */
.page-content { padding-bottom: 2rem; }
.mm-page-subtitle { max-width: 760px; }
.breadcrumb { font-size: .78rem; }
.breadcrumb a { color: var(--mm-muted); }
.mm-flash { box-shadow: 0 4px 16px rgba(18,38,63,.06); }
.mm-user-menu { min-width: 240px; }
.mm-card-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.mm-search-wrap { width: 250px; max-width: 100%; }
.mm-search-wrap > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #8b91a1; z-index: 2; }
.mm-search-wrap .form-control { padding-left: 2.2rem; }
.mm-filter-select { width: 145px; }
.mm-summary-card .card-body { display: flex; align-items: center; gap: 1rem; min-height: 108px; }
.mm-summary-copy { color: var(--mm-ink); font-weight: 600; line-height: 1.35; }
.mm-row-icon { width: 38px; height: 38px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: 0 0 auto; }
.mm-contact-avatar { width: 39px; height: 39px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--mm-primary-rgb), .14); color: #8d5a00; font-weight: 700; flex: 0 0 auto; }
.mm-table-primary { color: #3d4350; font-weight: 500; }
.mm-technical-status { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: .78rem; color: #666d7d; }
.mm-empty-state-lg { padding: 4rem 1.5rem; }
.mm-empty-state p { max-width: 520px; margin-left: auto; margin-right: auto; }
.mm-empty-illustration { width: 68px; height: 68px; border-radius: 22px; display: flex; align-items: center; justify-content: center; background: rgba(var(--mm-primary-rgb), .13); color: var(--mm-primary); font-size: 2rem; }
.mm-empty-success { background: rgba(42,181,125,.13); color: var(--mm-success); }
.mm-offcanvas-wide { width: min(720px, 100vw) !important; }
.offcanvas-header { padding: 1.25rem 1.5rem; }
.offcanvas-body { padding: 1.5rem; }
.mm-form-section { display: flex; gap: 1rem; padding: 1.25rem 0; border-bottom: 1px solid #edf0f5; }
.mm-form-section:first-child { padding-top: 0; }
.mm-form-section:last-of-type { border-bottom: 0; }
.mm-section-number { width: 30px; height: 30px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: rgba(var(--mm-primary-rgb), .14); color: #8d5a00; font-weight: 700; flex: 0 0 auto; }
.mm-option-card, .mm-choice-card { display: flex; align-items: flex-start; gap: .7rem; width: 100%; border: 1px solid #e7eaf0; border-radius: .7rem; padding: .8rem; background: #fff; cursor: pointer; transition: .18s ease; }
.mm-option-card:hover, .mm-choice-card:hover { border-color: rgba(var(--mm-primary-rgb), .55); background: rgba(var(--mm-primary-rgb), .035); }
.mm-option-card input, .mm-choice-card input { margin-top: .16rem; flex: 0 0 auto; }
.mm-option-card span, .mm-choice-card span { display: block; min-width: 0; }
.mm-option-card strong, .mm-choice-card strong { display: block; color: var(--mm-ink); font-size: .87rem; }
.mm-option-card small, .mm-choice-card small { display: block; color: var(--mm-muted); line-height: 1.35; margin-top: .15rem; }
.mm-choice-card:has(input:checked), .mm-option-card:has(input:checked) { border-color: rgba(var(--mm-primary-rgb), .65); background: rgba(var(--mm-primary-rgb), .06); box-shadow: 0 0 0 2px rgba(var(--mm-primary-rgb), .06); }
.mm-upload-zone { border: 1.5px dashed #d8dce5; border-radius: .8rem; padding: 1.35rem; background: #fafbfc; text-align: center; }
.mm-upload-zone > i { font-size: 2rem; color: var(--mm-primary); }
.mm-sticky-card { position: sticky; top: 92px; }
.mm-editor-tabs { border-bottom: 0; }
.mm-editor-tabs .nav-link { padding: 1rem .9rem; border: 0; border-bottom: 2px solid transparent; color: var(--mm-muted); }
.mm-editor-tabs .nav-link.active { color: var(--mm-primary); border-bottom-color: var(--mm-primary); background: transparent; }
.mm-code-editor { min-height: 540px; line-height: 1.55; font-size: .85rem; }
.mm-preview-frame { border: 1px solid #e4e7ed; border-radius: .8rem; background: #eef1f5; padding: 1rem; min-height: 610px; }
.mm-preview-frame iframe { width: 100%; min-height: 575px; border: 0; border-radius: .5rem; background: #fff; }
.mm-audience-selector { max-height: 310px; overflow: auto; border: 1px solid #edf0f5; border-radius: .7rem; }
.mm-audience-option { display: flex; align-items: center; gap: .65rem; padding: .75rem; border-bottom: 1px solid #edf0f5; cursor: pointer; }
.mm-audience-option:last-child { border-bottom: 0; }
.mm-audience-option:hover { background: #f8f9fb; }
.mm-audience-option strong, .mm-audience-option small { display: block; }
.mm-audience-option small { color: var(--mm-muted); }
.mm-permission-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; max-height: 520px; overflow: auto; padding-right: .25rem; }
.mm-permission-group { border: 1px solid #e7eaf0; border-radius: .75rem; padding: 1rem; }
.mm-permission-group h6 { text-transform: capitalize; margin-bottom: .8rem; }
.mm-permission-item { display: flex; align-items: flex-start; gap: .6rem; padding: .45rem 0; cursor: pointer; }
.mm-permission-item span, .mm-permission-item small { display: block; }
.mm-permission-item small { color: var(--mm-muted); margin-top: .12rem; }
.mm-setting-summary { display: flex; gap: .8rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px solid #edf0f5; }
.mm-setting-summary:last-of-type { border-bottom: 0; }
.mm-setting-summary > i { font-size: 1.35rem; color: var(--mm-primary); }
.mm-setting-summary strong, .mm-setting-summary small { display: block; }
.mm-setting-summary small { color: var(--mm-muted); margin-top: .12rem; }
.mm-public-page { background: radial-gradient(circle at 20% 20%, rgba(var(--mm-primary-rgb),.12), transparent 30%), #f5f7fb; }
.mm-public-card { max-width: 680px; box-shadow: 0 20px 55px rgba(18,38,63,.12); }
.mm-public-logo { max-width: 280px; width: 75%; }
.table > :not(caption) > * > * { padding: .88rem 1rem; }
.card-header-tabs { margin-bottom: -1px; }
.nav-tabs .nav-link { color: var(--mm-muted); }
.nav-tabs .nav-link.active { color: var(--mm-primary); font-weight: 600; }

@media (max-width: 991.98px) {
    .mm-sticky-card { position: static; }
    .mm-permission-grid { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
    .mm-card-toolbar { align-items: stretch; }
    .mm-search-wrap, .mm-filter-select { width: 100%; }
    .mm-form-section { flex-direction: column; }
    .mm-preview-frame { min-height: 430px; padding: .5rem; }
    .mm-preview-frame iframe { min-height: 400px; }
}
@media print {
    .vertical-menu, #page-topbar, .footer, .mm-page-heading .btn, .mm-release-pill { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .page-content { padding: 0 !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* MaximMail Next 0.6.0 server-side data tables */
.mm-data-toolbar { display:flex; align-items:center; justify-content:space-between; gap:1rem; flex-wrap:wrap; padding:1rem; border-bottom:1px solid #edf0f5; background:#fff; }
.mm-data-toolbar .mm-data-filters { display:flex; align-items:center; gap:.55rem; flex-wrap:wrap; }
.mm-data-toolbar .form-select-sm { min-width:135px; }
.mm-data-toolbar .mm-search-wrap { width:min(330px,100%); }
.mm-data-toolbar .mm-page-size { width:84px; min-width:84px; }
.mm-data-table-card .card-body { position:relative; }
.mm-data-table-card .dataTables_wrapper { width:100%; }
.mm-data-table-card table.dataTable { margin-top:0 !important; margin-bottom:0 !important; width:100% !important; }
.mm-data-table-card table.dataTable thead th { white-space:nowrap; font-size:.74rem; text-transform:uppercase; letter-spacing:.045em; color:#73798a; border-bottom:1px solid #e8ebf1 !important; background:#fafbfc; }
.mm-data-table-card table.dataTable tbody td { vertical-align:middle; }
.mm-data-table-card table.dataTable tbody tr:hover { background:rgba(var(--mm-primary-rgb),.035); }
.mm-data-table-card .dataTables_processing { top:90px !important; z-index:5; width:auto !important; left:50% !important; margin:0 !important; transform:translateX(-50%); padding:.7rem 1rem !important; border:1px solid #e2e6ed; border-radius:.65rem; background:#fff !important; box-shadow:0 8px 24px rgba(18,38,63,.12); color:#596071; }
.mm-data-table-card .dataTables_info { padding-top:.55rem !important; color:#747b8c; font-size:.82rem; }
.mm-data-table-card .dataTables_paginate { padding-top:0 !important; }
.mm-data-table-card .pagination { justify-content:flex-end; margin-bottom:0; }
.mm-data-table-card .page-link { border:0; min-width:34px; height:34px; display:inline-flex; align-items:center; justify-content:center; border-radius:.45rem !important; margin-left:.2rem; color:#5d6473; }
.mm-data-table-card .page-item.active .page-link { background:var(--mm-primary); color:#fff; }
.mm-data-table-card .page-item.disabled .page-link { background:transparent; color:#b5bac5; }
.mm-data-table-card .dataTables_scrollHead { border-bottom:0 !important; }
.mm-data-table-card .dataTables_scrollBody { border-bottom:0 !important; }
.mm-table-footer { border-top:1px solid #edf0f5; background:#fff; }
.mm-cell-wrap { display:block; max-width:320px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-json-preview { display:block; max-width:420px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mm-table-help { color:#7b8190; font-size:.78rem; }
.mm-table-count-pill { display:inline-flex; align-items:center; gap:.35rem; padding:.28rem .58rem; border-radius:999px; background:#f0f2f7; color:#626879; font-size:.75rem; font-weight:600; }
.mm-table-error { margin:1rem; }
.mm-tab-table .mm-data-toolbar { border-top:0; }
table.dataTable.dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table.dataTable.dtr-inline.collapsed > tbody > tr > th.dtr-control:before { background-color:var(--mm-primary); }

@media (max-width: 767.98px) {
    .mm-data-toolbar { align-items:stretch; }
    .mm-data-toolbar > *, .mm-data-toolbar .mm-data-filters { width:100%; }
    .mm-data-toolbar .mm-data-filters > * { flex:1 1 135px; }
    .mm-data-toolbar .mm-search-wrap { width:100%; }
    .mm-data-table-card .dataTables_info { text-align:center; margin-bottom:.75rem; }
    .mm-data-table-card .pagination { justify-content:center; }
}

/* MaximMail Next 0.6.5 top-bar and brand polish */
/* Strong selectors deliberately override Minia's cached/default sidebar rules. */
#page-topbar .navbar-header > .d-flex > .navbar-brand-box.mm-logo-shell,
body[data-sidebar="dark"] #page-topbar .navbar-brand-box.mm-logo-shell,
body[data-topbar="light"] #page-topbar .navbar-brand-box.mm-logo-shell {
    width: 245px;
    min-width: 245px;
    height: 70px;
    padding: 0 18px !important;
    background: #fff !important;
    background-color: #fff !important;
    border-right: 1px solid #e7eaf0 !important;
    border-bottom: 1px solid #edf0f5 !important;
    box-shadow: 0 2px 10px rgba(18,38,63,.035) !important;
    overflow: hidden !important;
}
#page-topbar .navbar-brand-box.mm-logo-shell .logo {
    width: 100%;
    height: 70px;
    line-height: normal !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fff !important;
}
#page-topbar .navbar-brand-box.mm-logo-shell .logo-lg {
    width: 100%;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}
#page-topbar .navbar-brand-box.mm-logo-shell .mm-logo-full {
    display: block;
    width: 166px !important;
    max-width: 166px !important;
    height: auto !important;
    max-height: 52px !important;
    object-fit: contain !important;
}
#page-topbar .navbar-brand-box.mm-logo-shell .logo-sm { display: none; }
#page-topbar .navbar-brand-box.mm-logo-shell .mm-logo-mark {
    display: block;
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    max-height: 30px !important;
    object-fit: contain !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    padding: 0 !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell .logo,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell .logo {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
    height: 70px !important;
    overflow: hidden !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell .logo-lg,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell .logo-lg { display: none !important; }
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell .logo-sm,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell .logo-sm {
    display: flex !important;
    width: 70px !important;
    height: 70px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell .logo-sm img.mm-logo-mark,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell .logo-sm img.mm-logo-mark {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    transform: none !important;
}

.mm-operations-status { align-items: center; gap: .42rem; }
.mm-ops-pill {
    --mm-ops-accent: #4ba6ef;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .42rem;
    height: 34px;
    min-width: 68px;
    padding: 0 .64rem 0 .38rem;
    border: 1px solid #e7eaf0;
    border-radius: 999px;
    background: #fff;
    color: #303541;
    box-shadow: 0 2px 8px rgba(18,38,63,.055);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.mm-ops-icon-only {
    width: 34px;
    min-width: 34px;
    padding: 0;
    justify-content: center;
    cursor: pointer;
    font: inherit;
}
.mm-ops-icon-only .mm-ops-pill-icon {
    width: 25px;
    height: 25px;
}
.mm-ops-sending { flex: 0 0 34px; }
.mm-ops-pill:hover {
    color: #20242d;
    transform: translateY(-1px);
    border-color: #dce1e9;
    box-shadow: 0 5px 14px rgba(18,38,63,.09);
}
.mm-ops-pill-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--mm-ops-accent) 13%, #fff);
    color: var(--mm-ops-accent);
    font-size: .98rem;
    flex: 0 0 auto;
}
.mm-ops-pill strong {
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    letter-spacing: -.01em;
}
.mm-ops-status-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--mm-ops-accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--mm-ops-accent) 12%, transparent);
    margin-left: .05rem;
}
.mm-ops-disk { --mm-ops-accent: #4f6bed; }
.mm-ops-database { --mm-ops-accent: #8b5cf6; }
.mm-ops-queue { --mm-ops-accent: #0fa97f; }
.mm-ops-info { --mm-ops-accent: #348fd9; }
.mm-ops-warning { --mm-ops-accent: #e69500; }
.mm-ops-critical { --mm-ops-accent: #e45450; }
.mm-ops-unavailable { --mm-ops-accent: #8b92a1; opacity: .72; }
@media (max-width: 1280px) {
    .mm-ops-pill { min-width: 60px; padding-right: .5rem; }
    .mm-ops-status-dot { display: none; }
}
@media (max-width: 1199.98px) {
    .mm-operations-status { display: none !important; }
}

/* MaximMail Next 0.6.6 single-brand-link correction */
#page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link {
    display: flex !important;
    width: 100% !important;
    height: 70px !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    overflow: hidden !important;
}
#page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-lg {
    display: flex !important;
    width: 100% !important;
    height: 70px !important;
    align-items: center !important;
    justify-content: center !important;
}
#page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-sm {
    display: none !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-lg,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-lg {
    display: none !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-sm,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .logo-sm {
    display: flex !important;
    width: 70px !important;
    height: 70px !important;
    align-items: center !important;
    justify-content: center !important;
}
body[data-sidebar-size="sm"] #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .mm-logo-mark,
body.vertical-collpsed #page-topbar .navbar-brand-box.mm-logo-shell > .mm-brand-link .mm-logo-mark {
    width: 28px !important;
    min-width: 28px !important;
    max-width: 28px !important;
    height: 28px !important;
    min-height: 28px !important;
    max-height: 28px !important;
}

/* 0.8.4 tenant directory and branding controls */
.mm-tenant-logo-thumb,.mm-tenant-logo-fallback{width:42px;height:42px;min-width:42px;border-radius:10px;display:inline-flex;align-items:center;justify-content:center;object-fit:contain;background:#fff;border:1px solid #e9e9ef;padding:4px}.mm-tenant-logo-fallback{background:rgba(var(--mm-primary-rgb),.1);color:var(--mm-primary);font-weight:700;padding:0}.mm-current-logo{display:flex;align-items:center;gap:12px;border:1px solid #e9e9ef;border-radius:10px;padding:10px;background:#fafbfc}.mm-current-logo img{width:72px;height:48px;object-fit:contain;background:#fff;border-radius:6px}.mm-colour-input .form-control-color{max-width:54px;padding:.25rem}.mm-colour-input .font-monospace{text-transform:lowercase}

/* Tenant identity strip: a subtle page-load confirmation of the active workspace. */
.mm-tenant-brand-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    z-index: 1105;
    overflow: hidden;
    pointer-events: none;
    background: rgba(var(--mm-primary-rgb), .18);
}
.mm-tenant-brand-bar > span {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--mm-primary);
    transform-origin: left center;
    animation: mm-tenant-brand-load .55s cubic-bezier(.2,.75,.3,1) both;
}
@keyframes mm-tenant-brand-load {
    from { transform: scaleX(0); opacity: .55; }
    to { transform: scaleX(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .mm-tenant-brand-bar > span { animation: none; }
}


/* 0.8.7 RBAC permission directory */
.mm-rbac-explainer{border:1px solid rgba(80,165,241,.24);background:rgba(80,165,241,.08);color:#35536f}.mm-rbac-tabs{border-bottom-color:#e9e9ef}.mm-rbac-tabs .nav-link{display:inline-flex;align-items:center;gap:.15rem;color:#596176;font-weight:600;border-radius:.45rem .45rem 0 0}.mm-rbac-tabs .nav-link.active{color:var(--mm-primary)}.mm-permission-directory table{min-width:920px}.mm-permission-directory th{white-space:nowrap}.mm-permission-directory td{vertical-align:middle}.mm-permission-code{display:inline-block;max-width:270px;white-space:normal;overflow-wrap:anywhere}.mm-permission-description{min-width:280px;max-width:440px;line-height:1.45}

/* 0.9.15: one explicit submenu chevron; suppress the theme pseudo-arrow. */
#sidebar-menu .mm-section-toggle { display:flex !important; align-items:center; }
#sidebar-menu .mm-section-toggle::after { display:none !important; content:none !important; }
#sidebar-menu .mm-section-toggle > span:not(.mm-menu-chevron) { flex:1 1 auto; }
#sidebar-menu .mm-menu-chevron { margin-left:auto; display:inline-flex; align-items:center; justify-content:center; transition:transform .2s ease; }
#sidebar-menu li.mm-active > .mm-section-toggle .mm-menu-chevron { transform:rotate(90deg); }
#sidebar-menu .mm-menu-chevron i { min-width:0; padding:0; font-size:1.1rem; }
.mm-settings-anchor { scroll-margin-top:90px; }


/* 0.9.17: persistent settings save state and unsaved-change protection. */
.mm-settings-save-bar {
    position: fixed;
    right: 28px;
    bottom: 24px;
    z-index: 1036;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 370px;
    padding: 12px 14px 12px 16px;
    border: 1px solid #e4e8ef;
    border-radius: 14px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 10px 28px rgba(31,45,61,.16);
    backdrop-filter: blur(7px);
}
.mm-settings-save-state { display:flex; align-items:center; gap:10px; flex:1 1 auto; min-width:0; }
.mm-settings-save-state strong,.mm-settings-save-state small { display:block; }
.mm-settings-save-state small { color:#74788d; margin-top:1px; }
.mm-settings-save-dot { width:9px; height:9px; border-radius:50%; flex:0 0 9px; background:#aeb4be; box-shadow:0 0 0 4px rgba(174,180,190,.14); }
.mm-settings-save-bar.is-dirty { border-color:rgba(var(--mm-primary-rgb),.34); }
.mm-settings-save-bar.is-dirty .mm-settings-save-dot { background:var(--mm-primary); box-shadow:0 0 0 4px rgba(var(--mm-primary-rgb),.13); }
.mm-settings-save-bar .btn:disabled { opacity:.58; }
@media (max-width: 767.98px) {
    .mm-settings-save-bar { left:12px; right:12px; bottom:12px; min-width:0; gap:10px; padding:10px 11px; }
    .mm-settings-save-state small { display:none; }
    .mm-settings-save-bar .btn { white-space:nowrap; }
}
@media print { .mm-settings-save-bar { display:none !important; } }

/* Help centre and contextual page help */
.mm-page-help-button { min-width: 2.25rem; }
.mm-help-modal .modal-header { border-bottom-color: rgba(0,0,0,.06); }
.mm-help-modal-section { padding: 1rem 1.1rem; border: 1px solid rgba(0,0,0,.08); border-radius: .75rem; margin-top: 1rem; background: #fff; }
.mm-help-modal-section ol, .mm-help-modal-section ul { padding-left: 1.25rem; }
.mm-help-modal-section li + li { margin-top: .45rem; }
.mm-help-note { background: rgba(var(--mm-primary-rgb), .05); border-color: rgba(var(--mm-primary-rgb), .18); }
.mm-help-centre { align-items: flex-start; }
.mm-help-nav-card { position: sticky; top: 94px; }
.mm-help-nav .nav-link { padding: .45rem 0; color: #596579; border-bottom: 1px solid rgba(0,0,0,.055); }
.mm-help-nav .nav-link:hover { color: var(--mm-primary); }
.mm-help-chapter { scroll-margin-top: 100px; margin-bottom: 1rem; }
.mm-help-chapter h5 { color: #202a3b; }
.mm-help-bullets { padding-left: 1.25rem; }
.mm-help-bullets li + li { margin-top: .5rem; }
.mm-help-term-table thead th { background: rgba(var(--mm-primary-rgb), .06); color: #4c566a; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.mm-help-term-table td { vertical-align: top; }
.mm-help-guide-switcher { padding: .2rem 0 .4rem; }
@media (max-width: 1199.98px) { .mm-help-nav-card { position: static; } }
/* MaximMail Next 1.1.6: compact campaign / tenant asset usage pills.
   align-self prevents flex rows from stretching a badge to the adjacent two-line metadata height. */
.mm-asset-usage-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    flex: 0 0 auto;
    min-height: 24px;
    padding: .32rem .55rem;
    line-height: 1;
    white-space: nowrap;
}

