a.editable-click {
    color: black;
    border-bottom: none !important;
}
a.editable-click:hover {
    text-decoration: none important;
    border-bottom: dashed 1px #0088cc !important;
}
.editable-container .editable-buttons .btn {
    font-size: 14px;
    padding: 6px 12px;
    margin: 0 2px;
}
.editable {
    font-size: 18px;
    line-height: 26px;
}

.note-group-select-from-files {
    display: none;
}

hr  {
    margin-top: 10px;
    margin-bottom: 10px;
}

.js-user-filter-select + .select2-container {
    display: block;
    width: 100% !important;
}

.js-user-filter-select + .select2-container .select2-selection--single {
    height: calc(1.5em + 0.5rem + 2px) !important;
    min-height: calc(1.5em + 0.5rem + 2px) !important;
    padding: 0.25rem 2rem 0.25rem 0.75rem !important;
    background-color: #fff !important;
    border: 1px solid #d9dee3 !important;
    border-radius: 0.375rem !important;
    font-size: 0.875rem !important;
    line-height: 1.5 !important;
}

.js-user-filter-select + .select2-container .select2-selection__rendered {
    display: block !important;
    padding: 0 !important;
    color: #566a7f !important;
    line-height: 1.5 !important;
}

.js-user-filter-select + .select2-container .select2-selection__placeholder {
    color: #a8aaae !important;
}

.js-user-filter-select + .select2-container .select2-selection__arrow {
    top: 50% !important;
    right: 0.75rem !important;
    width: 0.75rem !important;
    height: 0.75rem !important;
    transform: translateY(-50%) !important;
}

.js-user-filter-select + .select2-container .select2-selection__arrow b {
    border-color: #6f6b7d transparent transparent transparent !important;
}

.select2-dropdown.user-filter-select2-dropdown {
    background-color: #fff !important;
    z-index: 9999 !important;
}

.dashboard-filter-row {
    --bs-gutter-y: 0.75rem;
}

.dashboard-filter-row .form-label {
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.dashboard-filter-row .form-select,
.dashboard-filter-row .form-control,
.dashboard-filter-row .select2-container {
    width: 100% !important;
}

.dashboard-filter-row.is-loading {
    opacity: 0.65;
}

.dashboard-data-shell {
    position: relative;
}

.dashboard-data-shell.is-loading::before {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: block;
    content: "";
    background: #fff;
    border-radius: 0.375rem;
}

.dashboard-data-shell.is-loading .dashboard-data-content {
    opacity: 0;
}

.dashboard-loading-feedback {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 9;
    width: 100%;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

.dashboard-loading-feedback.is-loading {
    display: block;
}

.dashboard-skeleton-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1.2rem;
}

.dashboard-skeleton-card {
    min-height: 168px;
    padding: 1.2rem;
    background: #fff;
    border: 1px solid #edf1f6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.04);
}

.dashboard-skeleton-card--small {
    grid-column: span 3;
}

.dashboard-skeleton-card--wide,
.dashboard-skeleton-card--table {
    grid-column: span 6;
    min-height: 260px;
}

.dashboard-skeleton-line,
.dashboard-skeleton-chart,
.dashboard-skeleton-row {
    display: block;
    overflow: hidden;
    background: #eef2f7;
    border-radius: 0.35rem;
    position: relative;
}

.dashboard-skeleton-line::after,
.dashboard-skeleton-chart::after,
.dashboard-skeleton-row::after {
    position: absolute;
    inset: 0;
    content: "";
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
    animation: dashboard-skeleton-shimmer 1.2s infinite;
}

.dashboard-skeleton-line {
    height: 0.8rem;
    margin-bottom: 0.85rem;
}

.dashboard-skeleton-line--sm {
    width: 44%;
}

.dashboard-skeleton-line--md {
    width: 58%;
}

.dashboard-skeleton-line--lg {
    width: 72%;
    height: 1.55rem;
}

.dashboard-skeleton-chart {
    height: 64px;
    margin-top: 1.15rem;
}

.dashboard-skeleton-chart--tall {
    height: 170px;
}

.dashboard-skeleton-row {
    height: 2.3rem;
    margin-top: 0.85rem;
}

@keyframes dashboard-skeleton-shimmer {
    100% {
        transform: translateX(100%);
    }
}

@media (max-width: 767.98px) {
    .dashboard-filter-row {
        --bs-gutter-x: 0.75rem;
        align-items: flex-start !important;
    }

    .dashboard-filter-row > .dashboard-filter-field {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .dashboard-filter-row > .dashboard-date-range-field {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .dashboard-filter-row .form-label {
        display: block;
        min-height: 1.1rem;
        font-size: 0.8125rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .dashboard-filter-row .form-select,
    .dashboard-filter-row .form-control,
    .dashboard-filter-row .js-user-filter-select + .select2-container .select2-selection--single {
        min-height: 38px !important;
        font-size: 0.875rem !important;
    }
}

@media (max-width: 991.98px) {
    .dashboard-skeleton-card--small {
        grid-column: span 6;
    }

    .dashboard-skeleton-card--wide,
    .dashboard-skeleton-card--table {
        grid-column: span 12;
    }
}

@media (max-width: 575.98px) {
    .dashboard-skeleton-grid {
        gap: 0.85rem;
    }

    .dashboard-skeleton-card {
        grid-column: span 12;
        min-height: 140px;
        padding: 1rem;
    }
}

@media (max-width: 359.98px) {
    .dashboard-filter-row > .dashboard-filter-field,
    .dashboard-filter-row > .dashboard-date-range-field {
        flex-basis: 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* --------------------------------------------------------------------------
   Keep Select2's hidden original <select> out of the layout.

   Select2 leaves the real <select> in the DOM for accessibility, shrunk to 1px
   and positioned absolutely. Rules like

       .dashboard-filter-row .form-select { width: 100% !important; }

   outrank Select2's own (0,2,0 beats 0,1,0) and blow that hidden element back
   up to full width. Because it is absolutely positioned and #app-layout is not
   positioned, overflow:hidden cannot clip it - so it sticks ~200px past the
   right edge and the page scrolls sideways on phones. That also pushes
   position:fixed elements (the chat launcher) off-screen, since mobile browsers
   widen the layout viewport to fit the overflow.

   The compound selectors below outrank those container rules and restore
   Select2's intent wherever it is used.
   -------------------------------------------------------------------------- */
select.select2-hidden-accessible,
.dashboard-filter-row select.select2-hidden-accessible {
    position: absolute !important;
    width: 1px !important;
    max-width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    border: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

/* --------------------------------------------------------------------------
   Page container normalization (all admin/manager/sale/operation pages)

   Pages were mixing `.container` (1140px), `.container-xxl` (1320px) and no
   container at all inside `.content-page`. Because `.content-page` is offset
   by the 260px sidebar, a fixed-width centered container leaves a lopsided
   gap that jumps every time the sidebar is toggled, and the topbar (which
   uses `.container-xxl`) never lines up with the content below it.

   One gutter, defined here, is applied by the page shell itself; every
   container inside it becomes fluid so content always starts and ends on the
   same vertical line as the topbar, in both sidebar states.
   -------------------------------------------------------------------------- */
:root {
    /* Horizontal gutter for the page shell; scaled per breakpoint below. */
    --app-gutter: 2rem;
    /* Extra vertical breathing room above the first element on a page. */
    --app-gutter-y: 0.75rem;
}

.content-page {
    padding-top: var(--app-gutter-y);
    padding-right: var(--app-gutter);
    padding-bottom: 65px;
    padding-left: var(--app-gutter);
    max-width: 100%;
}

.topbar-custom {
    padding-right: var(--app-gutter);
    padding-left: var(--app-gutter);
}

.content-page .container,
.content-page .container-sm,
.content-page .container-md,
.content-page .container-lg,
.content-page .container-xl,
.content-page .container-xxl,
.content-page .container-fluid,
.topbar-custom .container,
.topbar-custom .container-xxl,
.topbar-custom .container-fluid {
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

/* The topbar's own gutter already provides the left offset. */
.topbar-custom .topnav-menu > li:first-child .nav-link {
    padding-left: 0;
}

/* Wide data tables scroll inside their card instead of stretching the page. */
.content-page .table-responsive {
    width: 100%;
}

/* --------------------------------------------------------------------------
   Responsive gutter scale

   One token drives the page shell's horizontal gutters and a second drives its
   vertical rhythm, so every page breathes the same amount at a given viewport
   and the topbar stays aligned with the content beneath it. Values step down
   on the Bootstrap 5 breakpoints the rest of the app already uses.
   -------------------------------------------------------------------------- */

/* Ultra-wide (>= 1920px): more air so full-bleed content is not edge-to-edge */
@media (min-width: 1920px) {
    :root {
        --app-gutter: 2.5rem;
        --app-gutter-y: 1rem;
    }
}

/* Large desktop (1200px - 1399.98px) */
@media (max-width: 1399.98px) {
    :root {
        --app-gutter: 1.75rem;
        --app-gutter-y: 0.75rem;
    }
}

/* Small desktop / large tablet (992px - 1199.98px) */
@media (max-width: 1199.98px) {
    :root {
        --app-gutter: 1.5rem;
        --app-gutter-y: 0.75rem;
    }
}

/* Tablet (768px - 991.98px) - sidebar is off-canvas from here down */
@media (max-width: 991.98px) {
    :root {
        --app-gutter: 1.25rem;
        --app-gutter-y: 0.5rem;
    }

    /* app.min.css sets `padding: 0 10px` with a !important margin here */
    .content-page {
        padding-right: var(--app-gutter) !important;
        padding-left: var(--app-gutter) !important;
    }
}

/* Landscape phone (576px - 767.98px) */
@media (max-width: 767.98px) {
    :root {
        --app-gutter: 1rem;
        --app-gutter-y: 0.5rem;
    }
}

/* Phone (< 576px) */
@media (max-width: 575.98px) {
    :root {
        --app-gutter: 0.875rem;
        --app-gutter-y: 0.25rem;
    }
}

/* Range slider with a highlighted (filled) track - used by the advance % control */
/* The fill is painted on the input itself so it also renders on mobile
   browsers that ignore custom properties inside track pseudo-elements. */
.range-highlight {
    --range-fill: 0%;
    background-image: linear-gradient(
        to right,
        var(--bs-primary, #537aef) 0 var(--range-fill),
        #ced4da var(--range-fill) 100%
    );
    background-repeat: no-repeat;
    background-position: center;
    background-size: 100% 0.5rem;
    border-radius: 1rem;
}

.range-highlight::-webkit-slider-runnable-track {
    background-color: transparent;
}

.range-highlight::-moz-range-track {
    background-color: transparent;
}

/* Set Price / Amend Package: modal-xl only widens from 1200px, which leaves
   the pricing tables squeezed into 500px on a tablet - use the full width. */
@media (max-width: 1199.98px) {
    .modal-dialog.modal-pricing {
        max-width: none;
        margin: 0.75rem;
    }
}

/* Quote card opened from a price request notification. */
.quote-card > div {
    border-radius: 0.375rem;
    transition: box-shadow 0.4s ease;
}

.quote-card.quote-card-highlight > div {
    box-shadow: 0 0 0 3px var(--bs-warning);
}

/* --------------------------------------------------------------------------
   Icons-only sidebar (body[data-sidebar=condensed], desktop only)

   Toggled from the topbar menu button and remembered in localStorage (see
   app.js). Labels and submenus appear as a flyout when an icon is hovered.
   -------------------------------------------------------------------------- */
:root {
    --sidebar-condensed-width: 70px;
    --sidebar-flyout-width: 200px;
}

body[data-sidebar=condensed] .app-sidebar-menu,
body[data-sidebar=condensed] .logo-box {
    width: var(--sidebar-condensed-width);
}

body[data-sidebar=condensed] .app-sidebar-menu {
    z-index: 1001 !important;
}

body[data-sidebar=condensed] .topbar-custom,
body[data-sidebar=condensed] .footer {
    left: var(--sidebar-condensed-width);
}

body[data-sidebar=condensed] .content-page {
    margin-left: var(--sidebar-condensed-width);
}

/* Small logo: crop to the left of the wordmark, where the brand mark sits. */
body[data-sidebar=condensed] .logo-box {
    padding: 0;
    text-align: center;
}

body[data-sidebar=condensed] .logo-box .logo span.logo-lg {
    display: none;
}

body[data-sidebar=condensed] .logo-box .logo span.logo-sm {
    display: block;
}

/* At 36px tall a wordmark's brand mark is ~43px wide (it is the left ~22%
   of the 300x55 logo), so keep a 44px window over the left edge. */
body[data-sidebar=condensed] .logo-box .logo span.logo-sm img {
    width: 44px;
    height: 36px;
    object-fit: cover;
    object-position: left center;
}

/* Flyouts must escape the scroll container. */
body[data-sidebar=condensed] .app-sidebar-menu .simplebar-wrapper,
body[data-sidebar=condensed] .app-sidebar-menu .simplebar-mask,
body[data-sidebar=condensed] .app-sidebar-menu .simplebar-offset,
body[data-sidebar=condensed] .app-sidebar-menu .simplebar-content-wrapper {
    overflow: visible !important;
}

body[data-sidebar=condensed] .app-sidebar-menu .simplebar-track {
    display: none;
}

body[data-sidebar=condensed] #sidebar-menu {
    padding: 0;
}

body[data-sidebar=condensed] #side-menu .menu-title {
    display: none;
}

body[data-sidebar=condensed] #side-menu > li {
    position: relative;
}

body[data-sidebar=condensed] #side-menu > li > a {
    padding: 12px 0 12px 23px;
    white-space: nowrap;
}

body[data-sidebar=condensed] #side-menu > li > a svg {
    width: 18px;
    height: 18px;
    margin: 0 20px 0 3px;
}

body[data-sidebar=condensed] #side-menu > li > a > span,
body[data-sidebar=condensed] #side-menu > li > a > .badge {
    display: none;
}

/* Hovered item widens to show its label... */
body[data-sidebar=condensed] #side-menu > li:hover > a {
    width: calc(var(--sidebar-condensed-width) + var(--sidebar-flyout-width));
    background-color: #fff;
    color: #537aef;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .12);
    border-radius: 0 .475rem .475rem 0;
}

body[data-sidebar=condensed] #side-menu > li:hover > a > span:not(.menu-arrow),
body[data-sidebar=condensed] #side-menu > li:hover > a > .badge {
    display: inline-block;
}

/* ...and its submenu drops down beside the icon column. */
body[data-sidebar=condensed] #side-menu > li > .collapse,
body[data-sidebar=condensed] #side-menu > li > .collapsing {
    display: none !important;
    height: auto !important;
}

body[data-sidebar=condensed] #side-menu > li:hover > .collapse {
    display: block !important;
    position: absolute;
    top: 100%;
    left: var(--sidebar-condensed-width);
    width: var(--sidebar-flyout-width);
    background-color: #fff;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .12);
    border-radius: 0 0 .475rem .475rem;
}

body[data-sidebar=condensed] #side-menu > li:hover > .collapse .nav-second-level {
    padding: 6px;
    margin: 0;
}

body[data-menu-color=dark][data-sidebar=condensed] #side-menu > li:hover > a,
body[data-menu-color=dark][data-sidebar=condensed] #side-menu > li:hover > .collapse {
    background-color: #001b2f;
}

/* --------------------------------------------------------------------------
   Topbar live search results (dropdown under the search box)
   -------------------------------------------------------------------------- */
.topbar-search-results {
    position: absolute;
    z-index: 1010;
    top: calc(100% + 6px);
    left: 0;
    width: 420px;
    max-width: calc(100vw - 2rem);
    max-height: min(480px, calc(100vh - 90px));
    overflow-y: auto;
    padding: .375rem;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .625rem;
    box-shadow: 0 .75rem 2rem rgba(15, 23, 42, .14);
    line-height: 1.4;
    text-align: left;
}

.topbar-search-results[hidden] {
    display: none;
}

.topbar-search-section + .topbar-search-section {
    margin-top: .25rem;
    padding-top: .25rem;
    border-top: 1px solid rgba(15, 23, 42, .06);
}

.topbar-search-heading {
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .625rem .25rem;
    color: #64748b;
    font-size: .6875rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.topbar-search-count {
    padding: 0 .375rem;
    border-radius: 999px;
    background-color: #f1f5f9;
    color: #475569;
    letter-spacing: 0;
}

.topbar-search-results .topbar-search-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .625rem;
    border-radius: .475rem;
    color: #1e293b;
    text-decoration: none;
}

.topbar-search-results .topbar-search-item:hover,
.topbar-search-results .topbar-search-item.active {
    background-color: rgba(83, 122, 239, .08);
    color: #537aef;
}

.topbar-search-item-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.topbar-search-item-title,
.topbar-search-item-meta {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.topbar-search-item-title {
    font-weight: 500;
}

.topbar-search-item-meta {
    color: #64748b;
    font-size: .8125rem;
}

.topbar-search-item-aside {
    flex: 0 0 auto;
    color: #334155;
    font-size: .8125rem;
    font-weight: 600;
}

.topbar-search-results .topbar-search-all {
    justify-content: center;
    margin-top: .25rem;
    border-top: 1px solid rgba(15, 23, 42, .06);
    border-radius: 0 0 .475rem .475rem;
    color: #537aef;
    font-size: .8125rem;
    font-weight: 500;
}

.topbar-search-empty {
    padding: .875rem .625rem;
    color: #64748b;
    font-size: .875rem;
    text-align: center;
}

/* --------------------------------------------------------------------------
   Topbar - app-style header on phones and tablets (< 992px)

   A compact 56px bar: menu button and brand on the left, round icon buttons
   on the right, avatar without the name. Search folds into an icon that
   opens a full-width bar over the header (see admin-top-bar.blade.php).
   -------------------------------------------------------------------------- */
.topbar-brand,
.topbar-search-close {
    display: none;
}

@media (max-width: 991.98px) {
    :root {
        --topbar-height: 56px;
    }

    .topbar-custom {
        height: var(--topbar-height);
        padding-right: .5rem;
        padding-left: .5rem;
        border-bottom: 1px solid rgba(15, 23, 42, .06);
        box-shadow: 0 2px 10px rgba(15, 23, 42, .05);
    }

    .content-page {
        margin-top: var(--topbar-height);
    }

    .app-sidebar-menu {
        padding-top: var(--topbar-height);
    }

    .topbar-custom > .container-xxl,
    .topbar-custom > .container-xxl > .d-flex {
        height: 100%;
        align-items: center;
    }

    .topbar-custom .topnav-menu-left {
        flex: 1 1 auto;
        min-width: 0;
    }

    .topbar-custom .topnav-menu > li {
        display: flex;
        align-items: center;
    }

    /* Round 40px tap targets for every icon in the bar. */
    .topbar-custom .topnav-menu .nav-link,
    .topbar-custom .topnav-menu > li:first-child .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        margin: 0 1px;
        line-height: 1;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #334155;
        transition: background-color .15s ease;
    }

    .topbar-custom .topnav-menu .nav-link:active,
    .topbar-custom .topnav-menu .nav-link[aria-expanded=true] {
        background-color: rgba(83, 122, 239, .1);
        color: #537aef;
    }

    .topbar-custom .noti-icon {
        width: 21px;
        height: 21px;
    }

    .topbar-custom .notification-list .noti-icon-badge {
        top: 3px;
        right: 1px;
        min-width: 17px;
        height: 17px;
        padding: 0 4px;
        border: 2px solid #fff;
        border-radius: 999px !important;
        font-size: 9px;
        line-height: 13px;
    }

    /* Brand takes the free space and shrinks before any icon does. */
    .topbar-custom .topbar-brand {
        display: flex;
        flex: 1 1 auto;
        min-width: 0;
        margin-left: 4px;
    }

    .topbar-custom .topbar-brand a {
        display: flex;
        min-width: 0;
    }

    .topbar-custom .topbar-brand img {
        height: 26px;
        max-width: 100%;
        object-fit: contain;
        object-position: left center;
    }

    /* Avatar only, with a soft ring. */
    .topbar-custom .nav-user {
        padding: 0 !important;
        margin-left: 4px !important;
    }

    .topbar-custom .nav-user .pro-user-name {
        display: none;
    }

    .topbar-custom .nav-user img {
        width: 32px;
        height: 32px;
        object-fit: cover;
        box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px rgba(83, 122, 239, .35);
    }

    /* Search: hidden until opened, then covers the whole bar. */
    .topbar-custom .topbar-search {
        display: none;
    }

    .topbar-custom.search-open .topbar-search {
        position: fixed !important;
        z-index: 1;
        top: 0;
        right: 0;
        left: 0;
        display: flex;
        align-items: center;
        gap: .25rem;
        height: var(--topbar-height);
        padding: 0 .75rem 0 .25rem;
        background-color: #fff;
    }

    .topbar-custom .topbar-search .topbar-search-close {
        display: flex;
        flex: 0 0 auto;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #334155;
        font-size: 1.375rem;
    }

    .topbar-custom .topbar-search form {
        flex: 1 1 auto;
    }

    .topbar-custom .topbar-search input {
        height: 40px;
        padding-left: 1rem !important;
        border-radius: 999px;
        font-size: 1rem; /* 16px stops iOS zooming in on focus */
    }

    .topbar-custom .topbar-search > .mdi-magnify {
        display: none;
    }

    /* Results fill the screen under the open search bar, like an app. */
    .topbar-custom .topbar-search .topbar-search-results {
        position: fixed;
        top: var(--topbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        width: auto;
        max-width: none;
        max-height: none;
        padding: .5rem;
        border: 0;
        border-top: 1px solid rgba(15, 23, 42, .06);
        border-radius: 0;
        box-shadow: none;
    }

    .topbar-custom .topbar-search .topbar-search-item {
        padding: .75rem;
    }
}

/* OneSignal's subscription bell, restyled to match the app. OneSignal paints
   its dashboard colours inline on the SVG, hence the !important fills. */
#onesignal-bell-container .onesignal-bell-launcher-button {
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(15, 23, 42, .22);
    transition: transform .15s ease;
}

#onesignal-bell-container .onesignal-bell-launcher-button:hover {
    transform: scale(1.06);
}

#onesignal-bell-container .onesignal-bell-launcher-button svg .background {
    fill: #537aef !important;
}

#onesignal-bell-container .onesignal-bell-launcher-button svg .foreground {
    fill: #fff !important;
}

#onesignal-bell-container .onesignal-bell-launcher-button svg .stroke {
    stroke: transparent !important;
}

#onesignal-bell-container .onesignal-bell-launcher-button .pulse-ring {
    border-color: #537aef !important;
}

#onesignal-bell-container .onesignal-bell-launcher-badge {
    background: #ef4444 !important;
    border: 2px solid #fff !important;
    color: #fff !important;
    font-family: inherit;
    font-weight: 600;
}

#onesignal-bell-container .onesignal-bell-launcher-message,
#onesignal-bell-container .onesignal-bell-launcher-dialog {
    border-radius: 12px !important;
    font-family: inherit !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .16) !important;
}

#onesignal-bell-container .onesignal-bell-launcher-message {
    background: #1e293b !important;
}

#onesignal-bell-container .onesignal-bell-launcher-message-body {
    color: #fff !important;
    font-size: 13px !important;
}

#onesignal-bell-container .onesignal-bell-launcher-dialog {
    border: 1px solid rgba(15, 23, 42, .07) !important;
    background: #fff !important;
}

#onesignal-bell-container .onesignal-bell-launcher-dialog h1 {
    color: #0f172a !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

#onesignal-bell-container .onesignal-bell-launcher-dialog button.action {
    border: 0 !important;
    border-radius: 8px !important;
    background: #537aef !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-weight: 600 !important;
}

#onesignal-bell-container .onesignal-bell-launcher-dialog button.action:hover {
    background: #3f66dc !important;
}

/* Only shown until this browser subscribes (see dashboard/index.blade.php). */
body.push-subscribed #onesignal-bell-container {
    display: none !important;
}

/* Fixed to a bottom corner, which on phones is over the Home or Menu tab;
   lift it to sit just above the bottom tab bar. */
@media (max-width: 991.98px) {
    #onesignal-bell-container.onesignal-bell-container-bottom-right,
    #onesignal-bell-container.onesignal-bell-container-bottom-left {
        bottom: calc(var(--bottom-nav-height, 62px) + env(safe-area-inset-bottom)) !important;
    }
}

/* --------------------------------------------------------------------------
   Bottom tab bar + sidebar drawer - phones and tablets (< 992px)

   See partials/mobile-bottom-nav.blade.php. The sidebar becomes a drawer
   between the topbar and the tab bar, over a tap-to-close backdrop. The
   floating chat launcher is hidden; the topbar's chat icon opens Team Chat.
   -------------------------------------------------------------------------- */
.bottom-nav,
.sidebar-backdrop {
    display: none;
}

@media (max-width: 991.98px) {
    :root {
        --bottom-nav-height: 62px;
    }

    body {
        padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 12px);
    }

    .bottom-nav {
        position: fixed;
        z-index: 1030;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: stretch;
        height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
        padding: 0 4px env(safe-area-inset-bottom);
        background-color: #fff;
        border-top: 1px solid rgba(15, 23, 42, .07);
        box-shadow: 0 -4px 18px rgba(15, 23, 42, .06);
    }

    .bottom-nav-item {
        display: flex;
        flex: 1 1 0;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        padding: 0;
        border: 0;
        background: none;
        color: #64748b;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .01em;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
    }

    .bottom-nav-item:hover,
    .bottom-nav-item:focus {
        color: #64748b;
    }

    .bottom-nav-icon {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 54px;
        height: 30px;
        border-radius: 999px;
        transition: background-color .2s ease, color .2s ease;
    }

    .bottom-nav-icon .mdi {
        font-size: 23px;
        line-height: 1;
    }

    .bottom-nav-item.active,
    .bottom-nav-item.active:hover,
    .bottom-nav-item.active:focus {
        color: #537aef;
    }

    .bottom-nav-item.active .bottom-nav-icon {
        background-color: rgba(83, 122, 239, .12);
    }


    .bottom-nav-item:active .bottom-nav-icon {
        background-color: rgba(83, 122, 239, .18);
    }

    .bottom-nav-label {
        max-width: 100%;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    .bottom-nav-badge {
        position: absolute;
        top: -3px;
        right: 9px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        border: 2px solid #fff;
        border-radius: 999px;
        background-color: #ea0038;
        color: #fff;
        font-size: 9px;
        font-weight: 700;
        line-height: 14px;
        text-align: center;
    }

    /* The keyboard is up while searching, so the bar steps aside. */
    .topbar-custom.search-open ~ .bottom-nav {
        display: none;
    }

    /* The Chat tab replaces the floating launcher. */
    .chat-fab {
        display: none !important;
    }

    /* Sidebar drawer between the topbar and the tab bar. */
    .app-sidebar-menu {
        top: var(--topbar-height);
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
        padding-top: 0;
        z-index: 1020 !important;
    }

    body[data-sidebar=default] .app-sidebar-menu {
        box-shadow: 8px 0 24px rgba(15, 23, 42, .14);
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 1015;
        top: var(--topbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        background-color: rgba(15, 23, 42, .35);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }

    body[data-sidebar=default] .sidebar-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}

/* Tablets: the chat panel floats (it is full-screen only below 768px), so
   lift it clear of the tab bar. */
@media (min-width: 768px) and (max-width: 991.98px) {
    body .chat-widget {
        bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 12px);
        height: min(540px, calc(100dvh - var(--topbar-height) - var(--bottom-nav-height) - 36px));
    }
}

/* Chat page on phones and tablets: the conversation fills the space between
   the topbar and the tab bar exactly, so the composer sits just above the
   bar and the page itself never scrolls. */
@media (max-width: 991.98px) {
    .content-page.chat-page {
        padding-top: .5rem;
        padding-bottom: 0;
    }

    .chat-page > nav[aria-label="breadcrumb"] {
        display: none;
    }

    /* 20px = the page's top padding (8px) + the gap above the tab bar (12px). */
    .chat-page .chat-shell {
        height: calc(100vh - var(--topbar-height) - var(--bottom-nav-height) - env(safe-area-inset-bottom) - 20px);
        height: calc(100dvh - var(--topbar-height) - var(--bottom-nav-height) - env(safe-area-inset-bottom) - 20px);
        min-height: 0;
    }
}

/* --------------------------------------------------------------------------
   Page changes on phones and tablets: cross-document view transitions

   A plain page load blanks the screen and repaints the header and tab bar
   from scratch, which reads as a snap. With view transitions the old page
   stays up until the new one is ready; the header and tab bar are pinned
   (named, no movement) and only the content fades across, like an app.
   Browsers without support simply load pages as before.
   -------------------------------------------------------------------------- */
@media (max-width: 991.98px) and (prefers-reduced-motion: no-preference) {
    @view-transition {
        navigation: auto;
    }

    .topbar-custom {
        view-transition-name: app-topbar;
    }

    .bottom-nav {
        view-transition-name: app-bottom-nav;
    }

    ::view-transition-group(app-topbar),
    ::view-transition-group(app-bottom-nav) {
        animation: none;
    }

    ::view-transition-old(app-topbar),
    ::view-transition-new(app-topbar),
    ::view-transition-old(app-bottom-nav),
    ::view-transition-new(app-bottom-nav) {
        animation-duration: 120ms;
    }

    ::view-transition-old(root) {
        animation: 120ms ease-out both app-page-out;
    }

    ::view-transition-new(root) {
        animation: 200ms ease-out both app-page-in;
    }
}

@keyframes app-page-out {
    to {
        opacity: 0;
    }
}

@keyframes app-page-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

/* --------------------------------------------------------------------------
   Loading states: skeleton shimmer, page-change progress bar and skeleton

   .sk is the shared shimmer block (also used by the live search dropdown
   and Load more). The progress bar and page skeleton are phones/tablets
   only - see partials/page-loader.blade.php.
   -------------------------------------------------------------------------- */
.sk {
    border-radius: 8px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%);
    background-size: 400% 100%;
    animation: sk-shimmer 1.3s ease-in-out infinite;
}

.sk-line {
    height: 10px;
}

.sk-line.sk-lg {
    height: 14px;
}

.sk-w-40 {
    width: 40%;
}

.sk-w-60 {
    width: 60%;
}

.sk-w-80 {
    width: 80%;
}

.sk-avatar {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
}

@keyframes sk-shimmer {
    from {
        background-position: 100% 50%;
    }

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

.page-progress,
.page-skeleton {
    display: none;
}

@media (max-width: 991.98px) {
    /* Thin bar under the topbar: rushes to 70%, then creeps until the
       next page replaces this one. */
    .page-progress {
        position: fixed;
        z-index: 1031;
        top: var(--topbar-height);
        left: 0;
        display: block;
        width: 0;
        height: 3px;
        border-radius: 0 3px 3px 0;
        background: linear-gradient(90deg, #537aef, #8b5cf6);
        box-shadow: 0 0 8px rgba(83, 122, 239, .5);
        opacity: 0;
        pointer-events: none;
    }

    body.is-navigating .page-progress {
        opacity: 1;
        animation: page-progress-run 1.2s cubic-bezier(.1, .7, .3, 1) forwards,
            page-progress-creep 10s 1.2s linear forwards;
    }

    /* Placeholder page between the topbar and the tab bar. */
    .page-skeleton {
        position: fixed;
        z-index: 1012;
        top: var(--topbar-height);
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        overflow: hidden;
        padding: 16px var(--app-gutter) calc(var(--bottom-nav-height) + env(safe-area-inset-bottom) + 12px);
        background-color: #eaeef7;
        opacity: 0;
        visibility: hidden;
        transition: opacity .15s ease, visibility 0s .15s;
    }

    body.is-navigating-slow .page-skeleton {
        opacity: 1;
        visibility: visible;
        transition: opacity .15s ease;
    }

    .page-skeleton .sk-title {
        width: 45%;
        height: 24px;
        margin-bottom: 14px;
    }

    .page-skeleton .sk-bar {
        height: 42px;
        margin-bottom: 16px;
        border-radius: 12px;
    }

    .page-skeleton .sk-tiles {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-bottom: 16px;
    }

    .page-skeleton .sk-tile,
    .page-skeleton .sk-card {
        border: 1px solid #edf1f6;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    }

    .page-skeleton .sk-tile {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 14px;
    }

    .page-skeleton .sk-card {
        margin-bottom: 10px;
        padding: 14px;
        border-radius: 16px;
    }

    .page-skeleton .sk-card-head {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .page-skeleton .sk-card-lines {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        gap: 8px;
    }

    .page-skeleton .sk-card-foot {
        display: flex;
        gap: 10px;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid #f1f5f9;
    }

    .page-skeleton .sk-card-foot .sk {
        flex: 1 1 0;
    }
}

@keyframes page-progress-run {
    from {
        width: 0;
    }

    to {
        width: 70%;
    }
}

@keyframes page-progress-creep {
    from {
        width: 70%;
    }

    to {
        width: 92%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sk {
        animation: none;
    }
}

/* Live search: placeholder rows while results load. */
.topbar-search-skeleton .topbar-search-item {
    pointer-events: none;
}

.topbar-search-skeleton .topbar-search-item-body {
    gap: 7px;
}

/* Load more: placeholder cards while the next page loads. */
.crm-load-more-skeleton {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 10px;
}

.crm-load-more-skeleton .sk-card {
    padding: 14px;
    border: 1px solid #edf1f6;
    border-radius: 16px;
    background: #fff;
}

.crm-load-more-skeleton .sk-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-load-more-skeleton .sk-card-lines {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 8px;
}

.topbar-search-skeleton .sk,
.crm-load-more-skeleton .sk {
    display: block;
}

/* Toasts (showToast in main.js) sit at the top right just below the fixed
   top bar: 70px on larger screens, --topbar-height on phones */
.swal2-container.swal-below-header {
    padding-top: calc(var(--topbar-height, 70px) + 10px) !important;
}
