/*Write your custom css in this file.*/


.kanban-item-list {
  max-height: none !important;
  height: auto !important;
  overflow: visible !important;
}

.modal-header .modal-title {
    margin-top: 0;
    font-size: 20px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: calc(100% - 40px);
}

.page-title h1 {
    font-size: 24px;
    margin: 0;
    padding: 20px 16px;
    float: left;
    font-weight: 800;
    text-transform: uppercase;
}

/* Task ID badge in headers */
.task-id-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: #495057;
    font-size: 13px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    vertical-align: middle;
    line-height: 1.4;
    text-transform: none;
    flex-shrink: 0;
}

/* Page view: allow long titles to wrap */
.page-title h1 .task-header-title {
    vertical-align: middle;
    white-space: normal;
    word-break: break-word;
    text-transform: none;
}

/* Modal: task title link inherits color, no blue */
.task-title-link,
.task-title-link:hover,
.task-title-link:focus,
.task-title-link:active,
.task-title-link:visited {
    color: inherit !important;
    text-decoration: none !important;
}

/* Hide redundant body title — title is now in the header */
.task-title-right {
    display: none !important;
}

/* Modal: truncate long task titles with ellipsis */
.modal-header .modal-title .task-title-link {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Notification comment preview — limit to ~4 lines with ellipsis */
.notification-comment-preview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notification-comment-preview img {
    display: none;
}

/* Change task badge size */
.badge {
    padding: 4px 10px;
    font-weight: 700;
    font-size: 0.75rem;
    margin-top: 0;
}

/* Change default theme colors (light mode base — dark theme overrides via 1E202D.css) */
.sidebar-scroll,
#timeline .post-content .post-date span {
  background: #2471a3;
}

.sidebar-menu li a {
  color: rgba(255, 255, 255, 0.8);
}
.sidebar-menu li a:active,
.sidebar-menu li a:hover,
.sidebar-menu li a:focus {
  color: #FFF;
  background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-menu li ul li a {
  color: rgba(255, 255, 255, 0.8);
}
.sidebar-menu li ul li a:hover {
  color: #FFF;
  background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-menu li.active > a {
  color: #FFF;
  background-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggled .sidebar-menu li:hover {
  background-color: #2471a3;
}

.nav-tabs li a:hover, .nav-tabs li a:focus, .nav-tabs li a:active {
  color: #2471a3 !important;
}
.nav-tabs li .active, .nav-tabs li.active {
  color: #2471a3 !important;
}
.nav-tabs li:not(.title-tab) a::after {
  background-color: #2471a3;
}

.list-group-item.active {
  background: #2471a3;
  border-color: #2471a3;
}
.list-group-item.active:focus, .list-group-item.active:hover {
  background: #2471a3;
  border-color: #2471a3;
}

.btn-primary {
  background-color: #2471a3;
  border-color: #2471a3;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
  background-color: #1f618d !important;
  border-color: #1f618d !important;
  color: #FFF;
}

.bg-success {
  background-color: #1f618d !important;
}

a {
  color: #1f618d;
}
a:hover, a:focus, a:active {
  color: #154360;
}

.circle-done {
  color: #2471a3;
}

.app-alert.alert-success {
  background-color: #1f618d;
  color: #fff;
}

.bg-dark-success {
  background: #154360;
}

.dataTable tbody tr.active td, .dataTable tbody tr.active:hover td {
  background: #2471a3 !important;
}

td.dropdown-option button:hover {
  background: #2471a3;
  border-color: #2471a3;
}

.select2-results .select2-highlighted {
  background-color: #2471a3;
}

.datepicker table tr td.active.active {
  background: #2471a3;
  border-color: #2471a3;
}
.datepicker table tr td.active.active:hover {
  background: #2471a3;
  border-color: #2471a3;
}
.datepicker table tr td span.active.active, .datepicker table tr td span.active:hover.active {
  background: #2471a3;
  border-color: #2471a3;
}
.datepicker table tr td span.active.disabled.active, .datepicker table tr td span.active.disabled:hover.active {
  background: #2471a3;
  border-color: #2471a3;
}
.datepicker table tr td span.active.active:hover {
  background: #2471a3;
  border-color: #2471a3;
}

.atwho-view .cur,
.note-hint-group .active,
.note-hint-item:hover {
  background-color: #2471a3 !important;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}
.sidebar-scroll::-webkit-scrollbar-thumb:active {
  background: rgba(255, 255, 255, 0.2);
}

@media (min-width: 991px) {
  .sidebar {
    background: #2471a3;
  }
}
.bg-primary {
  background-color: #2471a3 !important;
}

.sidebar-brand {
  background-color: #2471a3;
  border-bottom-color: rgba(0, 0, 0, 0.1);
}

@media (max-width: 500px) {
  .sidebar.sidebar-off {
    background-color: #2471a3;
  }
  .sidebar .sidebar-scroll {
    border-top-color: rgba(0, 0, 0, 0.1);
  }
  .sidebar #personal-language-icon,
  .sidebar .sidebar-toggle-btn {
    color: rgba(255, 255, 255, 0.8);
  }
}
.form-check-input:checked {
  background-color: #2471a3 !important;
  border-color: #2471a3 !important;
}

/* Kanban Column Width Override - Bootstrap Override */
#kanban-container .kanban-col,
#kanban-wrapper .kanban-col,
.kanban-container .kanban-col {
    width: 300px !important;
    max-width: 300px !important;
    min-width: 300px !important;
    flex: 0 0 300px !important;
    flex-basis: 300px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

/* Override Bootstrap responsive behavior */
@media (min-width: 576px) {
    #kanban-container .kanban-col {
        width: 300px !important;
        max-width: 300px !important;
        flex: 0 0 300px !important;
    }
}

@media (min-width: 768px) {
    #kanban-container .kanban-col {
        width: 300px !important;
        max-width: 300px !important;
        flex: 0 0 300px !important;
    }
}

@media (min-width: 992px) {
    #kanban-container .kanban-col {
        width: 300px !important;
        max-width: 300px !important;
        flex: 0 0 300px !important;
    }
}

@media (min-width: 1200px) {
    #kanban-container .kanban-col {
        width: 300px !important;
        max-width: 300px !important;
        flex: 0 0 300px !important;
    }
}

/* Mobile override */
@media (max-width: 767px) {
    #kanban-container .kanban-col {
        width: 240px !important;
        max-width: 240px !important;
        flex: 0 0 240px !important;
    }
}

/* Content adjustments for 300px columns */
#kanban-container .kanban-col .kanban-col-title {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 10px 12px !important;
    box-sizing: border-box !important;
    font-weight: 800 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 5px 5px 0 0 !important;
}

#kanban-container .kanban-col .kanban-item-list {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#kanban-container .kanban-col .kanban-item {
    width: 100% !important;
    max-width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin: 0 0 8px 0 !important;
    padding: 10px !important;
    box-sizing: border-box !important;
    display: block !important;
    border-radius: 0 !important;
}

/* First kanban item gets no top gap (flush with title) */
#kanban-container .kanban-col .kanban-item-list .kanban-item:last-child {
    border-radius: 0 0 5px 5px !important;
    margin-bottom: 0 !important;
}

/* Ensure task content fits within columns */
#kanban-container .kanban-item .text-truncate {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

#kanban-container .kanban-item .float-start,
#kanban-container .kanban-item .float-end {
    max-width: 48% !important;
}

#kanban-container .kanban-item .meta {
    max-width: 100% !important;
    word-break: break-word !important;
}

#kanban-container .kanban-item .badge {
    font-size: 11px !important;
    padding: 2px 6px !important;
}

/* Task description image containment */
.task-view-modal-body .text-wrap {
    overflow: hidden; /* Hide any content that overflows */
    word-wrap: break-word; /* Break long words */
}

.task-view-modal-body .text-wrap img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px 0;
    box-sizing: border-box;
}

/* Alternative approach using object-fit for better control */
.task-view-modal-body .text-wrap img {
    max-width: 100% !important;
    max-height: 400px; /* Set a reasonable max height */
    width: auto !important;
    height: auto !important;
    object-fit: contain; /* Maintain aspect ratio while fitting container */
    display: block;
    margin: 10px auto; /* Center the image */
}

/* For the page details view as well */
.task-preview .text-wrap {
    overflow: hidden;
    word-wrap: break-word;
}

.task-preview .text-wrap img {
    max-width: 100% !important;
    height: auto !important;
    display: block;
    margin: 10px 0;
    object-fit: contain;
}

/* Task Attachments - Gmail-style cards */
.task-attachments-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 4px 0;
}

.task-attachment-card {
    display: flex;
    align-items: center;
    width: 220px;
    min-width: 220px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    overflow: visible;
    background: #f8f9fa;
    transition: background 0.15s, border-color 0.15s;
    position: relative;
}

.task-attachment-card:hover {
    background: #eef0f2;
    border-color: #c0c4c8;
}

.task-attachment-preview {
    width: 48px;
    height: 48px;
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8eaed;
    overflow: hidden;
}

.task-attachment-preview img {
    width: 48px;
    height: 48px;
    object-fit: cover;
}

.task-attachment-preview a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.task-attachment-remove {
    position: absolute;
    top: -7px;
    right: -7px;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background: #d93025;
    border-radius: 50%;
    border: 2px solid #fff;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.task-attachment-remove:hover {
    background: #b71c1c;
}

.task-attachment-card:hover .task-attachment-remove {
    opacity: 1;
}

.task-attachment-icon-link {
    color: #5f6368 !important;
    text-decoration: none !important;
}

.task-attachment-info {
    flex: 1;
    min-width: 0;
    padding: 6px 8px;
    overflow: hidden;
}

.task-attachment-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #202124 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    text-decoration: none !important;
}

.task-attachment-name:hover {
    color: #1a73e8 !important;
}

.task-attachment-meta {
    display: block;
    font-size: 11px;
    color: #5f6368;
    line-height: 1.3;
}

.task-attachment-action {
    padding: 8px;
    color: #5f6368 !important;
    flex-shrink: 0;
    text-decoration: none !important;
    opacity: 0;
    transition: opacity 0.15s;
}

.task-attachment-card:hover .task-attachment-action {
    opacity: 1;
}

.task-attachment-action:hover {
    color: #202124 !important;
}

/* Responsive: full-width cards on very small screens */
@media (max-width: 500px) {
    .task-attachment-card {
        width: 100%;
        min-width: 100%;
    }
    .task-attachment-action,
    .task-attachment-remove {
        opacity: 1;
    }
}

/* ========== PDF Preview Button ========== */
.pdf-preview-btn {
    color: #5f6368 !important;
    text-decoration: none !important;
    margin-right: 3px;
}
.pdf-preview-btn:hover {
    color: #1f618d !important;
}

/* ========== Epic Task Styles ========== */

/* Epic kanban card bar */
.kanban-item:has(.epic-kanban-bar) {
    overflow: hidden;
}
.epic-kanban-bar {
    height: 6px;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    margin: -10px -10px 8px -10px;
}

/* Epic badge */
.epic-id-badge {
    background: #7c3aed;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    margin-right: 5px;
    vertical-align: middle;
}

/* Epic name link on child tasks */
.epic-link {
    color: #7c3aed;
    font-size: 12px;
}
.epic-link i {
    color: #7c3aed !important;
}
.epic-link a {
    color: #7c3aed;
}
.epic-link a:hover {
    color: #5b21b6;
}

/* Epic linked task rows in task detail */
.epic-linked-task-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
}
.epic-linked-task-number {
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 3px;
    white-space: nowrap;
    flex-shrink: 0;
}
.epic-linked-task-title {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
}
.epic-linked-task-status {
    flex-shrink: 0;
}
.epic-linked-task-unlink {
    flex-shrink: 0;
    color: #999;
    margin-left: 5px;
}
.epic-linked-task-unlink:hover {
    color: #e74c3c;
}

/* ========== Dashboard Compaction & Widget Coloring ========== */

/* --- Page padding reduction (dashboard only) --- */
.dashboard-view {
    padding: 15px !important;
}
@media (max-width: 767px) {
    .dashboard-view {
        padding: 8px !important;
    }
}

/* --- Dashboard header compaction --- */
.dashboard-view .dashbaord-header-area {
    margin-bottom: 8px;
}
.dashboard-view .dashbaord-header-area h4 {
    font-size: 1rem;
    margin: 0;
    line-height: 34px;
}

/* --- Card & row spacing reduction --- */
.dashboard-view .card {
    margin-bottom: 10px;
}
.dashboard-view .dashboards-row {
    margin-bottom: 0;
    align-items: flex-start;
}

/* --- Widget card bodies: cap height and scroll when needed --- */
.dashboard-view .dashboards-row:not(.icon-widgets-row) > .widget-container > .card > .card-body,
.dashboard-view .dashboards-row:not(.icon-widgets-row) > .widget-container > .card > .table-responsive {
    max-height: 500px;
    overflow-y: auto;
}

/* --- Scroll: let page scroll resume at widget boundaries --- */
.dashboard-view .card-body,
.dashboard-view .table-responsive,
.dashboard-view [id$="-container"],
.dashboard-view [id$="-list"],
.todo-widget .todo-list {
    overscroll-behavior-y: auto;
}

/* --- Card header compaction --- */
.dashboard-view .card .card-header {
    min-height: 50px;
    padding: 8px 14px;
}
/* Only add flex when not already using d-flex (Bootstrap) */
.dashboard-view .card .card-header:not(.d-flex) {
    display: flex;
    align-items: center;
}
/* Keep d-flex headers from wrapping the action buttons */
.dashboard-view .card .card-header.d-flex {
    flex-wrap: nowrap;
    gap: 8px;
}
.dashboard-view .card .card-header.d-flex > div:last-child {
    flex-shrink: 0;
    white-space: nowrap;
}
.dashboard-view .card .card-header.d-flex > span:first-child,
.dashboard-view .card .card-header.d-flex > strong:first-child {
    flex: 1;
    min-width: 0;
}

/* ===== Icon widgets row (top 4 widgets only) ===== */

/* --- Icon row needs stretch so all stat cards match height --- */
.dashboard-view .dashboards-row.icon-widgets-row {
    align-items: stretch;
}

/* --- Uniform height: flex stretch chain --- */
.dashboard-view .icon-widgets-row > .widget-container {
    display: flex;
}
.dashboard-view .icon-widgets-row > .widget-container > a {
    display: flex;
    flex: 1;
}
.dashboard-view .icon-widgets-row .dashboard-icon-widget {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* --- Header label (full descriptive text at top of card) --- */
.dashboard-view .icon-widgets-row .widget-header-label {
    padding: 8px 15px 0;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Card body: icon + abbreviated label + number --- */
.dashboard-view .icon-widgets-row .dashboard-icon-widget .card-body {
    padding: 6px 15px 12px;
    display: flex;
    align-items: center;
    flex: 1;
}
.dashboard-view .icon-widgets-row .widget-icon {
    float: none;
    flex-shrink: 0;
    height: 36px;
    width: 36px;
}
.dashboard-view .icon-widgets-row .widget-icon .icon {
    width: 1.2rem;
    height: 1.2rem;
}

/* --- Widget details: abbreviated label left, number right --- */
.dashboard-view .icon-widgets-row .widget-details {
    position: static;
    right: auto;
    text-align: left;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-left: 10px;
    padding-right: 4px;
}
.dashboard-view .icon-widgets-row .widget-details h1 {
    margin: 0;
    white-space: nowrap;
    font-size: 1.6rem;
}
.dashboard-view .icon-widgets-row .dashboard-icon-widget .widget-details span {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* --- Colored backgrounds by position (scoped to icon-widgets-row) --- */
.dashboard-view .icon-widgets-row > .widget-container:nth-child(1) .dashboard-icon-widget {
    background: #2471a3;
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(2) .dashboard-icon-widget {
    background: #1abc9c;
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(3) .dashboard-icon-widget {
    background: #8e44ad;
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(4) .dashboard-icon-widget {
    background: #e67e22;
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(5) .dashboard-icon-widget {
    background: #2c3e50;
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(6) .dashboard-icon-widget {
    background: #c0392b;
}

/* --- White text and icons for colored icon widgets --- */
.dashboard-view .icon-widgets-row .dashboard-icon-widget .widget-details h1,
.dashboard-view .icon-widgets-row .dashboard-icon-widget .widget-details span {
    color: #fff;
}
/* Override the white pill background inside colored icon widgets */
.dashboard-view .icon-widgets-row .dashboard-icon-widget .bg-transparent-white {
    background: rgba(255, 255, 255, 0.2) !important;
}
.dashboard-view .icon-widgets-row .dashboard-icon-widget .bg-transparent-white a {
    color: #fff !important;
}
.dashboard-view .icon-widgets-row .widget-icon {
    background: rgba(255, 255, 255, 0.2) !important;
}
.dashboard-view .icon-widgets-row .widget-icon .icon {
    color: #fff !important;
}

/* --- Clock widget button styling --- */
.dashboard-view .icon-widgets-row .clock-in-out-card .btn {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    padding: 4px 10px;
    line-height: 1;
}
.dashboard-view .icon-widgets-row .clock-in-out-card .btn svg {
    width: 16px;
    height: 16px;
}

/* --- Clock running active state --- */
.clock-in-out-card {
    position: relative;
    overflow: hidden;
}

/* Green left border accent when clocked in */
.clock-active-indicator {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: #2ecc71;
    border-radius: 4px 0 0 4px;
    z-index: 2;
}

/* Pulsing green dot next to the time label */
.clock-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #2ecc71;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
    animation: clockPulse 1.5s ease-in-out infinite;
}

@keyframes clockPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); }
}

/* Running label style */
.clock-running-label {
    font-weight: 600 !important;
}

/* --- Dashboard row: ensure widgets in same row stay side-by-side --- */
.dashboard-view .dashboards-row {
    display: flex;
    flex-wrap: wrap;
}
.dashboard-view .dashboards-row > .widget-container {
    display: flex;
    flex-direction: column;
}
.dashboard-view .dashboards-row > .widget-container > .card {
    flex: 1;
}

/* --- Project timeline compaction --- */
#project-timeline-container .d-flex.border-bottom {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0.25rem;
}
#project-timeline-container .card-body {
    padding: 10px;
}
#project-timeline-container p {
    margin-bottom: 0.25rem;
}
#project-timeline-container .card-title {
    margin-bottom: 0.25rem;
}
#project-timeline-container ul {
    margin-bottom: 0.25rem;
    padding-left: 1.2rem;
}

/* ========== Code Block Styles (TinyMCE codesample / Prism.js) ========== */

/* Code blocks in task descriptions, comments, and other rendered content */
pre[class*="language-"],
pre.language-markup,
pre.language-none {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 16px;
    margin: 12px 0;
    overflow-x: auto;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    tab-size: 4;
    white-space: pre;
    word-break: normal;
    word-wrap: normal;
}

pre[class*="language-"] code,
pre.language-none code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
    font-family: inherit;
    color: inherit;
}

/* Inline code (backtick-style) */
code:not([class*="language-"]) {
    background: #f0f0f0;
    border-radius: 3px;
    padding: 2px 6px;
    font-size: 0.9em;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    color: #c7254e;
}

/* Dark mode code blocks */
body[data-color="1E202D"] pre[class*="language-"],
body[data-color="1E202D"] pre.language-none {
    background: #1e1e2e;
    border-color: #333;
    color: #cdd6f4;
}

body[data-color="1E202D"] code:not([class*="language-"]) {
    background: #2a2a3c;
    color: #f38ba8;
}

/* ========== AI Chat Entity Links ========== */

.ai-entity-link {
    color: #2471a3;
    text-decoration: underline;
    font-weight: 500;
    cursor: pointer;
}

.ai-entity-link:hover {
    color: #154360;
    text-decoration: underline;
}

/* AI chat message code blocks */
#pm-ai-chat-messages pre {
    background: #f5f5f5;
    border-radius: 4px;
    padding: 8px;
    margin: 4px 0;
    font-size: 12px;
    overflow-x: auto;
}

#pm-ai-chat-messages code {
    font-size: 12px;
    font-family: 'SFMono-Regular', Consolas, monospace;
}

/* ========== (1) Subtle Gradients ========== */

/* Sidebar logo area gradient */
.sidebar-brand {
    background: linear-gradient(135deg, #2471a3 0%, #1a5276 100%);
}

/* Sidebar background gradient */
.sidebar-scroll,
.sidebar {
    background: linear-gradient(180deg, #2471a3 0%, #1b5e85 100%);
}
@media (min-width: 991px) {
    .sidebar {
        background: linear-gradient(180deg, #2471a3 0%, #1b5e85 100%);
    }
}
@media (max-width: 500px) {
    .sidebar.sidebar-off {
        background: linear-gradient(180deg, #2471a3 0%, #1b5e85 100%);
    }
}

/* Submit / save buttons */
.btn-primary {
    background: linear-gradient(135deg, #2980b9 0%, #2471a3 100%) !important;
    border-color: #2471a3 !important;
    transition: all 0.2s ease;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:focus {
    background: linear-gradient(135deg, #2471a3 0%, #1a5276 100%) !important;
    border-color: #1a5276 !important;
    box-shadow: 0 2px 8px rgba(36, 113, 163, 0.35);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%) !important;
    border-color: #1e8449 !important;
    color: #fff !important;
    transition: all 0.2s ease;
}
.btn-success:hover, .btn-success:active, .btn-success:focus {
    background: linear-gradient(135deg, #1e8449 0%, #196f3d 100%) !important;
    border-color: #196f3d !important;
    box-shadow: 0 2px 8px rgba(30, 132, 73, 0.35);
    color: #fff !important;
}

/* bg-info */
.bg-info {
    background: linear-gradient(135deg, #5dade2 0%, #2e86c1 100%) !important;
}

/* bg-success */
.bg-success {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%) !important;
}

/* Dashboard icon widget gradients */
.dashboard-view .icon-widgets-row > .widget-container:nth-child(1) .dashboard-icon-widget {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(2) .dashboard-icon-widget {
    background: linear-gradient(135deg, #1abc9c 0%, #148f77 100%);
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(3) .dashboard-icon-widget {
    background: linear-gradient(135deg, #9b59b6 0%, #7d3c98 100%);
}
.dashboard-view .icon-widgets-row > .widget-container:nth-child(4) .dashboard-icon-widget {
    background: linear-gradient(135deg, #e67e22 0%, #ca6f1e 100%);
}

/* Gantt chart — refined colors */
.gantt .bar {
    fill: #85c1e9;
    stroke: #5dade2;
    stroke-width: 0;
    rx: 3;
    ry: 3;
}
.gantt .bar-progress {
    fill: #2e86c1;
    rx: 3;
    ry: 3;
}
.gantt .bar-wrapper:hover .bar {
    fill: #5dade2;
}
.gantt .bar-wrapper:hover .bar-progress {
    fill: #2471a3;
}
.gantt .bar-wrapper.active .bar {
    fill: #5dade2;
}
.gantt .bar-wrapper.active .bar-progress {
    fill: #2471a3;
}
.gantt .today-highlight {
    fill: rgba(36, 113, 163, 0.08);
}
.gantt-container .popup-wrapper .title {
    border-bottom-color: #2e86c1;
}

/* ========== (2) Notification Badge Pulse Animation ========== */

@keyframes notificationPulse {
    0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.5); }
    50%  { transform: scale(1.15); box-shadow: 0 0 0 6px rgba(220, 53, 69, 0); }
    100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

#web-notification-icon .badge.bg-danger,
#message-notification-icon .badge.bg-danger {
    animation: notificationPulse 2s ease-in-out 3;
    position: relative;
}

/* ========== (3) Quick-Add Icon Styling ========== */

#quick-add-icon {
    position: relative;
}
#quick-add-icon .icon {
    background: #1abc9c !important;
    border-radius: 50%;
    width: 28px !important;
    height: 28px !important;
    padding: 5px;
    transition: all 0.2s ease;
}
#quick-add-icon .icon circle {
    stroke: transparent !important;
}
#quick-add-icon .icon line {
    stroke: #fff !important;
    stroke-width: 3 !important;
}
#quick-add-icon:hover .icon {
    background: #16a085 !important;
    transform: scale(1.1);
}

/* Add task / Add multiple tasks button icons — green circle with white plus */
.title-button-group .feather-plus-circle.icon-16,
.project-tab-content .feather-plus-circle.icon-16 {
    background: #1abc9c;
    border-radius: 50%;
    width: 18px !important;
    height: 18px !important;
    padding: 2px;
    vertical-align: middle;
    margin-top: -2px;
}
.title-button-group .feather-plus-circle.icon-16 circle,
.project-tab-content .feather-plus-circle.icon-16 circle {
    stroke: transparent !important;
}
.title-button-group .feather-plus-circle.icon-16 line,
.project-tab-content .feather-plus-circle.icon-16 line {
    stroke: #fff !important;
    stroke-width: 3 !important;
}

/* ========== Old Theme Color (#6690F4) Overrides ========== */

/* --- Background items: ensure white text for readability --- */

/* DataTable active row (already had color:#fff in original) */
.dataTable:not(.js-selection-mode) tbody tr.active td,
.dataTable:not(.js-selection-mode) tbody tr.active:hover td {
    background: #2471a3 !important;
    color: #fff !important;
}

/* Select2 highlighted dropdown item */
.select2-results .select2-highlighted {
    background-color: #2471a3 !important;
    color: #fff !important;
}

/* Awesomplete autocomplete selected */
.awesomplete ul li[aria-selected=true] {
    background: #2471a3 !important;
    color: #fff !important;
}

/* TinyMCE active menu/collection item */
.tox .tox-collection--list .tox-collection__item--active {
    background-color: #2471a3 !important;
    color: #fff !important;
}
.tox .tox-collection--list .tox-collection__item--active .tox-collection__item-label,
.tox .tox-collection--list .tox-collection__item--active .tox-collection__item-accessory,
.tox .tox-collection--list .tox-collection__item--active .tox-collection__item-caret svg {
    color: #fff !important;
    fill: #fff !important;
}

/* Chat "me" message bubble */
.chat-me .chat-msg {
    background-color: #2471a3 !important;
    color: #fff !important;
}

/* Sub-task filter active */
.sub-task-filter-active {
    background-color: #2471a3 !important;
    color: #fff !important;
}

/* Selection handler active */
.selection-handler-dropdown-btn.active {
    background-color: #2471a3 !important;
    color: #fff !important;
}

/* PWA install message */
#pwa-install-message-iphone {
    background-color: #2471a3 !important;
    color: #fff !important;
}

/* list-group active */
.list-group-item.active {
    background: #2471a3 !important;
    border-color: #2471a3 !important;
    color: #fff !important;
}

/* --- Border-only / color-only items: no text contrast issue --- */

/* Primary contact avatar border */
.avatar.primary-contact img {
    border-color: #2471a3 !important;
}

/* btn-primary base border (gradient applied separately above) */
.btn-primary {
    border-color: #2471a3 !important;
}

/* Text primary */
.text-primary {
    color: #2471a3 !important;
}

/* Timeline post date */
#timeline .post-content .post-date span {
    background: #2471a3 !important;
    color: #fff !important;
}

/* Notepad title border */
.notepad-title {
    border-left-color: #2471a3 !important;
}

/* Unread message indicators (border + text accents) */
.unread {
    border-left-color: #2471a3 !important;
}
.message-row.unread span {
    color: #2471a3 !important;
}

/* Unread task comment icon */
.unread-comments-of-tasks i {
    color: #2471a3 !important;
}

/* Comment highlight border */
.comment-highlight {
    border-color: #2471a3 !important;
}

/* Spinner / loader borders */
.inline-loader {
    border-right-color: #2471a3 !important;
}
.loading {
    border-color: #2471a3 !important;
    border-top-color: #fff !important;
}
.app-loader .loading {
    border-color: #2471a3 !important;
    border-top-color: #fff !important;
}
.table-loader .loading {
    border-color: #2471a3 !important;
    border-top-color: #fff !important;
}

/* ==========================================================================
   PROFILE IMAGE BUTTONS - vertical column to the left of avatar
   ========================================================================== */
.profile-image {
    position: relative;
    width: 240px !important;
}

.profile-image .profile-image-buttons {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-65%);
    display: flex;
    flex-direction: column;
    gap: 3px;
    z-index: 5;
}

.profile-image .profile-img-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    color: #fff;
    margin: 0;
    padding: 0;
}

.profile-image .profile-img-btn:hover {
    background: rgba(0, 0, 0, 0.7);
}

.profile-image .profile-img-btn span {
    color: #fff;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.profile-image .profile-img-btn i,
.profile-image .profile-img-btn svg {
    color: #fff !important;
    stroke: #fff !important;
}

.profile-image .profile-img-btn input.upload {
    position: absolute;
    width: 32px;
    height: 32px;
    opacity: 0;
    cursor: pointer;
}

.profile-image .profile-img-btn label {
    margin: 0;
    padding: 0;
    cursor: pointer;
}

/* ==========================================================================
   LIKE BUTTON - Always visible, positioned in comment actions row
   ========================================================================== */

/* Override the old hover-only behavior */
.comment-like-top {
    display: none !important;
}

/* Like button in the actions row - always visible */
.comment-actions .comment-like-btn {
    display: inline;
    margin-right: 5px;
}

.comment-actions .comment-like-btn .like-button {
    color: #888;
    font-size: 13px;
}

.comment-actions .comment-like-btn .like-button:hover {
    color: #333;
}

/* ==========================================================================
   MOBILE TASK COMMENT UX IMPROVEMENTS
   ========================================================================== */

/* Fix: Success/error alerts must appear ABOVE modals */
.app-alert.animate {
    z-index: 99999 !important;
}

/* Mobile: Sticky comment form at bottom of task modal */
@media (max-width: 767px) {
    /* Make the modal body scrollable with room for sticky comment form */
    .task-view-modal-body {
        padding-bottom: 0 !important;
    }

    /* Sticky comment form container at bottom of task modal */
    #ajaxModal .task-view-modal-body #task-comment-form-container {
        position: sticky;
        bottom: -15px;
        background: #fff;
        z-index: 10;
        padding: 10px 0;
        margin: 0 -15px;
        padding-left: 15px;
        padding-right: 15px;
        border-top: 1px solid #e8e8e8;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.08);
    }

    /* Compact the comment editor on mobile */
    #ajaxModal .task-view-modal-body .comment-form-container {
        border-bottom: none !important;
    }

    /* Hide the avatar on mobile to save space */
    #ajaxModal .task-view-modal-body .comment-form-container .flex-shrink-0 {
        display: none !important;
    }

    /* Make the comment textarea shorter on mobile */
    #ajaxModal .task-view-modal-body .comment_description {
        min-height: 60px !important;
        max-height: 120px !important;
    }

    /* Ensure the Post Comment button footer is always visible */
    #ajaxModal .task-view-modal-body #task-dropzone footer.card-footer {
        position: sticky;
        bottom: 0;
        background: #fff;
        z-index: 5;
        padding: 8px 12px;
    }
}

/* Announcement Widget Enhancement */
.announcement-widget {
    overflow: hidden;
}

.announcement-widget-header {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background-color: #2471a3;
    color: #fff;
}

.announcement-widget-title {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.announcement-widget-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.25);
    margin-right: 10px;
    flex-shrink: 0;
}

.announcement-widget-icon .icon {
    width: 16px;
    height: 16px;
    color: #fff;
}

.announcement-widget-header + .card-body {
    padding: 15px;
}

/* Dark theme overrides for announcement widget */
.color-1E202D .announcement-widget-header {
    background-color: #2c3e50;
}

.color-1E202D .announcement-widget-icon {
    background-color: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   UI ENHANCEMENTS
   ============================================================ */

/* --- (1) TYPOGRAPHY: Epilogue for headings, menus, titles --- */
.sidebar-menu li a,
.sidebar-menu li a .menu-text,
.page-title h1,
.modal-header .modal-title,
.card-header,
.card-header span,
.widget-title,
.box-title,
.kanban-col-title,
h1, h2, h3, h4 {
    font-family: 'Epilogue', 'Open Sans', sans-serif !important;
}

.sidebar-menu li a {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sidebar-menu li ul li a {
    font-weight: 400;
}

.card-header,
.card-header span {
    font-weight: 700;
}

/* --- (3) PRIORITY & DIFFICULTY PILLS --- */

/* Priority pill — colored background with white text */
.priority-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Epilogue', sans-serif;
    line-height: 16px;
    vertical-align: middle;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

/* Difficulty badge — subtle gray pill with number */
.difficulty-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
    line-height: 14px;
    vertical-align: middle;
    background: #e9ecef;
    color: #495057;
    margin-left: 4px;
}

/* Dark theme difficulty badge */
body[data-color="1E202D"] .difficulty-badge {
    background: #2d3241;
    color: #a0a6b8;
}

/* Legacy .priority-circle — remap to pill for backward compat */
.priority-circle {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 3px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Epilogue', sans-serif;
    line-height: 16px;
    vertical-align: middle;
    white-space: nowrap;
    letter-spacing: 0.3px;
}
.priority-circle strong {
    font-weight: 600;
}

/* --- (3c) CHECKBOXES: Green filled checkbox with white checkmark --- */
.checkbox-checked {
    background: none !important;
    background-color: #00B393 !important;
    width: 20px;
    height: 20px;
    display: inline-block;
    float: left;
    border: none;
    border-radius: 4px;
    position: relative;
}

.checkbox-checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

/* --- (4) UNREAD COMMENT INDICATOR: Filled with color --- */
.unread-comment-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2471a3;
    position: relative;
}

.unread-comment-indicator svg {
    fill: #2471a3 !important;
    stroke: #2471a3 !important;
}

/* --- (3b) TASK STATUS BADGES & PROJECT TYPE LABELS: Colored pills with bold text --- */
.task-status-badge {
    font-weight: 700 !important;
    font-size: 0.75rem;
    padding: 4px 10px;
    color: #fff !important;
    border-radius: 4px;
    white-space: nowrap;
}

/* --- (5) ANNOUNCEMENT ATTACHMENTS: Constrain images like task views --- */
.view-container .card-body .timeline-images {
    max-width: 600px;
}

.view-container .card-body .timeline-images img {
    max-width: 200px;
    width: auto;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #dadce0;
    cursor: pointer;
}

/* ========== Projects List Improvements ========== */

/* --- Action icons: force inline row with consistent spacing --- */
#project-table td.option {
    white-space: nowrap !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 12px !important;
}

#project-table td.option a {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 2px !important;
    padding: 0 !important;
    vertical-align: middle !important;
    border-radius: 50%;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #6c757d;
    transition: all 0.15s ease;
}

#project-table td.option a:hover {
    background: #2471a3;
    color: #fff;
    border-color: #2471a3;
}

#project-table td.option a.delete:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

/* Also fix responsive child-row action icons */
#project-table .dtr-details .edit:not(.dropdown-item),
#project-table .dtr-details .delete:not(.dropdown-item) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 2px !important;
    vertical-align: middle !important;
}

/* --- Project title emphasis --- */
#project-table td:nth-child(2) {
    font-size: 14px;
    font-weight: 600;
}

#project-table td:nth-child(2) a {
    color: #1a1a2e !important;
    text-decoration: none;
}

#project-table td:nth-child(2) a:hover {
    color: #2471a3 !important;
}

/* --- Tighter row padding for better density --- */
#project-table tbody td {
    vertical-align: middle;
    padding-top: 10px;
    padding-bottom: 10px;
}

/* --- Progress bar refinement --- */
#project-table .progress {
    height: 6px;
    border-radius: 3px;
    margin: 0;
    background-color: #e9ecef;
}

/* --- Status column badges: ensure pill shape --- */
#project-table td:nth-child(10) {
    white-space: nowrap;
}

/* --- Type badge column --- */
#project-table td:nth-child(11) .badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 3px;
}

/* --- Subtle row hover --- */
#project-table tbody tr:hover td {
    background-color: #f8f9fc;
}

/* --- Remove heavy row borders, use subtle separator --- */
#project-table tbody tr {
    border-bottom: 1px solid #f0f1f3;
}

#project-table tbody tr:last-child {
    border-bottom: none;
}