* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

html {
    height: 100vh;
}

:root {
    --primary-color: #0A66C2;
    --primary-hover: #004182;
    --primary-light: #EDF3F8;
    --primary-dark: #004182;
    --secondary-color: #0A66C2;
    --accent-color: #0A66C2;
    --success-color: #057642;
    --danger-color: #CC1016;
    --warning-color: #915907;
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-app: #F3F2EF;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8F9FA;
    --bg-card: #FFFFFF;
    --bg-hover: #FAFAFA;
    --border-color: #E0E0E0;
    --border-light: #EBEBEB;
    --shadow-sm: 0 0 0 1px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-2xl: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 16px 24px rgba(0, 0, 0, 0.15);
    --radius-sm: 2px;
    --radius-md: 4px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --transition: all 0.15s ease;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-app);
    height: 100vh;
    color: var(--text-primary);
    line-height: 1.5;
    letter-spacing: 0;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* App Layout */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: visible;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: 0;
    background: transparent;
    padding: 0px 8px;
    width: 100%;
}

.sidebar-logo img {
    background: transparent;
    display: block;
    max-width: 160px;
    height: auto;
}

.sidebar-logo svg {
    width: 28px;
    height: 28px;
    padding: 6px;
    background: var(--primary-color);
    color: white;
    border-radius: var(--radius-md);
    box-shadow: none;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 16px;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

.board-notification-badge {
    background: var(--danger-color);
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    min-width: 18px;
    text-align: center;
    animation: badgePulse 2s infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Sidebar Members */
.sidebar-members {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    flex: 1;
    overflow-y: auto;
}

.members-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 4px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.members-header:hover {
    background: var(--bg-hover);
}

.members-header svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.invite-member-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.invite-member-btn:hover {
    background: var(--bg-hover);
}

.invite-member-btn svg {
    width: 18px;
    height: 18px;
}

.members-toggle {
    transition: transform 0.3s ease;
    color: var(--text-muted) !important;
}

.sidebar-members.collapsed .members-toggle {
    transform: rotate(-90deg);
}

.members-header span {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.members-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 400px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.sidebar-members.collapsed .members-list {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
    border: 1px solid transparent;
}

.member-item:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.member-item.unread {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.member-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    position: relative;
}

.member-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-primary);
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-role {
    font-size: 11px;
    color: var(--text-muted);
}

.member-badge {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.user-info-sidebar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}

.user-avatar-sidebar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.user-avatar-sidebar svg {
    width: 20px;
    height: 20px;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name-sidebar {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 11px;
    color: var(--text-muted);
}

.user-menu-container {
    position: relative;
}

.user-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu-btn:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}

.user-menu-btn svg {
    width: 18px;
    height: 18px;
}

.user-menu-dropdown {
    position: fixed;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 10000;
    display: none;
    overflow: hidden;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-primary);
    transition: var(--transition);
    text-align: left;
}

.user-menu-item:hover {
    background: var(--bg-hover);
}

.user-menu-item:last-child {
    color: var(--danger-color);
}

.user-menu-item:last-child:hover {
    background: rgba(209, 52, 56, 0.1);
}

.user-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Settings Section */
.settings-section {
    border-top: 1px solid var(--border-color);
    padding-top: 16px;
}

.settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 4px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.settings-header:hover {
    background: var(--bg-hover);
}

.settings-header svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.settings-toggle {
    transition: transform 0.3s ease;
    color: var(--text-muted) !important;
}

.settings-section.collapsed .settings-toggle {
    transform: rotate(-90deg);
}

.settings-header span {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.settings-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 200px;
    overflow-y: auto;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.settings-section.collapsed .settings-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.settings-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-label svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

/* Profile Picture Controls */
.profile-picture-setting {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.profile-picture-controls {
    display: flex;
    gap: 8px;
    width: 100%;
}

.profile-picture-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
}

.profile-picture-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.profile-picture-btn.remove-btn:hover {
    border-color: #ef4444;
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.profile-picture-btn svg {
    width: 16px;
    height: 16px;
}

/* Theme Toggle */
.theme-toggle {
    display: none;
    position: relative;
    width: 56px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.theme-toggle-track {
    position: relative;
    width: 100%;
    height: 100%;
    background: var(--border-color);
    border-radius: 14px;
    transition: background-color 0.3s ease;
}

body.dark-theme .theme-toggle-track {
    background: var(--primary-color);
}

.theme-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-theme .theme-toggle-thumb {
    transform: translateX(28px);
}

.theme-icon {
    width: 14px;
    height: 14px;
    position: absolute;
    transition: opacity 0.3s ease;
}

.sun-icon {
    color: #f59e0b;
    opacity: 1;
}

.moon-icon {
    color: #8b5cf6;
    opacity: 0;
}

body.dark-theme .sun-icon {
    opacity: 0;
}

body.dark-theme .moon-icon {
    opacity: 1;
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-primary: #1f2937;
    --bg-secondary: #111827;
    --bg-hover: #374151;
    --bg-app: #0f1419;
    --text-primary: #f9fafb;
    --text-secondary: #e5e7eb;
    --text-muted: #9ca3af;
    --border-color: #374151;
    --border-light: #4b5563;
}

/* Dark Theme Sidebar Specific Styles */
body.dark-theme .sidebar {
    background: #1f2937;
    border-right: 1px solid #374151;
    box-shadow: 4px 0 12px rgba(0, 0, 0, 0.3);
}

body.dark-theme .sidebar-header {
    border-bottom: 1px solid #374151;
}

body.dark-theme .nav-item {
    color: #9ca3af;
}

body.dark-theme .nav-item:hover {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .nav-item.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

body.dark-theme .user-info-sidebar {
    background: #111827;
    border: 1px solid #374151;
}

body.dark-theme .settings-item {
    background: #111827;
    border: 1px solid #374151;
}

body.dark-theme .member-item {
    background: transparent;
}

body.dark-theme .member-item:hover {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .member-item.unread {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

body.dark-theme .theme-toggle-thumb {
    background: #1f2937;
}

body.dark-theme .chat-box {
    background: #1f2937;
    border: 1px solid #374151;
}

body.dark-theme .chat-box-body {
    background: #111827;
}

body.dark-theme .chat-messages {
    background: #0f1419;
}

body.dark-theme .chat-message-bubble {
    background: #374151;
    color: #f9fafb;
}

body.dark-theme .chat-message.sent .chat-message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

body.dark-theme .chat-input {
    background: #1f2937;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-theme .chat-input:focus {
    background: #111827;
}

body.dark-theme .emoji-picker {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .emoji-item:hover {
    background: #374151;
}

body.dark-theme .chat-date-separator span {
    background: #1f2937;
    color: #9ca3af;
}

body.dark-theme .typing-indicator {
    background: #111827;
    border-top: 1px solid #374151;
}

body.dark-theme .message-attachment {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-theme .message-attachment:hover {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-theme .attachment-icon {
    background: #374151;
}

body.dark-theme .attachment-name {
    color: #f9fafb;
}

body.dark-theme .reaction-badge {
    background: #374151;
    border-color: #4b5563;
}

body.dark-theme .reaction-badge:hover {
    background: #4b5563;
}

body.dark-theme .add-reaction-btn {
    background: #1f2937;
    border-color: #4b5563;
    color: #9ca3af;
}

body.dark-theme .add-reaction-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: #374151;
}

body.dark-theme .reaction-picker {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .file-preview-container {
    background: #111827;
    border-top: 1px solid #374151;
}

body.dark-theme .file-preview-item {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .create-post-card,
body.dark-theme .post-card {
    background: #1f2937;
}

body.dark-theme .post-input {
    background: #111827;
    border-color: #374151;
    color: #f9fafb;
}

body.dark-theme .post-input:hover {
    background: #0f1419;
}

body.dark-theme .post-modal-content {
    background: #1f2937;
}

body.dark-theme .post-modal-header {
    border-bottom-color: #374151;
}

body.dark-theme .post-modal-footer {
    border-top-color: #374151;
}

body.dark-theme .post-textarea {
    color: #f9fafb;
}

body.dark-theme .modal-close-btn {
    background: #111827;
}

body.dark-theme .modal-close-btn:hover {
    background: #374151;
}

body.dark-theme .post-stats {
    border-top-color: #374151;
    border-bottom-color: #374151;
}

body.dark-theme .post-action-btn:hover {
    background: #374151;
}

body.dark-theme .comment-content,
body.dark-theme .comment-input {
    background: #111827;
}

body.dark-theme .comment-input:focus {
    background: #0f1419;
}

body.dark-theme .post-file-item.file-attachment,
body.dark-theme .post-file-attachment {
    background: #111827;
    border-color: #374151;
}

body.dark-theme .create-post-actions {
    border-top-color: #374151;
}

body.dark-theme .quick-post-btn:hover {
    background: #374151;
}

body.dark-theme .post-comments {
    border-top-color: #374151;
}

body.dark-theme .comment-box {
    border-top-color: #374151;
}

body.dark-theme .post-attachment-btn {
    background: #111827;
    border-color: #374151;
}

body.dark-theme .post-attachment-btn:hover {
    background: #374151;
}

body.dark-theme .task-menu-dropdown {
    background: #1f2937;
    border-color: #374151;
}

body.dark-theme .task-menu-item:hover {
    background: #374151;
}

body.dark-theme .task-delete-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    overflow-y: auto;
}

.view-container {
    width: 100%;
}

#boardView {
    display: block;
    overflow-y: auto;
}

.app-wrapper {
    padding: 32px;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Resources Section */
.resources-wrapper {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.resources-header {
    margin-bottom: 32px;
    flex-shrink: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.resources-header .header-text {
    flex: 1;
}

.tasks-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.tasks-header .header-text {
    flex: 1;
}

.resources-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    letter-spacing: 0;
    line-height: 1.2;
}

.resources-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.resource-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.resource-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.resource-video {
    position: relative;
    width: 100%;
    padding-bottom: 45%; /* Reduced from 56.25% */
    background: #000;
}

.resource-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.resource-info {
    padding: 14px 16px;
}

.resource-info h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

.resource-info p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-light) 0%, #f0f9ff 100%);
    color: var(--primary-color);
    border-radius: var(--radius-lg);
    font-size: 11px;
    font-weight: 600;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.container main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

header {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    overflow: visible;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

header h1 {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.03em;
}

header h1 .icon {
    width: 28px;
    height: 28px;
    margin-right: 10px;
    color: white;
    background: var(--primary-color);
    padding: 5px;
    border-radius: var(--radius-sm);
}

header h1 span {
    color: var(--text-primary);
}

.task-summary {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.summary-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.summary-item strong {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    line-height: 1;
    margin-bottom: 4px;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 400px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.modal-header {
    padding: 20px 24px;
    text-align: center;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
}

.login-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.modal-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group.password-group {
    padding-top: 10px;
    margin-bottom: 36px;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
    color: #94a3b8;
}

.toggle-password:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.toggle-password:active {
    transform: translateY(-50%) scale(0.95);
}

.toggle-password .eye-icon {
    width: 20px;
    height: 20px;
    transition: opacity 0.2s;
}

body.dark-theme .toggle-password {
    color: #64748b;
}

body.dark-theme .toggle-password:hover {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

body.dark-theme .form-group label {
    color: #cbd5e1;
}

.form-group label svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: white;
    color: var(--text-primary);
    font-weight: 400;
}

body.dark-theme .form-group input {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: #f1f5f9;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.form-group input::placeholder {
    color: #94a3b8;
}

.modal-footer {
    padding: 16px 24px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
}

.login-footer-text {
    text-align: center;
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    line-height: 1.6;
    font-weight: 500;
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--danger-color);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 16px;
    color: var(--danger-color);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.error-message svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-login {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: var(--transition);
}


.btn-login:hover {
    background: var(--primary-hover);
}

.btn-login:active {
    background: var(--primary-dark);
}

.btn-login svg {
    width: 16px;
    height: 16px;
}

.btn-guest {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.btn-guest:hover {
    background: var(--bg-hover);
    border-color: var(--text-secondary);
}

.btn-guest:active {
    background: var(--border-color);
}

.btn-guest svg {
    width: 16px;
    height: 16px;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 14px 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

body.dark-theme .login-divider::before {
    background: rgba(255, 255, 255, 0.1);
}

.login-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

body.dark-theme .login-divider span {
    background: #1e293b;
    color: #94a3b8;
}

.btn-google {
    width: 100%;
    padding: 10px 20px;
    background: white;
    color: #3c4043;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    margin-bottom: 4px;
}

body.dark-theme .btn-google {
    background: rgba(255, 255, 255, 0.05);
    color: #f1f5f9;
    border-color: rgba(255, 255, 255, 0.1);
}

.btn-google:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
}

body.dark-theme .btn-google:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #4285F4;
}

.btn-google:active {
    background: var(--bg-hover);
}

/* Tabs */
.tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--bg-secondary);
    padding: 4px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
    transition: var(--transition);
    position: relative;
}

.tab-btn svg {
    width: 16px;
    height: 16px;
}

.tab-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.tab-count {
    background: rgba(255, 255, 255, 0.25);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.tab-btn.active .tab-count {
    background: rgba(255, 255, 255, 0.35);
}

/* Filter Section */
.filter-section {
    background: var(--bg-primary);
    padding: 0;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition);
}

.filter-toggle-btn {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    transition: all 0.2s;
}

.filter-toggle-btn:hover {
    background: var(--bg-secondary);
}

.filter-chevron {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.filter-content {
    padding: 0 20px 16px 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.filter-dropdown {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    font-weight: 400;
    outline: none;
    transition: var(--transition);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
}

.filter-dropdown:hover {
    border-color: var(--text-secondary);
}

.filter-dropdown:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}


/* Task Input */
.add-task-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    padding: 10px 20px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: white;
    transition: var(--transition);
    gap: 8px;
    min-width: 160px;
}

.add-task-btn:hover {
    background: var(--primary-hover);
}

.add-task-btn:active {
    background: var(--primary-dark);
}

.add-task-btn svg {
    width: 16px;
    height: 16px;
}

.task-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-input-form {
    background: var(--bg-primary);
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    max-width: 560px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.form-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 6px;
    border-radius: 50%;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--bg-hover);
}

.btn-close svg {
    width: 20px;
    height: 20px;
}

.form-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.task-input-form input[type="text"],
.task-input-form textarea,
.task-input-form select,
.task-input-form input[type="date"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: none;
    transition: border 0.15s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.task-input-form input:focus,
.task-input-form textarea:focus,
.task-input-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

/* Priority Options */
.priority-options {
    display: flex;
    gap: 3px;
    flex-wrap: nowrap;
}

.priority-option {
    flex: 1;
    min-width: 0;
    position: relative;
    cursor: pointer;
}

.priority-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-option .priority-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-secondary);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.priority-option .priority-label svg {
    display: none;
}

.priority-option:hover .priority-label {
    background: var(--bg-hover);
}

.priority-option-low.active .priority-label {
    background: #10b981;
    color: white;
    font-weight: 600;
}

.priority-option-medium.active .priority-label {
    background: #f59e0b;
    color: white;
    font-weight: 600;
}

.priority-option-high.active .priority-label {
    background: #ef4444;
    color: white;
    font-weight: 600;
}

.task-input-form input:focus,
.task-input-form textarea:focus,
.task-input-form select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.task-input-form input[type="text"]::placeholder,
.task-input-form textarea::placeholder {
    color: var(--text-muted);
}

.task-input-form #taskInput {
    font-size: 16px;
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
}

.btn-save,
.btn-cancel {
    padding: 6px 14px;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-save {
    background: var(--primary-color);
    color: white;
}

.btn-save:hover {
    background: var(--primary-hover);
}

.btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-cancel:hover {
    background: var(--bg-hover);
}

/* Tasks List */

.tasks-list {
    display: block;
    width: 100%;
    flex: 1;
    min-height: 0;
}

/* Add animation for new categories */
/* Category Tabs */
.category-tabs {
    display: flex;
    gap: 0;
    width: 100%;
    margin-bottom: 24px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid #f0f0f0;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.category-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.category-tabs::-webkit-scrollbar-thumb {
    background: transparent;
}

.category-tabs::-webkit-scrollbar-thumb:hover {
    background: transparent;
}

.category-tab {
    padding: 14px 28px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    margin-bottom: -2px;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    transition: background 0.2s ease;
}

.category-tab:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.category-tab.active {
    color: #0A66C2;
    border-bottom-color: #0A66C2;
    font-weight: 600;
}

.category-tab.active::before {
    background: transparent;
}

.category-section {
    animation: slideInCategory 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInCategory {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.task-item:hover {
    border-color: var(--accent-color);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
    transform: translateY(-3px);
}

.task-item.completed {
    background: var(--bg-primary);
    opacity: 0.7;
}

.task-item.completed:hover {
    opacity: 1;
}

.task-item.completed .task-content .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-checkbox {
    min-width: 22px;
    width: 22px;
    height: 22px;
    margin-right: 16px;
    margin-top: 3px;
    border: 2px solid var(--text-muted);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-checkbox:hover {
    border-color: var(--primary-color);
    background-color: rgba(99, 102, 241, 0.1);
    transform: scale(1.15);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.task-item.completed .task-checkbox {
    background: linear-gradient(135deg, var(--success-color), #059669);
    border-color: var(--success-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.task-item.completed .task-checkbox::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-bottom: 2px;
}

.task-content {
    flex: 1;
    cursor: pointer;
}

.task-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
    letter-spacing: 0;
}

.task-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.task-assignee {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    margin-top: 6px;
    margin-right: 6px;
    padding: 4px 8px;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    width: fit-content;
    border: 1px solid var(--primary-color);
}

.task-assignee svg {
    width: 10px;
    height: 10px;
}

.task-app-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 8px;
    margin-right: 8px;
    padding: 6px 12px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    width: fit-content;
    border: 1px solid var(--border-color);
}

.task-app-badge svg {
    width: 12px;
    height: 12px;
}

/* Priority Badge */
.task-priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 6px;
    margin-right: 6px;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    width: fit-content;
}

.task-priority-badge svg {
    width: 10px;
    height: 10px;
}

.priority-low {
    color: var(--success-color);
    background: #F0FFF4;
    border: 1px solid var(--success-color);
}

.priority-medium {
    color: #d97706;
    background: #fef3c7;
    border: 1px solid #fcd34d;
}

.priority-high {
    color: #dc2626;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

body.dark-theme .priority-low {
    color: #6ee7b7;
    background: rgba(5, 150, 105, 0.15);
    border: 1px solid rgba(110, 231, 183, 0.3);
}

body.dark-theme .priority-medium {
    color: #fcd34d;
    background: rgba(217, 119, 6, 0.15);
    border: 1px solid rgba(252, 211, 77, 0.3);
}

body.dark-theme .priority-high {
    color: #fca5a5;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(252, 165, 165, 0.3);
}

/* Threaded Comments Section */
.task-comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.comments-header svg {
    width: 18px;
    height: 18px;
    color: var(--primary-color);
}

.comment-item {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    border-left: 3px solid var(--primary-color);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.comment-item:hover {
    background: white;
    box-shadow: var(--shadow-md);
    border-left-width: 4px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    gap: 8px;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
}

.comment-author svg {
    width: 16px;
    height: 16px;
}

.comment-time {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
}

.comment-body {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 10px;
    white-space: pre-wrap;
}

.comment-actions {
    display: flex;
    gap: 8px;
}

.comment-reply-btn,
.comment-delete-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.comment-reply-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.comment-delete-btn:hover {
    background: #fee;
    color: var(--danger-color);
}

.comment-reply-btn svg,
.comment-delete-btn svg {
    width: 14px;
    height: 14px;
}

.comment-input-form {
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: var(--radius-md);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-md);
    animation: slideDown 0.2s ease;
}

.comment-input-form.reply-form {
    margin-top: 12px;
    margin-left: 0;
}

.comment-textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 60px;
    margin-bottom: 8px;
    transition: var(--transition);
    background: var(--bg-primary);
}

.comment-textarea:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px var(--primary-light);
}

.comment-input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.add-comment-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--bg-primary);
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    width: 100%;
    transition: var(--transition);
}

.add-comment-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.add-comment-btn svg {
    width: 16px;
    height: 16px;
}

/* File Attachments */
.attachment-upload {
    margin: 12px 0;
}

.attach-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
}

.attach-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.attach-btn svg {
    width: 16px;
    height: 16px;
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.file-preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 11px;
    color: var(--text-secondary);
    max-width: 100px;
}

.file-preview-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.file-preview-item span {
    text-align: center;
    word-break: break-word;
    width: 100%;
}

.file-icon-preview {
    font-size: 32px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comment-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.attachment-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.attachment-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.image-attachment {
    max-width: 200px;
    cursor: pointer;
}

.image-attachment img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-attachment .attachment-name {
    padding: 8px;
    font-size: 11px;
    color: var(--text-secondary);
    background: var(--bg-primary);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.file-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    min-width: 200px;
}

.file-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-light);
    border-radius: var(--radius-sm);
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-attachment .attachment-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

.attachment-size {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.download-btn {
    padding: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* Image Viewer Modal */
.image-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.image-viewer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.image-viewer-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.image-viewer-content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
}

.image-viewer-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: var(--transition);
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.image-viewer-close svg {
    width: 24px;
    height: 24px;
}

.image-viewer-title {
    color: white;
    font-size: 14px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    border-radius: var(--radius-md);
}

.task-metadata {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.task-metadata-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.task-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
    margin-left: 12px;
}

.task-item:hover .task-actions {
    opacity: 1;
}

.task-action-btn {
    padding: 8px;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-action-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
    color: var(--text-primary);
    transform: scale(1.05);
}

.task-action-btn svg {
    width: 18px;
    height: 18px;
    display: block;
}

/* Task Menu */
.task-menu-wrapper {
    position: relative;
}

.task-menu-btn {
    padding: 6px;
}

.task-menu-btn svg {
    width: 20px;
    height: 20px;
}

.task-menu-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
}

.task-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.task-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition);
}

.task-menu-item:first-child {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.task-menu-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.task-menu-item:hover {
    background: var(--bg-secondary);
}

.task-delete-btn:hover {
    background: #fee;
    color: var(--danger-color);
}

.task-menu-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.task-menu-item span {
    flex: 1;
}

/* Trash Buttons */
.btn-icon {
    padding: 10px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn-restore {
    color: var(--success-color);
}

.btn-restore:hover {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
    transform: scale(1.05);
}

.btn-delete-permanent {
    color: var(--danger-color);
}

.btn-delete-permanent:hover {
    background: var(--danger-color);
    border-color: var(--danger-color);
    color: white;
    transform: scale(1.05);
}

/* Trash View */
.trash-container {
    max-width: 900px;
    margin: 0 auto;
}

.trash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0;
    margin-bottom: 32px;
    margin-top: -8px;
}

.trash-header .header-text {
    flex: 1;
}

.trash-header h1 {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: 0;
}

.trash-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
    font-weight: 400;
}

.trash-header .header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.empty-trash-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--danger-color);
    border-radius: var(--radius-md);
    color: var(--danger-color);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.empty-trash-btn:hover {
    background: var(--danger-color);
    color: white;
}

.empty-trash-btn svg {
    width: 18px;
    height: 18px;
}

.trash-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trash-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.trash-item:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.trash-item .task-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trash-item .task-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.trash-item .task-meta {
    font-size: 13px;
    color: var(--text-muted);
}

.trash-item .task-actions {
    display: flex;
    gap: 8px;
    opacity: 1;
}

.trash-section-header {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 4px;
    margin-top: 8px;
    border-bottom: 1px solid var(--border-color);
}

.trash-section-header:first-child {
    margin-top: 0;
}

.trash-category-item {
    background: linear-gradient(135deg, var(--bg-primary) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    border-left: 3px solid var(--primary-color);
}

.empty-state {
    text-align: center;
    padding: 100px 20px;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    color: var(--text-muted);
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 400;
    line-height: 1.6;
}

/* Edit Mode */
.task-item.editing {
    flex-direction: column;
    padding: 0;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.task-item.editing .task-checkbox,
.task-item.editing .task-actions {
    display: none;
}

/* Task Edit Modal */
.task-edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.task-edit-modal.active {
    opacity: 1;
}

.task-edit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.task-edit-modal-content {
    position: relative;
    width: 90%;
    max-width: 1100px;
    max-height: 92vh;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    overflow: visible;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.task-edit-modal.active .task-edit-modal-content {
    transform: scale(1);
}

.edit-modal-wrapper {
    background: white;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    position: relative;
}

.modal-header-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    padding: 16px;
    background: linear-gradient(to bottom, #ffffff, #fafbfc);
    border-bottom: 1px solid #e5e7eb;
}

.modal-close-x {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #9ca3af;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.modal-close-x:hover {
    background: #fee2e2;
    border-color: var(--danger-color);
    color: #dc2626;
    box-shadow: 0 6px 12px rgba(220, 38, 38, 0.25);
    transform: rotate(90deg);
}

.modal-actions-menu {
    position: relative;
}

.modal-menu-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-lg);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #9ca3af;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.modal-menu-btn:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(139, 92, 246, 0.05));
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 6px 12px rgba(99, 102, 241, 0.15);
}

.modal-dropdown-menu {
    position: absolute;
    top: 48px;
    right: 0;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2), 0 8px 20px rgba(99, 102, 241, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.1);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    z-index: 10;
}

.modal-dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    border: none;
    background: white;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.06), rgba(139, 92, 246, 0.03));
    color: var(--primary-color);
}

.dropdown-item.delete {
    color: #dc2626;
    border-top: 2px solid #f3f4f6;
}

.dropdown-item.delete:hover {
    background: #fef2f2;
    color: #dc2626;
}

.edit-modal-header {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(139, 92, 246, 0.02));
    padding: 28px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
}

.edit-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-edit-task {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-edit-task:hover {
    background: var(--primary-hover);
}

.modal-close-btn {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.modal-close-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.edit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: #f8f9fa;
}

.edit-form-container {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.edit-form-single {
    max-width: 800px;
    margin: 0 auto;
}

.edit-main-column,
.edit-side-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.edit-card {
    background: white;
    border-radius: 16px;
    border: 1px solid #e0e7ff;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.edit-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.card-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-bottom: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.comment-count {
    background: var(--primary-color);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
}

.card-body {
    padding: 24px;
}

.priority-selector-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.priority-btn {
    cursor: pointer;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 14px;
    text-align: center;
    transition: all 0.2s;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.priority-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.priority-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-icon {
    font-size: 20px;
    font-weight: bold;
}

.priority-text {
    font-size: 13px;
    font-weight: 600;
}

.priority-btn.priority-low .priority-icon {
    color: #10b981;
}

.priority-btn.priority-medium .priority-icon {
    color: #f59e0b;
}

.priority-btn.priority-high .priority-icon {
    color: #ef4444;
}

.priority-btn.active {
    transform: translateY(-2px);
}

.priority-btn.priority-low.active {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    border-color: #10b981;
    color: #065f46;
}

.priority-btn.priority-medium.active {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #f59e0b;
    color: #92400e;
}

.priority-btn.priority-high.active {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #ef4444;
    color: #991b1b;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-item svg {
    color: var(--primary-color);
    flex-shrink: 0;
    margin-top: 2px;
}

.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

.comments-section {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px !important;
}

@media (max-width: 968px) {
    .edit-form-grid-new {
        grid-template-columns: 1fr;
    }
    
    .edit-side-column {
        order: 2;
    }
}

.edit-form-single {
    max-width: 700px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-field-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.modern-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.modern-input,
.modern-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.modern-input:focus,
.modern-textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modern-textarea {
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
}

.form-row-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.priority-selector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.priority-option-modern {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.2s;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.priority-option-modern:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.priority-option-modern input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-color);
    transition: all 0.2s;
}

.priority-low .priority-dot {
    background: #10b981;
}

.priority-medium .priority-dot {
    background: #f59e0b;
}

.priority-high .priority-dot {
    background: #ef4444;
}

.priority-option-modern.selected {
    border-color: currentColor;
    background: rgba(99, 102, 241, 0.05);
    font-weight: 600;
}

.priority-low.selected {
    border-color: #10b981;
    color: #059669;
}

.priority-medium.selected {
    border-color: #f59e0b;
    color: #d97706;
}

.priority-high.selected {
    border-color: #ef4444;
    color: #dc2626;
}

.task-info-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-key {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-val {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.comments-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.empty-comments {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

.btn-add-comment-modern {
    width: 100%;
    padding: 10px 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 12px;
}

.btn-add-comment-modern:hover {
    background: var(--primary-hover);
}

.edit-modal-footer {
    background: linear-gradient(to top, #f9fafb, #ffffff);
    border-top: 2px solid #e5e7eb;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-cancel-modern,
.btn-save-modern {
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-cancel-modern {
    background: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.btn-cancel-modern:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    transform: translateY(-1px);
}

.btn-save-modern {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-save-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.task-view-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.view-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    letter-spacing: 0.3px;
}

.view-value {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.6;
    padding: 12px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.priority-badge-view {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    width: fit-content;
}

.priority-badge-view .priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.priority-badge-view.priority-low {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.priority-badge-view.priority-low .priority-dot {
    background: #10b981;
}

.priority-badge-view.priority-medium {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.priority-badge-view.priority-medium .priority-dot {
    background: #f59e0b;
}

.priority-badge-view.priority-high {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.priority-badge-view.priority-high .priority-dot {
    background: #ef4444;
}

@media (max-width: 768px) {
    .task-edit-modal {
        padding: 0;
    }
    
    .task-edit-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .form-row-modern {
        grid-template-columns: 1fr;
    }
    
    .priority-selector {
        grid-template-columns: 1fr;
    }
    
    .edit-modal-body {
        padding: 20px;
    }
    
    .edit-modal-footer {
        flex-direction: column-reverse;
        padding: 16px 20px;
    }
    
    .btn-cancel-modern,
    .btn-save-modern {
        width: 100%;
        justify-content: center;
    }
}

.edit-modal-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-modal-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.edit-modal-title h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.edit-modal-title svg {
    flex-shrink: 0;
}

.modal-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
}

.modal-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.edit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 28px;
}

.edit-form-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label svg {
    color: #6366f1;
    flex-shrink: 0;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    min-height: 100px;
    line-height: 1.6;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.priority-card {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.priority-card:hover {
    border-color: #6366f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.priority-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.priority-card.active {
    transform: translateY(-2px);
}

.priority-low.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
}

.priority-low.active .priority-content {
    color: white;
}

.priority-medium.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
}

.priority-medium.active .priority-content {
    color: white;
}

.priority-high.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.3);
}

.priority-high.active .priority-content {
    color: white;
}

.edit-form-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-header svg {
    color: #6366f1;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 600;
}

.comments-container {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.no-comments-text {
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
    padding: 20px;
    margin: 0;
}

.btn-add-comment {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-add-comment:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.edit-modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.btn-secondary,
.btn-primary {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-secondary {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .task-edit-modal {
        padding: 0;
    }
    
    .task-edit-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .edit-form-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-form-sidebar {
        order: -1;
    }
    
    .form-row-2 {
        grid-template-columns: 1fr;
    }
    
    .priority-grid {
        grid-template-columns: 1fr;
    }
    
    .edit-modal-body {
        padding: 20px;
    }
    
    .edit-modal-footer {
        flex-direction: column-reverse;
        padding: 16px 20px;
    }
    
    .btn-secondary,
    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

.task-edit-form {
    width: 100%;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    overflow: hidden;
}

.edit-form-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.edit-form-header h3 {
    margin: 0;
    color: white;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-form {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: white;
}

.btn-close-form:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

.form-body {
    padding: 24px;
    max-height: 600px;
    overflow-y: auto;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label,
.section-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.section-label {
    margin-bottom: 16px;
}

.form-group label svg,
.section-label svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.task-edit-form input[type="text"],
.task-edit-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: all 0.2s;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.task-edit-form .edit-title {
    font-size: 16px;
    font-weight: 600;
}

.task-edit-form input[type="text"]:focus,
.task-edit-form textarea:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.task-edit-form textarea {
    min-height: 100px;
    line-height: 1.6;
}

.edit-comments-section {
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.task-metadata-readonly {
    padding: 12px 16px;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.task-metadata-readonly svg {
    color: var(--primary-color);
    flex-shrink: 0;
}

.priority-options {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
}

.priority-option {
    position: relative;
    cursor: pointer;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

.priority-option:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.priority-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.priority-option.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.priority-option.active .priority-label {
    color: white;
    font-weight: 600;
}

.priority-option-low.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-color: #10b981;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.priority-option-medium.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border-color: #f59e0b;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.priority-option-high.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-color: #ef4444;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.priority-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.edit-comments-section .no-comments {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 12px 0;
    font-style: italic;
    text-align: center;
    padding: 16px;
}

.edit-comments-section .add-comment-btn {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
    margin-top: 12px;
}

.edit-comments-section .add-comment-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.edit-comments-section .add-comment-btn svg {
    width: 16px;
    height: 16px;
}

.edit-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.edit-form-actions .btn-cancel,
.edit-form-actions .btn-save {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.edit-form-actions .btn-cancel {
    background: white;
    color: var(--text-secondary);
    border: 2px solid var(--border-color);
}

.edit-form-actions .btn-cancel:hover {
    background: var(--bg-secondary);
    border-color: var(--text-secondary);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.edit-form-actions .btn-save {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.edit-form-actions .btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .priority-options {
        grid-template-columns: 1fr;
    }
    
    .form-body {
        padding: 16px;
        max-height: 500px;
    }
    
    .edit-form-actions {
        padding: 16px;
        flex-direction: column-reverse;
    }
    
    .edit-form-actions .btn-cancel,
    .edit-form-actions .btn-save {
        width: 100%;
        justify-content: center;
    }
}

/* Chat Box - Messenger Style */
.chat-box {
    position: fixed;
    bottom: 0;
    right: 24px;
    width: 360px;
    height: 500px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    z-index: 1000;
    border: 1px solid var(--border-color);
    border-bottom: none;
    animation: slideUpChat 0.3s ease;
}

@keyframes slideUpChat {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-box.active {
    display: flex;
}

.chat-box.minimized {
    height: 60px;
}

.chat-box.minimized .chat-box-body {
    display: none;
}

.chat-box-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    flex-shrink: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    cursor: pointer;
}

.chat-box-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-minimize-btn,
.chat-box .chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}

.chat-minimize-btn:hover,
.chat-box .chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-minimize-btn svg,
.chat-box .chat-close-btn svg {
    width: 18px;
    height: 18px;
}

.chat-box-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-box .chat-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-box .chat-user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.chat-box .chat-user-avatar svg {
    width: 20px;
    height: 20px;
}

.chat-box .chat-user-info h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.chat-box .chat-status {
    font-size: 12px;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-box .chat-status::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    display: inline-block;
}

.chat-box .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: messageSlide 0.3s ease;
    max-width: 85%;
}

@keyframes messageSlide {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-message.sent {
    flex-direction: row-reverse;
    margin-left: auto;
}

.chat-message-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.chat-message.sent .chat-message-avatar {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.chat-message-content {
    flex: 1;
    min-width: 0;
}

.chat-message-bubble {
    background: white;
    padding: 10px 14px;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    word-wrap: break-word;
    display: inline-block;
    max-width: 100%;
}

.chat-message.sent .chat-message-bubble {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 16px 16px 4px 16px;
}

.chat-message.received .chat-message-bubble {
    border-radius: 16px 16px 16px 4px;
}

.chat-message-text {
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
    white-space: pre-wrap;
}

.chat-message-footer {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 10px;
    color: var(--text-muted);
}

.chat-message.sent .chat-message-footer {
    justify-content: flex-end;
}

.chat-message-time {
    font-size: 10px;
}

.chat-message.sent .chat-message-time {
    color: var(--text-muted);
}

.message-read-receipt {
    display: flex;
    align-items: center;
}

.message-read-receipt svg {
    width: 14px;
    height: 14px;
    color: #22c55e;
}

.chat-date-separator {
    text-align: center;
    padding: 8px 0;
    margin: 8px 0;
}

.chat-date-separator span {
    background: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.typing-indicator {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.typing-dots {
    display: flex;
    gap: 4px;
}

.typing-dots span {
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.typing-text {
    font-size: 11px;
    color: var(--text-muted);
    font-style: italic;
}

.chat-emoji-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-emoji-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.chat-emoji-btn svg {
    width: 22px;
    height: 22px;
}

.emoji-picker {
    position: absolute;
    bottom: 60px;
    right: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 12px;
    z-index: 10;
    animation: slideUpChat 0.2s ease;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.emoji-item {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.emoji-item:hover {
    background: var(--bg-hover);
    transform: scale(1.1);
}

.message-attachment {
    margin-top: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.message-attachment:hover {
    background: rgba(0, 0, 0, 0.08);
}

.chat-message.sent .message-attachment {
    background: rgba(255, 255, 255, 0.2);
}

.chat-message.sent .message-attachment:hover {
    background: rgba(255, 255, 255, 0.3);
}

.attachment-icon {
    width: 36px;
    height: 36px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attachment-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.attachment-info {
    flex: 1;
    min-width: 0;
}

.attachment-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-message.sent .attachment-name {
    color: white;
}

.attachment-size {
    font-size: 10px;
    color: var(--text-muted);
}

.chat-message.sent .attachment-size {
    color: rgba(255, 255, 255, 0.8);
}

.message-image {
    margin-top: 8px;
    border-radius: 12px;
    max-width: 250px;
    max-height: 300px;
    cursor: pointer;
    transition: var(--transition);
    display: block;
}

.message-image:hover {
    opacity: 0.9;
}

.message-reactions {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.reaction-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.reaction-badge:hover {
    background: var(--bg-hover);
    transform: scale(1.05);
}

.reaction-badge.has-reacted {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

.reaction-emoji {
    font-size: 14px;
}

.reaction-count {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
}

.add-reaction-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
    color: var(--text-muted);
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.chat-message-bubble {
    position: relative;
}

.chat-message-bubble:hover .add-reaction-btn {
    display: flex;
}

.add-reaction-btn:hover {
    background: var(--bg-primary);
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: scale(1.1);
}

.reaction-picker {
    position: absolute;
    bottom: 60px;
    right: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    padding: 8px;
    display: flex;
    gap: 4px;
    z-index: 10;
    animation: slideUpChat 0.2s ease;
}

.reaction-item {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    font-size: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.reaction-item:hover {
    background: var(--bg-hover);
    transform: scale(1.15);
}

.file-preview-container {
    padding: 8px 16px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-preview-item {
    position: relative;
    padding: 8px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 200px;
}

.file-preview-name {
    font-size: 12px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-remove {
    background: var(--danger-color);
    border: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: var(--transition);
}

.file-preview-remove:hover {
    transform: scale(1.1);
}

.chat-box .chat-input-container {
    padding: 12px 16px;
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.chat-attachment-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-muted);
    flex-shrink: 0;
}

.chat-attachment-btn:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.chat-attachment-btn svg {
    width: 20px;
    height: 20px;
}

.chat-box .chat-input {
    flex: 1;
    min-width: 0;
    padding: 9px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
    background: #f9fafb;
}

.chat-box .chat-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    background: white;
}

.chat-box .chat-send-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    box-shadow: 0 2px 6px rgba(99, 102, 241, 0.25);
    flex-shrink: 0;
}

.chat-box .chat-send-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.35);
}

.chat-box .chat-send-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.chat-box .chat-send-btn svg {
    width: 20px;
    height: 20px;
}

.chat-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px 20px;
    text-align: center;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-state-icon svg {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.empty-state-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.empty-state-subtext {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

/* ==== BOARD STYLES - MODERN & CLEAN ==== */

.board-content {
    max-width: 640px;
}

/* Post Input Section - LinkedIn Style */
.board-post-input {
    background: var(--bg-primary);
    padding: 16px 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: box-shadow 0.2s ease;
}

.board-post-input:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.board-input-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0a66c2, #004182);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.board-input-avatar svg {
    width: 24px;
    height: 24px;
    color: white;
}

.board-input-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-input-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.board-post-input textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    resize: none;
    min-height: 48px;
    line-height: 1.5;
    transition: all 0.2s ease;
}

.board-post-input textarea:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-tertiary);
}

.board-post-input textarea:focus {
    outline: none;
    background: var(--bg-primary);
    border-color: #0a66c2;
    box-shadow: 0 0 0 1px #0a66c2;
}

.board-post-input textarea::placeholder {
    color: var(--text-secondary);
    font-weight: 500;
}

.board-post-input textarea.shake {
    animation: inputShake 0.5s ease;
    border-color: #ef4444 !important;
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.board-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 4px;
    border-top: 1px solid var(--border-color);
    margin-top: 4px;
}

.board-input-actions {
    display: flex;
    gap: 4px;
}

.board-attach-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.15s ease;
}

.board-attach-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0a66c2;
}

.dark-theme .board-attach-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.board-attach-btn svg {
    width: 22px;
    height: 22px;
}

.board-post-input button#boardPostBtn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #0a66c2;
    color: white;
    border: none;
    border-radius: 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.board-post-input button#boardPostBtn:hover {
    background: #004182;
}

.board-post-input button#boardPostBtn:active {
    transform: scale(0.98);
}

.board-post-input button svg {
    width: 18px;
    height: 18px;
}

/* Posts Container */
.board-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Welcome Card */
.board-welcome-card {
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    padding: 40px 32px;
    text-align: center;
}

[data-theme="dark"] .board-welcome-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(129, 140, 248, 0.05) 100%);
}

.board-welcome-icon {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.board-welcome-card h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 10px 0;
}

.board-welcome-card p {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    max-width: 380px;
    margin: 0 auto;
}

/* Post Cards */
.board-post-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    animation: postSlideIn 0.3s ease;
}

@keyframes postSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.board-post-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.board-post-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.board-post-author-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.board-post-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.board-post-avatar svg {
    width: 22px;
    height: 22px;
    color: white;
}

.board-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-post-author-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.board-post-author {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.board-post-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.board-post-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.board-post-edited {
    font-size: 11px;
    color: var(--text-tertiary);
    font-style: italic;
}

.board-post-edited::before {
    content: '•';
    margin-right: 6px;
}

.board-post-content {
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-primary);
    padding-left: 52px;
    word-wrap: break-word;
}

/* Post Footer with Like Button */
.board-post-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-left: 52px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.board-like-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.board-like-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
}

.board-like-btn svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.board-like-btn:hover svg {
    transform: scale(1.1);
}

.board-like-btn.liked {
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.08);
}

.board-like-btn.liked svg {
    animation: likePopIn 0.3s ease;
}

@keyframes likePopIn {
    0% { transform: scale(0.8); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Comment Button */
.board-comment-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: none;
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.board-comment-btn:hover {
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-color);
}

.board-comment-btn svg {
    width: 18px;
    height: 18px;
}

/* Comments Section */
.board-comments-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.board-no-comments {
    font-size: 13px;
    color: var(--text-tertiary);
    text-align: center;
    padding: 12px;
    font-style: italic;
}

.board-comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
    max-height: 300px;
    overflow-y: auto;
}

.board-comment {
    display: flex;
    gap: 10px;
    padding: 8px 0;
}

.board-comment-avatar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), #818cf8);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.board-comment-avatar svg {
    width: 16px;
    height: 16px;
    color: white;
}

.board-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.board-comment-body {
    flex: 1;
    min-width: 0;
}

.board-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.board-comment-author {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.board-comment-time {
    font-size: 11px;
    color: var(--text-tertiary);
}

.board-comment-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
}

.board-comment-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.board-comment-input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    font-size: 13px;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

.board-comment-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.board-comment-input::placeholder {
    color: var(--text-tertiary);
}

.board-comment-submit {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border: none;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.board-comment-submit:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.board-comment-submit svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Board Post Attachments */
.board-post-attachments {
    margin-top: 12px;
}

.board-post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.board-post-image {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 16/9;
}

.board-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.board-post-image:hover img {
    transform: scale(1.05);
}

.board-post-files {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.board-post-file {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.board-post-file:hover {
    background: var(--bg-hover);
}

.board-post-file svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
    flex-shrink: 0;
}

.board-post-file-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    overflow: hidden;
}

.board-post-file-name {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-post-file-size {
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Board Input Attachments Preview */
.board-attachments-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.board-attachment-preview-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.board-attachment-preview-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.board-attachment-preview-item.file {
    padding: 8px 12px;
}

.board-attachment-preview-item svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.board-attachment-preview-item .file-name {
    font-size: 12px;
    color: var(--text-primary);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-attachment-remove {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 20px;
    height: 20px;
    border: none;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    transition: var(--transition);
}

.board-attachment-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* Board Input Actions (attachment buttons) */
.board-input-actions {
    display: flex;
    gap: 4px;
}

.board-attach-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: var(--transition);
}

.board-attach-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

.board-attach-btn svg {
    width: 20px;
    height: 20px;
}

/* Image Modal */
.board-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.board-image-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
}

.board-image-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.board-image-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.board-image-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    width: 36px;
    height: 36px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.board-image-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.board-image-modal-close svg {
    width: 24px;
    height: 24px;
}

/* Input Footer with Character Counter */
.board-input-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.board-char-counter {
    font-size: 12px;
    color: var(--text-tertiary);
    transition: color 0.2s ease;
}

.board-char-counter.warning {
    color: #f59e0b;
}

.board-char-counter.limit {
    color: #ef4444;
    font-weight: 600;
}

.board-post-menu-container {
    position: relative;
}

.board-post-menu-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.board-post-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.board-post-menu-btn svg {
    width: 18px;
    height: 18px;
}

.board-post-menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    z-index: 100;
    display: none;
    overflow: hidden;
    margin-top: 4px;
    border: 1px solid var(--border-color);
}

.board-post-menu-dropdown.show {
    display: block;
}

.board-post-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s ease;
    text-align: left;
}

.board-post-menu-item:hover {
    background: var(--bg-hover);
}

.board-post-menu-item svg {
    width: 16px;
    height: 16px;
    color: var(--text-secondary);
}

.board-post-menu-item-danger {
    color: var(--danger-color);
}

.board-post-menu-item-danger svg {
    color: var(--danger-color);
}

.board-post-menu-item-danger:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* Board Post Edit */
.board-edit-textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    font-size: 15px;
    line-height: 1.6;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.board-edit-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.board-edit-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    justify-content: flex-end;
}

.board-edit-save,
.board-edit-cancel {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.board-edit-save {
    background: var(--primary-color);
    color: white;
    border: none;
}

.board-edit-save:hover {
    background: var(--primary-hover);
}

.board-edit-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.board-edit-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Mobile Header */
.mobile-header {
    display: none;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
}

.mobile-menu-overlay {
    display: none;
}

.mobile-menu {
    display: none;
}

/* Board Mobile Styles */
@media (max-width: 768px) {
    .board-content {
        max-width: 100%;
    }
    
    .board-post-input {
        padding: 12px 14px;
        border-radius: 10px;
        gap: 10px;
    }
    
    .board-input-avatar {
        width: 40px;
        height: 40px;
        min-width: 40px;
    }
    
    .board-input-avatar svg {
        width: 20px;
        height: 20px;
    }
    
    .board-post-input textarea {
        font-size: 14px;
        padding: 12px 14px;
        min-height: 44px;
        border-radius: 22px;
    }
    
    .board-input-footer {
        padding-top: 8px;
        margin-top: 8px;
    }
    
    .board-attach-btn {
        width: 36px;
        height: 36px;
    }
    
    .board-attach-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .board-post-input button#boardPostBtn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .board-post-input button svg {
        width: 16px;
        height: 16px;
    }
    
    .board-welcome-card {
        padding: 28px 20px;
        border-radius: 12px;
    }
    
    .board-welcome-icon {
        font-size: 36px;
        margin-bottom: 12px;
    }
    
    .board-welcome-card h3 {
        font-size: 18px;
    }
    
    .board-welcome-card p {
        font-size: 14px;
    }
    
    .board-post-card {
        padding: 16px;
        border-radius: 12px;
    }
    
    .board-post-avatar {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
    
    .board-post-avatar svg {
        width: 18px;
        height: 18px;
    }
    
    .board-post-author-section {
        gap: 10px;
    }
    
    .board-post-author {
        font-size: 13px;
    }
    
    .board-post-content {
        font-size: 14px;
        padding-left: 46px;
    }
    
    .board-post-footer {
        padding-left: 46px;
        margin-top: 12px;
        padding-top: 10px;
    }
    
    .board-like-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .board-like-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .board-input-footer {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .board-char-counter {
        font-size: 11px;
    }
    
    .board-edit-textarea {
        font-size: 14px;
    }
    
    .board-edit-actions {
        margin-top: 10px;
    }
    
    .board-edit-save,
    .board-edit-cancel {
        padding: 6px 12px;
        font-size: 12px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Smooth scrolling for mobile */
    * {
        -webkit-overflow-scrolling: touch;
    }
    
    html {
        scroll-behavior: smooth;
    }
    
    /* Mobile Header */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 48px;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
        padding: 0 12px;
        z-index: 101;
    }

    .mobile-header img {
        max-height: 28px;
        width: auto;
        max-width: 120px;
    }
    
    /* Task Categories */
    .category-card,
    .category-section {
        margin-bottom: 16px;
        padding: 0;
        border-radius: 6px;
        border: 1px solid var(--border-color);
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        background: var(--bg-primary);
        min-width: 240px;
        flex-shrink: 0;
    }

    .category-section {
        min-width: 100% !important;
        max-width: 100% !important;
        flex-shrink: 0;
        display: flex;
        flex-direction: column;
        background: var(--bg-card);
        border-radius: var(--radius-xl);
        border: 2px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        transition: var(--transition);
        max-height: calc(100vh - 180px);
    }
    
    .category-header {
        padding: 12px 16px;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
    }
    
    .category-title {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .category-tasks {
        padding: 12px;
    }
    
    .task-item {
        padding: 12px;
        margin-bottom: 0;
        border-bottom: 1px solid var(--border-light);
        transition: background 0.15s ease;
    }
    
    .task-item:active {
        background: var(--bg-hover);
    }
    
    .task-item:last-child {
        border-bottom: none;
    }
    
    .task-content {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .task-priority {
        font-size: 10px;
        padding: 3px 8px;
        font-weight: 600;
        border-radius: 4px;
    }
    
    /* Task Form */
    .task-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        max-height: 85vh;
        border-radius: 8px 8px 0 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
        animation: slideUpMobile 0.2s ease;
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .modal-header {
        padding: 14px 16px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .modal-header h2 {
        font-size: 16px;
        font-weight: 600;
    }
    
    .modal-body {
        padding: 20px;
        max-height: calc(85vh - 110px);
        overflow-y: auto;
    }
    
    .form-group label {
        font-size: 12px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px;
        padding: 9px 10px;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: var(--text-primary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.15s ease;
    }
    
    .mobile-menu-btn:active {
        background: var(--bg-hover);
    }
    
    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Category Tabs */
    .category-tabs {
        margin: 0 -12px 16px -12px;
        padding: 0 12px;
        gap: 8px;
    }
    
    .category-tab {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    /* Prevent zoom on input focus */
    input,
    textarea,
    select {
        font-size: 16px !important;
    }
    
    input[type="checkbox"],
    input[type="radio"] {
        width: auto;
    }
    
    /* Better input focus states */
    input:focus,
    textarea:focus,
    select:focus {
        outline: none;
        border-color: var(--primary-color);
        box-shadow: 0 0 0 1px var(--primary-color);
    }

    /* Sidebar */
    .sidebar {
        display: none;
    }
    
    /* View Container */
    .view-container {
        padding: 0;
    }
    
    .app-wrapper {
        padding: 16px;
    }
    
    /* Task List Container */
    .tasks-list {
        display: block;
        margin: 0;
        padding: 0;
    }
    
    /* Add Category Button */
    .add-category-btn,
    .category-add-task {
        min-height: 32px;
        padding: 0 8px;
        font-size: 12px;
        font-weight: 600;
        border-radius: 4px;
        touch-action: manipulation;
        white-space: nowrap;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 4px;
    }
    
    .add-category-btn svg {
        width: 14px;
        height: 14px;
    }
    
    /* Search Input */
    .task-search,
    .search-input {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 4px;
        min-height: 32px;
        max-height: 32px;
        height: 32px;
        border: 1px solid var(--border-color);
        width: 100%;
        line-height: 1.4;
    }
    
    .search-container {
        display: flex;
        position: relative;
        width: 100%;
        height: 32px;
    }
    
    .search-icon {
        position: absolute;
        left: 8px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        color: var(--text-muted);
        pointer-events: none;
    }
    
    .search-container .search-input {
        padding-left: 30px;
        padding-right: 10px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    
    /* Empty States */
    .empty-state {
        padding: 60px 20px;
        text-align: center;
        margin: 0;
        width: 100%;
        max-width: 100%;
    }

    /* Make empty state span the full row inside the horizontal tasks list */
    .tasks-list .empty-state {
        flex: 0 0 100%;
        box-sizing: border-box;
    }
    
    .empty-state svg {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
        color: var(--text-muted);
        opacity: 0.3;
    }
    
    .empty-state p {
        font-size: 15px;
        color: var(--text-secondary);
        line-height: 1.5;
        margin: 0;
    }
    
    /* Main Content */
    .main-content {
        margin-left: 0;
        margin-top: 48px;
        padding: 0;
        min-height: calc(100vh - 48px);
    }
    
    /* Mobile Menu Button */
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
        border: none;
        background: transparent;
        color: var(--text-primary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.15s ease;
    }
    
    .mobile-menu-btn:active {
        background: var(--bg-hover);
    }
    
    .mobile-menu-btn svg {
        width: 22px;
        height: 22px;
    }
    
    /* Buttons */
    .btn-primary,
    .btn-save,
    .save-task-btn,
    button[type="submit"] {
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 18px;
        min-height: 36px;
        touch-action: manipulation;
    }
    
    .btn-secondary,
    .btn-cancel {
        padding: 8px 16px;
        font-size: 13px;
        border-radius: 18px;
        min-height: 36px;
    }
    
    /* Mobile Menu Overlay */
    .mobile-menu-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .mobile-menu-overlay.active {
        display: block;
    }
    
    /* Mobile Menu */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        max-width: 100%;
        height: 100%;
        background: var(--bg-primary);
        z-index: 1000;
        transition: right 0.2s ease;
        overflow-y: auto;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.15);
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .mobile-menu-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        background: var(--bg-primary);
    }
    
    .mobile-menu-header h3 {
        font-size: 16px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .mobile-menu-close {
        width: 40px;
        height: 40px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.15s ease;
        margin-left: auto;
    }
    
    .mobile-menu-close:active {
        background: var(--bg-hover);
    }
    
    .mobile-menu-close svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-menu-content {
        padding: 12px 0;
    }
    
    /* Mobile User Info */
    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 16px;
        background: var(--bg-primary);
        border-bottom: 1px solid var(--border-color);
        margin: 0;
    }
    
    .mobile-user-info .user-avatar-sidebar {
        width: 48px;
        height: 48px;
        min-width: 48px;
        background: var(--primary-color);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
    }
    
    .mobile-user-info .user-avatar-sidebar svg {
        width: 24px;
        height: 24px;
    }
    
    .mobile-user-info .user-details {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 2px;
    }
    
    .mobile-user-info .user-name-sidebar {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-primary);
    }
    
    .mobile-user-info .user-role {
        font-size: 12px;
        color: var(--text-secondary);
        font-weight: 400;
    }
    
    .mobile-user-info .logout-btn-sidebar {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.15s ease;
    }
    
    .mobile-user-info .logout-btn-sidebar:active {
        background: var(--bg-hover);
    }
    
    .mobile-user-info .logout-btn-sidebar svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-user-info .user-menu-container {
        position: relative;
    }
    
    .mobile-user-info .user-menu-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.15s ease;
    }
    
    .mobile-user-info .user-menu-btn:active {
        background: var(--bg-hover);
    }
    
    .mobile-user-info .user-menu-btn svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-user-info .user-menu-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        background: var(--bg-primary);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        min-width: 160px;
        z-index: 1000;
        display: none;
        overflow: hidden;
        margin-top: 4px;
    }
    
    .mobile-user-info .user-menu-dropdown.show {
        display: block;
    }
    
    .mobile-user-info .user-menu-item {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 12px 16px;
        border: none;
        background: transparent;
        color: var(--text-primary);
        font-size: 14px;
        cursor: pointer;
        transition: background 0.15s ease;
        text-align: left;
    }
    
    .mobile-user-info .user-menu-item:active {
        background: var(--bg-hover);
    }
    
    .mobile-user-info .user-menu-item svg {
        width: 18px;
        height: 18px;
        color: var(--text-secondary);
    }

    /* Mobile Navigation Section */
    .mobile-nav-section {
        margin-bottom: 20px;
    }
    
    .mobile-nav-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: transparent;
        border: none;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 14px;
        font-weight: 400;
        cursor: pointer;
        transition: background 0.15s ease;
        border-radius: 0;
        margin-bottom: 0;
        touch-action: manipulation;
        border-left: 3px solid transparent;
    }
    
    .mobile-nav-item:active {
        background: var(--bg-hover);
    }
    
    .mobile-nav-item.active {
        background: var(--primary-light);
        color: var(--primary-color);
        font-weight: 600;
        border-left-color: var(--primary-color);
    }
    
    .mobile-nav-item svg {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
    }
    
    /* Mobile Settings Section */
    .mobile-settings-section {
        margin-bottom: 20px;
    }
    
    .mobile-section-title {
        font-size: 12px;
        font-weight: 600;
        text-transform: uppercase;
        color: var(--text-muted);
        padding: 0 16px;
        margin-bottom: 12px;
        letter-spacing: 0.5px;
    }
    
    /* Mobile Setting Item */
    .mobile-setting-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
        margin-bottom: 12px;
    }
    
    .mobile-setting-item .settings-label {
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--text-primary);
    }
    
    .mobile-setting-item .settings-label svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-setting-item .settings-label span {
        font-size: 14px;
        font-weight: 500;
    }
    
    /* Mobile Members Section */
    .mobile-members-section {
        background: var(--bg-secondary);
        border-radius: var(--radius-lg);
        overflow: hidden;
    }
    
    .mobile-section-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px;
        cursor: pointer;
        color: var(--text-primary);
        transition: var(--transition);
    }
    
    .mobile-section-header:hover {
        background: var(--bg-hover);
    }
    
    .mobile-section-header svg {
        width: 20px;
        height: 20px;
    }
    
    .mobile-section-header span {
        font-size: 14px;
        font-weight: 500;
    }
    
    .mobile-section-toggle {
        transition: transform 0.3s ease;
    }
    
    .mobile-members-section.collapsed .mobile-section-toggle {
        transform: rotate(-90deg);
    }
    
    .mobile-members-list {
        max-height: 300px;
        overflow-y: auto;
        transition: max-height 0.3s ease;
    }
    
    .mobile-members-section.collapsed .mobile-members-list {
        max-height: 0;
        overflow: hidden;
    }
    
    .mobile-members-list .member-item {
        padding: 12px 16px;
        border-top: 1px solid var(--border-color);
    }
    
    .container {
        padding: 0;
    }
    
    /* Headers */
    .tasks-header,
    .resources-header,
    .board-header,
    .announcements-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        padding: 0;
    }
    
    .trash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 12px;
        margin-top: 0;
        padding: 0;
    }
    
    .header-actions {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        width: 80%;
        gap: 8px;
        align-items: center;
    }

    .tasks-header h1,
    .resources-header h1,
    .board-header h1,
    .announcements-header h1 {
        font-size: 20px;
    }

    .tasks-header p,
    .resources-header p,
    .board-header p,
    .announcements-header p {
        font-size: 13px;
    }

    .add-task-btn {
        width: 100%;
        min-width: 0;
        padding: 6px 10px;
        font-size: 12px;
        min-height: 32px;
    }

    /* Tabs */
    .tabs-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tab-btn {
        flex-shrink: 0;
        font-size: 12px;
        padding: 8px 14px;
    }

    /* Filter Section */
    .filter-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Task Form */
    .task-input-form {
        margin: 12px 0;
        padding: 12px;
        border-radius: 6px;
    }

    .form-header {
        padding: 12px;
        margin: -12px -12px 0;
    }

    .form-header h3 {
        font-size: 16px;
    }

    .form-body {
        gap: 10px;
        padding: 12px 0;
    }

    .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 12px;
        margin-bottom: 5px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        padding: 8px 10px;
    }

    .form-actions {
        flex-direction: column;
        padding: 12px;
        margin: 0 -12px -12px;
        gap: 8px;
    }

    .form-actions button {
        width: 100%;
        justify-content: center;
    }
    
    /* Task Items */
    .task-item {
        padding: 10px;
        flex-direction: column;
        gap: 0;
        position: relative;
    }

    .task-checkbox {
        position: absolute;
        top: 10px;
        left: 10px;
        width: 18px;
        height: 18px;
        min-width: 18px;
        margin: 0;
    }

    .task-content {
        flex: 1;
        padding-left: 30px;
        padding-right: 36px;
        min-width: 0;
    }

    .task-title {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 4px;
        line-height: 1.4;
        padding-right: 4px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .task-details {
        font-size: 13px;
        margin-bottom: 8px;
        line-height: 1.5;
        color: var(--text-secondary);
    }

    .task-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 8px;
    }

    .task-assignee,
    .task-app-badge,
    .priority-badge {
        font-size: 11px;
        padding: 4px 8px;
        margin-top: 0;
        border-radius: 4px;
    }

    .task-assignee svg,
    .task-app-badge svg {
        width: 10px;
        height: 10px;
    }

    .task-actions {
        opacity: 1;
        position: absolute;
        top: 8px;
        right: 8px;
        display: flex;
        gap: 4px;
        margin: 0;
        flex-direction: column;
        align-items: flex-end;
    }
    
    .task-menu-wrapper {
        position: static;
    }

    .task-action-btn {
        padding: 6px;
        font-size: 12px;
        min-width: 32px;
        min-height: 32px;
        border-radius: 4px;
        transition: background 0.15s ease;
    }
    
    .task-action-btn:active {
        background: var(--bg-hover);
    }

    .task-action-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .task-menu-btn {
        padding: 4px;
    }
    
    .task-menu-btn svg {
        width: 18px;
        height: 18px;
    }
    
    .task-menu-dropdown {
        right: 0;
        top: 100%;
    }
    
    /* Resources */
    .resources-wrapper {
        padding: 12px;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .video-card {
        padding: 12px;
    }

    /* Board/Posts */
    .create-post-card {
        padding: 10px;
    }

    .post-card {
        padding: 12px;
    }

    .create-post-actions {
        flex-direction: column;
    }

    .quick-post-btn {
        padding: 10px;
    }

    .post-attachments {
        grid-template-columns: 1fr;
    }

    .post-actions {
        flex-direction: column;
        gap: 4px;
    }

    .post-action-btn {
        width: 100%;
        justify-content: center;
    }

    /* Chat */
    .chat-box {
        width: 100%;
        max-width: 100%;
        right: 0;
        bottom: 70px;
        left: 0;
        border-radius: 0;
    }

    .chat-box.minimized {
        display: none;
    }

    .chat-messages {
        max-height: 300px;
    }

    .chat-message {
        max-width: 85%;
    }

    .chat-input-container {
        padding: 10px;
        gap: 6px;
    }

    .chat-input {
        font-size: 14px;
        padding: 8px 12px;
    }

    .chat-send-btn,
    .chat-emoji-btn,
    .chat-attachment-btn {
        width: 32px;
        height: 32px;
    }

    .emoji-picker {
        width: 100%;
        max-width: 320px;
        right: 10px;
    }

    .reaction-picker {
        right: 10px;
    }

    /* Modals */
    .post-modal-content {
        width: 95%;
        margin: 10px;
    }

    .post-modal-header,
    .post-modal-body,
    .post-modal-footer {
        padding: 12px;
    }

    .post-textarea {
        min-height: 80px;
        font-size: 13px;
    }

    .post-file-preview {
        gap: 8px;
    }

    .post-preview-image {
        max-width: 150px;
        max-height: 120px;
    }

    /* Task Comments */
    .task-comments-section {
        margin-top: 12px;
        padding-top: 12px;
    }

    .comments-header {
        font-size: 13px;
        margin-bottom: 12px;
    }

    .comment-item {
        padding: 10px;
        margin-bottom: 8px;
    }

    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 3px;
    }

    .comment-author {
        font-size: 12px;
    }

    .comment-time {
        font-size: 10px;
    }

    .comment-body {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .comment-actions {
        flex-wrap: wrap;
    }

    .comment-reply-btn,
    .comment-delete-btn {
        padding: 5px 8px;
        font-size: 10px;
    }

    .comment-input-form {
        padding: 8px;
        margin-bottom: 8px;
    }

    .comment-textarea {
        font-size: 12px;
        min-height: 45px;
        padding: 6px 8px;
        margin-bottom: 6px;
    }

    .comment-input-actions {
        flex-wrap: wrap;
    }

    .add-comment-btn {
        padding: 10px 16px;
        font-size: 12px;
    }

    /* Board Comments (different from task comments) */
    .comment-box {
        gap: 8px;
    }

    .comment-avatar {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }

    .comment-input {
        font-size: 13px;
        padding: 8px 12px;
    }

    .comment-send-btn {
        width: 32px;
        height: 32px;
    }

    /* Empty States */
    /* Buttons */
    .btn-save,
    .btn-cancel,
    .btn-post {
        font-size: 13px;
        padding: 9px 18px;
    }

    /* User Avatar */
    .post-avatar {
        width: 32px;
        height: 32px;
        font-size: 13px;
    }

    .chat-message-avatar {
        width: 26px;
        height: 26px;
        font-size: 11px;
    }

    /* Stats and Counts */
    .post-stats {
        padding: 10px 0;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .stats-left,
    .stats-right {
        width: 100%;
    }

    /* Task Attachments */
    .attachment-upload {
        margin: 10px 0;
    }

    .attach-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .attach-btn svg {
        width: 14px;
        height: 14px;
    }

    .file-preview {
        gap: 6px;
        margin-top: 8px;
    }

    .file-preview-item {
        padding: 6px;
        max-width: 80px;
        font-size: 10px;
    }

    .file-preview-item img {
        width: 50px;
        height: 50px;
    }

    .file-icon-preview {
        font-size: 24px;
        width: 50px;
        height: 50px;
    }

    .comment-attachments {
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
    }

    .attachment-item {
        max-width: 100%;
    }

    .image-attachment {
        max-width: 150px;
    }

    .image-attachment img {
        height: 120px;
    }

    .image-attachment .attachment-name {
        padding: 6px;
        font-size: 10px;
    }

    .file-attachment {
        padding: 8px 10px;
        min-width: 150px;
        gap: 8px;
    }

    .file-icon {
        font-size: 20px;
        width: 32px;
        height: 32px;
    }

    /* Post File Attachments */
    .post-file-attachment {
        padding: 10px;
    }

    .message-attachment {
        padding: 8px;
    }

    /* Responsive Utilities */
    .hide-mobile {
        display: none !important;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .tasks-header h1,
    .resources-header h1,
    .board-header h1 {
        font-size: 20px;
    }

    .tasks-header p,
    .resources-header p,
    .board-header p {
        font-size: 13px;
    }

    .nav-item span {
        font-size: 10px;
    }

    /* Task Dashboard */
    .task-item {
        padding: 12px;
    }

    .task-title {
        font-size: 14px;
    }

    .task-details {
        font-size: 12px;
    }

    .task-assignee,
    .task-app-badge {
        font-size: 11px;
        padding: 5px 10px;
    }

    .task-action-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    .tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .tab-count {
        font-size: 10px;
        padding: 2px 6px;
    }

    .form-header h3 {
        font-size: 16px;
    }

    .form-group label {
        font-size: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 13px;
        padding: 8px 10px;
    }

    .btn-save,
    .btn-cancel {
        font-size: 13px;
        padding: 10px 16px;
    }

    .comment-item {
        padding: 10px;
    }

    .comment-author {
        font-size: 12px;
    }

    .comment-body {
        font-size: 12px;
    }

    .comment-textarea {
        font-size: 12px;
    }

    /* Board */
    .post-card,
    .create-post-card {
        padding: 12px;
    }

    .post-author-name,
    .comment-author {
        font-size: 13px;
    }

    .post-content p,
    .comment-text {
        font-size: 14px;
    }

    /* Chat */
    .chat-box {
        bottom: 70px;
    }

    .emoji-picker {
        max-width: 280px;
    }

    .emoji-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Category Section Styles */
.category-section {
    min-width: 350px;
    max-width: 350px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    max-height: calc(100vh - 180px);
}

.category-section:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.category-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: 0;
}

.category-menu-wrapper {
    position: relative;
}

.category-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.category-menu-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.category-menu-btn svg {
    width: 20px;
    height: 20px;
}

.category-menu-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition);
    z-index: 1000;
}

.category-menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.category-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    transition: var(--transition);
}

.category-menu-item:hover {
    background: var(--bg-hover);
}

.category-menu-item svg {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.category-menu-item.category-delete-btn {
    color: var(--danger-color);
}

.category-menu-item.category-delete-btn svg {
    color: var(--danger-color);
}

.category-menu-item.category-delete-btn:hover {
    background: rgba(239, 68, 68, 0.1);
}


.category-add-task-section {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.add-task-to-category-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-task-to-category-btn:hover {
    background: var(--primary-hover);
}

.add-task-to-category-btn:active {
    background: var(--primary-dark);
}

.add-task-to-category-btn svg {
    width: 20px;
    height: 20px;
}

.category-tasks {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    min-height: 0;
}

.category-empty-state {
    padding: 32px 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    border: 2px dashed var(--border-light);
    margin: 8px 0;
}

.dark-theme .category-header {
    border-bottom-color: #374151;
}

.dark-theme .category-title {
    color: #e5e7eb;
}

.dark-theme .category-menu-btn {
    color: #9ca3af;
}

.dark-theme .category-menu-btn:hover {
    background: #374151;
    color: #e5e7eb;
}

.dark-theme .category-menu-dropdown {
    background: #1f2937;
    border-color: #374151;
}

.dark-theme .category-menu-item {
    color: #e5e7eb;
}

.dark-theme .category-menu-item:hover {
    background: #374151;
}

.dark-theme .category-menu-item svg {
    color: #9ca3af;
}

.dark-theme .category-empty-state {
    background: #1f2937;
    border-color: #374151;
    color: #9ca3af;
}
/* Scrollbar styling for horizontal scroll */
.tasks-list::-webkit-scrollbar {
    height: 6px;
}

.tasks-list::-webkit-scrollbar-track {
    background: transparent;
}

.tasks-list::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.tasks-list::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.dark-theme .tasks-list::-webkit-scrollbar-thumb {
    background: #374151;
}

.dark-theme .tasks-list::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Category tasks vertical scrollbar */
.category-tasks::-webkit-scrollbar {
    width: 6px;
}

.category-tasks::-webkit-scrollbar-track {
    background: transparent;
}

.category-tasks::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.category-tasks::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

@media (max-width: 768px) {
    .add-task-to-category-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 6px 10px;
        background: var(--primary-color);
        color: white;
        border: none;
        border-radius: var(--radius-md);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
    }
}

/* ===================================
   NOTES FEATURE STYLES
   =================================== */

/* Notes Wrapper */
.notes-wrapper {
    display: flex;
    height: 100%;
    background: var(--bg-app);
    gap: 0;
}

/* Notes Sidebar */
.notes-sidebar {
    width: 320px;
    background: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.notes-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.notes-sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-new-note {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.btn-new-note:hover {
    background: var(--primary-hover);
    transform: scale(1.05);
}

.btn-new-note svg {
    width: 24px;
    height: 24px;
}

/* Notes Search */
.notes-search-container {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 12px;
}

.notes-search-container .search-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.notes-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
    background: transparent;
}

.notes-search-input::placeholder {
    color: var(--text-muted);
}

/* Notes Filter Tabs */
.notes-filter-tabs {
    display: flex;
    flex-direction: column;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
    gap: 4px;
}

.notes-filter-tab {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: left;
}

.notes-filter-tab svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.notes-filter-tab:hover {
    background: var(--bg-hover);
}

.notes-filter-tab.active {
    background: var(--primary-light);
    color: var(--primary-color);
    font-weight: 600;
}

/* Notes List */
.notes-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.notes-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.notes-empty-state svg {
    width: 80px;
    height: 80px;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.notes-empty-state p {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 4px 0;
}

.notes-empty-state .sub-text {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
}

/* Note Item */
.note-item {
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.note-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.note-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.note-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.note-item-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.4;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.note-pin-icon {
    width: 16px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.note-item-preview {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 12px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.note-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.note-item-date {
    font-size: 12px;
    color: var(--text-muted);
}

/* Note Colors */
.note-color-red { background: #ffebee !important; border-color: #ffcdd2 !important; }
.note-color-orange { background: #fff3e0 !important; border-color: #ffe0b2 !important; }
.note-color-yellow { background: #fffde7 !important; border-color: #fff9c4 !important; }
.note-color-green { background: #e8f5e9 !important; border-color: #c8e6c9 !important; }
.note-color-blue { background: #e3f2fd !important; border-color: #bbdefb !important; }
.note-color-purple { background: #f3e5f5 !important; border-color: #e1bee7 !important; }
.note-color-gray { background: #f5f5f5 !important; border-color: #e0e0e0 !important; }

/* Notes Editor Container */
.notes-editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--bg-secondary);
    overflow: hidden;
}

.notes-editor-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    padding: 40px;
}

.notes-editor-empty svg {
    width: 120px;
    height: 120px;
    color: var(--text-muted);
    opacity: 0.2;
    margin-bottom: 24px;
}

.notes-editor-empty h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
}

.notes-editor-empty p {
    font-size: 14px;
    color: var(--text-muted);
    margin: 0;
}

/* Notes Editor Wrapper */
.notes-editor-wrapper {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Notes Editor Header */
.notes-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.notes-editor-actions-left,
.notes-editor-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.notes-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.notes-action-btn:hover {
    background: var(--bg-hover);
    border-color: var(--text-muted);
}

.notes-action-btn.active {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.notes-action-btn svg {
    width: 18px;
    height: 18px;
}

.notes-close-btn {
    display: none;
}

.notes-timestamp {
    font-size: 12px;
    color: var(--text-muted);
    margin-right: 8px;
}

/* Color Picker */
.notes-color-picker {
    position: relative;
}

.color-picker-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 12px;
    display: none;
    gap: 8px;
    z-index: 1000;
    flex-wrap: wrap;
    width: 200px;
}

.color-picker-dropdown.active {
    display: flex;
}

.color-option {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Notes Editor Content */
.notes-editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 32px;
    overflow-y: auto;
    background: var(--bg-primary);
}

.note-title-input {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    border: none;
    outline: none;
    background: transparent;
    margin-bottom: 16px;
    padding: 8px 0;
    font-family: inherit;
}

.note-title-input::placeholder {
    color: var(--text-muted);
}

/* Notes Toolbar */
.notes-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.toolbar-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.toolbar-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.toolbar-btn:active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.toolbar-btn svg {
    width: 18px;
    height: 18px;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-color);
    margin: 0 4px;
}

/* Note Content Editable */
.note-content-editable {
    flex: 1;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    outline: none;
    min-height: 200px;
    font-family: inherit;
}

.note-content-editable:empty:before {
    content: attr(placeholder);
    color: var(--text-muted);
    pointer-events: none;
}

/* Rich text styling */
.note-content-editable b,
.note-content-editable strong {
    font-weight: 700;
}

.note-content-editable i,
.note-content-editable em {
    font-style: italic;
}

.note-content-editable u {
    text-decoration: underline;
}

.note-content-editable ul,
.note-content-editable ol {
    margin: 16px 0;
    padding-left: 28px;
}

.note-content-editable li {
    margin: 8px 0;
}

.note-content-editable p {
    margin: 12px 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .notes-wrapper {
        flex-direction: column;
    }

    .notes-sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .notes-list {
        max-height: 300px;
    }

    .notes-editor-content {
        padding: 20px 16px;
    }

    .note-title-input {
        font-size: 24px;
    }

    .notes-close-btn {
        display: flex;
    }

    .notes-editor-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--bg-primary);
        z-index: 9999;
    }

    .notes-editor-wrapper[style*="display: none"] {
        display: none !important;
    }
}

/* Scrollbar Styling for Notes */
.notes-list::-webkit-scrollbar,
.notes-editor-content::-webkit-scrollbar {
    width: 6px;
}

.notes-list::-webkit-scrollbar-track,
.notes-editor-content::-webkit-scrollbar-track {
    background: transparent;
}

.notes-list::-webkit-scrollbar-thumb,
.notes-editor-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

.notes-list::-webkit-scrollbar-thumb:hover,
.notes-editor-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}