/* IAM-11D4: external web-font imports removed; use enterprise-safe system stacks. */
/* @import url('http://wrraptheme.com/demo/assets/thinder-ai-style.css'); */

@import url(theme.css);
@import url(base.css);
@import url(animation.css);

/* Body */

.header .logo {
    width: 200px;
    min-width: 200px;
    border-right: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    padding: 0px 0px;
}

.mebcoll-brand {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    text-decoration: none;
    line-height: 1;
    gap: 2px;
    transform: translateY(1px);
}

.mebcoll-brand-wordmark {
    height: 35px;
    width: auto;
    display: block;
}

.mebcoll-brand-slogan {
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #8c8c8c;
    margin-left: 24px;
    white-space: nowrap;
    line-height: 1.1;
}

@media screen and (max-width: 480px) {

    .header .logo {
        max-width: 120px;
        min-width: 200px;
        border-right: 1px solid var(--bs-border-color);
        display: flex;
        align-items: center;
        padding: 0px 0px;
    }

        .header .logo img {
            max-width: 103px !important;
        }

    .mebcoll-brand-wordmark {
        height: 28px;
        width: auto;
        display: block;
    }

    .mebcoll-brand-slogan {
        font-size: 7px !important;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #8c8c8c;
        margin-left: 0px;
        white-space: nowrap;
        line-height: 1.1;
    }

    .content-wrapper.content-wrapper-radius .left-sidebar {
        margin-top: 20px;
    }
}



body {
    line-height: 22px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

    body.font-raleway {
        font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body.font-opensans {
        font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body.font-dosis {
        font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

    body.font-jost {
        font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }

.choose-skin li div {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
}

.choose-skin li:hover {
    cursor: pointer;
}

.choose-skin li.active div:after {
    content: '';
    position: absolute;
    z-index: 99;
    width: 10px;
    height: 10px;
    background: var(--bs-white);
    border-radius: 10px;
}

body.radius-0 .rounded,
body.radius-0 .rounded-1,
body.radius-0 .rounded-2,
body.radius-0 .rounded-3,
body.radius-0 .rounded-4,
body.radius-0 .btn,
body.radius-0 .form-control {
    border-radius: 0 !important;
}

/* Tab Card Headers */
.tab-header.nav-tabs .nav-link {
    border: 0;
    padding: 2px 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-black-50);
}

    .tab-header.nav-tabs .nav-item.show .nav-link,
    .tab-header.nav-tabs .nav-link.active {
        color: var(--bs-light-text-emphasis);
        background-color: transparent;
    }

/* Tab Card Headers */

/* Header */
.header {
    background-color: var(--bs-body-bg);
    z-index: 1022;
}

    .header .logo {
        width: 221px;
        border-right: 1px solid var(--bs-border-color);
    }

    .header .dropdown-toggle {
        padding: 0;
        border: none;
    }

        .header .dropdown-toggle::after {
            display: none;
        }

    .header .nav-link {
        font-size: 18px;
        line-height: 21px;
        font-weight: 400;
        color: var(--bs-body-color);
    }

        .header .nav-link:hover {
            color: var(--bs-primary);
        }

            .header .nav-link:hover svg path {
                stroke: var(--bs-primary);
                stroke-width: 2px;
                transition: var(--transition-3s);
            }

        .header .nav-link:hover {
            color: var(--bs-primary);
        }

    .header .dropdown-menu.notifications,
    .header .dropdown-menu.notifications a {
        width: 360px;
        font-size: 16px;
        line-height: 22px;
        color: var(--bs-body-color);
        text-decoration: none;
    }


        .header .dropdown-menu.notifications .list-group {
            height: 300px;
            overflow-y: auto;
        }

        .header .dropdown-menu.notifications .list-group-item {
            border-style: dashed;
        }

            .header .dropdown-menu.notifications .list-group-item:hover a {
                color: var(--bs-primary);
            }

.page-search .icon-search {
    left: 24px;
    z-index: 10;
}

.page-search .icon-cmd {
    right: 24px;
    z-index: 10;
}

.page-search .form-control {
    padding-left: 62px !important;
    padding-right: 115px !important;
    background-color: var(--bs-card-bg);
    border: 1px solid var(--bs-card-bg);
}

    .page-search .form-control:focus {
        box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .25);
        border-color: var(--bs-primary);
    }

.search-result {
    transition: var(--transition-3s);
    opacity: 1;
    visibility: visible;
    transform: scaleY(1);
    height: 100%;
}

    .search-result.active {
        opacity: 0;
        visibility: hidden;
        transform: scaleY(0);
        transition: var(--transition-3s);
        height: 0;
    }

    .search-result .card {
        border-bottom-width: 5px;
    }

[data-bs-theme=light] .search-result .card {
    background: #f8f9fa;
}

/* Header */

/* Page Modules */
.page-modules .row {
    margin-left: -20px;
    margin-right: -20px;
}

.page-modules .module-item .module-box {
    padding: 30px;
    background: linear-gradient(136.25deg, var(--bs-card-bg) 2.1%, var(--bs-card-bg) 100%);
    color: var(--bs-body-color);
    transition: var(--transition-3s)
}

.page-modules .module-item:focus .module-box,
.page-modules .module-item:hover .module-box {
    background: linear-gradient(136.25deg, var(--bs-primary) 2.1%, #322559 100%);
    color: var(--bs-white);
    transition: var(--transition-3s)
}

    .page-modules .module-item:focus .module-box svg path,
    .page-modules .module-item:hover .module-box svg path {
        stroke-width: 2px;
    }

.page-modules .module-item .module-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 400;
    color: var(--bs-body-color);
    transition: var(--transition-3s)
}

.page-modules .module-item:hover .module-title {
    font-weight: 700;
    color: var(--bs-primary);
}

.modal .page-modules .module-item .module-title {
    font-size: 16px;
}

.app-icon h6 {
    font-size: 14px !important;
}

.app-icon .module-box {
    padding: 16px !important;
}

/* Page Modules */

/* Content Wrapper */
.content-wrapper {
    width: 100%;
    min-height: calc(100vh - 136px);
    transition: var(--transition-3s);
}

    .content-wrapper.content-wrapper-radius {
        background-color: var(--bs-card-bg);
    }

        .content-wrapper.content-wrapper-radius .left-sidebar {
            border-radius: 0 16px 0 0;
        }

        .content-wrapper.content-wrapper-radius .content-area {
            border-radius: 16px 0 0 0;
            background-color: var(--bs-body-bg);
        }

/* Content Wrapper */

/* Left Sidebar */
.left-sidebar {
    width: 245px;
    min-width: 245px;
    /* max-height: 100vh; */
    background-color: var(--bs-body-bg);
    overflow-y: auto;
    transition: var(--transition-3s);
    padding: 24px 20px;
    position: relative;
}

.layout-fullwidth .left-sidebar {
    width: 0;
    min-width: 0;
    padding: 24px 0;
    transition: var(--transition-3s);
    left: -250px;
}

.left-sidebar .nav-sidebar {
    width: 204px;
}

.nav-sidebar > ul > li {
    margin-bottom: 16px;
}

    .nav-sidebar > ul > li:last-child {
        margin-bottom: 0;
    }

.nav-sidebar .nav {
    position: relative;
    padding-top: 14px;
}

    .nav-sidebar .nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: 5px;
        width: 2px;
        height: calc(100% - 23px);
        z-index: 1;
        background-color: var(--bs-border-color);
        transition: var(--transition-3s);
    }

.nav-sidebar .nav-title {
    display: block;
    color: var(--bs-body-color);
}

.nav-sidebar ul li a[aria-expanded="false"] .sidebar-toggle-icon {
    transform: rotate(0deg);
    transition: var(--transition-3s);
}

.nav-sidebar ul li a[aria-expanded="true"] .sidebar-toggle-icon {
    transform: rotate(135deg);
    transition: var(--transition-3s);
}

.nav-sidebar .nav .nav-item {
    padding: 4px 0 4px 24px;
    position: relative;
}

    .nav-sidebar .nav .nav-item::before {
        content: "";
        border-left: 2px solid var(--bs-border-color);
        border-bottom: 2px solid var(--bs-border-color);
        width: 12px;
        height: 12px;
        position: absolute;
        left: 5px;
        top: 4px;
        border-radius: 0px 8px 0px 8px;
    }

.nav-sidebar .nav .nav-link {
    padding: 0;
    line-height: 22px;
    color: var(--bs-body-color);
}

    .nav-sidebar .nav .nav-link:focus,
    .nav-sidebar .nav .nav-link.active,
    .nav-sidebar .nav .nav-link:hover {
        color: var(--bs-primary);
        font-weight: 500;
        transition: var(--transition-3s);
    }


/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
}


.nav-sidebar .nav .nav-item > .nav-link.d-flex {
    gap: 8px;
}

.nav-sidebar .nav .nav-item .nav {
    margin-top: 6px;
}

    .nav-sidebar .nav .nav-item .nav .nav-item {
        padding-top: 3px;
        padding-bottom: 3px;
    }

.nav-sidebar .sidebar-toggle-icon {
    flex: 0 0 auto;
    transition: var(--transition-3s);
}

.nav-sidebar .nav .nav-item > .nav-link .sidebar-toggle-icon {
    width: 15px;
    height: 15px;
    opacity: .7;
}

.nav-sidebar > ul > li > a > .sidebar-toggle-icon {
    width: 18px;
    height: 18px;
}

.nav-sidebar > ul > li > a.nav-link {
    padding: 0;
    line-height: 22px;
    color: var(--bs-body-color);
}

    .nav-sidebar > ul > li > a.nav-link .nav-title.active,
    .nav-sidebar > ul > li > a.nav-link.active,
    .nav-sidebar > ul > li > a.nav-link:hover {
        color: var(--bs-primary);
        font-weight: 500;
        transition: var(--transition-3s);
    }

.nav-sidebar .nav .nav-link .active {
    color: var(--bs-primary);
    font-weight: 500;
}





/* Dynamic menu premium SVG icons */
.menu-icon-svg {
    display: block;
    flex: 0 0 auto;
    overflow: visible;
}

.menu-icon-svg .menu-icon-fill {
    fill: currentColor;
    opacity: .11;
    stroke: none;
}

.menu-icon-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: currentColor;
}

.admin-header-menu-link {
    display: inline-flex !important;
    align-items: center;
    gap: .42rem;
}

.admin-header-menu-link .menu-icon-shell {
    width: 24px;
    height: 24px;
}

.admin-header-menu-link .menu-header-icon {
    width: 21px;
    height: 21px;
    opacity: .9;
    filter: drop-shadow(0 .18rem .36rem rgba(var(--bs-primary-rgb), .08));
    transition: var(--transition-3s);
}

.admin-header-menu-link:hover .menu-header-icon,
.admin-header-menu-link.active .menu-header-icon {
    opacity: 1;
    transform: translateY(-1px) scale(1.04);
}

.menu-sidebar-link {
    min-width: 0;
}

.menu-sidebar-main {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
    min-width: 0;
}

.nav-sidebar .menu-icon-shell {
    width: 28px;
    height: 28px;
    border-radius: .72rem;
    background: rgba(var(--bs-primary-rgb), .055);
    color: var(--bs-body-color);
    transition: var(--transition-3s);
}

.nav-sidebar .menu-sidebar-icon {
    width: 19px;
    height: 19px;
    opacity: .9;
    transition: var(--transition-3s);
}

.nav-sidebar > ul > li > a.nav-link.active .menu-icon-shell,
.nav-sidebar > ul > li > a.nav-link:hover .menu-icon-shell,
.nav-sidebar .nav-link.active .menu-icon-shell,
.nav-sidebar .nav-link:hover .menu-icon-shell,
.nav-sidebar .branch-active > a .menu-icon-shell,
.nav-sidebar .nav-link.branch-active .menu-icon-shell {
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .12);
    box-shadow: 0 .45rem 1.1rem rgba(var(--bs-primary-rgb), .12);
}

.nav-sidebar .nav-link.active .menu-sidebar-icon,
.nav-sidebar .nav-link:hover .menu-sidebar-icon,
.nav-sidebar .nav-link.branch-active .menu-sidebar-icon {
    opacity: 1;
    transform: scale(1.05);
}

.nav-sidebar .nav .nav-item .menu-icon-shell {
    width: 24px;
    height: 24px;
    border-radius: .62rem;
}

.nav-sidebar .nav .nav-item .menu-sidebar-icon {
    width: 17px;
    height: 17px;
}

.nav-sidebar .nav-title {
    min-width: 0;
}

/* Body Scroll */
body.no-scroll {
    position: fixed;
    width: 100%;
}

/* Left Sidebar */

/* Content Wrapper */
.content-area {
    min-width: calc(100% - 245px);
    transition: var(--transition-3s);
}

    .content-area > .container-fluid {
        height: 100%;
    }

.layout-fullwidth .content-area {
    min-width: 100%;
}

/* Content Wrapper */



#chat-file-input {
    display: none;
}

.send-image {
    height: 100px;
    width: 100px;
}

.typing-dots::after {
    content: '';
    display: inline-block;
    width: 1em;
    text-align: left;
    animation: dots 1.2s steps(3, end) infinite;
}

@keyframes dots {
    0% {
        content: '';
    }

    33% {
        content: '.';
    }

    66% {
        content: '..';
    }

    100% {
        content: '...';
    }
}

#PageSearchInput {
    width: 0;
    opacity: 0;
    transition: width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
    right: -10px;
    top: -6px;
}

    #PageSearchInput.active {
        width: 240px;
        opacity: 1;
    }


.breadcrumbs-primary .page-breadcrumbs .page-name {
    color: var(--bs-white);
}

.breadcrumbs-primary .page-breadcrumbs .back-btn {
    border-color: #eeeeee36;
}

.breadcrumbs-primary .page-breadcrumbs,
.breadcrumbs-primary .content-wrapper.content-wrapper-radius,
.breadcrumbs-primary .inner-layout .left-bar {
    background-color: var(--bs-primary);
}

.breadcrumbs-primary .back-btn span {
    color: var(--bs-white) !important;
}

.breadcrumbs-primary .page-breadcrumbs .hover-svg svg path {
    stroke: var(--bs-white)
}

.breadcrumbs-primary .page-breadcrumbs .hover-svg:hover svg path {
    stroke: var(--bs-black)
}

.card.shadow-active {
    box-shadow: var(--bs-box-shadow-sm) !important
}

.gemini-text {
    background: linear-gradient(to right, #4285f4, #9b72cb, #d96570);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: gradient 5s linear infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* MEBCool AI Command Bar */
.mebcool-command-shell {
    position: relative;
}

.mebcool-command-form {
    position: relative;
}

.mebcool-command-shell .mebcool-command-brand {
    left: 20px;
    z-index: 10;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .03em;
    color: #fff;
    background: linear-gradient(135deg, var(--bs-primary), #6f42c1);
    box-shadow: 0 .45rem 1rem rgba(var(--bs-primary-rgb), .22);
}

.page-search .mebcool-command-input {
    padding-left: 68px !important;
    padding-right: 220px !important;
    border-color: rgba(var(--bs-primary-rgb), .22);
    background: linear-gradient(135deg, rgba(var(--bs-primary-rgb), .04), rgba(111,66,193,.035)), var(--bs-card-bg);
}

.page-search .mebcool-command-input:focus {
    box-shadow: 0 0 0 .25rem rgba(var(--bs-primary-rgb), .18), 0 1rem 2.25rem rgba(var(--bs-primary-rgb), .08);
}

.mebcool-command-submit {
    min-width: 82px;
    font-weight: 700;
}

.mebcool-command-attach {
    min-width: 38px;
    font-weight: 700;
}

.mebcool-command-attachment-picker {
    position: relative;
}

.mebcool-command-attachment-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + .45rem);
    z-index: 30;
    min-width: 220px;
    padding: .35rem;
    border: 1px solid rgba(var(--bs-primary-rgb), .18);
    border-radius: .95rem;
    background: var(--bs-body-bg);
    box-shadow: 0 .85rem 2rem rgba(15, 23, 42, .16);
}

.mebcool-command-attachment-menu[hidden] {
    display: none !important;
}

.mebcool-command-attachment-menu button {
    display: block;
    width: 100%;
    border: 0;
    border-radius: .75rem;
    background: transparent;
    color: var(--bs-body-color);
    padding: .5rem .65rem;
    text-align: left;
    font-size: .84rem;
    font-weight: 700;
}

.mebcool-command-attachment-menu button:hover,
.mebcool-command-attachment-menu button:focus {
    background: rgba(var(--bs-primary-rgb), .09);
}

.mebcool-command-attachment-purpose {
    margin-left: .35rem;
    font-weight: 600;
    color: var(--bs-secondary-color);
}

.mebcool-command-attachment-preview {
    position: absolute;
    left: 0;
    right: 0;
    bottom: calc(100% + .45rem);
    z-index: 11;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .65rem;
    padding: .45rem .65rem;
    border: 1px dashed rgba(var(--bs-primary-rgb), .35);
    border-radius: .85rem;
    background: var(--bs-body-bg);
    box-shadow: 0 .45rem 1rem rgba(15, 23, 42, .08);
    font-size: .82rem;
}

.mebcool-command-attachment-preview[hidden] {
    display: none !important;
}

.mebcool-command-attachment-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    font-weight: 700;
    line-height: 1.3;
}

.mebcool-command-attachment-remove {
    border: 0;
    background: transparent;
    color: var(--bs-danger);
    font-weight: 800;
    line-height: 1;
}

.mebcool-command-card {
    border-bottom-width: 5px;
    border-bottom-color: rgba(var(--bs-primary-rgb), .42);
    box-shadow: 0 1.2rem 3rem rgba(15, 23, 42, .08);
}

.mebcool-command-suggestions .list-group-item {
    border-left: 0;
    border-right: 0;
}

.mebcool-command-suggestions .list-group-item:first-child {
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
}

.mebcool-command-suggestions .list-group-item:last-child {
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.mebcool-command-chip {
    border: 0;
    color: var(--bs-body-color);
    background: rgba(var(--bs-primary-rgb), .08);
}

.mebcool-command-chip:hover,
.mebcool-command-chip:focus-visible {
    background: rgba(var(--bs-primary-rgb), .14);
}

.mebcool-command-messages {
    max-height: 320px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid rgba(0,0,0,.08);
    border-radius: 1rem;
    padding: .75rem;
    background: rgba(0,0,0,.018);
}

.mebcool-command-message {
    display: flex;
    margin-bottom: .65rem;
}

.mebcool-command-message:last-child {
    margin-bottom: 0;
}

.mebcool-command-message.user {
    justify-content: flex-end;
}

.mebcool-command-bubble {
    max-width: min(760px, 88%);
    padding: .68rem .8rem;
    border-radius: 1rem;
    font-size: .92rem;
    line-height: 1.42;
    word-break: break-word;
    background: var(--bs-body-bg);
    border: 1px solid rgba(0,0,0,.08);
}

.mebcool-command-message.user .mebcool-command-bubble {
    color: #fff;
    background: var(--bs-primary);
    border-color: var(--bs-primary);
}

.mebcool-command-message.typing .mebcool-command-bubble {
    color: var(--bs-secondary-color);
    font-style: italic;
}

.mebcool-command-meta {
    margin-top: .6rem;
    padding: .6rem;
    border-radius: .85rem;
    border: 1px solid rgba(0,0,0,.08);
    background: rgba(0,0,0,.025);
    font-size: .8rem;
}

.mebcool-command-meta.warn {
    border-left: .25rem solid rgba(255,193,7,.85);
}

.mebcool-command-meta.success {
    border-left: .25rem solid rgba(25,135,84,.72);
}

.mebcool-command-meta.danger {
    border-left: .25rem solid rgba(220,53,69,.72);
}

.mebcool-command-meta.info {
    border-left: .25rem solid rgba(var(--bs-primary-rgb), .55);
}

.mebcool-command-meta.performance {
    border-left: .25rem solid rgba(var(--bs-primary-rgb), .45);
    color: var(--bs-secondary-color);
}

.mebcool-command-performance-details {
    margin-top: .35rem;
}

.mebcool-command-performance-details summary {
    cursor: pointer;
    font-size: .76rem;
    color: var(--bs-secondary-color);
}

.mebcool-command-performance-grid {
    display: grid;
    gap: .18rem;
    margin-top: .35rem;
}

.mebcool-command-performance-grid > div {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    font-size: .76rem;
}

.mebcool-command-pill {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .18rem .5rem;
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    font-size: .74rem;
    font-weight: 700;
    margin: .15rem .2rem .15rem 0;
}

.mebcool-command-pill.warn {
    background: rgba(255,193,7,.16);
    color: #8a6d00;
}

.mebcool-command-pill.danger {
    background: rgba(220,53,69,.12);
    color: #b02a37;
}

.mebcool-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    margin-top: .65rem;
}


/* MEBCool AI Command Bar UX refinement */
.mebcool-command-shell {
    position: relative;
    z-index: 25;
}

.mebcool-command-form {
    position: relative;
    z-index: 4;
    margin-bottom: 0 !important;
    transition: transform .28s ease, opacity .22s ease, margin .28s ease, box-shadow .28s ease;
}

.mebcool-command-panel {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + .35rem);
    transform-origin: top center;
    height: auto;
    max-height: min(620px, calc(100vh - 270px));
}

.mebcool-command-panel.active {
    pointer-events: none;
}

.mebcool-command-panel .mebcool-command-card {
    max-height: inherit;
    overflow: hidden;
}

.mebcool-command-panel .card-body {
    display: flex;
    flex-direction: column;
    max-height: inherit;
    min-height: 0;
}

.mebcool-command-start-content {
    min-height: 0;
    transition: opacity .2s ease, max-height .28s ease, transform .28s ease;
}

.mebcool-command-suggestions-scroll {
    max-height: min(300px, calc(100vh - 510px));
    min-height: 140px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .25rem;
    scrollbar-width: thin;
}

.mebcool-command-suggestions-scroll::-webkit-scrollbar,
.mebcool-command-messages::-webkit-scrollbar {
    width: 8px;
}

.mebcool-command-suggestions-scroll::-webkit-scrollbar-thumb,
.mebcool-command-messages::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), .28);
}

.mebcool-command-chat-footer {
    margin-top: .75rem;
}

.mebcool-command-has-chat {
    z-index: 24;
}

.mebcool-command-has-chat .mebcool-command-panel {
    position: static;
    top: auto;
    max-height: min(650px, calc(100vh - 250px));
    margin-top: .5rem;
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scaleY(1);
    pointer-events: auto;
}

.mebcool-command-has-chat .mebcool-command-start-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-.35rem);
    pointer-events: none;
}

.mebcool-command-has-chat .mebcool-command-messages {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    max-height: min(390px, calc(100vh - 430px));
    opacity: 1;
}

.mebcool-command-has-chat .mebcool-command-form-in-chat {
    animation: mebcoolComposerDock .28s ease-out;
}

.mebcool-command-has-chat .mebcool-command-form-in-chat .mebcool-command-input {
    box-shadow: 0 .55rem 1.55rem rgba(var(--bs-primary-rgb), .08);
}

@keyframes mebcoolComposerDock {
    from {
        opacity: .65;
        transform: translateY(-.65rem) scale(.992);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 991.98px) {
    .mebcool-command-panel {
        max-height: min(560px, calc(100vh - 230px));
    }

    .mebcool-command-suggestions-scroll {
        max-height: 240px;
    }
}

@media (max-width: 767.98px) {
    .page-search .mebcool-command-input {
        padding-right: 1rem !important;
    }

    .mebcool-command-messages {
        max-height: 260px;
    }

    .mebcool-command-bubble {
        max-width: 94%;
    }
}

/* MEBCool AI Command Bar focus mode */
body[data-page="index"] {
    min-height: 100vh;
    overflow-x: hidden;
}

html.mebcool-command-focus-mode,
body.mebcool-command-focus-mode {
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
}

body.mebcool-command-focus-mode::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1024;
    pointer-events: auto;
    background: rgba(var(--bs-body-bg-rgb), .72);
    backdrop-filter: blur(7px) saturate(1.05);
    -webkit-backdrop-filter: blur(7px) saturate(1.05);
}

body.mebcool-command-focus-mode .mebcool-command-shell {
    z-index: 1030;
}

body.mebcool-command-focus-mode .mebcool-command-form,
body.mebcool-command-focus-mode .mebcool-command-card {
    box-shadow: 0 1.35rem 3.5rem rgba(15, 23, 42, .16);
}

body.mebcool-command-focus-mode .mebcool-command-panel {
    pointer-events: auto;
}

body.mebcool-command-focus-mode .mebcool-command-panel,
body.mebcool-command-focus-mode .mebcool-command-panel .mebcool-command-card,
body.mebcool-command-focus-mode .mebcool-command-panel .card-body {
    overflow: hidden;
    overscroll-behavior: contain;
}

body.mebcool-command-focus-mode .mebcool-command-has-chat .mebcool-command-panel {
    max-height: min(680px, calc(100vh - 210px));
}

body.mebcool-command-focus-mode .mebcool-command-has-chat .mebcool-command-messages {
    max-height: min(430px, calc(100vh - 435px));
}

.mebcool-command-close {
    border-color: rgba(var(--bs-primary-rgb), .18);
    color: var(--bs-body-color);
    background: rgba(var(--bs-body-bg-rgb), .82);
}

.mebcool-command-close:hover,
.mebcool-command-close:focus-visible {
    color: var(--bs-primary);
    border-color: rgba(var(--bs-primary-rgb), .36);
    background: rgba(var(--bs-primary-rgb), .08);
}

@media (max-width: 991.98px) {
    body.mebcool-command-focus-mode .mebcool-command-has-chat .mebcool-command-panel {
        max-height: min(620px, calc(100vh - 190px));
    }

    body.mebcool-command-focus-mode .mebcool-command-has-chat .mebcool-command-messages {
        max-height: min(360px, calc(100vh - 400px));
    }
}

@media (max-width: 767.98px) {
    body.mebcool-command-focus-mode::before {
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }

    body.mebcool-command-focus-mode .mebcool-command-has-chat .mebcool-command-messages {
        max-height: min(330px, calc(100vh - 360px));
    }
}

/* MEBCool conversation history */
.mebcool-history-list {
    display: grid;
    gap: .5rem;
    min-height: 176px;
    max-height: min(220px, calc(100vh - 560px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: .25rem;
    scrollbar-width: thin;
}

.mebcool-history-list::-webkit-scrollbar {
    width: 8px;
}

.mebcool-history-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(var(--bs-primary-rgb), .24);
}

.mebcool-history-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: stretch;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 1rem;
    background: rgba(var(--bs-body-bg-rgb), .7);
    overflow: hidden;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.mebcool-history-item:hover,
.mebcool-history-item:focus-within,
.mebcool-history-item.active {
    border-color: rgba(var(--bs-primary-rgb), .28);
    background: rgba(var(--bs-primary-rgb), .055);
}

.mebcool-history-open {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    padding: .68rem 2.35rem .68rem .85rem;
    color: inherit;
}

.mebcool-history-title,
.mebcool-history-preview,
.mebcool-history-meta {
    display: block;
}

.mebcool-history-title {
    font-weight: 700;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mebcool-history-preview {
    color: var(--bs-secondary-color);
    font-size: .78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: .12rem;
}

.mebcool-history-meta {
    color: var(--bs-secondary-color);
    font-size: .72rem;
    margin-top: .25rem;
}

.mebcool-history-delete {
    position: absolute;
    top: .45rem;
    right: .45rem;
    width: 1.6rem;
    height: 1.6rem;
    border: 0;
    border-radius: 999px;
    color: var(--bs-secondary-color);
    background: rgba(0,0,0,.035);
    line-height: 1;
    transition: background .18s ease, color .18s ease;
}

.mebcool-history-delete:hover,
.mebcool-history-delete:focus-visible {
    color: #fff;
    background: rgba(220,53,69,.82);
}

/* MEBCool command confirmation popup */
.mebcool-command-confirm {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(var(--bs-body-bg-rgb), .68);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease;
}

.mebcool-command-confirm.active {
    opacity: 1;
    pointer-events: auto;
}

.mebcool-command-confirm-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .85rem;
    width: min(620px, 100%);
    padding: 1rem;
    border: 1px solid rgba(var(--bs-primary-rgb), .16);
    border-radius: 1.15rem;
    background: rgba(var(--bs-body-bg-rgb), .96);
    box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, .18);
    transform: translateY(.35rem) scale(.985);
    transition: transform .18s ease;
}

.mebcool-command-confirm.active .mebcool-command-confirm-card {
    transform: translateY(0) scale(1);
}

.mebcool-command-confirm-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: .65rem;
    color: #fff;
    font-weight: 700;
    font-size: .78rem;
    background: linear-gradient(135deg, var(--bs-primary), #579bff);
    box-shadow: 0 .75rem 1.4rem rgba(var(--bs-primary-rgb), .2);
}

.mebcool-command-confirm-actions {
    display: flex;
    gap: .45rem;
    justify-content: flex-end;
}

@media (max-width: 767.98px) {
    .mebcool-command-confirm-card {
        grid-template-columns: auto 1fr;
    }

    .mebcool-command-confirm-actions {
        grid-column: 1 / -1;
    }
}

.app-status-message.is-error {
    color: #b42318;
}

.app-status-message.is-neutral {
    color: #333;
}


/* Protected page shell: externalized for strict style-src-elem CSP. */
body.page-access-pending .page-breadcrumbs,
body.page-access-pending .content-wrapper,
body.page-access-pending #appMain,
body.page-access-pending main:not(.page-access-denied-shell) {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.page-access-pending::before {
  content: attr(data-page-access-message);
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: #f6f8fb;
  color: #4b5563;
  font: 600 15px/1.4 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
}

/* Strict-CSP global session and permission states. Kept in external CSS; app.js must not inject <style> elements. */
.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 1041;
    background: linear-gradient(90deg, #fff4d6 0%, #ffe9a8 100%);
    border-bottom: 1px solid #e7cb73;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.impersonation-banner .inner {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 10px 16px;
}
.impersonation-banner .title {
    font-weight: 700;
    color: #6f5600;
}
.impersonation-banner .meta {
    font-size: 13px;
    color: #6f5600;
    opacity: .95;
}
.impersonation-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #fff7db;
    border: 1px solid #e7cb73;
    color: #7a5b00;
    font-size: 12px;
    font-weight: 600;
}
.impersonation-sidebar-note {
    margin: 10px 0 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #fff8e1;
    border: 1px solid #e7cb73;
    color: #7a5b00;
    font-size: 12px;
}
.impersonation-restricted {
    opacity: .65;
    pointer-events: none;
}
[data-permission-denied="true"]:not([data-permission-behavior="disable"]) {
    display: none !important;
}
.permission-action-disabled {
    opacity: .55;
    cursor: not-allowed !important;
}
body.page-access-denied {
    min-height: 100vh;
    background: #f6f8fb;
}
body.page-access-denied > :not(.page-access-denied-shell):not(script):not(style) {
    display: none !important;
}
.page-access-denied-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.page-access-denied-card {
    width: min(100%, 520px);
    padding: 32px;
    border-radius: 24px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    box-shadow: 0 24px 70px rgba(15, 23, 42, .12);
    text-align: center;
}
.page-access-denied-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #fff3cd;
    color: #8a5b00;
    font-weight: 800;
    font-size: 28px;
}
.page-access-denied-card h1 {
    margin: 0 0 10px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
}
.page-access-denied-card p {
    color: #4b5563;
}
.page-access-denied-redirect {
    margin: 18px 0;
    font-size: .95rem;
}
.page-access-denied-countdown {
    display: inline-flex;
    min-width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-weight: 700;
}
.page-access-denied-audit {
    display: none !important;
}
