.error {
    color: red;
}

/* Toggle-hidden classes: reported during the inline-style cleanup as replacements for
   Bootstrap's d-none (which is !important and blocks jQuery's .show()/.hide()), but never
   actually added to this file -- each occurrence left its spinner/element stuck visible.
   Doubled-up class selector bumps specificity above Bootstrap's .spinner-border (also a
   single-class rule) since site.css is linked before bootstrap.min.css in _Layout.cshtml
   and would otherwise lose the cascade on source order alone. */
.admin-toast-alert-fixed.admin-toast-alert-fixed,
.mastercrud-toast-fixed.mastercrud-toast-fixed,
.sync-toast-fixed.sync-toast-fixed,
.eam-toggle-hidden.eam-toggle-hidden,
.org-toggle-hidden.org-toggle-hidden,
.sync-toggle-hidden.sync-toggle-hidden {
    display: none;
}

.dashboard-spinner-lg,
.org-spinner-lg {
    width: 3rem;
    height: 3rem;
}

.admin-toast-alert-fixed,
.mastercrud-toast-fixed,
.sync-toast-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* ===========================
   Integration Services / Integration Provider cards
   Recovered from Organization/IntegrationServices.cshtml's original <style> block
   (removed during the inline-style cleanup, never re-merged -- same gap as the
   Menu tree CSS). Also covers Integration/Manage.cshtml, which uses the same classes.
   =========================== */

.search-box {
    position: relative;
    max-width: 260px;
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    pointer-events: none;
    z-index: 4;
}

.search-input {
    padding-left: 32px;
    border-radius: 8px;
}

/* Bootstrap's .form-select defaults to width:100%, which otherwise forces this dropdown onto its
   own row next to .search-box instead of sitting beside it. */
.int-status-filter-select,
.org-status-filter-select {
    max-width: 200px;
}

#categoryTabs .btn {
    border-radius: 20px;
    font-size: .8rem;
    padding: .3rem .9rem;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
    transform: none !important;
}

#categoryTabs .btn:hover,
#categoryTabs .btn:focus,
#categoryTabs .btn:active {
    transform: none !important;
    box-shadow: none !important;
}

.cat-count-badge {
    background: #e8f0fe;
    color: #3b5bdb;
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .6rem;
    border-radius: 20px;
}

.int-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    padding: 1.25rem 1.5rem 1rem;
    transition: box-shadow .15s ease;
    display: flex;
    flex-direction: column;
}

.int-card:hover {
    box-shadow: 0 4px 18px rgba(0,0,0,.08);
}

.int-icon-wrap {
    width: 68px;
    height: 68px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    overflow: hidden;
    flex-shrink: 0;
}

.int-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.int-icon-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.int-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .75rem;
    font-weight: 600;
    padding: .2rem .65rem;
    border-radius: 20px;
}

.pill-enabled {
    background: #eafaf1;
    color: #1a9e5c;
}

.pill-disabled {
    background: #fdecea;
    color: #c0392b;
}

.int-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-enabled {
    background: #2ecc71;
}

.dot-disabled {
    background: #e74c3c;
}

.int-desc {
    line-height: 1.4;
}

.int-card-footer {
    margin-top: auto;
    padding-top: .9rem;
    border-top: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.int-card-meta {
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
}

.int-meta-item {
    display: flex;
    flex-direction: column;
}

.int-meta-label {
    font-size: .68rem;
    color: #adb5bd;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 1px;
}

.int-meta-val {
    font-size: .8rem;
    color: #343a40;
}

.int-meta-divider {
    width: 1px;
    height: 28px;
    background: #dee2e6;
}

.btn-icon-plain {
    background: none;
    border: none;
    color: #adb5bd;
    padding: .2rem .35rem;
    line-height: 1;
    transform: none !important;
}

.btn-icon-plain:hover {
    color: #495057;
    background: #f1f3f5;
    border-radius: 6px;
    transform: none !important;
}

.int-card .btn {
    transform: none !important;
    -webkit-transform: none !important;
}

.sync-details-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: .5rem .75rem;
    background: #f8f9fa;
}

.activity-log-header-icon {
    width: 48px;
    height: 48px;
}

.activity-log-avatar {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
}

.master-page-header-icon {
    width: 72px;
    height: 72px;
}

/* Bumps the icon glyph itself above Bootstrap's fs-3 utility applied in markup.
   Bootstrap's own font-size utilities are declared with !important, so no amount of
   selector specificity can beat it here -- !important is required, not a shortcut. */
.master-page-header-icon i {
    font-size: 2rem !important;
}

.status-dot {
    font-size: 6px;
    vertical-align: middle;
}

.breadcrumb {
    --bs-breadcrumb-divider: '>';
}

.breadcrumb-item.active {
    font-weight: 600;
    color: var(--bs-body-color);
}

#activityLogTable thead th {
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.04em;
    color: #6c757d;
}

/* Search icon inside DataTables' auto-generated search box, added via JS
   (see activateDataTableSearchIcon in site.js) rather than a ::before pseudo-element,
   since the icon needs to sit inside the input's padding, not the label's. */
.datatable-search-wrap {
    position: relative;
}

    .datatable-search-wrap i {
        position: absolute;
        left: 12px;
        top: 50%;
        transform: translateY(-50%);
        color: #adb5bd;
        pointer-events: none;
    }

    .datatable-search-wrap input {
        padding-left: 2.25rem;
    }

/* Page background wash -- a flat, solid mild-blue tint behind the content area.
   Deliberately NOT a gradient: a gradient spans an element's full scrollable height, so
   on a long/scrolled page the visible color drifts away from this tone. A flat color
   looks identical no matter how far the page is scrolled.
   "html body" (not "body" alone) is needed to out-specificity Bootstrap's own
   plain "body{background-color:...}" rule, which loads after site.css. */
html body {
    background-color: #f2f5fc;
}

/* Sidebar stays white, matching the header -- only the body wash (above) carries the
   mild blue tint, so white cards have something to visually separate from.
   "#main-wrapper .left-sidebar" (not plain .left-sidebar) is needed to out-specificity
   the vendor theme's own .left-sidebar{background-color:#fff}, which loads after site.css. */
/* .left-sidebar is position:fixed (set by the vendor theme via the
   data-sidebar-position="fixed" attribute on #main-wrapper), which takes it out of
   normal document flow -- a Bootstrap col-* class on its wrapper div has no effect on
   its rendered size. Width has to be set here directly instead. Fixed px (not a
   percentage) so it stays a consistent, comfortable size regardless of screen size or
   zoom -- the wrapper div in _Layout.cshtml is given a matching fixed width so its
   reserved grid space lines up exactly, with no gap or overlap. */
#main-wrapper .left-sidebar {
    background-color: #ffffff;
    border-right: none;
    box-shadow: 4px 0 24px rgba(93, 135, 255, 0.08);
    width: 300px;
}

/* DataTables always render on a solid white card, even on pages where the table
   sits directly on the page background wash above (no .card wrapper). */
.dataTables_wrapper,
table.dataTable,
.table {
    background-color: #fff;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}


.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Dashboard Styles */
.border-left-primary {
    border-left: 0.25rem solid #4e73df !important;
}

.border-left-success {
    border-left: 0.25rem solid #1cc88a !important;
}

.border-left-info {
    border-left: 0.25rem solid #36b9cc !important;
}

.border-left-warning {
    border-left: 0.25rem solid #f6c23e !important;
}

.btn-circle-lg {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card {
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15) !important;
}



/* ===== MENU MANAGEMENT - THREE PANEL LAYOUT ===== */

/* Panels Layout */
.three-panel-container {
    display: grid;
    grid-template-columns: 1fr 1.2fr 1.5fr;
    gap: 24px;
    min-height: 650px;
}

.panel {
    display: flex;
    flex-direction: column;
    background: white;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
    padding: 20px;
}

.panel:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.panel-header {
    padding: 0 0 12px 0;
    font-weight: 700;
    font-size: 15px;
    color: #1a1a1a;
    background-color: transparent;
    border-bottom: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-header i {
    font-size: 16px;
    color: #666;
}

.panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    background-color: white;
}

/* Left Panel: Module Navigation */
.module-nav-item {
    padding: 12px 14px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #555;
    border: 1px solid transparent;
}

.module-nav-item:hover {
    background-color: #f5f9ff;
    border-color: #e3f2fd;
}

.module-nav-item.active {
    background-color: #e3f2fd;
    color: #0052cc;
    font-weight: 600;
    border-color: #bbdefb;
}

.module-nav-item i {
    width: 20px;
    text-align: center;
    color: #0052cc;
    flex-shrink: 0;
    font-size: 18px;
}

/* Middle Panel: Menu Tree */
.menu-tree-item {
    margin-bottom: 8px;
}

.menu-tree-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    background-color: white;
    border-radius: 6px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 14px;
    color: #1a1a1a;
    transition: all 0.2s;
}

.menu-tree-header:hover {
    background-color: #f5f5f5;
}

.expand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    font-size: 11px;
    transition: transform 0.2s;
    cursor: pointer;
    color: #999;
}

.expand-icon.expanded {
    transform: rotate(0deg);
}

.expand-icon.collapsed {
    transform: rotate(-90deg);
}

.menu-children {
    margin-left: 0;
    margin-top: 4px;
    padding-left: 32px;
    border-left: none;
}

.menu-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid #f0f0f0;
    font-size: 14px;
}

.menu-item:hover {
    background-color: #f5f9ff;
    border-color: #e3f2fd;
}

.menu-item.selected {
    background-color: #e3f2fd;
    border-color: #0052cc;
    border-left: 4px solid #0052cc;
    padding-left: 11px;
}

.menu-item.enabled {
    background-color: #e3f2fd;
    color: #0052cc;
}

.menu-item.disabled {
    background-color: #f0f0f0;
    color: #999;
}

.menu-item-label {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #333;
}

.menu-item-label i {
    color: #999;
    width: 16px;
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background-color: #d3d3d3;
    border-radius: 28px;
    cursor: pointer;
    transition: background-color 0.3s;
    border: none;
    padding: 0;
    flex-shrink: 0;
    outline: none;
}

.toggle-switch:focus {
    outline: none;
}

.toggle-switch.enabled {
    background-color: #0052cc;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch.enabled::after {
    left: 26px;
}

/* Right Panel: Configuration */
.breadcrumb-nav {
    padding: 12px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.breadcrumb-nav .breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
    font-size: 13px;
}

.breadcrumb-nav .breadcrumb-item {
    color: #0052cc;
    font-weight: 500;
}

.breadcrumb-nav .breadcrumb-item.active {
    color: #333;
    font-weight: 600;
}

.breadcrumb-nav .breadcrumb-item + .breadcrumb-item::before {
    color: #ccc;
}

.config-section {
    margin-bottom: 24px;
}

.config-section-title {
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.config-form-group {
    margin-bottom: 16px;
}

.config-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
    font-size: 13px;
    color: #333;
}

.config-form-group input,
.config-form-group textarea {
    font-size: 13px;
    border: 1px solid #d8d8d8;
    border-radius: 6px;
    padding: 10px 12px;
    background-color: #fafafa;
    transition: all 0.2s;
}

.config-form-group input:focus,
.config-form-group textarea:focus {
    background-color: white;
    border-color: #0052cc;
    box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.1);
}

.role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #e8e8e8;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

.role-badge .badge-close {
    cursor: pointer;
    font-weight: bold;
    color: #999;
    margin-left: 2px;
    line-height: 1;
    transition: color 0.2s;
}

.role-badge .badge-close:hover {
    color: #333;
}

.config-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
}

.config-actions button {
    flex: 1;
    font-size: 13px;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s;
}

.config-actions .btn-primary {
    background-color: #0052cc;
    border-color: #0052cc;
    color: white;
}

.config-actions .btn-primary:hover {
    background-color: #0041a3;
    border-color: #0041a3;
}

.config-actions .btn-secondary {
    background-color: #e8e8e8;
    border-color: #e8e8e8;
    color: #333;
}

.config-actions .btn-secondary:hover {
    background-color: #d8d8d8;
    border-color: #d8d8d8;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #999;
    font-size: 13px;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.15;
}

/* Responsive */
@media (max-width: 1400px) {
    .three-panel-container {
        grid-template-columns: 1fr 1fr 1.2fr;
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .three-panel-container {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 18px;
    }

    .panel {
        min-height: 500px;
    }
}

@media (max-width: 992px) {
    .three-panel-container {
        grid-template-columns: 1fr;
        gap: 20px;
        min-height: auto;
    }

    .panel {
        min-height: 400px;
    }
}

.text-xs {
    font-size: 0.7rem;
}

.dashboard-stat-card {
    transition: transform 0.2s;
}

    .dashboard-stat-card:hover {
        transform: translateY(-2px);
    }

.activity-item {
    border-left: 3px solid #e3e6f0;
    padding-left: 1rem;
    margin-bottom: 1rem;
}

    .activity-item.success {
        border-left-color: #1cc88a;
    }

    .activity-item.warning {
        border-left-color: #f6c23e;
    }

    .activity-item.info {
        border-left-color: #36b9cc;
    }

.license-alert {
    border-left: 4px solid #f6c23e;
    background-color: #fff3cd;
    padding: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.375rem;
}

    .license-alert.critical {
        border-left-color: #dc3545;
        background-color: #f8d7da;
    }

/* Shimmer Loading Effects */
@keyframes shimmer {
    0% {
        background-position: -468px 0;
    }

    100% {
        background-position: 468px 0;
    }
}

.shimmer-line {
    display: inline-block;
    height: 20px;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.shimmer-text {
    width: 120px;
}

.shimmer-text-sm {
    width: 100px;
    height: 16px;
}

.shimmer-text-xs {
    width: 80px;
    height: 12px;
}

.shimmer-number {
    width: 60px;
    height: 32px;
}

/* Clean Shimmer Placeholders */
.shimmer-placeholder {
    display: inline-block;
    width: 100%;
}

.shimmer-number-placeholder {
    width: 60px;
    height: 36px;
    background: linear-gradient(to right, #f0f0f0 8%, #e0e0e0 18%, #f0f0f0 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 6px;
    display: inline-block;
}

.shimmer-placeholder.loaded {
    display: none;
}

.shimmer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.shimmer-badge {
    width: 70px;
    height: 24px;
    border-radius: 12px;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.shimmer-button {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
}

.shimmer-chart {
    height: 350px;
    background: linear-gradient(to right, #f8f9fa 8%, #e9ecef 18%, #f8f9fa 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .shimmer-chart::before {
        content: '??';
        font-size: 3rem;
        opacity: 0.3;
        position: absolute;
    }

}.shimmer-alert {
height: 80px;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.shimmer-activity {
    height: 60px;
    background: linear-gradient(to right, #eeeeee 8%, #dddddd 18%, #eeeeee 33%);
    background-size: 800px 104px;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
}

.shimmer-row {
    pointer-events: none;
}

/* Avatar styles for table */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.375rem;
}

.avatar-sm {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.875rem;
}

/* Organization Type Card Styles */
.org-type-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    background: white;
}

.org-type-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #6c757d;
    position: relative;
}

.org-type-card span {
    font-size: 0.9rem;
    color: #495057;
}

.check-mark {
    position: absolute;
    top: -10px;
    right: -10px;
    color: #198754;
    font-size: 1.25rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s ease;
}

.btn-check:checked + .org-type-card {
    border-color: #0d6efd;
    background-color: #f8f9ff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.1);
}

    .btn-check:checked + .org-type-card .org-type-icon {
        color: #0d6efd;
    }

    .btn-check:checked + .org-type-card .check-mark {
        opacity: 1;
        transform: scale(1);
    }

.btn-check:focus + .org-type-card {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.org-type-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
}

/* Animation for the check mark appearance */
@keyframes checkmark-pop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.btn-check:checked + .org-type-card .check-mark {
    animation: checkmark-pop 0.3s ease-out forwards;
}

/* Module Checkbox Styles */
.checkbox-wrapper-16 *,
.checkbox-wrapper-16 *:after,
.checkbox-wrapper-16 *:before {
    box-sizing: border-box;
}

.checkbox-wrapper-16 .checkbox-input {
    clip: rect(0 0 0 0);
    -webkit-clip-path: inset(100%);
    clip-path: inset(100%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

    .checkbox-wrapper-16 .checkbox-input:checked + .checkbox-tile {
        border-color: #2260ff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        color: #2260ff;
    }

        .checkbox-wrapper-16 .checkbox-input:checked + .checkbox-tile:before {
            transform: scale(1);
            opacity: 1;
            background-color: #2260ff;
            border-color: #2260ff;
        }

        .checkbox-wrapper-16 .checkbox-input:checked + .checkbox-tile .checkbox-icon,
        .checkbox-wrapper-16 .checkbox-input:checked + .checkbox-tile .checkbox-label {
            color: #2260ff;
        }

    .checkbox-wrapper-16 .checkbox-input:focus + .checkbox-tile {
        border-color: #2260ff;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1), 0 0 0 4px #b5c9fc;
    }

        .checkbox-wrapper-16 .checkbox-input:focus + .checkbox-tile:before {
            transform: scale(1);
            opacity: 1;
        }

.checkbox-wrapper-16 .checkbox-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 10rem;
    margin: 3px;
    min-height: 3rem;
    border-radius: 0.5rem;
    border: 2px solid #b5bfd9;
    background-color: #fff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    transition: 0.15s ease;
    cursor: pointer;
    position: relative;
}

    .checkbox-wrapper-16 .checkbox-tile:before {
        content: "";
        position: absolute;
        display: block;
        width: 1.25rem;
        height: 1.25rem;
        border: 2px solid #b5bfd9;
        background-color: #fff;
        border-radius: 50%;
        top: 0.25rem;
        left: 0.25rem;
        opacity: 0;
        transform: scale(0);
        transition: 0.25s ease;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192' height='192' fill='%23FFFFFF' viewBox='0 0 256 256'%3E%3Crect width='256' height='256' fill='none'%3E%3C/rect%3E%3Cpolyline points='216 72.005 104 184 48 128.005' fill='none' stroke='%23FFFFFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='32'%3E%3C/polyline%3E%3C/svg%3E");
        background-size: 12px;
        background-repeat: no-repeat;
        background-position: 50% 50%;
    }

    .checkbox-wrapper-16 .checkbox-tile:hover {
        border-color: #2260ff;
    }

        .checkbox-wrapper-16 .checkbox-tile:hover:before {
            transform: scale(1);
            opacity: 1;
        }

.checkbox-wrapper-16 input[type="checkbox"]:checked + .checkbox-wrapper .checkbox-tile {
    background-color: #2260ff;
    color: #fff;
    border-color: #2260ff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(34, 96, 255, 0.3);
}

    .checkbox-wrapper-16 input[type="checkbox"]:checked + .checkbox-wrapper .checkbox-tile:before {
        opacity: 1;
        transform: scale(1);
        background-color: #7987a1;
        border-color: #7987a1;
    }

    .checkbox-wrapper-16 input[type="checkbox"]:checked + .checkbox-wrapper .checkbox-tile:hover {
        background-color: #2260ff;
        color: #fff;
        border-color: #2260ff;
    }

.checkbox-wrapper-16 .checkbox-icon,
.checkbox-wrapper-16 .checkbox-label {
    transition: 0.375s ease;
}

.checkbox-wrapper-16 .checkbox-icon {
    width: 16px;
    height: 16px;
    margin-bottom: 10px;
}

.checkbox-wrapper-16 .checkbox-label {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.checkbox-wrapper-16 input[type="checkbox"]:checked + .checkbox-wrapper .checkbox-icon,
.checkbox-wrapper-16 input[type="checkbox"]:checked + .checkbox-wrapper .checkbox-label {
    color: #fff;
}

/* Control Panel Modal Dialog Styles */
.modal-content {
    border: none;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px 10px 0 0;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 10px 10px;
}

.modal-body {
    padding: 1.5rem;
}

    .modal-body .fa-2x {
        margin-top: 0.25rem;
    }

    /* Animation for modal icons */
    .modal .fas {
        transition: transform 0.3s ease;
    }

    .modal.show .fas {
        transform: scale(1.1);
    }

    /* Custom scrollbar for long error messages */
    .modal-body p {
        max-height: 200px;
        overflow-y: auto;
        word-wrap: break-word;
    }

        .modal-body p::-webkit-scrollbar {
            width: 6px;
        }

        .modal-body p::-webkit-scrollbar-track {
            background: #f1f1f1;
            border-radius: 3px;
        }

        .modal-body p::-webkit-scrollbar-thumb {
            background: #888;
            border-radius: 3px;
        }

            .modal-body p::-webkit-scrollbar-thumb:hover {
                background: #555;
            }

    /* Generate Password Button Styles */
    #generatePasswordBtn {
        min-width: 100px;
        transition: all 0.3s ease;
    }

        #generatePasswordBtn:hover {
            transform: translateY(-1px);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        #generatePasswordBtn.btn-success {
            animation: buttonSuccess 0.3s ease;
        }

    @keyframes buttonSuccess {
        0% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.05);
        }

        100% {
            transform: scale(1);
        }
    }

    .input-group .btn {
        border-left: none;
    }

    .input-group .form-control:focus + .btn {
        border-color: #86b7fe;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }

    .module-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .modern-module-item {
        margin-bottom: 0;
    }

    .modern-module-wrapper {
        display: block;
        cursor: pointer;
        position: relative;
    }

    .modern-module-wrapper input[type="checkbox"] {
        display: none;
    }

    .module-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 20px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
        border: 2px solid #e8ecf1;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .module-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #007bff 0%, #0056b3 100%);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.3s ease;
    }

    .modern-module-wrapper:hover .module-card {
        border-color: #007bff;
        box-shadow: 0 8px 24px rgba(0, 123, 255, 0.15);
        transform: translateY(-2px);
        background: linear-gradient(135deg, #f0f5ff 0%, #ffffff 100%);
    }

    .modern-module-wrapper:hover .module-card::before {
        transform: scaleY(1);
    }

    .modern-module-wrapper input[type="checkbox"]:checked + .module-card {
        background: linear-gradient(135deg, #e7f3ff 0%, #ffffff 100%);
        border-color: #007bff;
        box-shadow: 0 8px 24px rgba(0, 123, 255, 0.2);
    }

    .modern-module-wrapper input[type="checkbox"]:checked + .module-card::before {
        transform: scaleY(1);
    }

    .module-number {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
        color: white;
        border-radius: 8px;
        font-weight: 600;
        font-size: 16px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
        transition: all 0.3s ease;
    }

    .modern-module-wrapper:hover .module-number {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(0, 123, 255, 0.35);
    }

    .modern-module-wrapper input[type="checkbox"]:checked + .module-card .module-number {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
    }

    .module-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .module-label {
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        letter-spacing: 0.3px;
        transition: color 0.3s ease;
    }

    .modern-module-wrapper:hover .module-label {
        color: #007bff;
    }

    .modern-module-wrapper input[type="checkbox"]:checked + .module-card .module-label {
        color: #0056b3;
        font-weight: 600;
    }

    .module-checkmark {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
        border-radius: 6px;
        color: transparent;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .module-checkmark i {
        font-size: 14px;
    }

    .modern-module-wrapper:hover .module-checkmark {
        background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    }

    .modern-module-wrapper input[type="checkbox"]:checked + .module-card .module-checkmark {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    /* ===== Inline Sub-modules Styling ===== */
    .submodules-container {
        background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
        border-left: 3px solid #007bff;
        padding: 12px 16px;
        border-radius: 8px;
        animation: slideInDown 0.3s ease-out;
    }

    @keyframes slideInDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .submodules-header {
        font-weight: 600;
        color: #007bff;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .inline-submodule-item {
        padding: 6px 0;
    }

    .inline-submodule-item .form-check {
        display: flex;
        align-items: center;
    }

    .inline-submodule-item .form-check-input {
        width: 18px;
        height: 18px;
        border: 2px solid #dee2e6;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s ease;
        margin: 0;
    }

    .inline-submodule-item .form-check-input:hover {
        border-color: #007bff;
        background-color: #f0f5ff;
    }

    .inline-submodule-item .form-check-input:checked {
        background-color: #28a745;
        border-color: #28a745;
    }

    .inline-submodule-item .form-check-input:checked::after {
        content: '?';
        color: white;
        font-size: 12px;
    }

    .inline-submodule-item .form-check-label {
        margin-left: 10px;
        cursor: pointer;
        color: #495057;
        user-select: none;
        font-size: 13px;
        display: flex;
        align-items: center;
    }

    .inline-submodule-item .form-check-label:hover {
        color: #007bff;
    }

    .inline-submodule-item .form-check-input:checked ~ .form-check-label {
        color: #28a745;
        font-weight: 500;
    }

    /* Responsive Design */
    @media (max-width: 768px) {
        .module-card {
            padding: 14px 16px;
            gap: 12px;
        }

        .module-number {
            width: 36px;
            height: 36px;
            font-size: 14px;
        }

        .module-label {
            font-size: 14px;
        }

        .submodules-container {
            margin-left: -16px;
            margin-right: -16px;
            margin-bottom: -12px;
            border-radius: 0 0 8px 8px;
            padding: 12px;
        }
    }

    /* Animation for page load */
    @keyframes slideInUp {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modern-module-item {
        animation: slideInUp 0.4s ease-out forwards;
    }

    .modern-module-item:nth-child(1) { animation-delay: 0.05s; }
    .modern-module-item:nth-child(2) { animation-delay: 0.1s; }
    .modern-module-item:nth-child(3) { animation-delay: 0.15s; }
    .modern-module-item:nth-child(4) { animation-delay: 0.2s; }
    .modern-module-item:nth-child(5) { animation-delay: 0.25s; }
    .modern-module-item:nth-child(6) { animation-delay: 0.3s; }
    .modern-module-item:nth-child(7) { animation-delay: 0.35s; }
    .modern-module-item:nth-child(8) { animation-delay: 0.4s; }
    .modern-module-item:nth-child(n+9) { animation-delay: 0.45s; }

    /* Modern Sub-Module Styling - Similar to Main Modules */
    .module-section {
        animation: fadeInUp 0.5s ease-out;
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .module-header-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
        border-radius: 8px;
        color: white;
    }

    #subModulesContainer {
        background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
        border-radius: 10px;
        padding: 20px;
    }

    #subModulesContainer .text-muted {
        color: #6c757d !important;
    }
    .modern-submodule-item {
        margin-bottom: 0;
    }

    .modern-submodule-wrapper {
        display: block;
        cursor: pointer;
        position: relative;
    }

    .modern-submodule-wrapper input[type="checkbox"] {
        display: none;
    }

    .submodule-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 16px 20px;
        background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
        border: 2px solid #e8ecf1;
        border-radius: 12px;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        position: relative;
        overflow: hidden;
    }

    .submodule-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: linear-gradient(180deg, #6f42c1 0%, #5a32a3 100%);
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.3s ease;
    }

    .modern-submodule-wrapper:hover .submodule-card {
        border-color: #17a2b8;
        box-shadow: 0 8px 24px rgba(23, 162, 184, 0.15);
        transform: translateY(-2px);
        background: linear-gradient(135deg, #f0f8fb 0%, #ffffff 100%);
    }

    .modern-submodule-wrapper:hover .submodule-card::before {
        transform: scaleY(1);
    }

    .modern-submodule-wrapper input[type="checkbox"]:checked + .submodule-card {
        background: linear-gradient(135deg, #e7f7fa 0%, #ffffff 100%);
        border-color: #17a2b8;
        box-shadow: 0 8px 24px rgba(23, 162, 184, 0.2);
    }

    .modern-submodule-wrapper input[type="checkbox"]:checked + .submodule-card::before {
        transform: scaleY(1);
    }

    .submodule-number {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
        color: white;
        border-radius: 8px;
        font-weight: 600;
        font-size: 14px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(23, 162, 184, 0.25);
        transition: all 0.3s ease;
    }

    .modern-submodule-wrapper:hover .submodule-number {
        transform: scale(1.08);
        box-shadow: 0 6px 16px rgba(23, 162, 184, 0.35);
    }

    .modern-submodule-wrapper input[type="checkbox"]:checked + .submodule-card .submodule-number {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
    }

    .submodule-content {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .submodule-label {
        font-size: 14px;
        font-weight: 500;
        color: #1a1a1a;
        letter-spacing: 0.3px;
        transition: color 0.3s ease;
    }

    .modern-submodule-wrapper:hover .submodule-label {
        color: #17a2b8;
    }

    .modern-submodule-wrapper input[type="checkbox"]:checked + .submodule-card .submodule-label {
        color: #138496;
        font-weight: 600;
    }

    .submodule-checkmark {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
        border-radius: 6px;
        color: transparent;
        transition: all 0.3s ease;
        flex-shrink: 0;
    }

    .submodule-checkmark i {
        font-size: 14px;
    }

    .modern-submodule-wrapper:hover .submodule-checkmark {
        background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
    }

    .modern-submodule-wrapper input[type="checkbox"]:checked + .submodule-card .submodule-checkmark {
        background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
        color: white;
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }

    /* Sub-modules animation */
    @keyframes submoduleFadeInUp {
        from {
            opacity: 0;
            transform: translateY(15px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .modern-submodule-item {
        animation: submoduleFadeInUp 0.4s ease-out forwards;
    }

    .module-section .row > [class*="col-"] {
        animation: submoduleFadeInUp 0.4s ease-out forwards;
    }

    .module-section .row > [class*="col-"]:nth-child(1) { animation-delay: 0.05s; }
    .module-section .row > [class*="col-"]:nth-child(2) { animation-delay: 0.1s; }
    .module-section .row > [class*="col-"]:nth-child(3) { animation-delay: 0.15s; }
    .module-section .row > [class*="col-"]:nth-child(4) { animation-delay: 0.2s; }
    .module-section .row > [class*="col-"]:nth-child(5) { animation-delay: 0.25s; }
    .module-section .row > [class*="col-"]:nth-child(n+6) { animation-delay: 0.3s; }

    /* Responsive Sub-Modules */
    @media (max-width: 1200px) {
        .submodule-card {
            margin-bottom: 12px;
        }
    }

    @media (max-width: 768px) {
        .module-section {
            margin-bottom: 20px;
        }

        .submodule-card {
            padding: 14px 16px;
            gap: 12px;
        }

        .submodule-number {
            width: 36px;
            height: 36px;
            font-size: 13px;
        }

        .submodule-label {
            font-size: 13px;
        }
    }

    /* ===========================
       Delete Organization Modal Styles
       =========================== */

    /* Captcha Question Styling */
    #captchaQuestion {
        font-family: 'Courier New', monospace;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 0.75rem 1.25rem;
        border-radius: 0.5rem;
        border: 2px solid #5a67d8;
        box-shadow: 0 4px 12px rgba(90, 103, 216, 0.3);
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
    }

    /* Delete Organization Cards */
    .delete-org-card {
        transition: all 0.3s ease;
        border: 1px solid #e9ecef;
    }

        .delete-org-card .card-header {
            font-weight: 600;
            border-bottom: 2px solid rgba(0, 0, 0, 0.1);
        }

        .delete-org-card.bg-light {
            background-color: #f8f9fa !important;
        }

        .delete-org-card.bg-warning {
            background-color: #fff3cd !important;
        }

        .delete-org-card.bg-danger {
            background-color: #f8d7da !important;
        }

    /* Form validation states for delete org */
    .form-control.is-invalid {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
        animation: shake 0.5s ease-in-out;
    }

    @keyframes shake {
        0%, 100% {
            transform: translateX(0);
        }

        25% {
            transform: translateX(-5px);
        }

        75% {
            transform: translateX(5px);
        }
    }

    /* Organization code emphasis */
    #expectedOrgCode {
        font-family: 'Courier New', monospace;
        background-color: #fff3cd;
        padding: 0.25rem 0.5rem;
        border-radius: 0.25rem;
        border: 1px solid #ffeaa7;
        letter-spacing: 2px;
    }

    /* Delete button states */
    #deleteConfirmBtn {
        min-width: 180px;
        transition: all 0.3s ease;
    }

        #deleteConfirmBtn:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none !important;
        }

        #deleteConfirmBtn:not(:disabled):hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        }

    /* Loading states for delete organization */
    #deleteOrgLoader {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    #deleteOrgError {
        min-height: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Shimmer effects for delete org form */
    .delete-org-shimmer {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4px;
        display: inline-block;
    }

    /* Warning alert enhancement */
    .alert-danger {
        border-left: 4px solid #dc3545;
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    }

    /* ===========================
       Menu Master Tree Styles
       =========================== */

    .menu-tree {
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        max-height: 600px;
        overflow-y: auto;
    }

    .menu-item {
        border-bottom: 1px solid #f8f9fa;
        padding: 10px;
        cursor: grab;
        transition: background-color 0.2s;
    }

        .menu-item:hover {
            background-color: #f8f9fa;
        }

        .menu-item.dragging {
            opacity: 0.5;
            cursor: grabbing;
        }

        .menu-item.drag-over {
            background-color: #e3f2fd;
            border-left: 4px solid #2196f3;
        }

    .menu-level-0 { margin-left: 0px; }
    .menu-level-1 { margin-left: 20px; }
    .menu-level-2 { margin-left: 40px; }
    .menu-level-3 { margin-left: 60px; }
    .menu-level-4 { margin-left: 80px; }

    .menu-item-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-info {
        flex: 1;
    }

    .menu-actions {
        display: flex;
        gap: 5px;
    }

    .toggle-btn {
        background: none;
        border: none;
        padding: 2px 6px;
        cursor: pointer;
        margin-right: 8px;
    }

    .menu-icon {
        width: 16px;
        height: 16px;
        margin-right: 8px;
        border-radius: 2px;
    }

    .display-order {
        background: #6c757d;
        color: white;
        padding: 2px 6px;
        border-radius: 10px;
        font-size: 0.75rem;
        margin-right: 8px;
    }

    .field-help-text {
        font-size: 0.875rem;
        color: #6c757d;
        margin-top: 0.25rem;
    }

    .optional-field {
        color: #28a745;
        font-weight: 500;
    }

    .menu-status {
        font-size: 0.75rem;
        margin-left: 8px;
    }

/* ===========================
   Menu/MobileMenu Rich Tree (module/menu/submenu cards)
   Recovered from Menu/Manage.cshtml's original <style> block (removed during the
   inline-style cleanup, never re-merged). Selectors that collide with the older,
   simpler tree CSS above (.toggle-btn, .menu-icon, .menu-actions, .menu-info) --
   or with Bootstrap's own .badge/.btn-sm -- are scoped under the card classes here
   so they only affect this richer tree, not the plain drag-and-drop one above.
   =========================== */

.menu-tree {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.web-menu-module-card,
.mobile-menu-module-card {
    border: 1px solid #e3f2fd;
    border-left: 4px solid #667eea;
    border-radius: 8px;
    margin-bottom: 10px;
    background: white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    overflow: hidden;
}

.web-menu-module-card.level-0,
.mobile-menu-module-card.level-0 {
    margin-left: 0;
    border-left-color: #667eea;
    border-left-width: 5px;
    background: linear-gradient(to right, #f8f9ff 0%, white 100%);
}

.web-menu-module-card.level-1,
.mobile-menu-module-card.level-1 {
    margin-left: 0;
    margin-top: 8px;
    margin-bottom: 8px;
    border-left-color: #a18cd1;
    border-left-width: 4px;
    background: linear-gradient(to right, #fef5ff 0%, white 100%);
}

.web-menu-module-card.level-2,
.mobile-menu-module-card.level-2 {
    margin-left: 0;
    margin-top: 8px;
    border-left-color: #fbc2eb;
    border-left-width: 3px;
}

.web-menu-module-card:hover,
.mobile-menu-module-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: transparent;
}

.module-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.module-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    flex-shrink: 0;
}

.web-menu-module-card.level-1 .module-icon,
.mobile-menu-module-card.level-1 .module-icon {
    width: 32px;
    height: 32px;
    font-size: 16px;
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
}

.web-menu-module-card.level-2 .module-icon,
.mobile-menu-module-card.level-2 .module-icon {
    width: 28px;
    height: 28px;
    font-size: 14px;
    background: linear-gradient(135deg, #fbc2eb 0%, #a6c1ee 100%);
}

.module-details {
    flex: 1;
    min-width: 0;
}

.module-name {
    font-size: 15px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.web-menu-module-card.level-0 .module-name,
.mobile-menu-module-card.level-0 .module-name {
    font-size: 16px;
    font-weight: 700;
}

.web-menu-module-card.level-1 .module-name,
.mobile-menu-module-card.level-1 .module-name {
    font-size: 14px;
}

.module-description {
    font-size: 12px;
    color: #718096;
    margin: 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.module-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.module-children {
    padding: 12px 0 8px 30px;
    background: transparent;
}

.menus-section {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fc;
    border-radius: 6px;
    border: 1px dashed #cbd5e0;
}

.menus-section::before {
    content: "Menu Items";
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #4a5568;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.menu-card {
    border: 1px solid #e2e8f0;
    border-left: 3px solid #3182ce;
    border-radius: 6px;
    margin-bottom: 8px;
    background: white;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.menu-card.level-0 {
    margin-left: 0;
}

.menu-card.level-1 {
    margin-left: 15px;
    border-left-color: #4299e1;
}

.menu-card.level-2 {
    margin-left: 30px;
    border-left-color: #63b3ed;
}

.menu-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
}

.menu-card .menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    cursor: pointer;
}

.menu-card .menu-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.menu-card .menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #3182ce 0%, #2c5282 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.menu-card .menu-icon i,
.menu-card .menu-icon img {
    color: white !important;
    filter: brightness(0) invert(1);
}

.menu-card .menu-icon img {
    filter: none;
}

.menu-card .menu-details {
    flex: 1;
    min-width: 0;
}

.menu-card .menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-card .menu-description {
    font-size: 11px;
    color: #718096;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screen-id {
    font-size: 10px;
    padding: 1px 4px;
    background: #edf2f7;
    border-radius: 3px;
    color: #4a5568;
    font-family: 'Courier New', monospace;
    display: inline-block;
}

.menu-order {
    background: linear-gradient(135deg, #4299e1 0%, #3182ce 100%);
    color: white;
    border-radius: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.menu-card .menu-actions {
    display: flex;
    gap: 4px;
    align-items: center;
    flex-wrap: nowrap;
}

.menu-card .menu-children {
    padding: 6px 14px 4px;
    background: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

.submenu-card {
    border: 1px solid #e2e8f0;
    border-left: 3px solid #48bb78;
    border-radius: 5px;
    margin-bottom: 6px;
    background: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.submenu-card.level-1 {
    margin-left: 15px;
}

.submenu-card.level-2 {
    margin-left: 30px;
}

.submenu-card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateX(2px);
}

.submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
}

.submenu-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.submenu-details {
    flex: 1;
    min-width: 0;
}

.submenu-name {
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 2px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu-description {
    font-size: 11px;
    color: #718096;
    display: block;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.submenu-actions {
    display: flex;
    gap: 4px;
    align-items: center;
}

.web-menu-module-card .toggle-btn,
.mobile-menu-module-card .toggle-btn,
.menu-card .toggle-btn,
.submenu-card .toggle-btn {
    background: none;
    border: none;
    color: #4a5568;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    padding: 0;
    flex-shrink: 0;
}

.web-menu-module-card .toggle-btn:hover,
.mobile-menu-module-card .toggle-btn:hover,
.menu-card .toggle-btn:hover,
.submenu-card .toggle-btn:hover {
    color: #667eea;
    background-color: #edf2f7;
}

.web-menu-module-card .toggle-btn i,
.mobile-menu-module-card .toggle-btn i,
.menu-card .toggle-btn i,
.submenu-card .toggle-btn i {
    transition: transform 0.2s ease;
}

.web-menu-module-card.collapsed .toggle-btn i,
.mobile-menu-module-card.collapsed .toggle-btn i,
.menu-card.collapsed .toggle-btn i {
    transform: rotate(-90deg);
}

.web-menu-module-card.collapsed .module-children,
.mobile-menu-module-card.collapsed .module-children,
.menu-card.collapsed .menu-children {
    display: none;
}

.web-menu-module-card .badge,
.mobile-menu-module-card .badge,
.menu-card .badge,
.submenu-card .badge {
    font-size: 10px;
    padding: 3px 6px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

.web-menu-module-card .btn-sm,
.mobile-menu-module-card .btn-sm,
.menu-card .btn-sm,
.submenu-card .btn-sm {
    padding: 3px 8px;
    font-size: 11px;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.web-menu-module-card .btn-sm:hover,
.mobile-menu-module-card .btn-sm:hover,
.menu-card .btn-sm:hover,
.submenu-card .btn-sm:hover {
    transform: translateY(-1px);
}

.web-menu-module-card .btn-sm i,
.mobile-menu-module-card .btn-sm i,
.menu-card .btn-sm i,
.submenu-card .btn-sm i {
    font-size: 12px;
}

@media (max-width: 768px) {
    .web-menu-module-card.level-1,
    .mobile-menu-module-card.level-1 {
        margin-left: 10px;
    }

    .web-menu-module-card.level-2,
    .mobile-menu-module-card.level-2 {
        margin-left: 20px;
    }

    .menu-card.level-1,
    .submenu-card.level-1 {
        margin-left: 8px;
    }

    .menu-card.level-2,
    .submenu-card.level-2 {
        margin-left: 16px;
    }

    .module-header,
    .menu-card .menu-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }

    .module-actions,
    .menu-card .menu-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .module-info,
    .menu-card .menu-info {
        gap: 8px;
    }

    .module-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .menu-card .menu-icon {
        width: 28px;
        height: 28px;
        font-size: 14px;
    }

    .web-menu-module-card .btn-sm,
    .mobile-menu-module-card .btn-sm,
    .menu-card .btn-sm,
    .submenu-card .btn-sm {
        padding: 2px 6px;
        font-size: 10px;
    }
}

/* The header is position:fixed (out of normal flow), so something has to reserve that
   same space or content -- like this page's breadcrumb -- renders underneath it. */
#main-wrapper .body-wrapper {
    transition: margin-left 0.2s ease-in;
}

/* =========================
   SIDEBAR SHOW/HIDE (hamburger toggle, desktop widths)
   The vendor theme only wires the .show-sidebar slide behavior below 1200px; above that the
   sidebar is unconditionally visible. app.min.js already toggles a "mini-sidebar" class on
   #main-wrapper when the hamburger is clicked (also flipping data-sidebartype) -- reuse that
   same toggle here to fully hide/show the sidebar at desktop widths too, no JS changes needed.
========================= */

@media (min-width: 1200px) {
    .app-header {
        transition: width 0.2s ease-in;
    }

    #main-wrapper.mini-sidebar .left-sidebar {
        left: -270px;
    }

    #main-wrapper.mini-sidebar .body-wrapper {
        margin-left: 0;
    }

    #main-wrapper.mini-sidebar .app-header {
        width: 100%;
    }
}

/* =========================
   ICON SIZE / ANIMATION HELPERS
   (Bootstrap Icons has no built-in size/spin utilities, unlike Font Awesome's fa-2x/fa-4x/fa-spin)
========================= */

.icon-2x {
    font-size: 2em;
}

.icon-4x {
    font-size: 4em;
}

.icon-spin {
    animation: icon-spin 1s linear infinite;
}

@keyframes icon-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* =========================
   DASHBOARD
========================= */

.dashboard-content-hidden {
    display: none;
}

.dashboard-error-container-hidden {
    display: none;
}

.dashboard-loader-min-height {
    min-height: 400px;
}

.dashboard-spinner-lg {
    width: 3rem;
    height: 3rem;
}

.admin-toast-alert-fixed {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
}

/* =========================
   SIDEBAR TREE CONNECTOR LINES
========================= */

.tree-lines li {
    position: relative;
    padding-left: 18px;
    margin: 6px 0;
}

    .tree-lines li::before {
        content: "";
        position: absolute;
        top: -6px;
        bottom: -6px;
        left: 0;
        width: 1px;
        background: #dcdcdc;
    }

    .tree-lines li::after {
        content: "";
        position: absolute;
        top: 16px;
        left: 0;
        width: 12px;
        height: 1px;
        background: #dcdcdc;
    }

    .tree-lines li:last-child::before {
        bottom: 16px;
    }

.sidebar-nav .tree-lines .sidebar-link {
    white-space: normal !important;
    line-height: 1.25;
}

.sidebar-nav .sidebar-link {
    background: transparent !important;
    border-radius: 8px;
    padding: 10px 14px;
    transition: all .15s ease;
    position: relative;
}

    .sidebar-nav .sidebar-link:hover {
        background: rgba(0,0,0,0.04) !important;
    }

sidebar-link active , .sidebar-nav .sidebar-link.active,
    .sidebar-nav .sidebar-item.active > .sidebar-link {
        background: linear-gradient( 90deg, rgba(79,114,255,0.12) 0%, rgba(79,114,255,0.03) 100% ) !important;
        border-radius: 10px !important;
        box-shadow: none !important;
        color: #2f3c6a !important;
        font-weight: 600;
    }

        .sidebar-nav .sidebar-link.active::before,
        .sidebar-nav .sidebar-item.active > .sidebar-link::before {
            content: "";
            position: absolute;
            left: -6px;
            top: 6px;
            bottom: 6px;
            width: 4px;
            border-radius: 4px;
            background: #5b7cff;
        }

        .sidebar-nav .sidebar-link.active i {
            color: #5b7cff !important;
        }

    .sidebar-nav .sidebar-link.active {
        background-image: none !important;
    }

.sidebar-nav .sidebar-item > .sidebar-link.active {
    border: none !important;
}

.sidebar-nav .sidebar-link.active.bg-primary {
    background: none !important;
}

/* =========================
   LOGIN PAGE
========================= */

#togglePassword {
    transform: none !important;
    transition: none !important;
    --bs-btn-color: #6c757d;
    --bs-btn-border-color: #ced4da;
    --bs-btn-hover-color: #495057;
    --bs-btn-hover-bg: #f8f9fa;
    --bs-btn-hover-border-color: #ced4da;
    --bs-btn-active-color: #495057;
    --bs-btn-active-bg: #e9ecef;
    --bs-btn-active-border-color: #ced4da;
    --bs-btn-focus-shadow-rgb: 206, 212, 218;
}

    #togglePassword:hover,
    #togglePassword:focus,
    #togglePassword:active {
        transform: none !important;
    }

/* Login page: gradient background + subtle entrance/interaction animations */

.login-gradient-bg {
    background: linear-gradient(-45deg, #eef2ff, #e0e7ff, #dbeafe, #ede9fe);
    background-size: 400% 400%;
    animation: loginGradientShift 18s ease infinite;
}

/* Soft floating blurred orbs for depth -- purely decorative, sit behind the card. */
.login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.login-orb-1 {
    width: 320px;
    height: 320px;
    top: -80px;
    left: -60px;
    background: #5D87FF;
    animation: loginOrbFloat 12s ease-in-out infinite;
}

.login-orb-2 {
    width: 260px;
    height: 260px;
    bottom: -70px;
    right: -40px;
    background: #a78bfa;
    animation: loginOrbFloat 14s ease-in-out infinite reverse;
}

.login-orb-3 {
    width: 180px;
    height: 180px;
    bottom: 15%;
    left: 8%;
    background: #7dd3fc;
    animation: loginOrbFloat 10s ease-in-out infinite;
    animation-delay: -3s;
}

.login-card {
    position: relative;
    z-index: 1;
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 60px -15px rgba(93, 135, 255, 0.25), 0 8px 20px -8px rgba(0, 0, 0, 0.08);
    opacity: 0;
    animation: loginCardIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.login-logo {
    opacity: 0;
    animation: loginFadeIn 0.6s ease-out 0.35s forwards;
}

.login-card .form-control {
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

    .login-card .form-control:focus {
        border-color: #5D87FF;
        box-shadow: 0 0 0 0.2rem rgba(93, 135, 255, 0.18);
        transform: translateY(-1px);
    }

.login-btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #5D87FF, #6f5cf0);
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

    .login-btn:hover:not(:disabled) {
        transform: translateY(-2px);
        box-shadow: 0 10px 25px -8px rgba(93, 135, 255, 0.5);
        filter: brightness(1.05);
    }

    .login-btn:active:not(:disabled) {
        transform: translateY(0);
    }

/* Subtle one-time shine sweep across the button, replays on hover. */
.login-btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

    .login-btn:hover::after {
        left: 125%;
    }

/* span/svg (not plain .login-hidden) to out-specificity Bootstrap's .spinner-border /
   .bi-eye-slash rules, which load after site.css -- without !important, so jQuery's
   later .show()/.hide() toggle (inline style) still works normally at runtime. */
span.login-hidden,
svg.login-hidden {
    display: none;
}

@keyframes loginGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes loginOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -25px) scale(1.05); }
}

@keyframes loginCardIn {
    from { opacity: 0; transform: translateY(18px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes loginFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .login-gradient-bg,
    .login-orb,
    .login-card,
    .login-logo,
    .login-btn::after {
        animation: none !important;
        transition: none !important;
    }

    .login-card,
    .login-logo {
        opacity: 1;
    }
}

/* ===== Organization Control Panel: Modules & Features ===== */
.cp-org-name { color: #171D45; font-weight: 700; }

.cp-panel {
    border: 1px solid #DFE8F5;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(39, 74, 130, .05);
}

.cp-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 14px 22px;
    background: #F7FAFF;
    border-bottom: 1px solid #E7EEF8;
    border-radius: 12px 12px 0 0;
}

.cp-panel-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    color: #171D45;
}

.cp-filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.cp-legend { display: flex; gap: 16px; margin-right: 8px; font-size: .8rem; color: #6B7FA6; }
.cp-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; background: #B8C7DF; }
.cp-dot-on { background: #15945B; }

.cp-filter {
    border: 1px solid #DFE8F5;
    background: #fff;
    color: #31549E;
    border-radius: 18px;
    padding: 6px 14px;
    font-size: .8rem;
    cursor: pointer;
}
.cp-filter.active { background: #4F6FE8; border-color: #4F6FE8; color: #fff; }

.cp-panel-body { padding: 16px; }
.cp-bulk { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 14px; }

.module-grid.cp-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.cp-card {
    border: 1px solid #DFE8F5;
    border-radius: 12px;
    background: #fff;
    padding: 18px 17px 15px;
    box-shadow: 0 1px 3px rgba(39, 74, 130, .04);
}
.cp-card[hidden] { display: none; }
.cp-check { display: none; }

.cp-card-top {
    display: grid;
    grid-template-columns: 44px 44px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: start;
}

.cp-num, .cp-icon {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    display: grid;
    place-items: center;
}
.cp-num { background: #4F6FE8; color: #fff; font-size: 1.1rem; font-weight: 700; }
.cp-icon { background: #EEF4FF; color: #4F6FE8; font-size: 1.2rem; }

.cp-name { margin: 2px 0 6px; font-size: 1.15rem; font-weight: 700; color: #171D45; overflow-wrap: anywhere; }
.cp-badges, .cp-feature-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.cp-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 3px 9px;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .3px;
    text-transform: uppercase;
    background: #EEF4FF;
    color: #315ED0;
}
.cp-badge-paid { background: #FFF6E5; color: #B26A00; }
.cp-badge-standard { background: #F0F4FA; color: #667997; }
.cp-badge-included { background: #E9F9F1; color: #15945B; display: none; }
.cp-card > .cp-check:checked ~ .cp-card-top .cp-badge-included { display: inline-flex; }

.cp-actions { display: flex; align-items: center; gap: 4px; }

.cp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border-radius: 14px;
    padding: 5px 11px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
}
.cp-pill-on { background: #E9F9F1; color: #15945B; }
.cp-pill-off { background: #F1F4F8; color: #687B99; }
.cp-pill-sm { padding: 3px 9px; font-size: .68rem; cursor: inherit; }
.cp-pill.cp-locked { cursor: default; }

/* The checkbox drives which status pill is visible */
.cp-card > .cp-check:checked ~ .cp-card-top .cp-pill-off,
.cp-card > .cp-check:not(:checked) ~ .cp-card-top .cp-pill-on,
.cp-feature > .cp-check:checked ~ .cp-pill-off,
.cp-feature > .cp-check:not(:checked) ~ .cp-pill-on { display: none; }

.cp-more { border: 0; background: transparent; color: #29436F; font-size: 1.1rem; padding: 2px 6px; }

.cp-desc { margin: 12px 0 14px; color: #6B7FA6; font-size: .88rem; line-height: 1.55; }

.cp-features-wrap { margin-top: 12px; }
.cp-card-top + .cp-features-wrap { margin-top: 16px; }

.cp-features-head {
    width: 100%;
    border: 0;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 11px;
    background: #F6F9FD;
    border-radius: 8px 8px 0 0;
    color: #28416C;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
}
.cp-chevron { transition: transform .2s ease; }
.cp-collapsed .cp-chevron { transform: rotate(180deg); }
.cp-collapsed .cp-features-head { border-radius: 8px; }
.cp-collapsed .cp-features { display: none; }

.cp-features { border: 1px solid #E3EAF4; border-top: 0; border-radius: 0 0 8px 8px; }

.cp-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    margin: 0;
    padding: 7px 11px;
    border-bottom: 1px solid #EDF1F7;
    cursor: pointer;
}
.cp-feature:last-child { border-bottom: 0; }

.cp-feature-name {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #31466D;
    font-size: .85rem;
}
.cp-feature-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: #F1F5FB;
    color: #45608D;
    display: grid;
    place-items: center;
    font-size: .85rem;
}
.cp-feature-badges .cp-badge { font-size: .58rem; padding: 3px 8px; }

@media (max-width: 1050px) {
    .module-grid.cp-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .cp-card-top { grid-template-columns: 40px minmax(0, 1fr); }
    .cp-icon { display: none; }
    .cp-actions { grid-column: 2; }
    .cp-feature { flex-wrap: wrap; }
    .cp-feature-name { flex-basis: 100%; }
}

/* Enable / disable switch (module cards and feature rows) */
.cp-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.cp-switch.cp-locked { cursor: not-allowed; opacity: .7; }
.cp-track {
    position: relative;
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: #C9D4E5;
    transition: background .2s ease;
    flex-shrink: 0;
}
.cp-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}
.cp-switch-text { font-size: .75rem; font-weight: 700; min-width: 54px; }
.cp-text-on { color: #15945B; }
.cp-text-off { color: #687B99; }
.cp-switch-sm .cp-track { width: 34px; height: 18px; border-radius: 9px; }
.cp-switch-sm .cp-track::after { top: 2px; left: 2px; width: 14px; height: 14px; }
.cp-switch-sm .cp-switch-text { font-size: .7rem; min-width: 50px; }

.cp-card > .cp-check:checked ~ .cp-card-top .cp-track,
.cp-feature > .cp-check:checked ~ .cp-switch .cp-track { background: #15945B; }
.cp-card > .cp-check:checked ~ .cp-card-top .cp-track::after { transform: translateX(18px); }
.cp-feature > .cp-check:checked ~ .cp-switch .cp-track::after { transform: translateX(16px); }

.cp-card > .cp-check:checked ~ .cp-card-top .cp-text-off,
.cp-card > .cp-check:not(:checked) ~ .cp-card-top .cp-text-on,
.cp-feature > .cp-check:checked ~ .cp-switch .cp-text-off,
.cp-feature > .cp-check:not(:checked) ~ .cp-switch .cp-text-on { display: none; }

/* Roles Master > Manage Menus: the menu checklist scrolls inside the modal instead of making the modal very tall. */
.roles-master-menu-list {
    max-height: 50vh;
    overflow-y: auto;
}
