/**
 * Kanban PM - Main Stylesheet
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0b109a;
    --secondary-color: #0091fc;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #06b6d4;
    --light-bg: #f5f7fa;
    --border-color: #e0e0e0;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--light-bg);
    color: var(--text-primary);
    height: 100%;
}

/* ===== LOGIN PAGE ===== */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    padding: 40px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* ===== APP CONTAINER ===== */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 20px;
    padding: 0 10px;
}

.nav-section-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    padding: 0 10px;
    margin-bottom: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s;
    font-size: 14px;
}

.nav-link:hover {
    background-color: var(--light-bg);
    color: var(--primary-color);
}

.nav-link.active {
    background-color: rgba(11, 16, 154, 0.1);
    color: var(--primary-color);
    font-weight: 600;
}

.nav-icon {
    font-size: 18px;
}

.nav-link.small {
    font-size: 12px;
    padding: 8px 10px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    background-color: var(--light-bg);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-email {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 8px 12px;
    background-color: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.header-top {
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.header-top h1 {
    font-size: 28px;
    color: var(--text-primary);
    flex: 1;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.header-top > div:first-child {
    flex: 1;
}

.project-description {
    font-size: 14px;
    color: var(--text-secondary);
}

/* ===== CONTENT AREA ===== */
.main-content > *:not(.header-top) {
    overflow-y: auto;
    padding: 10px;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0a0e78;
}

.btn-secondary {
    background-color: white;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background-color: var(--light-bg);
    border-color: var(--text-secondary);
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-link {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 12px;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: var(--primary-color);
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    color: #166534;
    margin: 10px;
    border-left-color: var(--success-color);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
    border-left-color: var(--danger-color);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #78350f;
    border-left-color: var(--warning-color);
}

.alert-info {
    background-color: rgba(6, 182, 212, 0.1);
    color: #0c4a6e;
    border-left-color: var(--info-color);
}

/* ===== FORMS ===== */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-group .text-editor {
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s;
    min-height: 100px;
    line-height: 1.5;
    outline: none;
    word-wrap: break-word;
    white-space: pre-wrap;
}

.form-group .text-editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
}

.form-group .text-editor:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(11, 16, 154, 0.1);
}

.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(11, 16, 154, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background-color: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: rgba(11, 16, 154, 0.05);
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ===== DASHBOARD ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    height: 110px;
    text-align: center;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    font-size: 28px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.dashboard-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-item {
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    border-left: 3px solid var(--secondary-color);
}

.project-item:hover {
    background-color: #ecf0fa;
    border-left-color: var(--primary-color);
}

.project-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 8px;
    gap: 10px;
}

.project-item h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.project-item p {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.project-item-footer {
    font-size: 11px;
    color: var(--text-secondary);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 18px;
    color: var(--secondary-color);
    flex-shrink: 0;
}

.activity-content p {
    font-size: 13px;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.activity-content small {
    color: var(--text-secondary);
}

/* ===== PROJECTS GRID ===== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(314px, 1fr));
    gap: 20px;
}

.project-card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    min-height: 350px;
}

.project-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-6px);
    border-color: #e0e0e0;
}

.project-card-priority-bar {
    height: 4px;
    background: #6366f1;
    width: 100%;
}

.project-card.priority-low .project-card-priority-bar {
    background: #3b82f6;
}

.project-card.priority-medium .project-card-priority-bar {
    background: #f59e0b;
}

.project-card.priority-high .project-card-priority-bar {
    background: #ef4444;
}

.project-card.priority-urgent .project-card-priority-bar {
    background: #dc2626;
}

.project-card-inner {
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
}

.project-card-top {
    flex: 1;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
}

.project-card-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: var(--text-primary);
    flex: 1;
    line-height: 1.2;
    word-break: break-word;
}

.priority-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    flex-shrink: 0;
}

.priority-badge.badge-low {
    background-color: #dbeafe;
    color: #1e40af;
}

.priority-badge.badge-medium {
    background-color: #fef3c7;
    color: #92400e;
}

.priority-badge.badge-high {
    background-color: #fee2e2;
    color: #7f1d1d;
}

.priority-badge.badge-urgent {
    background-color: #fecaca;
    color: #7f1d1d;
    animation: pulse 2s infinite;
}

.project-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.project-meta:empty {
    display: none;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

.meta-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 12px;
}

.meta-value {
    color: var(--text-primary);
    font-weight: 600;
}

.task-status-counts {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--text-primary);
}

.status-count {
    font-size: 11px;
    padding: 4px 8px;
    background-color: #f9fafb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.status-count.status-todo {
    color: #6c757d;
}

.status-count.status-in-progress {
    color: #0d6efd;
}

.status-count.status-review {
    color: #fd7e14;
}

.status-count.status-done {
    color: #198754;
}

.project-card-footer {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.btn-card {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 10px !important;
    border-radius: 6px;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-card span {
    font-size: 12px;
}

.btn-card.btn-primary {
    background-color: #6366f1;
    color: white;
}

.btn-card.btn-primary:hover {
    background-color: #4f46e5;
}

.btn-card.btn-secondary {
    background-color: #e5e7eb;
    color: #374151;
}

.btn-card.btn-secondary:hover {
    background-color: #d1d5db;
}

.btn-card.btn-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.btn-card.btn-danger:hover {
    background-color: #fecaca;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.9;
    }
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-low {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.badge-medium {
    background-color: rgba(0, 145, 252, 0.1);
    color: #0091fc;
}

.badge-high {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-urgent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== KANBAN BOARD ===== */
.kanban-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.kanban-column {
    flex: 0 0 320px;
    background-color: #f9fafb;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.column-header {
    padding: 15px;
    background-color: white;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.column-header h3 {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.task-count {
    background-color: var(--light-bg);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.column-tasks {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sortable-ghost {
    opacity: 0.4;
    background-color: #e5e7eb;
}

/* ===== TASK CARDS ===== */
.task-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    box-shadow: var(--shadow-sm);
    cursor: move;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--secondary-color);
}

/* Disable move cursor for Done section tasks */
.task-card[data-status="Done"] {
    cursor: default;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 8px;
    margin-bottom: 8px;
}

.task-card-header h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.priority-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.priority-low {
    color: #22c55e;
}

.priority-medium {
    color: #0091fc;
}

.priority-high {
    color: #f59e0b;
}

.priority-urgent {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.task-description {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 11px;
}

.assigned-user {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--light-bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.user-avatar-small {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}

.due-date {
    background-color: rgba(6, 182, 212, 0.1);
    color: #0c4a6e;
    padding: 4px 8px;
    border-radius: 4px;
}

.due-date.overdue {
    background-color: rgba(239, 68, 68, 0.1);
    color: #7f1d1d;
}

.image-badge {
    background-color: rgba(245, 158, 11, 0.1);
    color: #b45309;
    padding: 4px 8px;
    border-radius: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
    border-top: 1px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

.task-card:hover .task-actions {
    opacity: 1;
}

.task-action {
    flex: 1;
    text-align: center;
    text-decoration: none;
    font-size: 16px;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s;
}

.task-action:hover {
    background-color: var(--light-bg);
}

.task-action-delete:hover {
    background-color: #fee2e2;
    color: #dc2626;
}

/* ===== MODALS ===== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-image {
    max-width: fit-content;
    max-height: 90vh;
    padding: 0;
    background: transparent;
    position: relative;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 18px;
    margin: 0;
}

.modal-close {
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background-color: var(--light-bg);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* ===== TASK VIEW ===== */
.task-view-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}

.task-view-main {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.task-view-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.task-section {
    margin-bottom: 30px;
}

.task-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.task-section p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
}

.info-row label {
    font-weight: 600;
    color: var(--text-secondary);
}

.status-badge {
    background-color: var(--light-bg);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
}

.assignee {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 1rem;
}

.assignee .user-avatar {
    width: 48px;
    height: 48px;
}

.assignee p {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
}

.assignee small {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
}

.task-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.task-image {
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.task-image img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.2s;
}

.task-image:hover img {
    transform: scale(1.05);
}

.images-section {
    margin-top: 30px;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--light-bg);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    cursor: pointer;
    transition: filter 0.2s;
}

.image-item img:hover {
    filter: brightness(0.9);
}

.image-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px;
    display: flex;
    gap: 4px;
    justify-content: center;
    transform: translateY(100%);
    transition: transform 0.2s;
}

.image-item:hover .image-actions {
    transform: translateY(0);
}

.img-action {
    color: white;
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.img-action:hover {
    background-color: var(--danger-color);
}

.upload-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 0;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px 8px 0 0;
    border-bottom: 1px solid var(--border-color);
}

.upload-form input[type="file"] {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.upload-form small {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.paste-area {
    padding: 30px 20px;
    background-color: #fafafa;
    border-top: 1px solid var(--border-color);
    cursor: text;
    transition: all 0.2s;
    border-radius: 0 0 8px 8px;
}

.paste-area:hover {
    background-color: #f5f5f5;
}

.paste-area:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: -2px;
}

.paste-area.drag-over {
    background-color: rgba(11, 16, 154, 0.1);
    border-color: #6366f1;
}

/* ===== ADMIN SECTION ===== */
.admin-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.admin-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
}

.admin-form {
    background-color: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
}

.users-table,
.roles-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th,
.roles-table th {
    background-color: var(--light-bg);
    padding: 12px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.users-table td,
.roles-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.users-table tr:hover,
.roles-table tr:hover {
    background-color: var(--light-bg);
}

.users-table select {
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
}

.role-descriptions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.role-desc {
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 8px;
    border-left: 3px solid var(--secondary-color);
}

.role-desc h4 {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--primary-color);
}

.role-desc p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.info-box {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.info-box h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

/* ===== COMMENTS SECTION ===== */
.comments-container {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.comments-container h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.comment {
    background-color: var(--light-bg);
    border-radius: 8px;
    padding: 15px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.comment-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
}

.comment-author-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.comment-timestamp {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-line;
    word-break: break-word;
    margin-bottom: 12px;
}

.comment-replies .comment {
    background: #fff;
}

.comment-replies {
    border: none !important;
}

.comment-actions {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.btn-reply {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s;
}

.btn-reply:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.edit-btn {
    background: none;
    border: none;
    color: #17a2b8;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s;
    font-size: 12px;
}

.edit-btn:hover {
    color: #138496;
    text-decoration: underline;
}

.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s;
    font-size: 12px;
}

.delete-btn:hover {
    color: #c82333;
    text-decoration: underline;
}

.modal-form {
    width: 90%;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-form h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--text-primary);
}

.modal-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 120px;
}

.modal-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 103, 214, 0.1);
}

.comment-replies {
    margin-top: 15px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.comment-reply {
    background-color: white;
    border-radius: 6px;
    padding: 12px;
    border-left: 2px solid var(--secondary-color);
}

.reply-form {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    min-height: 80px;
    margin-bottom: 10px;
}

.reply-form-actions {
    display: flex;
    gap: 8px;
}

.btn-submit-reply {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-submit-reply:hover {
    background-color: var(--primary-color-dark);
}

.btn-cancel-reply {
    padding: 8px 16px;
    background-color: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-cancel-reply:hover {
    background-color: var(--light-bg);
}

.comment-form-section {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
}

.comment-form-section h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.comment-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 12px;
}

.comment-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 103, 214, 0.1);
}

.btn-comment-submit {
    padding: 10px 24px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.btn-comment-submit:hover {
    background-color: var(--primary-color-dark);
}

.btn-comment-submit:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
}

.no-comments {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 14px;
    background-color: var(--light-bg);
    border-radius: 8px;
    margin-bottom: 20px;
}

/* ===== PROFILE PAGE ===== */
.user-profile-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
}

.user-profile-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.profile-container {
    padding: 20px;
}

.profile-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.profile-card h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--text-primary);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.profile-picture-display {
    position: relative;
}

.profile-picture-display img,
.profile-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 48px;
}

.picture-upload-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-form .form-group label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.profile-form .form-group input,
.profile-form .form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color 0.2s;
}

.profile-form .form-group input:focus,
.profile-form .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(51, 103, 214, 0.1);
}

.profile-form .form-group small {
    font-size: 12px;
    color: var(--text-secondary);
}

.profile-form .btn {
    align-self: flex-start;
    padding: 10px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
}

.profile-form .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.profile-form .btn-primary:hover {
    background-color: var(--primary-color-dark);
}

.profile-form .btn-primary:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
}

.profile-form .btn-secondary {
    background-color: #f0f0f0;
    color: var(--text-primary);
}

.profile-form .btn-secondary:hover {
    background-color: #e0e0e0;
}

.profile-form .btn-danger {
    background-color: #dc3545;
    color: white;
}

.profile-form .btn-danger:hover {
    background-color: #c82333;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 500;
        max-height: 60px;
        overflow: hidden;
    }

    .sidebar-nav {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        margin-bottom: 60px;
    }

    .kanban-board {
        flex-wrap: wrap;
    }

    .kanban-column {
        flex: 0 0 100%;
        max-height: 400px;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-sections {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .task-view-container {
        grid-template-columns: 1fr;
    }

    .role-descriptions {
        grid-template-columns: 1fr;
    }

    .task-images-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .project-card-inner {
        padding: 16px;
        gap: 12px;
    }

    .project-card-header h3 {
        font-size: 16px;
    }

    .btn-card {
        font-size: 12px;
        padding: 8px 10px !important;
    }

    .project-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .header-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        max-width: 100%;
    }

    .login-box {
        padding: 20px;
    }
}

hr {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 20px 0;
}
