/* Modern Kanban Board - Inspired by NovaBoard Reference */

:root {
    /* Colors from reference image */
    --mkb-pink: #FFE5F0;
    --mkb-pink-dark: #FF1493;
    --mkb-orange: #FFE4CC;
    --mkb-orange-dark: #FF8C00;
    --mkb-blue: #E0F2FE;
    --mkb-blue-dark: #0EA5E9;
    --mkb-purple: #F3E8FF;
    --mkb-purple-dark: #A855F7;
    --mkb-green: #D1FAE5;
    --mkb-green-dark: #10B981;
    --mkb-yellow: #FEF3C7;
    --mkb-yellow-dark: #F59E0B;
    
    /* Base colors */
    --mkb-white: #FFFFFF;
    --mkb-black: #1F2937;
    --mkb-gray-50: #F9FAFB;
    --mkb-gray-100: #F3F4F6;
    --mkb-gray-200: #E5E7EB;
    --mkb-gray-300: #D1D5DB;
    --mkb-gray-400: #9CA3AF;
    --mkb-gray-500: #6B7280;
    --mkb-gray-600: #4B5563;
    --mkb-gray-700: #374151;
    --mkb-gray-800: #1F2937;
    --mkb-gray-900: #111827;
    
    /* Primary color */
    --mkb-primary: #F59E0B;
    --mkb-primary-hover: #D97706;
    
    /* Spacing */
    --mkb-space-xs: 4px;
    --mkb-space-sm: 8px;
    --mkb-space-md: 12px;
    --mkb-space-lg: 16px;
    --mkb-space-xl: 20px;
    --mkb-space-2xl: 24px;
    --mkb-space-3xl: 32px;
    
    /* Border radius */
    --mkb-radius-sm: 6px;
    --mkb-radius-md: 8px;
    --mkb-radius-lg: 12px;
    --mkb-radius-xl: 16px;
    --mkb-radius-full: 999px;
    
    /* Shadows */
    --mkb-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --mkb-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --mkb-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --mkb-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --mkb-font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mkb-font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Container */
.mkb-container {
    font-family: var(--mkb-font-sans);
    background: var(--mkb-gray-50);
    min-height: 100vh;
    padding: var(--mkb-space-2xl);
    color: var(--mkb-gray-900);
}

/* Header */
.mkb-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--mkb-space-2xl);
    gap: var(--mkb-space-xl);
}

.mkb-header-left {
    flex: 1;
}

.mkb-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--mkb-gray-900);
    margin-bottom: var(--mkb-space-md);
    letter-spacing: -0.025em;
}

.mkb-project-info {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-lg);
    flex-wrap: wrap;
}

.mkb-info-item {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-xs);
    font-size: 13px;
}

.mkb-label {
    color: var(--mkb-gray-500);
}

.mkb-value {
    color: var(--mkb-gray-900);
    font-weight: 500;
}

.mkb-status-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--mkb-space-xs) var(--mkb-space-md);
    border-radius: var(--mkb-radius-full);
    font-size: 12px;
    font-weight: 600;
}

.mkb-status-progress {
    background: var(--mkb-green);
    color: var(--mkb-green-dark);
}

.mkb-header-right {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-md);
}

.mkb-avatars {
    display: flex;
    align-items: center;
}

.mkb-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--mkb-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid var(--mkb-white);
    margin-left: -8px;
}

.mkb-avatar:first-child {
    margin-left: 0;
}

.mkb-user-badge {
    padding: var(--mkb-space-sm) var(--mkb-space-lg);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--mkb-white);
    border-radius: var(--mkb-radius-md);
    font-weight: 600;
    font-size: 13px;
}

/* Tabs */
.mkb-tabs {
    display: flex;
    gap: var(--mkb-space-xs);
    margin-bottom: var(--mkb-space-xl);
    border-bottom: 1px solid var(--mkb-gray-200);
    overflow-x: auto;
}

.mkb-tab {
    padding: var(--mkb-space-md) var(--mkb-space-lg);
    border: none;
    background: transparent;
    color: var(--mkb-gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}

.mkb-tab:hover {
    color: var(--mkb-gray-900);
}

.mkb-tab-active {
    color: var(--mkb-primary);
    border-bottom-color: var(--mkb-primary);
    background: var(--mkb-yellow);
    border-radius: var(--mkb-radius-md) var(--mkb-radius-md) 0 0;
}

/* Filters */
.mkb-filters {
    display: flex;
    gap: var(--mkb-space-md);
    margin-bottom: var(--mkb-space-2xl);
    align-items: center;
    flex-wrap: wrap;
}

.mkb-search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.mkb-search-icon {
    position: absolute;
    left: var(--mkb-space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--mkb-gray-400);
}

.mkb-search-input {
    width: 100%;
    padding: var(--mkb-space-md) var(--mkb-space-md) var(--mkb-space-md) var(--mkb-space-3xl);
    border: 1px solid var(--mkb-gray-200);
    border-radius: var(--mkb-radius-md);
    font-size: 14px;
    background: var(--mkb-white);
    transition: all 0.2s;
}

.mkb-search-input:focus {
    outline: none;
    border-color: var(--mkb-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.mkb-filter-group {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-sm);
}

.mkb-filter-label {
    font-size: 13px;
    color: var(--mkb-gray-600);
    font-weight: 500;
}

/* Board */
.mkb-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--mkb-space-lg);
    padding-bottom: var(--mkb-space-3xl);
}

/* Columns */
.mkb-column {
    background: var(--mkb-white);
    border-radius: var(--mkb-radius-lg);
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.mkb-column-header {
    padding: var(--mkb-space-lg);
    border-radius: var(--mkb-radius-lg) var(--mkb-radius-lg) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mkb-column-header-pink {
    background: var(--mkb-pink);
}

.mkb-column-header-orange {
    background: var(--mkb-orange);
}

.mkb-column-header-blue {
    background: var(--mkb-blue);
}

.mkb-column-header-purple {
    background: var(--mkb-purple);
}

.mkb-column-title {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-sm);
}

.mkb-column-icon {
    font-size: 18px;
}

.mkb-column-title h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--mkb-gray-900);
}

.mkb-card-count {
    background: var(--mkb-white);
    color: var(--mkb-gray-600);
    padding: var(--mkb-space-xs) var(--mkb-space-md);
    border-radius: var(--mkb-radius-full);
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Column Content */
.mkb-column-content {
    padding: var(--mkb-space-lg);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: var(--mkb-space-md);
    overflow-y: auto;
}

.mkb-column-content::-webkit-scrollbar {
    width: 6px;
}

.mkb-column-content::-webkit-scrollbar-track {
    background: transparent;
}

.mkb-column-content::-webkit-scrollbar-thumb {
    background: var(--mkb-gray-300);
    border-radius: 3px;
}

.mkb-column-content.drag-over {
    background: rgba(245, 158, 11, 0.05);
    border: 2px dashed var(--mkb-primary);
    border-radius: var(--mkb-radius-md);
}

/* Cards */
.mkb-card {
    background: var(--mkb-white);
    border: 1px solid var(--mkb-gray-200);
    border-radius: var(--mkb-radius-md);
    padding: var(--mkb-space-lg);
    cursor: move;
    transition: all 0.2s;
    position: relative;
}

.mkb-card:hover {
    box-shadow: var(--mkb-shadow-md);
    transform: translateY(-2px);
}

.mkb-card.dragging {
    opacity: 0.5;
}

.mkb-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--mkb-space-md);
    gap: var(--mkb-space-sm);
}

.mkb-card-priority-badge {
    padding: var(--mkb-space-xs) var(--mkb-space-sm);
    border-radius: var(--mkb-radius-sm);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.mkb-card-priority-high {
    background: #FEE2E2;
    color: #DC2626;
}

.mkb-card-priority-medium {
    background: var(--mkb-yellow);
    color: var(--mkb-yellow-dark);
}

.mkb-card-priority-low {
    background: var(--mkb-blue);
    color: var(--mkb-blue-dark);
}

.mkb-card-actions {
    display: flex;
    gap: var(--mkb-space-xs);
    opacity: 0;
    transition: opacity 0.2s;
}

.mkb-card:hover .mkb-card-actions {
    opacity: 1;
}

.mkb-card-action {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--mkb-gray-100);
    border-radius: var(--mkb-radius-sm);
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

.mkb-card-action:hover {
    background: var(--mkb-gray-200);
}

.mkb-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--mkb-gray-900);
    margin-bottom: var(--mkb-space-sm);
    line-height: 1.4;
}

.mkb-card-description {
    font-size: 13px;
    color: var(--mkb-gray-600);
    line-height: 1.5;
    margin-bottom: var(--mkb-space-md);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mkb-card-progress {
    margin-bottom: var(--mkb-space-md);
}

.mkb-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--mkb-space-xs);
}

.mkb-progress-label {
    font-size: 11px;
    color: var(--mkb-gray-500);
    font-weight: 500;
}

.mkb-progress-value {
    font-size: 11px;
    color: var(--mkb-gray-900);
    font-weight: 600;
}

.mkb-progress-bar {
    width: 100%;
    height: 6px;
    background: var(--mkb-gray-100);
    border-radius: var(--mkb-radius-full);
    overflow: hidden;
}

.mkb-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--mkb-green-dark), var(--mkb-blue-dark));
    border-radius: var(--mkb-radius-full);
    transition: width 0.3s;
}

.mkb-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--mkb-space-md);
    border-top: 1px solid var(--mkb-gray-100);
}

.mkb-card-avatars {
    display: flex;
    align-items: center;
}

.mkb-card-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--mkb-gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid var(--mkb-white);
    margin-left: -6px;
}

.mkb-card-avatar:first-child {
    margin-left: 0;
}

.mkb-card-meta {
    display: flex;
    gap: var(--mkb-space-md);
}

.mkb-card-meta-item {
    display: flex;
    align-items: center;
    gap: var(--mkb-space-xs);
    font-size: 12px;
    color: var(--mkb-gray-500);
}

/* Buttons */
.mkb-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--mkb-space-sm);
    padding: var(--mkb-space-md) var(--mkb-space-xl);
    border: none;
    border-radius: var(--mkb-radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--mkb-font-sans);
}

.mkb-btn-primary {
    background: var(--mkb-primary);
    color: var(--mkb-white);
}

.mkb-btn-primary:hover {
    background: var(--mkb-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--mkb-shadow-md);
}

.mkb-btn-secondary {
    background: var(--mkb-white);
    color: var(--mkb-gray-700);
    border: 1px solid var(--mkb-gray-200);
}

.mkb-btn-secondary:hover {
    background: var(--mkb-gray-50);
}

.mkb-btn-icon {
    font-size: 16px;
}

/* Forms */
.mkb-input,
.mkb-textarea,
.mkb-select {
    width: 100%;
    padding: var(--mkb-space-md);
    border: 1px solid var(--mkb-gray-300);
    border-radius: var(--mkb-radius-md);
    font-size: 14px;
    font-family: var(--mkb-font-sans);
    background: var(--mkb-white);
    color: var(--mkb-gray-900);
    transition: all 0.2s;
}

.mkb-input:focus,
.mkb-textarea:focus,
.mkb-select:focus {
    outline: none;
    border-color: var(--mkb-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.mkb-textarea {
    resize: vertical;
    min-height: 100px;
}

.mkb-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--mkb-space-md) center;
    padding-right: var(--mkb-space-3xl);
}

.mkb-range {
    width: 100%;
    height: 6px;
    appearance: none;
    background: var(--mkb-gray-200);
    border-radius: var(--mkb-radius-full);
    outline: none;
}

.mkb-range::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: var(--mkb-primary);
    border-radius: 50%;
    cursor: pointer;
}

.mkb-range::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: var(--mkb-primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.mkb-form-group {
    margin-bottom: var(--mkb-space-lg);
}

.mkb-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--mkb-gray-700);
    margin-bottom: var(--mkb-space-sm);
}

.mkb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--mkb-space-lg);
}

/* Modal */
.mkb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.mkb-modal.active {
    display: flex;
}

.mkb-modal-content {
    background: var(--mkb-white);
    border-radius: var(--mkb-radius-xl);
    box-shadow: var(--mkb-shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mkb-modal-small {
    max-width: 400px;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mkb-modal-header {
    padding: var(--mkb-space-2xl);
    border-bottom: 1px solid var(--mkb-gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mkb-modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--mkb-gray-900);
}

.mkb-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--mkb-gray-100);
    border-radius: var(--mkb-radius-md);
    cursor: pointer;
    font-size: 20px;
    color: var(--mkb-gray-600);
    transition: all 0.2s;
}

.mkb-modal-close:hover {
    background: var(--mkb-gray-200);
}

.mkb-modal-body {
    padding: var(--mkb-space-2xl);
}

.mkb-modal-footer {
    padding: var(--mkb-space-2xl);
    border-top: 1px solid var(--mkb-gray-200);
    display: flex;
    gap: var(--mkb-space-md);
    justify-content: flex-end;
}

/* Celebration */
.mkb-celebration-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mkb-celebration-overlay.active {
    display: flex;
}

.mkb-celebration-content {
    text-align: center;
    color: var(--mkb-white);
    animation: celebrationBounce 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes celebrationBounce {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.mkb-celebration-emoji {
    font-size: 80px;
    margin-bottom: var(--mkb-space-2xl);
}

.mkb-celebration-message {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--mkb-space-md);
}

.mkb-celebration-submessage {
    font-size: 20px;
    opacity: 0.9;
}

/* Confetti */
.confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    animation: confetti-fall 3s linear forwards;
}

@keyframes confetti-fall {
    to {
        transform: translateY(100vh) rotate(360deg);
        opacity: 0;
    }
}

/* Empty state */
.mkb-empty-state {
    text-align: center;
    padding: var(--mkb-space-3xl) var(--mkb-space-lg);
    color: var(--mkb-gray-400);
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .mkb-board {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mkb-container {
        padding: var(--mkb-space-lg);
    }
    
    .mkb-header {
        flex-direction: column;
        gap: var(--mkb-space-lg);
    }
    
    .mkb-header-right {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .mkb-board {
        grid-template-columns: 1fr;
    }
    
    .mkb-column {
        min-height: 400px;
    }
    
    .mkb-tabs {
        overflow-x: auto;
    }
    
    .mkb-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .mkb-search-box {
        min-width: 100%;
    }
    
    .mkb-form-row {
        grid-template-columns: 1fr;
    }
    
    .mkb-modal-content {
        width: 95%;
        margin: var(--mkb-space-lg);
    }
}

@media (max-width: 480px) {
    .mkb-title {
        font-size: 22px;
    }
    
    .mkb-header-right {
        justify-content: space-between;
    }
    
    .mkb-btn {
        padding: var(--mkb-space-sm) var(--mkb-space-lg);
        font-size: 13px;
    }
    
    .mkb-celebration-emoji {
        font-size: 60px;
    }
    
    .mkb-celebration-message {
        font-size: 28px;
    }
    
    .mkb-celebration-submessage {
        font-size: 16px;
    }
}