/* ============================================================================
   COMPLETE CSS FILE - REPLACE YOUR ENTIRE EXISTING CSS WITH THIS
   ============================================================================ */

:root {
    --lewisham-purple: #2b4972;
    --lewisham-dark: #2b4972;
    --lewisham-light: #ffffff;
    --lewisham-grey: #f3f2f1;
    --lewisham-accent: #009639;
    --lewisham-error: #d4351c;
    --mask-opacity: 0;
    --mask-display: none;
}

@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,500&display=swap");

.tab-pane {
    padding-top: 20px;
}

.fake-textarea {
 border: 1px solid #949494;
    border-radius: 5px;
    padding: 12px;
    font-size: 16px;
}

.form-check-editscreen {
    padding: 5px;
    border-radius: 0.25rem;
}

body {
    font-family: "Open Sans", sans-serif;
}

/* button border colors */
.status-btn {
    background-color: #2b497212 !important;
    margin: 5px;
    border: 1px solid black !important;
    color: #2e3839 !important;
}

#statusSelect {
    border: 1px solid #a4a1a1;
    padding: 3px;
    border-radius: 5px;
    width: 100%;
    text-align: center;
}

.status-btn:hover {
    background-color: #007180 !important;
    /* Change background on hover */
    color: #fff !important;
    /* Change text colour */
    transform: scale(1.04);
    /* Slight zoom effect */
}

.status-btn.selected {
    border: solid 3px;
    /* color: #fff !important; */
    font-weight: bold !important;
}

.status-btn:disabled {
    opacity: 0.4;
    /* Make it look inactive */
    cursor: not-allowed;
    /* Show a disabled cursor */
    pointer-events: none;
    /* Prevent clicks */
}

.ac10 {
    border-color: #008000 !important;

}

.ac20 {
    border-color: #adad05 !important;

}

.ac40 {
    border-color: #aa7004 !important;

}

.ac50 {
    border-color: #030386 !important;

}

.ac60 {
    border-color: #5f045f !important;

}

.ac70 {
    border-color: #7a0404 !important;

}

.ac80 {
    border-color: #000000 !important;

}

.ac90 {
    border-color: #494949 !important;

}

.ac100 {
    border-color: #888787 !important;

}

.current-stage-label {
    font-weight: 600;
    margin-left: 5px;
    margin-right: 5px;
    /* outline: outset; */
    border: solid 1px #ddd;
    outline-color: #e6eded;
    outline-offset: 3px;
    padding: 3px;
    outline-width: 1px;
    text-align: center;
    border-radius: 5px;
}

.component {
    display: flex;
    align-items: stretch;
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    /* border: 1px solid #ccc; */
    --bs-border-radius-pill: 5px;
    /* padding: 10px; */
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    flex-direction: row;
    align-content: stretch;
    justify-content: space-between;
}

.component label {
    margin-right: 10px;
    font-size: 16px;
    color: #333;
    /* Dark gray text */
}

.component select {
    margin-right: 10px;
    padding: 5px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    color: #333;
    flex-grow: 1;
    /* Allow the select to take up available space */
}

.component .after-label {
    margin-right: 10px;
    font-size: 12px;
    color: #908989;
    /* Dark gray text */
}

.component button {
    padding: 5px 10px;
    background-color: #007180;
    /* Blue background */
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.component button:hover {
    background-color: #007e8f;
    /* Darker blue on hover */
}

.select-container {
    display: inline-flex;
    align-items: center;
    font-family: Arial, sans-serif;
    align-content: center;
}

.select-container::before {
    content: "Current-Stage:";
    margin-right: 10px;
    font-size: 16px;
    color: #333;
    /* Dark gray text */
}

.select-button {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #dcdcdc;
    /* Blue background */
    color: #2b4972;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-family: inherit;
    text-align: center;
    display: inline-block;
    position: relative;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTEuNzA3MTcsNC4yOTI4M0wxLjcwNzE3LDUuNzA3MTdMMTIsMTYuMDAwM0wxMiwwTDEuNzA3MTcsMTAuMjkyOEwxLjcwNzE3LDQuMjkyODNaIiBmaWxsPSJ3aGl0ZSIvPgo8L3N2Zz4=');
    /* Down arrow icon */
    background-repeat: no-repeat;
    background-position: right 10px center;
    width: 100%;
}

.select-button::after {
    /* content: "\25BC"; */
    /* Down arrow */
    content: "Select-Next-Stage";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: white;
    /* Arrow color */
}

.select-button select {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.shade-container {
    height: 100%;
    /* background: radial-gradient(circle at 30% 30%, #d4d4d433, #a9a9a926, #70707080); */
    border-bottom-right-radius: 10px;
    border-bottom-left-radius: 10px;
}

.link-container {
    display: flex;
    width: 100%;
    /* height: 150px; */
    padding: 20px;
    margin: 5px;
    background-color: #ededed;
    border: 1px solid #494b6b;
    border-radius: 5px !important;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    position: relative;
    flex-direction: column;
    justify-content: space-between;
}

.link-container::before {
    content: "\1F310";
    font-size: 40px;
    color: #b32828;
    position: absolute;
    top: 0;
    right: 20px;
}

.link-container .link {
    font-size: 16px;
    color: #2b4972;
    /* Blue text */
    text-decoration: none;
    /* white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis; */
    display: block;
    width: calc(100% - 60px);
    /* Adjust width to account for the globe symbol */
}

.link-container .link:hover {
    text-decoration: underline;
}

.link-container .link::after {
    content: attr(title);
    position: absolute;
    left: 0;
    bottom: -20px;
    background-color: #fff;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
    display: none;
}

.file-container {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    margin: 5px;
    background-color: #3d1a7214 !important;
    border: 1px solid #2b4972;
    border-radius: 5px !important;
    box-shadow: 2px 2px 5px rgba #0000001a (0, 0, 0, 0.1);
    font-family: Arial, sans-serif;
    /* position: relative; */
    display: flex;
    flex-wrap: wrap;
    align-content: stretch;
    align-items: stretch;
    justify-content: space-between;
    flex-direction: column;
}

.buts {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    align-content: space-between;
    flex-wrap: nowrap;
}

.file-container .filename {
    font-size: 16px;
    color: #333;
    /* Dark gray text */
    margin-bottom: 10px;
}

.file-container .download-button {
    padding: 10px 20px;
    background-color: #007bff;
    /* Blue background */
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    text-decoration: none;
    align-self: flex-end;
}

.file-container .download-button:hover {
    background-color: #0056b3;
    /* Darker blue on hover */
}
/* Priority dropdown styling */
.priority-dropdown-item {
  display: flex !important;
  align-items: center;
  gap: 16px;
  padding: 14px 24px !important;
  text-decoration: none !important;
}

.priority-dropdown-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
}

.priority-dropdown-icon svg {
  width: 36px;
  height: 36px;
}

.priority-dropdown-text {
  flex-grow: 1;
  font-size: 15px;
  font-weight: 500;
}

/* Remove underline on all dropdown items */
.dropdown-item,
.dropdown-item:hover,
.dropdown-item:focus,
.dropdown-item:active,
.dropdown-item.active {
  text-decoration: none !important;
}

.dropdown-item.active {
  background-color: #f0f4f8 !important;
  color: #1a1a1a !important;
}

.dropdown-item:hover {
  background-color: #f8f9fa !important;
}

/* Clear selection styling */
.dropdown-item-clear {
  color: #dc3545 !important;
  padding: 12px 24px !important;
  font-weight: 500;
}

.dropdown-item-clear:hover {
  background-color: #fef2f2 !important;
  color: #dc3545 !important;
}

/* Button styling when priority is selected */
#priorityDropdown {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

#priorityDropdown .priority-dropdown-icon {
  width: 26px;
  height: 26px;
}

#priorityDropdown .priority-dropdown-icon svg {
  width: 26px;
  height: 26px;
}

#priorityDropdown .priority-dropdown-text {
  font-size: 14px;
}

/* Stage column with banner */
.stage-with-priority {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-name {
  font-weight: 500;
}

.priority-banner {
  line-height: 0;
}

.priority-banner svg {
  width: 160px;
  height: 20px;
  display: block;
}

/* Dropdown menu spacing */
.dropdown-menu {
  padding: 10px 0;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dropdown-divider {
  margin: 10px 0;
}

/* Stage column with icon and banner */
.stage-with-priority {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stage-header {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stage-icon svg {
  width: 28px;
  height: 28px;
}

.stage-name {
  font-weight: 500;
}

.priority-banner {
  margin-top: 4px;
}

.priority-banner svg {
  width: 160px;
  height: 20px;
  display: block;
}

/* Dropdown menu spacing */
.dropdown-menu {
  padding: 8px 0;
}

.dropdown-divider {
  margin: 8px 0;
}

/* Priority banner in table */
.stage-with-priority {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.priority-banner svg {
  width: 150px;
  height: 18px;
  display: block;
}
.priority-icon svg {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

.dropdown-item.d-flex {
  display: flex;
  align-items: center;
}

/* Activity list container */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Activity card - base styling (extends postit-note) */
.activity-card {
  
    background: linear-gradient(135deg, #ffeaa71f 0%, #00718040 100%);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #f39c12;
    position: relative;
    list-style: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

/* Items container within a card */
.activity-items-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 12px;
}

/* Individual item content */
.activity-item-content {
      display: flex;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 6px;
    padding: 12px;
    position: relative;
    justify-content: space-between;
    align-items: center;
}

/* Type-specific border colors */
.activity-item-note {
    border-left: 3px solid #007180;
    background:linear-gradient(135deg, #ffeaa7a3 0%, #00718000 100%);
}

.activity-item-link {
    border-left: 3px solid #3fc5aa;
}

.activity-item-attachment {
    border-left: 3px solid #60a5db;
}

/* Type badge */
.activity-type-badge {
    display: inline-block;
    font-size: 0.75em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    margin-bottom: 8px;
    background-color: rgba(0, 0, 0, 0.05);
    color: #636e72;
    margin-right: 20px;
}

.activity-item-note .activity-type-badge {
    background-color: rgba(108, 92, 231, 0.1);
    color: #007180;
    text-wrap-mode: nowrap;
}

.activity-item-link .activity-type-badge {
    background-color: rgba(0, 184, 148, 0.1);
    color: #00b894;
}

.activity-item-attachment .activity-type-badge {
    background-color: rgba(9, 132, 227, 0.1);
    color: #0984e3;
}


/* Strikethrough note styling */
.activity-item-struck {
    opacity: 0.6;
    background-color: rgba(200, 200, 200, 0.3) !important;
}

.activity-note-text.struck-through {
    text-decoration: line-through;
    color: #888 !important;
    background-color: #f5f5f5 !important;
}


/* Note wrapper for layout with button */
.activity-note-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.activity-note-wrapper .activity-note-text {
    flex: 1;
    min-width: 0;
}

/* Strikethrough button styling */
.activity-btn-strike {
    color: rgb(80, 80, 80);
    flex-shrink: 0;
}


.activity-btn-strike:hover {
    background: linear-gradient(135deg, #f39c12 0%, #f39c12ab 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.4);
    color: #fff;
}

.activity-btn-strike:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}


/* Link wrapper with delete button */
.activity-link-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.activity-link-wrapper .activity-link {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Confirmation modal styling enhancements */
#confirmationModal .modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

#confirmationModal .modal-title {
    color: #2b4972;
    font-weight: 600;
}

#confirmationModal .modal-body {
    padding: 20px;
    font-size: 1em;
    color: #333;
}

#confirmationModal .modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

#confirmationModal .btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

#confirmationModal .btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

#confirmationModal .btn-warning {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
    color: #fff !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .activity-note-wrapper {
        flex-direction: column;
    }
    
    .activity-note-wrapper .activity-btn-strike {
        align-self: flex-end;
    }
    
    .activity-link-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .activity-link-wrapper .activity-btn-delete {
        align-self: flex-end;
    }
    
    .activity-type-badge-spacer {
        display: none;
    }
}

/* Modal content container */
.confirmation-modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

/* Modal header */
.confirmation-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #dee2e6;
}

.confirmation-modal-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #2b4972;
    border: none;
}

.confirmation-modal-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.confirmation-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #333;
}

/* Modal body */
.confirmation-modal-body {
    padding: 24px 20px;
    font-size: 0.95em;
    color: #495057;
    line-height: 1.5;
}

/* Modal footer */
.confirmation-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-top: 1px solid #dee2e6;
}

/* Base button styling - matching activity buttons */
.confirm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    min-width: 100px;
}

.confirm-btn svg {
    flex-shrink: 0;
}

/* Cancel button */
.confirm-btn-cancel {
    background: transparent;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.confirm-btn-cancel:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.confirm-btn-cancel:active {
    transform: translateY(0);
}

/* Danger button (Delete) */
.confirm-btn-danger {
    background: linear-gradient(135deg, #883a3e 0%, #dc3545 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.confirm-btn-danger:hover {
    background: linear-gradient(135deg, #6d2f32 0%, #c82333 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.confirm-btn-danger:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

/* Warning button (Strikethrough) */
.confirm-btn-warning {
    background: linear-gradient(135deg, #c78c0a 0%, #f39c12 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

.confirm-btn-warning:hover {
    background: linear-gradient(135deg, #a67608 0%, #e08e0b 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(243, 156, 18, 0.4);
}

.confirm-btn-warning:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(243, 156, 18, 0.3);
}

/* Primary button */
.confirm-btn-primary {
    background: linear-gradient(135deg, #007180 0%, #009999 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(0, 113, 128, 0.3);
}

.confirm-btn-primary:hover {
    background: linear-gradient(135deg, #005a66 0%, #007a7a 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 113, 128, 0.4);
}

.confirm-btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 113, 128, 0.3);
}

/* Responsive */
@media (max-width: 576px) {
    .confirmation-modal-footer {
        flex-direction: column-reverse;
        gap: 8px;
    }
    
    .confirm-btn {
        width: 100%;
    }
}
/* Hide spacer on items that follow the first of their type */
.activity-item-content:not(:first-child) .activity-type-badge-spacer {
    visibility: hidden;
}
/* Badge spacer for alignment when no badge shown */
.activity-type-badge-spacer {
    display: inline-block;
    width: 70px; /* Match badge width approximately */
    flex-shrink: 0;
    margin-right: 20px;
}

/* Note text styling */
.activity-note-text {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    margin: 0;
    padding: 10px;
    background-color: #ffffff;
    border-radius: 4px;
    font-size: 0.95em;
    border: 0.1rem dotted #ddd;
    line-height: 1.5;
    color: #2d3436;
    width:100%;
}


/* Attachment wrapper - horizontal layout */
.activity-attachment-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

/* File info section */
.activity-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 200px;
}

.activity-file-icon {
    font-size: 1.2em;
    line-height: 1;
}

.activity-file-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.activity-file-name {
    font-weight: 600;
    color: #2d3436;
    word-break: break-word;
}

/* Buttons wrapper */
.activity-attachment-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Base button styling */
.activity-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 6px;
    border: none;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.activity-btn svg {
    flex-shrink: 0;
}

/* Download button */
.activity-btn-download {
    /* background: linear-gradient(135deg, #0984e3 0%, #74b9ff 100%); */
    color: rgb(80, 80, 80);
    /* box-shadow: 0 2px 4px rgba(9, 132, 227, 0.3); */
}

.activity-btn-download:hover {
       background: linear-gradient(135deg, #007180 0%, #007180ab 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(9, 132, 227, 0.4);
    color: #fff;
}

.activity-btn-download:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(9, 132, 227, 0.3);
}

/* Delete button */
.activity-btn-delete {
    /* background: linear-gradient(135deg, #d63031 0%, #ff7675 100%); */
    color: rgb(80, 80, 80);
    /* box-shadow: 0 2px 4px rgba(214, 48, 49, 0.3); */
}

.activity-btn-delete:hover {
       background: linear-gradient(135deg, #883a3e 0%, #8a5151ab 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(9, 132, 227, 0.4);
    color: #fff;
}

.activity-btn-delete:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(214, 48, 49, 0.3);
}

/* Responsive - stack buttons on small screens */
@media (max-width: 576px) {
    .activity-attachment-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .activity-attachment-buttons {
        justify-content: stretch;
    }
    
    .activity-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }
}

/* Icon-only mode for very small screens */
@media (max-width: 400px) {
    .activity-btn span {
        display: none;
    }
    
    .activity-btn {
        padding: 10px 12px;
        flex: 0;
    }
}


/* Link styling */
.activity-link-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-link {
    color: #0984e3;
    text-decoration: underline;
    font-weight: 500;
    word-break: break-all;
}

.activity-link:hover {
    color: #074c77;
}

.activity-link::before {
    content: "🌐 ";
}

/* Attachment styling */
.activity-attachment-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.activity-file-name {
    font-weight: 500;
    color: #2d3436;
    flex: 1;
    min-width: 150px;
}

.activity-download-btn {
    padding: 4px 12px !important;
    font-size: 0.85em !important;
    min-width: auto !important;
}

.activity-delete-btn {
    padding: 4px 12px !important;
    font-size: 0.85em !important;
    min-width: auto !important;
    margin-left: 4px;
}

/* Item count badge in metadata */
.note-item-count {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: rgba(0, 0, 0, 0.08);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
}

.note-item-count::before {
    content: "📦";
    font-size: 0.9em;
}

/* When there's only one item, simplify the card */
.activity-card.single-item .activity-items-container {
    margin-bottom: 8px;
}

.activity-card.single-item .activity-item-content {
    background-color: transparent;
    padding: 0;
    border-left: none;
}

.activity-card.single-item .activity-type-badge {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .activity-attachment-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .activity-download-btn,
    .activity-delete-btn {
        width: 100%;
        margin-left: 0 !important;
        margin-top: 4px;
    }
    
    .activity-card {
        padding: 12px;
    }
}

/* Empty state */
.activity-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #636e72;
}

.activity-empty-state::before {
    content: "📭";
    display: block;
    font-size: 3em;
    margin-bottom: 12px;
}





.postit-note {
    background: linear-gradient(135deg, #ffeaa71f  0%, #fdcb6e70  100%);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-left: 4px solid #f39c12;
    position: relative;
    list-style: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width:100%;
}

.postit-note:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15), 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Header row - Action and Banner on same line */
.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

/* Action styling */
.note-action {
    /* background-color: rgba(255, 255, 255, 0.6); */
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #2d3436;
    flex-shrink: 0;
}

.note-action strong {
       color: #007180;
}

/* Banner styling - sits on same line as action */
.note-banner {
    flex-shrink: 0;
}

.note-banner svg {
    height: 28px;
    width: auto;
    display: block;
}

/* Subject/Content styling */
.note-subject {
    margin-bottom: 12px;
}

.note-subject pre {
       white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    margin: 0;
    padding: 12px;
    background-color: rgb(255 255 255);
    border-radius: 4px;
    font-size: 0.95em;
    border: .1rem dotted;
    line-height: 1.5;
    color: #2d3436;
}

/* Metadata footer styling */
.note-metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 10px;
    border-top: 1px dashed rgba(0, 0, 0, 0.15);
       font-size: 0.9em;
    color: #007180;
    justify-content: flex-end;
}

.note-date,
.note-author {
    display: flex;
    align-items: center;
    gap: 4px;
}

.note-date::before {
    content: "📅";
    font-size: 0.9em;
}

.note-author::before {
    content: "👤";
    font-size: 0.9em;
}

/* List group overrides */
.list-group {
    padding: 0;
    margin: 0;
}

/* Container spacing */
.container {
    /* padding: 16px; */
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .note-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .note-metadata {
        flex-direction: column;
        gap: 8px;
    }
    
    .postit-note {
        padding: 12px;
    }
}


.float-right {
    text-align: right;
}


/* Tabs */
.nav-tabs {
    border-bottom: 2px solid var(--lewisham-purple);
}

.nav-link {
    color: var(--lewisham-dark);
    border: 1px solid #b0b0b0 !important;
    padding: 0.21rem 0.51rem;
    /* font-weight: 600; */
    display: flex
}

input.form-control {
    margin-bottom: 5px;
}

.nav-bubble {
    border-radius: 50%;
    background-color: rgb(212, 212, 212);
    color: var(--lewisham-purple);
    width: fit-content;
    padding: 2px;
    margin-left: 5px;
    min-width: 25px;
}

.nav-link.active {
    color: #ffffff !important;
    background-color: #007180 !important;
    border: none;
}

.list-group {
    display: flex !important;
    flex-direction: row !important;
    align-content: space-around !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
}




/* ==========================================================================
   1. FONT IMPORTS, GLOBAL RESETS & MEDIA VIEWPORT
   ========================================================================== */

/* Font Imports */
@import url("https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,600;0,700;1,500&display=swap");

/* Media Viewport Settings */
@-ms-viewport {
    width: device-width;
}

@-o-viewport {
    width: device-width;
}


/* ==========================================================================
   2. TYPOGRAPHY & LINKS
   ========================================================================== */

/* Headings */
h1,
h2,
h3 {
    font-family: "Open Sans", sans-serif;
}

h2 {
    font-size: 36px;
    line-height: 48px;
    color: #2b4972 !important;
    border-color: #d4dae2;
    font-weight: 600;
    margin-bottom: unset !important;
}

h3 {
    font-size: 24px;
    line-height: 36px;
    color: #000000 !important;
    border-bottom: 1px solid #d4dae2;
    margin: 0;
    border: none;
    font-weight: 600;
}

h4 {
    font-size: 18px;
    color: #000000 !important;
}

/* Capitalize first letter of headings */
h1:first-letter,
h2:first-letter,
h3:first-letter {
    text-transform: capitalize;
}

/* Anchor Tags */
a {
    border: 2px solid transparent;
}

a:hover {
    text-decoration: none !important;
}

a:not(.btn) {
    text-decoration: underline;
    font-weight: bold;
    background-repeat: repeat-x;
    background-size: 2px 2px;
    background-position: 0px 1.1em;
    transition: all 0.25s ease;
    letter-spacing: -0.5px;
    cursor: pointer;
}

a:not(.btn):hover {
    text-decoration: none !important;
    background-image: none !important;
    letter-spacing: -0.5px !important;
}

/* Links within information boxes */
div.information-box a:not(.btn) {
    text-decoration: none;
    background-image: linear-gradient(to bottom, rgba(0, 126, 143, 0) 50%, black 50%);
    font-weight: bold;
    background-repeat: repeat-x;
    background-size: 2px 2px;
    background-position: 0px 1em;
    color: black;
    transition: all 0.25s ease;
    letter-spacing: -0.5px;
    cursor: pointer;
}

div.information-box a:not(.btn):hover {
    text-decoration: none;
    background-image: none;
    letter-spacing: -0.5px;
}

/* Responsive adjustments for links */
@media screen and (max-width: 674px) {

    div.information-box a:not(.btn):hover,
    a:not(.btn):hover {
        text-decoration: none !important;
        background-image: none !important;
        letter-spacing: -0.5px !important;
    }
}

.btn.btn-danger {
    background-color: pink !important;
}

.btn.btn-danger:hover {
    background-color: rgb(158, 113, 120) !important;
}

/* ==========================================================================
   3. LAYOUT: HEADER, NAVIGATION, BODY & FOOTER
   ========================================================================== */

/* Header & Navigation */
.header-wrapper {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.header-codesnip {
    display: block;
    font-size: 0;
    left: 0;
    bottom: -26px;
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.05), 0 3px 4px rgba(0, 0, 0, 0.11);
    color: #ffffff;
    margin-left: -8px;
}

/* For exit style in header */
.for-exitStyle {
    display: flex;
}

/* Navigation Bar */
.navbar-static-top.navbar-inverse {
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2b4972;
    box-shadow: none;
    height: 80px;
    z-index: 100;
}

/* Navbar Toggle (hidden as per requirements) */
.navbar-toggle {
    position: absolute;
    margin: 0;
    border-radius: 3px;
    top: 4px;
    right: 3px;
    padding: 17px 10px;
    display: none;
}

.navbar-toggle .icon-bar {
    width: 25px;
    height: 3px;
    border-radius: 2px;
}

/* Body & Container Styles */
.wrapper-body {
    margin-top: -17px !important;
    min-height: calc(100vh - 200px) !important;
    padding: 0px 10px 10px;
    width:90%;
    margin-left:auto;
    margin-right:auto;
    /* overflow-x: hidden; */
}

.mainFiltersContainer {
    display: block;
    height: 100%;
    margin-bottom: 100px;
}

.todoFiltersContainer {
    float: left;
    width: 100%;
    padding-bottom: 10px;
}

.mainData {
    /* padding-top: 20px; */
}

.mainDataEdit {
    padding-top: 20px
}

/* Footer */
.footer-customclass {
    display: flex;
    justify-content: space-between;
    margin: 0;
}

.footer-customclass a {
    text-decoration: underline !important;
    font-size: 18px;
    color: #3a3a3a;
}

.footer-customclass a:hover {
    text-decoration: none !important;
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.section {
    margin-bottom: 20px;
    padding: 5px;
    margin: 10px;
}

.footer-links-section {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    max-width: 33%;
}

.footer-links-section span {
    margin-bottom: 18px;
}

/* Remove container pseudo-element before footer */
footer .container:before {
    content: none;
}

/* Copyright & Footer Anchor Styling */
.copyRight {
    color: var(--white, #FFF);
    text-align: center;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 23px;
    padding-bottom: 5px;
}

.atagFooter.atagFooter {
    color: var(--white, #FFF);
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 23px;
    text-decoration-line: underline;
}

.containerForH2 {
    display: flex;
    justify-content: space-between;
}

.navbar {
    padding: unset !important
}

.nav-container {
    padding-left: unset;
    padding-right: unset;
}

.dropdown-item:hover {
    background-color: #007180 !important
}


/* ==========================================================================
   4. COMPONENTS, WIDGETS & BUTTONS
   ========================================================================== */

#load-mask {
    position: relative;
    background: #0000003d;
    height: 100%;
    width: calc(100% + 4px);
    z-index: 9999998;
    opacity: var(--mask-opacity, 0);
    transition: opacity 0.3s ease-in-out;
    display: var(--mask-display, none);

}

/* When active, make it visible */
#load-mask.active {
    opacity: 1;
}

#loading {
    position: absolute;
    top: 120px;
    left: calc(50% - 30px);
    z-index: 9999999;
}

.lds-ring {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.lds-ring div {
    box-sizing: border-box;
    display: block;
    position: absolute;
    width: 64px;
    height: 64px;
    margin: 8px;
    border: 8px solid #007180;
    border-radius: 50%;
    animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    border-color: #007180 transparent transparent transparent;
}

.lds-ring div:nth-child(1) {
    animation-delay: -0.45s;
}

.lds-ring div:nth-child(2) {
    animation-delay: -0.3s;
}

.lds-ring div:nth-child(3) {
    animation-delay: -0.15s;
}

@keyframes lds-ring {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Additional Loader Elements */
#ttry {
    position: relative;
}

#loading-container {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

#page-loader {
    display: block;
    position: fixed;
    background-color: hsla(0, 0%, 0%, 0.377);
    background: hsla(0, 0%, 0%, 0.377);
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    z-index: 99999;

}

#page-loader #loading {
    top: 50vh;
}

/* Dropdown Tweaks */
.dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
}

.dropdown-item.active {
    background-color: #007bff !important;
    color: white !important;
    font-weight: bold;
}

/* Specific Components & Widgets */
.div-forText {
    border-radius: 10px;
    border: 1px solid #007180;
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    background-color: rgba(255, 255, 255, 0.3);
    margin-top: 5%;
    margin-bottom: 5%;
    padding: 5%;
    backdrop-filter: blur(10px);
}

.entitylist {
    box-shadow: rgba(99, 99, 99, 0.2) 0px 2px 8px 0px;
    margin-bottom: 5%;
    min-height: 40vh;
}

/* Button Styles */
/* Default Button */
.btn.btn-default.btn.btn-default.btn.btn-default {
    border-radius: 46px;
    background: #d4dae2;
    color: #3a3a3a;
    padding: 8px 24px;
    font-weight: 700;
    font-size: 18px;
    margin-right: 20px;
    box-shadow: none;
    border: solid 2px transparent;
}

.btn.btn-default.btn.btn-default.btn.btn-default:hover {
    background: #dce3eb;
}

/* Primary Button */
.btn.btn-primary {
    border-radius: 46px;
    background: #007180;
    color: #ffffff;
    padding: 3px 24px;
    min-width: 150px !important;
    margin: 0 auto;

}

.btn.btn-primary:hover {
    background: #007e8f;
}

/* Danger Button */
.btn.btn-danger {
    border-radius: 46px;
    color: #000000;
    padding: 3px 24px;
    margin-right: 20px;
    box-shadow: none;
    border: 1px solid rgb(97, 2, 2);
    min-width: 150px !important;
    margin: 0 auto;
}

.form-check {
    display: flex !important;
    align-items: center;
    flex-direction: row;
    justify-content: space-between;
    width: 125px;
    padding-left: unset !important;
}

.form-check-input {
    width: 25px;
    height: 25px;
    margin-top: unset !important;
    margin-right: 10px !important;
}

.form-check-editscreen {
    padding: 5px;
    border-radius: 0.25rem;
}

.form-check-label-editscreen {
    font-weight: 500;
    color: #333;
    margin-left: 0.5rem;
}

.form-control::placeholder {
    color: lightgray;
    opacity: 0.5;
    /* Ensures full opacity across browsers */
}

.mainEditDataContainer {
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    height: 600px;
    overflow-y: auto;
    padding: unset !important
}

.tab-pane {
    height: 100% !important;
    width: 100% !important;
}

#timeline-info {
    position: relative;
    margin: 20px 0;
    padding-left: 30px;
    border-left: 2px solid #ccc;
}

pre {
    max-width: 100%;        /* Prevent overflow beyond parent */
    overflow-x: auto;       /* Add horizontal scroll if content is too wide */
    white-space: pre-wrap;  /* Wrap text instead of forcing one long line */
    word-wrap: break-word;  /* Break long words if needed */
    box-sizing: border-box; /* Include padding in width calculation */
}

/* ==========================================================================
   5. RESPONSIVE STYLES & TABLES
   ========================================================================== */

/* Responsive Adjustments */
@media (max-width: 647px) {
    .header-wrapper {
        padding: 10px;
    }

    .for-exitStyle h1 {
        margin: 0 0 14px 20px !important;
    }
}

.container {
    max-width: unset !important
}

/* ==========================================================================
   RESPONSIVE TABLE CSS - UPDATED FOR 7 COLUMNS (with Priority)
   ========================================================================== */

.table {
    display: grid;
    /* 7 columns: Due, Created, Case, Priority, Stage, Role, Completed */
    grid-template-columns: 0.5fr 0.5fr 2.5fr 0.6fr 0.8fr 0.7fr 0.15fr;
    gap: 1px;
    width: 100%;
    border: 1px solid #ddd;
    background: #fff;
}

.row {
    display: contents;
}

.file-upload,
.add-links,
.notes {
    position: relative;
    /* border-bottom: 1px dashed #b4b4b4; */
    padding: 0 15px 15px 15px;
}

.add-links,
.notes {
    border-bottom: 1px dotted #b4b4b4;
}

.glow-error {

    box-shadow: 0 0 10px 4px rgba(255, 0, 0, 0.6);
    /* blur = 10px, spread = 4px */
    border-radius: 4px;
    /* optional for smoother corners */
    transition: box-shadow 0.5s ease-in-out;

    z-index: 2000;
}

.glow-where {

    box-shadow: 0 0 10px 4px #ffc107b2;
    /* blur = 10px, spread = 4px */
    border-radius: 4px;
    /* optional for smoother corners */
    transition: box-shadow 1.0s ease-in-out;

}

/* ORIGINAL rowEdit - preserved for non-edit screens */
.rowEdit {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

.header .cell {
    background: #ededed;
    font-weight: bold;
    text-align: center;
    padding: 5px 5px 5px 5px;
}

.clickable-row {
    overflow: hidden;
    transition: background-color 0.3s ease;
    position: relative;
}

.clickable-row .cell {
    transition: background-color 0.3s ease;
}

.clickable-row:hover .cell {
    background-color: #f3f3f3;
}

.cell {
    border-bottom: 1px solid #ddd;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
    /* overflow: hidden; */
    padding-left: unset !important;
    padding-right: unset !important
}

.cell-content {
    display: block;
    text-overflow: ellipsis;
    line-height: 1.5;
    width: 100%;
    padding: 4px;
}

/* Mobile Layout for Tables */
@media (max-width: 768px) {
    .header {
        display: none !important;
    }

    .table {
        display: block;
        border: none;
    }

    .row {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #ddd;
        background: #fff;
    }

    .cell {
        display: flex;
        border: none;
        border-bottom: 1px solid #ddd;
        padding: 0;
    }

    .cell:last-child {
        border-bottom: none;
    }

    .cell::before {
        content: attr(data-label) ": ";
        display: inline-block;
        width: 50%;
        padding: 8px;
        /* background: #ededed; */
        font-weight: bold;
        box-sizing: border-box;
    }

    .cell-content {
        display: inline-block;
        width: 50%;
        padding: 8px;
        box-sizing: border-box;
    }
}

/* ==========================================================================
   6. NEW CASE EDIT LAYOUT - 50% / 25% / 25%
   These styles ONLY apply to elements with the new column classes
   ========================================================================== */

/* Main tabs column - 50% */
.col-main-tabs {
    flex: 1 1 50%;
    min-width: 0;
    max-width: 50%;
}
/* Action Information column - 25% */
.col-action-info {
    flex: 1 1 24%;
    min-width: 0;
    max-width: 24%;
}

/* Activity Timeline column - 25% */
.col-timeline {
    flex: 1 1 24%;
    min-width: 0;
    max-width: 24%;
}

/* Panel header styling (replaces tab headers for right columns) */
.panel-header {
    /* background-color: #007180; */
    /* color: #000000; */
    padding: 0.21rem 0.51rem;
    border: 1px solid #007180;
    border-bottom: 2px solid var(--lewisham-purple);
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.panel-title {
    margin: 0;
    /* font-size: 14px; */
    /* font-weight: 600; */
    /* color: #ffffff !important; */
    border: none;
    line-height: 1.7;
}

/* Panel content styling */
.panel-content {
    border: 1px solid #6c757d;
    border-top: none;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    height: 600px;
    /* overflow-y: auto; */
    padding: 0 !important;
    background: #fff;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Adjust sections inside Action Information panel */
.col-action-info .section {
    margin-bottom: 15px;
    padding: 10px;
    margin: 10px;
}

.col-action-info .section:not(:last-child) {
    border-bottom: 1px dotted #b4b4b4;
}

/* Ensure timeline panel has proper padding */
.col-timeline .panel-content {
    padding-left: 50px !important;
    padding-top: 20px !important;
    padding-right: 10px !important;
}

/* Responsive for new layout columns */
@media (max-width: 1200px) {
   .rowEdit {
        gap: 8px;
    }
    
    .col-main-tabs {
        flex: 1 1 100%;
        max-width: 100%;
        order: 1;
        margin-bottom: 8px;
    }
    
    .col-action-info {
        flex: 1 1 calc(50% - 4px);
        max-width: calc(50% - 4px);
        order: 2;
    }
    
    .col-timeline {
        flex: 1 1 calc(50% - 4px);
        max-width: calc(50% - 4px);
        order: 3;
    }
}

@media (max-width: 850px) {
    .col-main-tabs,
    .col-action-info,
    .col-timeline {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .rowEdit {
        flex-direction: column;
        gap: 20px !important;
    }

    .component select {
        height: 60px;
    }
}

/* ==========================================================================
   7. COLUMN HEADER SORT/FILTER DROPDOWN SYSTEM
   ========================================================================== */

/* ================== COLUMN HEADER - INTERACTIVE STATES ================== */

.sortable-table .header .cell.column-header {
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background-color 0.15s ease;
}

.sortable-table .header .cell.column-header:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.sortable-table .header .cell.column-header:focus {
  outline: 2px solid #0066cc;
  outline-offset: -2px;
}

.sortable-table .header .cell.column-header:focus:not(:focus-visible) {
  outline: none;
}

.sortable-table .header .cell.column-header.dropdown-open {
  background-color: rgba(0, 102, 204, 0.12);
}

.sortable-table .header .cell.column-header.has-active {
  background-color: rgba(0, 102, 204, 0.06);
}

/* ================== HEADER CONTENT LAYOUT ================== */

.sortable-table .header .cell .header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.sortable-table .header .cell .header-text {
  flex: 1;
  font-weight: 600;
}

.header-indicators {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ================== FILTER INDICATOR ================== */

.filter-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  background-color: #28a745;
  color: #ffffff;
}

.filter-indicator svg {
  width: 12px;
  height: 12px;
}

/* ================== SORT BADGE ================== */

.sort-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background-color: #0066cc;
  color: #ffffff;
  min-width: 18px;
}

.sort-badge sup {
  font-size: 9px;
  margin-left: 1px;
  font-weight: 600;
}

/* ================== DROPDOWN TRIGGER ================== */

.header-indicators .dropdown-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background-color: rgba(0, 0, 0, 0.08);
  color: #666;
  transition: all 0.15s ease;
}

.column-header:hover .header-indicators .dropdown-trigger {
  background-color: rgba(0, 102, 204, 0.15);
  color: #0066cc;
}

.column-header.dropdown-open .header-indicators .dropdown-trigger {
  background-color: #0066cc;
  color: #ffffff;
  transform: rotate(180deg);
}

/* ================== COLUMN DROPDOWN MENU ================== */

.column-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 1100;
  min-width: 260px;
  max-width: 320px;
  background-color: #ffffff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
 
}

.column-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
   background-color: #cde0d9;
   float:right;
}

/* ================== DROPDOWN HEADER ================== */

.column-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
   display:none;
}

.column-dropdown-title {
  font-size: 13px;
  font-weight: 700;
  color: #333;
  display:none;
}

.column-clear-btn {
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #dc3545;
  background: #fff;
  border: 1px solid #dc3545;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.column-clear-btn:hover {
  background-color: #dc3545;
  color: #ffffff;
}

/* ================== DROPDOWN SECTIONS ================== */

.column-dropdown-section {
  padding: 10px 14px;
}

.column-dropdown-section .section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
  border: none;
  padding: 0;
}

.filter-count {
  font-weight: 500;
  color: #28a745;
  text-transform: none;
}

.column-dropdown-divider {
  height: 1px;
  background-color: #e9ecef;
  margin: 0;
}

/* ================== SORT OPTIONS ================== */

.sort-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sort-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  font-size: 13px;
  color: #333;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
  text-align: left;
}

.sort-option:hover {
  background-color: #f0f4ff;
  border-color: #0066cc;
}

.sort-option.active {
  background-color: #e7f1ff;
  border-color: #0066cc;
  color: #0066cc;
}

.sort-option .option-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background-color: #f1f3f4;
  color: #666;
  flex-shrink: 0;
}

.sort-option.active .option-icon {
  background-color: #0066cc;
  color: #fff;
}

.sort-option .option-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sort-option .option-label {
  font-weight: 600;
}

.sort-option .option-desc {
  font-size: 11px;
  color: #6c757d;
}

.sort-option.active .option-desc {
  color: #0066cc;
  opacity: 0.8;
}

.sort-order-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: #0066cc;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

/* ================== FILTER OPTIONS ================== */

.column-dropdown-section.filter-section {
  max-height: 300px;
  display: flex;
  flex-direction: column;
}

.filter-search {
  margin-bottom: 8px;
}

.filter-search-input {
  width: 100%;
  padding: 8px 10px;
  font-size: 13px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.filter-search-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.filter-options-container {
  flex: 1;
  overflow-y: auto;
  max-height: 180px;
  border: 1px solid #e9ecef;
  border-radius: 4px;
}

.filter-options {
  padding: 4px;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.filter-option:hover {
  background-color: #f8f9fa;
}

.filter-option.select-all {
  border-bottom: 1px solid #e9ecef;
  margin-bottom: 4px;
  padding-bottom: 10px;
  font-weight: 600;
}

.filter-checkbox {
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #0066cc;
  flex-shrink: 0;
}

.filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.filter-icon svg {
  width: 16px;
  height: 16px;
}

.column-dropdown-menu .filter-label {
  flex: 1;
  font-size: 13px;
  color: #333;
}

/* ================== DROPDOWN FOOTER ================== */

.column-dropdown-footer {
  padding: 10px 14px;
  border-top: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.filter-apply-btn {
  width: 100%;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background-color: #0066cc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.filter-apply-btn:hover {
  background-color: #0052a3;
}

/* ================== PRIORITY COLUMN CELL ================== */

.priority-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.priority-cell .priority-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.priority-cell .priority-icon svg {
  width: 18px;
  height: 18px;
}

.priority-cell .priority-name {
  font-size: 13px;
}

/* ================== COLUMN STATE INDICATOR BAR ================== */

.column-state-indicator {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background-color: #e7f1ff;
  border: 1px solid #b8d4ff;
  border-radius: 6px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.indicator-text {
  font-size: 13px;
  color: #0066cc;
  font-weight: 500;
}

.indicator-clear-btn {
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #0066cc;
  background: #fff;
  border: 1px solid #0066cc;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.indicator-clear-btn:hover {
  background-color: #0066cc;
  color: #fff;
}

/* ================== NO CASES STYLING ================== */

.no-cases {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.no-cases-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.no-cases-text {
  font-size: 16px;
  color: #6c757d;
  margin-bottom: 16px;
}

.clear-filters-btn {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #0066cc;
  background: #fff;
  border: 1px solid #0066cc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.clear-filters-btn:hover {
  background-color: #0066cc;
  color: #fff;
}

/* ================== SCROLLBAR STYLING ================== */

.filter-options-container::-webkit-scrollbar {
  width: 6px;
}

.filter-options-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.filter-options-container::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.filter-options-container::-webkit-scrollbar-thumb:hover {
  background: #999;
}

/* ================== COLUMN DROPDOWN RESPONSIVE ================== */

@media (max-width: 768px) {
  .column-dropdown-menu {
    min-width: 240px;
    right: 0;
    left: auto;
  }

  .header-indicators {
    gap: 2px;
  }

  .sort-badge {
    padding: 2px 4px;
    font-size: 11px;
  }

  .header-indicators .dropdown-trigger {
    width: 18px;
    height: 18px;
  }

  .filter-options-container {
    max-height: 150px;
  }
  
  .sort-option {
    padding: 8px 10px;
  }
  
  .sort-option .option-icon {
    width: 20px;
    height: 20px;
  }
}

/* ================== DARK MODE ==================

@media (prefers-color-scheme: dark) {
  .sortable-table .header .cell.column-header:hover {
    background-color: rgba(255, 255, 255, 0.08);
  }

  .sortable-table .header .cell.column-header.dropdown-open {
    background-color: rgba(100, 180, 255, 0.15);
  }

  .sortable-table .header .cell.column-header.has-active {
    background-color: rgba(100, 180, 255, 0.08);
  }

  .column-dropdown-menu {
    background-color: #2d2d2d;
    border-color: #444;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  }

  .column-dropdown-header {
    background-color: #363636;
    border-bottom-color: #444;
  }

  .column-dropdown-title {
    color: #eee;
  }

  .column-clear-btn {
    background: #2d2d2d;
    color: #ff6b6b;
    border-color: #ff6b6b;
  }

  .column-clear-btn:hover {
    background-color: #ff6b6b;
    color: #1a1a1a;
  }

  .column-dropdown-section .section-label {
    color: #999;
  }

  .column-dropdown-divider {
    background-color: #444;
  }

  .sort-option {
    background: #2d2d2d;
    border-color: #444;
    color: #eee;
  }

  .sort-option:hover {
    background-color: rgba(100, 180, 255, 0.1);
    border-color: #4da6ff;
  }

  .sort-option.active {
    background-color: rgba(100, 180, 255, 0.15);
    border-color: #4da6ff;
    color: #4da6ff;
  }

  .sort-option .option-icon {
    background-color: #444;
    color: #999;
  }

  .sort-option.active .option-icon {
    background-color: #4da6ff;
    color: #1a1a1a;
  }

  .sort-option .option-desc {
    color: #888;
  }

  .filter-search-input {
    background-color: #363636;
    border-color: #555;
    color: #eee;
  }

  .filter-search-input:focus {
    border-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.15);
  }

  .filter-options-container {
    border-color: #444;
    background-color: #2d2d2d;
  }

  .filter-option:hover {
    background-color: #363636;
  }

  .filter-option.select-all {
    border-bottom-color: #444;
  }

  .column-dropdown-menu .filter-label {
    color: #eee;
  }

  .column-dropdown-footer {
    background-color: #363636;
    border-top-color: #444;
  }

  .filter-apply-btn {
    background-color: #4da6ff;
  }

  .filter-apply-btn:hover {
    background-color: #3d96ef;
  }

  .filter-indicator {
    background-color: #2ecc71;
  }

  .sort-badge {
    background-color: #4da6ff;
  }

  .header-indicators .dropdown-trigger {
    background-color: rgba(255, 255, 255, 0.1);
    color: #999;
  }

  .column-header:hover .header-indicators .dropdown-trigger {
    background-color: rgba(100, 180, 255, 0.2);
    color: #4da6ff;
  }

  .column-header.dropdown-open .header-indicators .dropdown-trigger {
    background-color: #4da6ff;
    color: #1a1a1a;
  }

  .column-state-indicator {
    background-color: rgba(77, 166, 255, 0.1);
    border-color: rgba(77, 166, 255, 0.3);
  }

  .indicator-text {
    color: #4da6ff;
  }

  .indicator-clear-btn {
    background: #2d2d2d;
    color: #4da6ff;
    border-color: #4da6ff;
  }

  .indicator-clear-btn:hover {
    background-color: #4da6ff;
    color: #1a1a1a;
  }

  .no-cases-text {
    color: #999;
  }

  .clear-filters-btn {
    background: #2d2d2d;
    color: #4da6ff;
    border-color: #4da6ff;
  }

  .clear-filters-btn:hover {
    background-color: #4da6ff;
    color: #1a1a1a;
  }

  .filter-options-container::-webkit-scrollbar-track {
    background: #363636;
  }

  .filter-options-container::-webkit-scrollbar-thumb {
    background: #555;
  }

  .filter-options-container::-webkit-scrollbar-thumb:hover {
    background: #777;
  }
} */

/* ================== ACCESSIBILITY ================== */

@media (forced-colors: active) {
  .sortable-table .header .cell.column-header:focus {
    outline: 2px solid CanvasText;
  }

  .column-dropdown-menu {
    border: 2px solid CanvasText;
  }

  .sort-option:hover,
  .sort-option.active {
    outline: 2px solid Highlight;
  }

  .filter-apply-btn {
    border: 2px solid CanvasText;
  }

  .sort-badge,
  .filter-indicator {
    border: 1px solid CanvasText;
  }
}
/* ================== HEADER SEARCH INPUT IN CASE COLUMN ================== */

/* Override: Left align filter option text in desktop dropdowns */
.column-dropdown-menu .filter-option {
  text-align: left;
  justify-content: flex-start;
}

.column-dropdown-menu .filter-label {
  text-align: left;
}

/* Desktop dropdown header with close button */
.column-dropdown-header {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #e9ecef;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.column-dropdown-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.column-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.15s ease;
}

.column-close-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #333;
}

.column-close-btn svg {
  width: 12px;
  height: 12px;
}

/* ================== MOBILE CARD VIEW FIXES ================== */

@media (max-width: 768px) {
  /* Change header/content ratio from 50/50 to 25/75 */
  .cell::before {
    width: 25% !important;
    min-width: 80px;
    max-width: 100px;
    padding: 8px 6px !important;
    font-size: 11px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  
  .cell-content {
    width: 75% !important;
    padding: 8px !important;
    overflow: hidden;
  }
  
  /* Fix priority/classification banner overflow */
  .priority-banner {
    max-width: 100%;
    overflow: hidden;
  }
  
  .priority-banner svg {
    max-width: 100%;
    height: auto;
    width: auto;
  }
  
  .priority-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
  }
}

/* Container for header with search */
.header-content-with-search {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

/* Search wrapper in header */
.header-search-wrapper {
  flex: 1;
  min-width: 0;
  max-width: 70%;
}

/* Search input styling */
.header-search-input {
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 400;
  border: 1px solid #ced4da;
  border-radius: 4px;
  outline: none;
  background-color: #fff;
  color: #333;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.header-search-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
  background-color: #fff;
}

.header-search-input::placeholder {
  color: #999;
  font-weight: 400;
}

/* Ensure header text stays visible */
.header-content-with-search .header-text {
  flex-shrink: 0;
  font-weight: 600;
  white-space: nowrap;
}

/* Indicators stay on the right */
.header-content-with-search .header-indicators {
  flex-shrink: 0;
}

/* Hide the original search input row in the filter bar */
#searchTextButton,
#searchInput,
#searchRepButton {
  display: none !important;
}

/* ================== NO RESULTS INLINE (keeps headers visible) ================== */

.no-results-row {
  grid-column: 1 / -1;
  padding: 40px 20px;
}

.no-cases-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px dashed #dee2e6;
}

.no-cases-inline .no-cases-icon {
  font-size: 36px;
  margin-bottom: 12px;
  opacity: 0.6;
}

.no-cases-inline .no-cases-text {
  font-size: 14px;
  color: #6c757d;
  margin-bottom: 12px;
}

.no-cases-inline .no-cases-text strong {
  color: #333;
}

.no-cases-inline .clear-filters-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #0066cc;
  background: #fff;
  border: 1px solid #0066cc;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.no-cases-inline .clear-filters-btn:hover {
  background-color: #0066cc;
  color: #fff;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .header-search-wrapper {
    max-width: 60%;
  }
  
  .header-search-input {
    font-size: 11px;
    padding: 5px 8px;
  }
}

@media (max-width: 992px) {
  .header-search-wrapper {
    max-width: 50%;
  }
}

@media (max-width: 768px) {
  /* On mobile, show search above the table instead */
  .header-content-with-search {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }
  
  .header-search-wrapper {
    max-width: 100%;
    order: 1;
  }
  
  .header-content-with-search .header-text {
    order: 2;
    text-align: center;
  }
  
  .header-content-with-search .header-indicators {
    order: 3;
    justify-content: center;
  }
  
  .header-search-input {
    font-size: 14px;
    padding: 8px 12px;
  }
}
/* 

@media (prefers-color-scheme: dark) {
  .header-search-input {
    background-color: #363636;
    border-color: #555;
    color: #eee;
  }
  
  .header-search-input:focus {
    border-color: #4da6ff;
    box-shadow: 0 0 0 3px rgba(77, 166, 255, 0.15);
  }
  
  .header-search-input::placeholder {
    color: #888;
  }
} */

/* ================== MOBILE FILTER BAR ================== */

.mobile-filter-bar {
  display: none; /* Hidden by default, shown on mobile */
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  margin-bottom: 16px;
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

/* Show mobile filter bar only on mobile/tablet */
@media (max-width: 768px) {
  .mobile-filter-bar {
    display: flex;
  }
  
  /* Hide the inline search in column header on mobile since we have mobile bar */
  .header-search-wrapper {
    display: none;
  }
}

/* Mobile search section */
.mobile-search-section {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-search-input {
  flex: 1;
  padding: 10px 14px;
  font-size: 14px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  outline: none;
  background-color: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.mobile-search-input:focus {
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
}

.mobile-clear-search-btn {
  padding: 8px 12px;
  font-size: 14px;
  color: #dc3545;
  background: #fff;
  border: 1px solid #dc3545;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-clear-search-btn:hover {
  background-color: #dc3545;
  color: #fff;
}

/* Mobile controls section */
.mobile-controls-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Mobile dropdown container */
.mobile-dropdown-container {
  position: relative;
  width: 100%;
}

.mobile-dropdown-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  width: 100%;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-dropdown-btn:hover {
  border-color: #0066cc;
}

.mobile-dropdown-btn.active {
  background-color: #e7f1ff;
  border-color: #0066cc;
  color: #0066cc;
}

.mobile-dropdown-icon {
  display: flex;
  align-items: center;
}

.mobile-dropdown-label {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-dropdown-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.15s ease;
}

/* Mobile dropdown menu */
.mobile-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1200;
  max-height: 300px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all 0.15s ease;
}

.mobile-dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-dropdown-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  color: #333;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.mobile-dropdown-option:hover {
  background-color: #f8f9fa;
}

.mobile-dropdown-option.active {
  background-color: #e7f1ff;
  color: #0066cc;
  font-weight: 600;
}

.mobile-dropdown-clear {
  color: #dc3545;
}

.mobile-dropdown-clear:hover {
  background-color: #fef2f2;
}

.mobile-dropdown-divider {
  height: 1px;
  background-color: #dee2e6;
  margin: 4px 0;
}

/* Mobile filter menu specific */
.mobile-filter-menu {
  padding: 0;
}

.mobile-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #dee2e6;
  background-color: #f8f9fa;
  border-radius: 8px 8px 0 0;
}

.mobile-filter-title {
  font-weight: 600;
  font-size: 14px;
  color: #333;
}

.mobile-filter-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: none;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  cursor: pointer;
  color: #666;
  transition: all 0.15s ease;
}

.mobile-filter-close-btn:hover {
  background-color: #e9ecef;
  border-color: #adb5bd;
  color: #333;
}

.mobile-filter-close-btn svg {
  width: 14px;
  height: 14px;
}

.mobile-filter-options-wrapper {
  padding: 8px;
}

.mobile-filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.1s ease;
}

.mobile-filter-option:hover {
  background-color: #f8f9fa;
}

.mobile-filter-option.mobile-select-all {
  border-bottom: 1px solid #dee2e6;
  margin-bottom: 4px;
  padding-bottom: 10px;
  font-weight: 600;
}

.mobile-filter-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0066cc;
  flex-shrink: 0;
}

.mobile-filter-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.mobile-filter-icon svg {
  width: 20px;
  height: 20px;
}

.mobile-filter-apply-btn {
  display: block;
  width: 100%;
  padding: 10px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background-color: #0066cc;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.mobile-filter-apply-btn:hover {
  background-color: #0052a3;
}

/* Dark mode for mobile filter bar */
@media (prefers-color-scheme: dark) {
  .mobile-filter-bar {
    background-color: #2d2d2d;
    border-color: #444;
  }
  
  .mobile-search-input {
    background-color: #363636;
    border-color: #555;
    color: #eee;
  }
  
  .mobile-search-input:focus {
    border-color: #4da6ff;
  }
  
  .mobile-dropdown-btn {
    background: #363636;
    border-color: #555;
    color: #eee;
  }
  
  .mobile-dropdown-btn.active {
    background-color: rgba(77, 166, 255, 0.15);
    border-color: #4da6ff;
    color: #4da6ff;
  }
  
  .mobile-dropdown-menu {
    background: #2d2d2d;
    border-color: #444;
  }
  
  .mobile-dropdown-option {
    color: #eee;
  }
  
  .mobile-dropdown-option:hover {
    background-color: #363636;
  }
  
  .mobile-dropdown-option.active {
    background-color: rgba(77, 166, 255, 0.15);
    color: #4da6ff;
  }
  
  .mobile-filter-option:hover {
    background-color: #363636;
  }
  
  .mobile-filter-option.mobile-select-all {
    border-bottom-color: #444;
  }
}
/* ============================================================
   ACCORDION STYLES - Compact & Clean
   ============================================================ */

/* Main accordion container */
#formsAccordion {
    /* border-radius: 6px; */
    overflow: hidden;
    margin-top: -22px !important;
    /* border: 1px solid #e0e0e0; */
}

/* Accordion item - no gaps */
#formsAccordion .accordion-item {
    border: none;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}

#formsAccordion .accordion-item:last-child {
    border-bottom: none;
}

/* Compact accordion header button */
#formsAccordion .accordion-button {
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #2d3436;
    background: #f8f9fa;
    border: none;
    box-shadow: none;
    min-height: unset;
        margin-top: -33px;
}

#formsAccordion .accordion-button:not(.collapsed) {
    background: #e0f2f1;
    color: #00796b;
    box-shadow: none;
}

#formsAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: transparent;
}

/* Smaller chevron */
#formsAccordion .accordion-button::after {
    width: 12px;
    height: 12px;
    background-size: 12px;
}

/* Accordion body - no height restriction */
#formsAccordion .accordion-body {
    padding: 8px 10px;
    background: #fafbfc;
}

/* Remove default container padding */
#formsAccordion .accordion-body .container,
#formsAccordion .accordion-body form {
    /* padding: 0 !important; */
    margin: 0;
}

/* Compact form fields */
#formsAccordion .pb-3 {
    padding-bottom: 8px !important;
    margin-bottom: 0;
}

#formsAccordion label {
    /* font-size: 14px; */
    /* font-weight: 600; */
    color: #222222;
    /* margin-bottom: 2px; */
    /* text-transform: uppercase; */
}

/* #formsAccordion .form-control,
#formsAccordion .form-select {
    padding: 5px 8px;
    font-size: 14px;
    border-radius: 4px;
} */
/* 
#formsAccordion .form-control:disabled {
    background: #f5f5f5;
} */
/* 
/* Compact textarea display */
#formsAccordion .fake-textarea {
    padding: 6px 8px;
    font-size: 14px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    line-height: 1.3;
} */

/* Section headers */
#formsAccordion h3 {
    font-size: 16px;
    font-weight: 600;
    color: #00796b;
    margin: 6px 0 2px 0;
    border: none;
}

#formsAccordion hr {
    margin: 0 0 6px 0;
}

/* Links */
#formsAccordion .link-form-control {
    padding: 5px 8px;
    font-size: 14px;
}
/* ==========================================================================
   CSS ADDITIONS - Append this to the END of your existing CSS file
   ========================================================================== */

/* ==========================================================================
   HELP PANEL STYLES (moved from inline HTML)
   ========================================================================== */

.help-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #004080;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}

.help-btn:hover {
    background-color: #0066cc;
}

#help {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 50vw;
    max-height: 50vh;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ccc;
    padding: 15px;
    box-shadow: 0px 0px 29px rgba(0,0,0,0.5);
    display: none;
    z-index: 999;
    border-radius: 8px;
}

#help h1, #help h2 {
    color: #004080;
    margin-top: 20px;
}

#help h1 { font-size: 1.8rem; }
#help h2 { font-size: 1.4rem; }
#help p, #help li { font-size: 1rem; }

#help ul {
    margin-left: 20px;
    padding-left: 10px;
}

#help .tip {
    background: #f0f8ff;
    border-left: 4px solid #004080;
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
}

#help .warning {
    background: #fff4e5;
    border-left: 4px solid #ff9900;
    padding: 10px;
    margin: 15px 0;
    border-radius: 4px;
}

#help code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 90%;
}

@media (max-width: 768px) {
    #help {
        width: 90vw;
        max-height: 70vh;
        font-size: 0.95rem;
    }
    #help h1 { font-size: 1.5rem; }
    #help h2 { font-size: 1.2rem; }
    #help ul { margin-left: 15px; }
}

@media (max-width: 480px) {
    #help {
        width: 90vw;
        max-height: 70vh;
        font-size: 0.9rem;
    }
    #help h1 { font-size: 1.3rem; }
    #help h2 { font-size: 1.1rem; }
    #help .tip, #help .warning { font-size: 0.9rem; padding: 8px; }
}

/* ==========================================================================
   FILTER BAR STYLES (moved from inline HTML)
   ========================================================================== */

.filter-icon-btn {
    padding: 6px 10px;
    height: 40px;
    color: grey;
    background-color: rgb(237, 237, 237);
    border: 1px solid rgb(148, 148, 148);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.filter-icon-btn:hover {
    background-color: #e0e0e0;
}

.filter-search-input {
    height: 40px;
    max-width: 30%;
}

.searchRepButton {
    display: none;
    cursor: pointer;
}

.filter-date-group {
    width: auto;
    display: flex;
}

.boxlabel {
    padding: 8px;
    border-left: 1px solid rgb(148, 148, 148);
    border-top: 1px solid rgb(148, 148, 148);
    border-bottom: 1px solid rgb(148, 148, 148);
    font-weight: 400;
    width: 50%;
    background-color: rgb(237, 237, 237);
    text-align: right;
}

.boxdate {
    padding: 8px;
    font-weight: 400;
    width: 50%;
    border: 1px solid rgb(148, 148, 148);
}

.filter-controls-group {
    width: auto;
    display: flex;
}

.boxlabels {
    padding: 8px;
    text-align: right;
    width: 100%;
    display: flex;
    align-items: center;
}

.boxlabels .form-check-label {
    padding-right: 8px;
}

/* ==========================================================================
   FILTER BUTTONS - Refresh and Clear Filters
   ========================================================================== */

.filter-buttons-group {
    display: flex;
    gap: 8px;
    padding: 2px;
    align-items: center;
}

.filter-btn {
    max-width: 24vw;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 40px;
    border-radius: 5px;
    min-width: unset !important;
}
.bg-primary {
  background-color: unset !important;
}
/* Refresh button uses existing .btn-primary styling */
#refreshData {
    border-color: rgb(148, 148, 148);
        max-width: fit-content !important;
    width: fit-content !important;
    padding: 8px 10px !important;
    min-width: fit-content !important;
        border-radius: 50px !important;
}

/* Clear Filters button - secondary outline style */
#resetFilters {
      background-color: #ffffff !important;
    color: #6c757d !important;
    border: 1px solid #910a0a !important;
    font-size: smaller;
    padding: 2px 2px;
}

#resetFilters:hover {
    background-color: #6c757d !important;
    color: #ffffff !important;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */

@media (max-width: 992px) {
    .filter-buttons-group {
        flex-direction: column;
        gap: 4px;
    }
    
    .filter-btn {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .filter-search-input {
        max-width: 100%;
    }
    
    .filter-buttons-group {
        flex-direction: row;
        width: 100%;
    }
    
    .filter-btn {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .rowEdit {
        flex-direction: column;
        gap: 12px;
    }
    
    .col-main-tabs,
    .col-action-info,
    .col-timeline {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
    }
    
    /* Reduce panel heights on mobile */
    .panel-content.mainEditDataContainer,
    .mainEditDataContainer {
        height: auto;
        max-height: 400px;
    }
}
/* Fix iframe in workflow tab */
#workflow-content iframe {
    width: 100%;
    height: 100%;
    min-height: 500px;
}
/* Fix timeline overflow */
#timeline {
    position: relative;
    overflow-x: hidden;
}
/* Ensure tab content doesn't overflow container */
.tab-content {
    overflow: hidden;
}

.tab-pane {
    overflow-y: auto;
    overflow-x: hidden;
}