:root {
    --primary: #3f6ad8;
    --info: #16aaff;
    --focus: #444054;
    --danger: #d92550;
    --warning: #f7b924;
    --success: #3ac47d;
    --light: #f7f9fc;
    --muted: #6c757d;
    --body: #f1f4f6;
    --border: #e9ecef;
    --text: #495057;
    --sidebar: #ffffff;
    --shadow: 0 0.46875rem 2.1875rem rgba(4, 9, 20, .03), 0 0.9375rem 1.40625rem rgba(4, 9, 20, .03), 0 0.25rem 0.53125rem rgba(4, 9, 20, .05), 0 0.125rem 0.1875rem rgba(4, 9, 20, .03);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--body); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: #2b55b7; }
button, input { font: inherit; }

.app-container { min-height: 100vh; }
.fixed-header .app-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; }
.app-header { height: 60px; display: flex; align-items: center; background: #fff; box-shadow: var(--shadow); }
.header-shadow { box-shadow: var(--shadow); }
.app-header__logo { width: 280px; height: 60px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-right: 1px solid var(--border); }
.logo-src { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--info)); border-radius: 8px; font-weight: 800; letter-spacing: .03em; }
.brand-copy { display: grid; gap: 1px; color: var(--text); line-height: 1.1; }
.brand-copy span { font-weight: 700; font-size: 16px; }
.brand-copy small { color: var(--muted); font-size: 12px; }
.header__pane { margin-left: auto; }
.ml-auto { margin-left: auto; }
.ml-2 { margin-left: .5rem; }
.ml-3 { margin-left: 1rem; }
.mr-1 { margin-right: .25rem; }
.mr-2 { margin-right: .5rem; }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: 1rem; }
.p-0 { padding: 0; }
.pr-0 { padding-right: 0; }
.opacity-8 { opacity: .8; }

.hamburger { width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.hamburger-box { width: 22px; display: inline-block; position: relative; }
.hamburger-inner, .hamburger-inner::before, .hamburger-inner::after { width: 22px; height: 2px; background: #6c757d; border-radius: 2px; display: block; position: absolute; content: ""; }
.hamburger-inner { top: 50%; }
.hamburger-inner::before { top: -7px; }
.hamburger-inner::after { bottom: -7px; }
.app-header__mobile-menu { display: none; padding-left: 12px; }
.app-header__content { flex: 1; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.app-header-left { min-height: 1px; }
.app-header-right { margin-left: auto; }
.widget-content-wrapper { display: flex; align-items: center; }
.widget-heading { font-weight: 700; color: #343a40; }
.widget-subheading { color: var(--muted); font-size: 12px; }
.user-toggle { border: 0; background: transparent; cursor: pointer; color: var(--text); }
.avatar-initials { width: 42px; height: 42px; display: inline-grid; place-items: center; color: #fff; background: var(--primary); font-weight: 700; }
.rounded-circle { border-radius: 50%; }
.dropdown-menu { display: none; position: absolute; right: 18px; top: 54px; min-width: 220px; padding: .5rem 0; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .25rem; box-shadow: 0 .66875rem 2.3875rem rgba(4, 9, 20, .03), 0 1.1375rem 1.60625rem rgba(4, 9, 20, .03), 0 .45rem .73125rem rgba(4, 9, 20, .05), 0 .325rem .3875rem rgba(4, 9, 20, .03); z-index: 1002; }
.dropdown-menu.show { display: block; }
.dropdown-item { display: block; width: 100%; padding: .45rem 1rem; color: #212529; }
.dropdown-item:hover { background: #f8f9fa; }
.dropdown-divider { height: 0; margin: .5rem 0; border-top: 1px solid #e9ecef; }

.app-main { display: flex; padding-top: 60px; }
.app-sidebar { width: 280px; min-width: 280px; background: var(--sidebar); box-shadow: var(--shadow); transition: transform .2s ease; }
.fixed-sidebar .app-sidebar { position: fixed; top: 60px; left: 0; bottom: 0; overflow-y: auto; z-index: 900; }
.app-sidebar__inner { padding: 18px 0; }
.vertical-nav-menu { margin: 0; padding: 0; list-style: none; }
.app-sidebar__heading { color: var(--primary); text-transform: uppercase; font-size: 12px; font-weight: 700; margin: 16px 20px 8px; letter-spacing: .04em; }
.sidebar-dashboard-section { list-style: none; margin-bottom: 4px; }
.sidebar-dashboard-heading { margin-top: 0; }
.vertical-nav-menu .sidebar-dashboard-link { min-height: 42px; padding-left: 56px; font-weight: 500; }
.vertical-nav-menu .sidebar-dashboard-link.mm-active { background: #e0f3ff; color: var(--primary); font-weight: 600; }
.sidebar-dashboard-link .metismenu-icon { display: inline-flex; align-items: center; justify-content: center; }
.nav-section { list-style: none; }
.nav-section-toggle { position: relative; width: calc(100% - 40px); min-height: 30px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 22px 0 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.nav-section-toggle:hover, .nav-section-toggle:focus-visible { color: #244aa5; outline: 0; }
.nav-section-panel { margin: 0; padding: 0; list-style: none; }
.nav-section-panel[hidden] { display: none; }
.vertical-nav-menu a { display: flex; align-items: center; min-height: 40px; padding: 0 20px 0 56px; color: #343a40; position: relative; }
.vertical-nav-menu a:hover, .vertical-nav-menu a.mm-active { background: #e0f3ff; color: var(--primary); font-weight: 600; }
.metismenu-icon { position: absolute; left: 18px; width: 28px; color: #adb5bd; font-size: 18px; }
.mm-active .metismenu-icon, .vertical-nav-menu a:hover .metismenu-icon { color: var(--primary); }
.nav-menu-group { list-style: none; }
.nav-group-toggle { position: relative; width: 100%; min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 38px 0 56px; border: 0; background: transparent; color: #343a40; font: inherit; text-align: left; cursor: pointer; }
.nav-group-toggle:hover, .nav-group-toggle:focus-visible, .nav-group-toggle.mm-active { background: #eef6ff; color: var(--primary); outline: 0; }
.nav-group-label { min-width: 0; overflow-wrap: anywhere; }
.nav-group-caret { position: absolute; right: 20px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .16s ease; }
[data-toggle-sidebar-accordion][aria-expanded="true"] .nav-group-caret, .tenant-module-navigation-toggle[aria-expanded="true"] .nav-group-caret { transform: rotate(225deg); }
.nav-submenu { margin: 0 16px 6px 34px; padding: 3px 0 3px 16px; border-left: 1px solid #d9e0eb; list-style: none; }
.nav-submenu[hidden] { display: none; }
.vertical-nav-menu .nav-submenu a, .nav-item-unavailable { min-height: 34px; display: flex; align-items: center; padding: 4px 12px; border-radius: 0; font-size: .88rem; line-height: 1.25; }
.vertical-nav-menu .nav-submenu a { color: #495057; }
.vertical-nav-menu .nav-submenu a:hover, .vertical-nav-menu .nav-submenu a.mm-active { background: #e0f3ff; color: var(--primary); }
.nav-item-unavailable { color: #9299a4; cursor: default; }
.nav-item-container { position: relative; width: 100%; display: flex; align-items: center; min-height: 34px; padding: 4px 28px 4px 12px; border: 0; background: transparent; color: #4f566b; font: inherit; font-size: .88rem; font-weight: 600; text-align: left; cursor: pointer; }
.nav-item-container:hover, .nav-item-container:focus-visible { background: #eef6ff; color: var(--primary); outline: 0; }
.nav-submenu-level-2 { list-style: none; margin: 0 0 4px 12px; padding: 0 0 0 8px; border-left: 1px solid #d9e0eb; }
.nav-submenu-level-2[hidden] { display: none; }
.nav-submenu-level-2 .nav-item-unavailable { min-height: 30px; padding: 3px 8px; font-size: .82rem; }
.app-main__outer { flex: 1; margin-left: 280px; min-width: 0; }
.app-main__inner { padding: 30px; }

.app-page-title { padding: 16px 24px; margin: -30px -30px 10px; background: rgba(255,255,255,.55); border-bottom: 1px solid rgba(0,0,0,.05); }
.page-title-wrapper { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.page-title-heading { display: flex; align-items: center; font-size: 1.25rem; font-weight: 500; }
.page-title-icon { font-size: 1.75rem; display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; margin-right: 14px; border-radius: .25rem; background: #fff; box-shadow: 0 .46875rem 2.1875rem rgba(4,9,20,.03), 0 .9375rem 1.40625rem rgba(4,9,20,.03); }
.icon-gradient { color: #fff; }
.page-title-subheading { color: var(--muted); font-size: .86rem; font-weight: 400; margin-top: 2px; }
.page-title-actions { display: flex; gap: .5rem; }
.breadcrumb-row { display: flex; gap: 8px; color: var(--muted); font-size: 13px; margin-bottom: 8px; line-height: 1.25; }

.row { display: flex; flex-wrap: wrap; margin: 0 -12px; }
.col-lg-8, .col-lg-4, .col-md-12, .col-md-4, .col-md-6 { padding: 0 12px; width: 100%; }
.col-lg-8 { flex: 0 0 66.6667%; max-width: 66.6667%; }
.col-lg-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-12 { flex: 0 0 100%; max-width: 100%; }
.col-md-4 { flex: 0 0 33.3333%; max-width: 33.3333%; }
.col-md-6 { flex: 0 0 50%; max-width: 50%; }
.card { background: #fff; border: 1px solid rgba(26,54,126,.125); border-radius: .25rem; box-shadow: var(--shadow); }
.card-header { display: flex; align-items: center; min-height: 52px; padding: .75rem 1.25rem; margin-bottom: 0; background: #fff; border-bottom: 1px solid rgba(26,54,126,.125); color: rgba(13,27,62,.7); font-weight: 700; text-transform: uppercase; font-size: .88rem; }
.header-icon { font-size: 1.35rem; margin-right: .65rem; }
.btn-actions-pane-right { margin-left: auto; display: flex; gap: .5rem; }
.card-body { padding: 1.25rem; }
.text-muted { color: var(--muted); }
.small { font-size: .875rem; }
.table-responsive { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; color: #212529; }
.table th, .table td { padding: .55rem; vertical-align: middle; border-top: 1px solid #e9ecef; text-align: left; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #e9ecef; color: #495057; }
.table-striped tbody tr:nth-of-type(odd) { background-color: rgba(0,0,0,.02); }
.table-hover tbody tr:hover { background-color: rgba(63,106,216,.06); }
.form-group { margin-bottom: 1rem; }
.position-relative { position: relative; }
.form-group label, .position-relative label { display: inline-block; margin-bottom: .5rem; color: #343a40; }
.form-control { display: block; width: 100%; height: calc(2.25rem + 2px); padding: .375rem .75rem; color: #495057; background: #fff; border: 1px solid #ced4da; border-radius: .25rem; }
.form-control[readonly] { background-color: #f8f9fa; opacity: 1; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 34px; padding: .375rem .75rem; border: 1px solid transparent; border-radius: .25rem; cursor: pointer; font-weight: 500; }
.btn-sm { min-height: 30px; padding: .25rem .5rem; font-size: .875rem; }
.btn-lg { min-height: 44px; padding: .5rem 1rem; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.btn-info { color: #fff; background: var(--info); border-color: var(--info); }
.btn-light { color: #212529; background: #eee; border-color: #eee; }
.btn-secondary { color: #fff; background: #6c757d; border-color: #6c757d; }
.btn-outline-primary { color: var(--primary); background: transparent; border-color: var(--primary); }
.btn-outline-secondary { color: #6c757d; background: transparent; border-color: #6c757d; }
.btn-outline-danger { color: var(--danger); background: transparent; border-color: var(--danger); }
.btn-link { border: 0; background: transparent; color: var(--primary); padding-left: 0; }
.btn-shadow { box-shadow: 0 .125rem .625rem rgba(63,106,216,.35), 0 .0625rem .125rem rgba(63,106,216,.5); }
.button-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.alert { padding: .75rem 1.25rem; margin-bottom: 1rem; border: 1px solid transparent; border-radius: .25rem; }
.alert-danger { color: #721c24; background-color: #f8d7da; border-color: #f5c6cb; }
.alert-info { color: #0c5460; background-color: #d1ecf1; border-color: #bee5eb; }

.login-page { min-height: 100vh; display: grid; place-items: center; background: #f1f4f6; padding: 20px; }
.login-card { width: min(440px, calc(100vw - 32px)); overflow: hidden; }
.login-brand { display: flex; align-items: center; gap: 14px; padding: 22px 24px; background: #fff; border-bottom: 1px solid rgba(26,54,126,.125); }
.login-brand h1 { font-size: 1.25rem; margin: 0; }
.login-brand p { margin: 4px 0 0; color: var(--muted); }
.login-card h2 { margin: 0 0 .35rem; font-size: 1.1rem; }

.abm-list-card, .abm-form-card { width: 100%; }
@media (max-width: 991px) {
    .app-header__logo { width: auto; min-width: 220px; }
    .header-user-info { display: none; }
    .app-header__mobile-menu { display: block; }
    .app-main__inner { padding: 18px; }
    .app-page-title { margin: -18px -18px 10px; padding: 14px 18px; }
    .page-title-wrapper { align-items: flex-start; flex-direction: column; }
    .col-lg-8, .col-lg-4, .col-md-12, .col-md-3, .col-md-4, .col-md-6 { flex: 0 0 100%; max-width: 100%; }
}
.col-md-3 { padding: 0 12px; flex: 0 0 25%; max-width: 25%; }
.stat-card .card-body { display: flex; align-items: center; gap: 16px; min-height: 132px; }
.stat-card-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 50%; font-size: 1.8rem; color: #fff; flex: 0 0 auto; }
.stat-primary .stat-card-icon { background: linear-gradient(135deg, #3f6ad8, #16aaff); }
.stat-success .stat-card-icon { background: linear-gradient(135deg, #3ac47d, #34ce57); }
.stat-warning .stat-card-icon { background: linear-gradient(135deg, #f7b924, #f0ad4e); }
.stat-info .stat-card-icon { background: linear-gradient(135deg, #16aaff, #0ba5c8); }
.stat-card-label { color: var(--muted); text-transform: uppercase; font-size: .78rem; font-weight: 700; letter-spacing: .04em; }
.stat-card-value { font-size: 2rem; line-height: 1.15; font-weight: 700; color: #343a40; margin: 4px 0; }
.stat-card-note { color: var(--muted); font-size: .82rem; }
.status-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.status-list li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.status-list li:last-child { border-bottom: 0; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.status-ok { background: var(--success); box-shadow: 0 0 0 4px rgba(58,196,125,.14); }
.status-hold { background: var(--warning); box-shadow: 0 0 0 4px rgba(247,185,36,.16); }
.abm-list-card, .abm-form-card { width: 100%; }
@media (max-width: 992px) { .col-md-3 { flex: 0 0 50%; max-width: 50%; } }
@media (max-width: 640px) { .col-md-3 { flex: 0 0 100%; max-width: 100%; } }
.filter-row { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-bottom: 1rem; }
.filter-control { min-width: 260px; }
.form-control-textarea { height: auto; min-height: 98px; resize: vertical; }
.form-check-line { min-height: 38px; display: block; }
.form-check-line > span { display: none; }
.boolean-select { min-width: 110px; }
.alert-success { color: #155724; background-color: #d4edda; border-color: #c3e6cb; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.col-order { width: 90px; }
.col-show { width: 110px; }
.inline-action-form { display: inline-flex; margin: 0; }
.context-line { display: flex; gap: 12px; align-items: center; color: var(--muted); }
.col-boolean { width: 110px; }
.col-count { width: 95px; }

.show-toggle-form { justify-content: center; }
.show-toggle-button { padding: 0; min-width: 34px; font-weight: 600; }
.show-toggle-button:hover { text-decoration: underline; }

.values-count-link { padding-left: .25rem; padding-right: .25rem; font-weight: 600; min-width: 34px; }

.profile-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-detail-item { padding: 14px 16px; border: 1px solid var(--border); border-radius: .25rem; background: #fbfcfe; }
.profile-detail-label { display: block; color: var(--muted); font-size: .78rem; text-transform: uppercase; font-weight: 700; margin-bottom: 6px; }
.profile-detail-value { display: block; color: #343a40; font-size: .98rem; overflow-wrap: anywhere; }
.modal-backdrop { display: none; position: fixed; inset: 0; background: rgba(4, 9, 20, .42); z-index: 1500; }
.modal-backdrop.show { display: block; }
.prototype-modal { display: none; position: fixed; inset: 0; z-index: 1510; padding: 80px 24px 24px; overflow-y: auto; }
.prototype-modal.show { display: block; }
.prototype-modal-dialog { width: min(860px, 100%); margin: 0 auto; }
@media (max-width: 640px) { .profile-detail-grid { grid-template-columns: 1fr; } .prototype-modal { padding: 74px 14px 18px; } }
.vertical-detail-list, .card-body.vertical-detail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; border: 0; overflow: visible; background: transparent; }
.vertical-detail-row { display: grid; grid-template-columns: 1fr; gap: 6px; min-height: 82px; padding: 14px 16px; border: 1px solid var(--border); border-radius: .25rem; background: #fff; }
.vertical-detail-row:last-child { border-bottom: 1px solid var(--border); }
.vertical-detail-label { color: var(--muted); font-size: .78rem; text-transform: uppercase; font-weight: 700; }
.vertical-detail-value { color: #343a40; font-size: .98rem; overflow-wrap: anywhere; }
.form-actions-standard { justify-content: flex-start; }
.view-actions { margin-top: 1rem; }
.breadcrumb-row a { color: var(--primary); }
.breadcrumb-row a:hover { text-decoration: underline; }
@media (max-width: 640px) { .vertical-detail-list, .card-body.vertical-detail { grid-template-columns: 1fr; } }

.dictionary-filter-row, .ui-resource-filter-row, .tenant-filter-row, .person-filter-row { align-items: flex-end; flex-wrap: nowrap; }
.dictionary-filter-row .filter-control, .ui-resource-filter-row .filter-control, .tenant-filter-row .filter-control, .person-filter-row .filter-control { flex: 1 1 0; min-width: 180px; }
.dictionary-filter-row .filter-action, .ui-resource-filter-row .filter-action, .tenant-filter-row .filter-action, .person-filter-row .filter-action { margin-left: auto; white-space: nowrap; }
.ui-resource-group-table thead th { text-align: center; }
.ui-resource-group-table tbody tr.ui-resource-group-zebra-even td { background-color: #ffffff; }
.ui-resource-group-table tbody tr.ui-resource-group-zebra-odd td { background-color: #f8f9fb; }
.ui-resource-group-table tbody tr.ui-resource-group-continuation td:first-child,
.ui-resource-group-table tbody tr.ui-resource-group-continuation td:nth-child(2) { border-top-color: #f1f3f5; }
.ui-resource-group-table tbody tr:hover td { background-color: rgba(63,106,216,.06); }
.dictionary-group-table thead th { text-align: center; }
.dictionary-group-table tbody tr.dictionary-group-zebra-even td { background-color: #ffffff; }
.dictionary-group-table tbody tr.dictionary-group-zebra-odd td { background-color: #f8f9fb; }
@media (max-width: 900px) { .dictionary-filter-row, .ui-resource-filter-row, .tenant-filter-row, .person-filter-row { flex-wrap: wrap; } .dictionary-filter-row .filter-control, .ui-resource-filter-row .filter-control, .tenant-filter-row .filter-control, .person-filter-row .filter-control { flex: 1 1 220px; } }

.dictionary-group-table tbody tr.dictionary-group-continuation td:first-child { border-top-color: #f1f3f5; }
.dictionary-group-table tbody tr:hover td { background-color: rgba(63,106,216,.06); }
.dictionary-filter-title { font-weight: 700; color: #2f3854; min-width: 74px; padding-bottom: 9px; }
.dictionary-filter-row .filter-action, .ui-resource-filter-row .filter-action, .tenant-filter-row .filter-action, .person-filter-row .filter-action { display: flex; gap: 8px; align-items: center; }

.sortable-header a { color: inherit; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.sortable-header a:hover { color: var(--primary); text-decoration: underline; }
.language-switcher { display: flex; align-items: center; gap: 6px; padding: .35rem 1rem; font-size: 12px; text-transform: uppercase; }
.language-switcher a { font-weight: 700; color: #3f6ad8; }
.language-switcher a.active { color: #212529; pointer-events: none; }
.language-switcher span { color: #adb5bd; }

.dropdown-language-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 14px; width: 100%; padding: .55rem 1rem; white-space: nowrap; }
.dropdown-language-label { flex: 0 0 auto; padding-left: 10px; color: #6c757d; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.dropdown-language-options { display: inline-flex; align-items: center; justify-content: flex-end; flex: 0 0 auto; gap: 6px; }
.dropdown-language-options a { min-width: 34px; padding: .2rem .35rem; border: 1px solid #d7def0; border-radius: .2rem; color: #3f6ad8; font-size: 12px; font-weight: 700; text-align: center; }
.dropdown-language-options a.active { background: #3f6ad8; border-color: #3f6ad8; color: #fff; pointer-events: none; }
.grid-search-box { margin-bottom: 1rem; padding: 1rem; border: 1px solid #e9ecef; border-radius: .25rem; background: #fff; }
.advanced-grid-heading { margin-bottom: 0; }
.advanced-grid-heading-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: .35rem; }
.advanced-grid-title { color: #2f3854; font-weight: 700; }
.advanced-grid-row-counter { color: #2f3854; font-size: 13px; font-weight: 700; white-space: nowrap; }
.advanced-grid-description { margin-bottom: 0; }
.advanced-grid-divider { border-top: 1px solid #e9ecef; margin: .9rem 0; width: 100%; }
.advanced-grid-filter-box { width: 100%; box-sizing: border-box; margin-bottom: 0; }
@media (max-width: 640px) { .advanced-grid-heading-row { align-items: flex-start; flex-direction: column; gap: 4px; } .advanced-grid-row-counter { white-space: normal; } }
.grid-search-title { margin-bottom: .35rem; color: #2f3854; font-weight: 700; }
.grid-search-description { margin-bottom: .9rem; }
.grid-search-box .filter-row { margin-bottom: 0; }
.btn-reset { min-height: 37px; border: 1px solid #d5d9e2; background: #f1f3f5; color: #2f3542; }
.btn-reset:hover { border-color: #c8ced8; background: #e2e6ea; color: #1f2430; }
.btn-actions-pane-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.grid-actions-dropdown { position: relative; display: inline-flex; }
.grid-actions-toggle { display: inline-flex; align-items: center; justify-content: center; width: 34px; min-width: 34px; height: 31px; padding: 0; }
.grid-actions-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); min-width: 160px; padding: .35rem 0; background: #fff; border: 1px solid rgba(0,0,0,.08); border-radius: .25rem; box-shadow: 0 .46875rem 1.4875rem rgba(4, 9, 20, .08); z-index: 1001; }
.grid-actions-menu.show { display: block; }
.grid-actions-item { display: block; width: 100%; padding: .45rem .85rem; border: 0; background: transparent; color: #212529; font-size: 13px; text-align: left; cursor: pointer; }
.grid-actions-item:hover { background: #f8f9fa; }
.grid-actions-item:disabled { color: #9aa3b2; cursor: default; }
.grid-actions-item:disabled:hover { background: transparent; }
@media (max-width: 640px) { .btn-actions-pane-right { flex-wrap: wrap; justify-content: flex-end; } .grid-search-box { padding: .85rem; } }
/* P1 compact list card polish */
.abm-list-card { margin-top: 0; }
.abm-list-card > .card-header { min-height: 46px; padding-top: .6rem; padding-bottom: .6rem; }
.abm-list-card > .card-header .header-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; margin-right: .55rem; }
.abm-list-card > .card-header .header-icon::before { width: 24px; height: 24px; font-size: 12px; }
.related-summary-link { font-weight: 600; color: var(--primary); }
.related-collection-panel { margin-top: 18px; padding: 16px; border: 1px solid var(--border); border-radius: .25rem; background: #fbfcfe; }
.related-collection-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.related-collection-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border: 1px solid #e2e7f1; border-radius: .25rem; background: #fff; color: #2f3854; text-decoration: none; }
.related-collection-card:hover { border-color: #c8d3f0; color: var(--primary); text-decoration: none; }
.related-collection-card span { font-weight: 700; }
.related-collection-card strong { min-width: 34px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; background: rgba(63,106,216,.1); color: var(--primary); }
.person-related-dialog { width: min(1040px, 100%); }
.related-modal-toolbar { display: flex; justify-content: flex-end; margin-bottom: 12px; }
.related-modal-table th { text-align: center; }
.related-detail-list { margin-bottom: 14px; }
@media (max-width: 900px) { .related-collection-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .related-collection-grid { grid-template-columns: 1fr; } }
.access-form-section { margin: 18px 0 16px; padding: 16px; border: 1px solid var(--border); border-radius: .25rem; background: #fbfcfe; }
.access-form-section h5 { margin: 0 0 8px; color: #2f3854; }

.dropdown-item-form { margin: 0; }
.dropdown-item-form .dropdown-item { width: 100%; text-align: left; border: 0; background: transparent; }

/* TENANT Visual Base v1 */
:focus-visible { outline: 3px solid rgba(63,106,216,.35); outline-offset: 2px; }
.ui-icon { width: 1.1em; height: 1.1em; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.16em; flex: 0 0 auto; }
.header-icon .ui-icon, .page-title-icon .ui-icon, .stat-card-icon .ui-icon { width: 1.45em; height: 1.45em; }
.hamburger .ui-icon { width: 22px; height: 22px; }
.metismenu-icon { display: inline-flex; align-items: center; justify-content: center; }
.metismenu-icon .ui-icon { width: 20px; height: 20px; }

body.sidebar-collapsed .app-sidebar { width: 72px; min-width: 72px; transform: none; }
body.sidebar-collapsed .app-main__outer { margin-left: 72px; }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .vertical-nav-menu > li > a > span:last-child,
body.sidebar-collapsed .app-sidebar__heading { display: none; }
body.sidebar-collapsed .vertical-nav-menu a { padding-left: 0; justify-content: center; }
body.sidebar-collapsed .metismenu-icon { position: static; margin: 0; }
body.sidebar-collapsed .nav-group-toggle { padding: 0; justify-content: center; }
body.sidebar-collapsed .nav-group-label, body.sidebar-collapsed .nav-group-caret, body.sidebar-collapsed .nav-section-panel, body.sidebar-collapsed .nav-submenu { display: none; }
.sidebar-overlay { display: none; }

.header-context-title { font-weight: 600; color: #343a40; }
.app-header, .app-header__content, .app-header-right { overflow: visible; }
.user-toggle { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: #343a40; }
.user-toggle .header-user-info { display: grid; gap: 1px; min-width: 0; text-align: left; }
.user-toggle .widget-heading, .user-toggle .widget-subheading { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-toggle .widget-subheading { color: var(--muted); font-size: 12px; }
.header-message-link { position: relative; margin-right: 12px; }
.unread-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.table-striped tbody tr:nth-of-type(odd) { background-color: #fff; }
.tenant-table thead th, .table thead th { background: #f8f9fb; }
.col-date, .col-status, .col-boolean { text-align: center !important; }
.col-number, .col-amount, .col-order, .col-count { text-align: right !important; }
.status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 22px; padding: 0 .55rem; border-radius: 12px; font-size: .78rem; font-weight: 700; }
.status-badge-success { background: rgba(58,196,125,.14); color: #176d42; }
.status-badge-muted { background: #edf1f7; color: #5b6472; }
.status-badge-info { background: rgba(22,170,255,.14); color: #095b86; }
.status-badge-warning { background: rgba(247,185,36,.2); color: #775400; }
.status-badge-danger { background: rgba(217,37,80,.13); color: #9c1738; }

.table thead th.col-actions { min-width: 428px; padding-right: .55rem; padding-left: .55rem; text-align: center !important; }
.table tbody td.col-actions { min-width: 428px; padding-right: .55rem; padding-left: .55rem; text-align: right !important; }
.action-grid, .table-actions { box-sizing: border-box; text-align: right !important; position: relative; }
.action-aligner { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: flex-end; }
.action-slots { flex: 0 0 auto; width: max-content; margin-left: auto; display: grid; grid-template-columns: repeat(4, 104px); gap: 4px; align-items: center; justify-items: center; }
.action-slot { width: 104px; min-width: 104px; display: flex; justify-content: center; align-items: center; }
.action-slot form { width: 100%; display: flex; justify-content: center; margin: 0; }
.action-slot .btn, .table-actions .btn { width: 100%; min-height: 30px; display: inline-flex; justify-content: center; align-items: center; gap: 4px; margin: 0; padding-right: 5px; padding-left: 5px; text-align: center; white-space: nowrap; }
.action-slot .ui-icon, .table-actions .ui-icon { flex: 0 0 auto; margin: 0; }
.action-slot-placeholder, .action-placeholder { width: 104px; min-width: 104px; visibility: hidden; pointer-events: none; }
.mobile-actions { display: none; position: relative; }
.mobile-actions-menu { display: none; position: absolute; right: 0; top: calc(100% + 5px); min-width: 190px; padding: .35rem; background: #fff; border: 1px solid rgba(0,0,0,.12); border-radius: .25rem; box-shadow: 0 .5rem 1.5rem rgba(4,9,20,.15); z-index: 1040; }
.mobile-actions-menu.show { display: grid; gap: .25rem; }
.mobile-action-item, .mobile-action-item form, .mobile-action-item .btn { width: 100%; }
.mobile-action-item .btn { justify-content: flex-start; text-align: left; }

.password-input-wrap { display: flex; align-items: stretch; }
.password-input-wrap .form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.password-toggle { border-top-left-radius: 0; border-bottom-left-radius: 0; min-width: 42px; }
.quick-access-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.quick-access-card { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 14px; border: 1px solid var(--border); border-radius: .25rem; background: #fff; color: #343a40; }
.quick-access-card:hover { background: #f8fbff; color: var(--primary); }
.message-meta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 1rem; color: var(--muted); }
.message-body { white-space: normal; line-height: 1.55; }
.message-language-contract { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 1rem; padding: .75rem 1rem; background: #f8f9fb; border: 1px solid var(--border); border-radius: .25rem; color: #4f5870; }
.message-language-contract strong { color: #2f3854; }

/* Unified Alpha interface */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .15rem; }
.btn-actions-pane-right a[href*="mode=new"], .btn-actions-pane-right button[data-open-platform-user-modal] { background: var(--primary); border-color: var(--primary); color: #fff; }
.section-header-description { display: block; margin-top: 2px; color: var(--muted); font-size: .75rem; font-weight: 400; text-transform: none; }
.access-area-body { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.access-area-title { margin: 0 0 4px; color: #2f3854; font-size: 1.05rem; letter-spacing: 0; }
.platform-users-area { border-left: 4px solid var(--primary); }
.abm-view-card > .card-body, .message-detail-card > .card-body { padding: 1.25rem; }
.message-detail-card .message-body, .abm-view-card .message-body { padding: 1rem; border: 1px solid var(--border); border-radius: .25rem; background: #fbfcfe; }
.pagination-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; }
.pagination-summary { color: var(--muted); font-size: 13px; }
.pagination-controls { display: flex; align-items: center; justify-content: flex-end; gap: 4px; flex-wrap: wrap; }
.page-link-button { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px; padding: 0 .45rem; border: 1px solid #d8deea; border-radius: .2rem; background: #fff; color: var(--primary); font-size: 13px; text-decoration: none; }
.page-link-button:hover { border-color: var(--primary); background: #f4f7ff; color: var(--primary); text-decoration: none; }
.page-link-button.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 700; }
.page-link-button.disabled { background: #f3f4f7; color: #a5adba; pointer-events: none; }
.pagination-show-all { margin-left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.header-notification-center { position: relative; }
.notification-menu { display: none; position: absolute; top: calc(100% + 10px); right: 0; width: min(380px, calc(100vw - 24px)); overflow: hidden; border: 1px solid rgba(0,0,0,.08); border-radius: .25rem; background: #fff; box-shadow: 0 .75rem 2rem rgba(4,9,20,.16); z-index: 1200; }
.notification-menu.show { display: block; }
.notification-menu-header { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--border); color: #2f3854; }
.notification-menu-list { max-height: 340px; overflow-y: auto; }
.notification-item { display: flex; gap: 12px; align-items: flex-start; padding: .8rem 1rem; border-bottom: 1px solid #edf0f5; color: #343a40; text-decoration: none; }
.notification-item:hover, .notification-item:focus { background: #f7f9fd; color: #243b73; text-decoration: none; }
.notification-item.unread { background: #f2f6ff; }
.notification-item-icon { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(63,106,216,.12); color: var(--primary); flex: 0 0 auto; }
.notification-item-copy { display: grid; gap: 3px; min-width: 0; }
.notification-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notification-item-copy small { color: var(--muted); }
.notification-empty { padding: 1.25rem; color: var(--muted); text-align: center; }
.notification-menu-footer { display: flex; align-items: center; justify-content: center; padding: .7rem 1rem; color: var(--primary); font-weight: 600; }

.tenant-tooltip { position: absolute; z-index: 2000; max-width: 280px; padding: .38rem .55rem; border-radius: .2rem; background: #202735; color: #fff; font-size: 12px; line-height: 1.3; pointer-events: none; box-shadow: 0 .25rem .75rem rgba(0,0,0,.2); }
.tenant-tooltip[hidden] { display: none; }

@media (max-width: 991px) {
    body.sidebar-collapsed .app-main__outer, .app-main__outer { margin-left: 0; }
    body.sidebar-collapsed .app-sidebar, .app-sidebar { width: 280px; min-width: 280px; transform: translateX(-100%); }
    body.sidebar-mobile-open .app-sidebar { transform: translateX(0) !important; }
    body.sidebar-mobile-open .sidebar-overlay { display: block; position: fixed; inset: 60px 0 0 0; border: 0; background: rgba(20,27,40,.42); z-index: 109; }
}
@media (max-width: 640px) {
    .user-toggle .header-user-info { display: none; }
    .access-area-body { align-items: stretch; flex-direction: column; }
    .access-area-body .btn { align-self: flex-start; }
    .pagination-row { align-items: stretch; flex-direction: column; }
    .pagination-controls { justify-content: flex-start; overflow-x: auto; padding-bottom: 4px; }
    .notification-menu { position: fixed; top: 64px; right: 8px; left: 8px; width: auto; }
    .action-aligner > .action-slots { display: none; }
    .action-aligner { justify-content: flex-end; }
    .mobile-actions { display: inline-flex; }
    .tenant-context-navigation-body { grid-template-columns: 1fr; }
}

/* Corrective presentation contract: flat headers and stable right-aligned actions. */
.table thead th {
    border-top: 0 !important;
    border-right: 0 !important;
    border-bottom: 2px solid #e9ecef !important;
    border-left: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.table tbody td.action-grid, .table tbody td.table-actions { text-align: right !important; }

.tenant-context-navigation-body { display: grid; grid-template-columns: minmax(180px, .7fr) minmax(280px, 1.3fr); gap: 20px; align-items: start; }
.tenant-context-identity { display: grid; gap: 5px; padding: 12px 14px; border-left: 3px solid var(--primary); background: #f8f9fb; }
.tenant-context-identity span { color: var(--muted); font-size: .82rem; }
.tenant-module-navigation-list, .tenant-module-navigation-links { margin: 0; padding: 0; list-style: none; }
.tenant-module-navigation-list { display: grid; gap: 8px; }
.tenant-module-navigation-item { border: 1px solid #e1e6ef; background: #fff; }
.tenant-module-navigation-toggle, .tenant-module-navigation-static { position: relative; width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 38px 9px 12px; border: 0; background: #fff; color: #343a40; text-align: left; }
.tenant-module-navigation-toggle { cursor: pointer; }
.tenant-module-navigation-toggle:hover, .tenant-module-navigation-toggle:focus-visible { background: #eef6ff; color: var(--primary); outline: 0; }
.tenant-module-navigation-static { display: grid; padding-right: 12px; }
.tenant-module-navigation-static span { color: var(--muted); font-size: .8rem; }
.tenant-module-navigation-links { padding: 0 12px 10px 26px; border-top: 1px solid #eef1f5; }
.tenant-module-navigation-links[hidden] { display: none; }
.tenant-module-navigation-links a { display: block; padding: 8px 0; color: var(--primary); }

.profile-avatar { display: inline-grid; place-items: center; overflow: hidden; border-radius: 50%; color: #fff; background: var(--primary); font-weight: 700; flex: 0 0 auto; }
.profile-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.header-profile-avatar { width: 42px; height: 42px; }
.menu-profile-avatar { width: 30px; height: 30px; font-size: .78rem; }
.profile-page-avatar { width: 128px; height: 128px; font-size: 2rem; }
.dropdown-profile-item { display: flex; align-items: center; gap: 10px; }
.profile-photo-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 24px; align-items: start; }
.profile-photo-preview { display: flex; justify-content: center; }
.profile-photo-controls { min-width: 0; }
.profile-photo-upload-form { display: grid; gap: 12px; }
.profile-photo-upload-form label { margin: 0; font-weight: 600; }
.profile-photo-dropzone { min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 18px; border: 2px dashed #b9c3d6; border-radius: 6px; background: #f8f9fb; color: var(--text); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
.profile-photo-dropzone:hover, .profile-photo-dropzone:focus-visible, .profile-photo-dropzone.is-dragover { border-color: var(--primary); background: #f0f4ff; box-shadow: 0 0 0 3px rgba(63, 106, 216, .12); outline: 0; }
.profile-photo-dropzone-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); }
.profile-photo-dropzone-icon .ui-icon { width: 28px; height: 28px; }
.profile-photo-fallback { display: grid; gap: 6px; }
.profile-photo-status { padding: .65rem .8rem; border: 1px solid #f5c6cb; border-radius: 4px; background: #f8d7da; color: #721c24; }
.profile-photo-status.is-success { border-color: #c3e6cb; background: #d4edda; color: #155724; }
.profile-photo-selection { border-top: 1px solid #e8ebf1; padding-top: 12px; }
.profile-photo-metadata { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.profile-photo-metadata > div { min-width: 0; padding: 9px 10px; border: 1px solid #e2e6ee; border-radius: 4px; background: #fff; }
.profile-photo-metadata dt { color: var(--muted); font-size: .75rem; font-weight: 600; }
.profile-photo-metadata dd { margin: 3px 0 0; overflow-wrap: anywhere; font-size: .86rem; font-weight: 600; }
.profile-photo-editor { padding: 14px; border: 1px solid #dfe4ed; border-radius: 6px; background: #f8f9fb; }
.profile-photo-editor-copy { display: grid; gap: 3px; margin-bottom: 12px; }
.profile-photo-editor-layout { display: grid; grid-template-columns: minmax(240px, 420px) 150px; align-items: center; gap: 22px; }
.profile-photo-crop-stage { position: relative; width: 100%; max-width: 420px; aspect-ratio: 1; overflow: hidden; border-radius: 4px; background: #d8dde7; touch-action: none; cursor: grab; user-select: none; }
.profile-photo-crop-stage.is-panning { cursor: grabbing; }
.profile-photo-crop-stage canvas { width: 100%; height: 100%; display: block; }
.profile-photo-crop-guide { position: absolute; inset: 7%; border: 2px solid rgba(255,255,255,.9); border-radius: 4px; box-shadow: 0 0 0 999px rgba(8,17,38,.24); pointer-events: none; }
.profile-photo-result-panel { display: grid; justify-items: center; gap: 8px; }
.profile-photo-result-label { color: var(--muted); font-size: .8rem; font-weight: 600; }
.profile-photo-result-avatar { width: 128px; height: 128px; background: #d8dde7; }
.profile-photo-result-avatar img { opacity: 0; }
.profile-photo-result-avatar img.has-preview { opacity: 1; }
.profile-photo-zoom-control { display: grid; grid-template-columns: auto minmax(160px, 1fr); align-items: center; gap: 12px; margin-top: 14px; }
.profile-photo-zoom-control input { width: 100%; accent-color: var(--primary); }
.profile-photo-editor-actions { margin-top: 14px; justify-content: flex-end; }
.profile-photo-submit-row { display: flex; justify-content: flex-end; }
.profile-photo-submit-row .btn[disabled] { cursor: not-allowed; opacity: .58; }
.profile-photo-remove-form { margin-top: 10px; }

.app-header-right,
.header-btn-lg,
.widget-content,
.widget-content-left { position: relative; }
.app-header__content { min-width: 0; overflow: visible; }
.app-header-right { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; max-width: 100%; }
.header-btn-lg, .widget-content, .widget-content-wrapper, .widget-content-left { min-width: 0; overflow: visible; }
.user-toggle { min-height: 48px; max-width: min(320px, calc(100vw - 120px)); padding: 3px 0 3px 8px; }
.user-toggle .avatar-initials { flex: 0 0 42px; }
.user-toggle .header-user-info { max-width: 190px; }
.user-toggle .ui-icon[data-icon="more"] { flex: 0 0 auto; }
.widget-content-left > .dropdown-menu { top: calc(100% + 4px); right: 0; left: auto; width: min(280px, calc(100vw - 16px)); min-width: 220px; max-height: calc(100vh - 72px); overflow-y: auto; z-index: 1400; }

.tenant-module-editor { margin: 8px 0 20px; border: 1px solid var(--border); border-radius: .25rem; background: #fbfcfe; }
.tenant-module-editor-heading { display: grid; gap: 3px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.tenant-module-editor-heading small { color: var(--muted); }
.tenant-module-editor-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 220px); gap: 16px; align-items: center; min-height: 56px; padding: 9px 14px; border-bottom: 1px solid var(--border); }
.tenant-module-editor-row:last-child { border-bottom: 0; }
.tenant-module-name { min-width: 0; overflow-wrap: anywhere; font-weight: 600; color: #343a40; }

@media (max-width: 767px) {
    .app-header__logo { display: none; }
    .app-header__mobile-menu { flex: 0 0 46px; padding-left: 8px; }
    .app-header__content { padding: 0 10px 0 4px; }
    .header-context-title, .user-toggle .header-user-info { display: none; }
    .user-toggle { gap: 6px; max-width: none; padding-left: 4px; }
    .widget-content-left > .dropdown-menu { right: 0; left: auto; }
    .tenant-module-editor-row { grid-template-columns: 1fr; gap: 6px; }
    .profile-photo-body { grid-template-columns: 1fr; }
    .profile-photo-editor-layout { grid-template-columns: 1fr; justify-items: center; }
    .profile-photo-metadata { grid-template-columns: 1fr; }
    .profile-photo-editor-actions, .profile-photo-submit-row { justify-content: stretch; }
    .profile-photo-editor-actions .btn, .profile-photo-submit-row .btn { width: 100%; }
}
