/* KANBAN REMOTE - STYLES */
:root {
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success-500: #22c55e;
    --warning-500: #f59e0b;
    --danger-500: #ef4444;
    --purple-500: #a855f7;
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;
    --border-color: #e2e8f0;
    --shadow-color: rgba(15, 23, 42, 0.08);
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --column-width: 320px;
    --font-family: 'Inter', sans-serif;
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
}

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

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: width var(--transition-normal);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.logo .material-symbols-rounded {
    font-size: 28px;
    color: var(--primary-500);
}

.logo h1 {
    font-size: 1.2rem;
    background: linear-gradient(135deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar.collapsed .logo h1 {
    opacity: 0;
    width: 0;
}

.toggle-sidebar {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
}

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

.sidebar.collapsed .toggle-sidebar .material-symbols-rounded {
    transform: rotate(180deg);
}

.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 12px;
    margin-bottom: 8px;
    display: block;
}

.sidebar.collapsed .nav-label {
    opacity: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    margin-bottom: 4px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary-600), #1d4ed8);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.nav-item .material-symbols-rounded {
    font-size: 22px;
}

.sidebar.collapsed .nav-item span:not(.material-symbols-rounded) {
    opacity: 0;
    width: 0;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: var(--radius-md);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
}

.user-role {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

.sidebar.collapsed~.main-content {
    margin-left: var(--sidebar-collapsed);
}

.header {
    background: var(--bg-secondary);
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

.project-info h2 {
    font-size: 1.25rem;
    font-weight: 700;
}

.project-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--success-500);
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success-500);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
}

.search-box:focus-within {
    border-color: var(--primary-500);
    background: var(--bg-secondary);
}

.search-box .material-symbols-rounded {
    color: var(--text-tertiary);
    font-size: 20px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-size: 0.9rem;
    color: var(--text-primary);
    width: 200px;
}

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

.action-btn {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    position: relative;
}

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

.action-btn.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
}

.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--danger-500);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
}

.btn-primary {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn-secondary:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
}

/* Kanban Board */
.kanban-container {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
}

.kanban-board {
    display: flex;
    gap: 20px;
    min-width: max-content;
    padding-bottom: 24px;
}

.kanban-column {
    width: var(--column-width);
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 160px);
}

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

.column-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.column-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.column-icon .material-symbols-rounded {
    font-size: 18px;
    color: white;
}

.column-icon.backlog {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
}

.column-icon.todo {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.column-icon.inprogress {
    background: linear-gradient(135deg, var(--warning-500), #d97706);
}

.column-icon.review {
    background: linear-gradient(135deg, var(--purple-500), #9333ea);
}

.column-icon.done {
    background: linear-gradient(135deg, var(--success-500), #16a34a);
}

.column-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
}

.task-count {
    background: var(--bg-secondary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.column-menu {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
}

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

.column-content {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.column-content::-webkit-scrollbar {
    width: 6px;
}

.column-content::-webkit-scrollbar-track {
    background: transparent;
}

.column-content::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

[data-theme="dark"] .column-content::-webkit-scrollbar-thumb {
    background: var(--gray-600);
}

.add-task-column {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px;
    background: none;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    margin: 12px;
    cursor: pointer;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.add-task-column:hover {
    border-color: var(--primary-500);
    color: var(--primary-600);
    background: rgba(59, 130, 246, 0.05);
}

/* Task Card */
.task-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: grab;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px var(--shadow-color);
    animation: slideUp 0.3s ease;
}

.task-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow-color);
    border-color: #93c5fd;
}

.task-card.dragging {
    opacity: 0.5;
    cursor: grabbing;
}

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

.task-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

.task-category.development {
    background: rgba(59, 130, 246, 0.15);
    color: var(--primary-600);
}

.task-category.design {
    background: rgba(168, 85, 247, 0.15);
    color: #9333ea;
}

.task-category.meeting {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.task-category.documentation {
    background: rgba(34, 197, 94, 0.15);
    color: #16a34a;
}

.task-category.testing {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

.task-category.other {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.task-priority {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-priority.low {
    background: var(--success-500);
}

.task-priority.medium {
    background: var(--warning-500);
}

.task-priority.high {
    background: #f97316;
}

.task-priority.urgent {
    background: var(--danger-500);
    animation: pulse-urgent 1s infinite;
}

@keyframes pulse-urgent {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

.task-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.4;
}

.task-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

.task-tag {
    font-size: 0.7rem;
    padding: 3px 8px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border-radius: 20px;
}

.task-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

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

.assignee-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #60a5fa, #c084fc);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

.assignee-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.task-due {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.task-due .material-symbols-rounded {
    font-size: 16px;
}

.task-due.overdue {
    color: var(--danger-500);
}

.task-due.soon {
    color: var(--warning-500);
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
}

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

.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-normal);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

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

.modal-large {
    max-width: 700px;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
}

.modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.close-modal {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-tertiary);
    border-radius: var(--radius-sm);
}

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

#taskForm {
    padding: 24px;
}

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

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-500);
    background: var(--bg-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.task-detail-content {
    padding: 24px;
}

.detail-section {
    margin-bottom: 24px;
}

.detail-section h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.detail-section p {
    line-height: 1.6;
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meta-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px var(--shadow-color);
    border-left: 4px solid var(--primary-500);
    animation: slideIn 0.3s ease;
    min-width: 300px;
}

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

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

.toast .material-symbols-rounded {
    font-size: 24px;
}

.toast.success .material-symbols-rounded {
    color: var(--success-500);
}

.toast.warning .material-symbols-rounded {
    color: var(--warning-500);
}

.toast.error .material-symbols-rounded {
    color: var(--danger-500);
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
}

.toast-close {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--text-tertiary);
}

.column-content.drag-over {
    background: rgba(59, 130, 246, 0.1);
    border: 2px dashed #60a5fa;
    border-radius: var(--radius-md);
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--text-tertiary);
}

.empty-state .material-symbols-rounded {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-btn {
        display: flex;
    }

    .header {
        flex-wrap: wrap;
        gap: 16px;
    }

    .search-box {
        width: 100%;
        order: 3;
    }

    .search-box input {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .detail-meta {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --column-width: 90vw;
    }

    .kanban-container {
        padding: 16px;
    }
}

/* Page Content Styles */
.page-content {
    padding: 24px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-header {
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

/* Calendar Styles */
.calendar-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

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

.calendar-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-nav {
    background: var(--bg-tertiary);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.btn-nav:hover {
    background: var(--primary-500);
    color: white;
}

.calendar-grid {
    margin-bottom: 24px;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    position: relative;
    transition: var(--transition-fast);
}

.calendar-day:hover {
    background: var(--bg-tertiary);
}

.calendar-day.today {
    background: var(--primary-500);
    color: white;
    font-weight: 600;
}

.calendar-day.has-tasks::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warning-500);
    position: absolute;
    bottom: 4px;
}

.calendar-day.selected {
    background: var(--primary-600);
    color: white;
}

.calendar-day.other-month {
    color: var(--text-tertiary);
    opacity: 0.5;
}

.calendar-tasks h4 {
    font-size: 1rem;
    margin-bottom: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.calendar-task-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.calendar-task-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px var(--shadow-color);
}

.calendar-task-item .task-priority {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Analytics Styles */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: var(--transition-fast);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.stat-icon.blue {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.stat-icon.green {
    background: linear-gradient(135deg, var(--success-500), #16a34a);
}

.stat-icon.orange {
    background: linear-gradient(135deg, var(--warning-500), #d97706);
}

.stat-icon.red {
    background: linear-gradient(135deg, var(--danger-500), #dc2626);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.chart-card h4 {
    font-size: 1rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chart-bar-label {
    width: 80px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.chart-bar-track {
    flex: 1;
    height: 24px;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    padding-left: 12px;
    font-size: 0.75rem;
    color: white;
    font-weight: 600;
}

.chart-bar-fill.blue {
    background: linear-gradient(90deg, var(--primary-500), #60a5fa);
}

.chart-bar-fill.green {
    background: linear-gradient(90deg, var(--success-500), #4ade80);
}

.chart-bar-fill.orange {
    background: linear-gradient(90deg, var(--warning-500), #fbbf24);
}

.chart-bar-fill.red {
    background: linear-gradient(90deg, var(--danger-500), #f87171);
}

.chart-bar-fill.purple {
    background: linear-gradient(90deg, var(--purple-500), #c084fc);
}

.chart-bar-fill.gray {
    background: linear-gradient(90deg, var(--gray-500), var(--gray-400));
}

/* Team Styles */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.team-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
}

.team-card h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.team-card .role {
    color: var(--text-tertiary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.team-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.team-stat {
    text-align: center;
}

.team-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-500);
}

.team-stat-label {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.team-card-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

/* Discussion Styles */
.discussion-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px var(--shadow-color);
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
}

.discussion-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.message {
    display: flex;
    gap: 12px;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    flex-shrink: 0;
}

.message-content {
    flex: 1;
}

.message-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.message-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.message-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.message-text {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.5;
}

.message-text .mention {
    color: var(--primary-500);
    font-weight: 600;
}

.discussion-input {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
    background: var(--bg-tertiary);
    border-top: 1px solid var(--border-color);
}

.discussion-input input {
    flex: 1;
    padding: 14px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-secondary);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.discussion-input input:focus {
    outline: none;
    border-color: var(--primary-500);
}

/* Mention Dropdown Autocomplete */
.discussion-input-wrapper {
    position: relative;
}

.mention-dropdown {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 24px;
    right: 24px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 -4px 20px var(--shadow-color);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    margin-bottom: 8px;
}

.mention-dropdown.active {
    display: block;
    animation: slideUp 0.2s ease;
}

.mention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mention-item:hover,
.mention-item.selected {
    background: var(--primary-100);
}

[data-theme="dark"] .mention-item:hover,
[data-theme="dark"] .mention-item.selected {
    background: rgba(59, 130, 246, 0.2);
}

.mention-item .mention-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--purple-500));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.mention-item .mention-info {
    flex: 1;
}

.mention-item .mention-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.mention-item .mention-role {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* Projects Styles */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.project-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
    transition: var(--transition-fast);
    cursor: pointer;
    border: 2px solid transparent;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px var(--shadow-color);
}

.project-card.active {
    border-color: var(--primary-500);
}

.project-card h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.project-card .project-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.categories-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 4px 20px var(--shadow-color);
}

.categories-section h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.categories-section>p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 20px;
}

.category-form {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.category-form input {
    flex: 1;
    min-width: 150px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    font-size: 0.9rem;
    color: var(--text-primary);
}

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

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.category-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
}

.category-tag .delete-category {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-tertiary);
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-tag .delete-category:hover {
    color: var(--danger-500);
}

/* Modal for Add Member/Project */
.member-modal-content,
.project-modal-content {
    padding: 24px;
}

.empty-page-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
}

.empty-page-state .material-symbols-rounded {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-page-state h4 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Notification Panel */
.notification-panel {
    position: fixed;
    top: 60px;
    right: 24px;
    width: 360px;
    max-height: 80vh;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    z-index: 250;
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.notification-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.notification-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 600;
}

.close-notif-btn {
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
}

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

.notification-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 16px;
}

.notif-section {
    margin-bottom: 16px;
}

.notif-section h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.notif-item:hover {
    background: var(--primary-100);
    transform: translateX(4px);
}

[data-theme="dark"] .notif-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.notif-item .material-symbols-rounded {
    font-size: 20px;
    color: var(--primary-500);
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item div {
    flex: 1;
}

.notif-item strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.notif-item small {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.notif-item.overdue {
    border-left: 3px solid var(--danger-500);
}

.notif-item.done {
    border-left: 3px solid var(--success-500);
}

.notif-item.mention {
    border-left: 3px solid var(--primary-500);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), transparent);
}

.notif-item .notif-time {
    display: block;
    margin-top: 4px;
    font-size: 0.7rem;
    color: var(--text-tertiary);
}

.notif-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.notif-empty .material-symbols-rounded {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.notif-empty p {
    font-size: 0.9rem;
}

/* Login Screen */
.login-screen {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 50%, #1e1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.login-screen.hidden {
    display: none;
}

.login-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 48px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.login-header {
    margin-bottom: 32px;
    color: white;
}

.login-header .material-symbols-rounded {
    font-size: 56px;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-header h1 {
    font-size: 1.8rem;
    margin: 12px 0 4px;
}

.login-header p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.login-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-lg);
    padding: 32px;
    color: var(--text-primary);
}

.login-form h2 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #1e293b;
}

.login-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.login-form label {
    color: #64748b;
}

.login-form select {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    background: white;
}

/* Password Input */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    font-size: 20px;
    pointer-events: none;
}

.login-form input[type="password"],
.login-form input[type="text"]#loginPassword {
    width: 100%;
    padding: 14px 48px 14px 44px;
    border-radius: var(--radius-md);
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    background: white;
    color: #0f172a;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    font-family: var(--font-family);
}

.login-form input[type="password"]:focus,
.login-form input[type="text"]#loginPassword:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.login-form input[type="password"]::placeholder {
    color: #94a3b8;
}

.toggle-password {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-fast);
}

.toggle-password:hover {
    color: var(--primary-500);
}

.toggle-password .material-symbols-rounded {
    font-size: 20px;
}

/* Login Error Message */
.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 0.85rem;
    margin-bottom: 16px;
    animation: shakeError 0.4s ease;
}

.login-error .material-symbols-rounded {
    font-size: 18px;
    flex-shrink: 0;
}

.login-error.hidden {
    display: none;
}

@keyframes shakeError {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

.login-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    gap: 8px;
}

.login-footer {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

/* Role Badge */
.role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.role-badge.admin {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.role-badge.member {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

/* User Profile in Sidebar */
.user-role-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.logout-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    margin-left: auto;
}

.logout-btn:hover {
    background: var(--bg-tertiary);
    color: var(--danger-500);
}

/* Admin-only elements hidden for members */
.admin-only.hidden {
    display: none !important;
}

/* Task Filter Toggle */
.filter-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
}

.filter-toggle input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary-500);
}

/* Project Card Enhancements */
.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.project-card-header h4 {
    margin: 0;
}

.project-active-badge {
    background: linear-gradient(135deg, var(--success-500), #22c55e);
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.project-archived-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.project-progress {
    margin: 12px 0;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    border-radius: 3px;
    transition: width 0.3s ease;
}

.project-progress span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.project-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.project-card .btn-icon {
    padding: 6px;
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.project-card .btn-icon:hover {
    background: var(--primary-100);
    color: var(--primary-500);
}

.project-card .btn-icon.btn-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-500);
}

.project-card.archived {
    opacity: 0.7;
    border-style: dashed;
}

/* Archived Section */
.archived-section {
    grid-column: 1 / -1;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--border-color);
}

.archived-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 0;
}

.archived-section h3:hover {
    color: var(--text-primary);
}

.archived-projects {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.archived-projects.collapsed {
    display: none;
}

/* ==================== MOBILE RESPONSIVE STYLES ==================== */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .kanban-container {
        gap: 16px;
    }

    .kanban-column {
        min-width: 280px;
    }

    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablet Portrait & Large Mobile */
@media (max-width: 768px) {

    /* Sidebar as overlay */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .sidebar.collapsed {
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 60px rgba(0, 0, 0, 0.6);
    }

    /* Sidebar overlay backdrop - Improved */
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 999;
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
    }

    /* Show hamburger menu */
    .menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    /* Header adjustments - Improved layout */
    .header {
        padding: 12px 12px;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
    }

    .project-info {
        flex: 1;
        min-width: 0;
    }

    .project-info h2 {
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .project-status {
        font-size: 0.7rem;
    }

    .header-right {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }

    /* Search full width - First row in header-right */
    .search-box {
        width: 100%;
        order: -1;
        padding: 8px 12px;
    }

    .search-box input {
        width: 100%;
        font-size: 14px;
    }

    .header-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        width: 100%;
    }

    .header-actions .btn-primary {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
    }

    .header-actions .btn-primary span:not(.material-symbols-rounded) {
        display: inline;
        font-size: 0.85rem;
    }

    .header-actions .action-btn {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .header-left .project-badge {
        display: none;
    }

    /* Kanban horizontal scroll - Improved */
    .kanban-container {
        padding: 12px 8px;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .kanban-container::-webkit-scrollbar {
        display: none;
    }

    .kanban-column {
        min-width: calc(100vw - 24px);
        max-width: calc(100vw - 24px);
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    /* Task cards touch friendly */
    .task-card {
        padding: 14px;
    }

    .task-card h4 {
        font-size: 0.95rem;
    }

    /* Modal adjustments */
    .modal {
        max-width: 95vw;
        max-height: 85vh;
        margin: 16px;
    }

    .modal-header {
        padding: 16px;
    }

    /* Hide toggle sidebar button on mobile */
    .toggle-sidebar {
        display: none;
    }

    .modal-header h3 {
        font-size: 1.1rem;
    }

    #taskForm {
        padding: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    /* Toast on mobile */
    .toast-container {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Calendar grid smaller */
    .calendar-day {
        font-size: 0.8rem;
    }

    .calendar-weekdays {
        font-size: 0.75rem;
    }

    /* Analytics cards */
    .analytics-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    /* Team grid */
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .team-card {
        padding: 16px;
    }

    .team-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Discussion */
    .discussion-input-container {
        padding: 12px;
    }

    .discussion-input-container input {
        font-size: 14px;
    }

    /* Project cards */
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .project-card {
        padding: 16px;
    }

    /* Page content */
    .page-content {
        padding: 16px;
    }

    .page-header h2 {
        font-size: 1.25rem;
    }

    /* Notification panel */
    .notification-panel {
        width: 100%;
        right: 0;
        max-width: 100%;
        border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    }

    /* Login screen */
    .login-card {
        width: 90%;
        max-width: 400px;
        padding: 24px;
        margin: 16px;
    }

    .login-header h1 {
        font-size: 1.5rem;
    }
}

/* Mobile Portrait */
@media (max-width: 480px) {
    :root {
        --column-width: calc(100vw - 16px);
    }

    /* Sidebar - full width on very small screens */
    .sidebar {
        width: 100%;
        max-width: 300px;
    }

    .sidebar-header {
        padding: 16px;
    }

    .sidebar-header h2 {
        font-size: 1.1rem;
    }

    .logo h1 {
        font-size: 1rem;
    }

    /* Header super compact */
    .header {
        padding: 10px;
        gap: 8px;
    }

    .project-info h2 {
        font-size: 0.9rem;
        max-width: 180px;
    }

    .project-status {
        display: none;
    }

    .menu-btn {
        width: 36px;
        height: 36px;
    }

    .search-box {
        padding: 6px 10px;
    }

    .search-box input {
        font-size: 13px;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .header-actions .action-btn {
        width: 36px;
        height: 36px;
    }

    .header-actions .btn-primary {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .header-actions .btn-primary span:not(.material-symbols-rounded) {
        display: none;
    }

    .header-actions .btn-primary .material-symbols-rounded {
        font-size: 20px;
    }

    /* Kanban */
    .kanban-container {
        padding: 8px 4px;
        gap: 8px;
    }

    .kanban-column {
        min-width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
    }

    .column-header {
        padding: 12px;
    }

    .column-header h3 {
        font-size: 0.9rem;
    }

    .column-icon {
        width: 28px;
        height: 28px;
    }

    .column-icon .material-symbols-rounded {
        font-size: 16px;
    }

    .add-task-column {
        padding: 10px;
        font-size: 0.85rem;
        margin: 8px;
    }

    /* Task cards */
    .task-card {
        padding: 12px;
    }

    .task-title {
        font-size: 0.9rem;
    }

    .task-description {
        font-size: 0.8rem;
    }

    .task-tags {
        gap: 4px;
    }

    .task-tag {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .task-category {
        font-size: 0.65rem;
        padding: 3px 6px;
    }

    .task-footer {
        padding-top: 10px;
    }

    .assignee-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .assignee-name {
        font-size: 0.75rem;
    }

    .task-due {
        font-size: 0.7rem;
    }

    /* Modal full screen on mobile - Bottom Sheet Style */
    .modal-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        max-width: 100%;
        max-height: 92vh;
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        animation: slideUpModal 0.3s ease;
    }

    @keyframes slideUpModal {
        from {
            transform: translateY(100%);
        }

        to {
            transform: translateY(0);
        }
    }

    .modal-header {
        padding: 16px;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    }

    .modal-header::before {
        content: '';
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 40px;
        height: 4px;
        background: var(--border-color);
        border-radius: 2px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px;
        font-size: 16px;
        /* Prevent iOS zoom */
    }

    /* Analytics */
    .analytics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 12px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
    }

    .stat-value {
        font-size: 1.3rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* Charts */
    .chart-card {
        padding: 16px;
    }

    .chart-bar-label {
        width: 60px;
        font-size: 0.75rem;
    }

    /* Team */
    .team-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .team-card {
        padding: 14px;
    }

    .team-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 10px;
    }

    .team-card h4 {
        font-size: 0.95rem;
    }

    .team-card .role {
        font-size: 0.75rem;
    }

    .team-stats {
        gap: 16px;
    }

    .team-stat-value {
        font-size: 1rem;
    }

    /* Calendar */
    .calendar-container {
        padding: 16px;
    }

    .calendar-header h3 {
        font-size: 1rem;
    }

    .btn-nav {
        width: 34px;
        height: 34px;
    }

    .calendar-day {
        font-size: 0.75rem;
    }

    /* Discussion */
    .discussion-container {
        padding: 12px;
    }

    .message-content {
        max-width: 85%;
    }

    .message-text {
        font-size: 0.85rem;
        padding: 10px 12px;
    }

    .message-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Projects */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-card {
        padding: 14px;
    }

    /* Sidebar footer user info */
    .sidebar-footer .user-info {
        padding: 12px;
    }

    .sidebar-footer .avatar {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }

    .sidebar-footer .user-name {
        font-size: 0.85rem;
    }

    .sidebar-footer .role-badge {
        font-size: 0.65rem;
    }

    /* Mention dropdown */
    .mention-dropdown {
        max-height: 150px;
        bottom: 100%;
    }

    .mention-item {
        padding: 10px 12px;
    }

    /* Archived section */
    .archived-projects {
        grid-template-columns: 1fr;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .header-left h1 {
        max-width: 120px;
    }

    .kanban-column {
        min-width: 95vw;
    }

    .analytics-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        flex-direction: row;
    }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
    .sidebar {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .toast-container {
        bottom: max(16px, env(safe-area-inset-bottom));
    }

    .modal {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .icon-btn {
        min-width: 44px;
        min-height: 44px;
    }

    .nav-item {
        min-height: 44px;
    }

    .task-card {
        -webkit-tap-highlight-color: transparent;
    }

    /* Disable hover effects for touch */
    .task-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    .stat-card:hover {
        transform: none;
    }

    .team-card:hover {
        transform: none;
    }
}

/* ========================= */
/* USAGE GUIDE PAGE STYLES   */
/* ========================= */

.guide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.guide-section {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-color);
}

.guide-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.guide-section>p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Workflow Diagram */
.workflow-diagram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
}

.workflow-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    min-width: 100px;
}

.step-icon {
    font-size: 2rem;
    margin-bottom: 8px;
}

.step-icon.backlog {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-icon.todo {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-icon.inprogress {
    background: linear-gradient(135deg, var(--warning-500), #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-icon.review {
    background: linear-gradient(135deg, var(--purple-500), #9333ea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-icon.done {
    background: linear-gradient(135deg, var(--success-500), #16a34a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.step-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.step-desc {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.workflow-arrow {
    font-size: 1.5rem;
    color: var(--text-tertiary);
    font-weight: 300;
}

/* Guide Tables */
.guide-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
}

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

.guide-table th,
.guide-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.guide-table th {
    background: var(--bg-tertiary);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.guide-table td {
    color: var(--text-secondary);
    vertical-align: top;
}

.guide-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.guide-table ul {
    margin: 0;
    padding-left: 18px;
}

.guide-table li {
    margin-bottom: 4px;
}

.guide-table.compact td {
    padding: 10px 12px;
}

/* Column Badges */
.column-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.8rem;
    color: white;
}

.column-badge.backlog {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
}

.column-badge.todo {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.column-badge.inprogress {
    background: linear-gradient(135deg, var(--warning-500), #d97706);
}

.column-badge.review {
    background: linear-gradient(135deg, var(--purple-500), #9333ea);
}

.column-badge.done {
    background: linear-gradient(135deg, var(--success-500), #16a34a);
}

/* Priority Badges */
.priority-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.priority-badge.urgent {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-500);
}

.priority-badge.high {
    background: rgba(249, 115, 22, 0.15);
    color: #f97316;
}

.priority-badge.medium {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-500);
}

.priority-badge.low {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-500);
}

/* Guide Cards */
.guide-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.guide-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
}

.guide-card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Tags Example */
.tags-example {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.tag-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 130px;
}

.tag {
    background: var(--bg-tertiary);
    color: var(--primary-600);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

[data-theme="dark"] .tag {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

/* Daily Workflow */
.daily-workflow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.workflow-time {
    display: flex;
    flex-direction: column;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    gap: 8px;
}

.workflow-time .time {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.workflow-time .activity {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Tips Section */
.tips-section {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(168, 85, 247, 0.05));
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tip-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.tip-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Mobile Responsive for Guide Page */
@media (max-width: 768px) {
    .guide-section {
        padding: 16px;
    }

    .workflow-diagram {
        flex-direction: column;
        gap: 12px;
    }

    .workflow-arrow {
        transform: rotate(90deg);
    }

    .workflow-step {
        width: 100%;
        flex-direction: row;
        gap: 12px;
        padding: 12px 16px;
    }

    .step-icon {
        font-size: 1.5rem;
        margin-bottom: 0;
    }

    .workflow-step>div {
        display: flex;
        flex-direction: column;
    }

    .guide-table th,
    .guide-table td {
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .tag-label {
        min-width: 100%;
        margin-bottom: 4px;
    }

    .daily-workflow {
        grid-template-columns: 1fr;
    }
}