.rounded-span {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    border-radius: 50%;
    background-color: #007bff;
    color: #ffffff;
    font-weight: bold;
}

.link-disabled {
    color: grey;
    cursor: not-allowed;
}

.grid-row {
    cursor: pointer;
}

/* Above Bootstrap .modal-backdrop (1050) and .modal (1055) so busy indicator shows while a modal is open */
.loading {
    position: fixed;
    display: none;
    z-index: 2000;
    height: 2em;
    width: 2em;
    overflow: visible;
    margin: auto;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

/* Transparent Overlay */
.loading:before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
}

/* :not(:required) hides these rules from IE9 and below */
.loading:not(:required) {
    font-size: 0;
    line-height: 0;
    font-family: inherit;
    color: transparent;
    text-shadow: none;
    background-color: transparent;
    border: 0;
}

.loading:not(:required):after {
    content: '';
    display: block;
    font-size: 10px;
    width: 1em;
    height: 1em;
    margin-top: -0.5em;
    -webkit-animation: spinner 1500ms infinite linear;
    -moz-animation: spinner 1500ms infinite linear;
    -ms-animation: spinner 1500ms infinite linear;
    -o-animation: spinner 1500ms infinite linear;
    animation: spinner 1500ms infinite linear;
    border-radius: 0.5em;
    -webkit-box-shadow: var(--bs-body-color) 1.5em 0 0 0, var(--bs-body-color) 1.1em 1.1em 0 0,  var(--bs-body-color) 0 1.5em 0 0,  var(--bs-body-color) -1.1em 1.1em 0 0,  var(--bs-body-color) -1.5em 0 0 0,  var(--bs-body-color) -1.1em -1.1em 0 0,  var(--bs-body-color) 0 -1.5em 0 0,  var(--bs-body-color) 1.1em -1.1em 0 0;
    box-shadow: var(--bs-body-color) 1.5em 0 0 0, var(--bs-body-color) 1.1em 1.1em 0 0,  var(--bs-body-color) 0 1.5em 0 0,  var(--bs-body-color) -1.1em 1.1em 0 0,  var(--bs-body-color) -1.5em 0 0 0,  var(--bs-body-color) -1.1em -1.1em 0 0,  var(--bs-body-color) 0 -1.5em 0 0,  var(--bs-body-color) 1.1em -1.1em 0 0;
}

/* Animation */
@-webkit-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@-moz-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@-o-keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}
@keyframes spinner {
    0% {
        -webkit-transform: rotate(0deg);
        -moz-transform: rotate(0deg);
        -ms-transform: rotate(0deg);
        -o-transform: rotate(0deg);
        transform: rotate(0deg);
    }
    100% {
        -webkit-transform: rotate(360deg);
        -moz-transform: rotate(360deg);
        -ms-transform: rotate(360deg);
        -o-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

.scroll-container{
    display: flex;
    column-gap: 20px;
}
.scrollbar{
    height: 35rem;
    overflow: auto;
    padding: 0 10px;
}

#scrollbar::-webkit-scrollbar-track{
    border-radius: 8px;
    background-color: #e7e7e7;
    border: 1px solid #cacaca;
    box-shadow: inset 0 0 6px rgba(0,0,0,.3);
}
#scrollbar::-webkit-scrollbar-thumb{
    border-radius: 8px;
    background-color: #363636;
}
.icon-align{
    text-align: center;
}
.grid-extsort-column{
    background-color: var(--bs-body-bg);
}
.grid-group-row{
    background-color: var(--bs-body-bg);
}

.custom-dropdown {
    display: inline-block;
    width: 100%;
}

.custom-dropdown .btn {
    width: 100%;
    text-align: left;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
}

.custom-dropdown .dropdown-menu {
    width: 100%;
}
.custom-dropdown .dropdown-menu li a.selected {
    background-color: #007bff;
    color: #fff;
}

/* ===================================================================
   Global dropdown menu style (Dimension / Sort / list dropdowns)
   Dark theme: header, separators between items, consistent padding
   =================================================================== */
.dropdown-menu {
    --bs-dropdown-bg: #2a2d37;
    --bs-dropdown-color: rgba(255, 254, 255, 0.85);
    --bs-dropdown-border-color: #3b3f48;
    --bs-dropdown-link-color: rgba(255, 254, 255, 0.85);
    --bs-dropdown-link-hover-bg: rgba(255, 255, 255, 0.08);
    --bs-dropdown-link-hover-color: #fffeff;
    --bs-dropdown-header-color: #fffeff;
    --bs-dropdown-divider-bg: rgba(255, 255, 255, 0.12);
    background-color: var(--bs-dropdown-bg);
    color: var(--bs-dropdown-color);
    border: 1px solid var(--bs-dropdown-border-color);
    border-radius: 4px;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.dropdown-menu .dropdown-header {
    padding: 10px 12px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-dropdown-header-color);
    border-bottom: 1px solid var(--bs-dropdown-divider-bg);
}
.dropdown-menu .dropdown-item {
    padding: 10px 12px;
    border-bottom: 1px solid var(--bs-dropdown-divider-bg);
    color: var(--bs-dropdown-link-color);
}
.dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
    background-color: var(--bs-dropdown-link-hover-bg);
    color: var(--bs-dropdown-link-hover-color);
}
.dropdown-menu .dropdown-divider {
    margin: 0;
    border-top: 1px solid var(--bs-dropdown-divider-bg);
    opacity: 1;
}
/* Keep content inside dropdowns (e.g. Category checkboxes, buttons) readable */
.dropdown-menu .form-check-label,
.dropdown-menu .btn {
    color: var(--bs-dropdown-color);
}
[data-bs-theme="light"] .dropdown-menu {
    --bs-dropdown-bg: #ffffff;
    --bs-dropdown-color: #1f2933;
    --bs-dropdown-border-color: rgba(0, 0, 0, 0.12);
    --bs-dropdown-link-color: #1f2933;
    --bs-dropdown-link-hover-bg: rgba(0, 0, 0, 0.06);
    --bs-dropdown-link-hover-color: #1f2933;
    --bs-dropdown-header-color: #1f2933;
    --bs-dropdown-divider-bg: rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
[data-bs-theme="light"] .dropdown-menu .form-check-label,
[data-bs-theme="light"] .dropdown-menu .btn {
    color: #1f2933;
}

/* ===================================================================
   App layout – inbox (sidebar list + detail + toolbar) and dark panel/grid
   Use class app-inbox-page on wrapper and app-inbox-* on children.
   Use app-panel-dark on card, app-grid-dark on grid container.
   =================================================================== */
.app-inbox-page {
    background-color: var(--page-bg);
}
.app-inbox-page .app-inbox-card {
    background-color: var(--page-bg);
    border: none;
    border-radius: 0;
    overflow: visible;
}
.app-inbox-page .mailbox-sidebar {
    width: 416px; /* 4/5 of previous 520px to prevent horizontal cropping */
    min-width: 320px;
    border-right: none;
    margin-right: 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    background-color: #252833;
    border: 1px solid #3b3f48;
    border-radius: 6px;
}
.app-inbox-page .mailbox-sidebar > [data-scrollbar="true"] {
    flex: 1;
    min-height: 0;
    background-color: #252833;
    display: flex;
    flex-direction: column;
    overflow: auto;
}
.app-inbox-page .mailbox-list {
    margin: 0;
    padding: 0;
    background-color: #252833;
    padding-bottom: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: auto;
}
.app-inbox-page .mailbox-list .mailbox-list-item {
    margin: 0;
    background-color: #252833;
    border-bottom: 1px solid #3b3f48;
}
.app-inbox-page .mailbox-list .mailbox-list-item:last-child {
    border-bottom: 1px solid #3b3f48;
}
/* Inbox alert item layout and typography (match inbox alert style) */
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message {
    padding: 12px 16px;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-sender {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
    margin-bottom: 6px;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-sender .mailbox-time {
    margin-left: auto;
    flex-shrink: 0;
    max-width: 38%;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message .mailbox-sender .mailbox-sender-name {
    font-weight: 700;
    font-size: 15px;
    color: #fffeff !important;
    flex: 1;
    min-width: 0;
    line-height: 1.35;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-time {
    flex-shrink: 0;
    font-size: 7px;
    font-weight: 400;
    color: #9ca0a8 !important;
    background: rgba(255, 254, 255, 0.04);
    border: 1px solid #5a5f6b;
    border-radius: 50px;
    padding: 2px 5px;
    min-width: 0;
    text-align: center;
    white-space: nowrap;
    letter-spacing: -0.02em;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-desc {
    font-size: 12px;
    color: rgba(255, 254, 255, 0.6);
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 4px;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-title {
    font-size: 11px;
    color: rgba(255, 254, 255, 0.5);
}
/* Force cyan on hover – override theme link variables and set color so title is never green */
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message .mailbox-list-item-link:hover,
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message .mailbox-list-item-link:focus {
    --bs-link-color-rgb: 0, 192, 232;
    --bs-link-hover-color-rgb: 0, 192, 232;
    color: #00c0e8 !important;
}
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message .mailbox-list-item-link:hover .mailbox-sender .mailbox-sender-name,
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message .mailbox-list-item-link:focus .mailbox-sender .mailbox-sender-name,
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message a.mailbox-list-item-link:hover .mailbox-sender .mailbox-sender-name,
.app-inbox-page .mailbox-list .mailbox-list-item .mailbox-message a.mailbox-list-item-link:focus .mailbox-sender .mailbox-sender-name {
    color: #00c0e8 !important;
}
.app-inbox-page .mailbox-list .mailbox-list-item.active {
    background-color: #2a2d37;
}
.app-inbox-page .mailbox-list .mailbox-list-item.active .mailbox-time {
    border-color: #00c0e8;
    color: #00c0e8 !important;
    background: rgba(0, 192, 232, 0.08);
}
.app-inbox-page .mailbox-content {
    background-color: #252833;
    flex: 1;
    min-width: 0;
    border: 1px solid #3b3f48;
    border-radius: 6px;
}
.app-inbox-page .mailbox-body {
    display: flex;
    align-items: stretch;
    background-color: var(--page-bg) !important;
    padding: 16px;
    gap: 16px;
}
.app-inbox-page .mailbox,
.app-inbox-page .app-inbox-card .mailbox {
    overflow: visible;
}
.app-inbox-page .app-inbox-card .mailbox-toolbar {
    position: relative;
    z-index: 20;
    overflow: visible !important;
}
.app-inbox-page .app-inbox-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background-color: var(--page-bg) !important;
    border-bottom: none;
    flex-wrap: wrap;
}
.app-inbox-page .app-inbox-toolbar .dropdown {
    position: relative;
}
.app-inbox-page .app-inbox-title {
    font-size: 32px;
    font-weight: 700;
    color: #fffeff;
    margin-right: 12px;
}
.app-inbox-page .app-inbox-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.app-inbox-page .app-inbox-filters-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    margin-right: 4px;
}
.app-inbox-page .app-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #3b3f48;
    background: #2a2d37;
    color: #fffeff;
    font-size: 12px;
    text-decoration: none;
}
.app-inbox-page .app-filter-btn:hover {
    border-color: #5a5f6b;
    color: #fffeff;
}
.app-inbox-page .app-filter-btn.active {
    background-color: rgba(0, 192, 232, 0.18);
    border-color: #00c0e8;
    color: #fffeff;
}
.app-inbox-page .app-filter-btn--date {
    border-color: #00c0e8;
}
.app-inbox-page .app-inbox-sort {
    display: flex;
    align-items: center;
    gap: 8px;
}
.app-inbox-page .app-inbox-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 8px;
}
.app-inbox-page .app-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #3b3f48;
    background: #2a2d37;
    color: #fffeff;
    font-size: 12px;
    text-decoration: none;
}
.app-inbox-page .app-action-btn--sync {
    border-color: #7b8191;
    color: #fffeff;
}
.app-inbox-page .app-action-btn--incident {
    border-color: #ff383c;
    color: #ff383c;
}
.app-inbox-page .app-action-btn--alert {
    border: 1px solid #E89D40;
    border-radius: 6px;
    background-color: #31333A;
    color: #E89D40;
    padding: 6px 16px;
}
.app-inbox-page .app-action-btn--alert:hover {
    background-color: rgba(232, 157, 64, 0.12);
    color: #E89D40;
    border-color: #E89D40;
}
.app-inbox-page .app-action-btn--irrelevant {
    border: 1px solid #6b7280;
    border-radius: 6px;
    background-color: #31333a;
    color: #9ca3af;
    padding: 6px 16px;
}
.app-inbox-page .app-action-btn--irrelevant:hover {
    background-color: rgba(156, 163, 175, 0.12);
    color: #d1d5db;
    border-color: #9ca3af;
}
.app-inbox-page .app-action-btn--irrelevant-active {
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 6px 16px;
}
.app-inbox-page .app-action-btn--irrelevant-active:hover {
    background-color: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-color: #fbbf24;
}
/* New Outgoing Alert button – exact match: #E89D40 orange, #31333A dark grey */
.new-alert-btn {
    color: #E89D40 !important;
    border: 1px solid #E89D40 !important;
    background-color: #31333A !important;
    border-radius: 6px;
    padding: 6px 16px;
}
.new-alert-btn:hover {
    background-color: rgba(232, 157, 64, 0.12) !important;
    color: #E89D40 !important;
    border-color: #E89D40 !important;
}
.icon-urgency-alert {
    display: inline-block;
    vertical-align: -0.15em;
    margin-right: 6px;
    width: 12px;
    height: 14px;
}
/* In dimension rows use gap only – no extra margin so spacing is even between all icons */
.alert-dimension-badges .icon-urgency-alert,
.alert-dimension-icons .icon-urgency-alert {
    margin-right: 0;
}
/* Low urgency badge icon color (teal) to match design */
.text-urgency-low {
    color: #20c997;
}
.icon-threat-level {
    display: inline-block;
    vertical-align: -0.15em;
    width: 14px;
    height: 12px;
    flex-shrink: 0;
}
.icon-proximity {
    display: inline-block;
    vertical-align: -0.15em;
    width: 10px;
    height: 12px;
    flex-shrink: 0;
}
.icon-impact {
    display: inline-block;
    vertical-align: -0.15em;
    width: 12px;
    height: 13px;
    flex-shrink: 0;
}
.icon-impact.impact-level-low .impact-bar-filled rect:nth-child(2),
.icon-impact.impact-level-low .impact-bar-filled rect:nth-child(3) {
    opacity: 0;
}
.icon-impact.impact-level-medium .impact-bar-filled rect:nth-child(3) {
    opacity: 0;
}
/* Alerts toolbar: Dispatch and Remove – match dark background */
.app-inbox-page .app-inbox-toolbar .btn-info {
    background-color: #2a2d37;
    border: 1px solid #00c0e8;
    color: #00c0e8;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
}
.app-inbox-page .app-inbox-toolbar .btn-info.app-pill-btn {
    border-radius: 50px;
    padding: 6px 16px;
}
.app-inbox-page .app-inbox-toolbar .btn-info:hover:not(.disabled) {
    background-color: rgba(0, 192, 232, 0.15);
    border-color: #00c0e8;
    color: #fffeff;
}
.app-inbox-page .app-inbox-toolbar .btn-warning {
    background-color: #2a2d37;
    border: 1px solid #e8a838;
    color: #e8a838;
    font-size: 12px;
    padding: 6px 10px;
    border-radius: 4px;
}
.app-inbox-page .app-inbox-toolbar .btn-warning:hover:not(.disabled) {
    background-color: rgba(232, 168, 56, 0.15);
    border-color: #e8a838;
    color: #fffeff;
}
.app-inbox-page .app-inbox-toolbar .btn-info.disabled,
.app-inbox-page .app-inbox-toolbar .btn-warning.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #3b3f48;
    color: rgba(255, 254, 255, 0.5);
}

/* Alerts page tab buttons (Pending Approval / All Dispatched) – pill style to match inbox alert badge */
.alerts-tab-btn {
    background: transparent;
    border: 1px solid rgba(255, 254, 255, 0.35);
    color: rgba(255, 254, 255, 0.9);
    font-size: 12px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 50px;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.alerts-tab-btn:hover {
    background-color: rgba(255, 254, 255, 0.06);
    border-color: rgba(255, 254, 255, 0.5);
    color: #fffeff;
}
.alerts-tab-btn.active {
    background-color: rgba(0, 192, 232, 0.15);
    border-color: #00c0e8;
    color: #00c0e8;
}

.app-inbox-page .app-inbox-body {
    background-color: #252833;
}
.app-inbox-page .app-inbox-list-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 6px;
    padding: 12px 16px;
    border-bottom: 1px solid #3b3f48;
    background-color: #252833;
    color: #fffeff;
    font-size: 13px;
}
.app-inbox-page .app-inbox-list-header-row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-inbox-page .app-inbox-list-title {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.8);
}
.app-inbox-page .app-today-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
}
.app-inbox-page .app-today-link:hover {
    color: #ffffff;
}
.app-inbox-page .app-inbox-clear {
    color: #ffffff;
    font-size: 12px;
    text-decoration: underline;
}
.app-inbox-page .app-inbox-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0 10px;
    border-top: none;
    background-color: #252833;
    margin-top: 0;
}
.app-inbox-page .app-page-btn {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    border: 1px solid #5a5f6b;
    background: transparent;
    color: #fffeff;
}
.app-inbox-page .app-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.app-inbox-page .app-page-text {
    font-size: 12px;
    color: #fffeff;
}
.app-inbox-page .app-inbox-card .dropdown-menu {
    z-index: 2000;
    position: absolute;
}

/* Dark panel (card) + grid – use app-panel-dark on card, app-grid-dark on grid container */
.app-panel-dark {
    background-color: #252833;
    border: 1px solid #3b3f48;
    border-radius: 6px;
}
.app-panel-dark .card-header {
    background-color: #252833;
    border-bottom: 1px solid #3b3f48;
    color: #fffeff;
}
.app-panel-dark .card-header .btn-outline-theme {
    border-color: #00c0e8;
    color: #fffeff;
}
.app-panel-dark .card-header .btn-outline-theme:hover {
    background-color: rgba(0, 192, 232, 0.15);
    color: #fffeff;
}
.app-panel-dark .card-body {
    background-color: #252833 !important;
    color: rgba(255, 254, 255, 0.9);
}
.app-grid-dark,
.app-grid-dark .grid-mvc,
.app-grid-dark .grid-table-wrap,
.app-grid-dark table.grid-table {
    background-color: #252833;
    color: rgba(255, 254, 255, 0.9);
}
.app-grid-dark table.grid-table th,
.app-grid-dark table.grid-table .grid-header button {
    background-color: #252833 !important;
    color: #fffeff !important;
    border-color: #3b3f48;
}
.app-grid-dark table.grid-table td,
.app-grid-dark table.grid-table tbody tr {
    background-color: #252833 !important;
    color: rgba(255, 254, 255, 0.9);
    border-color: #3b3f48;
}
.app-grid-dark table.grid-table tbody tr:hover td {
    background-color: rgba(255, 255, 255, 0.06) !important;
}
.app-grid-dark input.grid-search-input,
.app-grid-dark input.grid-filter-input {
    background-color: #2a2d37;
    border-color: #3b3f48;
    color: #fffeff;
}
.app-grid-dark .grid-search,
.app-grid-dark .grid-filter {
    background-color: #252833;
}
.app-grid-dark button.grid-search-apply,
.app-grid-dark button.grid-search-clear {
    background-color: #2a2d37 !important;
    border-color: #3b3f48;
    color: #fffeff;
}
.app-grid-dark .btn-outline-secondary {
    border-color: #5a5f6b;
    color: #fffeff;
}
.app-grid-dark .btn-outline-secondary:hover {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: #5a5f6b;
    color: #fffeff;
}
.app-grid-dark .grid-empty-text {
    color: rgba(255, 254, 255, 0.6);
}
.app-grid-dark .grid-footer,
.app-grid-dark .grid-itemscount,
.app-grid-dark .page-link {
    color: rgba(255, 254, 255, 0.9);
    background-color: transparent;
    border-color: #3b3f48;
}
.app-grid-dark .page-item.active .page-link {
    background-color: rgba(0, 192, 232, 0.25);
    border-color: #00c0e8;
    color: #fffeff;
}

/* Inbox list item content (e.g. GSOC item) and detail pane */
.app-inbox-page .gsoc-item {
    background-color: #252833;
    border-bottom: 1px solid #3b3f48 !important;
    padding: 16px 12px;
    box-sizing: border-box;
    flex: 1 1 0;
    height: 135px;
}
.app-inbox-page .gsoc-item.active {
    border-left: none;
    box-shadow: inset 3px 0 0 #00c0e8;
    background-color: rgba(255, 255, 255, 0.06);
}
.app-inbox-page .gsoc-item-link {
    color: inherit;
    text-decoration: none;
}
.app-inbox-page .gsoc-item-title {
    font-size: 13px;
    font-weight: 600;
    color: #fffeff;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.app-inbox-page .gsoc-item-meta {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 4px;
    line-height: 1.35;
}
.app-inbox-page .gsoc-item-datetime {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.app-inbox-page .gsoc-item.active .gsoc-item-datetime {
    color: rgba(0, 192, 232, 0.95);
}
.app-inbox-page .gsoc-item-desc { display: none; }
.app-inbox-page .gsoc-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 8px;
}
.app-inbox-page .gsoc-item-badges .gsoc-item-badge {
    margin-top: 0;
}
.app-inbox-page .mailbox-detail-header .gsoc-item-badges {
    margin-top: 6px;
}
.app-inbox-page .gsoc-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.app-inbox-page .gsoc-item-badge--default {
    background-color: #7879f1;
    color: #252833;
}
.app-inbox-page .gsoc-item-badge--safety {
    background-color: #00c0e8;
    color: #252833;
}
/* Same chips in item detail when rendered outside .app-inbox-page (embedded detail column) */
.mailbox-detail .gsoc-item-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-top: 6px;
}
.mailbox-detail .gsoc-item-badges .gsoc-item-badge {
    margin-top: 0;
}
.mailbox-detail .gsoc-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}
.mailbox-detail .gsoc-item-badge--default {
    background-color: #7879f1;
    color: #252833;
}
.mailbox-detail .gsoc-item-badge--safety {
    background-color: #00c0e8;
    color: #252833;
}
.app-inbox-page .mailbox-empty-message {
    color: rgba(255, 255, 255, 0.4);
}
.app-inbox-page .mailbox-detail,
.app-inbox-page .mailbox-detail-content,
.app-inbox-page .mailbox-detail-body,
.app-inbox-page .mailbox-detail-header,
.app-inbox-page .mailbox-detail-header small,
.app-inbox-page .mailbox-detail-body p,
.app-inbox-page .mailbox-detail-content h4 {
    color: #fffeff;
}
.app-inbox-page .mailbox-detail-header small,
.app-inbox-page .mailbox-detail-body p {
    color: rgba(255, 255, 255, 0.7);
}
.app-inbox-page .mailbox-detail {
    padding: 24px 28px;
}
.app-inbox-page .mailbox-detail-header {
    border-bottom: 1px solid #3b3f48;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.app-inbox-page .mailbox-detail-header .fw-600 {
    color: #fffeff;
}
.app-inbox-page .mailbox-detail-content h4 {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

/* GSOC item detail – headline / details / location / source (icon-aligned stack) */
.mailbox-detail-about {
    --mailbox-detail-meta-icon-w: 1.25rem;
    --mailbox-detail-meta-gap: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.mailbox-detail-meta-row {
    display: flex;
    align-items: flex-start;
    gap: var(--mailbox-detail-meta-gap);
}
.mailbox-detail-meta-ico {
    flex: 0 0 var(--mailbox-detail-meta-icon-w);
    width: var(--mailbox-detail-meta-icon-w);
    text-align: center;
    margin-top: 0.2em;
    font-size: 1.1rem;
    line-height: 1;
    color: #00c0e8;
    opacity: 0.92;
}
.mailbox-detail-meta-row--title .mailbox-detail-meta-ico {
    margin-top: 0.3em;
}
.mailbox-detail-about-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}
.mailbox-detail-about-details {
    margin: -4px 0 0 0;
    padding-left: calc(var(--mailbox-detail-meta-icon-w) + var(--mailbox-detail-meta-gap));
    font-size: 0.9375rem;
    line-height: 1.5;
}
/* Beats .app-inbox-page .mailbox-detail-body p when detail is shown outside the inbox page */
.mailbox-detail-body p.mailbox-detail-about-details {
    color: rgba(255, 254, 255, 0.78);
}
.mailbox-detail-meta-val {
    min-width: 0;
    flex: 1;
    word-break: break-word;
    font-size: 0.875rem;
    line-height: 1.45;
    color: rgba(255, 254, 255, 0.9);
}
.mailbox-detail-plain-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.mailbox-detail-plain-meta .mailbox-detail-screenshot-slot {
    margin-top: 4px;
    padding-left: calc(var(--mailbox-detail-meta-icon-w) + var(--mailbox-detail-meta-gap));
}
.mailbox-detail-plain-meta .mailbox-detail-screenshot-slot:empty {
    margin-top: 0;
    padding-left: 0;
    min-height: 0;
}

/* GSOC item detail – AnalytiX box (full width of detail column) */
.mailbox-detail-analytix {
    margin-top: 14px;
    margin-bottom: 0;
    padding: 10px 12px 10px;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
    border: 1px solid #3b3f48;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.035);
}
.mailbox-detail-analytix-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 8px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mailbox-detail-analytix-head-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-shrink: 0;
    max-width: 100%;
}
.mailbox-detail-analytix-title {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #00c0e8;
    flex: 1 1 auto;
    min-width: 0;
}
.mailbox-detail-analytix-metric-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    line-height: 1.3;
    color: rgba(255, 220, 170, 0.95);
    background: rgba(240, 160, 80, 0.12);
    border: 1px solid rgba(240, 160, 80, 0.35);
}
.mailbox-detail-analytix--modal-style {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.mailbox-detail-analytix-priority-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    line-height: 1.3;
    border: 1px solid transparent;
}
.mailbox-detail-analytix-priority-badge--high {
    color: #ffb4b4;
    background: rgba(255, 68, 68, 0.18);
    border-color: rgba(255, 100, 100, 0.35);
}
.mailbox-detail-analytix-priority-badge--medium {
    color: #ffd080;
    background: rgba(255, 170, 0, 0.16);
    border-color: rgba(255, 180, 60, 0.35);
}
.mailbox-detail-analytix-priority-badge--low {
    color: #a8e6cf;
    background: rgba(80, 200, 140, 0.14);
    border-color: rgba(100, 200, 150, 0.3);
}
.mailbox-detail-analytix-inner {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mailbox-detail-analytix-block {
    margin-bottom: 0;
}
.mailbox-detail-analytix-taxonomy-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px 0;
    margin-bottom: 2px;
}
.mailbox-detail-analytix-taxonomy-cell {
    flex: 1 1 0;
    min-width: 5.5rem;
    padding: 0 12px;
    border-left: 1px solid rgba(255, 254, 255, 0.12);
}
.mailbox-detail-analytix-taxonomy-cell:first-child {
    padding-left: 0;
    border-left: none;
}
.mailbox-detail-analytix-value--unset {
    color: rgba(255, 254, 255, 0.35);
    font-weight: 500;
    letter-spacing: 0.02em;
}
.mailbox-detail-analytix-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(255, 254, 255, 0.4);
    margin-bottom: 3px;
}
.mailbox-detail-analytix-value {
    color: rgba(255, 254, 255, 0.82);
    line-height: 1.45;
    font-size: 0.8125rem;
}
.mailbox-detail-analytix-value p {
    margin: 0 0 0.35em 0;
}
.mailbox-detail-analytix-value p:last-child {
    margin-bottom: 0;
}
.mailbox-detail-analytix-badges.gsoc-item-badges {
    margin-top: 0;
}
.mailbox-detail-analytix-disclaimer {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 8px;
    margin-left: -12px;
    margin-right: -12px;
    margin-bottom: -10px;
    padding: 8px 10px;
    border-radius: 0 0 5px 5px;
    border-left: none;
    border-top: 1px solid rgba(120, 121, 241, 0.25);
    background: rgba(120, 121, 241, 0.1);
}
.mailbox-detail-analytix-disclaimer-icon {
    flex-shrink: 0;
    font-size: 0.95rem;
    line-height: 1.25;
    opacity: 0.9;
    margin-top: 1px;
}
.mailbox-detail-analytix-disclaimer-body {
    min-width: 0;
}
.mailbox-detail-analytix-disclaimer-title {
    font-size: 0.6875rem;
    font-weight: 600;
    color: #fffeff;
    margin-bottom: 1px;
}
.mailbox-detail-analytix-disclaimer-text {
    margin: 0;
    font-size: 0.6875rem;
    line-height: 1.35;
    color: rgba(255, 254, 255, 0.55);
}

.mailbox-detail-item-map {
    margin-top: 16px;
}

/* ArcGIS MapView in GSOC item modal: needs explicit stacking + min size before view.resize() */
#gsocItemDetailsModalBody .mailbox-detail-item-map,
#mobileContentModal .mailbox-detail-item-map {
    position: relative;
    min-height: 420px;
}

/* GSOC item details (Multi Inbox): Create Incoming / Outgoing in modal header beside close */
#gsocItemDetailsModalToolbar .gsoc-item-detail-actions {
    padding: 0;
    margin: 0;
    border: none !important;
}
/* Item detail modal toolbar: same affordance as inbox actions (partial may load outside .app-inbox-page) */
#gsocItemDetailsModalToolbar .app-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 11px;
    white-space: nowrap;
    border-radius: 4px;
    border: 1px solid #3b3f48;
    background: #2a2d37;
    color: #fffeff;
    text-decoration: none !important;
    cursor: pointer;
}
#gsocItemDetailsModalToolbar .app-action-btn:hover {
    filter: brightness(1.08);
    color: #fffeff;
}
#gsocItemDetailsModalToolbar .app-action-btn--incident {
    border-color: #ff383c;
    color: #ff383c;
    background: #2a2d37;
}
#gsocItemDetailsModalToolbar .app-action-btn--incident:hover {
    color: #ff5c5f;
    border-color: #ff5c5f;
}
#gsocItemDetailsModalToolbar .app-action-btn--alert {
    border: 1px solid #e89d40;
    border-radius: 6px;
    background-color: #31333a;
    color: #e89d40;
    padding: 4px 12px;
}
#gsocItemDetailsModalToolbar .app-action-btn--alert:hover {
    background-color: rgba(232, 157, 64, 0.12);
    color: #e89d40;
    border-color: #e89d40;
}
#gsocItemDetailsModalToolbar .app-action-btn--irrelevant,
.gsoc-item-detail-actions .app-action-btn--irrelevant {
    border: 1px solid #6b7280;
    border-radius: 6px;
    background-color: #31333a;
    color: #9ca3af;
    padding: 4px 12px;
    cursor: pointer;
    text-decoration: none;
}
#gsocItemDetailsModalToolbar .app-action-btn--irrelevant:hover,
.gsoc-item-detail-actions .app-action-btn--irrelevant:hover {
    background-color: rgba(156, 163, 175, 0.12);
    color: #d1d5db;
    border-color: #9ca3af;
}
#gsocItemDetailsModalToolbar .app-action-btn--irrelevant-active,
.gsoc-item-detail-actions .app-action-btn--irrelevant-active {
    border: 1px solid #f59e0b;
    border-radius: 6px;
    background-color: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 4px 12px;
    cursor: pointer;
    text-decoration: none;
}
#gsocItemDetailsModalToolbar .app-action-btn--irrelevant-active:hover,
.gsoc-item-detail-actions .app-action-btn--irrelevant-active:hover {
    background-color: rgba(245, 158, 11, 0.22);
    color: #fbbf24;
    border-color: #fbbf24;
}

/* App inbox – light theme */
[data-bs-theme="light"] .app-inbox-page {
    background-color: #f2f4f7;
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-toolbar {
    background-color: #f2f4f7 !important;
}
[data-bs-theme="light"] .app-inbox-page .mailbox-body {
    background-color: #f2f4f7 !important;
}
[data-bs-theme="light"] .app-inbox-page .mailbox-sidebar,
[data-bs-theme="light"] .app-inbox-page .mailbox-content {
    background-color: #ffffff;
    border-color: #e1e5ea;
}
[data-bs-theme="light"] .app-inbox-page .mailbox-sidebar > [data-scrollbar="true"],
[data-bs-theme="light"] .app-inbox-page .mailbox-list,
[data-bs-theme="light"] .app-inbox-page .mailbox-list .mailbox-list-item {
    background-color: #ffffff;
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-clear,
[data-bs-theme="light"] .app-inbox-page .app-today-link {
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-pagination {
    background-color: #ffffff;
    border-top: 1px solid #e1e5ea;
}
[data-bs-theme="light"] .app-inbox-page .app-page-btn {
    background-color: #ffffff;
    border-color: #d3d9e0;
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .app-page-btn.disabled {
    color: rgba(31, 41, 51, 0.4);
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-list-header {
    background-color: #ffffff;
    border-bottom-color: #e1e5ea;
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-title,
[data-bs-theme="light"] .app-inbox-page .gsoc-item-title,
[data-bs-theme="light"] .app-inbox-page .app-inbox-list-title,
[data-bs-theme="light"] .app-inbox-page .app-page-text {
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .app-inbox-filters-label {
    color: rgba(31, 41, 51, 0.6);
}
[data-bs-theme="light"] .app-inbox-page .gsoc-item-meta,
[data-bs-theme="light"] .app-inbox-page .gsoc-item-datetime,
[data-bs-theme="light"] .app-inbox-page .mailbox-empty-message {
    color: rgba(31, 41, 51, 0.65);
}
[data-bs-theme="light"] .app-inbox-page .gsoc-item.active .gsoc-item-datetime {
    color: #0088a8;
}
[data-bs-theme="light"] .app-inbox-page .app-filter-btn,
[data-bs-theme="light"] .app-inbox-page .app-action-btn {
    background: #ffffff;
    border-color: #d3d9e0;
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .app-filter-btn.active {
    background-color: rgba(0, 192, 232, 0.12);
}
[data-bs-theme="light"] .app-inbox-page .gsoc-item {
    border-bottom-color: #e1e5ea !important;
}
[data-bs-theme="light"] .app-inbox-page .gsoc-item.active {
    background-color: rgba(0, 0, 0, 0.03);
}
[data-bs-theme="light"] .app-inbox-page .mailbox-detail,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-content,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-body,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-header,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-header small,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-body p,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-content h4 {
    color: #1f2933;
}
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-header small,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-body p {
    color: rgba(31, 41, 51, 0.7);
}
[data-bs-theme="light"] .mailbox-detail-analytix {
    border-color: #e1e5ea;
    background-color: rgba(0, 192, 232, 0.06);
}
[data-bs-theme="light"] .mailbox-detail-analytix-head {
    border-bottom-color: rgba(31, 41, 51, 0.1);
}
[data-bs-theme="light"] .mailbox-detail-analytix-metric-badge {
    color: #9a3412;
    background: rgba(234, 88, 12, 0.1);
    border-color: rgba(234, 88, 12, 0.28);
}
[data-bs-theme="light"] .mailbox-detail-analytix--modal-style {
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
[data-bs-theme="light"] .mailbox-detail-analytix-title {
    color: #008fa8;
}
[data-bs-theme="light"] .mailbox-detail-analytix-label {
    color: rgba(31, 41, 51, 0.55);
}
[data-bs-theme="light"] .mailbox-detail-analytix-taxonomy-cell {
    border-left-color: rgba(31, 41, 51, 0.14);
}
[data-bs-theme="light"] .mailbox-detail-analytix-value--unset {
    color: rgba(31, 41, 51, 0.4);
}
[data-bs-theme="light"] .mailbox-detail-analytix-value {
    color: #1f2933;
}
[data-bs-theme="light"] .mailbox-detail-analytix-priority-badge--high {
    color: #b42318;
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(220, 38, 38, 0.28);
}
[data-bs-theme="light"] .mailbox-detail-analytix-priority-badge--medium {
    color: #92400e;
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(217, 119, 6, 0.28);
}
[data-bs-theme="light"] .mailbox-detail-analytix-priority-badge--low {
    color: #166534;
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.25);
}
[data-bs-theme="light"] .mailbox-detail-analytix-disclaimer {
    background: rgba(120, 121, 241, 0.08);
    border-top-color: rgba(120, 121, 241, 0.2);
}
[data-bs-theme="light"] .mailbox-detail-analytix-disclaimer-title {
    color: #1f2933;
}
[data-bs-theme="light"] .mailbox-detail-analytix-disclaimer-text {
    color: rgba(31, 41, 51, 0.65);
}
[data-bs-theme="light"] .mailbox-detail-meta-ico {
    color: #008fa8;
}
[data-bs-theme="light"] .mailbox-detail-meta-val {
    color: #1f2933;
}
[data-bs-theme="light"] .mailbox-detail-body p.mailbox-detail-about-details,
[data-bs-theme="light"] .app-inbox-page .mailbox-detail-body p.mailbox-detail-about-details {
    color: rgba(31, 41, 51, 0.82);
}

.tabulator .tabulator-header .tabulator-col{
    background-color: transparent !important;
}
.tabulator .tabulator-footer{
    background-color: transparent !important;
    overflow: scroll;
}
.tabulator-table{
    background-color: transparent !important;
}
.tabulator-row{
    background-color:transparent !important;
}
.tabulator-row .tabulator-row-even{
    background-color:transparent !important;
}

.tabulator{
    background-color: transparent !important;
}

.tabulator-row{
    color: var(--bs-body-color);
    background-color: transparent !important;
}

.tabulator .tabulator-footer .tabulator-page.active{
    border-color: var(--bs-theme) !important;
    background-color: var(--bs-theme) !important;
}
.tabulator .tabulator-footer .tabulator-page{
    margin-right: 0.4rem !important;
}

/* ===================================================================
   Tabulator Overrides
   =================================================================== */

:is(#pinned-location-info,#venue-distance-info){
    background-color:transparent !important;
    border: 1px solid #333;
    border-radius: 10px;
}
/*Theme the header*/
:is(#pinned-location-info,#venue-distance-info) .tabulator-header {
    background-color:transparent !important;
    color:var(--bs-body-color);
}
/*Allow column header names to wrap lines*/
:is(#pinned-location-info,#venue-distance-info) .tabulator-header .tabulator-col,
:is(#pinned-location-info,#venue-distance-info) .tabulator-header .tabulator-col-row-handle {
    white-space: normal;
}

/*Color the table rows*/
:is(#pinned-location-info,#venue-distance-info) .tabulator-tableHolder .tabulator-table .tabulator-row{
    color:#fff;
    background-color: transparent !important;
}

/*Color even rows*/
:is(#pinned-location-info,#venue-distance-info) .tabulator-tableHolder .tabulator-table .tabulator-row:nth-child(even) {
    background-color: transparent !important;
}
@media (max-width: 768px) {
    :is(#pinned-location-info,#venue-distance-info) .tabulator-pagination{
        display: flex;
        justify-content: center;
        margin-top: 10px;
    }
}


@media (max-width: 1100px) {
    .col-md-7,
    .col-md-5{
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }
}

.fs-08rem{
    font-size: 0.8rem;
}

.grid-description{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Shared page layout */
:root {
    --page-bg: #f4f6f8;
    --page-panel-bg: #ffffff;
    --page-title-color: #1f2933;
    --page-muted: rgba(31, 41, 51, 0.6);
    --page-border: rgba(31, 41, 51, 0.12);
    --page-border-soft: rgba(31, 41, 51, 0.08);
    --page-hover: rgba(31, 41, 51, 0.04);
    --page-link: rgba(31, 41, 51, 0.65);
    --page-link-hover: rgba(31, 41, 51, 0.8);
}

[data-bs-theme="dark"] {
    --page-bg: #2d303a;
    --page-panel-bg: #252833;
    --page-title-color: #fffeff;
    --page-muted: rgba(255, 255, 255, 0.5);
    --page-border: rgba(255, 255, 255, 0.15);
    --page-border-soft: rgba(255, 255, 255, 0.08);
    --page-hover: rgba(255, 255, 255, 0.04);
    --page-link: rgba(255, 255, 255, 0.45);
    --page-link-hover: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="light"] body,
[data-bs-theme="light"] .app-content,
[data-bs-theme="light"] .app-content-full-width {
    color: #1f2933;
}

.page-surface {
    background-color: var(--page-bg);
    min-height: calc(100vh - 80px);
}

html,
body,
.app-content,
.app-content-full-width {
    background-color: var(--page-bg);
}

.page-inner {
    padding: 22px 32px 32px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Restore inline title + small subtitle layout */
.page-header {
    align-items: baseline;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.page-header small,
.page-header .small {
    display: inline-block;
}

/* Keep <small> inline next to title on heading elements */
h1.page-header,
h2.page-header,
h3.page-header {
    display: inline-flex !important;
    align-items: baseline;
    justify-content: flex-start !important;
    gap: 8px;
    width: auto !important;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Dossier detail layout */
.dossier-detail-page .page-inner {
    padding: 24px 32px 32px;
}

.dossier-detail-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.dossier-back-link {
    color: var(--page-link);
    text-decoration: underline;
    font-size: 12px;
}

.dossier-meta-panel {
    margin-bottom: 18px;
}

.dossier-meta {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 24px;
}

.dossier-meta-image {
    width: 100%;
    height: 220px;
    background-color: var(--page-bg);
    border-radius: 4px;
    overflow: hidden;
}

.dossier-meta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dossier-meta-content {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 24px;
}

.dossier-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--page-title-color);
}

.dossier-location {
    color: var(--page-muted);
    margin-bottom: 12px;
}

.dossier-stats {
    display: grid;
    gap: 10px;
}

.dossier-label {
    display: block;
    color: var(--page-muted);
    font-size: 13px;
}

.dossier-value {
    color: var(--page-title-color);
    font-weight: 600;
    font-size: 13px;
}

.dossier-risk {
    color: #ff383c;
}

.dossier-meta-section {
    margin-bottom: 16px;
}

.dossier-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--page-title-color);
    font-weight: 600;
    font-size: 13px;
}

.dossier-icon-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid var(--page-border);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    color: var(--page-title-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dossier-tag {
    display: inline-block;
    background: rgba(255, 255, 255, 0.12);
    color: var(--page-title-color);
    border-radius: 4px;
    padding: 2px 8px;
    margin: 4px 6px 0 0;
    font-size: 12px;
}

.dossier-social-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
}

.dossier-social-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    color: var(--page-title-color);
    font-size: 13px;
}

.dossier-social-name {
    font-weight: 600;
}

.dossier-tabs .nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.dossier-tabs .nav-link {
    color: var(--page-muted);
    font-weight: 500;
}

.dossier-tabs .nav-link.active {
    color: var(--page-title-color);
    border-bottom: 3px solid #0190ac;
}

.dossier-details-panel {
    background-color: var(--page-panel-bg);
    border-radius: 4px;
    margin-bottom: 24px;
    overflow: hidden;
}

.dossier-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 18px;
    font-weight: 700;
    color: var(--page-title-color);
    border-bottom: 1px solid var(--page-border);
}

.dossier-details-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 8px 16px;
    border-bottom: 1px solid var(--page-border);
    font-size: 13px;
}

.dossier-details-row:last-child {
    border-bottom: none;
}

.dossier-details-label {
    color: var(--page-muted);
}

.dossier-details-value {
    color: var(--page-title-color);
    font-weight: 600;
}

.rim-label {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    margin-right: 6px;
}

.rim-risk {
    color: #ff383c;
    font-weight: 600;
}

.rim-value {
    color: #fffeff;
    font-weight: 600;
}

.rim-risk-icon {
    color: #ff383c;
    margin-right: 6px;
    font-size: 14px;
    vertical-align: -1px;
}

.rim-title {
    color: var(--page-title-color);
    font-weight: 700;
}

.rim-history-link {
    background: transparent;
    border: none;
    color: var(--page-link);
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
    cursor: pointer;
}

.rim-history-link:hover {
    color: var(--page-link-hover);
}

.page-title {
    color: var(--page-title-color);
    font-size: 24px;
    font-weight: 600;
    margin: 0;
}

.page-primary-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background-color: #0190ac;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
}

.page-primary-btn:hover {
    background-color: #017d95;
    color: #ffffff;
    text-decoration: none;
}

.page-secondary-btn {
    background-color: transparent;
    border: 1px solid var(--page-border);
    color: var(--page-title-color);
}

.page-secondary-btn:hover {
    background-color: var(--page-hover);
    color: var(--page-title-color);
}

.page-search {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border: 1px solid var(--page-border);
    border-radius: 4px;
    background-color: var(--page-panel-bg);
    color: var(--page-muted);
    min-width: 220px;
}

.page-search input {
    border: none;
    outline: none;
    background: transparent;
    color: var(--page-title-color);
    width: 100%;
    font-size: 13px;
}

.page-search input::placeholder {
    color: var(--page-muted);
}

.page-panel {
    background-color: var(--page-panel-bg);
    border-radius: 2px;
    padding: 18px 18px 10px;
}

.page-panel-body {
    background-color: transparent;
}


.panel-divider {
    border-color: var(--page-border);
    margin: 12px 0;
}

.filters-clear {
    text-align: right;
    margin-top: 12px;
}

.filters-clear a {
    color: var(--page-link);
    text-decoration: underline;
    font-size: 12px;
}

.filters-clear a:hover {
    color: var(--page-link-hover);
}

/* Table layout in panels */
.table-panel .dataTables_filter {
    display: none;
}

.table-panel .dataTables_length,
.table-panel .dataTables_info {
    display: none;
}

.table-panel .dataTables_wrapper {
    display: flex;
    flex-direction: column;
}

.table-panel .dataTables_paginate {
    margin-top: 24px;
}

.table-panel table.dataTable {
    color: var(--page-title-color);
    font-size: 13px;
    border-collapse: collapse;
    width: 100% !important;
    background-color: var(--page-panel-bg);
}

.table-panel table.dataTable thead th {
    color: var(--page-muted);
    border-bottom: 1px solid var(--page-border);
    padding: 10px 8px;
    font-weight: 500;
}

.table-panel table.dataTable tbody td {
    border-bottom: 1px solid var(--page-border-soft);
    padding: 10px 8px;
    background-color: var(--page-panel-bg) !important;
}

.table-panel table.dataTable tbody tr:hover {
    background-color: var(--page-hover);
}

.table-panel table.dataTable tbody tr,
.table-panel table.dataTable tbody tr.odd,
.table-panel table.dataTable tbody tr.even {
    background-color: var(--page-panel-bg) !important;
}

.table-panel table.dataTable tbody tr > .sorting_1,
.table-panel table.dataTable tbody tr > .sorting_2,
.table-panel table.dataTable tbody tr > .sorting_3 {
    background-color: var(--page-panel-bg) !important;
}

.table-panel table.dataTable thead th.sorting,
.table-panel table.dataTable thead th.sorting_asc,
.table-panel table.dataTable thead th.sorting_desc {
    background-image: none !important;
}

.table-panel table.dataTable.no-footer {
    border-bottom: none;
}

@media (max-width: 1200px) {
    .page-split {
        flex-direction: column;
    }

    .page-aside {
        width: 100%;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

/* Global MVC grid styling */
.grid-table-wrap {
    background: transparent;
}

table.grid-table {
    color: var(--page-title-color);
    font-size: 13px;
    background: transparent;
}

table.grid-table thead th {
    border-bottom: 1px solid var(--page-border);
    color: var(--page-muted);
    padding: 12px 8px;
}

table.grid-table tbody td {
    border-bottom: 1px solid var(--page-border-soft);
    padding: 12px 8px;
    vertical-align: top;
}

table.grid-table tbody tr.grid-row:hover td {
    background-color: var(--page-hover);
}

table.grid-table .grid-header > .grid-header-group > .grid-header-title > button,
table.grid-table .grid-header > .grid-header-group > .grid-header-title > a,
table.grid-table .grid-header > .grid-header-group > .grid-header-title > span {
    color: var(--page-muted);
    font-weight: 500;
    background-color: transparent;
    text-decoration: none;
}

table.grid-table .grid-header .sorted-asc .grid-sort-arrow::after,
table.grid-table .grid-header .sorted-desc .grid-sort-arrow::after {
    color: var(--page-muted);
}

table.grid-table a {
    color: var(--page-link);
    text-decoration: underline;
}

table.grid-table a:hover {
    color: var(--page-link-hover);
}

.grid-footer {
    color: var(--page-muted);
}

.grid-pager .page-link {
    background-color: transparent;
    color: var(--page-muted);
    border-color: var(--page-border-soft);
}

.grid-pager .page-item.active .page-link {
    background-color: rgba(1, 144, 172, 0.35);
    border-color: rgba(1, 144, 172, 0.7);
    color: #ffffff;
}

/* Global DataTables styling */
.dataTables_wrapper {
    color: var(--page-title-color);
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info {
    color: var(--page-muted);
    font-size: 13px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: var(--page-panel-bg);
    color: var(--page-title-color);
    border: 1px solid var(--page-border);
    border-radius: 4px;
    padding: 4px 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    color: var(--page-muted) !important;
    border: 1px solid var(--page-border-soft);
    background: transparent;
}

.dossier-datatables .dataTables_paginate .paginate_button {
    background-color: transparent;
    color: var(--page-muted) !important;
    border-color: var(--page-border-soft) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: rgba(1, 144, 172, 0.35);
    border-color: rgba(1, 144, 172, 0.7);
    color: #ffffff !important;
}

.dossier-datatables .dataTables_paginate .paginate_button.current,
.dossier-datatables .dataTables_paginate .paginate_button.current:hover {
    background-color: rgba(1, 144, 172, 0.35) !important;
    border-color: rgba(1, 144, 172, 0.7) !important;
    color: #ffffff !important;
}

.dossier-datatables .dataTables_paginate .paginate_button:hover {
    color: var(--page-link-hover) !important;
    border-color: var(--page-border) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: var(--page-hover);
    border-color: var(--page-border);
    color: var(--page-title-color) !important;
}

table.dataTable {
    color: var(--page-title-color);
    font-size: 13px;
    border-collapse: collapse;
    background: transparent;
    width: 100% !important;
}

.dataTables_wrapper .dataTables_scrollHead,
.dataTables_wrapper .dataTables_scrollBody {
    background: transparent;
}

table.dataTable thead th,
table.dataTable thead td {
    color: var(--page-muted);
    border-bottom: 1px solid var(--page-border);
    padding: 10px 8px;
    font-weight: 500;
}

table.dataTable tbody td {
    border-bottom: 1px solid var(--page-border-soft);
    padding: 10px 8px;
}

table.dataTable tbody tr,
table.dataTable tbody tr.odd,
table.dataTable tbody tr.even {
    background-color: transparent;
}

table.dataTable tbody tr:hover {
    background-color: var(--page-hover);
}

table.dataTable.no-footer {
    border-bottom: none;
}
.disabled{
    color: gray; 
    pointer-events: none; 
    text-decoration: none; 
    cursor: not-allowed;
}

.select2-container--open .select2-dropdown--below,
.select2-container--open .select2-dropdown--above{
    background: var(--bs-body-color);
    color: var(--bs-body-bg);
}

.image-container {
    position: relative;
    display: inline-block;
    opacity: 1;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
}

.image-container:hover .overlay {
    display: flex;
}

.file-btn {
    padding: 10px;
    margin: 5px;
    color: #fff;
    background-color: #3498db;
    border: none;
    cursor: pointer;
}

.file-btn:hover{
    background-color: #2980b9;
}

.iti__country{
    color: var(--bs-body-color);
    background-color: var(--bs-body-bg);
}
.iti__hignlight{
    background-color: var(--bs-body-bg);
}

.iti__country.iti__highlight{
    background-color: #9a9898 !important;
}

.iti {
    --iti-path-flags-1x: url('../lib/intl-tel-input/build/img/flags.png');
    --iti-path-flags-2x: url('../lib/intl-tel-input/build/img/flags@2x.png');
}

.btn-container{
    position: absolute;
    bottom: 60px;
    right: 10px;
}

.custom-tooltip{
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-radius: 5px;
    border:1px solid
}
.contacts{
    flex: 1;
    overflow-y: auto;
    border-right: 1px solid #ccc;
    padding: 10px;
    max-height: 92vh;
}
.contact-link{
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    margin-bottom: 10px;
}
.contact{
    padding: 1rem;
    background-color: var(--bs-body-bg);
    border-radius: 10px;
    border: 1px solid var(--bs-gray-100);
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}
.contact:hover{
    background-color: #f1f1f1;    
}
.chat-container{
    overflow-y: auto;
    border-radius: 10px;
    height: 100%;
    max-height: 81vh;
}
.menu-img{
    display: flex;
    align-items: center;
    justify-content: center;
}
.menu-img .rounded-span{
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    border-radius: 50%;
    background-color: #007bff;
    color: white;
    text-align: center;
    font-size: 1.2rem;
}
.contact-name{
    display: flex;
    align-items: center;
}

.date-header{
    width: fit-content;
    margin: 10px auto;
    padding: 5px 10px;
    background-color: #e1e1e1;
    border-radius: 10px;
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}

.widget-chat-message-status{
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 5px;
}
.widget-chat-message-status .fa{
    font-size: 16px;
    margin-right: 5px;
}
.widget-chat-message-status .fa-check.sending-check {
    color: gray; 
}

.widget-chat-item.received .widget-chat-message-status .fa-check-double {
    color: grey;
}

.widget-chat-item.seen .widget-chat-message-status .fa-check-double {
    color: blue;
}

.widget-chat-item.sending .widget-chat-message-status .fa-check {
    color: gray;
}

@media (max-width: 768px) {
    .contacts{
        padding: 5px;
    }
    
    .contact{
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem;
    }
    
    .contact-name{
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contacts{
        max-height: 30rem;
    }
    
    .chat-container{
        max-height: 25rem !important;
    }
    
    .contact{
        padding: 0.5rem;
    }
    
    .contact-name{
        font-size: 0.8rem;
    }
}

.argo-color-compliant{
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}
.w-inherit{
    width: inherit !important;
}
.h-30{
    height: 30vh;
}
.mr-3{
    margin-right: 2vw;
}
.ml-3{
    margin-left: 2vw;
}

.mobile-view {
    display: none;
}

@media only screen and (max-width: 767px) {
    .desktop-view {
        display: none;
    }

    .mobile-view {
        display: block;
    }
}

@media print {
    body {
        font-family: 'Times New Roman', serif;
        color: black;
    }
    header, footer, nav, .no-print {
        display: none;
    }
    .print-container {
        width: 100%;
        margin: 0 auto;
    }
}

.plus-menu {
    position: fixed;
    bottom: 20px;
    right: 30px;
}

.plus-btn {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease;
    background-color: #007bff;
    color: white;
    cursor: pointer; /* Ensures the cursor is a pointer (hand) */
    position: relative;
    z-index: 2; /* Ensures it's above the menu items */
}

.menu-items {
    position: absolute;
    bottom: 70px; /* Adjusts the position of the menu relative to the button */
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none; /* Prevents clicking when hidden */
    z-index: 1; /* Keeps it behind the plus button */
}

.plus-btn.active + .menu-items {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto; /* Re-enables clicking when visible */
}

.plus-btn.active {
    transform: rotate(45deg);
}
.tag-button {
    position: relative;
    display: inline-block;
}

.delete-bubble {
    cursor: pointer;
    font-size: 0.7rem;
    background-color: rgb(255,0,0);
    position: absolute;
    top: -5px;
    right: -20px; 
    transition: right 0.3s ease-in-out;
    z-index: 1; 
    opacity: 0;
}

.tag-button:hover .delete-bubble {
    right: -9px;
    opacity: 1; 
}

@media (max-width: 768px) {
    hr.d-none{
        display: block !important;
    }
}

#dt-length-0{
    color: var(--bs-body-color) !important;
    background-color: var(--bs-body-bg) !important;
}


.social-media-list {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
}

.social-media-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.social-media-icon {
    width: 30px;
    height: 30px;
    margin-right: 10px;
    background-color: white;
    border-radius: 5px;
}

.card-footer{
    z-index: 1 !important;
}

.card.daily-update:hover{
    background-color: rgba(0,0,0,0.5);
    transform: scale(1.02);
}
.card.daily-update{
    transition: background-color 0.3s ease, transform 0.3s ease;
    min-height: 30vh;
    position: relative;
    overflow: hidden;
}

.card.daily-update:hover .card-overlay{
    transform: translateY(-50%);
    opacity: 1;
}

.card-overlay{
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 20px;
    text-align: center;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.description{
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.creation-date{
    font-size: 1rem;
}

.card.daily-update:hover .plus-button {
    display: block;
    opacity: 1;
}

.plus-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    background-color: #ffffff;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    text-align: center;
    line-height: 50px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.card.daily-update:hover .edit-update-button {
    display: block;
    opacity: 1;
}

.edit-update-button {
    position: absolute;
    top: 2em;
    right: 0.5em;
    transform: translate(-50%, -50%);
    display: none;
    background-color: #798e98;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    text-align: center;
    line-height: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image-contained {
    object-fit: contain; 
    width: 100%;  
    max-height: 25vh;
    height: auto;    
}

.partly-deleted {
    opacity: 0.5;
    position: relative;
}

.partly-deleted:hover {
    opacity: 0.7; 
}

.dimmed {
    filter: blur(2px); 
}

.dimmed:hover {
    filter: blur(0); 
}

.partly-deleted .delete-button {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    display: none; 
}

.partly-deleted:hover .delete-button {
    display: block; 
}
.fullscreen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.fullscreen-image {
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    display: block;
}

.fullscreen-overlay-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.fullscreen-control-button {
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 5px;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}
.fullscreen-control-button:hover {
    color: rgba(var(--bs-theme-rgb), 0.75);
}

.fullscreen-close-button {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    color: #fff;
    font-size: 2rem;
    border: none;
    cursor: pointer;
}

.clickable-image {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}

.clickable-image:hover {
    transform: scale(1.05); 
}

.profile-pic img{

    border-radius: 50%;
    box-shadow: 0px 0px 5px 0px #c1c1c1;
    cursor: pointer;
    width: 100px;
    height: 100px;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.image-container:hover .edit-overlay {
    opacity: 1;
}

#edit-button {
    background-color: white;
    color: black;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
}

.modal.modal-static {
    pointer-events: none;
}

.offcanvas.show{
    z-index: 1056;
}
.offcanvas.offcanvas-end {
    width: 600px; 
    max-width: 80%; 
}
.misspelled{
    border-bottom: 2px solid red;
}

.suggestions{
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    z-index: 999;
    padding: 5px;
    width: auto;
    max-width: 200px;
}

.suggestions ul{
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.suggestions li{
    padding: 5px;
    cursor: pointer;
}

.suggestions li:hover{
    background-color: #f0f0f0;
}

#uppy-upload .uppy-Dashboard-files {
    max-height: 400px;
}

/* Sidebar Dark Grey Background and Active Item Styling */
.app-sidebar {
    background-color: #1f222c !important;
    width: 320px !important;
}

.app-sidebar .app-sidebar-content .menu .menu-item {
    margin: 0;
    padding: 0;
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    border-radius: 0;
    transition: all 0.2s ease-in-out;
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-link .menu-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-link .menu-text {
    flex: 1;
    font-size: 0.9375rem;
    font-weight: 400;
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-link:hover .menu-icon {
    color: #ffffff;
}

.app-sidebar .app-sidebar-content .menu .menu-item.active > .menu-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12) !important;
}

.app-sidebar .app-sidebar-content .menu .menu-item.active > .menu-link .menu-icon {
    color: #ffffff !important;
}

.app-sidebar .app-sidebar-content .menu .menu-header {
    color: rgba(255, 255, 255, 0.5);
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.app-sidebar .app-sidebar-content .menu .menu-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 1.5rem;
}

/* Separators between each sidebar item */
.app-sidebar .app-sidebar-content .menu .menu-item {
    position: relative;
}

.app-sidebar .app-sidebar-content .menu .menu-item:not(.menu-header):not(.menu-divider):after {
    content: "";
    position: absolute;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 0;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="light"] .app-sidebar .app-sidebar-content .menu .menu-item:not(.menu-header):not(.menu-divider):after {
    background-color: rgba(0, 0, 0, 0.08);
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-submenu .menu-item .menu-link {
    color: rgba(255, 255, 255, 0.6);
    padding-left: 3.5rem;
}

.app-sidebar .app-sidebar-content .menu .menu-item .menu-submenu .menu-item.active > .menu-link {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Collapsible sidebar sections - submenu hidden by default, shown when expand */
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub > .menu-submenu {
    display: none;
}
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub.expand > .menu-submenu {
    display: block;
}

/* Caret/chevron for expandable items */
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub .menu-caret {
    display: inline-flex;
    align-items: center;
    margin-left: auto;
    transition: transform 0.2s ease;
}
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub .menu-caret .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 0.25rem;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    opacity: 0.7;
}
/* Suppress duplicate caret from app.css .caret:before - we use border triangle above */
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub .menu-caret .caret::before {
    display: none !important;
}
.app-sidebar .app-sidebar-content .menu .menu-item.has-sub.expand .menu-caret .caret {
    transform: rotate(180deg);
}

/* Push Management and Tools to bottom of sidebar */
.app-sidebar .app-sidebar-content .menu {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}
.app-sidebar .app-sidebar-content .menu .menu-bottom-section {
    margin-top: auto;
    padding-top: 0.5rem;
}
/* Management and Tools - clickable, user-friendly */
.app-sidebar .app-sidebar-content .menu .menu-bottom-section .menu-item.has-sub .menu-link {
    cursor: pointer;
    user-select: none;
}
.app-sidebar .app-sidebar-content .menu .menu-bottom-section .menu-item.has-sub .menu-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme="light"] .app-sidebar .app-sidebar-content .menu .menu-bottom-section .menu-item.has-sub .menu-link:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Gray Background without Grid Pattern */
.app-content {
    background-color: #f2f4f7;
    margin-left: 320px !important; /* Sidebar width */
    padding-left: 16px !important; /* Spacing with background color */
}

[data-bs-theme="dark"] .app-content {
    background-color: #2c303a;
}

/* Remove legacy pattern/cover backgrounds globally */
[data-bs-theme="light"] {
    --bs-body-bg-image: none;
    --bs-body-bg-cover: none;
}

[data-bs-theme="dark"] {
    --bs-body-bg-image: none;
    --bs-body-bg-cover: none;
}

[data-bs-theme="light"] body:before,
[data-bs-theme="light"] html:after {
    background-image: none !important;
    background-color: #f2f4f7;
}

[data-bs-theme="dark"] body:before,
[data-bs-theme="dark"] html:after {
    background-image: none !important;
    background-color: #2c303a;
}

/* Restore legacy cover background for full-width pages (login) */
.app-content-full-width {
    position: relative;
}

[data-bs-theme="light"] .app-content-full-width {
    --bs-body-bg-image: none;
    --bs-body-bg-image-size: auto;
    --bs-body-bg-cover: none;
}

[data-bs-theme="dark"] .app-content-full-width {
    --bs-body-bg-image: none;
    --bs-body-bg-image-size: auto;
    --bs-body-bg-cover: none;
}

html.bg-cover-2 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-3 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-4 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-5 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-6 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-7 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-8 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html.bg-cover-9 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-2 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-3 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-4 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-5 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-6 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-7 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-8 .app-content-full-width {
    --bs-body-bg-cover: none;
}

html[data-bs-theme="dark"].bg-cover-9 .app-content-full-width {
    --bs-body-bg-cover: none;
}

.app-content-full-width::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: var(--bs-body-bg-gradient), var(--bs-body-bg-image), var(--bs-body-bg-cover);
    background-size: cover, var(--bs-body-bg-image-size), cover;
    background-position: center, top left, center;
    background-repeat: no-repeat, repeat, no-repeat;
    z-index: -5;
}

/* Full-width pages (e.g., login) should not reserve sidebar space or override cover bg */
.app-content-full-width .app-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    background-color: transparent;
}

/* Adjust content margin and padding when sidebar is collapsed */
@media (min-width: 768px) {
    .app-sidebar-collapsed .app-content {
        margin-left: 0 !important;
        padding-left: 16px !important;
    }
    
    .app-sidebar-toggled .app-content {
        margin-left: 320px !important; /* Sidebar width */
        padding-left: 16px !important; /* Spacing with background color */
    }
}

/* Header Color Update */
.app-header {
    background-color: #4D4E56 !important;
}

.app-header .menu-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.app-header .menu-link:hover {
    color: #ffffff !important;
}

.app-header .menu-toggler .bar {
    background: rgba(255, 255, 255, 0.6) !important;
}

.app-header .menu-toggler:hover .bar {
    background: rgba(255, 255, 255, 0.9) !important;
}

.app-header .brand {
    color: #ffffff;
}

/* Match card surfaces to the home filter boxes */
.app-content .card {
    background-color: #252833;
    border-color: #343943;
}

[data-bs-theme="light"] .app-content .card {
    background-color: #ffffff;
    border-color: #d7dbe0;
}

/* Header theme toggle – hidden; app stays dark */
.theme-toggle-item {
    display: none !important;
}

/* Header theme toggle switch (placement next to bell) */
.theme-toggle-item .theme-toggle-link {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    padding: 0 0.5rem;
}

.theme-toggle-icon {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 0.4rem;
}

.theme-toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.theme-toggle-track {
    width: 40px;
    height: 20px;
    border-radius: 999px;
    background-color: #2f333b;
    border: 1px solid #3e424b;
    display: inline-flex;
    align-items: center;
    padding: 2px;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.theme-toggle-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    transform: translateX(0);
    transition: transform 0.2s ease;
}

.theme-toggle-input:checked + .theme-toggle-track {
    background-color: var(--bs-theme);
    border-color: var(--bs-theme);
}

.theme-toggle-input:checked + .theme-toggle-track .theme-toggle-thumb {
    transform: translateX(20px);
}

[data-bs-theme="light"] .theme-toggle-track {
    background-color: #cfd3d8;
    border-color: #cfd3d8;
}

[data-bs-theme="light"] .theme-toggle-icon {
    color: rgba(0, 0, 0, 0.6);
}

/* Login page */
.login-page {
    --login-bg-image: url("../images/login-bg.png");
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: #ffffff;
    position: relative;
}

.login-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)),
        var(--login-bg-image);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -2;
}

.login-page--reset {
    --login-bg-image: url("../images/login-reset-bg.png");
}

.login-page--resend {
    --login-bg-image: url("../images/login-resend-bg.png");
}

.login-card {
    width: 870px;
    max-width: 100%;
    min-height: 699px;
    padding: 64px 88px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background-image: linear-gradient(132deg, rgba(255, 255, 255, 0.12) 5%, rgba(255, 255, 255, 0.02) 61%);
    box-shadow: 0 0.75px 18px -0.75px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(24px);
}

.login-card-sm {
    min-height: 502px;
    padding: 52px 88px;
}

.login-card-md {
    min-height: 598px;
    padding: 60px 88px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    margin-bottom: 48px;
}

.login-brand-simple {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
}

.login-logo {
    width: 368px;
    height: auto;
    max-width: 100%;
}

.login-card-sm .login-logo {
    width: 368px;
}

.login-card-md .login-logo {
    width: 256px;
}

.login-brand-divider {
    width: 1px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.7);
}

.login-title {
    font-family: "Afacad", "Inter", sans-serif;
    font-size: 50px;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
}

.login-form {
    max-width: 520px;
    margin: 0 auto;
}

.login-heading {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #fffeff;
    margin-bottom: 6px;
}

.login-subheading {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #fffeff;
    margin-bottom: 28px;
}

/* Login-flow authenticator enrollment (EnableAuthenticator): wider column, rhythm, centered QR / CTA */
.login-form:has(.login-authenticator-enrollment) {
    max-width: 680px;
}

.login-card.login-card-md.login-card--authenticator-enrollment {
    min-height: auto;
}

.login-subheading--muted {
    text-align: center;
    font-size: 18px;
    font-weight: 500;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.72) !important;
    margin-bottom: 1.75rem;
}

.login-authenticator-enrollment {
    color: rgba(255, 255, 255, 0.92);
    padding-inline: 0.35rem;
}

.login-authenticator-enrollment .text-muted {
    color: rgba(255, 255, 255, 0.68) !important;
}

.login-authenticator-enrollment .manage-account-enable-auth-steps > .enable-auth-intro {
    margin-bottom: 1.25rem;
}

.login-authenticator-enrollment .enable-auth-steps-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    list-style-position: outside;
    padding-left: 1.35rem;
}

.login-authenticator-enrollment .enable-auth-step {
    margin-bottom: 0 !important;
}

.login-authenticator-enrollment .enable-auth-step > p {
    line-height: 1.55;
}

.login-authenticator-enrollment .enable-auth-form-row {
    margin-inline: 0;
    --bs-gutter-x: 0;
}

.login-authenticator-enrollment .enable-auth-form-row > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding-inline: 0;
}

.login-authenticator-enrollment .enable-auth-qr-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    padding-block: 0.65rem 0.35rem;
}

.login-authenticator-enrollment .enable-auth-qr-image {
    display: block;
    margin-top: 0.35rem;
}

.login-authenticator-enrollment kbd {
    font-size: 0.88em;
    padding: 0.22em 0.5em;
    border-radius: 4px;
    background-color: rgba(0, 0, 0, 0.38);
    border: 1px solid rgba(255, 255, 255, 0.32);
    color: #fff;
    word-break: break-all;
}

.login-authenticator-enrollment .enable-auth-verify-actions {
    max-width: 300px;
    margin-inline: auto;
    margin-top: 0.15rem;
}

.login-authenticator-enrollment .enable-auth-verify-actions .enable-auth-verify-btn {
    width: 100%;
}

.login-label {
    display: block;
    font-size: 18px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
}

.login-input-wrap {
    margin-bottom: 26px;
}

.login-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.6);
    padding: 6px 0;
    color: #ffffff;
    font-size: 16px;
    outline: none;
}

.login-input:focus {
    border-bottom-color: #ffffff;
}

.login-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #fffeff;
    margin-bottom: 24px;
}

.login-checkbox {
    width: 14px;
    height: 14px;
    border: 1px solid #d9d9d9;
    background: transparent;
    appearance: none;
    display: inline-block;
    position: relative;
}

.login-checkbox:checked {
    background: #ffffff;
}

.login-actions-row {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 28px 0 16px;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    height: 40px;
    padding: 0 26px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2.3px;
    text-transform: uppercase;
    border-radius: 2px;
    cursor: pointer;
}

/* Anchors styled as login CTAs (avoid default link underline / inline layout). */
a.login-btn {
    text-decoration: none;
}

.login-btn-primary {
    background: #ffffff;
    color: #000000;
    border: 1px solid #ffffff;
}

.login-btn-outline {
    background: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.login-external-form {
    margin: 0;
}

.login-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    font-size: 15px;
    opacity: 0.7;
    text-decoration: underline;
}

.login-links a {
    color: inherit;
    text-decoration: underline;
}

/* TinyMCE: single background color (#2E3137) for entire editor in dark theme */
[data-bs-theme="dark"] .tox.tox-tinymce,
[data-bs-theme="dark"] .tox .tox-editor-header,
[data-bs-theme="dark"] .tox .tox-menubar,
[data-bs-theme="dark"] .tox .tox-toolbar,
[data-bs-theme="dark"] .tox .tox-toolbar__primary,
[data-bs-theme="dark"] .tox .tox-toolbar__overflow,
[data-bs-theme="dark"] .tox .tox-toolbar-overlord,
[data-bs-theme="dark"] .tox .tox-statusbar,
[data-bs-theme="dark"] .tox .tox-edit-area__iframe {
    background-color: #2E3137 !important;
    background-image: none !important;
}
/* TinyMCE: dropdown menus and popups (File, Edit, Paragraph, list style, etc.) */
[data-bs-theme="dark"] .tox .tox-menu,
[data-bs-theme="dark"] .tox .tox-collection--list,
[data-bs-theme="dark"] .tox .tox-collection--toolbar,
[data-bs-theme="dark"] .tox .tox-collection--horizontal,
[data-bs-theme="dark"] .tox .tox-pop__dialog,
[data-bs-theme="dark"] .tox.tox-tinymce-aux .tox-toolbar__overflow,
[data-bs-theme="dark"] .tox .tox-dialog,
[data-bs-theme="dark"] .tox .tox-dialog__header,
[data-bs-theme="dark"] .tox .tox-dialog__body,
[data-bs-theme="dark"] .tox .tox-dialog__footer {
    background-color: #2E3137 !important;
    background-image: none !important;
}
/* TinyMCE: menu bar and toolbar buttons (so Paragraph dropdown etc match) */
[data-bs-theme="dark"] .tox .tox-mbtn,
[data-bs-theme="dark"] .tox .tox-tbtn,
[data-bs-theme="dark"] .tox .tox-tbtn:hover,
[data-bs-theme="dark"] .tox .tox-mbtn:hover:not(:disabled):not(.tox-mbtn--active),
[data-bs-theme="dark"] .tox .tox-number-input,
[data-bs-theme="dark"] .tox .tox-toolbar-textfield,
[data-bs-theme="dark"] .tox .tox-listboxfield .tox-listbox--select,
[data-bs-theme="dark"] .tox .tox-split-button {
    background-color: #2E3137 !important;
    background-image: none !important;
}
[data-bs-theme="dark"] .tox .tox-tbtn:active,
[data-bs-theme="dark"] .tox .tox-tbtn--active,
[data-bs-theme="dark"] .tox .tox-tbtn--enabled,
[data-bs-theme="dark"] .tox .tox-mbtn--active {
    background-color: #3d4552 !important;
}
[data-bs-theme="dark"] .tox-tinymce {
    border-color: #2E3137 !important;
}
[data-bs-theme="dark"] .tox .tox-editor-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .tox .tox-statusbar {
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}
[data-bs-theme="dark"] .tox .tox-menu,
[data-bs-theme="dark"] .tox .tox-pop__dialog {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* All modals – dark theme: new color (no blue) */
[data-bs-theme="dark"] .modal-backdrop {
    --bs-backdrop-bg: #252833;
}
[data-bs-theme="dark"] .modal .modal-content {
    background-color: #33363e;
    border-color: #4a4e57;
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .modal-header {
    border-bottom-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .modal-footer {
    border-top-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .modal-title {
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .modal-body {
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .btn-close {
    filter: invert(1);
}
[data-bs-theme="dark"] .modal .modal-header .btn-outline-secondary,
[data-bs-theme="dark"] .modal .modal-header .close,
[data-bs-theme="dark"] .modal .modal-footer .btn-outline-secondary {
    color: #fffeff;
    border-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .form-label {
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .form-control,
[data-bs-theme="dark"] .modal .form-select,
[data-bs-theme="dark"] .modal select {
    background-color: #33363e;
    border-color: #4a4e57;
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
[data-bs-theme="dark"] .modal .btn-outline-secondary {
    color: #fffeff;
    border-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .btn-primary {
    background-color: #0190ac;
    border-color: #0190ac;
    color: #ffffff;
}
[data-bs-theme="dark"] .modal .btn-primary:hover {
    background-color: #017a92;
    border-color: #017a92;
    color: #ffffff;
}
[data-bs-theme="dark"] .modal .picker .pc-trigger,
[data-bs-theme="dark"] .modal .picker .pc-select .pc-trigger {
    background-color: #33363e;
    border: 1px solid #4a4e57;
    color: #fffeff;
}
[data-bs-theme="dark"] .modal .picker .pc-list {
    background-color: #33363e;
    border-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .picker .pc-list li,
[data-bs-theme="dark"] .modal .picker .pc-list input[type="search"] {
    color: #fffeff;
    background-color: #33363e;
    border-color: #4a4e57;
}

/* select-picker (.pc-list) is absolutely positioned; later DOM siblings paint on top in the same
   stacking context (e.g. following .card on single-POI form, or the file column on bulk upload). */
.poi-discovery-emit-picker-stack {
    position: relative;
    z-index: 15;
}

/* Single-POI discovery: compact phone / social rows */
.poi-discovery-phone-row,
.poi-discovery-social-row {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.45rem 0.6rem;
    margin-bottom: 0.5rem;
    background-color: var(--bs-tertiary-bg);
}
[data-bs-theme="dark"] .poi-discovery-phone-row,
[data-bs-theme="dark"] .poi-discovery-social-row {
    background-color: rgba(255, 255, 255, 0.045);
    border-color: #3b3f48;
}
.poi-discovery-phone-slot-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: var(--bs-primary);
    background-color: color-mix(in srgb, var(--bs-primary) 16%, transparent);
}
.poi-discovery-phone-cc {
    width: 6.5rem;
    min-width: 5.25rem;
    flex-shrink: 0;
}
.poi-discovery-phone-num {
    min-width: 8rem;
}
.poi-discovery-phone-remove,
.poi-discovery-social-remove {
    flex-shrink: 0;
    border: none;
    background: transparent;
    color: var(--bs-secondary-color);
    padding: 0.35rem 0.5rem;
    line-height: 1;
    border-radius: 0.375rem;
}
.poi-discovery-phone-remove:hover,
.poi-discovery-phone-remove:focus-visible,
.poi-discovery-social-remove:hover,
.poi-discovery-social-remove:focus-visible {
    color: var(--bs-danger);
    background-color: color-mix(in srgb, var(--bs-danger) 14%, transparent);
}
.poi-discovery-phone-remove:focus-visible,
.poi-discovery-social-remove:focus-visible {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

[data-bs-theme="dark"] .modal .table {
    color: #fffeff;
    --bs-table-bg: #33363e;
    --bs-table-border-color: #4a4e57;
}
[data-bs-theme="dark"] .modal .table th,
[data-bs-theme="dark"] .modal .table td {
    border-color: #4a4e57;
}

/* Distribution list picker: Email/SMS as chips so they're distinct from the DL name */
.dl-channel-chip {
    font-size: 0.7em;
    margin-left: 0.15em;
    vertical-align: middle;
    pointer-events: none;
}

/* Rss/News list — story body + AnalytiX card (same components as GSOC, compact for feed cards) */
.rss-feed-item-body {
    margin-bottom: 0;
}
/* Space between story/AnalytiX block and the source link row */
.rss-feed-item-body + .card-text {
    margin-top: 1rem;
}
.rss-feed-item-original {
    margin-bottom: 0;
}
.rss-feed-item-original p {
    margin-bottom: 0;
}
.rss-feed-item-analytix-card.mailbox-detail-analytix {
    margin-top: 12px;
    padding: 8px 10px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-head {
    margin-bottom: 0;
    padding-bottom: 6px;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-title {
    font-size: 0.625rem;
    letter-spacing: 0.055em;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-metric-badge {
    font-size: 0.6rem;
    padding: 2px 7px;
    line-height: 1.25;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-disclaimer {
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 0;
    margin-top: 8px;
    padding: 6px 8px;
    border-radius: 0 0 5px 5px;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-disclaimer-icon {
    font-size: 0.85rem;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-disclaimer-title {
    font-size: 0.625rem;
}
.rss-feed-item-analytix-card .mailbox-detail-analytix-disclaimer-text {
    font-size: 0.625rem;
    line-height: 1.3;
}
