:root {
    --primary-color: #0066cc;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --border-radius: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark-color);
    min-height: 100vh;
}

.header {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.board-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row;
}

.board-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header h1 {
    color: white;
    font-size: 2rem;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

.board-name-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    padding: 0.25rem 0.5rem;
}

.board-name-clickable:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.board-switch-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.board-switch-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.board-manage-users-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.board-manage-users-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.controls {
    display: flex;
    gap: 1rem;
}

.websocket-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.connection-indicator {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 68, 68, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 68, 68, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff4444;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    box-shadow: 0 0 12px rgba(255, 68, 68, 0.3);
}

.connection-indicator.connected {
    background: rgba(68, 255, 68, 0.2);
    border: 2px solid rgba(68, 255, 68, 0.4);
    color: #44ff44;
    box-shadow: 0 0 12px rgba(68, 255, 68, 0.3);
}

.connection-indicator.connecting {
    background: rgba(255, 170, 68, 0.2);
    border: 2px solid rgba(255, 170, 68, 0.4);
    color: #ffaa44;
    box-shadow: 0 0 12px rgba(255, 170, 68, 0.3);
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Mobile responsive adjustments for WebSocket status */
@media (max-width: 768px) {
    .websocket-status {
        bottom: 15px;
        right: 15px;
    }
    
    .connection-indicator {
        width: 28px;
        height: 28px;
        font-size: 10px;
    }
}

.user-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.user-avatar:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.user-dropdown {
    position: fixed;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 140px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 0.25rem;
    cursor: pointer;
}

.dropdown-link:hover {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-color);
}

.dropdown-link i {
    font-size: 0.8rem;
}

.dropdown-divider {
    border: none;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin: 0.5rem 0;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--dark-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 0.25rem;
}

.logout-link:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.logout-link i {
    font-size: 0.8rem;
}

.board-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    animation: slideInDown 0.3s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-select {
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    color: var(--dark-color);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.board-select:hover {
    border-color: var(--primary-color);
}

.board-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.board-select option {
    padding: 0.5rem;
    background: white;
    color: var(--dark-color);
}

.board-selector .btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.board-selector .btn .btn-icon {
    font-size: 0.8rem;
}

.board-selector .btn:not(.btn-primary) {
    min-width: auto;
    padding: 0.4rem;
}


.board-stats {
    display: flex;
    gap: 1rem;
}

.board-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.board-stat-icon {
    font-size: 0.7rem;
}

.btn {
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #4CAF50;
    color: white;
}

.btn-primary:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-secondary:hover {
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: rgba(0, 0, 0, 0.6);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* Add Swimlane Buttons */
.add-vertical-swimlane {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
}

.add-vertical-swimlane:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.add-horizontal-swimlane {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px dashed rgba(255, 255, 255, 0.4);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.add-horizontal-swimlane:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
}

.add-swimlane-icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
    pointer-events: none;
}

.add-vertical-swimlane span,
.add-horizontal-swimlane span {
    pointer-events: none;
}

.add-vertical-swimlane,
.add-horizontal-swimlane {
    pointer-events: auto;
}

/* Add Card Button in Cells */
.add-card-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0);
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s ease;
    margin: 0.5rem auto 0 auto;
    opacity: 0.8;
    align-self: center;
}

.add-card-btn:hover {
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
    transform: translateY(-2px);
}

.board-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    border: 1px dotted rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    min-height: 150px;
    padding: 0.5rem;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

/* Special styling for empty cells */
.board-cell:empty {
    justify-content: center;
    align-items: center;
}

.board-cell:empty .add-card-btn {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    margin: 0;
    border: 2px dashed rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

.board-cell:empty .add-card-btn:hover {
    border-color: #4CAF50;
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    opacity: 1;
    transform: scale(1.05);
}

.kanban-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 1rem;
    overflow-x: auto;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.vertical-headers {
    display: grid;
    grid-template-columns: 200px repeat(var(--columns, 3), 250px) 250px;
    gap: 2px;
    margin-bottom: 2px;
    min-width: 800px;
    transition: grid-template-columns 0.3s ease;
}

.corner-cell {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    min-height: 60px;
    opacity: 0.7;
}



.vertical-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    font-weight: 600;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.vertical-header:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.board-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 800px;
}

.horizontal-swimlane {
    display: grid;
    grid-template-columns: 200px repeat(var(--columns, 3), 250px);
    gap: 2px;
    transition: grid-template-columns 0.3s ease;
}

.horizontal-swimlane.add-row {
    grid-template-columns: 200px;
}

.horizontal-header {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.horizontal-header:hover {
    background: rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}



/* Vertical Header Layout */
.vertical-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.25rem;
}

/* Horizontal Header Layout */
.horizontal-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

/* Collapsed States */
.vertical-swimlane-collapsed {
    width: 0 !important;
    min-width: 0 !important;
    overflow: hidden;
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: all 0.3s ease;
    max-height: 200px;
}

/* Keep vertical headers visible when collapsed */
.vertical-header.vertical-swimlane-collapsed {
    width: 40px !important;
    min-width: 40px !important;
    opacity: 1;
    transform: none;
    overflow: visible;
    writing-mode: vertical-lr;
    text-orientation: mixed;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.25rem;
}

.vertical-header.vertical-swimlane-collapsed .swimlane-name {
    display: block !important;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.2;
    max-width: 30px;
    word-break: break-all;
    text-align: center;
    margin: auto 0;
    flex-grow: 1;
}

/* Make collapsed swimlanes clickable everywhere */
.vertical-header.vertical-swimlane-collapsed,
.horizontal-header.horizontal-swimlane-collapsed {
    cursor: pointer;
    transition: all 0.3s ease;
}

.vertical-header.vertical-swimlane-collapsed:hover,
.horizontal-header.horizontal-swimlane-collapsed:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Ensure entire header area is clickable for collapsed swimlanes */
.vertical-header.vertical-swimlane-collapsed * {
    pointer-events: none;
}

.horizontal-header.horizontal-swimlane-collapsed * {
    pointer-events: none;
}

/* Make swimlane titles visually distinct as clickable when expanded */
.vertical-header:not(.vertical-swimlane-collapsed) .swimlane-title,
.horizontal-header:not(.horizontal-swimlane-collapsed) .swimlane-title {
    cursor: text;
    padding: 2px 4px;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.vertical-header:not(.vertical-swimlane-collapsed) .swimlane-title:hover,
.horizontal-header:not(.horizontal-swimlane-collapsed) .swimlane-title:hover {
    background-color: rgba(255, 255, 255, 0.2);
}



.horizontal-swimlane-collapsed .board-cell {
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden;
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: all 0.3s ease;
}

.horizontal-swimlane-collapsed .horizontal-header {
    background: var(--primary-color);
}

/* Grid adjustments for collapsed columns */
.kanban-container.has-collapsed-columns .vertical-headers,
.kanban-container.has-collapsed-columns .horizontal-swimlane {
    transition: grid-template-columns 0.3s ease;
}



.board-cell.drag-over {
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.2);
    backdrop-filter: blur(10px);
    border-width: 2px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    color: white;
}

.card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary-color);
}

.card:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

.card .card-content {
    pointer-events: none;
}

.card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.card-description {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.card-assignee {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    color: white;
}

.card-priority {
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
}

.card-priority.low {
    background: #d4edda;
    color: #155724;
}

.card-priority.medium {
    background: #fff3cd;
    color: #856404;
}

.card-priority.high {
    background: #f8d7da;
    color: #721c24;
}

.card-due-date {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.card-due-date.overdue {
    background: #f8d7da;
    color: #721c24;
}

.card-due-date.due-soon {
    background: #fff3cd;
    color: #856404;
}

.card-meta-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-work-days {
    background: rgba(255, 255, 255, 0.25);
    padding: 0.2rem 0.4rem;
    border-radius: 8px;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}





/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin: 2% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    animation: slideIn 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--secondary-color);
}

.close:hover {
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Board Switch Modal Styles */
.board-sections {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

.board-section {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}

.board-section h3 {
    margin: 0;
    padding: 1rem 1rem 0.5rem 1rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.board-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem;
}

.board-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.board-item:hover {
    background: rgba(0, 102, 204, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-1px);
}

.board-item.current {
    background: rgba(0, 102, 204, 0.2);
    border-color: var(--primary-color);
    border-width: 2px;
}

.board-item.current::after {
    content: "✓";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.2rem;
}

.board-info-item {
    flex: 1;
}

.board-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.board-description {
    color: var(--secondary-color);
}

.no-boards-message {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--secondary-color);
    font-style: italic;
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Confirm Modal Styles */
.confirm-modal-content {
    max-width: 450px;
    padding: 1.5rem;
}

.confirm-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.confirm-modal-icon {
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.confirm-modal-icon.warning {
    background: rgba(255, 193, 7, 0.2);
    color: var(--warning-color);
}

.confirm-modal-icon.danger {
    background: rgba(220, 53, 69, 0.2);
    color: var(--danger-color);
}

.confirm-modal-icon.info {
    background: rgba(0, 102, 204, 0.2);
    color: var(--primary-color);
}

.confirm-modal-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 1.25rem;
    font-weight: 600;
}

.confirm-modal-body {
    margin-bottom: 2rem;
}

.confirm-modal-body p {
    margin: 0;
    color: var(--secondary-color);
    line-height: 1.5;
    font-size: 1rem;
}

.confirm-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.confirm-modal-actions .btn {
    min-width: 100px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .board-selector {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .board-select {
        min-width: 150px;
    }
    
    .board-selector .btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
        position: relative;
    }

    .user-menu {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    /* User dropdown positioning is now handled by JavaScript */

    .board-info {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .board-info h1 {
        font-size: 1.5rem;
    }

    .controls {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .board-selector {
        width: 100%;
        justify-content: center;
        padding: 0.75rem;
    }
    
    .board-select {
        min-width: 120px;
        flex: 1;
        max-width: 200px;
    }

    .kanban-container {
        padding: 0 1rem;
    }

    .vertical-headers {
        grid-template-columns: 150px repeat(var(--columns, 3), 200px) 200px;
    }
    
    .horizontal-swimlane {
        grid-template-columns: 150px repeat(var(--columns, 3), 200px);
    }
    
    .horizontal-swimlane.add-row {
        grid-template-columns: 150px;
    }

    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 98%;
        max-width: none;
        max-height: 95vh;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group-half,
    .form-group-third {
        min-width: 100%;
    }

    .board-list {
        max-height: 300px;
    }

    .board-item {
        padding: 0.75rem;
    }

    .board-name {
        font-size: 0.9rem;
    }

    .board-description {
        font-size: 0.8rem;
    }
    
    .board-sections {
        max-height: 350px;
    }
    
    .board-section h3 {
        font-size: 1rem;
        padding: 0.75rem 0.75rem 0.25rem 0.75rem;
    }
    
    .board-list {
        padding: 0.75rem;
        gap: 0.5rem;
    }
    
    .no-boards-message {
        padding: 1.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .header-left {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .board-info {
        flex-direction: row;
        align-items: center;
        gap: 0.5rem;
    }

    .board-info h1 {
        font-size: 1.25rem;
    }

    .board-switch-btn {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .board-selector {
        flex-direction: column;
        align-items: stretch;
    }
    
    .board-select {
        min-width: auto;
        max-width: none;
    }
    
    .board-selector .btn {
        justify-content: center;
        min-width: auto;
    }
}

/* Drop Indicator */
.drop-indicator {
    height: 3px;
    background: var(--primary-color);
    border-radius: 1.5px;
    margin: 0.25rem 0;
    opacity: 0.8;
    position: relative;
    animation: pulse 1s infinite;
}

.drop-indicator::before {
    content: '';
    position: absolute;
    left: 0;
    top: -2px;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translateX(-2px);
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Enhanced drag over effects */
.board-cell.drag-over {
    border-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.2) !important;
    backdrop-filter: blur(10px);
    border-style: solid;
    border-width: 2px;
}

/* Animation für neue Elemente */
.fade-in {
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* User Management Styles */
.user-management-content {
    padding: 0;
}

.add-user-section {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.add-user-section h3 {
    margin: 0 0 1rem 0;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.current-users-section h3 {
    margin: 0 0 1rem 0;
    padding: 0 1rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.users-list {
    max-height: 300px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.user-item:hover {
    background-color: #f8f9fa;
}

.user-item.owner {
    background-color: #e3f2fd;
    border-left: 4px solid var(--primary-color);
}

.user-item.owner:hover {
    background-color: #bbdefb;
}

.user-info {
    flex: 1;
}

.user-email {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.user-item.owner .user-email::after {
    content: " (Besitzer)";
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.85em;
}

.user-name {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.user-actions {
    margin-left: 1rem;
}

.btn-remove-user {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-remove-user:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.loading-users {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
}

.no-users-message {
    text-align: center;
    padding: 2rem;
    color: var(--secondary-color);
    font-style: italic;
}

.success-message {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.error-message {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* User Management Modal Styles */
.user-management-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.add-user-section,
.current-users-section {
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: #f8f9fa;
}

.add-user-section h3,
.current-users-section h3 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.1rem;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 400px;
    overflow-y: auto;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.user-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.user-email {
    font-weight: 500;
    color: var(--dark-color);
}

.user-name {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.user-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-remove-user {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.btn-remove-user:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.user-item.owner {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: var(--primary-color);
}

.user-item.owner .user-email::after {
    content: " (Besitzer)";
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: normal;
}

.no-users-message {
    text-align: center;
    color: var(--secondary-color);
    font-style: italic;
    padding: 2rem;
}

.loading-users {
    text-align: center;
    color: var(--secondary-color);
    padding: 2rem;
}

.success-message,
.error-message {
    padding: 0.75rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Card Form Layout */
#card-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-row .form-group {
    flex: 1;
    min-width: 200px;
}

.form-group-full {
    width: 100%;
}

.form-group-half {
    flex: 1;
    min-width: 250px;
}

.form-group-third {
    flex: 1;
    min-width: 150px;
}

/* Checklist Styles */
.checklists-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
    flex-shrink: 0;
    max-height: 60vh;
    overflow-y: auto;
}

#checklists-container {
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 1rem;
}

.checklist-container {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.checklist-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.checklist-title {
    flex: 1;
    border: none;
    background: transparent;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: var(--border-radius);
}

.checklist-title:focus {
    outline: 2px solid var(--primary-color);
    background: white;
}

.checklist-actions {
    display: flex;
    gap: 0.25rem;
}

.btn-checklist-action {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.btn-checklist-action:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--dark-color);
}

.btn-checklist-delete:hover {
    background: var(--danger-color);
    color: white;
}

.checklist-items {
    margin-bottom: 0.75rem;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    margin-bottom: 0.25rem;
}

.checklist-item input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.checklist-item-text {
    flex: 1;
    border: 1px solid transparent;
    background: white;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    min-width: 0;
    width: 100%;
}

.checklist-item-text:focus {
    outline: 2px solid var(--primary-color);
    background: white;
    border-color: var(--primary-color);
}

.checklist-item-text.completed {
    text-decoration: line-through;
    color: var(--secondary-color);
}

.btn-item-delete {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 0.75rem;
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.checklist-item:hover .btn-item-delete {
    opacity: 1;
}

.btn-item-delete:hover {
    background: var(--danger-color);
    color: white;
}

.btn-add-item {
    padding: 0.25rem 0.5rem;
    border: 1px dashed var(--border-color);
    background: transparent;
    border-radius: var(--border-radius);
    cursor: pointer;
    color: var(--secondary-color);
    font-size: 0.875rem;
    width: 100%;
    transition: all 0.2s ease;
}

.btn-add-item:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-small {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Checklist Progress Indicator */
.checklist-progress {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

/* Card Checklist Indicator */
.card-checklist-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: #ffffff;
    background: rgba(108, 117, 125, 0.8);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-top: 0.25rem;
    font-weight: 500;
    backdrop-filter: blur(4px);
}

.card-checklist-indicator.completed {
    color: #ffffff;
    background: rgba(40, 167, 69, 0.9);
}

.card-checklist-indicator i {
    font-size: 0.7rem;
}