/* Kanban Board Styles - Based on pixelAFrame Design System */
:root {
    /* COLOR SYSTEM - Professional Dark Theme */
    --bg-darkest: #0f0f1b;
    --bg-dark: #1a1a2e;
    --bg-medium: #16213e;
    --bg-light: #1e293b;

    /* ACCENT COLORS - Cyberpunk/Terminal Inspired */
    --accent-primary: #00ff41;
    --accent-secondary: #ff006e;
    --accent-tertiary: #00d9ff;

    /* TEXT & BORDERS */
    --text-primary: #e0e7ff;
    --text-secondary: #94a3b8;
    --border-color: #2d3748;

    /* LAYOUT DIMENSIONS */
    --header-height: 50px;
    --footer-height: 56px;
    --border-glow: rgba(0, 255, 65, 0.3);

    /* TASK COLORS */
    --primary-color: #00d9ff;
    --success-color: #00ff41;
    --warning-color: #ffc107;
    --danger-color: #ff006e;
    --info-color: #00d9ff;

    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --border-radius: 6px;
    --transition: all 0.2s ease;
}

/* Inter Bold Font */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Inter Normal Font */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-normal.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* Press Start 2P Font */
@font-face {
    font-family: 'Press Start 2P';
    src: url('../fonts/PressStart2P-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-darkest);
    color: var(--text-primary);
    line-height: 1.6;
    font-weight: 400;
}

/* Header */
header {
    height: var(--header-height);
    background: var(--bg-dark);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    z-index: 10;
    position: relative;
}

.logo-area h1 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--accent-primary);
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary), var(--accent-primary));
    background-size: 200% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
    to {
        background-position: 200% 0;
    }
}

.badge {
    background: var(--accent-secondary);
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-left: 1rem;
}

.header-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* User Display */
.user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 20px;
}

.user-photo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-primary);
}

#user-name-display {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#logout-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s;
}

#logout-btn:hover {
    color: var(--accent-secondary);
}

/* Google Login Button */
#google-login-btn {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
    font-weight: 500;
}

#google-login-btn:hover {
    background: #357abd;
    border-color: #357abd;
}

.btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    background: var(--bg-medium);
    border-color: var(--text-secondary);
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background: var(--accent-primary);
    color: #000;
    border: none;
    font-weight: 600;
}

.btn.primary:hover {
    opacity: 0.9;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.btn.secondary {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.btn.secondary:hover {
    background: var(--bg-medium);
    color: var(--text-primary);
}

.btn.icon-only {
    padding: 8px;
    width: 36px;
    height: 36px;
    justify-content: center;
}

/* Add Button Styling */
.add-task-btn {
    background: transparent;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color);
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.add-task-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(0, 255, 65, 0.05);
}

.add-task-btn::before {
    content: "\f067";
    /* Font Awesome plus icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
}

/* Main Container */
.main-container {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    height: calc(100vh - var(--header-height) - var(--footer-height));
    overflow: hidden;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
    height: 100%;
}

/* Kanban Board */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-template-rows: 1fr;
    gap: 2rem;
    margin-top: 2rem;
    height: 100%;
}

.kanban-column {
    background: var(--bg-dark);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border-color);
    display: grid;
    grid-template-rows: auto 1fr auto;
    max-height: 90%;
}

.column-header {
    background: var(--bg-medium);
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.column-header h3 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.column-header h3::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-primary);
}

.column-content {
    padding: 12px;
    min-height: 0;
    overflow-y: auto;
}

.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}

.column-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

/* Task Cards */
.task-card {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
    border-color: var(--accent-tertiary);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(3deg);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

/* Task Card Header */
.task-card-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
    background: #162030;
    /* 20% darker than --bg-light */
}

/* Task Card Body */
.task-card-body {
    padding: 12px 16px;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Task Card Footer */
.task-card-footer {
    padding: 8px 16px 12px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Task Emoji */
.task-emoji {
    font-size: 1.5rem;
    margin-right: 8px;
    flex-shrink: 0;
}

/* Task Title Row - Container for emoji and title */
.task-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Emoji Picker */
.emoji-picker-container {
    position: relative;
    display: flex;
    gap: 8px;
}

.emoji-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1.2rem;
    text-align: center;
    width: 80px;
}

.emoji-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.1);
}

.emoji-picker-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 8px;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.emoji-picker-dropdown.active {
    display: grid;
}

.emoji-option {
    width: 36px;
    height: 36px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: transparent;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-option:hover {
    background: var(--bg-medium);
    border-color: var(--accent-primary);
}

.task-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 6px;
    color: var(--text-primary);
    padding-right: 60px;
    display: flex;
    align-items: center;
}

.task-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 8px;
}

.task-assignee {
    color: var(--accent-tertiary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-assignee::before {
    content: "\f0e0";
    /* Font Awesome envelope icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.75rem;
    color: var(--accent-tertiary);
}

.task-due-date::before {
    content: "\f133";
    /* Font Awesome calendar icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 0.75rem;
    color: var(--accent-secondary);
}

.task-priority {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-priority.low {
    background: var(--info-color);
    color: #000;
}

.task-priority.medium {
    background: var(--warning-color);
    color: #000;
}

.task-priority.high {
    background: var(--danger-color);
    color: #fff;
}

.task-priority.urgent {
    background: #6f42c1;
    color: #fff;
}

/* Task Milestone Badge */
.task-milestone-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    background: var(--bg-medium);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.4;
    transition: all 0.15s ease-in-out;
}

.task-milestone-badge:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.task-milestone-badge.milestone-backlog {
    background: #6e7681;
    color: #fff;
}

.task-milestone-badge.milestone-todo {
    background: #0e7a86;
    color: #fff;
}

.task-milestone-badge.milestone-in-progress {
    background: #a371f7;
    color: #fff;
}

.task-milestone-badge.milestone-done {
    background: #3fb950;
    color: #fff;
}

.task-milestone-badge.milestone-sprint-1 {
    background: #f7d358;
    color: #000;
}

.task-milestone-badge.milestone-sprint-2 {
    background: #ff6b6b;
    color: #fff;
}

.task-milestone-badge.milestone-release {
    background: #4ecdc4;
    color: #000;
}

/* Task Labels Badge */
.task-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 4px;
}

.task-label-badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.4;
    vertical-align: middle;
    transition: all 0.15s ease-in-out;

}

.task-label-badge:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* Custom Multi-Select Label Picker */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.label-select-container {
    position: relative;
    width: 100%;
}

.label-select-trigger {
    min-height: 38px;
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-light);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    transition: all 0.2s ease;
}

.label-select-trigger:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.1);
}

.label-select-trigger.active {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(0, 255, 65, 0.15);
}

.label-select-placeholder {
    color: var(--text-secondary);
    font-size: 0.9em;
    display: inline;
    pointer-events: none;
}

.label-select-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    max-height: 300px;
    overflow: hidden;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.label-options {
    max-height: 260px;
    overflow-y: auto;
    padding: 4px;
}

.label-option {
    padding: 8px 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-size: 0.9em;
}

.label-option:hover {
    background: var(--bg-light);
}

.label-option.selected {
    background: rgba(0, 255, 65, 0.12);
    color: var(--accent-primary);
}

.label-option .label-color-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.label-option .label-check {
    margin-left: auto;
    opacity: 0;
    color: var(--accent-primary);
}

.label-option.selected .label-check {
    opacity: 1;
}

/* Selected labels display area */
.selected-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    min-height: 0;
}

.selected-label-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.15s ease;
    cursor: default;
}

.selected-label-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.selected-label-remove {
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}

.selected-label-remove:hover {
    opacity: 1;
}

.task-due-date {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 0, 110, 0.1);
    color: var(--accent-secondary);
}

.task-due-date::before {
    content: "\f133";
    /* Font Awesome calendar icon */
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    font-size: 0.75rem;
}

/* Due date urgency colors */
.task-due-date.past-due {
    background: rgba(255, 0, 110, 0.2);
    color: var(--accent-secondary);
}

.task-due-date.due-soon {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.task-due-date.due-later {
    background: rgba(0, 255, 65, 0.2);
    color: var(--accent-primary);
}

/* Email icon hover effect */
.task-assignee[data-email] {
    cursor: pointer;
    transition: color 0.2s;
}

.task-assignee[data-email]:hover {
    color: var(--accent-primary);
}

/* Task Actions - Edit/Delete Buttons */
.task-actions {
    position: absolute;
    top: 12px;
    right: 16px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.task-action-btn {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.task-action-btn:hover {
    background: var(--bg-dark);
    color: var(--text-primary);
}

.task-action-btn.edit:hover {
    color: var(--accent-tertiary);
    border-color: var(--accent-tertiary);
}

.task-action-btn.delete:hover {
    color: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

/* Task Creation Date */
.task-created-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Task Attachments */
.task-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
    cursor: pointer;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    max-width: 200px;
}

.attachment-item:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 65, 0.05);
}

.attachment-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--bg-light);
    overflow: hidden;
    flex-shrink: 0;
}

.attachment-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-icon i {
    color: var(--accent-tertiary);
    font-size: 0.85rem;
}

.attachment-name {
    font-size: 0.75rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Attachments list in modal */
.attachments-list {
    margin-bottom: 12px;
    max-height: 200px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attachments-list .attachment-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.attachments-list .attachment-item:hover {
    border-color: var(--accent-primary);
    background: rgba(0, 255, 65, 0.05);
}

.attachments-list .attachment-preview {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-medium);
    border-radius: 4px;
    overflow: hidden;
}

.attachments-list .attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachments-list .attachment-preview i {
    color: var(--accent-tertiary);
    font-size: 0.9rem;
}

.attachments-list .attachment-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.attachments-list .attachment-name {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.attachments-list .attachment-type {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.attachments-list .remove-attachment {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
}

.attachments-list .remove-attachment:hover {
    color: var(--accent-secondary);
}

/* Attachment actions buttons */
.attachment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.attachment-actions .btn {
    flex: 1;
    min-width: 80px;
    justify-content: center;
    padding: 8px 12px;
}

.attachment-actions .btn i {
    margin-right: 4px;
}

/* Attachment input groups */
.attachment-input-group {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.attachment-input-group input[type="url"] {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.attachment-input-group input[type="url"]:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.attachment-input-group .add-attachment-btn {
    flex-shrink: 0;
}

/* Comments Section */
.comments-list {
    margin-bottom: 12px;
    max-height: 250px;
    overflow-y: auto;
}

.comment-item {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.comment-content {
    flex: 1;
    min-width: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.comment-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.comment-assignee {
    font-size: 0.75rem;
    color: var(--accent-tertiary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.comment-assignee i {
    font-size: 0.65rem;
}

.comment-text {
    font-size: 0.85rem;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.comment-actions {
    display: flex;
    gap: 6px;
    margin-top: 6px;
}

.comment-actions .btn {
    padding: 4px 8px;
    font-size: 0.7rem;
    background: transparent;
    border: 1px solid var(--border-color);
}

.comment-actions .btn:hover {
    background: var(--bg-light);
}

.comment-add {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.comment-add textarea {
    width: 100%;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    resize: none;
    font-family: inherit;
}

.comment-add textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.comment-add .btn {
    align-self: flex-end;
    padding: 8px 16px;
}

.comment-add .btn i {
    margin-right: 4px;
}

.no-comments {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Comment edit modal */
#comment-edit-text {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    resize: vertical;
}

#comment-edit-text:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* =============================================
   SIDEBAR STYLES
   ============================================= */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: var(--bg-medium);
    border-left: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.3);
}

.sidebar.active {
    right: 0;
}

.sidebar header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-dark);
}

.sidebar-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-title i {
    color: var(--accent-primary);
}

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.sidebar-close:hover {
    color: var(--text-primary);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Messages List */
.messages-list {
    margin-top: 20px;
}

.message-group {
    margin-bottom: 20px;
}

.message-group-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-transform: uppercase;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--border-color);
}

.message-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.message-item:hover {
    border-color: var(--accent-primary);
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    color: var(--bg-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
    min-width: 0;
}

.message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.message-author {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.message-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.message-task {
    font-size: 0.75rem;
    color: var(--accent-tertiary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.message-text {
    font-size: 0.8rem;
    color: var(--text-primary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

/* Color picker row */
.color-picker-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.color-picker-row input[type="color"] {
    width: 50px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    background: var(--bg-light);
}

.color-picker-row select {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.color-picker-row select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Gallery Modal */
.gallery-content {
    padding: 10px 0;
}

/* Gallery Navigation */
.gallery-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 10px 20px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
}

.gallery-nav #gallery-prev-btn,
.gallery-nav #gallery-next-btn {
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-nav #gallery-prev-btn:hover,
.gallery-nav #gallery-next-btn:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    border-color: var(--accent-primary);
}

.gallery-counter {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Gallery Preview */
.gallery-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.gallery-image-preview {
    max-width: 100%;
    max-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: 8px;
    overflow: hidden;
}

.gallery-image-preview img {
    max-width: 100%;
    max-height: 60vh;
    object-fit: contain;
}

.gallery-video-player,
.gallery-audio-player {
    width: 100%;
    max-width: 800px;
    background: var(--bg-dark);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.gallery-video-player iframe,
.gallery-video-player video {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 4px;
    background: #000;
}

.gallery-audio-player {
    padding: 40px 20px;
}

.audio-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.audio-icon i {
    font-size: 2rem;
    color: var(--bg-dark);
}

.gallery-generic-preview {
    width: 100%;
    max-width: 400px;
    padding: 60px 20px;
    background: var(--bg-dark);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.gallery-generic-preview i {
    font-size: 3rem;
    color: var(--accent-tertiary);
}

.gallery-generic-preview p {
    color: var(--text-secondary);
    word-break: break-all;
}

.gallery-info {
    text-align: center;
}

.gallery-info h4 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1rem;
}

.gallery-info .btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.gallery-info .btn:hover {
    background: var(--accent-primary);
    color: var(--bg-dark);
    border-color: var(--accent-primary);
}

/* Old gallery styles - kept for compatibility */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    max-height: 60vh;
    overflow-y: auto;
}

.gallery-item {
    border-radius: 6px;
    overflow: hidden;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 8px;
}

.gallery-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.gallery-item i {
    font-size: 2rem;
    color: var(--accent-tertiary);
}

.gallery-video a {
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    color: var(--text-secondary);
}

.gallery-video i {
    font-size: 2.5rem;
    color: var(--accent-secondary);
}

.gallery-video span {
    font-size: 0.75rem;
    word-break: break-all;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.gallery-error {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--bg-light);
}

.gallery-error i {
    font-size: 2rem;
    color: var(--text-secondary);
}

/* Drag and Drop */
.task-placeholder {
    background: var(--bg-medium);
    border: 2px dashed var(--primary-color);
    border-radius: var(--border-radius);
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.column-content.drag-over {
    background: rgba(0, 123, 255, 0.05);
    border: 2px dashed var(--primary-color);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0.25rem;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-medium);
    color: var(--text-primary);
}

.modal-content {
    padding: 1.5rem;
}

.modal footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

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

/* Column Mapping */
.column-mapping {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.mapping-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.mapping-row:last-child {
    margin-bottom: 0;
}

.mapping-row label {
    min-width: 120px;
    font-weight: 500;
    color: var(--text-secondary);
}

.mapping-row input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-controls {
        flex-direction: row;
        gap: 0.5rem;
        width: auto;
        min-width: 60px;
    }

    /* Hide button text on mobile, show icons only */
    .header-controls .btn .btn-text {
        display: none !important;
    }

    /* Ensure icons are always visible in header buttons */
    .header-controls .btn i,
    .header-controls .btn .fa,
    .header-controls .btn .fas,
    .header-controls .btn .fab,
    .header-controls .btn .far {
        display: inline-block !important;
        color: var(--text-primary) !important;
        font-size: 1.2em !important;
        margin: 0 !important;
        min-width: 1em;
        min-height: 1em;
    }

    /* Ensure icon-only buttons have proper sizing */
    .header-controls .btn {
        padding: 8px 12px;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
    }

    /* User display becomes compact */
    .user-display {
        gap: 8px;
        padding: 4px 8px;
    }

    #user-name-display {
        display: none;
    }

    .kanban-board {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .main-container {
        padding: 1rem;
    }

    .modal {
        width: 95%;
        margin: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.task-card {
    animation: fadeIn 0.3s ease-out;
}

/* Loading States */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Success/Error States */
.task-card.overdue .task-due-date {
    color: var(--danger-color);
    font-weight: 600;
}

.task-card.completed {
    opacity: 0.7;
    background: var(--bg-medium);
}

/* Priority Colors */
.task-priority.low {
    background: #17a2b8;
}

.task-priority.medium {
    background: #ffc107;
    color: #212529;
}

.task-priority.high {
    background: #dc3545;
}

.task-priority.urgent {
    background: #6f42c1;
}

/* App Footer */
.app-footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-color);
    padding: 16px 24px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.app-footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Google Sheets Integration Styles */
.google-sheets-auth {
    text-align: center;
    padding: 20px;
}

.google-signin-status {
    margin-bottom: 20px;
}

.google-signin-status p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

.google-sheets-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.google-sheets-actions .btn {
    justify-content: center;
}

.gs-status {
    margin-top: 16px;
    padding: 12px;
    border-radius: var(--border-radius);
    display: none;
}

.gs-status-info {
    background: rgba(0, 217, 255, 0.1);
    border: 1px solid var(--accent-tertiary);
    color: var(--accent-tertiary);
}

.gs-status-success {
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.gs-status-error {
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}

/* Database Manager Styles */
.database-status-section {
    margin-bottom: 20px;
}

.database-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.database-status i {
    color: var(--accent-primary);
}

.database-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.database-actions .btn {
    justify-content: center;
}

.db-boards-list {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 12px;
}

.db-boards-list h4 {
    color: var(--text-primary);
    margin-bottom: 12px;
    font-size: 0.9rem;
}

.db-board-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-medium);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 8px;
}

.db-board-item:last-child {
    margin-bottom: 0;
}

.db-board-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.db-board-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.db-board-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.db-board-actions {
    display: flex;
    gap: 8px;
}

.db-board-actions .btn {
    padding: 4px 8px;
    font-size: 0.75rem;
}

.db-status-message {
    margin-top: 12px;
    padding: 10px;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    display: none;
}

.db-status-message.success {
    display: block;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--accent-primary);
    color: var(--accent-primary);
}

.db-status-message.error {
    display: block;
    background: rgba(255, 0, 110, 0.1);
    border: 1px solid var(--accent-secondary);
    color: var(--accent-secondary);
}