.services-menu {
    display: flex;
    gap: 4px;
    justify-content: left;
    margin-top: 15px;
    padding-left: 15px;
    padding-right: 12px;
    margin-bottom: 0;
    position: relative;
}
.services-menu.services-menu-short {
    margin-top: 12px;
    justify-content: left;
}
.services-menu li{
    list-style: none;
}
.services-menu.services-menu-short li a,
.services-menu.services-menu-short li button.services-menu-link {
    border-radius: 16px;
    background: #fff;
    height: 30px;
    min-width: 122px;
}
.services-menu li a.active,
.services-menu li button.services-menu-link.active {
    border-top: 2px solid #002FBD;
    padding-top: 2px;
    background-color: #D6E0FF;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    position: relative;
    overflow: visible;
}
.services-menu li:first-child button.services-menu-link.active span:before {
    content: '';
    position: absolute;
    left: -1px;
    bottom: -19px;
    width: 4px;
    height: 12px;
    background-color: #D6E0FF;
}
.services-menu li a.active span:after,
.services-menu li button.services-menu-link.active span:after {
    content: '';
    width: calc(100% + 2px);
    height: 16px;
    position: absolute;
    bottom: -12px;
    left: -1px;
    background-color: #D6E0FF;
}
.services-menu li button.services-menu-link.active::before {
    content: '';
    position: absolute;
    bottom: -7px;
    right: -29px;
    width: 29px;
    height: 15px;
    border-bottom-left-radius: 16px;
    box-shadow: -10px 4px 0 0 #D6E0FF;
}

.services-menu li:not(:first-child) button.services-menu-link.active::after {
    content: '';
    position: absolute;
    bottom: -7px;
    left: -29px;
    width: 29px;
    height: 15px;
    border-bottom-right-radius: 16px;
    box-shadow: 10px 4px 0 0 #D6E0FF;
}
.services-menu li a.active span,
.services-menu li button.services-menu-link.active span{
    color: #00248F;
}
.services-menu li a,
.services-menu li button.services-menu-link {
    display: flex;
    gap: 8px;
    border-radius: 8px;
    border: 1px solid #E1E4F3;
    background: #fff;
    min-width: 160px;
    justify-content: center;
    overflow: hidden;
    position: relative;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease-out, border 1ms;
    padding: 3px 7px;
    height: 36px;
    font: inherit;
    color: inherit;
    margin: 0;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.services-menu li a.toggle-quick-quotation-form,
.services-menu li button.services-menu-link.toggle-quick-quotation-form {
    background: #f6f9fa;
    color: #002FBD;
    border-color: #002FBD;
}
.services-menu li a.toggle-quick-quotation-form.active,
.services-menu li button.services-menu-link.toggle-quick-quotation-form.active {
    background: #fff;
    border-bottom: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-top: solid 1px;
    height: 46px;
    padding-bottom: 10px;
}
.services-menu li a.toggle-quick-quotation-form span,
.services-menu li button.services-menu-link.toggle-quick-quotation-form span {
    padding-right: 20px;
    position: relative;
    font-weight: 600;
}
.services-menu li a.toggle-quick-quotation-form.active svg path,
.services-menu li button.services-menu-link.toggle-quick-quotation-form.active svg path {
    fill: #002FBD;
    stroke: #002FBD;
}
.services-menu li a.toggle-quick-quotation-form.active span,
.services-menu li button.services-menu-link.toggle-quick-quotation-form.active span {
    color: #002FBD;
}
.services-menu li a.toggle-quick-quotation-form span:after,
.services-menu li button.services-menu-link.toggle-quick-quotation-form span:after {
    content: '';
    position: absolute;
    top: 1px;
    right: 0;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.2807 5.96655L8.93404 10.3132C8.4207 10.8266 7.5807 10.8266 7.06737 10.3132L2.7207 5.96655' stroke='%23002FBD' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
    background-repeat: no-repeat;
    background-size: contain;
}
.services-menu li a.toggle-quick-quotation-form.active span:after,
.services-menu li button.services-menu-link.toggle-quick-quotation-form.active span:after {
    background-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.72125 10.6982L7.06792 6.35157C7.58125 5.83824 8.42125 5.83824 8.93458 6.35157L13.2812 10.6982' stroke='%23090C4D' stroke-width='1.5' stroke-miterlimit='10' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
}

.services-menu li span {
    font-size: 13px;
    font-weight: 500;
    line-height: 18px;
    color: #5C6F9A;
    white-space: nowrap;
}
.services-menu li span.records-count {
    width: 22px;
    height: 22px;
    background: #fff;
    font-weight: 500;
    border: solid 1px #EDEFF8;
    font-size: 12px;
    border-radius: 11px;
    color: #fff;
    text-align: center;
    line-height: 22px;
}
.services-menu li a.active .records-count,
.services-menu li button.services-menu-link.active .records-count {
    background: linear-gradient(111.58deg, #021F62 -52.5%, #043FC9 100%);
}
.services-menu.services-menu-short li span.records-count {
    color: #5C6F9A;
}

body.tasks .modal .modal-body {
    color: #000;
}

.sidebar-nav ul li[data-modular-id="main_menu_team_tasks"] ul {
    padding-left: 11px;
}

#tasks-td-container tr,
[id^="tasks-td-container-"] tr {
    position: relative;
    cursor: pointer;
}
#tasks-td-container tr.text-danger .tasks_col_title *,
#tasks-td-container tr.text-danger .tasks_col_project *,
#tasks-td-container tr.text-danger .tasks_col_deadline * {
    color: #f55b5b !important;
    font-weight: 500;
}
#tasks-td-container tr.text-warning .tasks_col_title *,
#tasks-td-container tr.text-warning .tasks_col_project *,
#tasks-td-container tr.text-warning .tasks_col_deadline * {
    color: #ff9041 !important;
}
.modal .modal-dialog .modal-body .form-control {
    color: #000;
}

.tasks-cover-image {
    position: absolute;
    top: 0px;
    left: -45px;
    width: calc(100% + 45px);
    height: 100vh;
    object-fit: cover;
}

.kanban .kanban-wrapper .boards .board .board-body .content {
    overflow-x: hidden;
}
#main-body.tasks .page-titles .breadcrumb .breadcrumb-item.active {
    color: #fff;
    font-weight: 700;
}
#main-body.tasks .page-titles .breadcrumb li,
#main-body.tasks .page-titles .breadcrumb li:before {
    color: #fff;
    font-weight: 600;
}

#card-comments .comment-text a,
#card-description .x-content a,
.checklist-comments-list-wrapper .comment-text a{
    color: #007AFF !important;
    text-decoration: underline;
}
.tasks #breadcrumbs h3 {
    color: #fff !important;
    font-weight: 700;

}
.kanban.tasks #list-page-actions .list-actions-button[data-target="list-pages-stats-widget"]{
    display: none;
}
body.tasks .page-titles{
    margin-bottom: 10px;
}
.kanban.tasks #tasks-stats-wrapper {
    display: none;
}

.kanban .kanban-wrapper .boards {
    height: calc(100vh - 220px);
}
@media screen and (max-width: 1510px) {
    .kanban .kanban-wrapper .boards {
        height: calc(100vh - 260px);
    }
}
@media screen and (max-width: 1200px) {
    .kanban .kanban-wrapper .boards {
        height: calc(100vh - 290px);
    }
}

body.tasks:not(.kanban).fix-header .page-wrapper {
    padding: 0;
}
body.leads:not(.kanban).fix-header .container-fluid,
body.tasks:not(.kanban).fix-header .container-fluid {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 57px);
}
body.tasks:not(.kanban) #tasks-view-wrapper {
    margin-bottom: 0;
}
body.leads:not(.kanban) .kanban-wrapper,
body.tasks:not(.kanban) .kanban-wrapper {
    flex: 1;
    height: 100%;
    overflow-y: auto;
}



.card-modal .card-left-panel .x-action a {
    color: #007bff;
}
.topevent .x-content .x-time {
    opacity: 1;
}
.right-sidepanel-with-menu .sidepanel-notifications-mark-all-read a {
    color: #007bff;
    font-size: 14px;
}
#card-task-status .label,
#card-task-priority .label {
    margin-left: 10px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    font-size: 11px;
}
#card-task-status .label.label-default,
#card-task-priority .label.label-default {
    color: #5d5d5d;
}

.kanban-card .outdated *,
.kanban-card .outdated {
    color: #f55b5b !important;
    font-weight: 600;
}
.kanban-card .expiring *,
.kanban-card .expiring {
    color: #ff9041 !important;
    font-weight: 600;
}
.kanban-card-project > span{
    color: var(--project-color, #2163C3) !important;
    position: relative;
    padding-left: 12px;
    margin-left: 10px;
}
.kanban-card-project > span::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--project-color, #2163C3);
}
.notification-popup-parent .kanban-card-project > span::before,
.kanban-card .kanban-card-project > span::before {
    top: 8px;
}
.kanban-card .kanban-card-project > span{
    margin-left: 0;
}
#sidepanel-notifications-events .x-content {
    padding-bottom: 0;
}
#sidepanel-notifications .r-panel-body#sidepanel-notifications-body {
    overflow-y: auto !important;
}
#sidepanel-notifications #notifications-feed-load-sentinel {
    height: 1px;
    width: 100%;
    pointer-events: none;
}
#sidepanel-notifications .notifications-feed-load-trigger {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
#sidepanel-notifications .notifications-feed-loading-more {
    display: none;
    text-align: center;
    padding: 8px 0 12px;
    font-size: 13px;
    color: #5C6F9A;
}
#sidepanel-notifications .notifications-feed-loading-more.is-active {
    display: block;
}
/* Task unviewed styling */
.kanban-card.task-unviewed {
    background-color: rgba(0, 122, 255, 0.05);
}
.kanban-card.task-unviewed .x-title{
    font-weight: 700;
}

#tasks-list-table tr.task-unviewed {
    background-color: rgba(0, 122, 255, 0.05);
}
#tasks-list-table tr.task-unviewed .tasks_col_title .x-strike-through{
    font-weight: 700;
}

/* Estimates unviewed styles */
#estimates-list-table tr.estimate-unviewed,
table tr.estimate-unviewed {
    background-color: rgba(0, 122, 255, 0.05);
}
#estimates-list-table tr.estimate-unviewed td,
table tr.estimate-unviewed td {
    font-weight: 600;
}

/* Deals unviewed styles */
.deals-table tr.deal-unviewed,
table tr.deal-unviewed {
    background-color: rgba(0, 122, 255, 0.05);
}
.deals-table tr.deal-unviewed td,
table tr.deal-unviewed td {
    font-weight: 600;
}

/* Quotations unviewed styles */
.quotations-table tr.quotation-unviewed,
table tr.quotation-unviewed {
    background-color: #F9F9FB;
}
#sidepanel-notifications-events .x-name,
#sidepanel-notifications-events .x-title {
    color: #000;
}
#sidepanel-notifications-events .x-time {
    font-size: 12px;
}
#sidepanel-notifications-events .x-ref-title a {
    color: #007bff;
    font-size: 14px;
}
#sidepanel-notifications-events .x-description .label {
    margin-left: 10px;
}
#sidepanel-notifications-events .x-description a {
    word-break: break-all;
}
#sidepanel-notifications-events .x-description {
    color: #000;
    font-size: 14px;
    background-color: #ebf2f5;
    border-radius: 5px;
    padding: 5px 10px;
}
#sidepanel-notifications-events .top-nav-no-evenets {
    padding-top: calc(50vh - 100px);
}
#sidepanel-notifications-events .top-nav-no-evenets svg {
    margin-bottom: 12px;
}
#sidepanel-notifications-events .top-nav-no-evenets .x-message {
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    color: #000;
}

#card-attachments-container .x-actions .js-delete-ux-confirm {
    color: #dc3545 !important;
}

/* Video attachment preview styles */
.video-attachment-preview {
    position: relative;
}

.video-preview-container {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
}

.video-preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.video-play-icon {
    font-size: 48px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    transition: all 0.3s ease;
}

.video-preview-container:hover .video-play-icon {
    color: #fff;
    transform: scale(1.1);
}

.video-extension-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0px 4px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 20px;
    z-index: 3;
}

.preview-video-thumb {
    display: block;
    text-decoration: none;
}

.preview-video-thumb:hover {
    text-decoration: none;
}

/* Video modal styles (fancybox style) */
.video-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.video-modal-overlay:not([style*="display: none"]) {
    opacity: 1;
}

.video-modal-container {
    position: relative;
    max-width: 95vw;
    width: 95vw;
    max-height: 90vh;
    background: #000;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.video-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    padding: 0;
}

.video-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.video-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
}

.video-modal-title {
    position: absolute;
    top: 10px;
    left: 15px;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 10px;
    border-radius: 4px;
    max-width: calc(100% - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.video-modal-body {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#videoPlayer {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    background: #000;
}

body.video-modal-open {
    overflow: hidden;
}

/* Document attachment preview styles */
.document-attachment-preview {
    position: relative;
}

.document-preview-container {
    position: relative;
    width: 100%;
    background: linear-gradient(135deg, #007AFF 0%, #0056CC 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    min-height: 80px;
}

.document-preview-container:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.document-icon {
    font-size: 36px;
    color: rgba(255, 255, 255, 0.9);
    z-index: 2;
    transition: all 0.3s ease;
}

.document-preview-container:hover .document-icon {
    color: #fff;
    transform: scale(1.1);
}

.document-extension-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 0px 4px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 20px;
    z-index: 3;
}

.preview-document-thumb {
    display: block;
    text-decoration: none;
}

.preview-document-thumb:hover {
    text-decoration: none;
}

/* Document modal styles (fancybox style - same as video) */
.document-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.document-modal-overlay:not([style*="display: none"]) {
    opacity: 1;
}

.document-modal-container {
    position: relative;
    max-width: 95vw;
    width: 95vw;
    max-height: 90vh;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.document-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    color: #333;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 20px;
    padding: 0;
}

.document-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.1);
    color: #000;
}

.document-modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.document-modal-title {
    position: absolute;
    top: 10px;
    left: 15px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    background: rgba(255, 255, 255, 0.9);
    padding: 5px 10px;
    border-radius: 4px;
    max-width: calc(100% - 80px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.document-modal-body {
    position: relative;
    width: 100%;
    height: 90vh;
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    padding: 50px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

/* PDF viewer styles */
.pdf-viewer-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 4px;
}

.pdf-viewer-container canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.pdf-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 4px;
}

.pdf-nav-btn {
    background: #007AFF;
    color: #fff;
    border: 1px solid #0056CC;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
}

.pdf-nav-btn:hover:not(:disabled) {
    background: #0056CC;
    transform: scale(1.05);
}

.pdf-nav-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #bbb;
}

.pdf-page-info {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Text document styles */
.text-document-content {
    background: #fff;
    padding: 20px;
    border-radius: 4px;
    max-width: 100%;
    overflow-x: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Document loading and error styles */
.document-loading,
.document-error,
.document-unsupported {
    text-align: center;
    padding: 40px 20px;
    background: #f5f5f5;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.document-loading {
    color: #333;
    font-size: 16px;
}

.document-error {
    color: #dc3545;
}

.document-unsupported {
    color: #333;
}

.document-unsupported a {
    margin-top: 15px;
    display: inline-block;
    color: #007AFF;
}

.document-unsupported a:hover {
    color: #0056CC;
}

.document-error a {
    color: #dc3545;
    text-decoration: underline;
}

.document-error a:hover {
    color: #c82333;
}

body.document-modal-open {
    overflow: hidden;
}

/* Google Docs Viewer iframe styles */
.google-docs-viewer {
    width: 100%;
    min-height: 80vh;
    border: none;
    background: #fff;
}
#card-right-panel .x-section .confirm-action-danger[data-ajax-type="DELETE"]{
    background-color: #dc3545;
    color: #fff;
}
#card-right-panel .x-section .confirm-action-danger[data-ajax-type="DELETE"] .x-highlight{
    color: #fff;
    line-height: 20px;
}
#topnav-notification-icon .heartbit{
    border-color: #D32F2F;
}
#topnav-notification-icon .point{
    background-color: #D32F2F;
}
.card-comments-unread-dot {
    display: block;
    position: absolute;
    top: 11px;
    right: 9px;
    width: 8px;
    min-width: 8px;
    height: 8px;
    min-height: 8px;
    background: #BD0000;
    border: 1px solid #fff;
    border-radius: 50%;
    box-sizing: border-box;
    z-index: 2;
    flex: none;
    pointer-events: none;
}
#right-topnav-navbar .nav-link i.sl-icon-bubbles {
    color: #43A047;
}
.topnav-reminders-icon.due i {
    color: #D32F2F !important;
}
.topnav-reminders-icon.due i.ti-alarm-clock {
    display: inline-block;
    animation: shake 0.4s infinite;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    20% { transform: rotate(8deg); }
    40% { transform: rotate(-8deg); }
    60% { transform: rotate(6deg); }
    80% { transform: rotate(-6deg); }
    100% { transform: rotate(0deg); }
}
#card-comments-container .comment-text{
    font-weight: 400;
    color: #000;
}

#chat-messages-container .chat-content h5 {
    color: #000;
}
.chat-main-box .chat-rbox .chat-list li .chat-content .box .x-text{
    font-size: 15px;
    color: #000;
    font-weight: 400;
}
#card-task-project-link {
    color: var(--project-color, #2163C3);
    font-size: 13px;
    font-weight: 600;
    padding: 1px 10px;
    border-radius: 5px;
    display: inline-block;
    border: solid 1px var(--project-color, #2163C3);
}
#card-task-project-link.hidden {
    display: none;
}

/* Notification Popups - Bottom Right Corner */
#notification-popups-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.notification-popup {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    min-width: 360px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: all;
    position: relative;
    border-left: 4px solid #007AFF;
}

.notification-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-popup-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.notification-popup-close:focus {
    outline: none;
}

.notification-popup-close:hover {
    background: #f5f5f5;
    color: #333;
}

.notification-popup-content {
    display: flex;
    gap: 12px;
}

.notification-popup-avatar {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
}

.notification-popup-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.notification-popup-body {
    flex: 1;
    min-width: 0;
}

.notification-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
    gap: 8px;
}

.notification-popup-creator {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-popup-time {
    display: none;
}

.notification-popup-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-popup-message {
    font-size: 13px;
    color: #666;
    background-color: #ebf2f5;
    border-radius: 5px;
    padding: 5px 10px;
    margin-top: 4px;
    line-height: 1.4;
    word-wrap: break-word;
}

.notification-popup-parent {
    margin-top: 8px;
    font-size: 12px;
}

.notification-popup-parent a {
    color: #007AFF;
    text-decoration: none;
    font-weight: 500;
}

.notification-popup-parent a:hover {
    text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #notification-popups-container {
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
    }
    
    .notification-popup {
        min-width: 280px;
        max-width: 100%;
    }
}

.main-content .table-stats-cards {
    gap: 10px;
}
.main-content .table-stats-cards .card-body {
    padding: 10px 20px 10px 25px;
}
.main-content .table-stats-cards .card {
    flex: none;
    border-radius: 10px;
    backdrop-filter: blur(20px);
    background-color: rgb(0, 0, 0, 0.2);
}
.main-content .table-stats-cards .card.bs-lime.active,
.main-content .table-stats-cards .card.bs-lime:hover {
    box-shadow: 0 7px 10px -3px #cddc39;
}
.main-content .table-stats-cards .card.bs-info.active,
.main-content .table-stats-cards .card.bs-info:hover {
    box-shadow: 0 7px 10px -3px #2163C3;
}
.main-content .table-stats-cards .card.bs-success.active,
.main-content .table-stats-cards .card.bs-success:hover {
    box-shadow: 0 7px 10px -3px #24d2b5;
}
.main-content .table-stats-cards .card.bs-warning.active,
.main-content .table-stats-cards .card.bs-warning:hover {
    box-shadow: 0 7px 10px -3px #ff9041;
}
.main-content .table-stats-cards .card.bs-purple.active,
.main-content .table-stats-cards .card.bs-purple:hover {
    box-shadow: 0 7px 10px -3px #7460ee;
}
.main-content .table-stats-cards .card.bs-danger.active,
.main-content .table-stats-cards .card.bs-danger:hover {
    box-shadow: 0 7px 10px -3px #007AFF;
}

.main-content .table-stats-cards h3 {
    display: none
}
.main-content .table-stats-cards .card-subtitle {
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
}
.main-content .table-stats-cards .card .progress.dynamic-list {
    position: absolute;
    bottom: 12px;
    left: 8px;
    height: 10px !important;
    width: 10px !important;
}
.main-content .table-stats-cards .card .progress .progress-bar {
    height: 10px !important;
    width: 10px !important;
}
.card-modal .card-left-panel .card-comments .comment-row .comment-avatar img {
    object-fit: cover;
}
.avatar-xsmall {
    height: 30px;
    max-height: 30px;
    object-fit: cover;
}

#reminders-datetimepicker-quick {
    max-width: 250px;
    margin-top: 10px;
}
#reminders-datetimepicker-quick .timepicker {
    background-color: #fff;
}

.reaction-picker {
    display: none !important;
}
.reaction-picker.show {
    display: flex !important;
    flex-direction: row;
}

.select2-search.select2-search--inline {
    padding: 5px 0;
}
.notification-popup-message {
    max-height: 160px;
    overflow: hidden;
}
.notification-popup-message img {
    max-width: 100%;
}
.sidebar-nav ul li ul {
    padding-left: 40px;
}
#card-task-deal-select-wrapper > .select2,
#card-task-quotation-select-wrapper > .select2 {
    min-width: 160px;
}

#subtasks-list .strikethrough-text a{
    text-decoration: line-through;
}
.event-item-content {
    word-break: break-word;
}
.event-item-content .new {
    background-color: #e6ffed;
    padding: 0 2px;
    border-radius: 2px;
}
.event-item-content .crossed {
    text-decoration: line-through;
    color: #999;
}

/* Client modal: related lists (contracts etc.) — card-embed-fix negative margins stack sections on each other */
.client-modal-related-embed .card-embed-fix {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}
.client-modal-related-embed .page-titles__actions {
    position: relative;
    z-index: 2;
    margin-bottom: 10px;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    box-sizing: border-box;
}
.client-modal-related-embed #list-page-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
    min-height: 38px;
    box-sizing: border-box;
}
.client-modal-related-embed #list-page-actions > div:empty {
    display: none !important;
}
/* Outside .page-titles embed has no _base.scss flex — Bootstrap .btn-group floats stack; force row */
.client-modal-related-embed #list-page-actions .filter-container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    float: none;
    clear: both;
}
.client-modal-related-embed #list-page-actions .filter-container > .btn-group {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    float: none;
}
.client-modal-related-embed #list-page-actions .filter-container .list-actions-button,
.client-modal-related-embed #list-page-actions .filter-container .js-toggle-side-panel {
    flex-shrink: 0;
    float: none;
}
.client-modal-related-embed #list-page-actions .filter-container .ptg-btn.ptg-btn-add {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    height: auto;
    white-space: nowrap;
    margin: 0;
    float: none;
}
.client-modal-related-embed #list-page-actions .filter-container #header-search.dropdown-menu {
    position: absolute;
    top: 100%;
    left: auto;
    right: 0;
    margin-top: 6px;
    z-index: 1060;
}

/* Client modal -> «Документы» tab: same embed as .client-modal-related-embed, plus table/stats polish */
#client-modal-contracts-tab .card-embed-fix {
    margin: 0;
}
#client-modal-contracts-tab #list-page-actions-container {
    margin-bottom: 10px;
}
#client-modal-contracts-tab #contracts-stats-wrapper {
    margin-top: 0;
    margin-bottom: 10px;
}
#client-modal-contracts-tab .ptg-table {
    overflow-x: auto;
    border-radius: 8px;
}
#client-modal-contracts-tab #contracts-list-table {
    min-width: 760px;
}

.mini-sidebar .topbar #topnav-logo-container {
    justify-content: center;
}

.mini-sidebar .left-sidebar #sidebarnav li > a{
    max-width: 44px;
    position: relative;
    padding: 11px 12px;
}

.mini-sidebar .left-sidebar #sidebarnav li > a .mail-menu-badge {
    width: 14px;
    height: 14px;
    border: solid 1px #fff;
    font-size: 8px;
    line-height: 12px;
    top: 8px;
    right: 8px;
}
.settings .navbar-header .sidebartoggler {
    display: none;
}