/* Task Board CSS - Amber/Gold Theme on Charcoal */

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #0f0f0f;
    color: #e0e0e0;
    line-height: 1.6;
}

.app-container {
    min-height: 100vh;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding: 16px 24px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header h1 {
    color: #e8a830;
    font-size: 28px;
    font-weight: 600;
}

.task-count {
    color: #888;
    font-size: 14px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Connection Status */
.connection-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ff4444;
}

.status-dot.connected {
    background-color: #4ade80;
}

.status-dot.connecting {
    background-color: #e8a830;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-text {
    color: #888;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-primary {
    background-color: #e8a830;
    color: #0f0f0f;
}

.btn-primary:hover {
    background-color: #d99a20;
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Filter Styles */
.filters {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px 24px;
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    color: #888;
    font-size: 14px;
    white-space: nowrap;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    min-width: 150px;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #e8a830;
}

.filter-input {
    width: 250px;
}

/* Kanban Board Styles */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.kanban-column {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.column-header {
    padding: 16px;
    background-color: #252525;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h2 {
    color: #e8a830;
    font-size: 18px;
    font-weight: 600;
}

.column-count {
    background-color: #e8a830;
    color: #0f0f0f;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.column-tasks {
    padding: 16px;
    flex: 1;
    overflow-y: auto;
    min-height: 300px;
}

.column-tasks.drag-over {
    background-color: rgba(232, 168, 48, 0.05);
    border: 2px dashed #e8a830;
}

/* Task Card Styles */
.task-card {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.task-card:hover {
    border-color: #e8a830;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(232, 168, 48, 0.1);
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
}

.task-title {
    color: #e0e0e0;
    font-size: 15px;
    font-weight: 500;
    flex: 1;
    margin-right: 8px;
    word-wrap: break-word;
}

.task-priority {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    font-weight: 600;
    white-space: nowrap;
}

.task-priority.high {
    background-color: #ef4444;
    color: white;
}

.task-priority.medium {
    background-color: #f59e0b;
    color: black;
}

.task-priority.low {
    background-color: #6b7280;
    color: white;
}

.task-description {
    color: #888;
    font-size: 13px;
    margin-bottom: 12px;
    line-height: 1.4;
    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: 12px;
    color: #666;
}

.task-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-agent {
    color: #e8a830;
}

.task-project {
    color: #888;
}

.task-notes {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #3a3a3a;
    font-size: 12px;
    color: #666;
}

.task-notes svg {
    width: 14px;
    height: 14px;
}

.notes-count {
    background-color: #3a3a3a;
    color: #e0e0e0;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 20px;
    background-color: #252525;
    border-bottom: 1px solid #2a2a2a;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #e8a830;
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: #e0e0e0;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background-color: #3a3a3a;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Task Detail Styles */
.task-detail {
    margin-bottom: 24px;
}

.detail-group {
    margin-bottom: 16px;
}

.detail-group label {
    display: block;
    color: #888;
    font-size: 13px;
    margin-bottom: 6px;
    font-weight: 500;
}

.detail-value {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    background-color: #2a2a2a;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #3a3a3a;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Priority Badge Styles */
.detail-value .priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-badge.high {
    background-color: #ef4444;
    color: white;
}

.priority-badge.medium {
    background-color: #f59e0b;
    color: black;
}

.priority-badge.low {
    background-color: #6b7280;
    color: white;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.backlog {
    background-color: #6b7280;
    color: white;
}

.status-badge.in_progress {
    background-color: #3b82f6;
    color: white;
}

.status-badge.review {
    background-color: #e8a830;
    color: black;
}

.status-badge.complete {
    background-color: #10b981;
    color: white;
}

/* Notes Section Styles */
.notes-section {
    border-top: 1px solid #2a2a2a;
    padding-top: 20px;
}

.notes-section h3 {
    color: #e8a830;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.notes-list {
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.note-item {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.note-content {
    color: #e0e0e0;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
}

.note-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.note-author {
    color: #e8a830;
}

.no-notes {
    text-align: center;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.add-note {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.add-note textarea {
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    padding: 12px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
}

.add-note textarea:focus {
    outline: none;
    border-color: #e8a830;
}

/* Form Styles */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    color: #888;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background-color: #2a2a2a;
    border: 1px solid #3a3a3a;
    border-radius: 6px;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e8a830;
}

.form-group textarea {
    resize: vertical;
}

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

#addTaskForm button[type="submit"] {
    width: 100%;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    color: #888;
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    border: 3px solid #3a3a3a;
    border-top: 3px solid #e8a830;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Error State */
.error-state {
    background-color: #2a1a1a;
    border: 1px solid #ef4444;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.error-state svg {
    color: #ef4444;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.error-state p {
    color: #fca5a5;
    font-size: 14px;
    flex: 1;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .kanban-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .filter-select,
    .filter-input {
        flex: 1;
    }

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

    .detail-row,
    .form-row {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4a4a4a;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-4 {
    margin-top: 16px;
}

.mb-4 {
    margin-bottom: 16px;
}