/* Modern Task Manager - CSS Styles */

/* Reset ve Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    overflow-x: hidden;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
}

/* Login Screen */
#loginScreen {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-header p {
    color: #718096;
    font-size: 16px;
}

/* Form Styles */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #fff;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

/* Color Picker Group */
.color-picker-group .color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-group input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 40px;
    height: 40px;
    border: none;
    padding: 0;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

.color-picker-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-group input[type="color"]::-webkit-color-swatch {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.color-picker-group input[type="color"]::-moz-color-swatch {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
}

.color-picker-group input[type="text"] {
    flex-grow: 1;
    max-width: 120px;
    text-transform: uppercase;
    text-align: center;
}

/* Buttons */
.login-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

/* Error Message */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Main App Screen */
#mainScreen {
    background: #f7fafc;
    min-height: 100vh;
}

/* Header */
.app-header {
    background: white;
    padding: 16px 24px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left i {
    font-size: 24px;
    color: #667eea;
}

.header-left h1 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.user-role {
    font-size: 12px;
    color: #718096;
    background: #edf2f7;
    padding: 2px 8px;
    border-radius: 12px;
}

.admin-btn,
.logout-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.admin-btn {
    background: #667eea;
    color: white;
}

.admin-btn:hover {
    background: #5a67d8;
}

.logout-btn {
    background: #fed7d7;
    color: #c53030;
}

.logout-btn:hover {
    background: #feb2b2;
}

/* Task Board */
.task-board {
    display: flex;
    gap: 20px;
    padding: 24px;
    overflow-x: auto;
    min-height: calc(100vh - 80px);
}

.task-column {
    background: white;
    border-radius: 12px;
    padding: 20px;
    min-width: 300px;
    max-width: 300px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 2px solid #f7fafc;
}

.column-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-count {
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.task-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 200px;
    max-height: calc(100vh - 300px); /* Ekran yüksekliğine duyarlı max yükseklik */
    overflow-y: auto; /* Yükseklik aşılırsa scroll */
    -ms-overflow-style: none; /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.task-list::-webkit-scrollbar { /* Chrome, Safari, Opera */
    display: none;
 }

/* Task Cards */
.task-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
}

.task-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.task-card h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    word-wrap: break-word; /* Uzun kelimeleri sarmala */
    overflow-wrap: break-word; /* Yeni standart */
    white-space: normal; /* Normal boşluk işleme */
}

.task-card p {
    margin-top: 8px; /* Başlık ile açıklama arasına boşluk */
    font-size: 12px;
    color: #718096;
    margin-bottom: 8px;
    line-height: 1.4;
    word-wrap: break-word; /* Uzun kelimeleri sarmala */
    overflow-wrap: break-word; /* Yeni standart */
    max-height: 60px; /* Belirli bir yükseklik sınırı */
    overflow-y: auto; /* Yükseklik aşılırsa scroll */
    /* Scrollbar'ı gizlemek için (isteğe bağlı) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.task-card p::-webkit-scrollbar { /* Chrome, Safari, Opera */
    display: none;
}

.task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #a0aec0;
}

.task-category {
    background: #edf2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.task-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.task-actions button {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.task-actions button:hover {
    background: #edf2f7;
    color: #667eea;
}

/* Add Task Button */
.add-task-btn {
    background: #f7fafc;
    border: 2px dashed #cbd5e0;
    color: #718096;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.add-task-btn:hover {
    background: #edf2f7;
    border-color: #667eea;
    color: #667eea;
}

/* Admin Screen */
#adminScreen {
    background: #f7fafc;
    min-height: 100vh;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

.admin-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #5a67d8;
}

.admin-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    background: white;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    background: none;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #718096;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: #667eea;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
}

.add-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.add-btn:hover {
    background: #5a67d8;
}

/* Users List */
.users-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.user-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    transition: background 0.3s ease;
}

.user-item:hover {
    background: #f7fafc;
}

.user-item:last-child {
    border-bottom: none;
}

.user-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    color: #2d3748;
}

.user-details {
    font-size: 12px;
    color: #718096;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.user-actions button {
    background: none;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-btn {
    background: #edf2f7;
    color: #4a5568;
}

.edit-btn:hover {
    background: #e2e8f0;
}

.delete-btn {
    background: #fed7d7;
    color: #c53030;
}

.delete-btn:hover {
    background: #feb2b2;
}

/* Stats Content */
.stats-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    color: #718096;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #edf2f7;
    color: #4a5568;
}

.modal-form {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a67d8;
}

.btn-secondary {
    background: #edf2f7;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    background: white;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.loading-spinner i {
    font-size: 32px;
    color: #667eea;
    margin-bottom: 16px;
}

.loading-spinner p {
    color: #4a5568;
    font-weight: 500;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1500;
    max-width: 400px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.show {
    display: flex;
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #48bb78;
}

.notification.error {
    border-left: 4px solid #f56565;
}

.notification-icon {
    font-size: 20px;
}

.notification.success .notification-icon {
    color: #48bb78;
}

.notification.error .notification-icon {
    color: #f56565;
}

.notification-message {
    font-weight: 500;
    color: #2d3748;
}

/* Responsive Design */
@media (max-width: 768px) {
    .task-board {
        flex-direction: column;
        gap: 16px;
    }
    
    .task-column {
        min-width: 100%;
        max-width: 100%;
    }
    
    .app-header {
        padding: 12px 16px;
    }
    
    .header-left h1 {
        font-size: 20px;
    }
    
    .user-info {
        display: none;
    }
    
    .admin-container {
        padding: 16px;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 24px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .task-board {
        padding: 16px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Drag and Drop Styles */
.task-list.drag-over {
    background: #edf2f7;
    border: 2px dashed #667eea;
}

.task-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease;
}

.slide-up {
    animation: slideUp 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Statuses Tab */
#statusesTab h2 {
    margin-bottom: 20px;
    color: #333;
}

.add-status-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    display: block;
    width: fit-content;
}

.add-status-btn:hover {
    background-color: #218838;
}

.statuses-list {
    margin-top: 20px;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.status-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.status-info-item {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    text-align: left;
}

.status-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #343a40;
    margin-bottom: 5px;
}

.status-details {
    font-size: 0.9em;
    color: #6c757d;
}

.status-actions {
    display: flex;
    gap: 10px;
}

.status-actions button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
}

.status-actions .edit-btn {
    background-color: #ffc107;
    color: #333;
}

.status-actions .edit-btn:hover {
    background-color: #e0a800;
}

.status-actions .delete-btn {
    background-color: #dc3545;
    color: white;
}

.status-actions .delete-btn:hover {
    background-color: #c82333;
}

/* Task Detail Modal */
#taskDetailModal .modal-content h2 {
    color: #007bff;
    margin-bottom: 20px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    word-wrap: break-word; /* Uzun kelimeleri sarmala */
    overflow-wrap: break-word; /* Yeni standart */
    white-space: normal; /* Normal boşluk işleme */
}

#taskDetailModal .detail-item {
    margin-bottom: 15px;
    padding: 8px; /* Padding azaltıldı */
    background-color: #f0f8ff;
    border-left: 4px solid #007bff;
    border-radius: 5px;
}

#taskDetailModal .detail-item strong {
    color: #333;
    margin-bottom: 5px;
}

#taskDetailModal .detail-item span {
    color: #555;
    font-size: 0.95em;
    word-wrap: break-word; /* Uzun kelimeleri sarmala */
    overflow-wrap: break-word; /* Yeni standart */
    white-space: normal; /* Normal boşluk işleme */
}

#taskDetailModal .detail-item .no-data {
    font-style: italic;
    color: #888;
}

#taskDetailModal .detail-item.description {
    background-color: #e6f7ff;
    border-left-color: #4CAF50;
}
#taskDetailModal .detail-item.description strong {
    color: #4CAF50;
}

#taskDetailModal .detail-item.dates {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}
#taskDetailModal .detail-item.dates strong {
    color: #ff9800;
}

#taskDetailModal .modal-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Task Card - Detail Button */
.task-card .detail-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 5px 8px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8em;
    margin-left: 10px;
    transition: background-color 0.2s ease;
}

.task-card .detail-btn:hover {
    background-color: #0056b3;
}

/* Task Column - Add Task Button */
.task-column .add-task-btn {
    background-color: #28a745;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-top: 15px;
    width: 100%;
    display: block;
    text-align: center;
}

.task-column .add-task-btn:hover {
    background-color: #218838;
}

/* Responsive */
@media (max-width: 768px) {
    .task-board {
        flex-direction: column;
    }
    
    .task-column {
        width: 90%;
        margin-bottom: 20px;
    }

    .admin-tabs {
        flex-direction: column;
    }

    .admin-tabs .tab-btn {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .status-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .status-actions {
        width: 100%;
        justify-content: flex-end;
    }
}