:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2c3e50;
    --secondary-dark: #1a252f;
    --success-color: #27ae60;
    --success-light: #2ecc71;
    --warning-color: #e67e22;
    --warning-light: #f39c12;
    --danger-color: #e74c3c;
    --danger-light: #c0392b;
    --light-bg: #f5f7fa;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.15);
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--light-bg);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: var(--shadow-lg);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

header h1 {
    font-size: 1.3rem;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-sm);
    box-shadow: none;
}

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

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    display: inline-block;
    font-size: 0.95rem;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

main {
    padding: 2rem 0;
    min-height: calc(100vh - 180px);
}

footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white;
    text-align: center;
    padding: 1.2rem 0;
    margin-top: 2rem;
}

.flash-messages {
    margin-bottom: 1.5rem;
}

.flash {
    padding: 12px 18px;
    border-radius: var(--border-radius);
    margin-bottom: 10px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
    background-color: #e3f2fd;
    color: #1565c0;
}

.flash.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745;
}

.flash.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
}

.login-form,
.register-form,
.edit-user-form,
.create-project,
.create-task {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.create-project {
    max-width: 800px;
}

.login-form h2,
.register-form h2,
.edit-user-form h2,
.create-project h2,
.create-task h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 12px;
}

.login-form h2::after,
.register-form h2::after,
.edit-user-form h2::after,
.create-project h2::after,
.create-task h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    border-radius: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 15px;
    transition: var(--transition);
    font-family: inherit;
    min-height: 44px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input:disabled {
    background-color: var(--gray-100);
    cursor: not-allowed;
}

button,
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
    min-height: 44px;
}

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

button:active,
.btn:active {
    transform: translateY(0);
}

.cancel-btn {
    background: linear-gradient(135deg, var(--gray-600) 0%, var(--gray-700) 100%);
}

.back-btn {
    background: linear-gradient(135deg, var(--danger-color) 0%, var(--danger-light) 100%);
}

.register-btn {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
    width: 100%;
    margin-top: 10px;
}

.dashboard h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.8rem;
}

.user-token-info {
    background: white;
    padding: 1.2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.user-token-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.token-display {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0.5rem 0;
    letter-spacing: 1px;
    font-family: 'Courier New', monospace;
    background-color: var(--gray-100);
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius);
    display: inline-block;
    word-break: break-all;
}

.token-role {
    margin: 0.5rem 0 0 0;
    color: var(--gray-700);
    font-size: 0.95rem;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
}

.stat-card h3 {
    font-size: 0.8rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section {
    margin-bottom: 2rem;
}

.section h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    padding-bottom: 0.6rem;
    border-bottom: 3px solid var(--primary-color);
    font-weight: 600;
    font-size: 1.3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h3 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.section-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.toggle-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.toggle-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    font-size: 0.9rem;
    color: var(--gray-700);
    white-space: nowrap;
}

.filter-group select {
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    min-width: 150px;
}

.projects-list,
.tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.project-card,
.task-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid;
}

.project-card:hover,
.task-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.project-card h4,
.task-card h4 {
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.project-card p,
.task-card p {
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.5;
}

.project-card .btn,
.task-card .btn {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    padding: 8px 14px;
}

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

.status-completed {
    border-left-color: var(--primary-color);
}

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

.project-detail h2,
.admin-users h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.8rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    background: white;
    padding: 1.2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.info-item:hover {
    box-shadow: var(--shadow);
}

.info-item strong {
    display: block;
    color: var(--gray-600);
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-item p {
    color: var(--gray-800);
    font-weight: 500;
    font-size: 1rem;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.status-badge.status-active {
    background-color: #d4f1e5;
    color: var(--success-color);
}

.status-badge.status-completed {
    background-color: #d6eaf8;
    color: var(--primary-color);
}

.status-badge.status-paused {
    background-color: #fdebd0;
    color: var(--warning-color);
}

.project-description,
.project-result,
.project-team,
.project-tasks {
    margin-bottom: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.project-description h3,
.project-result h3,
.project-team h3,
.project-tasks h3 {
    margin-bottom: 1rem;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.2rem;
    border-bottom: none;
}

.team-list {
    list-style: none;
}

.team-list li {
    padding: 0.8rem;
    border-bottom: 1px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.team-list li:last-child {
    border-bottom: none;
}

.tasks-table,
.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tasks-table th,
.tasks-table td,
.users-table th,
.users-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.tasks-table th,
.users-table th {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    font-weight: 600;
    color: var(--gray-800);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.tasks-table tbody tr:hover,
.users-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.task-row {
    cursor: pointer;
}

.task-row:hover {
    background-color: rgba(52, 152, 219, 0.1) !important;
}

.tasks-table select {
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--gray-300);
    min-height: 36px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.actions-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
    gap: 10px;
    flex-wrap: wrap;
}

.role-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.role-admin {
    background-color: #ffebee;
    color: #c62828;
}

.role-manager {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.role-supervisor {
    background-color: #fff3e0;
    color: #ef6c00;
}

.role-worker {
    background-color: #e3f2fd;
    color: #1565c0;
}

.inline-form {
    display: inline-block;
    margin-left: 6px;
}

.small-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-height: 36px;
}

.delete-btn {
    background: linear-gradient(135deg, #e57373 0%, #ef5350 100%);
}

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
}

small {
    display: block;
    color: var(--gray-600);
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.half-width {
    flex: 1;
    min-width: 0;
}

.team-members {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.6rem;
    max-height: 220px;
    overflow-y: auto;
    padding: 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    background-color: var(--gray-100);
}

.team-member {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 6px;
    border-radius: var(--border-radius-sm);
}

.team-member input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.status-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.status-select {
    padding: 6px 10px;
    border-radius: var(--border-radius-sm);
    border: 2px solid var(--gray-300);
    font-size: 0.9rem;
    min-height: 36px;
}

.register-link {
    margin-top: 1.5rem;
    text-align: center;
    padding-top: 1.2rem;
    border-top: 1px solid var(--gray-200);
}

.register-link p {
    margin-bottom: 10px;
    color: var(--gray-600);
}

.no-data {
    color: var(--gray-500);
    font-style: italic;
    padding: 1rem 0;
}

.project-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--gray-200);
    padding-bottom: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    background: transparent;
    color: var(--gray-600);
    border: none;
    padding: 10px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    box-shadow: none;
    white-space: nowrap;
    min-height: 44px;
}

.tab-btn:hover {
    color: var(--primary-color);
    transform: none;
    box-shadow: none;
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.toggle-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 12px 22px;
    border-radius: var(--border-radius);
    cursor: pointer;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow);
    min-height: 44px;
    margin-bottom: 15px;
}

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

.toggle-btn:active {
    transform: translateY(0);
}

.gantt-container {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.gantt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.gantt-header h3 {
    margin: 0;
    color: var(--secondary-color);
    border-bottom: none;
}

.gantt-controls {
    display: flex;
    gap: 6px;
}

.gantt-controls .btn.active {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
}

.gantt-chart {
    position: relative;
    overflow-x: auto;
    min-height: 200px;
    -webkit-overflow-scrolling: touch;
}

.gantt-timeline {
    display: flex;
    border-bottom: 2px solid var(--gray-300);
    padding-bottom: 8px;
    margin-bottom: 8px;
    min-width: max-content;
}

.gantt-timeline-item {
    min-width: 35px;
    text-align: center;
    font-size: 0.7rem;
    color: var(--gray-600);
    border-right: 1px solid var(--gray-200);
    padding: 4px 2px;
}

.gantt-timeline-item.weekend {
    background-color: var(--gray-100);
}

.gantt-timeline-item.today {
    background-color: rgba(52, 152, 219, 0.2);
    font-weight: 600;
    color: var(--primary-color);
}

.gantt-tasks {
    position: relative;
    min-width: max-content;
}

.gantt-row {
    display: flex;
    align-items: center;
    height: 45px;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.gantt-task-label {
    width: 160px;
    min-width: 160px;
    padding: 0 10px;
    font-weight: 500;
    color: var(--gray-800);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: white;
    position: sticky;
    left: 0;
    z-index: 10;
    border-right: 2px solid var(--gray-300);
    font-size: 0.85rem;
}

.gantt-task-bar-container {
    flex: 1;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.gantt-task-bar {
    position: absolute;
    height: 28px;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    min-width: 35px;
    box-shadow: var(--shadow-sm);
    padding: 0 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-task-bar:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow);
    z-index: 20;
}

.gantt-task-bar.status-active {
    background: linear-gradient(135deg, var(--success-color), var(--success-light));
}

.gantt-task-bar.status-completed {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.gantt-task-bar.status-paused {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
}

.gantt-legend {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--gray-200);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 8px;
}

.legend-color.status-active {
    background: linear-gradient(135deg, var(--success-color), var(--success-light));
}

.legend-color.status-completed {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.legend-color.status-paused {
    background: linear-gradient(135deg, var(--warning-color), var(--warning-light));
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--secondary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-600);
    padding: 0;
    line-height: 1;
    box-shadow: none;
    min-height: auto;
}

.modal-close:hover {
    color: var(--gray-800);
    transform: none;
    box-shadow: none;
}

.modal-body {
    padding: 1.5rem;
}

.task-history {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.task-history h4 {
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-size: 1rem;
}

.history-list {
    max-height: 150px;
    overflow-y: auto;
}

.history-item {
    padding: 8px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.85rem;
}

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

.history-item .history-date {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.task-reports {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.task-reports h4 {
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
    font-size: 1rem;
}

.reports-list {
    max-height: 200px;
    overflow-y: auto;
}

.report-item {
    padding: 8px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.85rem;
}

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

.report-item .report-comment {
    display: block;
    margin-bottom: 4px;
}

.report-item .report-date {
    color: var(--gray-500);
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
}

.report-item .report-file {
    margin-top: 4px;
}

.profile-page h2 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    color: white;
}

.profile-info h3 {
    margin: 0 0 0.3rem 0;
    color: var(--secondary-color);
}

.profile-username {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    display: block;
}

.profile-section {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.profile-section h3 {
    margin: 0 0 1rem 0;
    color: var(--secondary-color);
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-color);
}

.token-form {
    margin-top: 1rem;
}

.profile-projects-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.profile-project-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    gap: 1rem;
    flex-wrap: wrap;
}

.profile-project-item .project-name {
    font-weight: 500;
    color: var(--gray-800);
}

.directions-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.direction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--gray-100);
    border-radius: var(--border-radius);
}

.direction-name {
    font-weight: 500;
    color: var(--gray-800);
}

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

.direction-form .form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.direction-form input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 15px;
}

.task-files-section {
    margin: 1.5rem 0;
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
}

.task-files-section h4 {
    margin: 0 0 1rem 0;
    color: var(--secondary-color);
}

.files-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background: var(--gray-100);
    border-radius: var(--border-radius-sm);
}

.file-item small {
    margin: 0;
    display: inline;
    font-style: normal;
}

.user-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    overflow: hidden;
}

.user-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-100);
}

.user-card-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
}

.user-card-info h4 {
    margin: 0;
    color: var(--secondary-color);
}

.user-card-username {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.user-card-body {
    padding: 1rem;
}

.user-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.user-card-label {
    color: var(--gray-600);
    font-size: 0.85rem;
}

.user-card-token {
    font-family: monospace;
    color: var(--primary-color);
}

.user-card-actions {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
    }

    nav {
        width: 100%;
        display: none;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding-top: 1rem;
    }

    nav ul li {
        width: 100%;
    }

    nav ul li a {
        display: block;
        padding: 12px;
    }

    .form-row {
        flex-direction: column;
    }

    .half-width {
        width: 100%;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-controls {
        width: 100%;
    }

    .filter-group {
        width: 100%;
    }

    .filter-group select {
        flex: 1;
    }

    .desktop-only {
        display: none;
    }

    .mobile-only {
        display: block;
    }

    .profile-card {
        flex-direction: column;
        text-align: center;
    }

    .gantt-task-label {
        width: 120px;
        min-width: 120px;
    }

    .modal-content {
        max-height: 80vh;
    }
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 100%;
    max-height: 70vh;
    overflow-y: auto;
    position: relative;
}

.modal-content h3 {
    margin-bottom: 16px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.3rem;
    border-bottom: 3px solid var(--danger-color);
    padding-bottom: 8px;
}

.modal-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.modal-content li {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 1rem;
    color: var(--gray-800);
}

.modal-content li:last-child {
    border-bottom: none;
}

.modal-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.modal-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.modal-content button {
    margin-top: 16px;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    background: linear-gradient(135deg, var(--gray-600), var(--gray-700));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

/* File action buttons in reports */
.file-actions {
    display: flex;
    gap: 10px;
    margin: 8px 0;
}



.download-btn {
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.download-btn:hover {
    background-color: var(--warning-color);
    color: var(--white);
}

.report-file small {
    display: block;
    margin-top: 5px;
    color: var(--gray-600);
}

/* Reports Page Styles */
#reports-table-container {
    margin-top: 2rem;
    display: none;
}

#reports-table-container.show {
    display: block;
}

.reports-section {
    margin-bottom: 2rem;
}

.reports-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 10px;
}

.reports-section-header h3 {
    margin-bottom: 0;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 1.3rem;
}

.reports-button {
    background: linear-gradient(135deg, var(--success-color) 0%, var(--success-light) 100%);
}

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

.reports-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.reports-table th,
.reports-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.reports-table th {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--gray-200) 100%);
    font-weight: 600;
    color: var(--gray-800);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.reports-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

.report-status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.report-status-active {
    background-color: #d4f1e5;
    color: var(--success-color);
}

.report-status-completed {
    background-color: #d6eaf8;
    color: var(--primary-color);
}

.report-status-paused {
    background-color: #fdebd0;
    color: var(--warning-color);
}

.report-info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid var(--primary-color);
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
}

.form-control {
    padding: 8px 12px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 0.9rem;
    transition: var(--transition);
    min-width: 180px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#project-search {
    min-width: 200px;
}

@media (max-width: 768px) {
    .section-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-group label {
        margin-bottom: 4px;
    }

    .filter-group select,
    .filter-group input {
        width: 100%;
        min-width: auto;
    }

    #filter-projects-btn,
    #clear-filters-btn {
        width: 100%;
    }
}

/* Team Search Styles */
.team-search-container {
    position: relative;
    width: 100%;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
    font-size: 14px;
}

.search-result-item:hover {
    background-color: var(--gray-100);
    color: var(--primary-color);
}

.search-result-item.no-results {
    color: var(--gray-500);
    font-style: italic;
    cursor: default;
}

.selected-members {
    margin-top: 12px;
    padding: 12px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    min-height: 60px;
}

.no-members {
    color: var(--gray-500);
    font-style: italic;
    text-align: center;
    padding: 12px 0;
}

.selected-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 8px 12px;
    border-radius: var(--border-radius-sm);
    margin-bottom: 8px;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.selected-member:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.member-name {
    flex: 1;
    font-weight: 500;
    color: var(--gray-800);
}

.remove-member-btn {
    background: none;
    border: none;
    color: var(--danger-color);
    font-size: 20px;
    cursor: pointer;
    padding: 0 8px;
    line-height: 1;
    transition: var(--transition);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-member-btn:hover {
    background-color: var(--danger-color);
    color: white;
    transform: none;
}

@media (max-width: 768px) {
    .search-results {
        position: absolute;
        width: 100%;
    }
}

/* Additions for Reports Page */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.row.g-3 {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
}

.row.g-3>* {
    padding-right: 0.5rem;
    padding-left: 0.5rem;
}

.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 15px;
}

@media (min-width: 768px) {
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 15px;
    }

    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
        padding: 0 15px;
    }
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.ms-3 {
    margin-left: 1rem !important;
}

.text-muted {
    color: var(--gray-600) !important;
}

.text-white {
    color: white !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Missing Card styles used in HTML */
.card-header {
    padding: 1rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.card-body {
    padding: 1.5rem;
}

.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: #fff;
    background-clip: border-box;
    border: 1px solid rgba(0, 0, 0, .125);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

/* Button variants */
.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary.active {
    background: var(--primary-color);
    color: white;
}

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

.btn-secondary {
    background: var(--gray-600);
    color: white;
}

.btn-group {
    display: inline-flex;
    vertical-align: middle;
}

.btn-group .btn {
    border-radius: 0;
    margin: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.btn-group .btn:last-child {
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
}

/* Utilities */
.d-none {
    display: none !important;
}

.alert {
    position: relative;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}