:root {
    --primary-color: #0079bf;
    --board-bg: #f4f5f7;
    --column-bg: #ebecf0;
    --card-bg: #ffffff;
    --text-color: #172b4d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    background-color: var(--board-bg);
    overflow-y: hidden;
    /* For board horizontal scrolling */
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #bfc4ce;
    border-radius: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

/* Navbar */
.navbar {
    background-color: var(--primary-color) !important;
}

/* App Container */
#app {
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
}

.filter-white {
    filter: brightness(0) invert(1);
}

.user-avatar {
    width: 34px;
    height: 34px;
    background: #ffffff;
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    cursor: default;
}

/* Kanban Board Styling */
.board-container {
    display: flex;
    overflow-x: auto;
    height: 100%;
    padding-bottom: 20px;
    align-items: flex-start;
}

.kanban-column {
    min-width: 272px;
    max-width: 272px;
    background-color: var(--column-bg);
    border-radius: 3px;
    margin-right: 12px;
    display: flex;
    flex-direction: column;
    max-height: 100%;
}

.column-header {
    padding: 10px 12px;
    font-weight: 600;
    cursor: grab;
}

.column-body {
    padding: 0 8px;
    overflow-y: auto;
    min-height: 20px;
    flex-grow: 1;
}

.task-card {
    background-color: var(--card-bg);
    border-radius: 3px;
    box-shadow: 0 1px 0 rgba(9, 30, 66, .25);
    margin-bottom: 8px;
    padding: 8px;
    cursor: pointer;
    position: relative;
    transition: background 0.1s;
}

.task-card:hover {
    background-color: #f4f5f7;
}

.task-card-title {
    margin-bottom: 4px;
}

.task-card-badges {
    font-size: 12px;
    color: #5e6c84;
}

.add-card-btn {
    padding: 8px;
    color: #5e6c84;
    cursor: pointer;
    border-radius: 0 0 3px 3px;
}

.add-card-btn:hover {
    background-color: rgba(9, 30, 66, .08);
    color: #172b4d;
}

/* Dyanmic Theme Variables */
body.dark-theme {
    --primary-color: #026aa7;
    --board-bg: #111827;
    --column-bg: #1f2937;
    --card-bg: #374151;
    --text-color: #f3f4f6;
    background-color: #111827 !important;
    color: #f3f4f6;
    min-height: 100vh;
}

body.dark-theme .bg-light {
    background-color: #111827 !important;
}

body.dark-theme .card {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #374151;
}

body.dark-theme .modal-content {
    background-color: #1f2937;
    color: #f3f4f6;
    border: 1px solid #374151;
}

body.dark-theme .form-control,
body.dark-theme .form-select {
    background-color: #374151;
    border-color: #4b5563;
    color: #fff;
}

body.dark-theme .form-control:focus {
    background-color: #4b5563;
    color: #fff;
}

body.dark-theme .list-group-item {
    background-color: #1f2937;
    color: #f3f4f6;
    border-color: #374151;
}

body.dark-theme .task-card {
    color: #f3f4f6;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
}

body.dark-theme .column-header {
    color: #f3f4f6;
}

body.dark-theme .add-card-btn {
    color: #9ca3af;
}

body.dark-theme .add-card-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Global Dark Theme Typography Fixes */
body.dark-theme h1,
body.dark-theme h2,
body.dark-theme h3,
body.dark-theme h4,
body.dark-theme h5,
body.dark-theme h6,
body.dark-theme .card-title,
body.dark-theme .modal-title,
body.dark-theme .navbar-brand {
    color: #f3f4f6 !important;
}

body.dark-theme label,
body.dark-theme .form-label,
body.dark-theme .col-form-label {
    color: #d1d5db !important;
}

body.dark-theme .text-muted,
body.dark-theme small,
body.dark-theme .small,
body.dark-theme .task-card-badges,
body.dark-theme .input-group-text {
    color: #9ca3af !important;
}

body.dark-theme .input-group-text {
    background-color: #1f2937;
    border-color: #374151;
}

body.dark-theme i.fa-solid,
body.dark-theme i.fa-regular,
body.dark-theme i.fa-brands {
    color: inherit;
    /* Allow parent to control or default to light */
}

body.dark-theme .btn-outline-secondary {
    color: #d1d5db;
    border-color: #4b5563;
}

body.dark-theme .btn-outline-secondary:hover {
    background-color: #374151;
    color: #fff;
}

/* Idea Board Specifics in Dark Mode */
body.dark-theme #zoomVal {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #374151;
}

body.dark-theme .dropdown-menu {
    background-color: #1f2937;
    border-color: #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

body.dark-theme .dropdown-item {
    color: #d1d5db;
}

body.dark-theme .dropdown-item:hover {
    background-color: #374151;
    color: #fff;
}

#modalContainer {
    position: relative;
    z-index: 2000;
}

/* Task Attachments Enhancement */
.attachment-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #dee2e6;
}

.attachment-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.attachment-item {
    transition: background 0.2s;
    border: 1px solid #dee2e6;
}

.attachment-item:hover {
    background-color: #f8f9fa !important;
}

body.dark-theme .attachment-item {
    border-color: #374151;
}

body.dark-theme .attachment-item:hover {
    background-color: #374151 !important;
}

.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    padding: 20px;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.lightbox-content img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    object-fit: contain;
    background: #f8f9fa;
}

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #333;
    font-size: 30px;
    cursor: pointer;
    line-height: 1;
}

.lightbox-actions {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.lightbox-title {
    margin: 0;
    color: #172b4d !important;
    font-weight: 600;
}

/* Bootstrap Utility Overrides for Dark Mode */
body.dark-theme .bg-white {
    background-color: #1f2937 !important;
}

body.dark-theme .border {
    border-color: #374151 !important;
}

/* Gantt Colors */
.gantt-urgent .bar {
    fill: #dc3545 !important;
}

.gantt-high .bar {
    fill: #fd7e14 !important;
}

.gantt-medium .bar {
    fill: #0d6efd !important;
}

.gantt-low .bar {
    fill: #6c757d !important;
}

.dark-theme .gantt .grid-header {
    fill: #1f2937;
    stroke: #374151;
}

.dark-theme .gantt .grid-row {
    fill: #111827;
}

.dark-theme .gantt .grid-row:nth-child(even) {
    fill: #1f2937;
}

.dark-theme .gantt .tick {
    stroke: #374151;
}

.dark-theme .gantt .upper-text {
    fill: #9ca3af;
}

.dark-theme .gantt .lower-text {
    fill: #d1d5db;
}

/* Kanban Card Refinements */
.task-card-progress {
    height: 4px;
    margin-top: 8px;
    background-color: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.task-card-progress-bar {
    height: 100%;
    background-color: #198754;
    transition: width 0.3s ease;
}

.task-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
    font-size: 10px;
    color: #6c757d;
}

.task-card-badges {
    display: flex;
    gap: 8px;
    align-items: center;
}

.task-card-assignee {
    width: 20px;
    height: 20px;
    background-color: #0d6efd;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 9px;
    text-transform: uppercase;
}

body.dark-theme .task-card-progress {
    background-color: #374151;
}

body.dark-theme .task-card-meta {
    color: #9ca3af !important;
}