/**
 * Clean & Minimal UI Theme for Nyla Project
 * Built on top of Bootstrap 5 & AdminLTE 4
 */

/* ==========================================================================
   1. Typography & Global Tokens
   ========================================================================== */
:root {
    --app-font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --app-radius-sm: 6px;
    --app-radius: 10px;
    --app-radius-lg: 14px;
    --app-shadow-subtle: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 4px -1px rgba(0, 0, 0, 0.04);
    --app-shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.04), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
    --app-shadow-hover: 0 4px 12px -2px rgba(0, 0, 0, 0.06), 0 2px 6px -1px rgba(0, 0, 0, 0.04);
}

html {
    font-size: 16px;
}

body {
    min-height: 100vh;
    font-family: var(--app-font-family);
    font-size: 0.95rem; /* ~15.2px */
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
}

[data-bs-theme="light"] {
    --bs-body-bg: #f1f5f9;
    --bs-body-color: #0f172a;
    --bs-secondary-color: #475569;
    --bs-tertiary-bg: #e2e8f0;
    --bs-border-color: #cbd5e1;
    --bs-border-color-translucent: #cbd5e1;
    --card-bg: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.95);
    --sidebar-bg: #0b1120;
    --bs-link-color: #1d4ed8;
    --bs-link-hover-color: #1e40af;
}

[data-bs-theme="dark"] {
    --bs-body-bg: #0b1120;
    --bs-body-color: #f1f5f9;
    --bs-tertiary-bg: #111827;
    --bs-border-color: #1f2937;
    --bs-border-color-translucent: rgba(31, 41, 55, 0.8);
    --card-bg: #111827;
    --header-bg: rgba(17, 24, 39, 0.85);
    --sidebar-bg: #070b14;
}

/* ==========================================================================
   2. Layout & Header
   ========================================================================== */
.app-wrapper {
    min-height: 100vh;
}

.app-main {
    background-color: var(--bs-body-bg);
}

.app-header {
    background-color: var(--header-bg) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--bs-border-color-translucent) !important;
    height: 3.85rem;
    padding: 0 1rem;
}

.app-content-header {
    background-color: transparent;
    padding: 1.25rem 0 0.5rem 0;
}

.app-content-header h3 {
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-footer {
    background-color: var(--card-bg) !important;
    border-top: 1px solid var(--bs-border-color-translucent) !important;
    font-size: 0.875rem;
}

/* ==========================================================================
   3. Minimal Sidebar
   ========================================================================== */
.app-sidebar {
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-brand {
    height: 3.85rem;
    display: flex;
    align-items: center;
    padding: 0 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.app-sidebar .user-panel {
    padding: 0.85rem 1rem;
    margin: 0.5rem 0.5rem 0.75rem 0.5rem;
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.app-sidebar .nav-header {
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: #64748b !important;
    padding: 0.75rem 1rem 0.35rem 1rem;
}

.app-sidebar .nav-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.9rem;
    color: #94a3b8;
    border-radius: var(--app-radius-sm);
    margin: 0.15rem 0.5rem;
    font-size: 0.925rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
}

.app-sidebar .nav-link .nav-icon {
    font-size: 1.15rem;
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
    color: #64748b;
    transition: color 0.15s ease-in-out;
}

.app-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: #f8fafc;
}

.app-sidebar .nav-link:hover .nav-icon {
    color: #93c5fd;
}

.app-sidebar .nav-link.active {
    background-color: rgba(59, 130, 246, 0.12) !important;
    color: #60a5fa !important;
    font-weight: 600;
}

.app-sidebar .nav-link.active .nav-icon {
    color: #60a5fa !important;
}

/* Sidebar Mini & Collapse Transitions & Layout */
body.sidebar-mini.sidebar-collapse .app-sidebar .sidebar-brand {
    justify-content: center;
    padding: 0;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .sidebar-brand .brand-link {
    justify-content: center;
    padding: 0;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .sidebar-brand .brand-link span:first-child {
    margin-right: 0 !important;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .user-panel {
    justify-content: center;
    padding: 0.6rem 0.2rem;
    margin: 0.5rem 0.35rem 0.75rem 0.35rem;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .user-panel .image {
    margin-right: 0 !important;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .user-panel .info {
    display: none;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .nav-link {
    justify-content: center;
    padding: 0.6rem 0;
    margin: 0.15rem 0.35rem;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .nav-link .nav-icon {
    margin-right: 0;
}

body.sidebar-mini.sidebar-collapse .app-sidebar .nav-header {
    display: none;
}

/* Hover expansion effect when hovering collapsed sidebar on desktop */
@media (min-width: 992px) {
    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .sidebar-brand {
        justify-content: flex-start;
        padding: 0 1.25rem;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .sidebar-brand .brand-link {
        justify-content: flex-start;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .sidebar-brand .brand-link span:first-child {
        margin-right: 0.625rem !important;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .user-panel {
        justify-content: flex-start;
        padding: 0.85rem 1rem;
        margin: 0.5rem 0.5rem 0.75rem 0.5rem;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .user-panel .image {
        margin-right: 0.625rem !important;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .user-panel .info {
        display: block;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .nav-link {
        justify-content: flex-start;
        padding: 0.6rem 0.9rem;
        margin: 0.15rem 0.5rem;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .nav-link .nav-icon {
        margin-right: 0.75rem;
    }

    body.sidebar-mini.sidebar-collapse .app-sidebar:hover .nav-header {
        display: block;
    }
}

/* ==========================================================================
   4. Cards & Metric Widgets
   ========================================================================== */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--bs-border-color-translucent) !important;
    border-radius: var(--app-radius-lg) !important;
    box-shadow: var(--app-shadow-card) !important;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid var(--bs-border-color-translucent) !important;
    padding: 1.1rem 1.35rem;
}

.card-body {
    padding: 1.35rem;
}

/* Minimal Metric Icon Chip */
.metric-chip {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
}

.metric-chip.chip-primary {
    background-color: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.metric-chip.chip-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.metric-chip.chip-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.metric-chip.chip-info {
    background-color: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

[data-bs-theme="dark"] .metric-chip.chip-primary {
    background-color: rgba(59, 130, 246, 0.18);
    color: #60a5fa;
}

[data-bs-theme="dark"] .metric-chip.chip-success {
    background-color: rgba(16, 185, 129, 0.18);
    color: #34d399;
}

[data-bs-theme="dark"] .metric-chip.chip-warning {
    background-color: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
}

[data-bs-theme="dark"] .metric-chip.chip-info {
    background-color: rgba(14, 165, 233, 0.18);
    color: #38bdf8;
}

.metric-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: var(--bs-secondary-color);
    margin-bottom: 0.25rem;
}

.metric-value {
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0;
    color: var(--bs-body-color);
}

/* ==========================================================================
   5. Modern Soft Badges
   ========================================================================== */
.badge {
    font-size: 0.825rem;
    font-weight: 500;
    padding: 0.35em 0.7em;
    letter-spacing: 0.01em;
}

.badge-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.badge-soft-primary {
    background-color: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-soft-success {
    background-color: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.badge-soft-warning {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

.badge-soft-danger {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-soft-info {
    background-color: #e0f2fe;
    color: #075985;
    border: 1px solid #bae6fd;
}

.badge-soft-secondary {
    background-color: #e2e8f0;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

[data-bs-theme="dark"] .badge-soft-primary {
    background-color: rgba(37, 99, 235, 0.15);
    color: #93c5fd;
    border-color: rgba(37, 99, 235, 0.3);
}

[data-bs-theme="dark"] .badge-soft-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

[data-bs-theme="dark"] .badge-soft-warning {
    background-color: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

[data-bs-theme="dark"] .badge-soft-danger {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
    border-color: rgba(239, 68, 68, 0.3);
}

[data-bs-theme="dark"] .badge-soft-info {
    background-color: rgba(14, 165, 233, 0.15);
    color: #7dd3fc;
    border-color: rgba(14, 165, 233, 0.3);
}

[data-bs-theme="dark"] .badge-soft-secondary {
    background-color: rgba(100, 116, 139, 0.15);
    color: #cbd5e1;
    border-color: rgba(100, 116, 139, 0.3);
}

/* ==========================================================================
   6. Clean Tables & GridView
   ========================================================================== */
.table {
    --bs-table-bg: transparent;
    font-size: 0.935rem;
    margin-bottom: 0;
}

.table > thead > tr > th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--bs-body-color);
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1.5px solid var(--bs-border-color);
    padding: 0.85rem 1.1rem;
    white-space: nowrap;
}

.table > tbody > tr > td {
    padding: 0.95rem 1.1rem;
    border-bottom: 1px solid var(--bs-border-color);
    vertical-align: middle;
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(59, 130, 246, 0.03);
}

[data-bs-theme="dark"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Action Buttons Minimal */
.btn-action-icon {
    width: 34px;
    height: 34px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--app-radius-sm);
    font-size: 0.9rem;
    border: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    background: transparent;
    transition: all 0.15s ease;
}

.btn-action-icon:hover {
    background-color: rgba(59, 130, 246, 0.08);
    color: #2563eb;
    border-color: #bfdbfe;
}

.btn-action-icon.btn-action-delete:hover {
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: #fecaca;
}

/* ==========================================================================
   7. Form Controls & Inputs
   ========================================================================== */
.form-control, .form-select {
    border-radius: var(--app-radius);
    border: 1px solid var(--bs-border-color);
    padding: 0.6rem 0.9rem;
    font-size: 0.935rem;
    background-color: var(--card-bg);
    color: var(--bs-body-color);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background-color: var(--card-bg);
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-body-color);
    margin-bottom: 0.35rem;
}

/* ==========================================================================
   8. Buttons & Helpers
   ========================================================================== */
.btn {
    border-radius: var(--app-radius);
    font-size: 0.925rem;
    font-weight: 500;
    padding: 0.55rem 1.05rem;
    letter-spacing: -0.01em;
    transition: all 0.15s ease-in-out;
}

.btn-sm {
    border-radius: var(--app-radius-sm);
    font-size: 0.85rem;
    padding: 0.38rem 0.85rem;
}

.btn-primary {
    background-color: #2563eb;
    border-color: #2563eb;
    box-shadow: 0 1px 2px 0 rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 2px 6px 0 rgba(37, 99, 235, 0.3);
}

/* Avatar Chips */
.avatar-circle {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    font-size: 0.95rem;
}

.avatar-circle-sm {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
}

.avatar-circle-lg {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    font-size: 1.45rem;
}

/* Breadcrumbs */
.breadcrumb {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: #64748b;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #2563eb;
}

.breadcrumb-item.active {
    color: var(--bs-body-color);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "/";
    font-size: 0.8rem;
    color: #94a3b8;
    vertical-align: middle;
}


/* User Menu Dropdown */
.user-menu .dropdown-menu {
    width: 260px;
    padding: 0;
    border-radius: var(--app-radius-lg);
    box-shadow: var(--app-shadow-hover);
    overflow: hidden;
}

/* GridView sort icons */
a.asc:after, a.desc:after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 4px transparent;
    margin: 0 0 2px 4px;
    vertical-align: middle;
}

a.asc:after {
    border-bottom: solid 5px var(--bs-body-color);
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 5px var(--bs-body-color);
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

/* Responsive Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* ==========================================================================
   Kanban Board Styles
   ========================================================================== */
.kanban-board {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1.5rem;
    align-items: flex-start;
    min-height: calc(100vh - 270px);
}

.kanban-column {
    flex: 0 0 320px;
    width: 320px;
    max-width: 320px;
    background-color: var(--bs-tertiary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 260px);
    box-shadow: var(--app-shadow-sm);
    transition: box-shadow var(--app-transition), border-color var(--app-transition);
}

.kanban-column-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bs-body-bg);
    border-top-left-radius: var(--app-radius-lg);
    border-top-right-radius: var(--app-radius-lg);
}

.kanban-column-body {
    padding: 0.75rem;
    overflow-y: auto;
    flex-grow: 1;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    transition: background-color 0.15s ease-in-out;
}

.kanban-column-body.drag-over {
    background-color: rgba(59, 130, 246, 0.06);
    border-radius: 0 0 var(--app-radius-lg) var(--app-radius-lg);
}

.kanban-card {
    background-color: var(--bs-body-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius-md);
    padding: 0.875rem;
    cursor: grab;
    user-select: none;
    box-shadow: var(--app-shadow-sm);
    transition: transform var(--app-transition), box-shadow var(--app-transition), border-color var(--app-transition);
    position: relative;
}

.kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--app-shadow-md);
    border-color: rgba(59, 130, 246, 0.4);
}

.kanban-card:active {
    cursor: grabbing;
}

.kanban-card.is-dragging {
    opacity: 0.45;
    transform: scale(0.97);
    border: 1.5px dashed var(--bs-primary);
}

.kanban-drop-placeholder {
    height: 60px;
    border: 2px dashed rgba(59, 130, 246, 0.4);
    border-radius: var(--app-radius-md);
    background-color: rgba(59, 130, 246, 0.05);
    margin-bottom: 0.5rem;
    pointer-events: none;
}

.kanban-empty-state {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--bs-secondary-color);
    font-size: 0.85rem;
    border: 1px dashed var(--bs-border-color);
    border-radius: var(--app-radius-md);
}

/* ==========================================================================
   Task Table Drag & Reorder Styles
   ========================================================================== */
.drag-handle {
    cursor: grab;
    color: var(--bs-secondary-color);
    padding: 2px 4px;
    border-radius: 4px;
    transition: color var(--app-transition), background-color var(--app-transition);
    user-select: none;
}

.drag-handle:hover {
    color: var(--bs-primary);
    background-color: rgba(59, 130, 246, 0.1);
}

.drag-handle:active {
    cursor: grabbing;
}

tr.task-row {
    transition: background-color var(--app-transition), opacity var(--app-transition);
}

tr.task-row.is-dragging {
    opacity: 0.35;
    background-color: rgba(59, 130, 246, 0.08) !important;
}

tr.task-row.drag-over-top td {
    border-top: 2.5px solid var(--bs-primary) !important;
}

tr.task-row.drag-over-bottom td {
    border-bottom: 2.5px solid var(--bs-primary) !important;
}

/* ==========================================================================
   Gantt Chart Layout & Timeline Styles
   ========================================================================== */
.gantt-container {
    border: 1px solid var(--bs-border-color);
    border-radius: var(--app-radius-lg);
    background-color: var(--bs-body-bg);
    overflow: hidden;
    box-shadow: var(--app-shadow-sm);
}

.gantt-split-view {
    display: flex;
    position: relative;
    overflow: hidden;
    min-height: 480px;
}

.gantt-table-panel {
    width: 380px;
    min-width: 380px;
    border-right: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.gantt-timeline-panel {
    flex-grow: 1;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    background-color: var(--bs-body-bg);
}

.gantt-header-row {
    height: 52px;
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--bs-body-color);
    user-select: none;
}

.gantt-table-header {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.gantt-row {
    height: 44px;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    display: flex;
    align-items: center;
    transition: background-color var(--app-transition);
}

.gantt-row:hover {
    background-color: rgba(59, 130, 246, 0.04);
}

.gantt-row.epic-row {
    background-color: rgba(var(--bs-tertiary-bg-rgb), 0.6);
    font-weight: 600;
}

.gantt-table-cell {
    padding: 0 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.85rem;
}

.gantt-timeline-grid {
    position: relative;
    min-width: 100%;
    height: 100%;
}

.gantt-scale-header {
    height: 52px;
    position: sticky;
    top: 0;
    z-index: 4;
    background-color: var(--bs-tertiary-bg);
    border-bottom: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
}

.gantt-scale-primary {
    height: 26px;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    display: flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
}

.gantt-scale-secondary {
    height: 26px;
    display: flex;
    align-items: center;
    font-size: 0.72rem;
    color: var(--bs-secondary-color);
}

.gantt-scale-unit {
    text-align: center;
    border-right: 1px solid var(--bs-border-color-translucent);
    flex-shrink: 0;
    user-select: none;
}

.gantt-scale-unit.is-today {
    background-color: rgba(59, 130, 246, 0.12);
    color: var(--bs-primary);
    font-weight: bold;
}

.gantt-scale-unit.is-weekend {
    background-color: rgba(0, 0, 0, 0.02);
}

.gantt-timeline-row {
    height: 44px;
    position: relative;
    border-bottom: 1px solid var(--bs-border-color-translucent);
    display: flex;
    align-items: center;
}

.gantt-timeline-row:hover {
    background-color: rgba(59, 130, 246, 0.04);
}

.gantt-task-bar {
    position: absolute;
    height: 26px;
    border-radius: 6px;
    background: #3b82f6;
    color: #ffffff;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
    z-index: 2;
}

.gantt-task-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
    filter: brightness(1.05);
    z-index: 3;
}

.gantt-task-bar-progress {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 6px 0 0 6px;
    pointer-events: none;
}

.gantt-task-bar-label {
    position: relative;
    z-index: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.gantt-epic-bar {
    position: absolute;
    height: 14px;
    border-radius: 4px;
    background: #475569;
    top: 15px;
    z-index: 2;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.gantt-epic-bar-progress {
    height: 100%;
    border-radius: 4px;
    background: var(--bs-primary);
}

.gantt-today-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #ef4444;
    z-index: 3;
    pointer-events: none;
}

.gantt-today-badge {
    position: absolute;
    top: 2px;
    left: -18px;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}

.gantt-grid-col {
    position: absolute;
    top: 0;
    bottom: 0;
    border-right: 1px solid var(--bs-border-color-translucent);
    pointer-events: none;
}

.gantt-grid-col.is-weekend {
    background-color: rgba(0, 0, 0, 0.015);
}

@media (max-width: 991.98px) {
    body.sidebar-open .sidebar-overlay {
        display: block;
        opacity: 1;
    }
}

/* ==========================================================================
   9. Light Theme High-Contrast & Clarity Enhancements
   ========================================================================== */
[data-bs-theme="light"] body {
    background-color: #f1f5f9;
    color: #0f172a;
}

[data-bs-theme="light"] .text-body-secondary,
[data-bs-theme="light"] .text-muted {
    color: #475569 !important;
}

[data-bs-theme="light"] .text-body-tertiary {
    color: #64748b !important;
}

[data-bs-theme="light"] .card {
    background-color: #ffffff;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04) !important;
}

[data-bs-theme="light"] .card-header {
    border-bottom: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
}

[data-bs-theme="light"] .card-footer {
    border-top: 1px solid #e2e8f0 !important;
    background-color: #ffffff !important;
}

[data-bs-theme="light"] .form-label {
    color: #0f172a;
    font-weight: 600;
}

[data-bs-theme="light"] .form-control,
[data-bs-theme="light"] .form-select {
    border-color: #cbd5e1;
    color: #0f172a;
    background-color: #ffffff;
}

[data-bs-theme="light"] .form-control:focus,
[data-bs-theme="light"] .form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
    background-color: #ffffff;
}

[data-bs-theme="light"] .form-control::placeholder {
    color: #64748b;
    opacity: 1;
}

[data-bs-theme="light"] .input-group-text {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

[data-bs-theme="light"] .table > thead > tr > th {
    background-color: #e2e8f0;
    color: #0f172a;
    border-bottom: 1.5px solid #cbd5e1;
    font-weight: 700;
}

[data-bs-theme="light"] .table > tbody > tr > td {
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

[data-bs-theme="light"] .table-hover > tbody > tr:hover > * {
    background-color: rgba(37, 99, 235, 0.04);
}

[data-bs-theme="light"] .kanban-column {
    background-color: #e2e8f0;
    border: 1px solid #cbd5e1;
}

[data-bs-theme="light"] .kanban-column-header {
    background-color: #f8fafc;
    border-bottom: 1px solid #cbd5e1;
    color: #0f172a;
}

[data-bs-theme="light"] .kanban-card {
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    box-shadow: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
}

[data-bs-theme="light"] .kanban-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.1);
}

[data-bs-theme="light"] .gantt-container {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

[data-bs-theme="light"] .gantt-header-row,
[data-bs-theme="light"] .gantt-scale-header {
    background-color: #e2e8f0;
    border-bottom-color: #cbd5e1;
    color: #0f172a;
}

[data-bs-theme="light"] .gantt-row {
    border-bottom-color: #e2e8f0;
}

[data-bs-theme="light"] .gantt-table-panel {
    border-right-color: #cbd5e1;
    background-color: #ffffff;
}

[data-bs-theme="light"] .breadcrumb-item a {
    color: #475569;
}

[data-bs-theme="light"] .breadcrumb-item.active {
    color: #0f172a;
    font-weight: 700;
}

