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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0f0f23;
    color: #e0e0e0;
    min-height: 100vh;
}

.app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, #ff6b6b, #feca57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    color: #888;
    margin-top: 5px;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #444;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
}

.btn-sync {
    background: linear-gradient(135deg, #1dd1a1, #10ac84);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sync:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(29, 209, 161, 0.4);
}

.btn-sync.syncing {
    animation: pulse 1s infinite;
}

.sync-status {
    font-size: 12px;
    color: #1dd1a1;
    margin-left: 10px;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-btn {
    background: #1a1a2e;
    border: 1px solid #333;
    color: #888;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn:hover {
    border-color: #667eea;
    color: #e0e0e0;
}

.filter-btn.active {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 900px) {
    .board {
        grid-template-columns: 1fr;
    }
}

.column {
    background: #1a1a2e;
    border-radius: 12px;
    padding: 15px;
    min-height: 500px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.column-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.count {
    background: #333;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 14px;
}

.tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 400px;
}

.task-card {
    background: #252542;
    border-radius: 10px;
    padding: 15px;
    cursor: grab;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.task-card:hover {
    background: #2d2d4a;
    transform: translateX(3px);
}

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

.task-card.priority-high {
    border-left-color: #ff6b6b;
}

.task-card.priority-medium {
    border-left-color: #feca57;
}

.task-card.priority-low {
    border-left-color: #1dd1a1;
}

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

.task-title {
    font-weight: 600;
    color: #fff;
    flex: 1;
}

.task-actions {
    display: flex;
    gap: 5px;
}

.task-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

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

.task-desc {
    color: #888;
    font-size: 14px;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    padding: 4px 10px;
    border-radius: 15px;
    background: #333;
}

.task-assignee.human {
    background: #2d4a3e;
    color: #1dd1a1;
}

.task-assignee.clawd {
    background: #4a2d4a;
    color: #ff6b6b;
}

.task-date {
    font-size: 12px;
    color: #666;
}

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

.modal.hidden {
    display: none;
}

.modal-content {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 25px;
    width: 90%;
    max-width: 450px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 18px;
}

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

.form-group input[type="text"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #252542;
    color: #e0e0e0;
    font-size: 15px;
}

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

.assignee-select {
    display: flex;
    gap: 10px;
}

.assignee-option {
    flex: 1;
    cursor: pointer;
}

.assignee-option input {
    display: none;
}

.assignee-card {
    display: block;
    padding: 15px;
    text-align: center;
    border: 2px solid #333;
    border-radius: 10px;
    transition: all 0.2s;
}

.assignee-option input:checked + .assignee-card {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Drag & Drop */
.column.drag-over {
    background: #252542;
}

.drop-indicator {
    height: 4px;
    background: #667eea;
    border-radius: 2px;
    margin: 5px 0;
}

/* Deadline Timer Styles */
.task-timer {
    font-size: 0.85rem;
    padding: 4px 8px;
    background: #1e293b;
    border-radius: 6px;
    margin: 8px 0;
    text-align: center;
    font-weight: 500;
}

.task-timer .urgent {
    color: #f59e0b;
}

.task-timer .critical {
    color: #ef4444;
    animation: pulse 1s infinite;
}

.task-timer .overdue {
    color: #ef4444;
    font-weight: bold;
}

.overdue-card {
    border: 2px solid #ef4444 !important;
    animation: shake 0.5s ease-in-out;
}

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

input[type="datetime-local"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    font-size: 1rem;
}

input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Crons button */
.btn-crons {
    background: #8b5cf6;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    margin-right: 10px;
    transition: background 0.2s;
}
.btn-crons:hover {
    background: #7c3aed;
}

/* Search box */
.search-box {
    flex: 1;
    max-width: 300px;
    margin: 0 15px;
}
.search-box input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #1e293b;
    color: #fff;
    font-size: 0.95rem;
}
.search-box input:focus {
    outline: none;
    border-color: #f97316;
}

/* Form row */
.form-row {
    display: flex;
    gap: 15px;
}
.form-group.half {
    flex: 1;
}

/* Recurrence badge */
.task-recurrence {
    font-size: 0.8rem;
    color: #8b5cf6;
    margin: 5px 0;
}

/* Attachments */
.attachments-area {
    background: #0f172a;
    border-radius: 8px;
    padding: 15px;
}
.attachments-area input[type="file"] {
    width: 100%;
    color: #94a3b8;
}
.attachments-list {
    margin-top: 10px;
}
.attachment-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1e293b;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 8px;
    font-size: 0.85rem;
}
.attachment-item button {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    font-size: 1rem;
}
.task-attachments {
    font-size: 0.8rem;
    color: #64748b;
    margin: 5px 0;
}

/* Controls flex adjustment */
.controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}
.extracting { color: #f97316; padding: 10px; animation: pulse 1s infinite; }
