﻿.loading-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    background: rgba(33,37,41,.5); /* Bootstrap dark @ 50% */
    z-index: 1055; /* above most content */
}

.loading-card {
    background: var(--bs-body-bg);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 1rem 3rem rgba(0,0,0,.175);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-cell {
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    max-height: 120px;
}

.avatar {
  --size: 48px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  overflow: hidden;
  display: inline-block;
}

.avatar > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-fallback {
    --scale: .42; /* for 2 letters */
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #6c757d;
    color: #f1f1f1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    line-height: 1;
    text-transform: uppercase;
    font-size: calc(var(--size) * var(--scale));
}

.avatar-fallback[data-chars="1"] {
    --scale: .58;
}

.avatar-fallback[data-chars="3"] {
    --scale: .34;
}

/* Make Google Places dropdown appear above Bootstrap offcanvas/modal */
.pac-container {
    z-index: 2000 !important; /* higher than offcanvas (1045) and modal (1055) */
}

/* Make gallery scroll nicely if it gets tall */
.gallery-scroll {
    max-height: 520px;
    overflow: auto;
}

/* Ensure images scale and crop elegantly */
.object-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.doclist-scroll {
    max-height: 520px;
    overflow: auto;
}

.min-w-0 {
    min-width: 0;
}
/* helps text-truncate inside flex */

.drop-zone {
    border-style: dashed !important;
    transition: background-color .15s, border-color .15s;
}

.drop-zone.dragover {
    background-color: rgba(0,0,0,.03);
    border-color: var(--bs-primary) !important;
}


.doclist-scroll {
    max-height: 520px;
    overflow: auto;
}

.min-w-0 {
    min-width: 0;
}

.object-fit-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-scroll {
    overflow: auto;
    max-height: 60vh; /* adjust for your layout */
}

.chat-day-divider {
    text-align: center;
    position: relative;
}

.chat-day-divider span {
    display: inline-block;
    padding: .25rem .75rem;
    font-size: .75rem;
    background: var(--bs-light);
    color: var(--bs-secondary);
    border-radius: 999px;
    border: 1px solid var(--bs-border-color);
}

.chat-bubble {
    max-width: min(65ch, 80%);
    padding: .5rem .75rem .25rem;
    border-radius: 1rem;
    position: relative;
    border: 1px solid var(--bs-border-color);
}

.chat-bubble .chat-text {
    white-space: pre-wrap;
}

.chat-bubble .chat-meta {
    text-align: right;
    font-size: .75rem;
    color: var(--bs-secondary);
}

.chat-bubble.mine {
    background: var(--bs-primary-bg-subtle);
    border-color: var(--bs-primary-border-subtle);
}

.chat-bubble.theirs {
    background: var(--bs-body-bg);
}

.chat-attachments {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.chat-attachment-thumb {
    width: 120px;
    height: 90px;
    border-radius: .5rem;
    overflow: hidden;
    border: 1px solid var(--bs-border-color);
    display: inline-block;
}

.chat-attachment-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.chat-attachment-file {
    display: inline-flex;
    align-items: center;
    padding: .25rem .5rem;
    border-radius: .5rem;
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

.chat-input {
    resize: none;
    max-height: 8rem;
}

.typing {
    display: flex;
    gap: .25rem;
    align-items: center;
}

.typing span {
    width: .45rem;
    height: .45rem;
    border-radius: 50%;
    background: var(--bs-secondary);
    animation: blink 1.2s infinite ease-in-out;
}

.typing span:nth-child(2) {
    animation-delay: .15s;
}

.typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes blink {
    0%,80%,100% {
        opacity: .3
    }

    40% {
        opacity: 1
    }
}

.draft-attach-thumb {
    width: 80px;
    height: 60px;
    border-radius: .5rem;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--bs-border-color);
}

    .draft-attach-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .draft-attach-thumb .btn-close {
        position: absolute;
        top: 2px;
        right: 2px;
    }

.draft-attach-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .5rem;
    border-radius: .5rem;
    background: var(--bs-light);
    border: 1px solid var(--bs-border-color);
}

.chat-threads-scroll {
    max-height: 70vh;
    overflow: auto;
}

.chat-thread.active {
    background: var(--bs-primary-bg-subtle);
}

.min-w-0 {
    min-width: 0;
}

/* Wider offcanvas (desktop), full width on phones */
.offcanvas.offcanvas-end.offcanvas-wide {
    --bs-offcanvas-width: 450px;
}

/* Flight schedule offcanvas — needs extra width for schedule table */
#flightScheduleCanvas {
    --bs-offcanvas-width: 700px;
}

/* Extra wide offcanvas for location picker with map */
.offcanvas.offcanvas-end.offcanvas-wide-xl {
    --bs-offcanvas-width: clamp(700px, 65vw, 1000px);
}

@media (max-width: 767.98px) {
    .offcanvas.offcanvas-end.offcanvas-wide,
    .offcanvas.offcanvas-end.offcanvas-wide-xl,
    #flightScheduleCanvas {
        --bs-offcanvas-width: 100vw;
    }
}

/* Keep long values (GUIDs) inside the card */
.audit-changes, .audit-changes * {
    overflow-wrap: anywhere;
    word-break: break-word;
}

    .audit-changes .badge, .audit-changes code {
        white-space: normal;
    }


    /* TIMELINE */
.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
}

.title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.view-all-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    background-color: transparent;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    color: #0078d4; /* or theme color */
}

.timeline-content {
    min-height: 200px; /* or whatever baseline you want */
    height: 100%;
    max-height: 500px; /* if you still want to cap it */
    overflow-y: auto;
    padding: 0.5rem 1rem;
}

/* Flight Autocomplete Styles */
.flight-autocomplete-dropdown {
    position: absolute !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3) !important;
    border: 1px solid var(--bs-border-color) !important;
    z-index: 1070 !important;
    background-color: var(--bs-dropdown-bg, #fff) !important;
    color: var(--bs-dropdown-color, inherit) !important;
    opacity: 1 !important;
}

/* Override Bootstrap dropdown-menu defaults with highest specificity */
div.dropdown-menu.show.flight-autocomplete-dropdown,
div.position-relative > div.dropdown-menu.show.flight-autocomplete-dropdown {
    background: var(--bs-dropdown-bg) !important;
    background-color: var(--bs-dropdown-bg) !important;
    color: var(--bs-dropdown-color) !important;
    border-color: var(--bs-dropdown-border-color) !important;
    opacity: 1 !important;
}

div.dropdown-item.flight-result-item,
div.dropdown-menu.flight-autocomplete-dropdown > div.dropdown-item.flight-result-item {
    cursor: pointer !important;
    padding: 1rem !important;
    border-bottom: 1px solid var(--bs-border-color) !important;
    transition: background-color 0.2s ease !important;
    color: var(--bs-body-color, inherit) !important;
    background: var(--bs-dropdown-bg, #fff) !important;
    background-color: var(--bs-dropdown-bg, #fff) !important;
    opacity: 1 !important;
}

    .flight-result-item:last-child {
        border-bottom: none;
    }

    div.dropdown-item.flight-result-item:hover {
        background-color: var(--bs-dropdown-link-hover-bg, var(--bs-secondary-bg)) !important;
        color: var(--bs-dropdown-link-hover-color, inherit) !important;
        opacity: 1 !important;
    }

    .flight-result-item:active {
        background-color: var(--bs-dropdown-link-active-bg, var(--bs-tertiary-bg));
    }

    /* Text colors within flight items */
    .flight-result-item .text-muted {
        color: var(--bs-secondary-color, #6c757d) !important;
    }

    .flight-result-item .text-primary {
        color: var(--bs-primary, #0d6efd) !important;
    }

    .flight-result-item .text-info {
        color: var(--bs-info, #0dcaf0) !important;
    }

    .flight-result-item .fw-semibold,
    .flight-result-item .fw-bold {
        color: inherit;
    }

    .flight-result-item div,
    .flight-result-item span {
        color: inherit;
    }

/* Dark mode specific adjustments */
[data-bs-theme="dark"] div.dropdown-menu.show.flight-autocomplete-dropdown {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.5) !important;
    background: #212529 !important;
    background-color: #212529 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] div.dropdown-item.flight-result-item {
    color: #dee2e6 !important;
    background: #212529 !important;
    background-color: #212529 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] div.dropdown-item.flight-result-item:hover {
    background: #2c3034 !important;
    background-color: #2c3034 !important;
    opacity: 1 !important;
}

[data-bs-theme="dark"] .flight-result-item .fw-semibold,
[data-bs-theme="dark"] .flight-result-item .fw-bold {
    color: #dee2e6 !important;
}

/* Airport switch button animation */
.btn-icon i {
    transition: transform 0.3s ease;
}

.btn-icon:hover i {
    transform: rotate(180deg);
}

.btn-icon:active {
    transform: scale(0.95);
}

/* Modal fixes - break out of parent stacking context */
/* Reset transform/filter on body and wrappers when modal is open */
body.modal-open {
    filter: none !important;
}

body.modal-open .wrapper,
body.modal-open .page-content {
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    will-change: auto !important;
}

/* Ensure modal and backdrop cover entire viewport */
/* Note: td-components.css sets backdrop to z-index 1070, so modal-dialog must be higher */
.modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1075 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

.modal-backdrop {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 1070 !important;
}

/* Ensure modal backdrop is visible when modals are shown */
/* Override theme's fade transition that sets opacity to 0 */
.modal-backdrop.fade.show,
.modal-backdrop.show {
    opacity: 0.5 !important;
    background-color: #000 !important;
}

/* Ensure modal-dialog and content are above backdrop (must be > 1070) */
.modal-dialog {
    position: relative !important;
    z-index: 1080 !important;
}

.modal-content {
    position: relative !important;
    z-index: 1081 !important;
}

/* ========================================
   Operations List - Attention Indicators
   ======================================== */

/* Attention level left border ribbons */
.attention-critical {
    border-left: 4px solid #dc3545 !important;
}

.attention-warning {
    border-left: 4px solid #fd7e14 !important;
}

.attention-info {
    border-left: 4px solid #ffc107 !important;
}

.attention-none {
    border-left: 4px solid transparent !important;
}

/* ========================================
   Operations List - Card View
   ======================================== */

.operation-card {
    transition: all 0.2s ease;
    border-left-width: 4px !important;
}

.operation-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.operation-card.attention-critical {
    border-left-color: #dc3545 !important;
}

.operation-card.attention-warning {
    border-left-color: #fd7e14 !important;
}

.operation-card.attention-info {
    border-left-color: #ffc107 !important;
}

.operation-card.attention-none {
    border-left-color: var(--tb-border-color, #e9ecef) !important;
}

/* ========================================
   Operations List - Scheduling Progress Bar
   ======================================== */

.scheduling-bar {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: #e9ecef;
}

.scheduling-bar .segment {
    height: 100%;
}

.scheduling-bar .segment-draft {
    background: #6c757d;
}

.scheduling-bar .segment-unscheduled {
    background: #ffc107;
}

.scheduling-bar .segment-assigned {
    background: #0dcaf0;
}

.scheduling-bar .segment-scheduled {
    background: #198754;
}

.scheduling-bar .segment-completed {
    background: #198754;
}

.scheduling-bar .segment-cancelled {
    background: #dc3545;
}

/* ========================================
   Resource Tracking Page
   ======================================== */

.cursor-pointer {
    cursor: pointer;
}

.hover-bg-light:hover {
    background-color: #f8f9fa;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.resource-info-popup {
    min-width: 200px;
}

/* Google Maps InfoWindow - ensure close button visibility in dark mode */
.gm-style-iw-d,
.gm-style-iw-c {
    background: #fff !important;
}

.gm-style-iw-tc::after {
    background: #fff !important;
}

/* Make the close button always visible with good contrast */
.gm-ui-hover-effect {
    opacity: 1 !important;
    width: 30px !important;
    height: 30px !important;
    top: 4px !important;
    right: 4px !important;
}

.gm-ui-hover-effect > span {
    background-color: #374151 !important;
    width: 18px !important;
    height: 18px !important;
    margin: 6px !important;
}

/* Dark mode - ensure InfoWindow close button has light background for visibility */
[data-bs-theme="dark"] .gm-ui-hover-effect {
    background: rgba(255, 255, 255, 0.95) !important;
    border-radius: 50%;
}

[data-bs-theme="dark"] .gm-ui-hover-effect:hover {
    background: rgba(255, 255, 255, 1) !important;
}

[data-bs-theme="dark"] .gm-ui-hover-effect > span {
    background-color: #1f2937 !important;
}

/* ========================================
   Sales Operations Dashboard
   ======================================== */

/* KPI Card animations */
.card-animate {
    transition: all 0.2s ease;
}

.card-animate:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Clickable rows */
tr.cursor-pointer {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

tr.cursor-pointer:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
}

/* Source badges */
.badge-light-info {
    background-color: rgba(var(--bs-info-rgb), 0.15);
    color: var(--bs-info);
}

.badge-light-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-primary);
}

.badge-light-warning {
    background-color: rgba(var(--bs-warning-rgb), 0.15);
    color: var(--bs-warning);
}

/* Custom soft badges (extends Bootstrap badge-soft-* palette) */
.badge-soft-orange {
    background-color: rgba(253, 126, 20, 0.15);
    color: #fd7e14;
}

.badge-soft-teal {
    background-color: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.badge-soft-yellow {
    background-color: rgba(255, 193, 7, 0.18);
    color: #856404;
}

.badge-soft-red {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.badge-soft-purple {
    background-color: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

.badge-soft-pink {
    background-color: rgba(214, 51, 132, 0.15);
    color: #d63384;
}

.badge-soft-indigo {
    background-color: rgba(102, 16, 242, 0.15);
    color: #6610f2;
}

.badge-soft-cyan {
    background-color: rgba(13, 202, 240, 0.15);
    color: #0aa2c0;
}

/* Custom outline badges */
.badge-outline-orange {
    border: 1px solid #fd7e14;
    color: #fd7e14;
    background-color: transparent;
}

.badge-outline-teal {
    border: 1px solid #17a2b8;
    color: #17a2b8;
    background-color: transparent;
}

.badge-outline-yellow {
    border: 1px solid #ffc107;
    color: #856404;
    background-color: transparent;
}

.badge-outline-red {
    border: 1px solid #dc3545;
    color: #dc3545;
    background-color: transparent;
}

.badge-outline-purple {
    border: 1px solid #6f42c1;
    color: #6f42c1;
    background-color: transparent;
}

.badge-outline-pink {
    border: 1px solid #d63384;
    color: #d63384;
    background-color: transparent;
}

.badge-outline-indigo {
    border: 1px solid #6610f2;
    color: #6610f2;
    background-color: transparent;
}

.badge-outline-cyan {
    border: 1px solid #0dcaf0;
    color: #0aa2c0;
    background-color: transparent;
}

/* Operation offcanvas custom width */
.offcanvas.offcanvas-end[style*="width: 600px"] {
    --bs-offcanvas-width: 600px;
}

/* Alert row animations */
.table tr.table-danger,
.table tr.table-warning {
    transition: background-color 0.3s ease;
}

/* Filter button group improvements */
.btn-group .btn.btn-sm {
    padding: 0.35rem 0.75rem;
}

/* Mobile responsiveness for dashboard */
@media (max-width: 767.98px) {
    .card-animate:hover {
        transform: none;
    }

    .offcanvas[style*="width: 600px"] {
        width: 100vw !important;
    }

    /* Stack KPI cards better on mobile */
    .row.g-3 > [class*="col-xl-3"] {
        margin-bottom: 0.5rem;
    }
}

/* Operation card view - better grid on mobile */
@media (max-width: 575.98px) {
    .operation-card .btn-group {
        width: 100%;
        margin-top: 0.5rem;
    }

    .operation-card .btn-group .btn {
        flex: 1;
    }
}

/* Offcanvas improvements */
.offcanvas-body.p-0 > .p-3 {
    transition: background-color 0.15s ease;
}

.offcanvas-body .list-group-item:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
}

/* Quick filter badges in alerts table */
.badge.fs-7 {
    font-size: 0.75rem !important;
}

/* ========================================
   Notification Dropdown z-index Fix
   ======================================== */

/* Topbar z-index: above page-content (auto) but BELOW Bootstrap offcanvas
   (backdrop=1040, panel=1045) and modal (backdrop=1050, dialog=1055).
   This prevents the topbar from "punching through" the offcanvas overlay. */
.app-topbar {
    z-index: 1035 !important;
}

.app-topbar .topbar-item .dropdown-menu {
    z-index: 1100 !important;
    border-style: solid !important;
}

/* Fix dropdown menus being clipped inside table-responsive containers.
   The overflow-x:auto on .table-responsive creates a scrolling context
   that clips absolutely-positioned dropdowns at the container boundary. */
.table-responsive .dropdown-menu {
    position: fixed !important;
    z-index: 1050 !important;
}

/* ========================================
   Search Input Width - Consistent Toolbars
   ======================================== */

/* Ensure search inputs have consistent minimum width */
.gridjs-search-input {
    min-width: 200px;
}

@media (min-width: 768px) {
    .gridjs-search-input {
        min-width: 250px;
    }
}

/* ── Print: element-targeted printing via #print-overlay ──── */
/* exportHelpers.printElement() clones content into #print-overlay,
   which sits directly on body. During print, only that overlay shows. */
@media print {
    body:has(#print-overlay) > *:not(#print-overlay) {
        display: none !important;
    }

    #print-overlay {
        display: block !important;
        position: static !important;
        padding: 20px;
        background: white;
        color: black;
    }

    #print-overlay .d-print-none {
        display: none !important;
    }
}

/* Screen: keep print overlay hidden */
#print-overlay {
    display: none;
}

/* ========================================
   Schedule Timeline
   ======================================== */

/* Grid container for the schedule timeline */
.schedule-grid {
    position: relative;
}

/* Resource label column (sticky left) */
.schedule-resource-label {
    position: sticky;
    left: 0;
    z-index: 3;
    background: inherit;
    min-width: 150px;
    max-width: 150px;
}

/* Resource row */
.schedule-row {
    transition: background-color 0.1s ease;
}

.schedule-row:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.03) !important;
}

/* Schedule block base styles */
.schedule-block {
    border-radius: 4px;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.schedule-block:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
    z-index: 5;
}

/* Hard block — solid left border, full opacity background */
.schedule-block--hard {
    border-left-width: 3px;
    border-left-style: solid;
}

/* Soft block — dashed left border, lower opacity background */
.schedule-block--soft {
    border-left-width: 3px;
    border-left-style: dashed;
    opacity: 0.75;
}

.schedule-block--soft:hover {
    opacity: 1;
}

/* Now indicator — vertical red line for current time */
.schedule-now-indicator {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #dc3545;
    z-index: 4;
    pointer-events: none;
}

.schedule-now-indicator::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -3px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
}

/* Hour grid lines */
.schedule-hour-grid {
    position: absolute;
    top: 0;
    bottom: 0;
    border-left: 1px solid rgba(0, 0, 0, 0.06);
    pointer-events: none;
}

/* Block type icons in schedule */
.schedule-block-icon {
    font-size: 0.65rem;
    margin-right: 2px;
    opacity: 0.8;
}

/* Drag-drop styles for schedule */
.schedule-draggable {
    cursor: grab;
    user-select: none;
}

.schedule-draggable:active {
    cursor: grabbing;
}

.schedule-draggable.dragging {
    opacity: 0.5;
}

/* Drop zone highlight when dragging over a resource row */
.schedule-drop-target {
    transition: background-color 0.15s ease;
}

.schedule-drop-target.drag-over {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
    outline: 2px dashed var(--bs-primary);
    outline-offset: -2px;
}

/* Week view day separator */
.schedule-day-separator {
    border-right: 2px solid var(--bs-border-color);
}

/* Block tooltip on hover */
.schedule-block-tooltip {
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translate(-50%, -100%);
    background: var(--bs-dark);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.schedule-block:hover .schedule-block-tooltip {
    opacity: 1;
}

/* Zoom controls */
.schedule-zoom-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.schedule-zoom-controls .btn {
    padding: 0.15rem 0.3rem;
    font-size: 0.7rem;
}

/* Hide schedule timeline on print */
@media print {
    .schedule-grid,
    .schedule-zoom-controls {
        display: none !important;
    }
}

/* ═══════════════════════════════════════════════
   Dispatch Planner
   ═══════════════════════════════════════════════ */

/* Task cards in left panel */
.task-card {
    cursor: grab;
    transition: background-color 0.15s, box-shadow 0.15s;
}

    .task-card:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.04);
    }

    .task-card:active {
        cursor: grabbing;
    }

    .task-card.dragging {
        opacity: 0.4;
        background-color: rgba(var(--bs-primary-rgb), 0.08);
    }

/* Match score highlighting when a shift is selected */
.task-card.match-good {
    border-left: 3px solid var(--bs-success);
}

.task-card.match-partial {
    border-left: 3px solid var(--bs-warning);
}

.task-card.match-poor {
    border-left: 3px solid var(--bs-danger);
}

/* Shift cards in right panel */
.shift-card {
    cursor: pointer;
    transition: background-color 0.15s, box-shadow 0.15s;
}

    .shift-card:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.03);
    }

.shift-card-selected {
    background-color: rgba(var(--bs-primary-rgb), 0.06) !important;
    border-left: 3px solid var(--bs-primary);
}

/* Drop zone highlighting — task drop */
.shift-drop-zone-active {
    background-color: rgba(var(--bs-success-rgb), 0.08) !important;
    border: 2px dashed var(--bs-success) !important;
    box-shadow: inset 0 0 8px rgba(var(--bs-success-rgb), 0.15);
}

/* Drop zone highlighting — resource drop */
.resource-drop-zone-active {
    background-color: rgba(var(--bs-info-rgb), 0.08) !important;
    border: 2px dashed var(--bs-info) !important;
    box-shadow: inset 0 0 8px rgba(var(--bs-info-rgb), 0.15);
}

/* Resource cards in right panel */
.resource-card {
    cursor: default;
    transition: background-color 0.15s, box-shadow 0.15s;
}

    .resource-card[draggable="true"] {
        cursor: grab;
    }

    .resource-card[draggable="true"]:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.04);
    }

    .resource-card[draggable="true"]:active {
        cursor: grabbing;
    }

    .resource-card.resource-dragging {
        opacity: 0.4;
        background-color: rgba(var(--bs-info-rgb), 0.10);
    }

/* Dashed border for empty task zone */
.border-dashed {
    border-style: dashed !important;
}

/* Operation group in left panel */
.sibling-group .bg-light {
    transition: background-color 0.15s;
}

    .sibling-group .bg-light:hover {
        background-color: rgba(var(--bs-secondary-rgb), 0.12) !important;
    }

/* Expanded task list inside shift cards */
.shift-card .btn-icon.text-danger {
    opacity: 0;
    transition: opacity 0.15s;
}

.shift-card .d-flex:hover > .btn-icon.text-danger {
    opacity: 1;
}

.shift-card .btn-icon.text-danger:hover {
    opacity: 1;
    background-color: rgba(var(--bs-danger-rgb), 0.1);
    border-radius: 0.25rem;
}

/* Soft background helpers for resource assignment */
.bg-soft-primary {
    background-color: rgba(var(--bs-primary-rgb), 0.08) !important;
}

.bg-soft-success {
    background-color: rgba(var(--bs-success-rgb), 0.08) !important;
}

.bg-soft-info {
    background-color: rgba(var(--bs-info-rgb), 0.08) !important;
}
