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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-x: hidden;
}

/* CSS Custom Properties for Themes */
:root {
    --primary-color: #52a862;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    
    /* Light Theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f4;
    --bg-overlay: rgba(0, 0, 0, 0.5);
    
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-white: #ffffff;
    
    --border-color: #e9ecef;
    --border-light: #f1f3f4;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
    
    /* Column Colors */
    --todo-color: #ff6b6b;
    --doing-color: #4ecdc4;
    --done-color: #45b7d1;
    
    --todo-bg: #fff5f5;
    --doing-bg: #f0fffe;
    --done-bg: #f0f9ff;
    
    /* Priority Colors */
    --priority-high: #dc3545;
    --priority-medium: #ffc107;
    --priority-low: #28a745;
    
    /* Category Badge */
    --category-badge-bg: rgba(255, 255, 255, 0.9);
    --category-badge-text: #333333;
    
    /* Card Background */
    --card-bg: #ffffff;
    --input-bg: #ffffff;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #404040;
    --bg-overlay: rgba(0, 0, 0, 0.8);
    
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #999999;
    
    --border-color: #404040;
    --border-light: #505050;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
    
    --todo-bg: rgba(255, 107, 107, 0.1);
    --doing-bg: rgba(78, 205, 196, 0.1);
    --done-bg: rgba(69, 183, 209, 0.1);
    
    --category-badge-bg: rgba(255, 255, 255, 0.15);
    --category-badge-text: #ffffff;
    
    --card-bg: #2d2d2d;
    --input-bg: #404040;
}

/* Auto Theme (uses system preference) */
@media (prefers-color-scheme: dark) {
    [data-theme="auto"] {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --bg-tertiary: #404040;
        --bg-overlay: rgba(0, 0, 0, 0.8);
        
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --text-muted: #999999;
        
        --border-color: #404040;
        --border-light: #505050;
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
        --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
        --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.5);
        
        --todo-bg: rgba(255, 107, 107, 0.1);
        --doing-bg: rgba(78, 205, 196, 0.1);
        --done-bg: rgba(69, 183, 209, 0.1);
        
        --category-badge-bg: rgba(255, 255, 255, 0.15);
        --category-badge-text: #ffffff;
        
        --card-bg: #2d2d2d;
        --input-bg: #404040;
    }
}

/* App Container */
.app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    height: 56px;
}

/* Desktop Header Layout */
.desktop-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.desktop-header .logo {
    flex-shrink: 0;
}

.desktop-header .header-search {
    flex: 1;
    max-width: 400px;
}

.desktop-header .header-actions {
    flex-shrink: 0;
    margin-left: auto;
}

/* Mobile Header Layout */
.mobile-header-top,
.mobile-header-bottom {
    display: none;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 20px;
    line-height: 1;
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}


/* Header Search */
.header-search {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-input {
    width: 100%;
    height: 36px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.08);
}

.header-search .search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    opacity: 0.5;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 36px;
    padding: 0 12px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.header-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
}

.create-btn {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.create-btn:hover {
    background: #3d8b47;
    border-color: #3d8b47;
}

.btn-icon {
    font-size: 12px;
    line-height: 1;
}

.btn-text {
    font-weight: 500;
}

/* Header Dropdowns */
.header-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 250px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    margin-top: 4px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dropdown-select {
    width: 100%;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
}

.dropdown-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Language and Theme Options */
.language-options,
.theme-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.lang-option,
.theme-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: none;
    border: none;
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
}

.lang-option:hover,
.theme-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-option.active,
.theme-option.active {
    background: var(--primary-color);
    color: white;
}

/* Ensure good contrast for non-active theme/language options */
.lang-option:not(.active),
.theme-option:not(.active) {
    color: var(--text-primary) !important;
}

.lang-option:not(.active) .lang-name,
.theme-option:not(.active) .theme-name {
    color: var(--text-primary) !important;
    opacity: 1 !important;
}

.lang-option:not(.active) .lang-flag,
.theme-option:not(.active) .theme-icon {
    opacity: 0.8;
}

/* Force visibility for all theme option text */
.theme-option .theme-name,
.lang-option .lang-name {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
}

.theme-option.active .theme-name,
.lang-option.active .lang-name {
    color: white !important;
}

/* Specific fix for dark theme text visibility */
.theme-option[data-theme="dark"] .theme-name {
    color: var(--text-primary) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.theme-option[data-theme="dark"].active .theme-name {
    color: white !important;
}

.lang-flag,
.theme-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.lang-name,
.theme-name {
    flex: 1;
    font-weight: 500;
}

.dropdown-actions {
    padding: 8px 16px;
}

.dropdown-btn-clear {
    width: 100%;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-btn-clear:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

/* Board Layout */
.board {
    flex: 1;
    padding: 2rem;
    background: var(--bg-primary);
}

.board-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Columns */
.column {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 550px;
    max-height: calc(100vh - 250px);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.column:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.todo-header {
    background: linear-gradient(135deg, var(--todo-bg), transparent);
    border-left: 4px solid var(--todo-color);
}

.doing-header {
    background: linear-gradient(135deg, var(--doing-bg), transparent);
    border-left: 4px solid var(--doing-color);
}

.done-header {
    background: linear-gradient(135deg, var(--done-bg), transparent);
    border-left: 4px solid var(--done-color);
}

.column-title {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
}

.column-icon {
    font-size: 1.1rem;
}

.task-count {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.2rem 0.4rem;
    border-radius: 16px;
    min-width: 20px;
    text-align: center;
    line-height: 1.2;
}

/* Add Task Button */
.add-task-btn {
    background: var(--primary-color);
    color: var(--text-white);
    border: none;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    font-weight: 600;
}

.add-task-btn:hover {
    background: var(--primary-color);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.plus-icon {
    transition: transform 0.2s ease;
}

.add-task-btn:hover .plus-icon {
    transform: rotate(90deg);
}

/* Tasks Container */
.tasks-container {
    flex: 1;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

/* Task Cards */
.task-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-left: 4px solid transparent;
    border-radius: 12px;
    padding: 1rem;
    cursor: grab;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: var(--shadow-sm);
}

/* Priority Border Styles */
.task-card.priority-high {
    border-left-color: var(--priority-high);
}

.task-card.priority-medium {
    border-left-color: var(--priority-medium);
}

.task-card.priority-low {
    border-left-color: var(--priority-low);
}

/* Priority Icon */
.priority-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 12px;
    opacity: 0.7;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.task-card.dragging {
    cursor: grabbing;
    transform: rotate(5deg);
    opacity: 0.8;
    z-index: 1000;
}

.task-card.drag-over {
    border-color: var(--primary-color);
    background: var(--bg-tertiary);
}

.task-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.task-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.task-date {
    font-style: italic;
}

.task-actions {
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.task-action-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.edit-btn {
    color: var(--info-color);
}

.edit-btn:hover {
    background: var(--info-color);
    color: var(--text-white);
}

.delete-btn {
    color: var(--danger-color);
}

.delete-btn:hover {
    background: var(--danger-color);
    color: var(--text-white);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.empty-subtext {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-small {
    max-width: 400px;
}

.modal-large {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Category Management Styles */
.categories-section {
    margin-bottom: 2rem;
}

.categories-section h4,
.add-category-section h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.categories-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem;
    background: var(--bg-tertiary);
}

.category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: var(--card-bg);
    border-radius: 4px;
    border: 1px solid var(--border-light);
}

.category-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-item-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.category-item-name {
    font-weight: 500;
    color: var(--text-primary);
}

.category-item-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.delete-category-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.delete-category-btn:hover {
    background: #c82333;
    transform: translateY(-1px);
}

.delete-category-btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.add-category-section {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* New Categories Input System */
.categories-input-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    padding: 8px;
    min-height: 60px;
    transition: all 0.2s ease;
}

.categories-input-container:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.2);
}

.selected-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 0;
}

.selected-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
    animation: fadeIn 0.2s ease;
}

.selected-category .remove-category {
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    font-size: 12px;
    line-height: 1;
}

.selected-category .remove-category:hover {
    opacity: 1;
}

.category-input-wrapper {
    position: relative;
}

.category-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 4px 0;
    font-size: 14px;
    color: var(--text-primary);
    outline: none;
}

.category-input::placeholder {
    color: var(--text-muted);
}

.category-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
}

.category-suggestion {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.category-suggestion:hover {
    background: var(--bg-tertiary);
}

.category-suggestion:last-child {
    border-bottom: none;
}

.category-suggestion .category-preview {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.category-suggestion .category-name {
    flex: 1;
    cursor: pointer;
}

.category-delete-btn {
    background: none;
    border: none;
    color: currentColor;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.category-delete-btn:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Priority Dropdown */
.priority-dropdown-wrapper {
    position: relative;
}

.priority-selected {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.priority-selected:hover {
    border-color: var(--primary-color);
}

.priority-selected.open {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.2);
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.priority-selected.open .dropdown-arrow {
    transform: rotate(180deg);
}

.priority-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    margin-top: 4px;
}

.priority-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    transition: background-color 0.2s ease;
}

.priority-option:hover {
    background: var(--bg-tertiary);
}

.priority-option:last-child {
    border-bottom: none;
    border-radius: 0 0 6px 6px;
}

.priority-option:first-child {
    border-radius: 6px 6px 0 0;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .selected-categories {
        gap: 4px;
    }
    
    .selected-category {
        font-size: 11px;
        padding: 3px 6px;
    }
    
    .category-input {
        font-size: 13px;
    }
}

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

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 1.5rem;
}

.modal-form {
    padding: 1.5rem;
}

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

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

.jira-right .form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
    font-size: 13px;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    resize: vertical;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.form-textarea {
    min-height: 100px;
    font-family: inherit;
}

/* Original form actions for other modals */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* New Jira-style form actions */
.form-actions-jira {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    margin-top: auto;
}

.form-actions-left {
    display: flex;
    gap: 1rem;
}

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

.btn-create-jira {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(82, 168, 98, 0.15);
}

.btn-create-jira:hover {
    background: #3d8b47;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(82, 168, 98, 0.25);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-white);
}

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

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.btn-danger {
    background: var(--danger-color);
    color: var(--text-white);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-1px);
}

/* Delete Modal */
.delete-message {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.task-preview {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--danger-color);
}

.task-preview .task-title {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.task-preview .task-description {
    font-size: 0.75rem;
    margin: 0;
}

/* Loading States */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.loading-spinner {
    text-align: center;
    color: var(--text-white);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--text-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-text {
    font-size: 1rem;
    font-weight: 500;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

/* PWA Install Banner */
.pwa-install-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.pwa-banner-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.pwa-banner-icon {
    font-size: 32px;
    line-height: 1;
}

.pwa-banner-info {
    flex: 1;
}

.pwa-banner-title {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.pwa-banner-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.pwa-banner-buttons {
    display: flex;
    gap: 8px;
    margin-left: 16px;
}

.pwa-banner-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.pwa-dismiss-btn {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.pwa-dismiss-btn:hover {
    background: var(--border-color);
    color: var(--text-primary);
}

.pwa-install-btn {
    background: var(--primary-color);
    color: white;
}

.pwa-install-btn:hover {
    background: #3d8b47;
    transform: translateY(-1px);
}

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

/* Mobile responsive */
@media (max-width: 768px) {
    .pwa-banner-content {
        padding: 12px 16px;
    }
    
    .pwa-banner-text {
        gap: 8px;
    }
    
    .pwa-banner-icon {
        font-size: 24px;
    }
    
    .pwa-banner-title {
        font-size: 15px;
    }
    
    .pwa-banner-subtitle {
        font-size: 13px;
    }
    
    .pwa-banner-buttons {
        margin-left: 8px;
        gap: 6px;
    }
    
    .pwa-banner-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border-left: 4px solid var(--primary-color);
    transform: translateX(-120%);
    transition: all 0.3s ease;
    max-width: 300px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.error {
    border-left-color: var(--danger-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin: 0;
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: var(--success-color);
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        padding: 1rem;
    }
    
    .app-title {
        font-size: 1.25rem;
    }
    
    .header-controls {
        gap: 0.5rem;
    }
    
    .language-switcher {
        margin-right: 0.5rem;
    }
    
    .language-switcher,
    .theme-switcher {
        gap: 1px;
    }
    
    .lang-btn,
    .theme-btn {
        padding: 6px 8px;
        font-size: 0.875rem;
    }
    
    .board {
        padding: 1rem;
    }
    
    .board-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .column {
        min-height: 300px;
        max-height: calc(100vh - 200px);
    }
    
    .column-header {
        padding: 0.875rem 1rem;
    }
    
    .column-title {
        font-size: 1rem;
    }
    
    .column-icon {
        font-size: 1rem;
    }
    
    .add-task-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .modal {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-form,
    .form-actions {
        padding: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .toast-container {
        left: 10px;
        right: auto;
        max-width: calc(100% - 20px);
    }
    
    .toast {
        max-width: none;
    }
    
    .footer-content {
        padding: 0 1rem;
    }
    
    .footer-text {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem;
    }
    
    .board {
        padding: 0.75rem;
    }
    
    .column-header {
        padding: 0.75rem;
    }
    
    .tasks-container {
        padding: 0.75rem;
    }
    
    .task-card {
        padding: 0.75rem;
    }
    
    .empty-state {
        padding: 2rem 0.75rem;
    }
    
    .toast-container {
        top: 10px;
        left: 10px;
        right: auto;
        max-width: calc(100% - 20px);
    }
    
    .footer-content {
        padding: 0 0.75rem;
    }
}

/* Category Manager Button */
.btn-category-manager {
    background: var(--success-color);
    color: var(--text-white);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
}

.btn-category-manager:hover {
    background: #3d8b47;
    transform: translateY(-1px);
}

/* Category Badge */
.category-badge {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 500;
    display: inline-block;
    margin-bottom: 0.3rem;
    transition: all 0.2s ease;
}

.task-categories-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 0.5rem;
}

.task-category-container {
    margin-bottom: 0.5rem;
}

/* Filters Panel */
.filters-panel {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px 0;
    margin: 0;
    box-shadow: var(--shadow-sm);
}

.filters-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
}

.filters-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.search-container {
    position: relative;
    max-width: 400px;
}

.search-container input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid var(--border-light);
    border-radius: 24px;
    background: var(--input-bg);
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-container input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(82, 168, 98, 0.08), 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.search-container input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.6;
    pointer-events: none;
    font-size: 16px;
}

.filters-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--card-bg);
    padding: 4px 6px;
    border-radius: 20px;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.filter-select {
    padding: 8px 12px;
    border: none;
    border-radius: 16px;
    background: transparent;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 0;
}

.filter-select:focus {
    outline: none;
    background: var(--bg-tertiary);
}

.filter-select option {
    background: var(--card-bg);
    color: var(--text-primary);
}

.filter-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.clear-filters-btn {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.clear-filters-btn:hover {
    background: #e0e0e0;
    transform: scale(1.1);
}

.clear-filters-btn:active {
    transform: scale(1.05);
}

[data-theme="dark"] .clear-filters-btn {
    background: #404040;
    color: #ccc;
}

[data-theme="dark"] .clear-filters-btn:hover {
    background: #505050;
}

@media (prefers-color-scheme: dark) {
    [data-theme="auto"] .clear-filters-btn {
        background: #404040;
        color: #ccc;
    }
    
    [data-theme="auto"] .clear-filters-btn:hover {
        background: #505050;
    }
}

.manage-btn {
    background: linear-gradient(135deg, #4ecdc4, #26c6da);
    color: white;
    box-shadow: 0 2px 4px rgba(78, 205, 196, 0.3);
}

.manage-btn:hover {
    background: linear-gradient(135deg, #26c6da, #00acc1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(78, 205, 196, 0.4);
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-container {
        padding: 0 12px;
    }
    
    .filters-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .search-container {
        max-width: 100%;
    }
    
    .search-container input {
        padding: 10px 36px 10px 14px;
        font-size: 14px;
    }
    
    .filters-controls {
        justify-content: space-between;
        align-items: center;
        gap: 8px;
    }
    
    .filter-group {
        padding: 2px 4px;
        flex: 1;
    }
    
    .filter-select {
        padding: 6px 8px;
        font-size: 13px;
        width: 100%;
    }
    
    .clear-filters-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
        flex-shrink: 0;
    }
}

/* Active filter indicators */
.filter-group.has-value {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.filter-group.has-value .filter-select {
    color: white;
}

.filter-group.has-value .filter-select option {
    color: var(--text-primary);
}

/* Priority Indicator */
.priority-indicator {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 0.5rem;
}

.priority-icon {
    font-size: 0.75rem;
    opacity: 0.8;
}

.task-content {
    padding-left: 0.75rem;
}

/* Priority Selector in Modal */
.priority-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.priority-option {
    flex: 1;
    min-width: 120px;
}

.priority-option input[type="radio"] {
    display: none;
}

.priority-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-tertiary);
    justify-content: center;
}

.priority-label:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.priority-option input:checked + .priority-label {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: var(--text-white);
}

.priority-low .priority-icon {
    color: var(--priority-low);
}

.priority-medium .priority-icon {
    color: var(--priority-medium);
}

.priority-high .priority-icon {
    color: var(--priority-high);
}

.priority-option input:checked + .priority-label .priority-icon {
    color: var(--text-white);
}

.priority-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Category Select Container */
.category-select-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.875rem;
    cursor: pointer;
    white-space: nowrap;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
}

/* Color Picker */
.color-picker {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    border-color: var(--text-primary);
}

.color-option.selected {
    transform: scale(1.1);
    border-color: var(--text-primary);
    box-shadow: var(--shadow-md);
}

.color-option.selected::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(0, 0, 0, 0.5);
}

/* Category Preview */
.category-preview {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: 8px;
    text-align: center;
}

/* Task Card Priority Styling */
.task-card[data-priority="high"] {
    border-left: 4px solid var(--priority-high);
}

.task-card[data-priority="medium"] {
    border-left: 4px solid var(--priority-medium);
}

.task-card[data-priority="low"] {
    border-left: 4px solid var(--priority-low);
}

/* Jira-style Modal Styles */
.jira-modal {
    max-width: 800px;
    width: 95%;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.jira-form {
    padding: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.jira-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    padding: 1.5rem;
    min-height: 400px;
    overflow-y: auto;
    flex: 1;
}

.jira-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.jira-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 1px solid var(--border-color);
    padding-left: 1.5rem;
    max-height: 500px;
    overflow-y: auto;
}

/* Rich Text Editor Styles */
.rich-text-editor {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--input-bg);
    overflow: hidden;
    transition: all 0.2s ease;
}

.rich-text-editor:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.08);
}

.editor-toolbar {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-light);
    gap: 4px;
}

.editor-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.editor-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.editor-btn.active {
    background: var(--primary-color);
    color: white;
}

.toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    margin: 0 4px;
}

.rich-editor {
    min-height: 120px;
    max-height: 300px;
    padding: 12px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--input-bg);
    outline: none;
    border: none;
    resize: vertical;
}

.rich-editor:empty:before {
    content: attr(data-placeholder);
    color: var(--text-muted);
    font-style: italic;
}

.rich-editor:focus:before {
    display: none;
}

/* Rich editor content styles */
.rich-editor strong {
    font-weight: 600;
}

.rich-editor em {
    font-style: italic;
}

.rich-editor u {
    text-decoration: underline;
}

.rich-editor ul,
.rich-editor ol {
    padding-left: 24px;
    margin: 8px 0;
}

.rich-editor li {
    margin: 4px 0;
}

.rich-editor a {
    color: var(--primary-color);
    text-decoration: none;
}

.rich-editor a:hover {
    text-decoration: underline;
}

/* Custom Dropdown Styles */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.dropdown-selected {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-tertiary);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    font-size: 13px;
    min-height: 36px;
}

.dropdown-selected:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.dropdown-selected.open {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.08);
}

.selected-icon,
.option-icon {
    font-size: 14px;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

.selected-text,
.option-text {
    font-weight: 500;
    font-size: 13px;
    flex: 1;
    color: var(--text-primary);
}

.dropdown-arrow {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: auto;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown-selected.open .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: var(--shadow-md);
    z-index: 1000;
    margin-top: 2px;
    max-height: 160px;
    overflow-y: auto;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-light);
    font-size: 13px;
    min-height: 32px;
}

.dropdown-option:hover {
    background: var(--bg-tertiary);
}

.dropdown-option:last-child {
    border-bottom: none;
    border-radius: 0 0 4px 4px;
}

.dropdown-option:first-child {
    border-radius: 4px 4px 0 0;
}

/* Categories Selector */
.categories-selector {
    background: var(--bg-tertiary);
    border-radius: 6px;
    padding: 8px;
}

.categories-selector .selected-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 6px;
    min-height: 0;
}

.categories-selector .category-input-wrapper {
    position: relative;
}

.categories-selector .category-input {
    width: 100%;
    border: 1px solid var(--border-light);
    background: var(--bg-secondary);
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--text-primary);
    outline: none;
    transition: all 0.2s ease;
    min-height: 30px;
}

.categories-selector .category-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.08);
}

.categories-selector .category-input::placeholder {
    color: var(--text-muted);
}

/* Jira Input Styles */
.jira-input {
    font-size: 16px;
    font-weight: 500;
    border: 1px solid var(--border-light);
    padding: 12px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.jira-input:focus {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 2px rgba(82, 168, 98, 0.08);
}

/* Mobile Responsive for Jira Modal */
@media (max-width: 768px) {
    .jira-modal {
        max-width: 95%;
        max-height: 90vh;
        margin: 1rem;
    }
    
    .jira-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem;
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    .jira-right {
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-left: 0;
        padding-top: 1.5rem;
        max-height: none;
        overflow-y: visible;
    }
    
    .editor-toolbar {
        padding: 6px 8px;
        flex-wrap: wrap;
    }
    
    .editor-btn {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .rich-editor {
        min-height: 100px;
        padding: 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .dropdown-selected {
        padding: 14px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .dropdown-option {
        padding: 14px 12px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .selected-text,
    .option-text {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .categories-selector {
        padding: 10px;
    }
    
    .categories-selector .category-input {
        padding: 10px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .form-actions-jira {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions-left,
    .form-actions-right {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .jira-layout {
        padding: 0.75rem;
        gap: 1rem;
    }
    
    .jira-right {
        padding-top: 1rem;
    }
    
    .editor-toolbar {
        padding: 4px 6px;
    }
    
    .editor-btn {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .rich-editor {
        min-height: 80px;
        padding: 8px;
    }
}

/* Touch Devices */
@media (pointer: coarse) {
    .add-task-btn {
        width: 44px;
        height: 44px;
    }
    
    .task-action-btn {
        padding: 0.5rem;
        font-size: 1rem;
    }
    
    .lang-btn,
    .theme-btn {
        padding: 10px 12px;
    }
    
    .modal-close {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .color-option {
        width: 44px;
        height: 44px;
    }
    
    .btn-category-manager {
        padding: 0.75rem 1rem;
    }
    
    .editor-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
    
    .status-option,
    .priority-option-jira {
        padding: 14px;
        min-height: 48px;
    }
}

/* Mobile Adjustments for New Elements */
@media (max-width: 768px) {
    .btn-category-manager {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        margin-right: 0.5rem;
    }
    
    .priority-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .color-picker {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-select-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .btn-link {
        text-align: center;
        padding: 0.75rem;
        background: var(--bg-tertiary);
    }
}

@media (max-width: 480px) {
    .btn-category-manager {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    .color-picker {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile Header Styles */
@media (max-width: 768px) {
    /* Hide desktop layout on mobile */
    .desktop-header {
        display: none;
    }
    
    /* Show mobile layout */
    .mobile-header-top,
    .mobile-header-bottom {
        display: block;
    }
    
    /* Disable tooltips on mobile to prevent floating text bugs */
    .mobile-header-top *[title],
    .mobile-header-top *::before,
    .mobile-header-top *::after {
        display: none !important;
    }
    
    /* Completely disable title attribute tooltips on mobile */
    .mobile-header-top * {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -khtml-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    .header {
        position: sticky;
        top: 0;
        z-index: 100;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    
    .header-content {
        padding: 1rem;
        height: auto;
        min-height: 64px;
        gap: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Top row: Logo + Actions */
    .mobile-header-top {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }
    
    .logo {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .logo-icon {
        font-size: 24px;
        line-height: 1;
    }
    
    .logo-text {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
        white-space: nowrap;
    }
    
    /* Mobile header actions */
    .header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    
    .header-btn {
        height: 44px;
        width: 44px;
        padding: 0;
        font-size: 20px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        position: relative;
    }
    
    .create-btn {
        background: var(--primary-color);
        border-color: var(--primary-color);
        color: white;
        font-weight: 600;
        box-shadow: 0 3px 12px rgba(82, 168, 98, 0.25);
    }
    
    .create-btn:hover {
        background: #3d8b47;
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(82, 168, 98, 0.3);
    }
    
    .header-btn:not(.create-btn) {
        background: var(--bg-tertiary);
        border-color: var(--border-light);
        color: var(--text-secondary);
    }
    
    .header-btn:not(.create-btn):hover {
        background: var(--bg-secondary);
        border-color: var(--border-color);
        color: var(--text-primary);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Hide text on mobile buttons */
    .mobile-header-top .btn-text {
        display: none;
    }
    
    .btn-icon {
        font-size: 20px;
        line-height: 1;
    }
    
    /* Bottom row: Search */
    .mobile-header-bottom {
        width: 100%;
    }
    
    .header-search {
        width: 100%;
        max-width: none;
        position: relative;
    }
    
    .search-input {
        width: 100%;
        height: 44px;
        padding: 0 44px 0 16px;
        border: 2px solid var(--border-light);
        border-radius: 12px;
        background: var(--bg-tertiary);
        color: var(--text-primary);
        font-size: 16px;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    }
    
    .search-input:focus {
        outline: none;
        border-color: var(--primary-color);
        background: var(--bg-secondary);
        box-shadow: 0 0 0 3px rgba(82, 168, 98, 0.08), 0 4px 12px rgba(0, 0, 0, 0.1);
        transform: translateY(-1px);
    }
    
    .search-input::placeholder {
        color: var(--text-muted);
        font-size: 15px;
    }
    
    .header-search .search-icon {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 18px;
        opacity: 0.6;
        pointer-events: none;
        color: var(--text-secondary);
    }
    
    /* Dropdown adjustments for mobile */
    .mobile-header-top .dropdown-menu {
        position: fixed;
        top: 120px; /* Position below mobile header */
        right: 1rem;
        left: 1rem;
        width: auto;
        max-width: none;
        min-width: 0;
        margin-top: 0;
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
        border: 1px solid var(--border-color);
        z-index: 1001;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }
    
    /* Ensure dropdowns are properly positioned relative to their buttons */
    .mobile-header-top .header-dropdown {
        position: relative;
    }
    
    .dropdown-section {
        padding: 16px;
    }
    
    .dropdown-select {
        height: 40px;
        font-size: 16px;
        border-radius: 8px;
        padding: 0 12px;
    }
    
    .lang-option,
    .theme-option {
        padding: 12px 16px;
        font-size: 16px;
        border-radius: 8px;
        color: var(--text-primary);
    }
    
    .lang-option:not(.active),
    .theme-option:not(.active) {
        color: var(--text-primary) !important;
    }
    
    .lang-option:not(.active) .lang-name,
    .theme-option:not(.active) .theme-name {
        color: var(--text-primary) !important;
        opacity: 1 !important;
    }
    
    /* Force visibility for mobile theme option text */
    .theme-option .theme-name,
    .lang-option .lang-name {
        color: var(--text-primary) !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: inline !important;
    }
    
    .theme-option.active .theme-name,
    .lang-option.active .lang-name {
        color: white !important;
    }
    
    /* Specific fix for mobile dark theme text visibility */
    .theme-option[data-theme="dark"] .theme-name {
        color: var(--text-primary) !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
    
    .theme-option[data-theme="dark"].active .theme-name {
        color: white !important;
    }
    
    .dropdown-btn-clear {
        height: 40px;
        font-size: 16px;
        border-radius: 8px;
    }
}

/* Small screens adjustments */
@media (max-width: 480px) {
    .header-content {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .logo-text {
        font-size: 15px;
    }
    
    .logo-icon {
        font-size: 22px;
    }
    
    .header-btn {
        height: 40px;
        width: 40px;
        padding: 0;
        font-size: 18px;
    }
    
    .btn-icon {
        font-size: 18px;
    }
    
    .search-input {
        height: 40px;
        padding: 0 40px 0 14px;
        font-size: 15px;
        border-radius: 10px;
    }
    
    .search-input::placeholder {
        font-size: 14px;
    }
    
    .header-search .search-icon {
        right: 14px;
        font-size: 16px;
    }
    
    .dropdown-menu {
        right: 0.75rem;
        left: 0.75rem;
    }
}