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

/* Notification Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.main-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 70px;
}

.logo a {
    display: flex;
    align-items: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo i {
    margin-right: 10px;
    font-size: 1.8rem;
}

/* Mobile menu toggle button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: white;
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 1px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation */
.main-nav .nav-menu {
    display: flex;
    list-style: none;
    gap: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 5px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

.nav-link i {
    margin-right: 8px;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    font-size: 0.9rem;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 15px;
    background: rgba(255,255,255,0.2);
    margin-bottom: 4px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-role.ceo {
    background: #ffd700;
    color: #333;
}

.user-role.team_it {
    background: #28a745;
    color: white;
}

.user-name {
    font-weight: 500;
    white-space: nowrap;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.dropdown-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: background 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.dropdown-item i {
    margin-right: 10px;
    width: 16px;
}

.dropdown-divider {
    height: 1px;
    background: #e9ecef;
    margin: 5px 0;
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e9ecef;
}

.page-header h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header p {
    color: #6c757d;
    font-size: 1.1rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 35px;
    height: 35px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 1rem;
    background: #667eea;
    color: white;
}

.stat-card.active .stat-icon {
    background: #28a745;
}

.stat-card.warning .stat-icon {
    background: #ffc107;
    color: #333;
}

.stat-content h3 {
    font-size: 1.4rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 2px;
}

.stat-content p {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.section-header {
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin: 0;
}

/* Project Cards */
.projects-list {
    padding: 20px;
}

.project-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.project-card:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

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

.project-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.project-header a {
    color: #2c3e50;
    text-decoration: none;
}

.project-header a:hover {
    color: #667eea;
}

.project-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 10px;
}

.project-progress {
    font-size: 0.9rem;
    color: #6c757d;
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s ease;
}

.project-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.project-assigned {
    font-size: 0.9rem;
    color: #495057;
}

/* Badges */
.priority-badge,
.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.priority-low { background: #d4edda; color: #155724; }
.priority-medium { background: #fff3cd; color: #856404; }
.priority-high { background: #f8d7da; color: #721c24; }
.priority-critical { background: #721c24; color: white; }

.status-planning { background: #e2e3e5; color: #383d41; }
.status-active { background: #d1ecf1; color: #0c5460; }
.status-hold { background: #fff3cd; color: #856404; }
.status-completed { background: #d4edda; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }
.status-todo { background: #e2e3e5; color: #383d41; }
.status-progress { background: #cce5ff; color: #004085; }
.status-review { background: #e7f3ff; color: #0056b3; }
.status-blocked { background: #f8d7da; color: #721c24; }

/* Tasks List */
.tasks-list {
    padding: 20px;
}

.task-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    transition: background 0.3s ease;
}

.task-item:hover {
    background: #f8f9fa;
}

.task-item:last-child {
    border-bottom: none;
}

.task-content h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
}

.task-content a {
    color: #2c3e50;
    text-decoration: none;
}

.task-content a:hover {
    color: #667eea;
}

.task-project,
.task-assigned {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 2px 0;
}

.task-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.due-date {
    font-size: 0.85rem;
    color: #6c757d;
}

.due-date.overdue {
    color: #dc3545;
    font-weight: 500;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 8px;
}

.btn-primary {
    background: #667eea;
    color: white;
}

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

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
    border: 1px solid #ffc107;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #d39e00;
    transform: translateY(-1px);
}

.btn-warning i.fas.fa-star {
    color: #ff6b35;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.login-header h1 {
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-form {
    padding: 30px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.input-group input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.login-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Form Styles */
.form-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 30px;
}

.form-section h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 25px;
}

.filters-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 200px;
}

.search-input,
.filter-select {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.search-input:focus,
.filter-select:focus {
    border-color: #667eea;
    outline: none;
}

/* Table Styles */
.table-responsive {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    margin-bottom: 25px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.9rem;
}

.table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    font-size: 0.9rem;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.project-card-detailed {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 20px;
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.project-card-detailed:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

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

.project-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #2c3e50;
}

.project-header a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-header a:hover {
    color: #667eea;
}

.project-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.project-description {
    color: #6c757d;
    margin-bottom: 20px;
    line-height: 1.5;
}

.project-progress-section {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.project-meta {
    margin-bottom: 20px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.meta-item i {
    width: 16px;
    color: #667eea;
}

.project-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Projects Section */
.projects-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

/* 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;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    margin: auto;
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    margin: 0;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: rgba(255,255,255,0.8);
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.modal-body {
    padding: 25px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding: 20px 25px;
    border-top: 1px solid #e9ecef;
}

/* Priority Form Styles */
.priority-form .form-group {
    margin-bottom: 20px;
}

.priority-form .project-info {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    color: #2c3e50;
}

.priority-form .current-priority {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-weight: 500;
    color: #2c3e50;
    text-transform: capitalize;
}

.priority-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Task-specific Styles */
.tasks-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.tasks-list {
    padding: 20px;
}

.task-item-detailed {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.task-item-detailed:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.task-item-detailed.completed {
    border-left-color: #28a745;
    opacity: 0.8;
}

.task-item-detailed.in_progress {
    border-left-color: #007bff;
}

.task-item-detailed.cancelled {
    border-left-color: #dc3545;
}

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

.task-title-section h4 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.task-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.overdue-badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.task-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.status-select {
    padding: 6px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    min-width: 120px;
}

.task-description {
    color: #000000;
    margin-bottom: 15px;
    line-height: 1.5;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Stile per i link dei titoli dei task */
.task-title-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.task-title-link:hover {
    color: #007bff;
    text-decoration: underline;
}

.task-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

/* View Options */
.view-options {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.view-btn:hover,
.view-btn.active {
    border-color: #667eea;
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Timeline View */
.timeline-view {
    padding: 20px;
}

.timeline-date {
    margin-bottom: 30px;
}

.timeline-date h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.timeline-tasks {
    display: grid;
    gap: 15px;
}

.timeline-task {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.timeline-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.timeline-task.completed {
    border-left-color: #28a745;
}

.timeline-task.in_progress {
    border-left-color: #007bff;
}

.timeline-task.cancelled {
    border-left-color: #dc3545;
}

.timeline-task-content h4 {
    margin: 0 0 8px 0;
    color: #2c3e50;
}

.timeline-task-content p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* Kanban View */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    min-height: 400px;
}

.kanban-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.kanban-header h3 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.kanban-count {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.kanban-tasks {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kanban-task {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
}

.kanban-task:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.kanban-task.priority-high {
    border-left-color: #ffc107;
}

.kanban-task.priority-critical {
    border-left-color: #dc3545;
}

.kanban-task h4 {
    margin: 0 0 10px 0;
    font-size: 1rem;
    color: #2c3e50;
}

.kanban-task p {
    margin: 0 0 10px 0;
    color: #6c757d;
    font-size: 0.85rem;
}

.kanban-task-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6c757d;
}

/* Statistics Cards Enhancement */
.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Users-specific Styles */
.users-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
}

.users-table-container {
    overflow-x: auto;
    padding: 20px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.users-table thead th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.users-table tbody td {
    padding: 15px 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

.users-table tbody tr:hover {
    background: #f8f9fa;
}

.users-table tbody tr.inactive {
    opacity: 0.6;
    background: #f8f9fa;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.user-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.user-username {
    color: #6c757d;
    font-size: 0.8rem;
}

.role-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-badge.ceo {
    background: #dc3545;
    color: white;
}

.role-badge.team-it {
    background: #007bff;
    color: white;
}

.role-badge.project-manager {
    background: #28a745;
    color: white;
}

.role-badge.developer {
    background: #17a2b8;
    color: white;
}

.role-badge.designer {
    background: #ffc107;
    color: #212529;
}

.task-stats {
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-count {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.task-count.active {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.task-count.completed {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.status-badge.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.status-badge.status-inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-sm {
    padding: 6px 10px;
    font-size: 0.8rem;
    min-width: auto;
}

.btn-sm i {
    font-size: 0.9rem;
}

/* User Form Styles */
.user-form {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
    color: #2c3e50;
    margin-top: 25px;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkmark {
    font-size: 0.9rem;
}

/* Responsive Design for Users Table */
@media (max-width: 768px) {
    .users-table-container {
        padding: 10px;
    }
    
    .users-table {
        font-size: 0.8rem;
    }
    
    .users-table thead th,
    .users-table tbody td {
        padding: 10px 8px;
    }
    
    .user-info {
        gap: 8px;
    }
    
    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 4px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Reports-specific Styles */
.date-filter {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.filter-form {
    display: flex;
    align-items: end;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
}

.filter-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.9rem;
}

.filter-form input[type="date"] {
    padding: 10px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    min-width: 150px;
}

.stats-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-left: 4px solid #667eea;
}

.stats-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-card h3 i {
    color: #667eea;
}

.stats-content {
    display: grid;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.stat-value {
    font-weight: bold;
    font-size: 1.1rem;
    color: #2c3e50;
}

.report-section {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.report-section h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.report-section h3 i {
    color: #667eea;
}

/* Activities List */
.activities-list {
    display: grid;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #667eea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1rem;
}

.activity-type {
    font-weight: normal;
    color: #6c757d;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.activity-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.activity-status {
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.activity-status.status-active {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.activity-status.status-completed {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.activity-status.status-in_progress {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.activity-status.status-on_hold {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.activity-status.status-cancelled {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.activity-date {
    color: #6c757d;
}

.activity-user {
    color: #667eea;
    font-weight: 500;
}

/* Badge Styles for Reports */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Responsive Design for Reports */
@media (max-width: 768px) {
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-form .form-group {
        width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .activity-item {
        flex-direction: column;
        text-align: center;
    }
    
    .activity-meta {
        justify-content: center;
    }
    
    .table-responsive {
        font-size: 0.8rem;
    }
}

/* Profile-specific Styles */
.profile-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-main {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-form-card,
.account-info-card,
.recent-tasks-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.profile-form-card h3,
.account-info-card h3,
.recent-tasks-card h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.profile-form-card h3 i,
.account-info-card h3 i,
.recent-tasks-card h3 i {
    color: #667eea;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.profile-form .form-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.profile-form .form-section h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

.profile-form .form-text {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 15px;
    font-style: italic;
}

.profile-form small.form-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.8rem;
}

.profile-form input[readonly] {
    background: #e9ecef;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Account Info Grid */
.info-grid {
    display: grid;
    gap: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: #2c3e50;
}

/* Recent Tasks in Profile */
.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.task-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.task-item:hover {
    background: #e9ecef;
    transform: translateX(3px);
}

.task-title {
    margin-bottom: 8px;
}

.task-title a {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}

.task-title a:hover {
    color: #667eea;
}

.task-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 0.8rem;
}

.task-project {
    color: #6c757d;
    background: rgba(108, 117, 125, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.task-status {
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.no-data {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Badge Styles for Profile */
.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Responsive Design for Profile */
@media (max-width: 1024px) {
    .profile-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .profile-sidebar {
        order: 2;
    }
    
    .profile-main {
        order: 1;
    }
}

@media (max-width: 768px) {
    .profile-form-card,
    .account-info-card,
    .recent-tasks-card {
        padding: 20px;
    }
    
    .profile-form .form-section {
        padding: 15px;
    }
    
    .task-item {
        padding: 12px;
    }
    
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Utility Classes */
.text-warning { color: #ffc107 !important; }
.text-danger { color: #dc3545 !important; }
.text-success { color: #28a745 !important; }

/* Notification badge */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.nav-link {
    position: relative;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Notification page styles */
.notification-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: white;
    transition: all 0.3s ease;
    cursor: pointer;
}

.notification-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.notification-item.unread {
    border-left: 4px solid #007bff;
    background: #f8f9ff;
}

.notification-item.selected {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.notification-icon {
    margin-right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-icon-info {
    background: #e3f2fd;
    color: #1976d2;
}

.notification-icon-warning {
    background: #fff3e0;
    color: #f57c00;
}

.notification-icon-success {
    background: #e8f5e8;
    color: #388e3c;
}

.notification-icon-error {
    background: #ffebee;
    color: #d32f2f;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
}

.notification-message {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    white-space: pre-line;
}

.notification-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8rem;
    color: #888;
}

.notification-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.notification-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.notification-actions .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

/* Notification filters */
.notification-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.notification-filters select {
    min-width: 150px;
}

/* Empty state for notifications */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

/* Loading indicator */
.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Notification toast */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

.notification.notification-success {
    border-left: 4px solid #28a745;
}

.notification.notification-error {
    border-left: 4px solid #dc3545;
}

.notification.notification-info {
    border-left: 4px solid #17a2b8;
}

.notification.fade-out {
    animation: slideOut 0.3s ease-out forwards;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    margin-left: auto;
}

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

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

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    z-index: 10001;
    pointer-events: none;
    white-space: nowrap;
}

.tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        height: auto;
        min-height: 60px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        order: 3;
    }
    
    .header-left {
        order: 1;
    }
    
    .header-right {
        order: 2;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
        order: 4;
        width: 100%;
    }
    
    .main-nav.mobile-menu-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        justify-content: flex-start;
        border-radius: 0;
        background: none;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        transition: background-color 0.3s ease;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255,255,255,0.1);
    }
    
    .user-menu {
        margin-top: 0;
        width: auto;
        justify-content: flex-end;
    }
    
    .user-info {
        display: none;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-actions {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .task-list {
        padding: 0;
    }
    
    .task-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem;
    }
    
    .task-info {
        width: 100%;
    }
    
    .task-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .task-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100%;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Hide less important columns on mobile */
    .table .d-none-mobile {
        display: none;
    }
    
    /* Notification adjustments */
    .notification-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .notification-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .notification-actions {
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
        justify-content: flex-end;
    }
    
    .notification-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .notification-filters select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Toast notifications */
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .user-info {
        display: none;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .project-card,
    .task-card {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .form-control {
        font-size: 1rem; /* Prevent zoom on iOS */
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .modal-footer .btn:last-child {
        margin-bottom: 0;
    }
}

/* Print styles */
@media print {
    .main-header,
    .page-actions,
    .btn,
    .modal,
    .notification {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0;
        padding: 0;
    }
    
    .page-header {
        border-bottom: 2px solid #000;
        margin-bottom: 1rem;
    }
    
    .stats-grid,
    .dashboard-grid,
    .projects-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .stat-card,
    .project-card,
    .task-card {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem;
        border: 1px solid #000;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-color: #1a1a1a;
        --text-color: #e0e0e0;
        --border-color: #333;
        --card-bg: #2d2d2d;
    }
    
    body {
        background-color: var(--bg-color);
        color: var(--text-color);
    }
    
    .main-header {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
        border-bottom-color: var(--border-color);
    }
    
    .stat-card,
    .project-card,
    .task-card,
    .notification-item {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
    
    .form-control,
    .form-select {
        background: var(--card-bg);
        border-color: var(--border-color);
        color: var(--text-color);
    }
    
    .table {
        color: var(--text-color);
    }
    
    .table th {
        background: var(--card-bg);
        border-color: var(--border-color);
    }
    
    .table td {
        border-color: var(--border-color);
    }
    
    .modal-content {
        background: var(--card-bg);
        color: var(--text-color);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border-width: 2px;
    }
    
    .form-control,
    .form-select {
        border-width: 2px;
    }
    
    .stat-card,
    .project-card,
    .task-card {
        border-width: 2px;
    }
    
    .notification-item {
        border-width: 2px;
    }
    
    .notification-item.unread {
        border-left-width: 6px;
    }
}

/* Project Detail Page Styles */
.project-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-bottom: 25px;
    gap: 20px;
}

.project-title-section h1 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.project-title-section h1 i {
    color: #667eea;
}

.project-badges {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.project-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.info-card,
.stats-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
}

.info-card h3,
.stats-card h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.info-card h3 i,
.stats-card h3 i {
    color: #667eea;
}

.info-item {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px;
    align-items: start;
    margin-bottom: 12px;
    padding: 8px 0;
}

.info-item label {
    font-weight: 600;
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
    white-space: nowrap;
}

.info-item span,
.info-item p {
    color: #2c3e50;
    margin: 0;
    word-wrap: break-word;
}

.stat-item {
    text-align: center;
    margin-bottom: 20px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.progress-section {
    margin-top: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #6c757d;
}

.priority-history-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 25px;
    margin-top: 25px;
}

.priority-history-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.priority-history-section h3 i {
    color: #667eea;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #667eea;
}

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

.priority-change {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.history-date {
    color: #6c757d;
    font-size: 0.85rem;
}

.history-meta {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.history-reason {
    color: #2c3e50;
    font-size: 0.9rem;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* Responsive adjustments for project detail */
@media (max-width: 1024px) {
    .project-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .project-detail-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .project-actions {
        justify-content: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .project-detail-header {
        padding: 20px;
    }
    
    .info-card,
    .stats-card {
        padding: 20px;
    }
    
    .project-title-section h1 {
        font-size: 1.5rem;
    }
    
    .project-actions {
        flex-direction: column;
    }
    
    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
        font-size: 1rem;
    }
    
    .stat-content h3 {
        font-size: 1.4rem;
    }
    
    .stat-content p {
        font-size: 0.8rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .notification-badge {
        animation: none;
    }
    
    .progress-bar {
        transition: none;
    }
}

/* Toggle per mostrare task completati */
.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #2c3e50;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

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

.toggle-label:hover .toggle-text {
    color: #667eea;
}

/* Task Drag and Drop Styles */
.tasks-list {
    position: relative;
}

.task-item {
    transition: all 0.3s ease;
    cursor: move;
    position: relative;
    margin-bottom: 15px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #e1e8ed;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.task-item.sortable-ghost {
    opacity: 0.5;
    background: #f8f9fa;
    border: 2px dashed #667eea;
    transform: rotate(2deg);
}

.task-item.sortable-chosen {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transform: scale(1.02);
    z-index: 1000;
}

.task-item.sortable-drag {
    opacity: 0.8;
    transform: rotate(-2deg);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.task-item.completed {
    opacity: 0.7;
    cursor: default;
}

.task-item.completed:hover {
    transform: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.task-item::before {
    content: '⋮⋮';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #bbb;
    font-size: 16px;
    line-height: 0.8;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-item:hover::before {
    opacity: 1;
}

.task-item.completed::before {
    display: none;
}

.task-title-link {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.task-title-link:hover {
    color: #667eea;
    text-decoration: underline;
}

.tasks-list.drag-active {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
}

.drag-placeholder {
    height: 80px;
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: 2px dashed #667eea;
    border-radius: 8px;
    margin: 10px 0;
    opacity: 0.3;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    font-weight: bold;
}

.drag-placeholder::after {
    content: 'Rilascia qui per riordinare';
    font-size: 14px;
}

/* Drag and Drop Styles */
.projects-grid.sortable {
    min-height: 200px;
}

.project-card {
    cursor: grab;
    transition: all 0.3s ease;
    position: relative;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.project-card.sortable-ghost {
    opacity: 0.4;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
}

.project-card.sortable-chosen {
    cursor: grabbing;
    transform: rotate(5deg);
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.project-card.sortable-drag {
    opacity: 0.8;
    transform: rotate(5deg);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.projects-grid .sortable-fallback {
    opacity: 0.6;
}

/* Drag handle indicator */
.project-card::before {
    content: '⋮⋮';
    position: absolute;
    top: 10px;
    right: 10px;
    color: #dee2e6;
    font-size: 16px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.project-card:hover::before {
    opacity: 0.6;
}

.project-card.sortable-chosen::before,
.project-card.sortable-drag::before {
    opacity: 1;
    color: #667eea;
}

/* Drop zone feedback */
.projects-grid.drag-active {
    background: linear-gradient(45deg, transparent 40%, rgba(102, 126, 234, 0.1) 50%, transparent 60%);
    background-size: 20px 20px;
    animation: dragPattern 1s linear infinite;
}

@keyframes dragPattern {
    0% { background-position: 0 0; }
    100% { background-position: 20px 20px; }
}

/* Task Grid Layout Styles */
.tasks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.task-card {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: move;
    position: relative;
    min-height: 180px;
    display: flex;
    flex-direction: column;
}

.task-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: #667eea;
}

.task-card.completed {
    opacity: 0.7;
    background: #f8f9fa;
    cursor: default;
}

.task-card.completed:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.task-card.sortable-ghost {
    opacity: 0.4;
    background: #f0f4ff;
    border: 2px dashed #667eea;
    transform: rotate(1deg);
}

.task-card.sortable-chosen {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.25);
    transform: scale(1.03);
    z-index: 1000;
    border-color: #667eea;
}

.task-card.sortable-drag {
    opacity: 0.9;
    transform: rotate(-1deg);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

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

.task-card-title {
    flex: 1;
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #2c3e50;
}

.task-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.task-card-title a:hover {
    color: #667eea;
}

.task-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.task-card-badges .priority-badge,
.task-card-badges .status-badge,
.task-card-badges .overdue-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.task-card-description {
    font-size: 14px;
    color: #000000;
    line-height: 1.4;
    margin-bottom: 12px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.task-card-meta {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
    color: #888;
}

.task-card-meta-item {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
}

.task-card-meta-item:last-child {
    margin-bottom: 0;
}

.task-card-meta-item i {
    width: 14px;
    margin-right: 6px;
    color: #bbb;
}

.task-card-meta-item a {
    color: #667eea;
    text-decoration: none;
}

.task-card-meta-item a:hover {
    text-decoration: underline;
}

.task-card-actions {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

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

.task-card-actions .btn {
    padding: 4px 6px;
    font-size: 12px;
    min-width: auto;
}

.task-assignment-select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    margin-top: 8px;
    transition: border-color 0.2s ease;
}

.task-assignment-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.task-drag-handle {
    position: absolute;
    top: 8px;
    left: 8px;
    color: #ccc;
    font-size: 14px;
    cursor: move;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.task-card:hover .task-drag-handle {
    opacity: 1;
}

.task-card.completed .task-drag-handle {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tasks-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .task-card {
        min-height: 160px;
    }
}

@media (max-width: 480px) {
    .tasks-grid {
        padding: 15px 0;
        gap: 12px;
    }
    
    .task-card {
        padding: 12px;
        min-height: 140px;
    }
}

/* ===== COMPREHENSIVE MOBILE OPTIMIZATIONS ===== */

/* Mobile-first responsive design improvements */
@media (max-width: 768px) {
    /* Container and layout adjustments */
    .container {
        padding: 10px;
        margin: 0;
        max-width: 100%;
    }
    
    /* Header optimizations */
    .header {
        padding: 10px;
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 20px;
        text-align: center;
        margin: 0;
    }
    
    /* Navigation optimizations */
    .nav {
        flex-direction: column;
        gap: 5px;
    }
    
    .nav a {
        padding: 12px;
        text-align: center;
        border-radius: 6px;
        margin: 2px 0;
    }
    
    /* User menu mobile optimization */
    .user-menu {
        position: relative;
        width: 100%;
        text-align: center;
    }
    
    .user-menu-dropdown {
        position: static;
        width: 100%;
        box-shadow: none;
        border: 1px solid #ddd;
        margin-top: 10px;
    }
    
    /* Dashboard grid mobile optimization */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px 0;
    }
    
    .dashboard-card {
        padding: 15px;
        margin: 0;
    }
    
    .dashboard-card h3 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    /* Project cards mobile optimization */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 10px 0;
    }
    
    .project-card {
        padding: 15px;
        margin: 0;
    }
    
    .project-card h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .project-card-meta {
        font-size: 12px;
    }
    
    /* Form optimizations */
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
        display: block;
    }
    
    .form-control {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
        border-radius: 6px;
        box-sizing: border-box;
    }
    
    textarea.form-control {
        min-height: 100px;
        resize: vertical;
    }
    
    /* Button optimizations */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
        width: 100%;
        margin: 5px 0;
        box-sizing: border-box;
        text-align: center;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-group .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Table optimizations */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 10px 0;
    }
    
    table {
        min-width: 600px;
        font-size: 14px;
    }
    
    table th,
    table td {
        padding: 8px 6px;
        white-space: nowrap;
    }
    
    /* Task list mobile optimization */
    .task-list {
        padding: 0;
    }
    
    .task-item {
        padding: 12px;
        margin: 8px 0;
        border-radius: 6px;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .task-item-content {
        width: 100%;
    }
    
    .task-item-actions {
        width: 100%;
        justify-content: space-between;
        margin-top: 8px;
    }
    
    /* Modal optimizations */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0;
    }
    
    /* Stats and metrics mobile optimization */
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
        text-align: center;
    }
    
    .stat-card h4 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .stat-card .stat-value {
        font-size: 20px;
    }
    
    /* Search and filter mobile optimization */
    .search-filters {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .search-input {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-group {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Pagination mobile optimization */
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .pagination a,
    .pagination span {
        padding: 8px 12px;
        font-size: 14px;
        min-width: 40px;
        text-align: center;
    }
}

/* Extra small devices optimization */
@media (max-width: 480px) {
    /* Further container adjustments */
    .container {
        padding: 8px;
    }
    
    /* Header further optimization */
    .header h1 {
        font-size: 18px;
    }
    
    /* Dashboard cards stack vertically */
    .dashboard-card {
        padding: 12px;
    }
    
    /* Project cards further optimization */
    .project-card {
        padding: 12px;
    }
    
    /* Form controls larger touch targets */
    .form-control {
        padding: 14px;
        font-size: 16px;
    }
    
    /* Buttons larger touch targets */
    .btn {
        padding: 14px 20px;
        font-size: 16px;
    }
    
    /* Stats grid single column on very small screens */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Table further optimization */
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 6px 4px;
    }
    
    /* Modal full screen on small devices */
    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        max-height: 100vh;
    }
    
    /* Task items more compact */
    .task-item {
        padding: 10px;
    }
    
    /* Navigation more compact */
    .nav a {
        padding: 10px;
        font-size: 14px;
    }
}

/* Landscape orientation optimization for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ===== TASK PAGE SPECIFIC STYLES ===== */

/* Kanban Board Styles */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
    padding: 20px 0;
}

.kanban-column {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    min-height: 400px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.kanban-column:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

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

.kanban-column-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.kanban-column-count {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.kanban-tasks {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Task Card Styles */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

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

.task-card-title {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

.task-card-priority {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}

.priority-1 { background: #d4edda; color: #155724; }
.priority-2 { background: #fff3cd; color: #856404; }
.priority-3 { background: #f8d7da; color: #721c24; }
.priority-4 { background: #dc3545; color: white; }

.task-card-description {
    color: #000000;
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #f1f3f4;
}

.task-card-assignee {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-card-due-date {
    font-weight: 500;
}

.task-card-due-date.overdue {
    color: #dc3545;
    font-weight: 600;
}

/* Status Indicator Styles */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-todo {
    background: #e3f2fd;
    color: #1565c0;
}

.status-in_progress {
    background: #fff3e0;
    color: #ef6c00;
}

.status-review {
    background: #f3e5f5;
    color: #7b1fa2;
}

.status-completed {
    background: #e8f5e8;
    color: #2e7d32;
}

.status-blocked {
    background: #ffebee;
    color: #c62828;
}

/* Task Assignment Select */
.task-assignment-select {
    padding: 6px 10px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
}

.task-assignment-select:hover {
    border-color: #667eea;
}

.task-assignment-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Filters Section Styles */
.filters-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.filters-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #495057;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

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

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.search-input {
    padding: 8px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
    background: white;
    color: #495057;
    transition: all 0.2s ease;
    min-width: 200px;
}

.search-input:hover {
    border-color: #667eea;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #495057;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Task List View Styles */
.task-list-item {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.task-list-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #667eea;
}

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

.task-list-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 5px 0;
}

.task-list-project {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 500;
}

.task-list-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.task-list-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

.task-list-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #6c757d;
}

.task-list-meta-item i {
    width: 16px;
    text-align: center;
    color: #667eea;
}

/* Task Form Styles */
.task-form {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #e9ecef;
}

.task-form-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f3f4;
}

.task-form-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.completion-notes-section {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.completion-notes-section.hidden {
    display: none;
}

/* View Toggle Buttons */
.view-options {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.view-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    text-decoration: none;
    color: #6c757d;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.view-btn:hover {
    border-color: #667eea;
    color: #667eea;
    background: #f8f9fa;
}

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

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn,
    .form-control,
    .nav a,
    .task-item,
    .project-card,
    .task-card,
    .filter-select,
    .search-input {
        min-height: 44px;
    }
    
    /* Remove hover effects on touch devices */
    .btn:hover,
    .nav a:hover,
    .project-card:hover,
    .task-item:hover,
    .task-card:hover {
        transform: none;
        box-shadow: none;
    }
    
    /* Better focus states for accessibility */
    .btn:focus,
    .form-control:focus,
    .nav a:focus,
    .filter-select:focus,
    .search-input:focus {
        outline: 2px solid #667eea;
        outline-offset: 2px;
    }
}