/* Kanban Board Styles - Trello-like Design */
.board-page {
    background: #0079bf;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.board-header {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.header-content h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.project-select {
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 200px;
    transition: all 0.2s;
    font-weight: 500;
}

.project-select:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.project-select option {
    background: white;
    color: #333;
}

.btn-icon {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.user-info {
    color: white;
    font-size: 0.875rem;
}

.board-container {
    padding: 0.75rem;
    overflow-x: auto;
    height: calc(100vh - 60px);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: white;
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.board-content {
    margin-top: 0;
}

.board-columns {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

.board-column {
    background: #ebecf0;
    border-radius: 3px;
    padding: 0.625rem;
    min-width: 272px;
    max-width: 272px;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.5rem 0.5rem;
    margin-bottom: 0.5rem;
}

.column-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #172b4d;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 1;
    line-height: 1.2;
}

.column-count {
    background: rgba(9, 30, 66, 0.08);
    color: #5e6c84;
    padding: 0.125rem 0.375rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    min-width: 24px;
    text-align: center;
}

.column-tasks {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0 0.25rem;
    min-height: 10px;
}

.column-tasks::-webkit-scrollbar {
    width: 8px;
}

.column-tasks::-webkit-scrollbar-track {
    background: transparent;
}

.column-tasks::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.column-tasks::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.task-card {
    background: white;
    border: none;
    border-radius: 4px;
    padding: 0.625rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 1px 3px rgba(9, 30, 66, 0.15), 0 0 0 1px rgba(9, 30, 66, 0.05);
    min-height: 20px;
}

.task-card:hover {
    background: #f4f5f7;
    box-shadow: 0 2px 8px rgba(9, 30, 66, 0.2), 0 0 0 1px rgba(9, 30, 66, 0.1);
    transform: translateY(-1px);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
    transform: rotate(2deg);
}

.column-tasks.drag-over {
    background-color: rgba(0, 121, 191, 0.1);
}

/* Trello-style label bar at top of card */
.task-label-bar {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 0.375rem;
    height: 8px;
    border-radius: 3px;
    overflow: hidden;
}

.task-label {
    height: 8px;
    border-radius: 3px;
    flex: 1;
    min-width: 40px;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.375rem;
    gap: 0.5rem;
}

.task-title {
    font-weight: 400;
    color: #172b4d;
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.5;
    word-wrap: break-word;
    cursor: pointer;
    padding: 0.25rem 0;
}

/* Trello-style priority labels as colored bars */
.task-priority {
    display: none; /* Hide text labels, use colored bars instead */
}

.priority-high {
    background: #eb5a46;
}

.priority-normal {
    background: #f2d600;
}

.priority-low {
    background: #61bd4f;
}

.priority-purple {
    background: #c377e0;
}

.priority-orange {
    background: #ffab4a;
}

.priority-blue {
    background: #0079bf;
}

.priority-green {
    background: #61bd4f;
}

.priority-red {
    background: #eb5a46;
}

.task-description {
    color: #5e6c84;
    font-size: 0.8125rem;
    margin: 0.25rem 0;
    line-height: 1.4;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    color: #5e6c84;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.task-meta-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    flex-wrap: wrap;
}

.task-meta-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.task-created-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #5e6c84;
}

.task-due-date {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: #5e6c84;
    padding: 0.125rem 0.375rem;
    background: rgba(9, 30, 66, 0.06);
    border-radius: 3px;
}

.task-due-date.overdue {
    color: #eb5a46;
    font-weight: 600;
    background: rgba(235, 90, 70, 0.1);
}

.task-assignee {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #dfe1e6;
    color: #172b4d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 2px solid white;
    box-shadow: 0 0 0 1px rgba(9, 30, 66, 0.1);
}

.task-assignee:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(9, 30, 66, 0.2);
}


/* Modal Styles - Trello style */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.64);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    z-index: 1000;
    padding: 3rem 1rem;
    overflow-y: auto;
}

.modal-content {
    background: #f4f5f7;
    border-radius: 3px;
    width: 100%;
    max-width: 768px;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: none;
}

.modal-header h2 {
    margin: 0;
    color: #172b4d;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-close {
    background: rgba(9, 30, 66, 0.08);
    border: none;
    font-size: 1.5rem;
    color: #5e6c84;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.15s;
    line-height: 1;
}

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

.modal-body {
    padding: 0;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.modal-body::-webkit-scrollbar-thumb {
    background: rgba(9, 30, 66, 0.2);
    border-radius: 4px;
}

.task-modal-content {
    padding: 1.5rem;
}

.modal-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(9, 30, 66, 0.1);
}

.modal-section:last-child {
    border-bottom: none;
}

.section-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #5e6c84;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}

.modal-field {
    margin-bottom: 1rem;
}

.modal-field label {
    display: block;
    font-weight: 600;
    color: #172b4d;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.modal-field .value {
    color: #172b4d;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.task-title-large {
    font-size: 1.125rem;
    font-weight: 600;
    color: #172b4d;
}

.task-description-full {
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #5e6c84;
    line-height: 1.6;
}

.metadata-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.metadata-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.metadata-label {
    font-size: 0.75rem;
    color: #5e6c84;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.metadata-value {
    font-size: 0.875rem;
    color: #172b4d;
    font-weight: 500;
}

.metadata-value.overdue {
    color: #eb5a46;
    font-weight: 600;
}

.time-tracking-info {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: rgba(9, 30, 66, 0.04);
    border-radius: 6px;
}

.time-label {
    font-size: 0.875rem;
    color: #5e6c84;
    font-weight: 500;
}

.time-value {
    font-size: 0.875rem;
    color: #172b4d;
    font-weight: 600;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
    margin-top: 1rem;
    border-top: 1px solid rgba(9, 30, 66, 0.1);
}

/* Attachments */
.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(9, 30, 66, 0.04);
    border-radius: 6px;
    transition: all 0.15s;
}

.attachment-item:hover {
    background: rgba(9, 30, 66, 0.08);
}

.attachment-icon {
    font-size: 1.25rem;
}

.attachment-link {
    flex: 1;
    color: #0079bf;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.attachment-link:hover {
    text-decoration: underline;
}

.attachment-size {
    font-size: 0.75rem;
    color: #5e6c84;
}

/* Comments */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item {
    padding: 0.75rem;
    background: rgba(9, 30, 66, 0.04);
    border-radius: 6px;
    border-right: 3px solid #0079bf;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-author {
    font-size: 0.875rem;
    font-weight: 600;
    color: #172b4d;
}

.comment-date {
    font-size: 0.75rem;
    color: #5e6c84;
}

.comment-text {
    font-size: 0.875rem;
    color: #172b4d;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.no-comments {
    text-align: center;
    padding: 2rem;
    color: #5e6c84;
    font-size: 0.875rem;
}

/* Activity Log */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    padding: 0.75rem;
    background: rgba(9, 30, 66, 0.04);
    border-radius: 6px;
    font-size: 0.875rem;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.activity-user {
    font-weight: 600;
    color: #172b4d;
}

.activity-date {
    font-size: 0.75rem;
    color: #5e6c84;
}

.activity-comment {
    color: #172b4d;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    white-space: pre-wrap;
}

.activity-changes {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(9, 30, 66, 0.1);
}

.change-item {
    font-size: 0.8125rem;
    color: #5e6c84;
    margin-bottom: 0.25rem;
}

.change-item strong {
    color: #172b4d;
}

/* Time tracking styles - Trello style */
.task-time-info {
    font-size: 0.75rem;
    color: #5e6c84;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.task-time {
    background: rgba(9, 30, 66, 0.08);
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.6875rem;
    color: #5e6c84;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.task-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.15s;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.btn-view-task,
.btn-edit-task {
    background: transparent;
    color: #5e6c84;
    border: none;
    padding: 0.25rem 0.375rem;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.15s;
}

.btn-view-task:hover,
.btn-edit-task:hover {
    background: rgba(9, 30, 66, 0.08);
    color: #172b4d;
}

/* Add task button - Trello style */
.add-task-button-container {
    display: none; /* Hide central button, use column buttons instead */
}

.btn-add-task-column {
    background: transparent;
    border: none;
    color: #5e6c84;
    padding: 0.625rem 0.5rem;
    border-radius: 3px;
    width: 100%;
    text-align: right;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.15s;
    margin-top: 0.25rem;
    font-weight: 400;
}

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

.btn-add-task-column::before {
    content: "➕ ";
    margin-left: 0.25rem;
    font-size: 0.875rem;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Form styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.btn-primary {
    background: #0079bf;
    color: white;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    font-size: 0.875rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-primary:hover {
    background: #026aa7;
}

.btn-secondary {
    background: rgba(9, 30, 66, 0.08);
    color: #172b4d;
    border: none;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: rgba(9, 30, 66, 0.13);
}

/* Responsive - Trello style */
@media (max-width: 768px) {
    .board-columns {
        flex-direction: column;
        align-items: stretch;
    }
    
    .board-column {
        min-width: 100%;
        max-width: 100%;
    }
    
    .header-content {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
    
    .header-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .project-select {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-content {
        max-height: calc(100vh - 2rem);
    }
}

