/*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: 5px 15px;
    font-weight: normal;
    font-size: 100%;
}

/* Change default theme colors */
.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 !important;
  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 !important;
  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.1019607843) !important;
}

@media (max-width: 500px) {
  .sidebar.sidebar-off {
    background-color: #2471a3;
  }
  .sidebar .sidebar-scroll {
    border-top-color: rgba(0, 0, 0, 0.1019607843) !important;
  }
  .sidebar #personal-language-icon,
  .sidebar .sidebar-toggle-btn {
    color: rgba(255, 255, 255, 0.8) !important;
  }
}
.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: 250px !important;
    max-width: 250px !important;
    min-width: 250px !important;
    flex: 0 0 250px !important;
    flex-basis: 250px !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
}

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

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

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

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

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

/* Content adjustments to fit in 250px columns */
#kanban-container .kanban-col .kanban-col-title {
    width: 100% !important;
    max-width: 248px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
}

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

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

/* Ensure task content fits within narrow 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;
    }
}

/* ========== 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;
}

/* --- Card header compaction --- */
.dashboard-view .card .card-header {
    padding: 8px 12px;
}

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

/* --- 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 .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;
}

/* --- White text and icons for colored widgets --- */
.dashboard-view .icon-widgets-row .widget-details h1,
.dashboard-view .icon-widgets-row .widget-details span {
    color: #fff;
}
.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;
}

/* --- 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;
}

/* --- 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;
}