/* Kanban Board Styles - Matching mossmoss.me aesthetic */

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

:root {
    --bg-primary: #1a1a1a;
    --bg-secondary: #252525;
    --bg-tertiary: #2d3a2d;
    --accent: #8fbc8f;
    --accent-dim: rgba(143, 188, 143, 0.15);
    --accent-border: rgba(143, 188, 143, 0.3);
    --text-primary: #e8e8e8;
    --text-secondary: #a0a0a0;
    --text-muted: #707070;
    --border: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

body {
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-tertiary) 100%);
    color: var(--text-primary);
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
}

h1 {
    font-size: 1.25rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--accent);
}

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

.user-select {
    padding: 0.5rem 1rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-add {
    padding: 0.5rem 1rem;
    background: var(--accent-dim);
    border: 1px solid var(--accent-border);
    border-radius: 0.5rem;
    color: var(--accent);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add:hover {
    background: rgba(143, 188, 143, 0.25);
    border-color: rgba(143, 188, 143, 0.5);
}

/* Board */
.board {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    min-height: calc(100vh - 60px);
    overflow-x: auto;
}

/* Columns */
.column {
    flex: 0 0 320px;
    min-width: 280px;
    max-width: 350px;
    background: var(--bg-secondary);
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 100px);
}

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

.column-title {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}

.column-count {
    background: var(--bg-primary);
    padding: 0.25rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.column-cards {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.column-cards.drag-over {
    background: var(--accent-dim);
}

/* Cards */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 0.75rem;
    cursor: grab;
    transition: all 0.2s ease;
}

.card:hover {
    border-color: var(--accent-border);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--shadow);
}

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

.card-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.card-assignee {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.assignee-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

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

.modal-header h2 {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--accent);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

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

#cardForm {
    padding: 1.25rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

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

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.form-actions-right {
    display: flex;
    gap: 0.75rem;
}

.btn-cancel {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover {
    border-color: var(--text-muted);
    color: var(--text-primary);
}

.btn-save {
    padding: 0.5rem 1.25rem;
    background: var(--accent);
    border: none;
    border-radius: 0.5rem;
    color: var(--bg-primary);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-save:hover {
    background: #7dab7d;
}

.btn-delete {
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid #a85454;
    border-radius: 0.5rem;
    color: #d88;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(168, 84, 84, 0.2);
}

/* Empty state */
.column-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }

    .board {
        padding: 1rem;
        gap: 0.75rem;
    }

    .column {
        flex: 0 0 280px;
        min-width: 260px;
    }
}

@media (max-width: 480px) {
    .column {
        flex: 0 0 90vw;
        min-width: 90vw;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
